Index: trunk/src/lib/util/executor/executor_specials.h
===================================================================
--- trunk/src/lib/util/executor/executor_specials.h	(revision 5943)
+++ trunk/src/lib/util/executor/executor_specials.h	(revision 5944)
@@ -10,5 +10,5 @@
 
 #include "compiler.h"
-#include "tinyxml.h"
+#include "parser/tinyxml/tinyxml.h"
 // FORWARD DECLARATION
 
Index: trunk/src/lib/util/ini_parser.cc
===================================================================
--- trunk/src/lib/util/ini_parser.cc	(revision 5943)
+++ 	(revision )
@@ -1,488 +1,0 @@
-/*
-   orxonox - the future of 3D-vertical-scrollers
-
-   Copyright (C) 2004 orx
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   ### File Specific:
-   main-programmer: Benjamin Grauer
-   co-programmer: Christian Meyer
-
-   2005-08-14: complete reimplementation:
-               now the File is parsed at the initialisation,
-               and informations is gathered there.
-*/
-
-
-#include "ini_parser.h"
-
-#include <stdlib.h>
-#include <string.h>
-
-#if HAVE_CONFIG_H 
-#include <config.h> 
-#endif
-
-#ifdef DEBUG
- #include "debug.h"
-#else
- #define PRINTF(x) printf
-#endif
-
-using namespace std;
-
-/**
- * @brief constructs an IniParser using a file
- * @param fileName: the path and name of the file to parse
- */
-IniParser::IniParser (const char* fileName)
-{
-  this->fileName = NULL;
-
-
-  if (fileName != NULL)
-    this->readFile(fileName);
-}
-
-
-/**
- * @brief removes the IniParser from memory
- */
-IniParser::~IniParser ()
-{
-  this->deleteSections();
-}
-
-
-/**
- * @brief removes all the sections. This is like delete, but even cooler :)
- */
-void IniParser::deleteSections()
-{
-  // in all sections
-  while(!this->sections.empty())
-  {
-     IniSection section = this->sections.front();
-    
-    // in all entries of the sections
-    while(!section.entries.empty())
-    {
-      // delete all strings of entries.
-      IniEntry entry = section.entries.front();
-      delete []entry.name;
-      delete []entry.value;
-      section.entries.pop_front();
-    }
-    // delete all Sections
-    delete []section.name;
-    this->sections.pop_front();
-  }
-  this->currentSection = this->sections.end();
-  this->setFileName(NULL);
-}
-
-
-/**
- * @brief sets the Name of the input-file
- * @param fileName The new FileName to set to the IniParser
- * If fileName is NULL the new Name will be set to NULL too.
- */
-void IniParser::setFileName(const char* fileName)
-{
-  if (this->fileName)
-    delete []this->fileName;
-  if (fileName != NULL)
-  {
-    this->fileName = new char[strlen(fileName)+1];
-    strcpy(this->fileName, fileName);
-  }
-  else
-    this->fileName = NULL;
-}
-
-
-/**
- * @brief opens a file to parse 
- * @param fileName: path and name of the new file to parse
- * @return true on success false otherwise;
- *
- * If there was already an opened file, the file will be closed,
- * and the new one will be opened.
- */
-bool IniParser::readFile(const char* fileName)
-{
-  FILE*    stream;           //< The stream we use to read the file.
-
-  if (this->fileName != NULL)
-    this->deleteSections();
-  if( fileName == NULL)
-    return false;
-
-  if( (stream = fopen (fileName, "r")) == NULL)
-  {
-    PRINTF(1)("IniParser could not open %s\n", fileName);
-    return false;
-  }
-  else
-  {
-    this->setFileName(fileName);
-
-    /////////////////////////////
-    // READING IN THE INI-FILE //
-    /////////////////////////////
-    char lineBuffer[PARSELINELENGHT];
-    char buffer[PARSELINELENGHT];
-    const char* lineBegin;
-    char* ptr;
-
-    while( fgets (lineBuffer, PARSELINELENGHT, stream))
-    {
-      lineBegin = lineBuffer;
-      // remove newline char, and \0-terminate
-      if( (ptr = strchr( lineBuffer, '\n')) != NULL)
-        *ptr = 0;
-      // cut up to the beginning of the line.
-      while((*lineBegin == ' ' || *lineBegin == '\t') && lineBegin < lineBuffer + strlen(lineBuffer))
-        ++lineBegin;
-      if (strlen(lineBegin) <= 1 || *lineBegin == '#' || *lineBegin == ';')
-        continue;//printf("empty Line\n");
-      // check for section identifyer
-      else if( sscanf (lineBegin, "[%s", buffer) == 1)
-      {
-        if( (ptr = strchr( buffer, ']')) != NULL)
-        {
-          *ptr = 0;
-          this->addSection(buffer);
-        }
-      }
-      // check for Entry identifier (Entry = Value)
-      else if( (ptr = strchr( lineBegin, '=')) != NULL)
-      {
-        if (currentSection == NULL)
-        {
-          PRINTF(2)("Not in a Section yet for %s\n", lineBegin);
-          continue;
-        }
-        if( ptr == lineBegin)
-          continue;
-        char* valueBegin = ptr+1;
-        while ((*valueBegin == ' ' || *valueBegin == '\t') && valueBegin <= lineBegin + strlen(lineBegin))
-          ++valueBegin;
-        char* valueEnd = valueBegin + strlen(valueBegin)-1;
-        while ((*valueEnd == ' ' || *valueEnd == '\t') && valueEnd >= valueBegin)
-          --valueEnd;
-        valueEnd[1] = '\0';
-        char* nameEnd = ptr-1;
-        while ((*nameEnd == ' ' || *nameEnd == '\t' ) && nameEnd >= lineBegin)
-          --nameEnd;
-        nameEnd[1] = '\0';
-
-        this->addVar(lineBegin, valueBegin);
-      }
-    }
-  }
-  this->currentSection = this->sections.begin();
-  if (!this->sections.empty())
-    this->currentEntry = (*this->currentSection).entries.begin();
-
-  fclose(stream);
-  return true;
-}
-
-
-/**
- * @brief opens a file and writes to it
- * @param fileName: path and name of the new file to write to
- * @return true on success false otherwise
- */
-bool IniParser::writeFile(const char* fileName) const
-{
-  FILE*    stream;           //!< The stream we use to read the file.
-  if( fileName == NULL)
-    return false;
-
-  if( (stream = fopen (fileName, "w")) == NULL)
-  {
-    PRINTF(1)("IniParser could not open %s\n", fileName);
-    return false;
-  }
-  else
-  {
-    std::list<IniSection>::const_iterator section;
-    for (section = this->sections.begin(); section != this->sections.end(); section++)
-      {
-        fprintf(stream, "\n [%s]\n", (*section).name);
-	
-        std::list<IniEntry>::const_iterator entry;
-        for (entry = (*section).entries.begin(); entry != (*section).entries.end(); entry++)
-          fprintf(stream, "   %s = %s\n", (*entry).name, (*entry).value);
-      }
-  }
-  fclose(stream);
-}
-
-
-/**
- * @brief adds a section to the list of Sections,
- * if no Section list is availiable, it will create it
- * @param sectionName the Name of the section to add
- * @return true on success... there is only success or segfault :)
- */
-bool IniParser::addSection(const char* sectionName)
-{
-  this->sections.push_back(IniSection());
-
-  this->sections.back().name = new char[strlen(sectionName)+1];
-  strcpy(this->sections.back().name, sectionName);
-
-  this->currentSection = --this->sections.end();
-  if (!this->sections.empty())
-      this->currentEntry = (*this->currentSection).entries.begin();
-  PRINTF(5)("Added Section %s\n", sectionName);
-  return true;
-}
-
-
-/**
- * @brief Set the parsing cursor to the specified section
- * @param sectionName: the name of the section to set the cursor to
- * @return true on success or false if the section could not be found
- */
-bool IniParser::getSection(const char* sectionName)
-{
-  std::list<IniSection>::iterator section;
-  for (section = this->sections.begin(); section != this->sections.end(); section++)
-    if (!strcmp((*section).name, sectionName))
-      {
-	this->currentSection = section;
-	this->currentEntry = (*this->currentSection).entries.begin();
-	return true;
-      }
-  return false;
-}
-
-
-/**
- * @brief moves to the first section
- */
-void IniParser::firstSection()
-{
-  this->currentSection = this->sections.begin();
-  if (!this->sections.empty())
-    this->currentEntry = (*this->currentSection).entries.begin();
-}
-
-
-/**
- * @brief searches the next section
- * @returns the name of the section if found, NULL otherwise
- */
-const char* IniParser::nextSection()
-{
-  if (this->currentSection == this->sections.end())
-    return NULL;
-
-  this->currentSection++;
-
-  if (this->currentSection != this->sections.end())
-    {
-      this->currentEntry = (*this->currentSection).entries.begin();
-      return this->currentSection->name;
-    }
-  else
-    return NULL;
-}
-
-
-/**
- * @brief moves to the first Variable of the current Section
- */
-void IniParser::firstVar()
-{
-  if (!this->sections.empty() &&
-      this->currentSection != this->sections.end())
-    this->currentEntry = (*this->currentSection).entries.begin();
-}
-
-
-/**
- * @brief gets the next VarName = VarValue pair from the parsing stream
- * @return true on success, false otherwise (in the latter case name and value will be NULL)
- */
-bool IniParser::nextVar()
-{
-  if ( this->sections.empty() 
-       || this->currentSection == this->sections.end()
-       || this->currentEntry == (*this->currentSection).entries.end())
-    return false;
-
-  this->currentEntry++;
-
-  if (this->currentEntry == (*this->currentSection).entries.end())
-    return false;
-  else
-    return true;
-}
-
-
-/**
- * @brief adds a new Entry to either the currentSection or the section called by sectionName
- * @param entryName the Name of the Entry to add
- * @param value the value to assign to this entry
- * @param sectionName if NULL then this entry will be set to the currentSection
- * otherwise to the section refered to by sectionName.
- * If both are NULL no entry will be added
- * @return true if everything is ok false on error
- */
-bool IniParser::addVar(const char* entryName, const char* value, const char* sectionName)
-{
-  std::list<IniSection>::iterator section;
-  
-  if (sectionName != NULL)
-  {
-    for (section = this->sections.begin(); section != this->sections.end(); section++)
-      if (!strcmp((*section).name, sectionName))
-        break;
-  }
-  else
-    section = this->currentSection;
-  if (section == this->sections.end())
-    return false;
-
-  if (section == this->sections.end())
-  {
-    PRINTF(2)("section '%s' not found for value '%s'\n", sectionName, entryName);
-    return false;
-  }
-  else
-  {
-    (*section).entries.push_back(IniEntry());
-    (*section).entries.back().name = new char[strlen(entryName)+1];
-    strcpy((*section).entries.back().name, entryName);
-    (*section).entries.back().value = new char[strlen(value)+1];
-    strcpy((*section).entries.back().value, value);
-    PRINTF(5)("Added Entry %s with Value '%s' to Section %s\n",
-	      (*section).entries.back().name,
-	      (*section).entries.back().value,
-	      (*section).name);
-    return true;
-  }
-}
-
-
-/**
- * @brief directly acesses an entry in a section
- * @param entryName: the name of the entry to find
- * @param sectionName: the section where the entry is to be found
- * @param defaultValue: 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.
-*/
-const char* IniParser::getVar(const char* entryName, const char* sectionName, const char* defaultValue) const
-{
-  if (fileName != NULL)
-  {
-    std::list<IniSection>::const_iterator section;
-    if (sectionName != NULL)
-      {
-	for (section = this->sections.begin(); section != this->sections.end(); section++)
-	  {
-	    if (!strcmp((*section).name, sectionName))
-	      {
-		break;
-	      }
-	  }
-      }
-    else
-      section = this->currentSection;
-    
-   if (section == this->sections.end())
-     {
-       PRINTF(2)("Section %s that should be containing %s not found.\n", sectionName, entryName);
-       return (defaultValue);
-     }
-
-    std::list<IniEntry>::const_iterator entry;
-    for (entry = (*section).entries.begin(); entry != (*section).entries.end(); entry++)
-      if (!strcmp((*entry).name, entryName))
-	return (*entry).value;
-    PRINTF(2)("Entry '%s' in section '%s' not found.\n", entryName, sectionName);
-   
-  }
-  else
-    PRINTF(2)("%s not opened\n", fileName);
-
-  return defaultValue;
-
-}
-
-
-/**
- * @returns the name of the Current selected Section 
- */
-const char* IniParser::getCurrentSection() const 
-{
-  if (!this->sections.empty() &&
-      this->currentSection != this->sections.end()) 
-    return this->currentSection->name;
-  else
-    return NULL;
- }
-
-
-/** 
- * @returns the current entries Name, or NULL if we havn't selected a Entry 
- */
-const char* IniParser::getCurrentName() const
-{
- if (!this->sections.empty() &&
-     this->currentSection != this->sections.end() &&
-     this->currentEntry != (*this->currentSection).entries.end())
-   return (*this->currentEntry).name;
- else
-   return NULL;
-}
-
-/**
- * @returns the current entries Value, or NULL if we havn't selected a Entry 
- */
-const char* IniParser::getCurrentValue() const 
-{
-  if (!this->sections.empty() &&
-      this->currentSection != this->sections.end() &&
-      this->currentEntry != (*this->currentSection).entries.end())
-    return (*this->currentEntry).value;
-  else
-    return NULL; 
-}
-
-
-/**
- * @brief output the whole tree in a nice and easy way.
- */
-void IniParser::debug() const
-{
-  PRINTF(0)("Iniparser %s - debug\n", this->fileName);
-  if (this->fileName != NULL)
-  {
-    std::list<IniSection>::const_iterator section;
-    for (section = this->sections.begin(); section != this->sections.end(); section++)
-    {
-      PRINTF(0)(" [%s]\n", (*section).name);
-
-      std::list<IniEntry>::const_iterator entry;
-      for (entry = (*section).entries.begin(); entry != (*section).entries.end(); entry++)
-        PRINTF(0)("   '%s' -> '%s'\n", (*entry).name, (*entry).value);
-    }
-  }
-  else
-    PRINTF(1)("no opened ini-file.\n");
-}
-
-
Index: trunk/src/lib/util/ini_parser.h
===================================================================
--- trunk/src/lib/util/ini_parser.h	(revision 5943)
+++ 	(revision )
@@ -1,83 +1,0 @@
-/*!
- * @file ini_parser.h
- * A small ini file parser
- *
- * Can be used to find a defined [Section] in an ini file and get the VarName = Value entries
- */
-
-#ifndef _INI_PARSER_H
-#define _INI_PARSER_H
-
-#define PARSELINELENGHT     512       //!< how many chars to read at once
-#ifndef NULL
- #define NULL 0x0                     //!< NULL
-#endif
-
-#include <list>
-
-//! ini-file parser
-/**
- * This class can be used to load an initializer file and parse it's contents for variablename=value pairs.
- */
-class IniParser
-{
-  private:
-    ////////////////////////////////////
-    //! a struct for Entries in the Parser's File's Sections
-    struct IniEntry
-    {
-      char*              name;     //!< name of a given Entry
-      char*              value;    //!< value of a given Entry
-    };
-    //! a struct for Sections in the Parser's file
-    struct IniSection
-    {
-      char*               name;    //!< name of a given section
-      std::list<IniEntry> entries; //!< a list of entries for this section
-    };
-    ////////////////////////////////////
-
-  public:
-    IniParser (const char* filename = NULL);
-    ~IniParser ();
-
-    bool readFile(const char* fileName);
-    bool writeFile(const char* fileName) const;
-
-    bool addSection(const char* sectionName);
-    bool getSection(const char* sectionName);
-
-    /** @returns true if the file is opened, false otherwise*/
-    bool isOpen() const { return (this->fileName != NULL)? true : false; };
-
-    void firstSection();
-    const char* nextSection();
-
-    /** @returns the fileName we have opened. */
-    const char* getFileName() const { return this->fileName; };
-
-    bool addVar(const char* entryName, const char* value, const char* sectionName = NULL);
-    const char* getVar(const char* entryName, const char* sectionName, const char* defaultValue = "") const;
-
-    void firstVar();
-    bool nextVar();
-
-    const char* getCurrentSection() const;
-    const char* getCurrentName() const;
-    const char* getCurrentValue() const;
-
-    void debug() const;
-
-
-  private:
-    void deleteSections();
-    void setFileName(const char* fileName);
-
-  private:
-    char*                            fileName;        //!< The name of the File that was parsed.
-    std::list<IniSection>            sections;        //!< a list of all stored Sections of the Parser
-    std::list<IniSection>::iterator  currentSection;  //!< the current selected Section
-    std::list<IniEntry>::iterator    currentEntry;    //!< the current selected entry (in currentSection)
-};
-
-#endif /* _INI_PARSER_H */
