Diff for /parser3/src/targets/cgi/Attic/getopt.c between versions 1.5 and 1.6

version 1.5, 2006/04/09 13:38:47 version 1.6, 2009/07/14 11:16:08
Line 49  getopt(int argc, char* const *argv, cons Line 49  getopt(int argc, char* const *argv, cons
     static int optchr = 0;      static int optchr = 0;
     static int dash = 0; /* have already seen the - */      static int dash = 0; /* have already seen the - */
   
     const char *cp;  
   
     if(optind >= argc)      if(optind >= argc)
         return(EOF);          return(EOF);
     if(!dash && (argv[optind][0] !=  '-'))      if(!dash && (argv[optind][0] !=  '-'))
Line 84  getopt(int argc, char* const *argv, cons Line 82  getopt(int argc, char* const *argv, cons
         optind++;          optind++;
         return(optiserr(argc, argv, optind-1, optstr, optchr, OPTERRCOLON));          return(optiserr(argc, argv, optind-1, optstr, optchr, OPTERRCOLON));
     }      }
     if(!(cp = strchr(optstr, argv[optind][optchr])))          const char *cp = strchr(optstr, argv[optind][optchr]);
       if(!cp)
     {      {
         int errind = optind;          int errind = optind;
         int errchr = optchr;          int errchr = optchr;

Removed from v.1.5  
changed lines
  Added in v.1.6


E-mail: