Subject: lib/21638: curses comments/manuals cleanup
To: None <gnats-bugs@gnats.netbsd.org>
From: None <virtus@wanadoo.nl>
List: netbsd-bugs
Date: 05/21/2003 17:25:31
>Number:         21638
>Category:       lib
>Synopsis:       Curses comments/manuals cleanup
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    lib-bug-people
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Wed May 21 13:33:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Douwe Kiela
>Release:        NetBSD 1.6T
>Organization:
	
>Environment:
	
	
System: NetBSD iluvatar 1.6T NetBSD 1.6T (ILUVATAR) #1: Mon May 19 23:56:57 CEST 2003 virtus@iluvatar:/usr/src/sys/arch/i386/compile/ILUVATAR i386
Architecture: i386
Machine: i386
>Description:
	Like i reported in my previous PR about mv*printw functions missing, here's a patch
	that adds mv*scanw and mv*inch*str functions to the manual pages.
	For the rest i've also cleaned up some comments while reading the source code, 
	I decided i'd include it in this PR.. just a few typo's and such.
	
>How-To-Repeat:
	
>Fix:
Index: curs_set.c
===================================================================
RCS file: /cvsroot/src/lib/libcurses/curs_set.c,v
retrieving revision 1.7
diff -u -r1.7 curs_set.c
--- curs_set.c	2001/12/11 11:18:17	1.7
+++ curs_set.c	2003/05/21 13:26:22
@@ -41,7 +41,7 @@
  * curs_set --
  *    Set the visibility of the cursor, 0 means invisible, 1 means normal
  *    visibility and 2 means high visibility.  Return the previous
- *    visibility iff the terminal supports the new visibility otherwise
+ *    visibility if the terminal supports the new visibility otherwise
  *    return ERR.
  */
 int
Index: curses.3
===================================================================
RCS file: /cvsroot/src/lib/libcurses/curses.3,v
retrieving revision 1.46
diff -u -r1.46 curses.3
--- curses.3	2003/05/21 06:57:08	1.46
+++ curses.3	2003/05/21 13:26:23
@@ -179,7 +179,10 @@
 .It mvgetnstr Ta Xr curses_input 3
 .It mvgetstr Ta Xr curses_input 3
 .It mvhline Ta Xr curses_line 3
+.It mvinchstr Ta Xr curses_inch 3
+.It mvinchnstr Ta Xr curses_inch 3
 .It mvprintw Ta Xr curses_print 3
+.It mvscanw Ta Xr curses_scanw 3
 .It mvvline Ta Xr curses_line 3
 .It mvwaddch Ta Xr curses_addch 3
 .It mvwaddstr Ta Xr curses_addstr 3
@@ -187,7 +190,10 @@
 .It mvwgetnstr Ta Xr curses_input 3
 .It mvwgetstr Ta Xr curses_input 3
 .It mvwhline Ta Xr curses_line 3
+.It mvwinchstr Ta Xr curses_inch 3
+.It mvwinchnstr Ta Xr curses_inch 3
 .It mvwprintw Ta Xr curses_print 3
+.It mvwscanw Ta Xr curses_scanw 3
 .It mvwvline Ta Xr curses_line 3
 .It napms Ta Xr curses_tty 3
 .It newpad Ta Xr curses_pad 3
Index: curses_inch.3
===================================================================
RCS file: /cvsroot/src/lib/libcurses/curses_inch.3,v
retrieving revision 1.4
diff -u -r1.4 curses_inch.3
--- curses_inch.3	2003/04/16 13:35:01	1.4
+++ curses_inch.3	2003/05/21 13:26:24
@@ -38,9 +38,13 @@
 .Nm inch ,
 .Nm winch ,
 .Nm inchnstr ,
+.Nm mvinchnstr ,
 .Nm winchnstr ,
+.Nm mvwinchnstr ,
 .Nm inchstr ,
+.Nm mvinchstr ,
 .Nm winchstr ,
+.Nm mvwinchstr ,
 .Nm innstr ,
 .Nm winnstr
 .Nm instr ,
@@ -57,12 +61,20 @@
 .Ft int
 .Fn inchnstr "chtype *chars" "int n"
 .Ft int
+.Fn mvinchnstr(int y, int x, chtype *chstr, int n)
+.Ft int
 .Fn winchnstr "WINDOW *win" "chtype *chars" "int n"
 .Ft int
+.Fn mvwinchnstr(WINDOW *win, int y, int x, chtype *chstr, int n)
+.Ft int
 .Fn inchstr "chtype *chars"
 .Ft int
+.Fn mvinchstr(int y, int x, chtype *chstr)
+.Ft int
 .Fn winchstr "WINDOW *win" "chtype *chars"
 .Ft int
+.Ft mvwinchstr(WINDOW *win, int y, int x, chtype *chstr)
+.Ft int
 .Fn innstr "char *str" "int n"
 .Ft int
 .Fn winnstr "WINDOW *win" "char *str" "int n"
@@ -133,6 +145,29 @@
 .Fn inchstr
 function, excepting that the array of characters returned is stripped of all
 the curses attributes making it a plain character string.
+.Pp 
+The 
+.Fn mvinchstr
+,
+.Fn mvinchnstr
+,
+.Fn mvwinchstr
+and 
+.Fn mvwinchnstr
+functions are the same as the
+.Fn inchstr
+,
+.Fn inchnstr
+,
+.Fn winchstr
+and    
+.Fn winchstr
+functions, respectively, except that
+.Fn wmove
+is called to move the cursor to the position specified by 
+.Fa y ,
+.Fa x
+before the output is printed on the window.
 .Pp
 The
 .Fn winnstr
Index: delch.c
===================================================================
RCS file: /cvsroot/src/lib/libcurses/delch.c,v
retrieving revision 1.15
diff -u -r1.15 delch.c
--- delch.c	2001/04/20 12:57:47	1.15
+++ delch.c	2003/05/21 13:26:24
@@ -50,7 +50,7 @@
 #ifndef _CURSES_USE_MACROS
 /*
  * delch --
- *	Do an delete-char on the line, leaving (cury, curx) unchanged.
+ *	Do a delete-char on the line, leaving (cury, curx) unchanged.
  */
 int
 delch(void)
@@ -60,7 +60,7 @@
 
 /*
  * mvdelch --
- *      Do an delete-char on the line at (y, x) on stdscr.
+ *      Do a delete-char on the line at (y, x) on stdscr.
  */
 int
 mvdelch(int y, int x)
@@ -70,7 +70,7 @@
 
 /*
  * mvwdelch --
- *      Do an delete-char on the line at (y, x) of the given window.
+ *      Do a delete-char on the line at (y, x) of the given window.
  */
 int
 mvwdelch(WINDOW *win, int y, int x)
@@ -85,7 +85,7 @@
 
 /*
  * wdelch --
- *	Do an delete-char on the line, leaving (cury, curx) unchanged.
+ *	Do a delete-char on the line, leaving (cury, curx) unchanged.
  */
 int
 wdelch(WINDOW *win)
Index: inch.c
===================================================================
RCS file: /cvsroot/src/lib/libcurses/inch.c,v
retrieving revision 1.5
diff -u -r1.5 inch.c
--- inch.c	2002/01/02 10:38:27	1.5
+++ inch.c	2003/05/21 13:26:25
@@ -88,7 +88,6 @@
 chtype
 winch(WINDOW *win)
 {
-
 	chtype	 ch;
 
 	ch = (chtype) (((win)->lines[(win)->cury]->line[(win)->curx].ch & __CHARTEXT) |
Index: longname.c
===================================================================
RCS file: /cvsroot/src/lib/libcurses/longname.c,v
retrieving revision 1.14
diff -u -r1.14 longname.c
--- longname.c	2001/12/02 09:14:21	1.14
+++ longname.c	2003/05/21 13:26:25
@@ -82,7 +82,7 @@
 
 /*
  * longname --
- *	Return to pointer to the long name of the terminal. 
+ *	Return pointer to the long name of the terminal.
  *	This is the SUS version of longname()
  */
 char	*
Index: resize.c
===================================================================
RCS file: /cvsroot/src/lib/libcurses/resize.c,v
retrieving revision 1.7
diff -u -r1.7 resize.c
--- resize.c	2003/02/17 11:07:21	1.7
+++ resize.c	2003/05/21 13:26:26
@@ -296,4 +296,3 @@
 
 	return OK;
 }
-
Index: scanw.c
===================================================================
RCS file: /cvsroot/src/lib/libcurses/scanw.c,v
retrieving revision 1.17
diff -u -r1.17 scanw.c
--- scanw.c	2002/06/26 18:14:06	1.17
+++ scanw.c	2003/05/21 13:26:26
@@ -82,7 +82,7 @@
 }
 /*
  * mvscanw, mvwscanw --
- *	Implement the mvscanw commands.  Due to the variable number of
+ *	Implement the mvscanw commands.  Due to the varying number of
  *	arguments, they cannot be macros.  Another sigh....
  */
 int
Index: standout.c
===================================================================
RCS file: /cvsroot/src/lib/libcurses/standout.c,v
retrieving revision 1.13
diff -u -r1.13 standout.c
--- standout.c	2003/01/27 21:04:10	1.13
+++ standout.c	2003/05/21 13:26:27
@@ -48,7 +48,7 @@
 #ifndef _CURSES_USE_MACROS
 
 /*
- * standout
+ * standout --
  *	Enter standout mode on stdscr.
  */
 int
@@ -70,8 +70,8 @@
 #endif
 
 /*
- * standout
- *	Enter standout mode.
+ * wstandout --
+ *	Enter standout mode on the specified window.
  */
 int
 wstandout(WINDOW *win)
@@ -87,7 +87,7 @@
 
 /*
  * wstandend --
- *	Exit standout mode.
+ *	Exit standout mode on the specified window.
  */
 int
 wstandend(WINDOW *win)
Index: touchwin.c
===================================================================
RCS file: /cvsroot/src/lib/libcurses/touchwin.c,v
retrieving revision 1.18
diff -u -r1.18 touchwin.c
--- touchwin.c	2003/02/17 11:07:21	1.18
+++ touchwin.c	2003/05/21 13:26:27
@@ -63,7 +63,6 @@
  * Touch count lines starting at start.  This is the SUS v2 compliant
  * version.
  */
-
 int
 touchline(WINDOW *win, int start, int count)
 {
Index: tstp.c
===================================================================
RCS file: /cvsroot/src/lib/libcurses/tstp.c,v
retrieving revision 1.27
diff -u -r1.27 tstp.c
--- tstp.c	2003/05/18 10:02:07	1.27
+++ tstp.c	2003/05/21 13:26:27
@@ -167,7 +167,7 @@
 			 TCSASOFT | TCSADRAIN : TCSADRAIN,
 			 &_cursesi_screen->save_termios);
 
-	/* Restore colours */
+	/* Restore colors */
 	__restore_colors();
 
 	/* Reset meta */
Index: tty.c
===================================================================
RCS file: /cvsroot/src/lib/libcurses/tty.c,v
retrieving revision 1.32
diff -u -r1.32 tty.c
--- tty.c	2003/04/05 10:07:00	1.32
+++ tty.c	2003/05/21 13:26:29
@@ -166,6 +166,10 @@
 	    TCSASOFT | TCSADRAIN : TCSADRAIN, screen->curt) ? ERR : OK);
 }
 
+/*
+ * raw --
+ *	Put the terminal into raw mode
+ */
 int
 raw(void)
 {
@@ -185,6 +189,10 @@
 			  _cursesi_screen->curt) ? ERR : OK);
 }
 
+/*
+ * noraw --
+ *	Put the terminal into cooked mode
+ */
 int
 noraw(void)
 {
@@ -204,6 +212,10 @@
 			  _cursesi_screen->curt) ? ERR : OK);
 }
 
+/*
+ * cbreak --
+ *	Put the terminal into cbreak mode
+ */
 int
 cbreak(void)
 {
@@ -224,6 +236,10 @@
 			  _cursesi_screen->curt) ? ERR : OK);
 }
 
+/*
+ * nocbreak --
+ *	Disable cbreak mode
+ */
 int
 nocbreak(void)
 {
@@ -569,7 +585,6 @@
 /*
  * erasechar --
  *     Return the character of the erase key.
- *
  */
 char
 erasechar(void)
Index: underscore.c
===================================================================
RCS file: /cvsroot/src/lib/libcurses/underscore.c,v
retrieving revision 1.7
diff -u -r1.7 underscore.c
--- underscore.c	2003/01/27 21:04:10	1.7
+++ underscore.c	2003/05/21 13:26:29
@@ -47,7 +47,7 @@
 #ifndef _CURSES_USE_MACROS
 
 /*
- * underscore
+ * underscore --
  *	Enter underscore mode on stdscr.
  */
 int
@@ -70,8 +70,8 @@
 #endif
 
 /*
- * wunderscore
- *	Enter underscore mode.
+ * wunderscore --
+ *	Enter underscore mode on the specified window.
  */
 int
 wunderscore(WINDOW *win)
@@ -88,7 +88,7 @@
 
 /*
  * wunderend --
- *	Exit underscore mode.
+ *	Exit underscore mode on the specified window.
  */
 int
 wunderend(WINDOW *win)
	
>Release-Note:
>Audit-Trail:
>Unformatted: