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

Diff for /src/usr.bin/awk/b.c between version 1.1 and 1.2

version 1.1, 1996/07/04 20:34:41 version 1.2, 1997/01/20 19:43:20
Line 227 
Line 227 
 /* to be seen literally;  \056 is not a metacharacter. */  /* to be seen literally;  \056 is not a metacharacter. */
   
 int hexstr(char **pp)   /* find and eval hex string at pp, return new p */  int hexstr(char **pp)   /* find and eval hex string at pp, return new p */
 {  {                       /* only pick up one 8-bit byte (2 chars) */
         char *p;          char *p;
         int n = 0;          int n = 0;
           int i;
   
         for (p = *pp; isxdigit(*p); p++) {          for (i = 0, p = *pp; i < 2 && isxdigit(*p); i++, p++) {
                 if (isdigit(*p))                  if (isdigit(*p))
                         n = 16 * n + *p - '0';                          n = 16 * n + *p - '0';
                 else if (*p >= 'a' && *p <= 'f')                  else if (*p >= 'a' && *p <= 'f')
Line 243 
Line 244 
         return n;          return n;
 }  }
   
 #define isoctdigit(c) ((c) >= '0' && (c) <= '8')        /* multiple use of arg */  #define isoctdigit(c) ((c) >= '0' && (c) <= '7')        /* multiple use of arg */
   
 int quoted(char **pp)   /* pick up next thing after a \\ */  int quoted(char **pp)   /* pick up next thing after a \\ */
                         /* and increment *pp */                          /* and increment *pp */

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2