[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[help-gengetopt] Re: Missing variable when using multiple in 2.16
From: |
Lorenzo Bettini |
Subject: |
[help-gengetopt] Re: Missing variable when using multiple in 2.16 |
Date: |
Thu, 23 Mar 2006 16:03:17 +0100 |
User-agent: |
Mail/News 1.5 (X11/20060321) |
Dave Swegen wrote:
> When using the 'multiple' keyword the .c file that is generated is
> missing a variable 'i' (used as a counter) in cmdline_parser_release.
> The attached files should demonstrate the problem. Attempting to compile
> them results in
>
> address@hidden testcli]$ gcc testcli.c test.c -o test
> testcli.c: In function ‘cmdline_parser_release’:
> testcli.c:101: error: ‘i’ undeclared (first use in this function)
> testcli.c:101: error: (Each undeclared identifier is reported only once
> testcli.c:101: error: for each function it appears in.)
>
> Anyway, thanks for an extremely useful program. And if you need any
> other info please let me know.
>
> Cheers
> Dave
>
>
> ------------------------------------------------------------------------
>
> package "test program"
> version "0.1"
> purpose "This program does testy things"
>
> option "test" t "This is a test option" int typestr="A test value"
> default="5" yes
>
> option "multi" - "This is a multi option" int typestr="Multivalue" multiple
>
>
> ------------------------------------------------------------------------
>
> #include <stdio.h>
> #include <stdlib.h>
> #include "testcli.h"
>
> int main(int argc, char **argv) {
> struct gengetopt_args_info args_info;
>
> int i;
>
> if (cmdline_parser (argc, argv, &args_info) != 0)
> exit(0);
>
> return 0;
> }
Hi Dave!
you're right about the bug: it takes place when no multiple option is a
string.
I've just fixed this bug (and added a test in the test suite)
I was working on the next release 2.17 that can be found here
temporarily (release candidate)
http://rap.dsi.unifi.it/~bettini/gengetopt-2.17rc.tar.gz
and this includes this fix.
Hope to hear from you soon!
thanks again for the feedback!
cheers
Lorenzo
--
+-----------------------------------------------------+
| Lorenzo Bettini ICQ# lbetto, 16080134 |
| PhD in Computer Science |
| Dip. Sistemi e Informatica, Univ. di Firenze |
| Florence - Italy (GNU/Linux User # 158233) |
| Home Page : http://www.lorenzobettini.it |
| http://music.dsi.unifi.it XKlaim language |
| http://www.purplesucker.com Deep Purple Cover Band |
| http://www.gnu.org/software/src-highlite |
| http://www.gnu.org/software/gengetopt |
| http://www.lorenzobettini.it/software/gengen |
| http://www.lorenzobettini.it/software/doublecpp |
+-----------------------------------------------------+
- [help-gengetopt] Re: Missing variable when using multiple in 2.16,
Lorenzo Bettini <=
- Message not available