bug-hurd
[Top][All Lists]
Advanced

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

Re: Console client plug-in options


From: Niels Möller
Subject: Re: Console client plug-in options
Date: 08 Aug 2003 22:51:41 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

Jeroen Dekkers <jeroen@dekkers.cx> writes:

> Of course the getopt interface uses some global variables: opterr,
> optopt, optind and optarg.

There's also one static variable in the getopt implementation:

  /* The next char to be scanned in the option-element
     in which the last option character we returned was found.
     This allows us to pick up the scan where we left off.
  
     If this is zero, or a null string, it means resume the scan
     by advancing to the next ARGV-element.  */
  
  static char *nextchar;

I'm not sure if this is a problem, it may work fine as long as either
(1) --driver doesn't get an equivalent short option, or (2) the
recursive argp call always parse a subsequence of the original command
line, starting at the current position. It seems a little ugly to
depend on that, even if it turns out to work.

Regards,
/Niels




reply via email to

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