summaryrefslogtreecommitdiff
path: root/expand.c
diff options
context:
space:
mode:
Diffstat (limited to 'expand.c')
-rw-r--r--expand.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/expand.c b/expand.c
index d25afef..39f0d19 100644
--- a/expand.c
+++ b/expand.c
@@ -113,11 +113,18 @@ recursively_expand_for_file (struct variable *v, struct file *file)
expanding_var = &this_var;
}
+ /* If we have no other file-reading context, use the variable's context. */
+ if (!reading_file)
+ {
+ set_reading = 1;
+ reading_file = &v->fileinfo;
+ }
+
if (v->expanding)
{
if (!v->exp_count)
/* Expanding V causes infinite recursion. Lose. */
- fatal (this_var,
+ fatal (*expanding_var,
_("Recursive variable `%s' references itself (eventually)"),
v->name);
--v->exp_count;
@@ -129,13 +136,6 @@ recursively_expand_for_file (struct variable *v, struct file *file)
current_variable_set_list = file->variables;
}
- /* If we have no other file-reading context, use the variable's context. */
- if (!reading_file)
- {
- set_reading = 1;
- reading_file = this_var;
- }
-
v->expanding = 1;
if (v->append)
value = allocated_variable_append (v);