curs_delch(3X)
π curs_delch(3X) π
okay bestie, this is a library call page from the ncurses manual β the 3X bit at the end just means "section 3, X11/curses flavour," iykyk β¨
πΈ NAME πΈ
delch, wdelch, mvdelch, mvwdelch β delete a character from a curses window π
β¨ SYNOPSIS β¨
#include <curses.h>
int delch(void);
int wdelch(WINDOW * win);
int mvdelch(int y, int x);
int mvwdelch(WINDOW * win, int y, int x);
π¦ DESCRIPTION π¦
so here's the vibe: wdelch deletes the character sitting at the cursor position in win. π―
then β and this is the part people forget β it moves all the characters to the right of the cursor on the same line one position to the left. and the rightmost position on that line? it gets replaced with the window's background character. see bkgd(3X) for that (and if you're on the wide-character API, it's bkgrnd(3X) instead π).
the cursor position does not change β well, after moving to (y, x) if you specified one, that is. don't be out here expecting it to scoot over or anything.
ncurses(3X) is where you go to read about all the variants of this function, fr fr. π
π RETURN VALUE π
these functions return OK on success and ERR on failure. simple as that, no cap. β
β
in ncurses, these functions fail if:
- the curses screen has not been initialized, or
- (for the ones taking a
WINDOWpointer argument) win is a null pointer.
and the ones prefixed with "mv" do cursor movement first, and they fail if the position (y, x) is outside the window boundaries. π
π NOTES π
delch,mvdelch, andmvwdelchmay be implemented as macros. so don't go doing anything cursed with them like taking their address, bestie. π- a terminal's
delete_character(dch1) capability is not necessarily employed. like, it might not get used at all. just so you know. π€·
π PORTABILITY π
X/Open Curses Issue 4 describes these functions. and it specifies no error conditions for them. iconic of it.
SVr4 describes a successful return value only as "an integer value other than ERR". that's it. that's the whole description. very demure, very minimal. π
β HISTORY β
SVr2 (1984) introduced wdelch. π°οΈ a true vintage queen.
π«Ά SEE ALSO π«Ά
curses(3X)
and that's the whole page, bestie!! this one's from ncurses 6.6, dated 2025-04-05 β go forth and delete characters responsibly πβ¨π
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- Copyright 2018-2024,2025 Thomas E. Dickey
- Copyright 1998-2006,2010 Free Software Foundation, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms