|
@@ -192,13 +192,13 @@ static const char *DEFAULTS_GROUP_NAME
|
|
|
* Dump a #IGT_SEQUENCE group into #_stored_output.
|
|
|
* @param ifile Loaded INI data.
|
|
|
* @param group_name Name of the group to copy.
|
|
|
*/
|
|
|
static void DumpGroup(IniLoadFile &ifile, const char * const group_name)
|
|
|
{
|
|
|
IniGroup *grp = ifile.GetGroup(group_name, false);
|
|
|
IniGroup *grp = ifile.GetGroup(group_name);
|
|
|
if (grp != nullptr && grp->type == IGT_SEQUENCE) {
|
|
|
for (IniItem *item = grp->item; item != nullptr; item = item->next) {
|
|
|
if (!item->name.empty()) {
|
|
|
_stored_output.Add(item->name.c_str());
|
|
|
_stored_output.Add("\n", 1);
|
|
|
}
|
|
@@ -293,15 +293,15 @@ static void DumpLine(IniItem *item, IniG
|
|
|
* @param ifile Loaded INI data.
|
|
|
*/
|
|
|
static void DumpSections(IniLoadFile &ifile)
|
|
|
{
|
|
|
static const char * const special_group_names[] = {PREAMBLE_GROUP_NAME, POSTAMBLE_GROUP_NAME, DEFAULTS_GROUP_NAME, TEMPLATES_GROUP_NAME, VALIDATION_GROUP_NAME, nullptr};
|
|
|
|
|
|
IniGroup *default_grp = ifile.GetGroup(DEFAULTS_GROUP_NAME, false);
|
|
|
IniGroup *templates_grp = ifile.GetGroup(TEMPLATES_GROUP_NAME, false);
|
|
|
IniGroup *validation_grp = ifile.GetGroup(VALIDATION_GROUP_NAME, false);
|
|
|
IniGroup *default_grp = ifile.GetGroup(DEFAULTS_GROUP_NAME);
|
|
|
IniGroup *templates_grp = ifile.GetGroup(TEMPLATES_GROUP_NAME);
|
|
|
IniGroup *validation_grp = ifile.GetGroup(VALIDATION_GROUP_NAME);
|
|
|
if (templates_grp == nullptr) return;
|
|
|
|
|
|
/* Output every group, using its name as template name. */
|
|
|
for (IniGroup *grp = ifile.group; grp != nullptr; grp = grp->next) {
|
|
|
const char * const *sgn;
|
|
|
for (sgn = special_group_names; *sgn != nullptr; sgn++) if (grp->name == *sgn) break;
|