Index: orxonox/branches/nico/src/ini_parser.cc
===================================================================
--- orxonox/branches/nico/src/ini_parser.cc	(revision 3021)
+++ orxonox/branches/nico/src/ini_parser.cc	(revision 3238)
@@ -25,7 +25,7 @@
 IniParser::IniParser (char* filename)
 {
-	stream = NULL;
-	bInSection = false;
-	open_file (filename);
+  stream = NULL;
+  bInSection = false;
+  openFile(filename);
 }
 
@@ -35,31 +35,31 @@
 IniParser::~IniParser ()
 {
-	if( stream != NULL) fclose (stream);
+  if( stream != NULL) fclose (stream);
 }
 
 /**
-	\brief opens another file to parse
-	\param filename: path and name of the new file to parse
-	\return zero on success or -1 if an error occured;
+   \brief opens another file to parse
+   \param filename: path and name of the new file to parse
+   \return zero on success or -1 if an error occured;
 */
-int IniParser::open_file( char* filename)
+int IniParser::openFile( char* filename)
 {
-	if( filename == NULL) return -1;
-	if( stream != NULL)	fclose (stream);
-	if( (stream = fopen (filename, "r")) == NULL)
-	{
-		printf("IniParser could not open %s\n", filename);
-		return -1;
-	}
-	bInSection = false;
-	return 0;
+  if( filename == NULL) return -1;
+  if( stream != NULL)	fclose (stream);
+  if( (stream = fopen (filename, "r")) == NULL)
+    {
+      printf("IniParser could not open %s\n", filename);
+      return -1;
+    }
+  bInSection = false;
+  return 0;
 }
 
 /**
-	\brief set the parsing cursor to the specified section
-	\param section: the name of the section to set the cursor to
-	\return zero on success or -1 if the section could not be found
+   \brief set the parsing cursor to the specified section
+   \param section: the name of the section to set the cursor to
+   \return zero on success or -1 if the section could not be found
 */
-int IniParser::get_section( char* section)
+int IniParser::getSection( char* section)
 {
   bInSection = false;
@@ -95,69 +95,69 @@
 
 /**
-	\brief gets the next VarName=VarValue pair from the parsing stream
-	\param name: a pointer to a buffer to store the name of the entry
-	\param value: a pointer to a buffer to store the value of the entry
-	\return zero if the buffers have been filled with data or -1 if there are no entries left in the current section
+   \brief gets the next VarName=VarValue pair from the parsing stream
+   \param name: a pointer to a buffer to store the name of the entry
+   \param value: a pointer to a buffer to store the value of the entry
+   \return zero if the buffers have been filled with data or -1 if there are no entries left in the current section
 */
-int IniParser::next_var( char* name, char* value)
+int IniParser::nextVar( char* name, char* value)
 {
-	if( stream == NULL)
+  if( stream == NULL)
+    {
+      bInSection = false;
+      return -1;
+    }
+  if( !bInSection) return -1;
+  
+  char linebuffer[PARSELINELENGHT];
+  char* ptr;
+  
+  while( !feof( stream))
+    {
+      // get next line
+      fgets (linebuffer, PARSELINELENGHT, stream);
+      // remove newline char
+      if( (ptr = strchr( linebuffer, '\n')) != NULL) *ptr = 0;
+      if( linebuffer[0] == '[')
 	{
-		bInSection = false;
-		return -1;
+	  bInSection = false;
+	  return -1;
 	}
-	if( !bInSection) return -1;
-	
-	char linebuffer[PARSELINELENGHT];
-	char* ptr;
-
-	while( !feof( stream))
+      if( (ptr = strchr( linebuffer, '=')) != NULL)
 	{
-			// get next line
-		fgets (linebuffer, PARSELINELENGHT, stream);
-			// remove newline char
-		if( (ptr = strchr( linebuffer, '\n')) != NULL) *ptr = 0;
-		if( linebuffer[0] == '[')
-		{
-			bInSection = false;
-			return -1;
-		}
-		if( (ptr = strchr( linebuffer, '=')) != NULL)
-		{
-			if( ptr == linebuffer) continue;
-			strcpy (value, &ptr[1]);
-			strncpy (name, linebuffer, strlen (linebuffer) - strlen (value) - 1);
-			return 0;
-		}
+	  if( ptr == linebuffer) continue;
+	  strcpy (value, &ptr[1]);
+	  strncpy (name, linebuffer, strlen (linebuffer) - strlen (value) - 1);
+	  return 0;
 	}
-	return -1;	
+    }
+  return -1;	
 }
 
 /**
-	\brief directly acesses an entry in a section
-	\param name: the name of the entry to find
-	\param section: the section where the entry is to be found
-	\param defvalue: what should be returned in case the entry cannot be found
-	\return a pointer to a buffer conatining the value of the specified entry. This buffer will contain the data specified in defvalue in case the entry wasn't found
-
-	The returned pointer points to an internal buffer, so do not free it on your own. Do not give a NULL pointer to defvalue, this will certainly
-	lead to unwanted behaviour.
+   \brief directly acesses an entry in a section
+   \param name: the name of the entry to find
+   \param section: the section where the entry is to be found
+   \param defvalue: what should be returned in case the entry cannot be found
+   \return a pointer to a buffer conatining the value of the specified entry. This buffer will contain the data specified in defvalue in case the entry wasn't found
+   
+   The returned pointer points to an internal buffer, so do not free it on your own. Do not give a NULL pointer to defvalue, this will certainly
+   lead to unwanted behaviour.
 */
-char* IniParser::get_var( char* name, char* section, char* defvalue = "")
+char* IniParser::getVar( char* name, char* section, char* defvalue = "")
 {
-	strcpy (internbuf, defvalue);
-	if( get_section (section) == -1) return internbuf;
-	
-	char namebuf[PARSELINELENGHT];
-	char valuebuf[PARSELINELENGHT];
-	
-	while( next_var (namebuf, valuebuf) != -1)
+  strcpy (internbuf, defvalue);
+  if( getSection (section) == -1) return internbuf;
+  
+  char namebuf[PARSELINELENGHT];
+  char valuebuf[PARSELINELENGHT];
+  
+  while( nextVar (namebuf, valuebuf) != -1)
+    {
+      if( !strcmp (name, namebuf))
 	{
-		if( !strcmp (name, namebuf))
-		{
-			strcpy (internbuf, valuebuf);
-			return internbuf;
-		}
+	  strcpy (internbuf, valuebuf);
+	  return internbuf;
 	}
-	return internbuf;
+    }
+  return internbuf;
 }
