[前][次][番号順一覧][スレッド一覧]

ruby-changes:28454

From: zzak <ko1@a...>
Date: Sun, 28 Apr 2013 08:30:20 +0900 (JST)
Subject: [ruby-changes:28454] zzak:r40506 (trunk): * ext/curses/curses.c: Update Curses::Window example for nicer output

zzak	2013-04-28 08:30:11 +0900 (Sun, 28 Apr 2013)

  New Revision: 40506

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=40506

  Log:
    * ext/curses/curses.c: Update Curses::Window example for nicer output
      Patch by Michal Suchanek [Bug #8121] [ruby-core:53520]

  Modified files:
    trunk/ChangeLog
    trunk/ext/curses/curses.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 40505)
+++ ChangeLog	(revision 40506)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Sun Apr 28 08:28:00 2013  Zachary Scott  <zachary@z...>
+
+	* ext/curses/curses.c: Update Curses::Window example for nicer output
+	  Patch by Michal Suchanek [Bug #8121] [ruby-core:53520]
+
 Sun Apr 28 08:10:00 2013  Zachary Scott  <zachary@z...>
 
 	* README.EXT: Update note from r40504, by Jeremy Evans [Bug #7982]
Index: ext/curses/curses.c
===================================================================
--- ext/curses/curses.c	(revision 40505)
+++ ext/curses/curses.c	(revision 40506)
@@ -2814,10 +2814,14 @@ Init_curses(void) https://github.com/ruby/ruby/blob/trunk/ext/curses/curses.c#L2814
      *   Curses.init_screen()
      *
      *   my_str = "LOOK! PONIES!"
-     *   win = Curses::Window.new( 8, (my_str.length + 10),
-     *                             (Curses.lines - 8) / 2,
+     *   bwin = Curses::Window.new( 10, (my_str.length + 10),
+     *                             (Curses.lines - 10) / 2,
      *                             (Curses.cols - (my_str.length + 10)) / 2 )
-     *   win.box("|", "-")
+     *   bwin.box("\\", "/")
+     *   bwin.refresh
+     *   win = bwin.subwin( 6, my_str.length + 6,
+     *                     (Curses.lines - 6) / 2,
+     *                     (Curses.cols - (my_str.length + 6)) / 2 )
      *   win.setpos(2,3)
      *   win.addstr(my_str)
      *   # or even

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]