summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-07-28 08:18:22 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-07-28 08:18:22 +0000
commitdab5f82b81a738c38fa34a17645232baf2736dea (patch)
tree246e97903230431dcecf1e246f7ef077bfcb11da
parent35526b1b00e7c47bd0736b1d2dcaadbaea736355 (diff)
* ext/curses/curses.c (NUM2CH, CH2FIX): use single char strings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog8
-rw-r--r--ext/curses/curses.c26
2 files changed, 18 insertions, 16 deletions
diff --git a/ChangeLog b/ChangeLog
index 7a36c6fb96..10e7f03566 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,16 +1,20 @@
+Fri Jul 28 17:18:03 2006 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * ext/curses/curses.c (NUM2CH, CH2FIX): use single char strings.
+
Fri Jul 28 14:09:14 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
* eval.c (rb_call): fixed typo in cache look-up. [ruby-dev:29167]
Fri Jul 28 10:41:35 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
- * eval.c (rb_call): a bug in method cache look-up.
+ * eval.c (rb_call): a bug in method cache look-up.
http://www.rubyist.net/~matz/20060720.html#c04
Fri Jul 28 10:19:28 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
* sprintf.c (rb_f_sprintf): documentation update patch from Jacob
- Fugal <lukfugl at gmail.com>. [ruby-core:08418]
+ Fugal <lukfugl at gmail.com>. [ruby-core:08418]
Fri Jul 28 09:41:45 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
diff --git a/ext/curses/curses.c b/ext/curses/curses.c
index 5d5fdb567f..3ff20f41c0 100644
--- a/ext/curses/curses.c
+++ b/ext/curses/curses.c
@@ -54,8 +54,8 @@
# define USE_MOUSE 1
#endif
-#define NUM2CH NUM2LONG
-#define CH2FIX LONG2FIX
+#define NUM2CH NUM2CHR
+#define CH2FIX CHR2FIX
static VALUE mCurses;
static VALUE mKey;
@@ -77,7 +77,7 @@ static VALUE window_attron();
static VALUE window_attrset();
static void
-no_window()
+no_window(void)
{
rb_raise(rb_eRuntimeError, "already closed window");
}
@@ -118,7 +118,7 @@ prep_window(VALUE class, WINDOW *window)
/* def init_screen */
static VALUE
-curses_init_screen()
+curses_init_screen(void)
{
rb_secure(4);
if (rb_stdscr) return rb_stdscr;
@@ -136,7 +136,7 @@ curses_init_screen()
/* def close_screen */
static VALUE
-curses_close_screen()
+curses_close_screen(void)
{
#ifdef HAVE_ISENDWIN
if (!isendwin())
@@ -161,7 +161,7 @@ curses_finalize(VALUE dummy)
/* def closed? */
static VALUE
-curses_closed()
+curses_closed(void)
{
#ifdef HAVE_ISENDWIN
if (isendwin()) {
@@ -184,7 +184,7 @@ curses_clear(VALUE obj)
/* def clrtoeol */
static VALUE
-curses_clrtoeol()
+curses_clrtoeol(void)
{
curses_stdscr();
clrtoeol();
@@ -453,13 +453,13 @@ curses_keyname(VALUE obj, VALUE c)
}
static VALUE
-curses_lines()
+curses_lines(void)
{
return INT2FIX(LINES);
}
static VALUE
-curses_cols()
+curses_cols(void)
{
return INT2FIX(COLS);
}
@@ -619,7 +619,7 @@ struct mousedata {
};
static void
-no_mevent()
+no_mevent(void)
{
rb_raise(rb_eRuntimeError, "no such mouse event");
}
@@ -953,9 +953,7 @@ window_begx(VALUE obj)
/* def box(vert, hor) */
static VALUE
-window_box(argc, argv, self)
- int argc;
- VALUE argv[], self;
+window_box(int argc, VALUE *argv, VALUE self)
{
struct windata *winp;
VALUE vert, hor, corn;
@@ -1360,7 +1358,7 @@ window_timeout(VALUE obj, VALUE delay)
/*------------------------- Initialization -------------------------*/
void
-Init_curses()
+Init_curses(void)
{
mCurses = rb_define_module("Curses");
mKey = rb_define_module_under(mCurses, "Key");