path: root/contrib/ncurses/man/curs_clear.3x
diff options
Diffstat (limited to 'contrib/ncurses/man/curs_clear.3x')
1 files changed, 32 insertions, 11 deletions
diff --git a/contrib/ncurses/man/curs_clear.3x b/contrib/ncurses/man/curs_clear.3x
index d08e852a27b1..fa7723af4fe8 100644
--- a/contrib/ncurses/man/curs_clear.3x
+++ b/contrib/ncurses/man/curs_clear.3x
@@ -1,5 +1,5 @@
-.\" Copyright (c) 1998 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998,2005 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 *
@@ -26,15 +26,24 @@
.\" authorization. *
-.\" $Id: curs_clear.3x,v 1.7 1998/03/11 21:12:53 juergen Exp $
+.\" $Id: curs_clear.3x,v 1.10 2005/10/01 19:34:43 tom Exp $
.TH curs_clear 3X ""
+.hy 0
-\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
\fB# include <curses.h>\fR
\fBint erase(void);\fR
\fBint werase(WINDOW *win);\fR
@@ -54,24 +63,29 @@
The \fBerase\fR and \fBwerase\fR routines copy blanks to every
position in the window, clearing the screen.
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.
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.
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.
Blanks created by erasure have the current background rendition (as set
by \fBwbkgdset\fR) merged into them.
-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.
+X/Open defines no error conditions.
+In this implementation,
+functions using a window pointer parameter return an error if it is null.
Note that \fBerase\fR, \fBwerase\fR, \fBclear\fR, \fBwclear\fR,
\fBclrtobot\fR, and \fBclrtoeol\fR may be macros.
@@ -79,11 +93,18 @@ 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.
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
+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.
\fBcurses\fR(3X), \fBcurs_outopts\fR(3X), \fBcurs_refresh\fR(3X)