]> git.pond.sub.org Git - empserver/commitdiff
(print_config): Undo rev. 1.17's incorrect simplification of
authorMarkus Armbruster <armbru@pond.sub.org>
Thu, 16 Dec 2004 21:56:17 +0000 (21:56 +0000)
committerMarkus Armbruster <armbru@pond.sub.org>
Thu, 16 Dec 2004 21:56:17 +0000 (21:56 +0000)
km_comment printing.

src/lib/gen/emp_config.c

index 0fe115529eeffe085d383a40ae6cc700f1a09e9c..54b1ad96c8178aa89b972457e6c30bdd8976b82e 100644 (file)
@@ -241,8 +241,11 @@ print_config(FILE *fp)
 
     fprintf(fp, "# Empire Configuration File:\n");
     for (kp = configkeys; kp->km_key; kp++) {
-       if (kp->km_comment)
-           fprintf(fp, "\n# %s\n", kp->km_comment);
+       if (kp->km_comment) {
+           if (kp->km_comment[0] != '\n')
+               fprintf(fp, "\n# ");
+           fprintf(fp, "%s\n", kp->km_comment);
+       }
        if (!kp->km_key[0])
            continue;
        switch (kp->km_type) {