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

ruby-changes:20098

From: drbrain <ko1@a...>
Date: Fri, 17 Jun 2011 13:10:49 +0900 (JST)
Subject: [ruby-changes:20098] drbrain:r32145 (trunk): * ext/curses/curses.c: Clean up documentation.

drbrain	2011-06-17 13:10:37 +0900 (Fri, 17 Jun 2011)

  New Revision: 32145

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

  Log:
    * ext/curses/curses.c:  Clean up documentation.

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

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 32144)
+++ ChangeLog	(revision 32145)
@@ -1,3 +1,7 @@
+Fri Jun 17 13:09:45 2011  Eric Hodel  <drbrain@s...>
+
+	* ext/curses/curses.c:  Clean up documentation.
+
 Fri Jun 17 09:25:14 2011  Eric Hodel  <drbrain@s...>
 
 	* ext/curses/curses.c:  Document curses constants.  Patch by Vincent
Index: ext/curses/curses.c
===================================================================
--- ext/curses/curses.c	(revision 32144)
+++ ext/curses/curses.c	(revision 32145)
@@ -142,6 +142,7 @@
  * Document-method: Curses.stdscr
  *
  * The Standard Screen.
+ *
  * Upon initializing curses, a default window called stdscr,
  * which is the size of the terminal screen, is created.
  *
@@ -820,15 +821,17 @@
 
 /*
  * Document-method: Curses.setscrreg
- * call-seq: setscrreg(top, bottom)
  *
+ * call-seq:
+ *   setscrreg(top, bottom)
+ *
  * Set a software scrolling region in a window.
  * +top+ and +bottom+ are lines numbers of the margin.
  *
- *  If this option and Curses.scrollok are enabled, an attempt to move off
- *  the bottom margin line causes all lines in the scrolling region
- *  to scroll one line in the direction of the first line.
- *  Only the text of the window is scrolled.
+ * If this option and Curses.scrollok are enabled, an attempt to move off
+ * the bottom margin line causes all lines in the scrolling region
+ * to scroll one line in the direction of the first line.
+ * Only the text of the window is scrolled.
  *
  */
 static VALUE
@@ -1893,8 +1896,10 @@
 
 /*
  * Document-method: Curses::Window.<<
- * call-seq: <<(str)
  *
+ * call-seq:
+ *   <<(str)
+ *
  * Add String +str+ to the current string.
  *
  * See also Curses::Window.addstr
@@ -2087,15 +2092,16 @@
 
 /*
  * Document-method: Curses::Window.setscrreg
- * call-seq: setscrreg(top, bottom)
+ * call-seq:
+ *   setscrreg(top, bottom)
  *
  * Set a software scrolling region in a window.
  * +top+ and +bottom+ are lines numbers of the margin.
  *
- *  If this option and Curses::Window.scrollok are enabled, an attempt to move off
- *  the bottom margin line causes all lines in the scrolling region
- *  to scroll one line in the direction of the first line.
- *  Only the text of the window is scrolled.
+ * If this option and Curses::Window.scrollok are enabled, an attempt to move
+ * off the bottom margin line causes all lines in the scrolling region to
+ * scroll one line in the direction of the first line.  Only the text of the
+ * window is scrolled.
  *
  */
 static VALUE
@@ -2352,16 +2358,19 @@
 #ifdef HAVE_KEYPAD
 /*
  * Document-method: Curses::Window.keypad=
- * call-seq: keypad=(bool)
+ * call-seq:
+ *   keypad=(bool)
  *
- * see Curses::Window.keypad
+ * See Curses::Window.keypad
  */
 
 /*
  * Document-method: Curses::Window.keypad
- * call-seq: keypad(bool)
+ * call-seq:
+ *   keypad(bool)
  *
  * Enables the keypad of the user's terminal.
+ *
  * If enabled (+bool+ is +true+), the user can press a function key
  * (such as an arrow key) and wgetch returns a single value representing
  * the function key, as in KEY_LEFT.  If disabled (+bool+ is +false+),
@@ -2602,27 +2611,27 @@
      *
      * The means by which to create and manage frames or windows.
      * While there may be more than one window at a time, only one window
-     * receive the input.
+     * will receive input.
      *
      * == Usage
      *
-     * 		require 'curses'
+     *   require 'curses'
      *
-     *		Curses.init_screen()
+     *   Curses.init_screen()
      *
-     * 		my_str = "LOOK! PONIES!"
-     * 		win = Curses::Window.new( 8, (my_str.length + 10),
-     * 		                          (Curses.lines - 8) / 2,
-     * 		                          (Curses.cols - (my_str.length + 10)) / 2 )
-     * 		win.box("|", "-")
-     * 		win.setpos(2,3)
-     * 		win.addstr(my_str)
-     * 		# or even
-     * 		win << "\nORLY"
-     * 		win << "\nYES!! " + my_str
-     * 		win.refresh
-     * 		win.getch
-     * 		win.close
+     *   my_str = "LOOK! PONIES!"
+     *   win = Curses::Window.new( 8, (my_str.length + 10),
+     *                             (Curses.lines - 8) / 2,
+     *                             (Curses.cols - (my_str.length + 10)) / 2 )
+     *   win.box("|", "-")
+     *   win.setpos(2,3)
+     *   win.addstr(my_str)
+     *   # or even
+     *   win << "\nORLY"
+     *   win << "\nYES!! " + my_str
+     *   win.refresh
+     *   win.getch
+     *   win.close
      *
      */
     cWindow = rb_define_class_under(mCurses, "Window", rb_cData);

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

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