1curs_addchstr(3X) curs_addchstr(3X)
2
3
4
6 addchstr, addchnstr, waddchstr, waddchnstr, mvaddchstr, mvaddchnstr,
7 mvwaddchstr, mvwaddchnstr - add a string of characters (and attributes)
8 to a curses window
9
11 #include <curses.h>
12
13 int addchstr(const chtype *chstr);
14 int addchnstr(const chtype *chstr, int n);
15 int waddchstr(WINDOW *win, const chtype *chstr);
16 int waddchnstr(WINDOW *win, const chtype *chstr, int n);
17 int mvaddchstr(int y, int x, const chtype *chstr);
18 int mvaddchnstr(int y, int x, const chtype *chstr, int n);
19 int mvwaddchstr(WINDOW *win, int y, int x, const chtype *chstr);
20 int mvwaddchnstr(WINDOW *win, int y, int x, const chtype *chstr, int n);
21
23 These functions copy the (null-terminated) chstr array into the window
24 image structure starting at the current cursor position. The four
25 functions with n as the last argument copy at most n elements, but no
26 more than will fit on the line. If n=-1 then the whole array is
27 copied, to the maximum number of characters that will fit on the line.
28
29 The window cursor is not advanced. These functions work faster than
30 waddnstr. On the other hand:
31
32 · they do not perform checking (such as for the newline, backspace,
33 or carriage return characters),
34
35 · they do not advance the current cursor position,
36
37 · they do not expand other control characters to ^-escapes, and
38
39 · they truncate the string if it crosses the right margin, rather
40 than wrapping it around to the new line.
41
43 All functions return the integer ERR upon failure and OK on success.
44
45 X/Open does not define any error conditions. This implementation re‐
46 turns an error if the window pointer is null.
47
48 Functions with a "mv" prefix first perform a cursor movement using
49 wmove, and return an error if the position is outside the window, or if
50 the window pointer is null.
51
53 All functions except waddchnstr may be macros.
54
56 These entry points are described in the XSI Curses standard, Issue 4.
57
59 curs_addstr(3X), curses(3X).
60
61 Comparable functions in the wide-character (ncursesw) library are de‐
62 scribed in curs_add_wchstr(3X).
63
64
65
66 curs_addchstr(3X)