modify config file writer not to print the property name as a comment if

there is nothing to say about it.
This commit is contained in:
Jonathan Campbell 2013-11-02 13:05:22 -07:00
parent 6445feb63d
commit 41481b3655

View File

@ -673,9 +673,11 @@ bool Config::PrintConfig(char const * const configfilename) const {
help.replace(pos, 1, prefix);
}
std::vector<Value> values = p->GetValues();
if (help != "" || !values.empty()) {
fprintf(outfile, "# %*s: %s", (int)maxwidth, p->propname.c_str(), help.c_str());
std::vector<Value> values = p->GetValues();
if (!values.empty()) {
fprintf(outfile, "%s%s:", prefix, MSG_Get("CONFIG_SUGGESTED_VALUES"));
std::vector<Value>::iterator it = values.begin();
@ -690,6 +692,7 @@ bool Config::PrintConfig(char const * const configfilename) const {
}
fprintf(outfile, "\n");
}
}
} else {
upcase(temp);
strcat(temp,"_CONFIGFILE_HELP");
@ -706,7 +709,6 @@ bool Config::PrintConfig(char const * const configfilename) const {
}
}
fprintf(outfile,"\n");
(*tel)->PrintData(outfile);
fprintf(outfile,"\n"); /* Always an empty line between sections */
}