erase(3ncurses)


NAME

   erase, werase, clear, wclear, clrtobot, wclrtobot, clrtoeol, wclrtoeol
   - clear all or part of a curses window

SYNOPSIS

   # include <curses.h>

   int erase(void);
   int werase(WINDOW *win);
   int clear(void);
   int wclear(WINDOW *win);
   int clrtobot(void);
   int wclrtobot(WINDOW *win);
   int clrtoeol(void);
   int wclrtoeol(WINDOW *win);

DESCRIPTION

   The erase and werase routines copy blanks  to  every  position  in  the
   window, clearing the screen.

   The  clear and wclear routines are like erase and werase, but they also
   call clearok, so that the screen is cleared completely on the next call
   to wrefresh for that window and repainted from scratch.

   The clrtobot and wclrtobot 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 clrtoeol and wclrtoeol 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 wbkgdset) merged into them.

RETURN VALUE

   All routines return the integer OK on success and ERR on failure.   The
   SVr4.0  manual  says "or a non-negative integer if immedok 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.

NOTES

   Note  that  erase, werase, clear, wclear, clrtobot, and clrtoeol may be
   macros.

PORTABILITY

   These functions are described in the XSI Curses standard, Issue 4.  The
   standard  specifies  that  they return ERR on failure, but specifies no
   error conditions.

   Some historic curses implementations had, as an  undocumented  feature,
   the  ability  to  do  the  equivalent  of  clearok(...,  1)  by  saying
   touchwin(stdscr) or clear(stdscr).  This will not work under ncurses.

   This implementation, and others  such  as  Solaris,  sets  the  current
   position  to 0,0 after erasing via werase() and wclear().  That fact is
   not documented in  other  implementations,  and  may  not  be  true  of
   implementations which were not derived from SVr4 source.

   Not obvious from the description, most implementations clear the screen
   after wclear even for a subwindow or derived window.   If  you  do  not
   want to clear the screen during the next wrefresh, use werase instead.

SEE ALSO

   ncurses(3NCURSES),         outopts(3NCURSES),        refresh(3NCURSES),
   curses_variables(3NCURSES)

                                                           clear(3NCURSES)


More Linux Commands

manpages/XtAppGetErrorDatabase.3.html
XtAppGetErrorDatabase(3) - obtain error database (Man Page)
The XtAppGetErrorDatabase function returns the address of the error database. The Intrinsics do a lazy binding of the error database and do not merge in the dat

manpages/fmaxf.3.html
fmaxf(3) - determine maximum of two floating-point numbers
These functions return the larger value of x and y. RETURN VALUE These functions return the maximum of x and y. If one argument is a NaN, the other argument is

manpages/XF86VidModeGetGammaRampSize.3.html
XF86VidModeGetGammaRampSize(3) - Extension library for the X
These functions provide an interface to the server extension XFree86-VidModeExtension which allows the video modes to be queried and adjusted dynamically and mo

manpages/XeviQueryExtension.3.html
XeviQueryExtension(3) - X Extended Visual Information functi
The X11 Extended Visual Information extension (EVI) allows a client to determine information about core X visuals beyond what the core protocol provides. The EV

manpages/nice.1.html
nice(1) - run a program with modified scheduling priority...
Run COMMAND with an adjusted niceness, which affects process scheduling. With no COMMAND, print the current niceness. Niceness values range from -20 (most favor

manpages/Tk_GetAnchorFromObj.3.html
Tk_GetAnchorFromObj(3) - translate between strings and ancho
Tk_GetAnchorFromObj places in *anchorPtr an anchor position (enumerated type Tk_Anchor) corresponding to objPtrs value. The result will be one of TK_ANCHOR_N, T

manpages/pattern.3menu.html
pattern(3menu) - get and set a menu's pattern buffer........
Every menu has an associated pattern match buffer. As input events that are printable characters come in, they are appended to this match buffer and tested for

manpages/podofogc.1.html
podofogc(1) Garbage collection in a PDF file. (Man Page)....
podofogc is one of the command line tools from the PoDoFo library that provide several useful operations to work with PDF files. It can perform a garbage collec

manpages/XmbufGetBufferAttributes.3.html
XmbufGetBufferAttributes(3) - X multibuffering functions....
The application programming library for the X11 Double-Buffering, Multi-Buffering, and Stereo Extension contains the interfaces described below. With the except

manpages/postlog.1.html
postlog(1) - Postfix-compatible logging utility (Man Page)
The postlog(1) command implements a Postfix-compatible logging interface for use in, for example, shell scripts. By default, postlog(1) logs the text given on t

manpages/tcpdchk.8.html
tcpdchk(8) - tcp wrapper configuration checker (Man Page)...
tcpdchk examines your tcp wrapper configuration and reports all potential and real problems it can find. The program examines the tcpd access control files (by

manpages/asn1_octet_der.3.html
asn1_octet_der(3) - API function (Library - Linux man page)
Creates a length-value DER encoding for the input data. The DER encoding of the input data will be placed in the der variable. Note that the OCTET STRING tag is





We can't live, work or learn in freedom unless the software we use is free.