curs_insch(3X)
π curs_insch(3X) β the "scoot over, bestie" of curses π
okay so this is a Library calls page from the curses family, and it's all about insch, winsch, mvinsch, and mvwinsch β the four girlies who insert a character into a window and make everybody else shuffle right. no cap. π«Ά
β¨ NAME β¨
insch, winsch, mvinsch, mvwinsch β insert a curses character in a window πΈ
β¨ SYNOPSIS β¨
#include <curses.h>
int insch(chtype ch);
int winsch(WINDOW * win, chtype ch);
int mvinsch(int y, int x, chtype ch);
int mvwinsch(WINDOW * win, int y, int x, chtype ch);
β¨ DESCRIPTION β¨
so winsch inserts the curses character ch at the cursor position in the window win. that's the whole vibe. π
the character that was previously sitting at the cursor β plus every single one to its right β gets moved one cell to the right. and the character that used to be the rightmost one on the line? discarded. gone. bye bestie. π
here's the plot twist tho: unlike addch(3X), winsch does not advance the cursor. it stays exactly where it is. icon behaviour honestly. β¨
and if you wanna know all about the variants of this function, ncurses(3X) describes them. iykyk. π
β¨ RETURN VALUE β¨
these functions return OK on success and ERR on failure. that's it, that's the whole thing. π
in ncurses, they return ERR if:
- the curses screen has not been initialized, or π
- (for functions taking a
WINDOWpointer argument)winis a null pointer. π
also!! functions prefixed with βmvβ first perform cursor movement, and they fail if the position (y, x) is outside the window boundaries. stay in your lane or get ERR'd, periodt. π
β¨ NOTES β¨
insch,mvinsch, andmvwinschmay be implemented as macros. so likeβ¦ they might not be real functions. sneaky. π- curses does not necessarily employ the terminal's
insert_character(ich1) capability to achieve insertion. don't assume, bestie. π¦
β¨ PORTABILITY β¨
X/Open Curses Issue 4 describes these functions. and it specifies no error conditions for them. zero. none. not a single one. π
SVr4 describes a successful return value only as βan integer value other than ERRβ. that's the entire definition. so vague. so mysterious. main character energy fr fr. β¨
β¨ HISTORY β¨
SVr2 (1984) introduced these functions. vintage. iconic. a classic for the girlies. π
β¨ SEE ALSO β¨
curs_ins_wch(3X)β describes comparable functions in the wide-character curses configuration πcurses(3X)terminfo(5)
and that's the whole page, bestie!! π this was ncurses 6.6, dated 2025-03-08, and it's the curs_insch(3X) manual page. go insert some characters, don't advance that cursor, and stay slaying. πβ¨π¦πΈπ
π«Ά
π¦ 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-2010,2017 Free Software Foundation, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms