Skip to content

Commit

Permalink
* ext/curses/curses.c (curses_insertln): merged a patch from
Browse files Browse the repository at this point in the history
  TAKAHASHI Tamotsu <ttakah@lapis.plala.or.jp>.  [ruby-ext:02305]

* lib/irb/init.rb (IRB::IRB.rc_file_generators): more flexible
  IRB.rc_file_generators.  [ruby-core:05163]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8587 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
matz committed Jun 7, 2005
1 parent a6e6bb6 commit 39b3061
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 0 deletions.
10 changes: 10 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
Wed Jun 8 00:00:01 2005 Yukihiro Matsumoto <matz@ruby-lang.org>

* ext/curses/curses.c (curses_insertln): merged a patch from
TAKAHASHI Tamotsu <ttakah@lapis.plala.or.jp>. [ruby-ext:02305]

Tue Jun 7 19:34:15 2005 Yukihiro Matsumoto <matz@ruby-lang.org>

* lib/irb/init.rb (IRB::IRB.rc_file_generators): more flexible
IRB.rc_file_generators. [ruby-core:05163]

Tue Jun 7 18:39:31 2005 Yukihiro Matsumoto <matz@ruby-lang.org>

* lib/thread.rb: RDoc documentation from Eric Hodel
Expand Down
27 changes: 27 additions & 0 deletions ext/curses/curses.c
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,17 @@ curses_deleteln(obj)
return Qnil;
}

/* def insertln */
static VALUE
curses_insertln(obj)
VALUE obj;
{
#if defined(HAVE_INSERTLN) || defined(insertln)
insertln();
#endif
return Qnil;
}

/* def keyname */
static VALUE
curses_keyname(obj, c)
Expand Down Expand Up @@ -1159,6 +1170,20 @@ window_deleteln(obj)
return Qnil;
}

/* def insertln */
static VALUE
window_insertln(obj)
VALUE obj;
{
#if defined(HAVE_WINSERTLN) || defined(winsertln)
struct windata *winp;

GetWINDOW(obj, winp);
winsertln(winp->window);
#endif
return Qnil;
}

static VALUE
window_scrollok(VALUE obj, VALUE bf)
{
Expand Down Expand Up @@ -1438,6 +1463,7 @@ Init_curses()
rb_define_module_function(mCurses, "getstr", curses_getstr, 0);
rb_define_module_function(mCurses, "delch", curses_delch, 0);
rb_define_module_function(mCurses, "deleteln", curses_deleteln, 0);
rb_define_module_function(mCurses, "insertln", curses_insertln, 0);
rb_define_module_function(mCurses, "keyname", curses_keyname, 1);
rb_define_module_function(mCurses, "lines", curses_lines, 0);
rb_define_module_function(mCurses, "cols", curses_cols, 0);
Expand Down Expand Up @@ -1505,6 +1531,7 @@ Init_curses()
rb_define_method(cWindow, "getstr", window_getstr, 0);
rb_define_method(cWindow, "delch", window_delch, 0);
rb_define_method(cWindow, "deleteln", window_deleteln, 0);
rb_define_method(cWindow, "insertln", window_insertln, 0);
rb_define_method(cWindow, "scroll", window_scroll, 0);
rb_define_method(cWindow, "scrollok", window_scrollok, 1);
rb_define_method(cWindow, "idlok", window_idlok, 1);
Expand Down
3 changes: 3 additions & 0 deletions lib/irb/init.rb
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,9 @@ def IRB.rc_file(ext = IRBRC_EXT)

# enumerate possible rc-file base name generators
def IRB.rc_file_generators
if irbrc = ENV["IRBRC"]
yield proc{|rc| irbrc}
end
if home = ENV["HOME"]
yield proc{|rc| home+"/.irb#{rc}"}
end
Expand Down

0 comments on commit 39b3061

Please sign in to comment.