chiark / gitweb /
Fix builtins.
[userv.git] / servexec.c
index abd36089ad5296b8c1692a2a413418d6f5c88618..71412a7266f7fd5804b37992dfa1d94a0b389f7b 100644 (file)
@@ -68,7 +68,7 @@ void bisexec_version(const char *const *argv) {
         "production version"
 #endif
         " - protocol magic number %08lx\n"
-        "protocol checksum:",
+        "protocol checksum: ",
         BASE_MAGIC);
   for (i=0, p=protocolchecksumversion; i<sizeof(protocolchecksumversion); i++, p++)
     printf("%02x",*p);
@@ -76,7 +76,7 @@ void bisexec_version(const char *const *argv) {
         "rendezvous socket: `" RENDEZVOUSPATH "'\n"
         "system config dir: `" SYSTEMCONFIGDIR "'\n"
         "pipe filename format: `%s' (max length %d)\n"
-        "maximums:    fd %-10d                general string %d"
+        "maximums:    fd %-10d                general string %d\n"
         "             gids %-10d              override length %d\n\n"
         "             args or variables %-10d error message %d\n"
         "             nested inclusion %-10d  errno string reserve %d\n",
@@ -89,20 +89,25 @@ void bisexec_version(const char *const *argv) {
 }
 
 static void NONRETURNING dumpconfig(const char *string) {
-  int nspaces, c;
+  int nspaces, c, lnl;
   
-  assert(*string);
   nspaces= 0;
+  lnl= 1;
   while ((c= *string++)) {
     switch (c) {
     case ' ': nspaces++; break;
-    case '\n': nspaces= 0; putchar('\n'); break;
+    case '\n':
+      if (!lnl) putchar('\n');
+      nspaces= 0; lnl= 1;
+      break;
     default:
       while (nspaces>0) { putchar(' '); nspaces--; }
       putchar(c);
+      lnl= 0;
+      break;
     }
   }
-  assert(*--string == '\n');
+  assert(lnl);
   serv_checkstdoutexit();
 }