diff options
author | jluehrs2 <jluehrs2@uiuc.edu> | 2007-09-08 19:02:18 -0500 |
---|---|---|
committer | jluehrs2 <jluehrs2@uiuc.edu> | 2007-09-08 19:02:18 -0500 |
commit | 779cf28c3733ac69b53e0d007f214249ef323944 (patch) | |
tree | 245c563fe7f8f2fc92afbba90c9582435d9461a1 /src/curses.c | |
parent | 3203f17f6549e8a239a7e12786c2857459ec7e29 (diff) | |
download | luancurses-779cf28c3733ac69b53e0d007f214249ef323944.tar.gz luancurses-779cf28c3733ac69b53e0d007f214249ef323944.zip |
add clearing routines
Diffstat (limited to 'src/curses.c')
-rw-r--r-- | src/curses.c | 28 |
1 files changed, 28 insertions, 0 deletions
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 }, |