diff options
author | 2013-02-21 19:56:46 +0000 | |
---|---|---|
committer | 2013-02-21 19:56:46 +0000 | |
commit | 742f7e2ff573ef7f76af3463168d84e3b86eeaae (patch) | |
tree | 357e73011a65a2e96a9c2099725dbb19b35b9fba /src/lib/util/options.c | |
parent | 0bd44ef97909589fa782db93e16c894790ac4519 (diff) |
Don't save out internally determined settings to .ini files. (nw)
Diffstat (limited to 'src/lib/util/options.c')
-rw-r--r-- | src/lib/util/options.c | 37 |
1 files changed, 20 insertions, 17 deletions
diff --git a/src/lib/util/options.c b/src/lib/util/options.c index 1182550fb36..d89ef85190a 100644 --- a/src/lib/util/options.c +++ b/src/lib/util/options.c @@ -512,25 +512,28 @@ const char *core_options::output_ini(astring &buffer, const core_options *diff) // otherwise, output entries for all non-command items else if (!curentry->is_command()) { - // look up counterpart in diff, if diff is specified - if (diff == NULL || strcmp(value, diff->value(name)) != 0) + if ( !curentry->is_internal() ) { - // output header, if we have one - if (last_header != NULL) + // look up counterpart in diff, if diff is specified + if (diff == NULL || strcmp(value, diff->value(name)) != 0) { - if (num_valid_headers++) - buffer.catprintf("\n"); - buffer.catprintf("#\n# %s\n#\n", last_header); - last_header = NULL; - } - - // and finally output the data, skip if unadorned - if (!is_unadorned) - { - if (strchr(value, ' ') != NULL) - buffer.catprintf("%-25s \"%s\"\n", name, value); - else - buffer.catprintf("%-25s %s\n", name, value); + // output header, if we have one + if (last_header != NULL) + { + if (num_valid_headers++) + buffer.catprintf("\n"); + buffer.catprintf("#\n# %s\n#\n", last_header); + last_header = NULL; + } + + // and finally output the data, skip if unadorned + if (!is_unadorned) + { + if (strchr(value, ' ') != NULL) + buffer.catprintf("%-25s \"%s\"\n", name, value); + else + buffer.catprintf("%-25s %s\n", name, value); + } } } } |