summaryrefslogtreecommitdiff
path: root/ext/curses
diff options
context:
space:
mode:
authorttate <ttate@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-08-13 02:13:06 +0000
committerttate <ttate@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-08-13 02:13:06 +0000
commit56f454f77d70385f703469e54b8f9a3d604d5787 (patch)
tree77eac492f51b5587d59eb0723b1fb57a3563de0d /ext/curses
parent9eded5fa137fc0d25c1096890a706c4437043227 (diff)
bug fix for Window#{keypad,keypad=}
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1677 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/curses')
-rw-r--r--ext/curses/curses.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/ext/curses/curses.c b/ext/curses/curses.c
index c6a1048..fbecc91 100644
--- a/ext/curses/curses.c
+++ b/ext/curses/curses.c
@@ -1166,7 +1166,7 @@ window_getbkgd(VALUE obj)
return CHR2FIX(getbkgd(winp->window));
}
#endif /* USE_COLOR */
-#ifdef USE_MOUSE
+#ifdef HAVE_KEYPAD
static VALUE
window_keypad(VALUE obj, VALUE val)
{
@@ -1176,7 +1176,7 @@ window_keypad(VALUE obj, VALUE val)
return (keypad(winp->window,(val == Qtrue) ? TRUE : FALSE)) == OK ?
Qtrue : Qfalse;
};
-#endif /* USE_MOUSE */
+#endif /* HAVE_KEYPAD */
/*------------------------- Initialization -------------------------*/
void
@@ -1288,8 +1288,10 @@ Init_curses()
rb_define_method(cWindow, "idlok", window_idlok, 1);
rb_define_method(cWindow, "setscrreg", window_setscrreg, 2);
rb_define_method(cWindow, "scrl", window_scrl, 1);
+#ifdef HAVE_KEYPAD
rb_define_method(cWindow, "keypad", window_keypad, 1);
rb_define_method(cWindow, "keypad=", window_keypad, 1);
+#endif
#ifdef USE_COLOR
rb_define_method(cWindow, "attroff", window_attroff, 1);
rb_define_method(cWindow, "attron", window_attron, 1);