summaryrefslogtreecommitdiff
path: root/lib/libcurses/curs_clear.3
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2010-01-12 23:22:15 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2010-01-12 23:22:15 +0000
commit6ee254699bf787d78835419be2b3241fb037d444 (patch)
tree07fe67dab517e4990f344fe2c00e65cef4d25b81 /lib/libcurses/curs_clear.3
parent0b62f5dc36fc7203a74cdc812c4234ae188fdfd2 (diff)
Update to ncurses 5.7, with local changes reapplied.
This is around eight years worth of changes (previously we were around ncurses 5.2), too many to list - many bug fixes and also a few new functions. A major bump for libcurses, libpanel, libform and libmenu. ok deraadt
Diffstat (limited to 'lib/libcurses/curs_clear.3')
-rw-r--r--lib/libcurses/curs_clear.351
1 files changed, 39 insertions, 12 deletions
diff --git a/lib/libcurses/curs_clear.3 b/lib/libcurses/curs_clear.3
index 063e709e717..cdf6af8dd70 100644
--- a/lib/libcurses/curs_clear.3
+++ b/lib/libcurses/curs_clear.3
@@ -1,7 +1,7 @@
-.\" $OpenBSD: curs_clear.3,v 1.6 1998/09/13 19:16:17 millert Exp $
+.\" $OpenBSD: curs_clear.3,v 1.7 2010/01/12 23:21:59 nicm Exp $
.\"
.\"***************************************************************************
-.\" Copyright (c) 1998 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2005,2007 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -28,15 +28,24 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $From: curs_clear.3x,v 1.7 1998/03/11 21:12:53 juergen Exp $
+.\" $Id: curs_clear.3,v 1.7 2010/01/12 23:21:59 nicm Exp $
.TH curs_clear 3 ""
+.na
+.hy 0
.SH NAME
-\fBerase\fR, \fBwerase\fR, \fBclear\fR,
-\fBwclear\fR, \fBclrtobot\fR, \fBwclrtobot\fR, \fBclrtoeol\fR,
+\fBerase\fR,
+\fBwerase\fR,
+\fBclear\fR,
+\fBwclear\fR,
+\fBclrtobot\fR,
+\fBwclrtobot\fR,
+\fBclrtoeol\fR,
\fBwclrtoeol\fR - clear all or part of a \fBcurses\fR window
+.ad
+.hy
.SH SYNOPSIS
\fB# include <curses.h>\fR
-
+.sp
\fBint erase(void);\fR
.br
\fBint werase(WINDOW *win);\fR
@@ -56,24 +65,29 @@
.SH DESCRIPTION
The \fBerase\fR and \fBwerase\fR routines copy blanks to every
position in the window, clearing the screen.
-
+.PP
The \fBclear\fR and \fBwclear\fR routines are like \fBerase\fR and
\fBwerase\fR, but they also call \fBclearok\fR, so that the screen is
cleared completely on the next call to \fBwrefresh\fR for that window
and repainted from scratch.
-
+.PP
The \fBclrtobot\fR and \fBwclrtobot\fR routines erase from the cursor to the
end of screen. That is, they erase all lines below the cursor in the window.
Also, the current line to the right of the cursor, inclusive, is erased.
-
+.PP
The \fBclrtoeol\fR and \fBwclrtoeol\fR routines erase the current line
to the right of the cursor, inclusive, to the end of the current line.
-
+.PP
Blanks created by erasure have the current background rendition (as set
by \fBwbkgdset\fR) merged into them.
.SH RETURN VALUE
-All routines return the integer \fBOK\fR. The SVr4.0 manual says "or a
+All routines return the integer \fBOK\fR on success and \fBERR\fP on failure.
+The SVr4.0 manual says "or a
non-negative integer if \fBimmedok\fR is set", but this appears to be an error.
+.PP
+X/Open defines no error conditions.
+In this implementation,
+functions using a window pointer parameter return an error if it is null.
.SH NOTES
Note that \fBerase\fR, \fBwerase\fR, \fBclear\fR, \fBwclear\fR,
\fBclrtobot\fR, and \fBclrtoeol\fR may be macros.
@@ -81,11 +95,24 @@ Note that \fBerase\fR, \fBwerase\fR, \fBclear\fR, \fBwclear\fR,
These functions are described in the XSI Curses standard, Issue 4. The
standard specifies that they return \fBERR\fR on failure, but specifies no
error conditions.
-
+.PP
Some historic curses implementations had, as an undocumented feature, the
ability to do the equivalent of \fBclearok(..., 1)\fR by saying
\fBtouchwin(stdscr)\fR or \fBclear(stdscr)\fR. This will not work under
ncurses.
+.PP
+This implementation, and others such as Solaris,
+sets the current position to 0,0 after erasing
+via \fBwerase()\fP and \fBwclear()\fP.
+That fact is not documented in other implementations,
+and may not be true of implementations
+which were not derived from SVr4 source.
+.PP
+Not obvious from the description,
+most implementations clear the screen after \fBwclear\fP
+even for a subwindow or derived window.
+If you do not want to clear the screen during the next \fBwrefresh\fP,
+use \fBwerase\fP instead.
.SH SEE ALSO
\fBcurses\fR(3), \fBcurs_outopts\fR(3), \fBcurs_refresh\fR(3)
.\"#