| 1 |
.\"*************************************************************************** |
| 2 |
.\" Copyright 2018-2024,2025 Thomas E. Dickey * |
| 3 |
.\" Copyright 1998-2006,2010 Free Software Foundation, Inc. * |
| 4 |
.\" * |
| 5 |
.\" Permission is hereby granted, free of charge, to any person obtaining a * |
| 6 |
.\" copy of this software and associated documentation files (the * |
| 7 |
.\" "Software"), to deal in the Software without restriction, including * |
| 8 |
.\" without limitation the rights to use, copy, modify, merge, publish, * |
| 9 |
.\" distribute, distribute with modifications, sublicense, and/or sell * |
| 10 |
.\" copies of the Software, and to permit persons to whom the Software is * |
| 11 |
.\" furnished to do so, subject to the following conditions: * |
| 12 |
.\" * |
| 13 |
.\" The above copyright notice and this permission notice shall be included * |
| 14 |
.\" in all copies or substantial portions of the Software. * |
| 15 |
.\" * |
| 16 |
.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * |
| 17 |
.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * |
| 18 |
.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * |
| 19 |
.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * |
| 20 |
.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * |
| 21 |
.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * |
| 22 |
.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * |
| 23 |
.\" * |
| 24 |
.\" Except as contained in this notice, the name(s) of the above copyright * |
| 25 |
.\" holders shall not be used in advertising or otherwise to promote the * |
| 26 |
.\" sale, use or other dealings in this Software without prior written * |
| 27 |
.\" authorization. * |
| 28 |
.\"*************************************************************************** |
| 29 |
.\" |
| 30 |
.\" $Id: curs_delch.3x,v 1.49 2025/04/05 21:59:53 tom Exp $ |
| 31 |
.TH delch 3NCURSES 2025-04-05 "ncurses 6.6" "Library calls" |
| 32 |
.ie \n(.g \{\ |
| 33 |
.ds `` \(lq |
| 34 |
.ds '' \(rq |
| 35 |
.\} |
| 36 |
.el \{\ |
| 37 |
.ie t .ds `` `` |
| 38 |
.el .ds `` "" |
| 39 |
.ie t .ds '' '' |
| 40 |
.el .ds '' "" |
| 41 |
.\} |
| 42 |
. |
| 43 |
.de bP |
| 44 |
.ie n .IP \(bu 4 |
| 45 |
.el .IP \(bu 2 |
| 46 |
.. |
| 47 |
.SH NAME |
| 48 |
\fB\%delch\fP, |
| 49 |
\fB\%wdelch\fP, |
| 50 |
\fB\%mvdelch\fP, |
| 51 |
\fB\%mvwdelch\fP \- |
| 52 |
delete a character from a \fIcurses\fR window |
| 53 |
.SH SYNOPSIS |
| 54 |
.nf |
| 55 |
\fB#include <curses.h> |
| 56 |
.PP |
| 57 |
\fBint delch(void); |
| 58 |
\fBint wdelch(WINDOW * \fIwin\fP); |
| 59 |
\fBint mvdelch(int \fIy\fP, int \fIx\fP); |
| 60 |
\fBint mvwdelch(WINDOW * \fIwin\fP, int \fIy\fP, int \fIx\fP); |
| 61 |
.fi |
| 62 |
.SH DESCRIPTION |
| 63 |
.B \%wdelch |
| 64 |
deletes the character at the cursor position in |
| 65 |
.IR win . |
| 66 |
It moves all characters to the right of the cursor on the same line to |
| 67 |
the left one position and replaces the contents of the rightmost |
| 68 |
position on the line with the window's background character; |
| 69 |
see \fB\%bkgd\fP(3NCURSES) |
| 70 |
(wide-character API users: \fB\%bkgrnd\fP(3NCURSES)). |
| 71 |
The cursor position does not change |
| 72 |
(after moving to |
| 73 |
.RI ( y , |
| 74 |
.IR x ), |
| 75 |
if specified). |
| 76 |
\fB\%ncurses\fP(3NCURSES) describes the variants of this function. |
| 77 |
.SH RETURN VALUE |
| 78 |
These functions return |
| 79 |
.B OK |
| 80 |
on success and |
| 81 |
.B ERR |
| 82 |
on failure. |
| 83 |
.PP |
| 84 |
In |
| 85 |
.IR \%ncurses , |
| 86 |
these functions fail if |
| 87 |
.bP |
| 88 |
the |
| 89 |
.I curses |
| 90 |
screen has not been initialized, |
| 91 |
or |
| 92 |
.bP |
| 93 |
(for functions taking a |
| 94 |
.I \%WINDOW |
| 95 |
pointer argument) |
| 96 |
.I win |
| 97 |
is a null pointer. |
| 98 |
.PP |
| 99 |
Functions prefixed with \*(``mv\*('' first perform cursor movement and |
| 100 |
fail if the position |
| 101 |
.RI ( y , |
| 102 |
.IR x ) |
| 103 |
is outside the window boundaries. |
| 104 |
.SH NOTES |
| 105 |
.BR \%delch , |
| 106 |
.BR \%mvdelch , |
| 107 |
and |
| 108 |
.B \%mvwdelch |
| 109 |
may be implemented as macros. |
| 110 |
.PP |
| 111 |
A terminal's |
| 112 |
.B \%delete_character |
| 113 |
.RB ( dch1 ) |
| 114 |
capability |
| 115 |
is not necessarily employed. |
| 116 |
.SH PORTABILITY |
| 117 |
X/Open Curses Issue\ 4 describes these functions. |
| 118 |
It specifies no error conditions for them. |
| 119 |
.PP |
| 120 |
SVr4 describes a successful return value only as |
| 121 |
\*(``an integer value other than |
| 122 |
.IR ERR \*(''. \" Courier roman in source; SVID 4, vol. 3, p. 489 |
| 123 |
.SH HISTORY |
| 124 |
SVr2 (1984) introduced |
| 125 |
.IR \%wdelch "." |
| 126 |
.SH SEE ALSO |
| 127 |
\fB\%ncurses\fP(3NCURSES) |