Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5949 in orxonox.OLD for trunk/src/lib/parser


Ignore:
Timestamp:
Dec 7, 2005, 1:01:30 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: iniparser writes out comments

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/parser/ini_parser/ini_parser.cc

    r5948 r5949  
    242242  else
    243243  {
     244    if (this->comment != NULL)
     245      fprintf(stream, "%s\n\n", this->comment);
     246
    244247    std::list<IniSection>::const_iterator section;
    245248    for (section = this->sections.begin(); section != this->sections.end(); section++)
    246249      {
     250        if ((*section).comment != NULL)
     251          fprintf(stream, "%s", (*section).comment);
    247252        fprintf(stream, "\n [%s]\n", (*section).name);
    248253
    249254        std::list<IniEntry>::const_iterator entry;
    250255        for (entry = (*section).entries.begin(); entry != (*section).entries.end(); entry++)
     256        {
     257          if ((*entry).comment != NULL)
     258            fprintf(stream, "%s", (*entry).comment);
    251259          fprintf(stream, "   %s = %s\n", (*entry).name, (*entry).value);
     260         }
    252261      }
    253262  }
Note: See TracChangeset for help on using the changeset viewer.