Ignore:
Timestamp:
Mar 31, 2008, 12:16:15 AM (17 years ago)
Author:
bird
Message:

Use the variable file location in evalval and evalcall.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kmk/function.c

    r1452 r1458  
    15521552      int var_ctx;
    15531553      size_t off;
     1554      const struct floc *reading_file_saved = reading_file;
    15541555
    15551556      /* Make a copy of the value to the variable buffer since
     
    15681569      if (var_ctx)
    15691570        push_new_variable_scope ();
     1571      if (v->fileinfo.filenm)
     1572        reading_file = &v->fileinfo;
    15701573
    15711574      eval_buffer (o);
    15721575
     1576      reading_file = reading_file_saved;
    15731577      if (var_ctx)
    15741578        pop_variable_scope ();
     
    41974201  else
    41984202    {
     4203      const struct floc *reading_file_saved = reading_file;
     4204
    41994205      if (!strcmp (funcname, "evalcall"))
    42004206        {
     
    42054211          o = variable_buffer_output (o, v->value, v->value_length + 1);
    42064212          o = variable_buffer + off;
     4213          if (v->fileinfo.filenm)
     4214            reading_file = &v->fileinfo;
    42074215        }
    42084216      else
     
    42184226      eval_buffer (o);
    42194227      restore_variable_buffer (buf, len);
     4228      reading_file = reading_file_saved;
    42204229    }
    42214230#endif /* CONFIG_WITH_EVALPLUS */
Note: See TracChangeset for help on using the changeset viewer.