[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.10 and 1.11

version 1.10, 2003/04/06 06:12:01 version 1.11, 2004/12/30 01:52:48
Line 52 
Line 52 
 Awkfloat *RSTART;       /* start of re matched with ~; origin 1 (!) */  Awkfloat *RSTART;       /* start of re matched with ~; origin 1 (!) */
 Awkfloat *RLENGTH;      /* length of same */  Awkfloat *RLENGTH;      /* length of same */
   
   Cell    *fsloc;         /* FS */
 Cell    *nrloc;         /* NR */  Cell    *nrloc;         /* NR */
 Cell    *nfloc;         /* NF */  Cell    *nfloc;         /* NF */
 Cell    *fnrloc;        /* FNR */  Cell    *fnrloc;        /* FNR */
Line 74 
Line 75 
         nullloc = setsymtab("$zero&null", "", 0.0, NUM|STR|CON|DONTFREE, symtab);          nullloc = setsymtab("$zero&null", "", 0.0, NUM|STR|CON|DONTFREE, symtab);
         nullnode = celltonode(nullloc, CCON);          nullnode = celltonode(nullloc, CCON);
   
         FS = &setsymtab("FS", " ", 0.0, STR|DONTFREE, symtab)->sval;          fsloc = setsymtab("FS", " ", 0.0, STR|DONTFREE, symtab);
           FS = &fsloc->sval;
         RS = &setsymtab("RS", "\n", 0.0, STR|DONTFREE, symtab)->sval;          RS = &setsymtab("RS", "\n", 0.0, STR|DONTFREE, symtab)->sval;
         OFS = &setsymtab("OFS", " ", 0.0, STR|DONTFREE, symtab)->sval;          OFS = &setsymtab("OFS", " ", 0.0, STR|DONTFREE, symtab)->sval;
         ORS = &setsymtab("ORS", "\n", 0.0, STR|DONTFREE, symtab)->sval;          ORS = &setsymtab("ORS", "\n", 0.0, STR|DONTFREE, symtab)->sval;
Line 316 
Line 318 
         char *t;          char *t;
         int fldno;          int fldno;
   
            dprintf( ("starting setsval %p: %s = \"%s\", t=%o\n", vp, NN(vp->nval), s, vp->tval) );             dprintf( ("starting setsval %p: %s = \"%s\", t=%o, r,f=%d,%d\n",
                   vp, NN(vp->nval), s, vp->tval, donerec, donefld) );
         if ((vp->tval & (NUM | STR)) == 0)          if ((vp->tval & (NUM | STR)) == 0)
                 funnyvar(vp, "assign to");                  funnyvar(vp, "assign to");
         if (isfld(vp)) {          if (isfld(vp)) {
Line 335 
Line 338 
         if (freeable(vp))          if (freeable(vp))
                 xfree(vp->sval);                  xfree(vp->sval);
         vp->tval &= ~DONTFREE;          vp->tval &= ~DONTFREE;
            dprintf( ("setsval %p: %s = \"%s (%p)\", t=%o\n", vp, NN(vp->nval), t,t, vp->tval) );             dprintf( ("setsval %p: %s = \"%s (%p) \", t=%o r,f=%d,%d\n",
                   vp, NN(vp->nval), t,t, vp->tval, donerec, donefld) );
         return(vp->sval = t);          return(vp->sval = t);
 }  }
   
Line 356 
Line 360 
         return(vp->fval);          return(vp->fval);
 }  }
   
  static char *get_str_val(Cell *vp, char **fmt)        /* get string val of a Cell */  static char *get_str_val(Cell *vp, char **fmt)        /* get string val of a Cell */
   
 {  {
         char s[100];    /* BUG: unchecked */          char s[100];    /* BUG: unchecked */
         double dtemp;          double dtemp;

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.11