This the '?' synonym of the 'h'. But it seems that does not work. :-/ In fact, there is no need, for this purpose already exists in the "-h" or "--help". I think I'm going to throw the '?' option.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If getopt() finds an option character in argv that was not included in optstring, or if it detects a missing option argument, it returns '?' and sets the external variable optopt to the actual option character.
And in fact, because of the following, I think we should better remove it.
If the first character (following any optional '+' or '-' described above) of optstring is a colon (':'), then getopt() returns ':' instead of '?' to indicate a missing option argument. If an error was detected, and the first character of optstring is not a colon, and the external variable opterr is nonzero (which is the default), getopt() prints an error message.
Thanks!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thank you for patch. I applied in the svn [r1190] version.
Károly
Out of curiosity, why the leading '?' in /trunk/gputils/gputils/gpdasm.c?
This the '?' synonym of the 'h'. But it seems that does not work. :-/ In fact, there is no need, for this purpose already exists in the "-h" or "--help". I think I'm going to throw the '?' option.
This works, just I'm looking at something badly.
I think it's not needed.
Reading http://linux.die.net/man/3/getopt_long:
And in fact, because of the following, I think we should better remove it.
Thanks!
You're right, more eyes see more. I deleted the unnecessary '-?' option. [r1193]
Károly
Thanks Károly!