From 13688af3996212fc902503787999a79439fd8b9b Mon Sep 17 00:00:00 2001 From: piaip Date: Sat, 5 Jan 2008 08:46:17 +0000 Subject: - bbslua: fixed compilation error if not using BBS-Lua - bbslua: fix key names - sample conf: add description for guest dbcs intresc option git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3793 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/bbslua.c | 4 ++-- mbbsd/more.c | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'mbbsd') diff --git a/mbbsd/bbslua.c b/mbbsd/bbslua.c index b7736c65..4059791a 100644 --- a/mbbsd/bbslua.c +++ b/mbbsd/bbslua.c @@ -120,7 +120,7 @@ bl_k2s(lua_State* L, int v) lua_pushstring(L, "TAB"); else if (v == '\b' || v == 0x7F) lua_pushstring(L, "BS"); - else if (v == '\n') + else if (v == '\n' || v == '\r' || v == Ctrl('M')) lua_pushstring(L, "ENTER"); else if (v < ' ') lua_pushfstring(L, "^%c", v-1+'A'); @@ -294,10 +294,10 @@ static void bbsluaRegConst(lua_State *L, const char *globName) { lua_getglobal(L, globName); - lua_pushstring(L, "ESC"); lua_pushstring(L, ESC_STR); lua_settable(L, -3); + lua_getglobal(L, globName); lua_pushstring(L, "ANSI_RESET"); lua_pushstring(L, ANSI_RESET); lua_settable(L, -3); diff --git a/mbbsd/more.c b/mbbsd/more.c index 2d4fec8d..6c5c1428 100644 --- a/mbbsd/more.c +++ b/mbbsd/more.c @@ -32,10 +32,12 @@ int more(char *fpath, int promptend) ChessReplayGame(fpath); break; +#if defined(USE_BBSLUA) case RET_DOBBSLUA: r = FULLUPDATE; bbslua(fpath); break; +#endif } return r; -- cgit v1.2.3