[Initng-svn] r1942 - initng/plugins/iparser

svn at initng.thinktux.net svn at initng.thinktux.net
Sun Nov 6 13:06:22 CET 2005


Author: jimmy
Date: Sun Nov  6 13:06:22 2005
New Revision: 1942

Modified:
   initng/plugins/iparser/initng_i_parser.c
Log:
Hopefully fixes a parserbug.


Modified: initng/plugins/iparser/initng_i_parser.c
==============================================================================
--- initng/plugins/iparser/initng_i_parser.c	(original)
+++ initng/plugins/iparser/initng_i_parser.c	Sun Nov  6 13:06:22 2005
@@ -370,18 +370,21 @@
     /* carry on until segment stop or eof, this will handle all lines in current section */
     while ((*to_parse)[0] != '\0' && (*to_parse)[0] != '}')
     {
-        while (TRUE)
-        {
-            /* skip spaces and empty lines with them */
-            JUMP_SPACES(*to_parse);
-            if (*(to_parse)[0] == '\0' || *(to_parse)[0] == '}')
-                break;
-            if (*(to_parse)[0] == '\n')
-                (*to_parse)++;
-            else
-                break;
-        }
-
+        /* skip spaces and empty lines with them */
+        JUMP_SPACES(*to_parse);
+	
+	/* check that this is not the end */
+	if((*to_parse)[0]=='\0')
+	    continue;
+	
+	/* if the row is ending */
+	if((*to_parse)[0]=='\n' || (*to_parse)[0]==';')
+	{
+	    /* walk to next one */
+	    (*to_parse)++;
+	    continue;
+	}
+	
         /* skip lines with '#' */
         if ((*to_parse)[0] == '#')
         {


More information about the Initng-svn mailing list