diff options
author | Paul Smith <psmith@gnu.org> | 2002-10-25 22:01:47 +0000 |
---|---|---|
committer | Paul Smith <psmith@gnu.org> | 2002-10-25 22:01:47 +0000 |
commit | d696707cb5009308baa345ff60c8378512b07edb (patch) | |
tree | 480e6f04e132649d7346adc8eb92d090f85aabde /expand.c | |
parent | bd108cf45cca0a37cb82aca0f3f3516e593d638b (diff) | |
download | gunmake-d696707cb5009308baa345ff60c8378512b07edb.tar.gz |
Fix eval bugs 1516 and 1517.
Diffstat (limited to 'expand.c')
-rw-r--r-- | expand.c | 25 |
1 files changed, 25 insertions, 0 deletions
@@ -545,3 +545,28 @@ allocated_variable_expand_for_file (char *line, struct file *file) return value; } + +/* Install a new variable_buffer context, returning the current one for + safe-keeping. */ + +void +install_variable_buffer (char **bufp, unsigned int *lenp) +{ + *bufp = variable_buffer; + *lenp = variable_buffer_length; + + variable_buffer = 0; + initialize_variable_output (); +} + +/* Restore a previously-saved variable_buffer setting (free the current one). + */ + +void +restore_variable_buffer (char *buf, unsigned int len) +{ + free (variable_buffer); + + variable_buffer = buf; + variable_buffer_length = len; +} |