summaryrefslogtreecommitdiff
path: root/src/map/magic-interpreter-parser.ypp
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/magic-interpreter-parser.ypp')
-rw-r--r--src/map/magic-interpreter-parser.ypp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/map/magic-interpreter-parser.ypp b/src/map/magic-interpreter-parser.ypp
index 0e03afb..a86f1c8 100644
--- a/src/map/magic-interpreter-parser.ypp
+++ b/src/map/magic-interpreter-parser.ypp
@@ -1,6 +1,9 @@
%code requires
{
#include "magic-interpreter.hpp"
+
+extern
+FString current_magic_filename;
} // %code requires
%code
@@ -20,6 +23,8 @@
#include "itemdb.hpp"
#include "magic-expr.hpp"
+FString current_magic_filename;
+
// can't use src/warnings.hpp in generated code
#pragma GCC diagnostic warning "-Wall"
#pragma GCC diagnostic warning "-Wextra"
@@ -1411,6 +1416,7 @@ bool magic_init0()
// must be called after itemdb initialisation
bool magic_init1(ZString conffile)
{
+ current_magic_filename = conffile;
magic_frontend_in = fopen(conffile.c_str(), "r");
if (!magic_frontend_in)
{