summaryrefslogtreecommitdiff
path: root/ext/curses
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-12-22 09:01:55 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-12-22 09:01:55 +0000
commit6d583574ab87c7cd18b66382c6892b545167bff6 (patch)
tree515b7c169ce2cd30fe085c5d861f5fad59aa76f7 /ext/curses
parente299d511db939232c628d6880e61c32e83937d66 (diff)
1.1d1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/v1_1dev@357 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/curses')
-rw-r--r--ext/curses/curses.c8
-rw-r--r--ext/curses/extconf.rb4
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")