From 1a5beef51f5c32081116e502c1c90a3e32813020 Mon Sep 17 00:00:00 2001 From: Paul Smith Date: Fri, 2 May 2003 01:44:59 +0000 Subject: - Fix bug #1405: allow multiple pattern-specific variables to match a target. - Fix some uncleanliness about the implementation of patterns-specific vars. - Some enhancements to the OS/2 port. --- variable.h | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) (limited to 'variable.h') diff --git a/variable.h b/variable.h index 5ce1944..613278a 100644 --- a/variable.h +++ b/variable.h @@ -47,7 +47,6 @@ enum variable_flavor chained through `next'. */ #define EXP_COUNT_BITS 15 /* This gets all the bitfields into 32 bits */ - #define EXP_COUNT_MAX ((1<1, allow this many self-referential expansions. */ - + enum variable_flavor + flavor ENUM_BITFIELD (3); /* Variable flavor. */ enum variable_origin origin ENUM_BITFIELD (3); /* Variable origin. */ - - unsigned int exportable:1; /* Nonzero if the variable _could_ be - exported. */ enum variable_export { v_export, /* Export this variable. */ @@ -95,6 +95,17 @@ struct variable_set_list struct variable_set *set; /* Variable set. */ }; +/* Structure used for pattern-specific variables. */ + +struct pattern_var + { + struct pattern_var *next; + char *target; + unsigned int len; + char *suffix; + struct variable variable; + }; + extern char *variable_buffer; extern struct variable_set_list *current_variable_set_list; @@ -131,8 +142,9 @@ extern void define_automatic_variables PARAMS ((void)); extern void initialize_file_variables PARAMS ((struct file *file, int read)); extern void print_file_variables PARAMS ((struct file *file)); extern void print_variable_set PARAMS ((struct variable_set *set, char *prefix)); -extern void merge_variable_set_lists PARAMS ((struct variable_set_list **setlist0, struct variable_set_list *setlist1)); +extern void merge_variable_set_lists PARAMS ((struct variable_set_list **to_list, struct variable_set_list *from_list)); extern struct variable *do_variable_definition PARAMS ((const struct floc *flocp, const char *name, char *value, enum variable_origin origin, enum variable_flavor flavor, int target_var)); +extern struct variable *parse_variable_definition PARAMS ((struct variable *v, char *line)); extern struct variable *try_variable_definition PARAMS ((const struct floc *flocp, char *line, enum variable_origin origin, int target_var)); extern void init_hash_global_variable_set PARAMS ((void)); extern void hash_init_function_table PARAMS ((void)); @@ -179,6 +191,8 @@ extern struct variable *define_variable_in_set extern char **target_environment PARAMS ((struct file *file)); +extern struct pattern_var *create_pattern_var PARAMS ((char *target, char *suffix)); + extern int export_all_variables; #define MAKELEVEL_NAME "MAKELEVEL" -- cgit v1.2.3