curs_addchstr.3x - Man Page

add a curses character string to a window

Synopsis

#include <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);

Description

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

Return Value

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.

Notes

All of these functions except waddchnstr may be implemented as macros.

Portability

X/Open Curses, Issue 4 describes these functions.

See Also

curs_add_wchstr(3X) describes comparable functions of the ncurses library in its wide-character configuration (ncursesw).

curses(3X), curs_addch(3X), curs_addstr(3X)

Referenced By

The man pages addchnstr.3x(3), addchstr.3x(3), mvaddchnstr.3x(3), mvaddchstr.3x(3), mvwaddchnstr.3x(3), mvwaddchstr.3x(3), waddchnstr.3x(3) and waddchstr.3x(3) are aliases of curs_addchstr.3x(3).

2024-06-01 ncurses 6.5 Library calls