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

Diff for /src/usr.bin/awk/tran.c between version 1.6 and 1.7

version 1.6, 1999/12/08 23:09:46 version 1.7, 2001/09/08 00:12:40
Line 127 
Line 127 
         for ( ; *envp; envp++) {          for ( ; *envp; envp++) {
                 if ((p = strchr(*envp, '=')) == NULL)                  if ((p = strchr(*envp, '=')) == NULL)
                         continue;                          continue;
                   if( p == *envp ) /* no left hand side name in env string */
                           continue;
                 *p++ = 0;       /* split into two strings at = */                  *p++ = 0;       /* split into two strings at = */
                 if (is_number(p))                  if (is_number(p))
                         setsymtab(*envp, p, atof(p), STR|NUM, ENVtab);                          setsymtab(*envp, p, atof(p), STR|NUM, ENVtab);
Line 388 
Line 390 
         return(p);          return(p);
 }  }
   
 char *qstring(char *s, int delim)       /* collect string up to next delim */  char *qstring(char *is, int delim)      /* collect string up to next delim */
 {  {
         char *os = s;          char *os = is;
         int c, n;          int c, n;
         char *buf, *bp;          uschar *s = (uschar *) is;
           uschar *buf, *bp;
   
         if ((buf = (char *) malloc(strlen(s)+3)) == NULL)          if ((buf = (uschar *) malloc(strlen(s)+3)) == NULL)
                 FATAL( "out of space in qstring(%s)", s);                  FATAL( "out of space in qstring(%s)", s);
         for (bp = buf; (c = *s) != delim; s++) {          for (bp = buf; (c = *s) != delim; s++) {
                 if (c == '\n')                  if (c == '\n')
Line 431 
Line 434 
                 }                  }
         }          }
         *bp++ = 0;          *bp++ = 0;
         return buf;          return (char *) buf;
 }  }

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