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

Diff for /src/usr.bin/make/parse.c between version 1.109 and 1.110

version 1.109, 2012/11/24 11:06:08 version 1.110, 2013/11/22 15:47:35
Line 566 
Line 566 
                         p++;                          p++;
   
                 /* Found the best match already. */                  /* Found the best match already. */
                 if (isspace(*p) || *p == '\0')                  if (ISSPACE(*p) || *p == '\0')
                         return true;                          return true;
   
                 do {                  do {
Line 574 
Line 574 
                         if (*p == '\0')                          if (*p == '\0')
                             break;                              break;
                         p++;                          p++;
                 } while (!isspace(*p));                  } while (!ISSPACE(*p));
   
                 /* No better match later on... */                  /* No better match later on... */
                 if (*p == '\0')                  if (*p == '\0')
Line 589 
Line 589 
         const char *cp;          const char *cp;
   
         do {          do {
                 for (cp = line; *cp && !isspace(*cp) && *cp != '(';) {                  for (cp = line; *cp && !ISSPACE(*cp) && *cp != '(';) {
                         if (*cp == '$')                          if (*cp == '$')
                                 /* Must be a dynamic source (would have been                                  /* Must be a dynamic source (would have been
                                  * expanded otherwise), so call the Var module                                   * expanded otherwise), so call the Var module
Line 653 
Line 653 
                 if (*line != '\0')                  if (*line != '\0')
                         add_target_nodes(line, cp);                          add_target_nodes(line, cp);
   
                 while (isspace(*cp))                  while (ISSPACE(*cp))
                         cp++;                          cp++;
                 line = cp;                  line = cp;
         } while (*line != '!' && *line != ':' && *line);          } while (*line != '!' && *line != ':' && *line);
Line 762 
Line 762 
         cp++;                   /* Advance beyond operator */          cp++;                   /* Advance beyond operator */
   
         /* Get to the first source */          /* Get to the first source */
         while (isspace(*cp))          while (ISSPACE(*cp))
                 cp++;                  cp++;
         *pos = cp;          *pos = cp;
         return op;          return op;
Line 893 
Line 893 
                      * If it was .NULL, the source is the suffix to use when a                       * If it was .NULL, the source is the suffix to use when a
                      * file has no valid suffix.                       * file has no valid suffix.
                      */                       */
                     while (*cp && !isspace(*cp))                      while (*cp && !ISSPACE(*cp))
                             cp++;                              cp++;
                     switch (specType) {                      switch (specType) {
                     case SPECIAL_SUFFIXES:                      case SPECIAL_SUFFIXES:
Line 913 
Line 913 
                     }                      }
                     if (*cp != '\0')                      if (*cp != '\0')
                         cp++;                          cp++;
                     while (isspace(*cp))                      while (ISSPACE(*cp))
                         cp++;                          cp++;
                     line = cp;                      line = cp;
                 }                  }
Line 925 
Line 925 
                          * archive specifications (i.e. things with left                           * archive specifications (i.e. things with left
                          * parentheses in them) and handle them accordingly.                           * parentheses in them) and handle them accordingly.
                          */                           */
                         while (*cp && !isspace(*cp)) {                          while (*cp && !ISSPACE(*cp)) {
                                 if (*cp == '(' && cp > line && cp[-1] != '$') {                                  if (*cp == '(' && cp > line && cp[-1] != '$') {
                                         /*                                          /*
                                          * Only stop for a left parenthesis if                                           * Only stop for a left parenthesis if
Line 966 
Line 966 
                                 if (*cp)                                  if (*cp)
                                         cp++;                                          cp++;
                         }                          }
                         while (isspace(*cp))                          while (ISSPACE(*cp))
                                 cp++;                                  cp++;
                         line = cp;                          line = cp;
                 }                  }
Line 1159 
Line 1159 
         bool isSystem;          bool isSystem;
   
         /* find starting delimiter */          /* find starting delimiter */
         while (isspace(*file))          while (ISSPACE(*file))
                 file++;                  file++;
   
         /* determine type of file */          /* determine type of file */
Line 1195 
Line 1195 
         const char *efile;          const char *efile;
   
         /* find beginning of name */          /* find beginning of name */
         while (isspace(*file))          while (ISSPACE(*file))
                 file++;                  file++;
         if (*file == '\0') {          if (*file == '\0') {
                 Parse_Error(PARSE_FATAL, "Filename missing from \"%s\"",                  Parse_Error(PARSE_FATAL, "Filename missing from \"%s\"",
Line 1203 
Line 1203 
                 return;                  return;
         }          }
         /* sys5 delimits file up to next blank character or end of line */          /* sys5 delimits file up to next blank character or end of line */
         for (efile = file; *efile != '\0' && !isspace(*efile);)          for (efile = file; *efile != '\0' && !ISSPACE(*efile);)
                 efile++;                  efile++;
   
         handle_include_file(file, efile, true, errIfMissing);          handle_include_file(file, efile, true, errIfMissing);
Line 1243 
Line 1243 
         bool paren_to_match = false;          bool paren_to_match = false;
         const char *name, *ename;          const char *name, *ename;
   
         while (isspace(*p))          while (ISSPACE(*p))
                 p++;                  p++;
         if (*p == '!') {          if (*p == '!') {
                 not = true;                  not = true;
                 p++;                  p++;
         }          }
         while (isspace(*p))          while (ISSPACE(*p))
                 p++;                  p++;
         if (strncmp(p, "defined", 7) == 0) {          if (strncmp(p, "defined", 7) == 0) {
                 type = POISON_DEFINED;                  type = POISON_DEFINED;
Line 1258 
Line 1258 
                 type = POISON_EMPTY;                  type = POISON_EMPTY;
                 p += 5;                  p += 5;
         }          }
         while (isspace(*p))          while (ISSPACE(*p))
                 p++;                  p++;
         if (*p == '(') {          if (*p == '(') {
                 paren_to_match = true;                  paren_to_match = true;
                 p++;                  p++;
         }          }
         while (isspace(*p))          while (ISSPACE(*p))
                 p++;                  p++;
         name = ename = p;          name = ename = p;
         while (*p != '\0' && !isspace(*p)) {          while (*p != '\0' && !ISSPACE(*p)) {
                 if (*p == ')' && paren_to_match) {                  if (*p == ')' && paren_to_match) {
                         paren_to_match = false;                          paren_to_match = false;
                         p++;                          p++;
Line 1276 
Line 1276 
                 p++;                  p++;
                 ename = p;                  ename = p;
         }          }
         while (isspace(*p))          while (ISSPACE(*p))
                 p++;                  p++;
         switch(type) {          switch(type) {
         case POISON_NORMAL:          case POISON_NORMAL:
Line 1331 
Line 1331 
 {  {
         const char *eline;          const char *eline;
   
         while (isspace(*line))          while (ISSPACE(*line))
                 line++;                  line++;
         for (eline = line; !isspace(*eline) && *eline != '\0';)          for (eline = line; !ISSPACE(*eline) && *eline != '\0';)
                 eline++;                  eline++;
         Var_Deletei(line, eline);          Var_Deletei(line, eline);
         return true;          return true;
Line 1345 
Line 1345 
 {  {
         char *stripped;          char *stripped;
   
         while (isspace(*line))          while (ISSPACE(*line))
                 line++;                  line++;
   
         /* delegate basic classification to the conditional module */          /* delegate basic classification to the conditional module */
Line 1355 
Line 1355 
                 do {                  do {
                         line = Parse_ReadNextConditionalLine(linebuf);                          line = Parse_ReadNextConditionalLine(linebuf);
                         if (line != NULL) {                          if (line != NULL) {
                                 while (isspace(*line))                                  while (ISSPACE(*line))
                                         line++;                                          line++;
                                         stripped = strip_comments(copy, line);                                          stripped = strip_comments(copy, line);
                         }                          }
Line 1450 
Line 1450 
                 return true;                  return true;
         if (FEATURES(FEATURE_SYSVINCLUDE) &&          if (FEATURES(FEATURE_SYSVINCLUDE) &&
             strncmp(line, "include", 7) == 0 &&              strncmp(line, "include", 7) == 0 &&
             isspace(line[7]) &&              ISSPACE(line[7]) &&
             strchr(line, ':') == NULL) {              strchr(line, ':') == NULL) {
             /* It's an S3/S5-style "include".  */              /* It's an S3/S5-style "include".  */
                 lookup_sysv_include(line + 7, "include");                  lookup_sysv_include(line + 7, "include");
Line 1458 
Line 1458 
         }          }
         if (FEATURES(FEATURE_CONDINCLUDE) &&          if (FEATURES(FEATURE_CONDINCLUDE) &&
             strncmp(line, "sinclude", 8) == 0 &&              strncmp(line, "sinclude", 8) == 0 &&
             isspace(line[8]) &&              ISSPACE(line[8]) &&
             strchr(line, ':') == NULL) {              strchr(line, ':') == NULL) {
                 lookup_conditional_include(line+8, "sinclude");                  lookup_conditional_include(line+8, "sinclude");
                 return true;                  return true;
         }          }
         if (FEATURES(FEATURE_CONDINCLUDE) &&          if (FEATURES(FEATURE_CONDINCLUDE) &&
             strncmp(line, "-include", 8) == 0 &&              strncmp(line, "-include", 8) == 0 &&
             isspace(line[8]) &&              ISSPACE(line[8]) &&
             strchr(line, ':') == NULL) {              strchr(line, ':') == NULL) {
                 lookup_conditional_include(line+8, "-include");                  lookup_conditional_include(line+8, "-include");
                 return true;                  return true;
Line 1512 
Line 1512 
         if (cmd != NULL) {          if (cmd != NULL) {
                 do {                  do {
                         cmd++;                          cmd++;
                 } while (isspace(*cmd));                  } while (ISSPACE(*cmd));
                 if (*cmd != '\0') {                  if (*cmd != '\0') {
                         parse_commands(targets, cmd);                          parse_commands(targets, cmd);
                         *pcommands_seen = true;                          *pcommands_seen = true;

Legend:
Removed from v.1.109  
changed lines
  Added in v.1.110