Hi, there !

I've found an other yet uncommitted patch to config file parser:

diff -rdubB gengetopt-2.17rc/src/skels/c_source.h_skel 
gengetopt-2.17rc-mod/src/skels/c_source.h_skel
--- gengetopt-2.17rc/src/skels/c_source.h_skel  Mon May  8 11:32:28 2006
+++ gengetopt-2.17rc-mod/src/skels/c_source.h_skel      Mon May  8 15:00:03 2006
@@ -574,8 +574,11 @@
             }
         }
       else
-        { /* read up the remaining part up to a delimiter */
-          next_token = strcspn (farg, " \t\r\n#\'\"");
+        { /* read up the remaining part up to end of line or comment sign */
+          char *ch = (str_index + (next_token = strcspn (farg, "\r\n#")));
+          /* remove trailing whitespaces */
+          for ( --ch; (*ch >= 0x09 && *ch <= 0x0D) || *ch == ' '; --ch )
+            --next_token;
           str_index += next_token;
         }

I don't exactly remember what bug it fixed. It may be something to do with  
invalid lines with simple value and inline comment

        music = rock'n'roll # good

Maybe it is useful maybe it's not.

--
Papp, Győző 
VirusBuster Kft


_______________________________________________
Help-gengetopt mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-gengetopt

Reply via email to