From 909fd6e2c4369020707782e20656069fbb3030d1 Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Tue, 20 May 2014 23:34:25 +1000 Subject: Found a way to deal with the PACKAGE_* stuff outside of Elm. It's undocumented. --- src/GuiLua/GuiLua.c | 10 +--------- src/GuiLua/GuiLua.h | 1 + src/GuiLua/skang.c | 6 ++++-- src/GuiLua/test_c.c | 3 +-- 4 files changed, 7 insertions(+), 13 deletions(-) (limited to 'src/GuiLua') diff --git a/src/GuiLua/GuiLua.c b/src/GuiLua/GuiLua.c index 5815b45..1ffbc0f 100644 --- a/src/GuiLua/GuiLua.c +++ b/src/GuiLua/GuiLua.c @@ -142,12 +142,10 @@ and ordinary elementary widgets. Proper introspection can come later. */ -#include "LumbrJack.h" #include "GuiLua.h" #include "Runnr.h" -static int logDom; // Our logging domain. const char *glName = "ourGuiLua"; /* Sooo, how to do this - @@ -373,7 +371,6 @@ int luaopen_GuiLua(lua_State *L) printf("**********************require GuiLua\n"); // In theory this function only ever gets called once. - logDom = loggingStartup("GuiLua", logDom); elm_policy_set(ELM_POLICY_EXIT, ELM_POLICY_EXIT_NONE); elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_NONE); @@ -474,18 +471,13 @@ GuiLua *GuiLuaDo(int argc, char **argv, winFang *parent, EPhysics_World *world) PE("Error running - skang.loopWindow()"); GuiLuaDel(result); result = NULL; - if (logDom >= 0) - { - eina_log_domain_unregister(logDom); - logDom = -1; - } // This shuts down Elementary, but keeps the main loop running until all ecore_evas are freed. elm_shutdown(); } } else - fprintf(stderr, "Failed to start Lua!\n"); + PE("Failed to start Lua!"); return result; } diff --git a/src/GuiLua/GuiLua.h b/src/GuiLua/GuiLua.h index d82d244..216ce8a 100644 --- a/src/GuiLua/GuiLua.h +++ b/src/GuiLua/GuiLua.h @@ -2,6 +2,7 @@ #define _GUILUA_H_ +#include "LumbrJack.h" #include "Runnr.h" #include "winFang.h" diff --git a/src/GuiLua/skang.c b/src/GuiLua/skang.c index c116f30..3aee0e2 100644 --- a/src/GuiLua/skang.c +++ b/src/GuiLua/skang.c @@ -1,11 +1,13 @@ -#include "SledjHamr.h" #include "GuiLua.h" +int logDom = -1; + EAPI_MAIN int elm_main(int argc, char **argv) { - HamrTime(elm_main, "GuiLua"); + logDom = HamrTime(argv[0], elm_main, logDom); GuiLuaDo(argc, argv, NULL, NULL); + pantsOff(logDom); return 0; } diff --git a/src/GuiLua/test_c.c b/src/GuiLua/test_c.c index e85814b..ed680b0 100644 --- a/src/GuiLua/test_c.c +++ b/src/GuiLua/test_c.c @@ -10,7 +10,6 @@ http://lua-users.org/lists/lua-l/2008-01/msg00671.html */ -//#include "LumbrJack.h" #include "Runnr.h" #include "GuiLua.h" @@ -23,7 +22,7 @@ static int cfunc (lua_State *L) double arg1 = luaL_checknumber(L, 1); const char *arg2 = luaL_checkstring(L, 2); - printf("Inside %s.cfunc(%f, %s)\n", ourName, arg1, arg2); + PI("Inside %s.cfunc(%f, %s)\n", ourName, arg1, arg2); return 0; } -- cgit v1.1