MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / ProcessIniFile

Function ProcessIniFile

src/settingsgen/settingsgen.cpp:372–382  ·  view source on GitHub ↗

* Process a single INI file. * The file should have a [templates] group, where each item is one template. * Variables in a template have the form '\$[_a-z0-9]+' (a literal '$' followed * by one or more '_', lowercase letters, or lowercase numbers). * * After loading, the [pre-amble] group is copied verbatim if it exists. * * For every group with a name that matches a template name the templ

Source from the content-addressed store, hash-verified

370 * @param fname Ini file to process. @return Exit status of the processing.
371 */
372static void ProcessIniFile(std::string_view fname)
373{
374 static const IniLoadFile::IniGroupNameList seq_groups = {PREAMBLE_GROUP_NAME, POSTAMBLE_GROUP_NAME};
375
376 SettingsIniFile ini{{}, seq_groups};
377 ini.LoadFromDisk(fname, NO_DIRECTORY);
378
379 DumpGroup(ini, PREAMBLE_GROUP_NAME);
380 DumpSections(ini);
381 DumpGroup(ini, POSTAMBLE_GROUP_NAME);
382}
383
384/**
385 * And the main program (what else?)

Callers 1

mainFunction · 0.85

Calls 3

DumpGroupFunction · 0.85
DumpSectionsFunction · 0.85
LoadFromDiskMethod · 0.80

Tested by

no test coverage detected