From a08bce4dfe676dfd6cc9381840bd7a8e1095e3ff Mon Sep 17 00:00:00 2001 From: jluehrs2 Date: Fri, 19 Oct 2007 17:06:47 -0500 Subject: add an endwin function --- src/curses.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/curses.c b/src/curses.c index bff2583..0fb8f69 100644 --- a/src/curses.c +++ b/src/curses.c @@ -171,6 +171,12 @@ static int l_initscr(lua_State* L) return 1; } +static int l_endwin(lua_State* L) +{ + lua_pushboolean(L, endwin() == OK); + return 1; +} + static int l_start_color(lua_State* L) { if (has_colors()) { @@ -500,6 +506,7 @@ static int l_color_pairs(lua_State* L) const luaL_Reg reg[] = { { "initscr", l_initscr }, + { "endwin", l_endwin }, { "start_color", l_start_color }, { "setup_term", l_setup_term }, { "init_color", l_init_color }, -- cgit v1.2.3-54-g00ecf