1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

bug fix for Window#{keypad,keypad=}

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1677 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
ttate 2001-08-13 02:13:06 +00:00
parent 9eded5fa13
commit 56f454f77d

View file

@ -1166,7 +1166,7 @@ window_getbkgd(VALUE obj)
return CHR2FIX(getbkgd(winp->window)); return CHR2FIX(getbkgd(winp->window));
} }
#endif /* USE_COLOR */ #endif /* USE_COLOR */
#ifdef USE_MOUSE #ifdef HAVE_KEYPAD
static VALUE static VALUE
window_keypad(VALUE obj, VALUE val) 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 ? return (keypad(winp->window,(val == Qtrue) ? TRUE : FALSE)) == OK ?
Qtrue : Qfalse; Qtrue : Qfalse;
}; };
#endif /* USE_MOUSE */ #endif /* HAVE_KEYPAD */
/*------------------------- Initialization -------------------------*/ /*------------------------- Initialization -------------------------*/
void void
@ -1288,8 +1288,10 @@ Init_curses()
rb_define_method(cWindow, "idlok", window_idlok, 1); rb_define_method(cWindow, "idlok", window_idlok, 1);
rb_define_method(cWindow, "setscrreg", window_setscrreg, 2); rb_define_method(cWindow, "setscrreg", window_setscrreg, 2);
rb_define_method(cWindow, "scrl", window_scrl, 1); 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);
rb_define_method(cWindow, "keypad=", window_keypad, 1); rb_define_method(cWindow, "keypad=", window_keypad, 1);
#endif
#ifdef USE_COLOR #ifdef USE_COLOR
rb_define_method(cWindow, "attroff", window_attroff, 1); rb_define_method(cWindow, "attroff", window_attroff, 1);
rb_define_method(cWindow, "attron", window_attron, 1); rb_define_method(cWindow, "attron", window_attron, 1);