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

Diff for /src/usr.bin/make/varmodifiers.c between version 1.42 and 1.43

version 1.42, 2015/08/20 22:32:41 version 1.43, 2015/11/15 06:19:22
Line 67 
Line 67 
   
 #include <ctype.h>  #include <ctype.h>
 #include <sys/types.h>  #include <sys/types.h>
 #ifndef MAKE_BOOTSTRAP  
 #include <regex.h>  #include <regex.h>
 #endif  
 #include <stddef.h>  #include <stddef.h>
 #include <stdio.h>  #include <stdio.h>
 #include <stdlib.h>  #include <stdlib.h>
Line 127 
Line 125 
 static bool VarLoop(struct Name *, bool, Buffer, void *);  static bool VarLoop(struct Name *, bool, Buffer, void *);
   
   
 #ifndef MAKE_BOOTSTRAP  
 static void VarREError(int, regex_t *, const char *);  static void VarREError(int, regex_t *, const char *);
 static bool VarRESubstitute(struct Name *, bool, Buffer, void *);  static bool VarRESubstitute(struct Name *, bool, Buffer, void *);
 static char *do_regex(const char *, const struct Name *, void *);  static char *do_regex(const char *, const struct Name *, void *);
Line 139 
Line 136 
         char     *replace;          char     *replace;
         int       flags;          int       flags;
 } VarREPattern;  } VarREPattern;
 #endif  
   
 static bool VarSubstitute(struct Name *, bool, Buffer, void *);  static bool VarSubstitute(struct Name *, bool, Buffer, void *);
 static char *VarGetPattern(SymTable *, int, const char **, int, int,  static char *VarGetPattern(SymTable *, int, const char **, int, int,
Line 190 
Line 186 
         match_mod = {false, get_stringarg, NULL, VarMatch, free_stringarg},          match_mod = {false, get_stringarg, NULL, VarMatch, free_stringarg},
         nomatch_mod = {false, get_stringarg, NULL, VarNoMatch, free_stringarg},          nomatch_mod = {false, get_stringarg, NULL, VarNoMatch, free_stringarg},
         subst_mod = {false, get_spatternarg, NULL, VarSubstitute, free_patternarg},          subst_mod = {false, get_spatternarg, NULL, VarSubstitute, free_patternarg},
 #ifndef MAKE_BOOTSTRAP  
         resubst_mod = {false, get_patternarg, do_regex, NULL, free_patternarg},          resubst_mod = {false, get_patternarg, do_regex, NULL, free_patternarg},
 #endif  
         quote_mod = {false, check_quote, VarQuote, NULL , free},          quote_mod = {false, check_quote, VarQuote, NULL , free},
         tail_mod = {false, check_empty, NULL, VarTail, NULL},          tail_mod = {false, check_empty, NULL, VarTail, NULL},
         head_mod = {false, check_empty, NULL, VarHead, NULL},          head_mod = {false, check_empty, NULL, VarHead, NULL},
Line 219 
Line 213 
         choose_mod['M'] = &match_mod;          choose_mod['M'] = &match_mod;
         choose_mod['N'] = &nomatch_mod;          choose_mod['N'] = &nomatch_mod;
         choose_mod['S'] = &subst_mod;          choose_mod['S'] = &subst_mod;
 #ifndef MAKE_BOOTSTRAP  
         choose_mod['C'] = &resubst_mod;          choose_mod['C'] = &resubst_mod;
 #endif  
         choose_mod['Q'] = &quote_mod;          choose_mod['Q'] = &quote_mod;
         choose_mod['T'] = &tail_mod;          choose_mod['T'] = &tail_mod;
         choose_mod['H'] = &head_mod;          choose_mod['H'] = &head_mod;
Line 799 
Line 791 
     return true;      return true;
 }  }
   
 #ifndef MAKE_BOOTSTRAP  
 /*-  /*-
  *-----------------------------------------------------------------------   *-----------------------------------------------------------------------
  * VarREError --   * VarREError --
Line 942 
Line 933 
         }          }
         return addSpace||added;          return addSpace||added;
 }  }
 #endif  
   
 /*-  /*-
  *-----------------------------------------------------------------------   *-----------------------------------------------------------------------
Line 1396 
Line 1386 
         free(vp);          free(vp);
 }  }
   
 #ifndef MAKE_BOOTSTRAP  
 static char *  static char *
 do_regex(const char *s, const struct Name *n UNUSED, void *arg)  do_regex(const char *s, const struct Name *n UNUSED, void *arg)
 {  {
Line 1423 
Line 1412 
         free(p2.matches);          free(p2.matches);
         return result;          return result;
 }  }
 #endif  
   
 char *  char *
 VarModifiers_Apply(char *str, const struct Name *name, SymTable *ctxt,  VarModifiers_Apply(char *str, const struct Name *name, SymTable *ctxt,

Legend:
Removed from v.1.42  
changed lines
  Added in v.1.43