curs_addchstr(3X) | Library calls | curs_addchstr(3X) |
addchstr, addchnstr, waddchstr, waddchnstr, mvaddchstr, mvaddchnstr, mvwaddchstr, mvwaddchnstr - add a curses character string to a window
#include <ncurses/curses.h>
int addchstr(const chtype *chstr); int waddchstr(WINDOW *win, const chtype *chstr); int mvaddchstr(int y, int x, const chtype *chstr); int mvwaddchstr(WINDOW *win, int y, int x, const chtype *chstr);
int addchnstr(const chtype *chstr, int n); int waddchnstr(WINDOW *win, const chtype *chstr, int n); int mvaddchnstr(int y, int x, const chtype *chstr, int n); int mvwaddchnstr(WINDOW *win, int y, int x, const chtype *chstr, int n);
waddchstr copies the string of curses characters chstr to the window win. A null curses character terminates the string. waddchnstr does the same, but copies at most n characters, or as many as possible if n is -1. ncurses(3X) describes the variants of these functions.
Because these functions do not call waddch(3X) internally, they are faster than waddstr(3X) and waddnstr(3X). On the other hand, they
These functions return OK on success and ERR on failure.
X/Open Curses does not specify any error conditions. ncurses returns ERR if
Functions prefixed with “mv” first perform cursor movement and fail if the position (y, x) is outside the window boundaries.
All of these functions except waddchnstr may be implemented as macros.
X/Open Curses, Issue 4 describes these functions.
curs_add_wchstr(3X) describes comparable functions of the ncurses library in its wide-character configuration (ncursesw).
2024-05-11 | ncurses 6.5 |