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: Lorenzo Bettini
Subject: Re: [help-gengetopt] make cmd_line_list and cmd_line_list_tmp static?
Date: Mon, 10 Apr 2006 16:44:23 +0200
User-agent: Mail/News 1.5 (X11/20060228)

Gyozo, PAPP (VBuster) wrote:
Hi,

" > " 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,
" " I think the word "system" in this sentence refers to the underlying
" library that _implements_ getopt (e.g. glibc), rather than to the
" application that _uses_ it.  Indeed, glibc's posix/getopt.c sets this

You may right, and moreover I must admit that I'm able to change this issue in the library itself. 
However, the term "system" is quite    ambiguous at least without the original context, I 
think the system could be interpreted as a whole which means none of the components (the getopt 
implementation, the library calling getopt, and the application itself) should not set optind to 0, 
because the sentence continues like this: "... and getopt() shall update it when ...". 
Note the different subjective: system vs. getopt(). But I may be wrong.

I just wanted to attract the attention to the possible negative(?) outcomes of 
this change.


indeed you're right about optind = 1, have you read my messages I sent yesterday?

cheers
        Lorenzo

--
+-----------------------------------------------------+
|  Lorenzo Bettini          ICQ# lbetto, 16080134     |
|  PhD in Computer Science                            |
|  Dip. Sistemi e Informatica, Univ. di Firenze       |
|  Florence - Italy        (GNU/Linux User # 158233)  |
|  Home Page        : http://www.lorenzobettini.it    |
|  http://music.dsi.unifi.it         XKlaim language  |
|  http://www.purplesucker.com Deep Purple Cover Band |
|  http://www.gnu.org/software/src-highlite           |
|  http://www.gnu.org/software/gengetopt              |
|  http://www.lorenzobettini.it/software/gengen       |
|  http://www.lorenzobettini.it/software/doublecpp    |
+-----------------------------------------------------+




reply via email to

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