[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[help-gengetopt] config parser fix?
From: |
Gyozo, PAPP (VBuster) |
Subject: |
[help-gengetopt] config parser fix? |
Date: |
Mon, 8 May 2006 15:28:57 +0200 |
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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [help-gengetopt] config parser fix?,
Gyozo, PAPP (VBuster) <=