Changeset 2066 in orxonox.OLD for orxonox/branches/chris/src/ini_parser.cc
- Timestamp:
- Jul 3, 2004, 5:36:35 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/chris/src/ini_parser.cc
r2065 r2066 17 17 #include "ini_parser.h" 18 18 19 #include <stdio.h>20 #include <strings.h>21 22 19 using namespace std; 23 20 … … 26 23 stream = NULL; 27 24 bInSection = false; 28 open File (filename);25 open_file (filename); 29 26 } 30 27 … … 34 31 } 35 32 36 int IniParser::open File( char* filename)33 int IniParser::open_file( char* filename) 37 34 { 38 35 if( filename == NULL) return -1; … … 47 44 } 48 45 49 int IniParser::get Section( char* section)46 int IniParser::get_section( char* section) 50 47 { 51 48 bInSection = false; … … 80 77 } 81 78 82 int IniParser::next Var( char* name, char* value)79 int IniParser::next_var( char* name, char* value) 83 80 { 84 81 if( stream == NULL) … … 114 111 } 115 112 116 char* IniParser::get Var( char* name, char* section, char* defvalue = "")113 char* IniParser::get_var( char* name, char* section, char* defvalue = "") 117 114 { 118 115 strcpy (internbuf, defvalue); 119 if( get Section (section) == -1) return internbuf;116 if( get_section (section) == -1) return internbuf; 120 117 121 118 char namebuf[PARSELINELENGHT]; 122 119 char valuebuf[PARSELINELENGHT]; 123 120 124 while( next Var (namebuf, valuebuf) != -1)121 while( next_var (namebuf, valuebuf) != -1) 125 122 { 126 123 if( !strcmp (name, namebuf))
Note: See TracChangeset
for help on using the changeset viewer.