[BACK]Return to lib.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / awk

Diff for /src/usr.bin/awk/lib.c between version 1.7 and 1.8

version 1.7, 1999/12/08 23:09:45 version 1.8, 2001/09/08 00:12:40
Line 653 
Line 653 
 {  {
         char *os = s;          char *os = s;
   
         if (!isalpha(*s) && *s != '_')          if (!isalpha((uschar) *s) && *s != '_')
                 return 0;                  return 0;
         for ( ; *s; s++)          for ( ; *s; s++)
                 if (!(isalnum(*s) || *s == '_'))                  if (!(isalnum((uschar) *s) || *s == '_'))
                         break;                          break;
         return *s == '=' && s > os && *(s+1) != '=';          return *s == '=' && s > os && *(s+1) != '=';
 }  }
   
 /* strtod is supposed to be a proper test of what's a valid number */  /* strtod is supposed to be a proper test of what's a valid number */
   /* appears to be broken in gcc on linux: thinks 0x123 is a valid FP number */
   /* wrong: violates 4.10.1.4 of ansi C standard */
   
 #include <math.h>  #include <math.h>
 int is_number(char *s)  int is_number(char *s)

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8