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

Diff for /src/usr.bin/awk/run.c between version 1.45 and 1.46

version 1.45, 2020/06/08 03:22:23 version 1.46, 2020/06/10 20:59:06
Line 73 
Line 73 
 Node    *winner = NULL; /* root of parse tree */  Node    *winner = NULL; /* root of parse tree */
 Cell    *tmps;          /* free temporary cells for execution */  Cell    *tmps;          /* free temporary cells for execution */
   
 static Cell     truecell        ={ OBOOL, BTRUE, 0, 0, 1.0, NUM };  static Cell     truecell        ={ OBOOL, BTRUE, 0, 0, 1.0, NUM, NULL };
 Cell    *True   = &truecell;  Cell    *True   = &truecell;
 static Cell     falsecell       ={ OBOOL, BFALSE, 0, 0, 0.0, NUM };  static Cell     falsecell       ={ OBOOL, BFALSE, 0, 0, 0.0, NUM, NULL };
 Cell    *False  = &falsecell;  Cell    *False  = &falsecell;
 static Cell     breakcell       ={ OJUMP, JBREAK, 0, 0, 0.0, NUM };  static Cell     breakcell       ={ OJUMP, JBREAK, 0, 0, 0.0, NUM, NULL };
 Cell    *jbreak = &breakcell;  Cell    *jbreak = &breakcell;
 static Cell     contcell        ={ OJUMP, JCONT, 0, 0, 0.0, NUM };  static Cell     contcell        ={ OJUMP, JCONT, 0, 0, 0.0, NUM, NULL };
 Cell    *jcont  = &contcell;  Cell    *jcont  = &contcell;
 static Cell     nextcell        ={ OJUMP, JNEXT, 0, 0, 0.0, NUM };  static Cell     nextcell        ={ OJUMP, JNEXT, 0, 0, 0.0, NUM, NULL };
 Cell    *jnext  = &nextcell;  Cell    *jnext  = &nextcell;
 static Cell     nextfilecell    ={ OJUMP, JNEXTFILE, 0, 0, 0.0, NUM };  static Cell     nextfilecell    ={ OJUMP, JNEXTFILE, 0, 0, 0.0, NUM, NULL };
 Cell    *jnextfile      = &nextfilecell;  Cell    *jnextfile      = &nextfilecell;
 static Cell     exitcell        ={ OJUMP, JEXIT, 0, 0, 0.0, NUM };  static Cell     exitcell        ={ OJUMP, JEXIT, 0, 0, 0.0, NUM, NULL };
 Cell    *jexit  = &exitcell;  Cell    *jexit  = &exitcell;
 static Cell     retcell         ={ OJUMP, JRET, 0, 0, 0.0, NUM };  static Cell     retcell         ={ OJUMP, JRET, 0, 0, 0.0, NUM, NULL };
 Cell    *jret   = &retcell;  Cell    *jret   = &retcell;
 static Cell     tempcell        ={ OCELL, CTEMP, 0, "", 0.0, NUM|STR|DONTFREE };  static Cell     tempcell        ={ OCELL, CTEMP, 0, "", 0.0, NUM|STR|DONTFREE, NULL };
   
 Node    *curnode = NULL;        /* the node being executed, for debugging */  Node    *curnode = NULL;        /* the node being executed, for debugging */
   
Line 224 
Line 224 
   
 Cell *call(Node **a, int n)     /* function call.  very kludgy and fragile */  Cell *call(Node **a, int n)     /* function call.  very kludgy and fragile */
 {  {
         static Cell newcopycell = { OCELL, CCOPY, 0, "", 0.0, NUM|STR|DONTFREE };          static Cell newcopycell = { OCELL, CCOPY, 0, "", 0.0, NUM|STR|DONTFREE, NULL };
         int i, ncall, ndef;          int i, ncall, ndef;
         int freed = 0; /* handles potential double freeing when fcn & param share a tempcell */          int freed = 0; /* handles potential double freeing when fcn & param share a tempcell */
         Node *x;          Node *x;

Legend:
Removed from v.1.45  
changed lines
  Added in v.1.46