]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - man/curs_clear.3x
ncurses 6.5 - patch 20240525
[ncurses.git] / man / curs_clear.3x
index d59b321adb6a5e8d7880f60620952ce3f4eb7179..66d84582d78f8d82dde1b90306b15ff777d9b2be 100644 (file)
@@ -1,5 +1,5 @@
 .\"***************************************************************************
-.\" Copyright 2018-2022,2023 Thomas E. Dickey                                *
+.\" Copyright 2018-2023,2024 Thomas E. Dickey                                *
 .\" Copyright 1998-2010,2016 Free Software Foundation, Inc.                  *
 .\"                                                                          *
 .\" Permission is hereby granted, free of charge, to any person obtaining a  *
 .\" authorization.                                                           *
 .\"***************************************************************************
 .\"
-.\" $Id: curs_clear.3x,v 1.37 2023/09/30 21:38:11 tom Exp $
-.TH curs_clear 3X 2023-09-30 "ncurses 6.4" "Library calls"
+.\" $Id: curs_clear.3x,v 1.50 2024/05/25 20:10:58 tom Exp $
+.TH curs_clear 3X 2024-05-25 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls"
+.ie \n(.g \{\
+.ds `` \(lq
+.ds '' \(rq
+.\}
+.el \{\
+.ie t .ds `` ``
+.el   .ds `` ""
+.ie t .ds '' ''
+.el   .ds '' ""
+.\}
+.
 .de bP
 .ie n  .IP \(bu 4
 .el    .IP \(bu 2
 \fB\%wclrtoeol\fP \-
 clear all or part of a \fIcurses\fR window
 .SH SYNOPSIS
-\fB#include <curses.h>\fP
-.sp
-\fBint erase(void);\fP
-.br
-\fBint werase(WINDOW *\fIwin\fB);\fR
-.sp
-\fBint clear(void);\fP
-.br
-\fBint wclear(WINDOW *\fIwin\fB);\fR
-.sp
-\fBint clrtobot(void);\fP
-.br
-\fBint wclrtobot(WINDOW *\fIwin\fB);\fR
-.sp
-\fBint clrtoeol(void);\fP
-.br
-\fBint wclrtoeol(WINDOW *\fIwin\fB);\fR
+.nf
+\fB#include <curses.h>
+.PP
+\fBint erase(void);
+\fBint werase(WINDOW *\fIwin\fP);
+.PP
+\fBint clear(void);
+\fBint wclear(WINDOW *\fIwin\fP);
+.PP
+\fBint clrtobot(void);
+\fBint wclrtobot(WINDOW *\fIwin\fP);
+.PP
+\fBint clrtoeol(void);
+\fBint wclrtoeol(WINDOW *\fIwin\fP);
+.fi
 .SH DESCRIPTION
-.SS erase/werase
+.SS "erase, werase"
 The \fBerase\fP and \fBwerase\fP routines copy blanks to every
 position in the window, clearing the screen.
 .PP
 Blanks created by erasure have the current background rendition (as set
 by \fBwbkgdset\fP(3X)) merged into them.
-.SS clear/wclear
+.SS "clear, wclear"
 The \fBclear\fP and \fBwclear\fP routines are like \fBerase\fP and
 \fBwerase\fP, but they also call \fBclearok\fP(3X), so that the screen is
 cleared completely on the next call to \fBwrefresh\fP for that window
 and repainted from scratch.
-.SS clrtobot/wclrtobot
+.SS "clrtobot, wclrtobot"
 The \fBclrtobot\fP and \fBwclrtobot\fP 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.
-.SS clrtoeol/wclrtoeol
+.SS "clrtoeol, wclrtoeol"
 The \fBclrtoeol\fP and \fBwclrtoeol\fP routines erase the current line
 to the right of the cursor, inclusive, to the end of the current line.
 .SH RETURN VALUE
@@ -87,7 +96,9 @@ All routines return the integer \fBOK\fP on success and \fBERR\fP on failure.
 X/Open defines no error conditions.
 In this implementation,
 .bP
-functions using a window pointer parameter return an error if it is null
+functions using a window pointer parameter return
+.B ERR
+if it is null
 .bP
 \fBwclrtoeol\fP returns an error
 if the cursor position is about to wrap.
@@ -95,13 +106,10 @@ if the cursor position is about to wrap.
 Note that \fBerase\fP, \fBwerase\fP, \fBclear\fP, \fBwclear\fP,
 \fBclrtobot\fP, and \fBclrtoeol\fP may be macros.
 .SH PORTABILITY
-These functions are described in the XSI Curses standard, Issue 4.
-The
-standard specifies that they return \fBERR\fP on failure, but specifies no
-error conditions.
+These functions are described in X/Open Curses, Issue 4.
 .PP
-The SVr4.0 manual says that these functions could
-return "a non-negative integer if \fBimmedok\fP(3X) is set",
+The SVr4.0 manual says that these functions could return
+\*(``or a non-negative integer if \fB\%immedok\fP is set\*('',
 referring to the return-value of \fBwrefresh\fP.
 In that implementation, \fBwrefresh\fP would return a count of
 the number of characters written to the terminal.
@@ -110,7 +118,7 @@ Some historic curses implementations had, as an undocumented feature, the
 ability to do the equivalent of \fBclearok(..., 1)\fP by saying
 \fBtouchwin(stdscr)\fP or \fBclear(stdscr)\fP.
 This will not work under
-ncurses.
+\fI\%ncurses\fP.
 .PP
 This implementation, and others such as Solaris,
 sets the current position to 0,0 after erasing