/[pcre]/code/trunk/pcregrep.c
ViewVC logotype

Diff of /code/trunk/pcregrep.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 535 by ph10, Thu Jun 3 19:18:24 2010 UTC revision 558 by ph10, Tue Oct 26 15:26:45 2010 UTC
# Line 363  return isatty(fileno(f)); Line 363  return isatty(fileno(f));
363  Lionel Fourquaux. David Burgess added a patch to define INVALID_FILE_ATTRIBUTES  Lionel Fourquaux. David Burgess added a patch to define INVALID_FILE_ATTRIBUTES
364  when it did not exist. David Byron added a patch that moved the #include of  when it did not exist. David Byron added a patch that moved the #include of
365  <windows.h> to before the INVALID_FILE_ATTRIBUTES definition rather than after.  <windows.h> to before the INVALID_FILE_ATTRIBUTES definition rather than after.
366  */  The double test below stops gcc 4.4.4 grumbling that HAVE_WINDOWS_H is
367    undefined when it is indeed undefined. */
368    
369  #elif HAVE_WINDOWS_H  #elif defined HAVE_WINDOWS_H && HAVE_WINDOWS_H
370    
371  #ifndef STRICT  #ifndef STRICT
372  # define STRICT  # define STRICT
# Line 2196  for (i = 1; i < argc; i++) Line 2197  for (i = 1; i < argc; i++)
2197      {      {
2198      *((char **)op->dataptr) = option_data;      *((char **)op->dataptr) = option_data;
2199      }      }
2200    
2201      /* Avoid the use of strtoul() because SunOS4 doesn't have it. This is used
2202      only for unpicking arguments, so just keep it simple. */
2203    
2204    else    else
2205      {      {
2206      char *endptr;      int n = 0;
2207      int n = strtoul(option_data, &endptr, 10);      char *endptr = option_data;
2208        while (*endptr != 0 && isspace((unsigned char)(*endptr))) endptr++;
2209        while (isdigit((unsigned char)(*endptr)))
2210          n = n * 10 + (int)(*endptr++ - '0');
2211      if (*endptr != 0)      if (*endptr != 0)
2212        {        {
2213        if (longop)        if (longop)

Legend:
Removed from v.535  
changed lines
  Added in v.558

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12