luaa: use only one addsl

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2009-04-27 13:36:26 +02:00
parent 9ac5cea397
commit 85c5bffbcc
1 changed files with 3 additions and 3 deletions

6
luaa.c
View File

@ -752,9 +752,8 @@ luaA_init(xdgHandle* xdg)
buffer_init(&buf); buffer_init(&buf);
#define A_LUAA_FIRST_STRING "package.path = package.path .. \";" #define A_LUAA_FIRST_STRING "package.path = package.path .. \";"
#define A_LUAA_SECOND_STRING "/awesome/?.lua;" #define A_LUAA_SECOND_STRING "/awesome/?.lua;"
buffer_addsl(&buf, A_LUAA_FIRST_STRING); #define A_LUAA_FULL_STRING A_LUAA_FIRST_STRING A_LUAA_SECOND_STRING "/awesome/?/init.lua\""
buffer_addsl(&buf, A_LUAA_SECOND_STRING); buffer_addsl(&buf, A_LUAA_FULL_STRING);
buffer_addsl(&buf, "/awesome/?/init.lua\"");
for(; *xdgconfigdirs; xdgconfigdirs++) for(; *xdgconfigdirs; xdgconfigdirs++)
{ {
size_t len = a_strlen(*xdgconfigdirs); size_t len = a_strlen(*xdgconfigdirs);
@ -769,6 +768,7 @@ luaA_init(xdgHandle* xdg)
} }
#undef A_LUAA_FIRST_STRING #undef A_LUAA_FIRST_STRING
#undef A_LUAA_SECOND_STRING #undef A_LUAA_SECOND_STRING
#undef A_LUAA_FULL_STRING
buffer_wipe(&buf); buffer_wipe(&buf);
} }