Skip to content

Commit

Permalink
* ext/curses/curses.c (NUM2CH, CH2FIX): use single char strings.
Browse files Browse the repository at this point in the history
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
nobu committed Jul 28, 2006
1 parent 35526b1 commit dab5f82
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 16 deletions.
8 changes: 6 additions & 2 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -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>

Expand Down
26 changes: 12 additions & 14 deletions ext/curses/curses.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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");
}
Expand Down Expand Up @@ -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;
Expand All @@ -136,7 +136,7 @@ curses_init_screen()

/* def close_screen */
static VALUE
curses_close_screen()
curses_close_screen(void)
{
#ifdef HAVE_ISENDWIN
if (!isendwin())
Expand All @@ -161,7 +161,7 @@ curses_finalize(VALUE dummy)

/* def closed? */
static VALUE
curses_closed()
curses_closed(void)
{
#ifdef HAVE_ISENDWIN
if (isendwin()) {
Expand All @@ -184,7 +184,7 @@ curses_clear(VALUE obj)

/* def clrtoeol */
static VALUE
curses_clrtoeol()
curses_clrtoeol(void)
{
curses_stdscr();
clrtoeol();
Expand Down Expand Up @@ -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);
}
Expand Down Expand Up @@ -619,7 +619,7 @@ struct mousedata {
};

static void
no_mevent()
no_mevent(void)
{
rb_raise(rb_eRuntimeError, "no such mouse event");
}
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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");
Expand Down

0 comments on commit dab5f82

Please sign in to comment.