help-gengetopt
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [help-gengetopt] make cmd_line_list and cmd_line_list_tmp static?


From: Gyozo, PAPP (VBuster)
Subject: RE: [help-gengetopt] make cmd_line_list and cmd_line_list_tmp static?
Date: Fri, 7 Apr 2006 17:14:22 +0200

Hi,

" -----Original Message-----
" From: Andre Noll [mailto:address@hidden
" Sent: Wednesday, February 08, 2006 3:52 PM
" To: Users list for gengetopt
" Subject: Re: [help-gengetopt] make cmd_line_list and cmd_line_list_tmp
" static?

" So I replaced "optind = 1" by "optind = 0" in the generated code which
...
" As this solved all of my problems and I can not see any drawbacks of
" this approach either, I'd suggest to let gengetopt generate "optind =
" 0" instead of "optind = 1".

Let's see what the specs says [IEEE Std 1003.1, 2004 Edition 
http://www.opengroup.org/onlinepubs/009695399/functions/optind.html]

"The variable optind is the index of the next element of the argv[] vector to 
be processed. It shall be initialized to 1 by the system, and getopt() shall 
update it when it finishes with each element of argv[]. When an element of 
argv[] contains multiple option characters, it is unspecified how getopt() 
determines which options have already been processed."

The real reason I'm complaining about this change is that I have to use a 
proprietary implementation of getopt_* family and this change causes that 
argv[0] is always parsed as a parameter and put into the inputs[] array. What 
to do in this situation?

--
Papp, Gyozo
VirusBuster Kft




reply via email to

[Prev in Thread] Current Thread [Next in Thread]