Lorenzo Bettini wrote:
Michael Hagemann wrote:

Maybe I can look into this next week, if nobody else is faster... ;-)

have I been faster? ;-)

oooh yes, you have! ;-)

I've put up a fix using Ben's template:

http://rap.dsi.unifi.it/~bettini/gengetopt-2.15rc1.tar.gz

now the generated code for a numeric option is as follows:

args_info->int_arg = strtol (optarg, &stop_char, 0);
if (!(stop_char && *stop_char == '\0')) {
  fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
  goto failure;
}

and this should do, shouldn't it?

Looks good to me.  Will test it next week...


regards,
michael



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

Reply via email to