httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian Havard" <>
Subject Re: cvs commit: apache-2.0/mpm/src/main http_config.c http_main.c
Date Sun, 11 Jul 1999 16:50:35 GMT
On Sun, 11 Jul 1999 17:29:23 +0100, Ben Laurie wrote:

>Brian Havard wrote:
>> I don't know about anyone else but my getopt doesn't have this optreset. Is
>> it important?
>Well, if I'm going to preserve the original behaviour as much as I can,
>yes. The reason being that hooks are defined early on, but I need
>-DSHOW_HOOKS before they are, but there's also a pre-command-line hook
>that has to come _after_ hooks have been hooked (obviously).
>Is there a way to reset getopt at all on OS/2?

To quote the man page: "To reinitialize getopt(), that is, to restart parsing
options, set optind to zero."

And I don't think it's just OS/2. My (admittedly rather old) linux machine
doesn't mention optreset on its man page either. Just 

GETOPT(3)           Linux Programmer's Manual           GETOPT(3)

       getopt - Read command line options

       #include <unistd.h>

       int getopt(int argc, char * const argv[],
                  const char *optstring);

       extern char *optarg;
       extern int optind, opterr, optopt;


       getopt() :

 |  Brian Havard                 |  "He is not the messiah!                   |
 |  |  He's a very naughty boy!" - Life of Brian |

View raw message