aboutsummaryrefslogtreecommitdiffstats
path: root/epan/wslua/template-init.lua
diff options
context:
space:
mode:
authorLuis Ontanon <luis.ontanon@gmail.com>2006-10-17 18:20:44 +0000
committerLuis Ontanon <luis.ontanon@gmail.com>2006-10-17 18:20:44 +0000
commitb8ef88a6e224192c3d19310e859d655377c6ae1c (patch)
tree1ee746243482ff3fe184e88beb6b55dbdf219cbe /epan/wslua/template-init.lua
parent482ded17c639d2722a9d6dbaba622cde358eae3e (diff)
Several changes:
- do not #include a c code file in wslua_register.c compile a separate boject - add the console and evaluate windows - add some useful vars to the lua environment - some cleanup - add the dtd generator code (currently disabled) svn path=/trunk/; revision=19579
Diffstat (limited to 'epan/wslua/template-init.lua')
-rw-r--r--epan/wslua/template-init.lua29
1 files changed, 6 insertions, 23 deletions
diff --git a/epan/wslua/template-init.lua b/epan/wslua/template-init.lua
index 0fe00b54cb..6eae877f97 100644
--- a/epan/wslua/template-init.lua
+++ b/epan/wslua/template-init.lua
@@ -25,7 +25,6 @@
-- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-- If lua is to be completely disabled uncomment the following line.
-- disable_lua = true; do return end;
@@ -64,26 +63,10 @@ print = info
-- %MENU_GROUPS%
--- Console to execute commands in lua
-function wslua_console()
- local w = TextWindow.new("Lua Console")
- w:set_editable(TRUE)
-
- function eval()
- local text = string.gsub(w:get_text(),"%c*--%[%[.*--%]%]$","")
- text = string.gsub(text,"^=","return ")
-
- local result = assert(loadstring(text))()
-
- if (result ~= nil) then
- w:set(text .. '\n\n--[[ Result:\n' .. result .. '\n--]]')
- else
- w:set(text .. '\n\n--[[ Evaluated --]]')
- end
- end
-
- w:add_button("Evaluate",eval)
-end
-
-register_menu("Lua Console",wslua_console,MENU_TOOLS)
+-- other useful constants
+GUI_ENABLED = gui_enabled()
+DATA_DIR = datafile_path()
+USER_DIR = persconffile_path()
+dofile("console.lua")
+--dofile("dtd_gen.lua")