More #saveoptions and cond_ options

Only save the cond_ options that are different from the default.
This commit is contained in:
Pasi Kallinen
2023-10-31 14:57:32 +02:00
parent 4ecc798d20
commit 1d9726f821
2 changed files with 13 additions and 5 deletions

View File

@@ -9426,6 +9426,7 @@ all_options_conds(strbuf_t *sbuf)
{
char buf[BUFSZ], nextcond[BUFSZ];
int idx = 0;
boolean gotone = FALSE;
buf[0] = '\0';
while (opt_next_cond(idx, nextcond)) {
@@ -9439,10 +9440,13 @@ all_options_conds(strbuf_t *sbuf)
strbuf_append(sbuf, buf);
/* indent continuation line */
Sprintf(buf, "%8s", " "); /* 8: strlen("OPTIONS=") */
} else {
} else if (nextcond[0] && gotone) {
Strcat(buf, ",");
}
Strcat(buf, nextcond);
if (nextcond[0]) {
gotone = TRUE;
Strcat(buf, nextcond);
}
++idx;
}
/* finish off final line */