1
0
Fork 0

Let all multiline comments jump in. Pretty up value blocks

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4160
This commit is contained in:
Peter Veenstra 2018-09-04 13:51:09 +00:00
parent 5dfa75399e
commit 1ff6911b3c
3 changed files with 23 additions and 16 deletions

View file

@ -634,8 +634,15 @@ bool Section_prop::HandleInputline(string const& gegevens){
void Section_prop::PrintData(FILE* outfile) const {
/* Now print out the individual section entries */
for(const_it tel=properties.begin();tel!=properties.end();tel++){
fprintf(outfile,"%s=%s\n",(*tel)->propname.c_str(),(*tel)->GetValue().ToString().c_str());
size_t len = 0;
// Determine maximum length of the props in this section
for(const_it tel = properties.begin();tel != properties.end();tel++) {
if ((*tel)->propname.length() > len)
len = (*tel)->propname.length();
}
for(const_it tel = properties.begin();tel != properties.end();tel++) {
fprintf(outfile,"%-*s = %s\n", len, (*tel)->propname.c_str(), (*tel)->GetValue().ToString().c_str());
}
}
@ -686,7 +693,7 @@ bool Config::PrintConfig(char const * const configfilename) const {
}
i=0;
char prefix[80];
snprintf(prefix,80, "\n# %*s ", (int)maxwidth, "");
snprintf(prefix,80, "\n# %*s ", (int)maxwidth, "");
while ((p = sec->Get_prop(i++))) {
std::string help = p->Get_help();
std::string::size_type pos = std::string::npos;