From 779cf28c3733ac69b53e0d007f214249ef323944 Mon Sep 17 00:00:00 2001 From: jluehrs2 Date: Sat, 8 Sep 2007 19:02:18 -0500 Subject: add clearing routines --- src/curses.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/src/curses.c b/src/curses.c index e7cad5d..3b7f3fb 100644 --- a/src/curses.c +++ b/src/curses.c @@ -406,6 +406,30 @@ static int l_addstr(lua_State* L) return 1; } +static int l_erase(lua_State* L) +{ + lua_pushboolean(L, (erase() == OK)); + return 1; +} + +static int l_clear(lua_State* L) +{ + lua_pushboolean(L, (clear() == OK)); + return 1; +} + +static int l_clrtobot(lua_State* L) +{ + lua_pushboolean(L, (clrtobot() == OK)); + return 1; +} + +static int l_clrtoeol(lua_State* L) +{ + lua_pushboolean(L, (clrtoeol() == OK)); + return 1; +} + static int l_refresh(lua_State* L) { lua_pushboolean(L, (refresh() == OK)); @@ -456,6 +480,10 @@ const luaL_Reg reg[] = { { "move", l_move }, { "addch", l_addch }, { "addstr", l_addstr }, + { "erase", l_erase }, + { "clear", l_clear }, + { "clrtobot", l_clrtobot }, + { "clrtoeol", l_clrtoeol }, { "refresh", l_refresh }, { "getmaxyx", l_getmaxyx }, { "getyx", l_getyx }, -- cgit v1.2.3-54-g00ecf