From 2a2fcac0fdb76ce7481ab4ab17e6f64f3ca7bc1d Mon Sep 17 00:00:00 2001 From: Bardur Arantsson Date: Tue, 19 Jun 2012 18:32:22 +0200 Subject: Lua: Eliminate use of exec_lua() in files.c --- lib/help/def.aux | 3 --- lib/mods/theme/help/def.aux | 3 --- src/files.c | 14 +++----------- 3 files changed, 3 insertions(+), 17 deletions(-) delete mode 100644 lib/help/def.aux delete mode 100644 lib/mods/theme/help/def.aux diff --git a/lib/help/def.aux b/lib/help/def.aux deleted file mode 100644 index 983e9683..00000000 --- a/lib/help/def.aux +++ /dev/null @@ -1,3 +0,0 @@ -file_ext="html" -link_prefix="" -link_suffix="" diff --git a/lib/mods/theme/help/def.aux b/lib/mods/theme/help/def.aux deleted file mode 100644 index 983e9683..00000000 --- a/lib/mods/theme/help/def.aux +++ /dev/null @@ -1,3 +0,0 @@ -file_ext="html" -link_prefix="" -link_suffix="" diff --git a/src/files.c b/src/files.c index 10617f74..ee3bc86c 100644 --- a/src/files.c +++ b/src/files.c @@ -3523,9 +3523,9 @@ bool_ txt_to_html(cptr head, cptr foot, cptr base, cptr ext, bool_ force, bool_ /* Char array type of hyperlink info */ hyperlink_type *h_ptr; - cptr file_ext; - cptr link_prefix; - cptr link_suffix; + cptr file_ext = "html"; + cptr link_prefix = ""; + cptr link_suffix = ""; /* Pointer to general buffer in the above */ char *buf; @@ -3542,14 +3542,6 @@ bool_ txt_to_html(cptr head, cptr foot, cptr base, cptr ext, bool_ force, bool_ h_ptr->link_x[i] = -1; } - /* Parse it(yeah lua is neat :) */ - tome_dofile_anywhere(ANGBAND_DIR_HELP, "def.aux", TRUE); - - /* Ok now get the parameters */ - file_ext = string_exec_lua("return file_ext"); - link_prefix = string_exec_lua("return link_prefix"); - link_suffix = string_exec_lua("return link_suffix"); - sprintf(buf_name, "%s.%s", base, file_ext); if ((!force) && file_exist(buf_name)) return FALSE; -- cgit v1.2.3