1.\" $NetBSD: curses_clear.3,v 1.3 2003/04/16 13:35:00 wiz Exp $ 2.\" 3.\" Copyright (c) 2002 4.\" Brett Lymn (blymn@NetBSD.org, brett_lymn@yahoo.com.au) 5.\" 6.\" This code is donated to the NetBSD Foundation by the Author. 7.\" 8.\" Redistribution and use in source and binary forms, with or without 9.\" modification, are permitted provided that the following conditions 10.\" are met: 11.\" 1. Redistributions of source code must retain the above copyright 12.\" notice, this list of conditions and the following disclaimer. 13.\" 2. Redistributions in binary form must reproduce the above copyright 14.\" notice, this list of conditions and the following disclaimer in the 15.\" documentation and/or other materials provided with the distribution. 16.\" 3. The name of the Author may not be used to endorse or promote 17.\" products derived from this software without specific prior written 18.\" permission. 19.\" 20.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND 21.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE 24.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30.\" SUCH DAMAGE. 31.\" 32.\" 33.Dd August 12, 2002 34.Dt CURSES_CLEAR 3 35.Os 36.Sh NAME 37.Nm curses_clear , 38.Nm clear , 39.Nm wclear , 40.Nm clearok , 41.Nm clrtobot , 42.Nm clrtoeol , 43.Nm erase , 44.Nm werase , 45.Nm wclrtobot , 46.Nm wclrtoeol 47.Nd curses clear window routines 48.Sh LIBRARY 49.Lb libcurses 50.Sh SYNOPSIS 51.In curses.h 52.Ft int 53.Fn clear "void" 54.Ft int 55.Fn clearok "WINDOW *win" "bool flag" 56.Ft int 57.Fn clrtobot "void" 58.Ft int 59.Fn clrtoeol "void" 60.Ft int 61.Fn erase "void" 62.Ft int 63.Fn wclear "WINDOW *win" 64.Ft int 65.Fn werase "WINDOW *win" 66.Ft int 67.Fn wclrtobot "WINDOW *win" 68.Ft int 69.Fn wclrtoeol "WINDOW *win" 70.Sh DESCRIPTION 71These functions clear all or part of 72.Dv stdscr 73or of the specified window. 74.Pp 75The 76.Fn clear 77and 78.Fn erase 79functions erase all characters on 80.Dv stdscr . 81.Fn wclear 82and 83.Fn werase 84perform the same function as 85.Fn clear 86and 87.Fn erase , 88respectively, excepting that the specified window is cleared. 89.Pp 90By setting 91.Fa flag 92to 93.Dv TRUE , 94the 95.Fn clearok 96function is used to force the next call to 97.Fn wrefresh 98to clear and completely redraw the window given in 99.Fa win . 100.Pp 101The function 102.Fn clrtobot 103will clear 104.Dv stdscr 105from the current row to the bottom of the screen. 106.Fn clrtoeol 107will clear 108.Dv stdscr 109from the current column position to the end of the line. 110.Fn wclrtobot 111and 112.Fn wclrtoeol 113are the same as 114.Fn clrtobot 115and 116.Fn clrtoeol , 117respectively, excepting the window specified is operated on instead of 118.Dv stdscr . 119.Sh RETURN VALUES 120Functions returning pointers will return 121.Dv NULL 122if an error is detected. 123The functions that return an int will return one of the following 124values: 125.Pp 126.Bl -tag -width ERR -compact 127.It Er OK 128The function completed successfully. 129.It Er ERR 130An error occurred in the function. 131.El 132.Sh SEE ALSO 133.Xr curses_refresh 3 134.Sh STANDARDS 135The 136.Nx 137Curses library complies with the X/Open Curses specification, part of the 138Single Unix Specification. 139.Sh HISTORY 140The Curses package appeared in 141.Bx 4.0 . 142