]> andersk Git - moira.git/commitdiff
allow blank lines in moira.conf files, since the documentation says you can.
authordanw <danw>
Sun, 2 Feb 1997 21:17:01 +0000 (21:17 +0000)
committerdanw <danw>
Sun, 2 Feb 1997 21:17:01 +0000 (21:17 +0000)
update/config.c

index 85068626624a04115cb02c389f4f9f547dad59dc..99e88cee840e7383a1ff10cdeca2176782c9c969 100644 (file)
@@ -12,6 +12,7 @@
 
 #include <mit-copyright.h>
 #include <stdio.h>
+#include <string.h>
 #include <ctype.h>
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -77,13 +78,8 @@ static init()
        return(MR_NO_MEM);
     }
     count = 0;
-    for (p = start = config_buf; *p; p++) {
-       if (*p != '\n')
-         continue;
-       *p++ = '\0';
-       config_keys[count++] = start;
-       start = p;
-       if (!*p) break;
+    for (p = strtok(config_buf, "\n"); p; p = strtok(NULL, "\n")) {
+       config_keys[count++] = p;
     }
     config_keys[count] = NULL;
     for (count = 0; config_keys[count]; count++) {
This page took 0.342904 seconds and 5 git commands to generate.