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
21 n);
22
24 These routines copy chstr into the window image structure at and after
25 the current cursor position. The four routines with n as the last ar‐
26 gument copy at most n elements, but no more than will fit on the line.
27 If n=-1 then the whole string is copied, to the maximum number of char‐
28 acters that will fit on the line.
29
30 The window cursor is not advanced, and these routines work faster than
31 waddnstr. On the other hand, they do not perform any kind of checking
32 (such as for the newline, backspace, or carriage return characters),
33 they do not advance the current cursor position, they do not expand
34 other control characters to ^-escapes, and they truncate the string if
35 it crosses the right margin, rather than wrapping it around to the new
36 line.
37
39 All routines return the integer ERR upon failure and OK on success (the
40 SVr4 manuals specify only "an integer value other than ERR") upon suc‐
41 cessful completion, unless otherwise noted in the preceding routine de‐
42 scriptions.
43
44 X/Open does not define any error conditions. This implementation re‐
45 turns an error if the window pointer is null.
46
48 Note that all routines except waddchnstr may be macros.
49
51 These entry points are described in the XSI Curses standard, Issue 4.
52
54 curses(3X).
55
56 Comparable functions in the wide-character (ncursesw) library are de‐
57 scribed in curs_add_wchstr(3X).
58
59
60
61 curs_addchstr(3X)