diff options
author | Luis Ontanon <luis.ontanon@gmail.com> | 2006-10-18 15:05:55 +0000 |
---|---|---|
committer | Luis Ontanon <luis.ontanon@gmail.com> | 2006-10-18 15:05:55 +0000 |
commit | aee9a87da4fd41208b08b11654d4b0b1cd604df1 (patch) | |
tree | f50cb8c9acfea3558f51f1a44cebfb6c84c2c397 /epan | |
parent | b3301320c1e427e634fd5019b3bccfc1c20a663e (diff) |
- Fix the makefile
- improve the Lua Console
svn path=/trunk/; revision=19591
Diffstat (limited to 'epan')
-rw-r--r-- | epan/wslua/Makefile.am | 2 | ||||
-rw-r--r-- | epan/wslua/console.lua | 17 |
2 files changed, 10 insertions, 9 deletions
diff --git a/epan/wslua/Makefile.am b/epan/wslua/Makefile.am index 3daff8718a..b9c04fc1d8 100644 --- a/epan/wslua/Makefile.am +++ b/epan/wslua/Makefile.am @@ -99,7 +99,7 @@ wslua.h: declare_wslua.h register_wslua.c: declare_wslua.h -declare_wslua.h: make-reg.pl $(wslua_modules) taps.c-inc +declare_wslua.h: make-reg.pl $(wslua_modules) taps_wslua.c $(PERL) $(srcdir)/make-reg.pl $(wslua_modules); doc: make-doc.pl $(wslua_modules) diff --git a/epan/wslua/console.lua b/epan/wslua/console.lua index cc1025d2a1..d4d4738b90 100644 --- a/epan/wslua/console.lua +++ b/epan/wslua/console.lua @@ -27,7 +27,7 @@ if (gui_enabled()) then local function evaluate_lua() local w = TextWindow.new("Evaluate Lua") - w:set_editable(TRUE) + w:set_editable() function eval() local text = string.gsub(w:get_text(),"%c*--%[%[.*--%]%]$","") @@ -61,11 +61,11 @@ if (gui_enabled()) then debug = debug } - function critical(txt) w:append( "CRITICAL: " .. txt .. "\n") end - function warn(txt) w:append( "WARN: " .. txt .. "\n") end - function message(txt) w:append( "MESSAGE: " .. txt .. "\n") end - function info(txt) w:append( "INFO: " .. txt .. "\n") end - function debug(txt) w:append( "DEBUG: " .. txt .. "\n") end + function critical(x) w:append( os.date() .. " CRITICAL: " .. tostring(x) .. "\n") end + function warn(x) w:append( os.date() .. " WARN: " .. tostring(x) .. "\n") end + function message(x) w:append( os.date() .. " MESSAGE: " .. tostring(x) .. "\n") end + function info(x) w:append( os.date() .. " INFO: " .. tostring(x) .. "\n") end + function debug(x) w:append( os.date() .. " DEBUG: " .. tostring(x) .. "\n") end function at_close() critical = orig.critical @@ -78,8 +78,9 @@ if (gui_enabled()) then end w:set_atclose(at_close) + info("Console opened") end - register_menu("Evaluate Lua",evaluate_lua,MENU_TOOLS) - register_menu("Lua Console",run_console,MENU_TOOLS) + register_menu("Lua/Evaluate",evaluate_lua,MENU_TOOLS) + register_menu("Lua/Console",run_console,MENU_TOOLS) end
\ No newline at end of file |