When reading the 'users' file, if the line contains nothing
authoraland <aland>
Tue, 11 Feb 2003 16:45:05 +0000 (16:45 +0000)
committeraland <aland>
Tue, 11 Feb 2003 16:45:05 +0000 (16:45 +0000)
but whitespace, then ignore it.

This will help minimize situations when the parser complains
about 'previous line missing comma', when it doesn't make sense.

src/main/files.c

index 28f3d1f..c929bca 100644 (file)
@@ -160,6 +160,20 @@ int pairlist_read(const char *file, PAIR_LIST **list, int complain)
                        return -1;
                }
                if (buffer[0] == '#' || buffer[0] == '\n') continue;
+
+               /*
+                *      If the line contains nothing but whitespace,
+                *      ignore it.
+                */
+               ptr = buffer;
+               while ((ptr[0] == ' ') ||
+                      (ptr[0] == '\t') ||
+                      (ptr[0] == '\r') ||
+                      (ptr[0] == '\n')) {
+                       ptr++;
+               }
+               if (ptr[0] == '\0') continue;
+
 parse_again:
                if(mode == FIND_MODE_NAME) {
                        /*