[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[help-gengetopt] mutiple() issue with gengetopt-2.17
From: |
Ch'Gans |
Subject: |
[help-gengetopt] mutiple() issue with gengetopt-2.17 |
Date: |
Wed, 13 Sep 2006 09:51:58 +0200 |
User-agent: |
Thunderbird 1.5.0.4 (X11/20060516) |
Hi all,
It seems it is not possible to use the multiple() feature with number
greter than 9 (one digit?), is this a bug or a feature? ;o)
After looking at the code, here is the smallest patch i ever contribute,
that (i think) fix this bug.
After this modification, make check still gives "All 30 tests passed",
however i have not added corresponding testcases :~(
regards,
ch'gans
--- gengetopt-2.17/src/scanner.ll 2006-04-01 20:36:24.000000000 +0200
+++ gengetopt-2.17-cgd1/src/scanner.ll 2006-09-12 12:15:58.758377464 +0200
@@ -90,7 +90,7 @@
"(" { PUSH(SIZE_STATE); updateTokenInfo (-1); return '('; }
<SIZE_STATE>"-" { updateTokenInfo (-1); return '-'; }
-<SIZE_STATE>[[:digit:]+] { updateTokenInfo (-1); yylval.str = strdup(yytext);
return TOK_SIZE; }
+<SIZE_STATE>[[:digit:]]+ { updateTokenInfo (-1); yylval.str = strdup(yytext);
return TOK_SIZE; }
")" { POP(); updateTokenInfo (-1); return ')'; }
[[:alnum:]-] updateTokenInfo (-1); yylval.chr = yytext[0]; return TOK_CHAR;
- [help-gengetopt] mutiple() issue with gengetopt-2.17,
Ch'Gans <=