- Fix the makefile
authorlego <lego@f5534014-38df-0310-8fa8-9805f1628bb7>
Wed, 18 Oct 2006 15:05:55 +0000 (15:05 +0000)
committerlego <lego@f5534014-38df-0310-8fa8-9805f1628bb7>
Wed, 18 Oct 2006 15:05:55 +0000 (15:05 +0000)
- improve the Lua Console

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@19591 f5534014-38df-0310-8fa8-9805f1628bb7

epan/wslua/Makefile.am
epan/wslua/console.lua

index 3daff8718af3ae538438e0bf3e3d86680c2b630a..b9c04fc1d8c46e1204cbe84133142f063bb81caa 100644 (file)
@@ -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)
index cc1025d2a1fe87b811a65da700de6232fb957dd0..d4d4738b90c244117d3bb44d4e7ff0ac5f46d107 100644 (file)
@@ -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