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

Diff for /src/usr.bin/awk/parse.c between version 1.3 and 1.4

version 1.3, 1999/04/20 17:31:30 version 1.4, 1999/12/08 23:09:46
Line 36 
Line 36 
   
         x = (Node *) malloc(sizeof(Node) + (n-1)*sizeof(Node *));          x = (Node *) malloc(sizeof(Node) + (n-1)*sizeof(Node *));
         if (x == NULL)          if (x == NULL)
                 ERROR "out of space in nodealloc" FATAL;                  FATAL("out of space in nodealloc");
         x->nnext = NULL;          x->nnext = NULL;
         x->lineno = lineno;          x->lineno = lineno;
         return(x);          return(x);
Line 190 
Line 190 
         if (isvalue(p)) {          if (isvalue(p)) {
                 cp = (Cell *) (p->narg[0]);                  cp = (Cell *) (p->narg[0]);
                 if (isfcn(cp))                  if (isfcn(cp))
                         ERROR "%s is a function, not an array", cp->nval SYNTAX;                          SYNTAX( "%s is a function, not an array", cp->nval );
                 else if (!isarr(cp)) {                  else if (!isarr(cp)) {
                         xfree(cp->sval);                          xfree(cp->sval);
                         cp->sval = (char *) makesymtab(NSYMTAB);                          cp->sval = (char *) makesymtab(NSYMTAB);
Line 210 
Line 210 
   
         x = node4(PASTAT2, a, b, c, itonp(paircnt));          x = node4(PASTAT2, a, b, c, itonp(paircnt));
         if (paircnt++ >= PA2NUM)          if (paircnt++ >= PA2NUM)
                 ERROR "limited to %d pat,pat statements", PA2NUM SYNTAX;                  SYNTAX( "limited to %d pat,pat statements", PA2NUM );
         x->ntype = NSTAT;          x->ntype = NSTAT;
         return(x);          return(x);
 }  }
Line 237 
Line 237 
         int n;          int n;
   
         if (isarr(v)) {          if (isarr(v)) {
                 ERROR "`%s' is an array name and a function name", v->nval SYNTAX;                  SYNTAX( "`%s' is an array name and a function name", v->nval );
                 return;                  return;
         }          }
         v->tval = FCN;          v->tval = FCN;

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4