summaryrefslogtreecommitdiff
path: root/ext/curses
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-11-22 09:51:07 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-11-22 09:51:07 +0000
commit448b1af751fed5976948d629d9b7028a7d044506 (patch)
tree3dc331f9db936ea35d361953cd771a5732eccc24 /ext/curses
parentdbd254d4f4a7b93ce32bf0cf1d8b4b31bc4d689f (diff)
* ext/curses/curses.c (window_nodelay): nodelay() of NetBSD's
libcruses returns no value, just like keypad(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5006 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/curses')
-rw-r--r--ext/curses/curses.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/ext/curses/curses.c b/ext/curses/curses.c
index 7900573..2e60b21 100644
--- a/ext/curses/curses.c
+++ b/ext/curses/curses.c
@@ -1339,8 +1339,14 @@ window_nodelay(VALUE obj, VALUE val)
#ifdef HAVE_NODELAY
struct windata *winp;
GetWINDOW(obj,winp);
-
+
+ /* nodelay() of NetBSD's libcurses returns no value */
+#if defined(__NetBSD__) && !defined(NCURSES_VERSION)
+ nodelay(winp->window, RTEST(val) ? TRUE : FALSE);
+ return Qnil;
+#else
return nodelay(winp->window,RTEST(val) ? TRUE : FALSE) == OK ? Qtrue : Qfalse;
+#endif
#else
rb_notimplement();
#endif