diff --git a/src/frontend/variable.c b/src/frontend/variable.c index 7735b5027..8c1c1a602 100644 --- a/src/frontend/variable.c +++ b/src/frontend/variable.c @@ -973,6 +973,16 @@ cp_vprint(void) tfree(vars); } +struct variable * +var_alloc(char *name, struct variable *next) +{ + struct variable *v = TMALLOC(struct variable, 1); + ZERO(v, struct variable); + v -> va_name = name; + v -> va_next = next; + return v; +} + void var_set_bool(struct variable *v, bool value) { diff --git a/src/frontend/variable.h b/src/frontend/variable.h index 00877b7e8..f7c15dcce 100644 --- a/src/frontend/variable.h +++ b/src/frontend/variable.h @@ -43,6 +43,8 @@ wordlist *cp_varwl(struct variable *var); wordlist *cp_variablesubst(wordlist *wlist); void free_struct_variable(struct variable *v); +struct variable *var_alloc(char *name, struct variable *next); + void var_set_bool(struct variable *, bool); void var_set_num(struct variable *, int); void var_set_real(struct variable *, double);