From c036ea5f3e01f4f456d0a3cc2f6fec5a9a1c156c Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Tue, 10 Nov 2009 10:22:04 +0100 Subject: [PATCH] globalconf: move conffile out Signed-off-by: Julien Danjou --- globalconf.h | 2 -- luaa.c | 7 +++++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/globalconf.h b/globalconf.h index e01d33b2..383113c8 100644 --- a/globalconf.h +++ b/globalconf.h @@ -75,8 +75,6 @@ typedef struct client_array_t clients; /** Embedded windows */ xembed_window_array_t embedded; - /** Path to config file */ - char *conffile; /** Stack client history */ client_array_t stack; /** Lua VM state */ diff --git a/luaa.c b/luaa.c index 5a602d1f..f1a08b6f 100644 --- a/luaa.c +++ b/luaa.c @@ -55,6 +55,9 @@ extern const struct luaL_reg awesome_mouse_meta[]; extern const struct luaL_reg awesome_screen_methods[]; extern const struct luaL_reg awesome_screen_meta[]; +/** Path to config file */ +static char *conffile; + /** Quit awesome. * \param L The Lua VM state. * \return The number of elements pushed on stack. @@ -558,7 +561,7 @@ luaA_awesome_index(lua_State *L) lua_pushnumber(L, globalconf.font->height); break; case A_TK_CONFFILE: - lua_pushstring(L, globalconf.conffile); + lua_pushstring(L, conffile); break; case A_TK_FG: luaA_pushxcolor(L, globalconf.colors.fg); @@ -834,7 +837,7 @@ luaA_loadrc(const char *confpath, bool run) fprintf(stderr, "%s\n", lua_tostring(globalconf.L, -1)); else { - globalconf.conffile = a_strdup(confpath); + conffile = a_strdup(confpath); return true; } }