Changeset 2065 in orxonox.OLD for orxonox/branches/chris/src/ini_parser.cc
- Timestamp:
- Jul 3, 2004, 1:59:21 PM (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/chris/src/ini_parser.cc
r2064 r2065 66 66 if( sscanf (linebuffer, "[%s", secbuffer) == 1) 67 67 { 68 if( ptr = strchr( secbuffer, ']') != NULL)68 if( (ptr = strchr( secbuffer, ']')) != NULL) 69 69 { 70 70 *ptr = 0; … … 114 114 } 115 115 116 char* IniParser::getVar( char* name, char* section, char* defvalue = "") 117 { 118 strcpy (internbuf, defvalue); 119 if( getSection (section) == -1) return internbuf; 120 121 char namebuf[PARSELINELENGHT]; 122 char valuebuf[PARSELINELENGHT]; 123 124 while( nextVar (namebuf, valuebuf) != -1) 125 { 126 if( !strcmp (name, namebuf)) 127 { 128 strcpy (internbuf, valuebuf); 129 return internbuf; 130 } 131 } 132 return internbuf; 133 }
Note: See TracChangeset
for help on using the changeset viewer.