aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjluehrs2 <jluehrs2@uiuc.edu>2008-03-18 08:50:32 -0500
committerjluehrs2 <jluehrs2@uiuc.edu>2008-03-18 08:50:32 -0500
commit9b172bbd3e71ad17e5d76516c8ad357414d29148 (patch)
tree336e8b54686f1e730227d5eb48234f19303049c0
parentda73127802db68c58b49c8d145d61a2d103e41dc (diff)
downloadluancurses-9b172bbd3e71ad17e5d76516c8ad357414d29148.tar.gz
luancurses-9b172bbd3e71ad17e5d76516c8ad357414d29148.zip
add isendwin
-rw-r--r--TODO1
-rw-r--r--src/curses.c7
2 files changed, 7 insertions, 1 deletions
diff --git a/TODO b/TODO
index 2790104..e0939ba 100644
--- a/TODO
+++ b/TODO
@@ -3,7 +3,6 @@
- curs_addch (echochar)
- reading from the screen (curs_instr, curs_inch)
- reading input (ungetch (curs_getch), curs_getstr
-- isendwin (curs_initscr)
- attribute support (curs_attr)
- terminal attributes (curs_termattrs)
- finish up curs_inopts and curs_outopts
diff --git a/src/curses.c b/src/curses.c
index 822eb0b..ce790f1 100644
--- a/src/curses.c
+++ b/src/curses.c
@@ -150,6 +150,12 @@ static int l_endwin(lua_State* L)
return 1;
}
+static int l_isendwin(lua_State* L)
+{
+ lua_pushboolean(L, isendwin());
+ return 1;
+}
+
static int l_start_color(lua_State* L)
{
if (has_colors()) {
@@ -572,6 +578,7 @@ static int l_color_pairs(lua_State* L)
const luaL_Reg reg[] = {
{ "initscr", l_initscr },
{ "endwin", l_endwin },
+ { "isendwin", l_isendwin },
{ "start_color", l_start_color },
{ "setup_term", l_setup_term },
{ "init_color", l_init_color },