[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.44 and 1.45

version 1.44, 2013/11/01 17:54:37 version 1.45, 2013/11/22 15:47:35
Line 138 
Line 138 
         For     *arg;          For     *arg;
         unsigned long n;          unsigned long n;
   
         while (isspace(*ptr))          while (ISSPACE(*ptr))
                 ptr++;                  ptr++;
   
         /* Parse loop.  */          /* Parse loop.  */
Line 149 
Line 149 
   
         for (;;) {          for (;;) {
                 /* Grab the variables.  */                  /* Grab the variables.  */
                 for (wrd = ptr; *ptr && !isspace(*ptr); ptr++)                  for (wrd = ptr; *ptr && !ISSPACE(*ptr); ptr++)
                         continue;                          continue;
                 if (ptr - wrd == 0) {                  if (ptr - wrd == 0) {
                         Parse_Error(PARSE_FATAL, "Syntax error in for");                          Parse_Error(PARSE_FATAL, "Syntax error in for");
                         return 0;                          return 0;
                 }                  }
                 endVar = ptr++;                  endVar = ptr++;
                 while (isspace(*ptr))                  while (ISSPACE(*ptr))
                         ptr++;                          ptr++;
                 /* End of variable list ? */                  /* End of variable list ? */
                 if (endVar - wrd == 2 && wrd[0] == 'i' && wrd[1] == 'n')                  if (endVar - wrd == 2 && wrd[0] == 'i' && wrd[1] == 'n')
Line 214 
Line 214 
   
         if (*ptr == '.') {          if (*ptr == '.') {
   
                 for (ptr++; isspace(*ptr); ptr++)                  for (ptr++; ISSPACE(*ptr); ptr++)
                         continue;                          continue;
   
                 if (strncmp(ptr, "endfor", 6) == 0 &&                  if (strncmp(ptr, "endfor", 6) == 0 &&
                     (isspace(ptr[6]) || !ptr[6])) {                      (ISSPACE(ptr[6]) || !ptr[6])) {
                         if (DEBUG(FOR))                          if (DEBUG(FOR))
                                 (void)fprintf(stderr, "For: end for %lu\n",                                  (void)fprintf(stderr, "For: end for %lu\n",
                                     arg->level);                                      arg->level);
Line 227 
Line 227 
                                 return false;                                  return false;
                 }                  }
                 else if (strncmp(ptr, "for", 3) == 0 &&                  else if (strncmp(ptr, "for", 3) == 0 &&
                      isspace(ptr[3])) {                       ISSPACE(ptr[3])) {
                         arg->level++;                          arg->level++;
                         if (DEBUG(FOR))                          if (DEBUG(FOR))
                                 (void)fprintf(stderr, "For: new loop %lu\n",                                  (void)fprintf(stderr, "For: new loop %lu\n",

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