commit 3f07e6772e3ebf4a4ccec9ebb8364d227916806b
parent 392f469830c29fcf8c3e09e993bd61a86b891a8f
Author: Genki Takiuchi <genki@s21g.com>
Date: Thu, 4 Sep 2008 04:07:22 +0900
Applied the patch.
Diffstat:
3 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/extconf.rb b/extconf.rb
@@ -38,8 +38,8 @@ else
raise "ncurses header file not found"
end
-if have_library("ncurses", "wmove")
- curses_lib = "ncurses"
+if have_library("ncursesw", "wmove")
+ curses_lib = "ncursesw"
elsif have_library("pdcurses", "wmove")
curses_lib = "pdcurses"
else
@@ -123,11 +123,11 @@ have_func("attr_get")
puts "checking for the panel library..."
if have_header("panel.h")
- have_library("panel", "panel_hidden")
+ have_library("panelw", "panel_hidden")
end
puts "checking for the form library..."
if have_header("form.h")
- have_library("form", "new_form")
+ have_library("formw", "new_form")
end
puts "checking for the menu library..."
if have_header("menu.h")
diff --git a/ncurses_wrap.c b/ncurses_wrap.c
@@ -2726,6 +2726,8 @@ static void init_safe_functions(void)
}
void Init_ncurses_bin(void)
{
+ setlocale(LC_ALL, "");
+
mNcurses = rb_define_module("Ncurses");
eNcurses = rb_define_class_under(mNcurses, "Exception", rb_eRuntimeError);
rb_iv_set(mNcurses, "@windows_hash", rb_hash_new());
diff --git a/ncurses_wrap.h b/ncurses_wrap.h
@@ -83,6 +83,7 @@ int close(int);
# endif
#endif
+#include <locale.h>
#include <ruby.h>
extern VALUE mNcurses; /* module Ncurses */