diff options
Diffstat (limited to 'ext/curses')
-rw-r--r-- | ext/curses/curses.c | 8 | ||||
-rw-r--r-- | ext/curses/extconf.rb | 4 |
2 files changed, 9 insertions, 3 deletions
diff --git a/ext/curses/curses.c b/ext/curses/curses.c index 3d3991373a..f3d1bc0970 100644 --- a/ext/curses/curses.c +++ b/ext/curses/curses.c @@ -360,7 +360,7 @@ curses_getstr(obj) { char rtn[1024]; /* This should be big enough.. I hope */ getstr(rtn); - return rb_str_taint(rb_str_new2(rtn)); + return rb_tainted_str_new2(rtn); } /* def delch */ @@ -377,7 +377,9 @@ static VALUE curses_deleteln(obj) VALUE obj; { +#ifdef HAVE_DELETELN deleteln(); +#endif return Qnil; } @@ -729,7 +731,7 @@ window_getstr(obj) GetWINDOW(obj, winp); wgetstr(winp->window, rtn); - return rb_str_taint(rb_str_new2(rtn)); + return rb_tainted_str_new2(rtn); } /* def delch */ @@ -749,10 +751,12 @@ static VALUE window_deleteln(obj) VALUE obj; { +#ifdef HAVE_WDELETELN struct windata *winp; GetWINDOW(obj, winp); wdeleteln(winp->window); +#endif return Qnil; } diff --git a/ext/curses/extconf.rb b/ext/curses/extconf.rb index 244c9085c4..442a9424a2 100644 --- a/ext/curses/extconf.rb +++ b/ext/curses/extconf.rb @@ -2,6 +2,8 @@ require 'mkmf' $CFLAGS="-I/usr/include/ncurses -I/usr/local/include/ncurses" $LDFLAGS="-L/usr/local/lib" make=FALSE + +have_library("mytinfo", "tgetent") if /bow/ =~ PLATFORM if have_header("ncurses.h") and have_library("ncurses", "initscr") make=TRUE elsif have_header("ncurses/curses.h") and have_library("ncurses", "initscr") @@ -15,7 +17,7 @@ else end if make then - for f in ["isendwin", "ungetch", "beep", "doupdate", "flash"] + for f in %w(isendwin ungetch beep doupdate flash deleteln wdeleteln) have_func(f) end create_makefile("curses") |