2 <BODY BGCOLOR="#99ccbb" TEXT="#000000" LINK="#4060b0" VLINK="#000080" ALINK="#ff4040">
4 <STRONG>erase</STRONG>, <STRONG>werase</STRONG>, <STRONG>clear</STRONG>, <STRONG>wclear</STRONG>, <STRONG>clrtobot</STRONG>, <STRONG>wclrtobot</STRONG>, <STRONG>clr-</STRONG>
5 <STRONG>toeol</STRONG>, <STRONG>wclrtoeol</STRONG> - clear all or part of a <STRONG>curses</STRONG> window
10 <STRONG>#</STRONG> <STRONG>include</STRONG> <STRONG><curses.h></STRONG>
12 <STRONG>int</STRONG> <STRONG>erase(void);</STRONG>
13 <STRONG>int</STRONG> <STRONG>werase(WINDOW</STRONG> <STRONG>*win);</STRONG>
14 <STRONG>int</STRONG> <STRONG>clear(void);</STRONG>
15 <STRONG>int</STRONG> <STRONG>wclear(WINDOW</STRONG> <STRONG>*win);</STRONG>
16 <STRONG>int</STRONG> <STRONG>clrtobot(void);</STRONG>
17 <STRONG>int</STRONG> <STRONG>wclrtobot(WINDOW</STRONG> <STRONG>*win);</STRONG>
18 <STRONG>int</STRONG> <STRONG>clrtoeol(void);</STRONG>
19 <STRONG>int</STRONG> <STRONG>wclrtoeol(WINDOW</STRONG> <STRONG>*win);</STRONG>
23 <H2>DESCRIPTION</H2><PRE>
24 The <STRONG>erase</STRONG> and <STRONG>werase</STRONG> routines copy blanks to every posi-
25 tion in the window, clearing the screen.
27 The <STRONG>clear</STRONG> and <STRONG>wclear</STRONG> routines are like <STRONG>erase</STRONG> and <STRONG>werase</STRONG>,
28 but they also call <STRONG>clearok</STRONG>, so that the screen is cleared
29 completely on the next call to <STRONG>wrefresh</STRONG> for that window
30 and repainted from scratch.
32 The <STRONG>clrtobot</STRONG> and <STRONG>wclrtobot</STRONG> routines erase from the cursor
33 to the end of screen. That is, they erase all lines below
34 the cursor in the window. Also, the current line to the
35 right of the cursor, inclusive, is erased.
37 The <STRONG>clrtoeol</STRONG> and <STRONG>wclrtoeol</STRONG> routines erase the current line
38 to the right of the cursor, inclusive, to the end of the
41 Blanks created by erasure have the current background ren-
42 dition (as set by <STRONG>wbkgdset</STRONG>) merged into them.
46 <H2>RETURN VALUE</H2><PRE>
47 All routines return the integer <STRONG>OK</STRONG>. The SVr4.0 manual
48 says "or a non-negative integer if <STRONG>immedok</STRONG> is set", but
49 this appears to be an error.
54 Note that <STRONG>erase</STRONG>, <STRONG>werase</STRONG>, <STRONG>clear</STRONG>, <STRONG>wclear</STRONG>, <STRONG>clrtobot</STRONG>, and <STRONG>clr-</STRONG>
55 <STRONG>toeol</STRONG> may be macros.
59 <H2>PORTABILITY</H2><PRE>
60 These functions are described in the XSI Curses standard,
61 Issue 4. The standard specifies that they return <STRONG>ERR</STRONG> on
62 failure, but specifies no error conditions.
64 Some historic curses implementations had, as an undocu-
65 mented feature, the ability to do the equivalent of
69 <H2>SEE ALSO</H2><PRE>
70 <STRONG><A HREF="ncurses.3x.html">curses(3X)</A></STRONG>, <STRONG><A HREF="curs_outopts.3x.html">curs_outopts(3X)</A></STRONG>, <STRONG><A HREF="curs_refresh.3x.html">curs_refresh(3X)</A></STRONG>