Hi all,

I found a bug when using --long-help, I have used genpetopt 2.17
(manually installed on a mandriva 10.1), with and without my last patch,
and the gengetopt shipped with my distro (2.12.2). All these version
lead to the bug.
I have added this printf below the bug location:
fprintf (stderr, "typestr=%s, @typestr=%p, short_opt=%s, long_opt=%s,
opt_type=%d\n", type_str, type_str, opt->short_opt, opt->long_opt,
opt->type);

[EMAIL PROTECTED] tmp]$ gengetopt --version
GNU gengetopt 2.17
[...]
[EMAIL PROTECTED] tmp]$ cat bug.ggo
option "option-noarg" - "option with no arg" required
[EMAIL PROTECTED] tmp]$ gengetopt < bug.ggo
[EMAIL PROTECTED] tmp]$ gengetopt --long-help < bug.ggo
gengetopt: bug found in gm.cc:584!!
typestr=,®
        , @typestr=0xbffff320, short_opt=(null), long_opt=option-noarg,
opt_type=0
Aborted
[EMAIL PROTECTED] tmp]$ /usr/bin/gengetopt --version
GNU gengetopt 2.12.2
[...]
[EMAIL PROTECTED] tmp]$ /usr/bin/gengetopt --long-help < bug.ggo
gengetopt:2: syntax error r
gengetopt:2: option "option-noarg" - "option with no arg" required
gengetopt:2:
[EMAIL PROTECTED] tmp]$ vi bug.ggo
[EMAIL PROTECTED] tmp]$ cat bug.ggo
option "option-noarg" - "option with no arg" yes
[EMAIL PROTECTED] tmp]$ /usr/bin/gengetopt --long-help < bug.ggo
gengetopt: bug found in gm.cc:572!!
Aborted
[EMAIL PROTECTED] tmp]$ /usr/bin/gengetopt < bug.ggo
[EMAIL PROTECTED] tmp]$

Regards,
Christian




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

Reply via email to