Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libcurses Clarify the getch() family return values.
details: https://anonhg.NetBSD.org/src/rev/5e0f33753387
branches: trunk
changeset: 559783:5e0f33753387
user: jdc <jdc%NetBSD.org@localhost>
date: Tue Mar 23 21:53:34 2004 +0000
description:
Clarify the getch() family return values.
Add (missing) mvgetch() and mvwgetch().
diffstat:
lib/libcurses/curses_input.3 | 34 ++++++++++++++++++++++++----------
1 files changed, 24 insertions(+), 10 deletions(-)
diffs (83 lines):
diff -r 7452f7109eb4 -r 5e0f33753387 lib/libcurses/curses_input.3
--- a/lib/libcurses/curses_input.3 Tue Mar 23 21:35:29 2004 +0000
+++ b/lib/libcurses/curses_input.3 Tue Mar 23 21:53:34 2004 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: curses_input.3,v 1.15 2004/03/22 18:57:10 jdc Exp $
+.\" $NetBSD: curses_input.3,v 1.16 2004/03/23 21:53:34 jdc Exp $
.\"
.\" Copyright (c) 2002
.\" Brett Lymn (blymn%NetBSD.org@localhost, brett_lymn%yahoo.com.au@localhost)
@@ -30,13 +30,15 @@
.\" SUCH DAMAGE.
.\"
.\"
-.Dd February 24, 2004
+.Dd March 23, 2004
.Dt CURSES_INPUT 3
.Os
.Sh NAME
.Nm curses_input ,
.Nm getch ,
.Nm wgetch ,
+.Nm mvgetch ,
+.Nm mvwgetch ,
.Nm define_key ,
.Nm keyok ,
.Nm getnstr ,
@@ -63,6 +65,10 @@
.Ft int
.Fn wgetch "WINDOW *win"
.Ft int
+.Fn mvgetch "int y" "int x" "void"
+.Ft int
+.Fn mvwgetch "WINDOW *win" "int y" "int x"
+.Ft int
.Fn keyok "int key_symbol" "bool flag"
.Ft int
.Fn define_key "char *sequence" "int key_symbol"
@@ -367,11 +373,18 @@
Only one character of push-back is guaranteed to work, more may be possible
depending on system resources.
.Sh RETURN VALUES
-If
+The functions
+.Fn getch ,
+.Fn wgetch ,
+.Fn mvgetch
+and
+.Fn mvwgetch
+will return the value of the key pressed or
+.Dv ERR
+in the case of an error or a timeout.
+Additionally, if
.Fn keypad TRUE
-has been called on a window, then
-.Fn getch
-may return one of the following values:
+has been called on a window, then they may return one of the following values:
.Pp
.Bl -column "Termcap entry" "getch Return Value" "Key Function" -offset indent
.It Sy "Termcap entry" Ta Sy "getch Return Value" Ta Sy "Key Function"
@@ -531,10 +544,7 @@
listed above nor are termcap entries normally configured with all the
above capabilities defined.
.Pp
-Functions returning pointers will return
-.Dv NULL
-if an error is detected.
-The functions that return an int will return one of the following
+Other functions that return an int will return one of the following
values:
.Pp
.Bl -tag -width ERR -compact
@@ -543,6 +553,10 @@
.It Er ERR
An error occurred in the function.
.El
+.Pp
+Functions returning pointers will return
+.Dv NULL
+if an error is detected.
.Sh SEE ALSO
.Xr curses_cursor 3 ,
.Xr curses_keyname 3 ,
Home |
Main Index |
Thread Index |
Old Index