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

Diff for /src/usr.bin/make/for.c between version 1.9 and 1.10

version 1.9, 1999/12/16 16:41:41 version 1.10, 1999/12/16 17:02:45
Line 101 
Line 101 
   
 static int        forLevel = 0;         /* Nesting level             */  static int        forLevel = 0;         /* Nesting level             */
 static char      *forVar;               /* Iteration variable        */  static char      *forVar;               /* Iteration variable        */
 static Buffer     forBuf;               /* Commands in loop          */  static BUFFER     forBuf;               /* Commands in loop          */
 static Lst        forLst;               /* List of items             */  static Lst        forLst;               /* List of items             */
 static unsigned long forLineno;         /* Line at beginning of loop */  static unsigned long forLineno;         /* Line at beginning of loop */
   
Line 219 
Line 219 
         build_words_list(forLst, sub);          build_words_list(forLst, sub);
         free(sub);          free(sub);
         forLineno = Parse_Getlineno();          forLineno = Parse_Getlineno();
         forBuf = Buf_Init(0);          Buf_Init(&forBuf, 0);
         forLevel++;          forLevel++;
         return 1;          return 1;
     }      }
Line 246 
Line 246 
     }      }
   
     if (forLevel != 0) {      if (forLevel != 0) {
         Buf_AddString(forBuf, line);          Buf_AddString(&forBuf, line);
         Buf_AddChar(forBuf, '\n');          Buf_AddChar(&forBuf, '\n');
         return 1;          return 1;
     }      }
     else {      else {
Line 304 
Line 304 
 {  {
     For arg;      For arg;
   
     if (forVar == NULL || forBuf == NULL || forLst == NULL)      if (forVar == NULL || forLst == NULL)
         return;          return;
     arg.var = forVar;      arg.var = forVar;
     arg.buf = forBuf;      arg.buf = &forBuf;
     arg.lst = forLst;      arg.lst = forLst;
     arg.lineno = forLineno;      arg.lineno = forLineno;
     forVar = NULL;      forVar = NULL;
     forBuf = NULL;  
     forLst = NULL;      forLst = NULL;
   
     Lst_ForEach(arg.lst, ForExec, (ClientData) &arg);      Lst_ForEach(arg.lst, ForExec, (ClientData) &arg);
   
     free((Address)arg.var);      free((Address)arg.var);
     Lst_Destroy(arg.lst, (void (*) __P((ClientData))) free);      Lst_Destroy(arg.lst, (void (*) __P((ClientData))) free);
     Buf_Destroy(arg.buf, TRUE);      Buf_Destroy(arg.buf);
 }  }

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