[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [help-gengetopt] Bug in gengetopt (hidden options and no-handle-help
From: |
Lorenzo Bettini |
Subject: |
Re: [help-gengetopt] Bug in gengetopt (hidden options and no-handle-help) |
Date: |
Fri, 04 May 2007 20:36:56 +0200 |
User-agent: |
Icedove 1.5.0.10 (X11/20070329) |
OK, this problem should be fixed in the candidate release you find here:
http://rap.dsi.unifi.it/~bettini/gengetopt-2.20.tar.gz
hope to hear from you soon
cheers
Lorenzo
Thomas Boehne wrote:
> address@hidden:~/TiCo-MG/test3/cmd_test1 1$ gengetopt --version
> GNU gengetopt 2.19.1
> [...]
>
> contents of file "test.ggo":
> purpose "Foo"
> package "bar"
> version "1.00.00"
>
> option "par1" - "par 1" string required
> option "par2" P "par 2" string optional hidden
>
> invocation of gengetopt:
> $ gengetopt --input=test.ggo --no-handle-help
>
>
> Now cmdline.c contains this:
>
> case 0: /* Long option with no short option */
> /* Print help, including hidden options, and exit. */
> if (strcmp (long_options[option_index].name, "full-help") == 0)
> {
> if (local_args_info.full_help_given)
> {
> fprintf (stderr, "%s: `--full-help' option given more than
> once%s\n", argv[0], (additional_error ? additional_error : ""));
> goto failure;
> }
> if (args_info->full_help_given && ! override)
> continue;
> local_args_info.full_help_given = 1;
> args_info->full_help_given = 1;
>
> }
> cmdline_parser_free (&local_args_info);
> return 0;
>
> /* par 1. */
> if (strcmp (long_options[option_index].name, "par1") == 0)
> [...]
>
> The code for "par 1" will never be reached, because of the return 0. I
> guess it is a bug that only occurs with no-handle-help and hidden
> options, but I was not able to really track it down. Maybe somebody
> with more knowledge of the gengetopt-code can look into this.
>
> Best regards
> Thomas Böhne
>
--
Lorenzo Bettini, PhD in Computer Science, DSI, Univ. di Firenze
ICQ# lbetto, 16080134 (GNU/Linux User # 158233)
HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com
BLOGS: http://tronprog.blogspot.com http://longlivemusic.blogspot.com
http://www.gnu.org/software/src-highlite
http://www.gnu.org/software/gengetopt
http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net