From be83b8be34318b74544d435305cb98689eae8089 Mon Sep 17 00:00:00 2001 From: matz Date: Fri, 11 Jun 1999 06:30:01 +0000 Subject: 990611 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_3@484 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/curses/curses.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'ext/curses') diff --git a/ext/curses/curses.c b/ext/curses/curses.c index 5a515275bc..202a0f9244 100644 --- a/ext/curses/curses.c +++ b/ext/curses/curses.c @@ -32,7 +32,9 @@ #endif #endif +#include "stdio.h" #include "ruby.h" +#include "rubyio.h" static VALUE mCurses; static VALUE cWindow; @@ -355,6 +357,7 @@ static VALUE curses_getch(obj) VALUE obj; { + rb_read_check(stdin); return CHR2FIX(getch()); } @@ -364,6 +367,8 @@ curses_getstr(obj) VALUE obj; { char rtn[1024]; /* This should be big enough.. I hope */ + + rb_read_check(stdin); getstr(rtn); return rb_tainted_str_new2(rtn); } @@ -730,6 +735,7 @@ window_getch(obj) { struct windata *winp; + rb_read_check(stdin); GetWINDOW(obj, winp); return CHR2FIX(wgetch(winp->window)); } @@ -743,6 +749,7 @@ window_getstr(obj) char rtn[1024]; /* This should be big enough.. I hope */ GetWINDOW(obj, winp); + rb_read_check(stdin); wgetstr(winp->window, rtn); return rb_tainted_str_new2(rtn); } -- cgit v1.2.3