1curs_addchstr(3X)                                            curs_addchstr(3X)
2
3
4

NAME

6       addchstr, addchnstr, waddchstr, waddchnstr, mvaddchstr, mvaddchnstr,
7       mvwaddchstr, mvwaddchnstr - add a string of characters (and attributes)
8       to a curses window
9

SYNOPSIS

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
18       int mvaddchstr(int y, int x, const chtype *chstr);
19       int mvaddchnstr(int y, int x, const chtype *chstr, int n);
20       int mvwaddchstr(WINDOW *win, int y, int x, const chtype *chstr);
21       int mvwaddchnstr(WINDOW *win, int y, int x, const chtype *chstr, int n);
22

DESCRIPTION

24       These  functions copy the (null-terminated) chstr array into the window
25       image structure starting at the  current  cursor  position.   The  four
26       functions  with  n as the last argument copy at most n elements, but no
27       more than will fit on the line.   If  n=-1  then  the  whole  array  is
28       copied, to the maximum number of characters that will fit on the line.
29
30       The  window  cursor  is not advanced.  These functions work faster than
31       waddnstr.  On the other hand:
32
33       •   they do not perform checking (such as for the  newline,  backspace,
34           or carriage return characters),
35
36       •   they do not advance the current cursor position,
37
38       •   they do not expand other control characters to ^-escapes, and
39
40       •   they  truncate  the  string  if it crosses the right margin, rather
41           than wrapping it around to the new line.
42

RETURN VALUE

44       All functions return the integer ERR upon failure and OK on success.
45
46       X/Open does not define any error conditions.  This  implementation  re‐
47       turns an error if the window pointer is null.
48
49       Functions  with  a  “mv”  prefix  first perform a cursor movement using
50       wmove, and return an error if the position is outside the window, or if
51       the window pointer is null.
52

NOTES

54       All functions except waddchnstr may be macros.
55

PORTABILITY

57       These entry points are described in the XSI Curses standard, Issue 4.
58

SEE ALSO

60       curses(3X), curs_addstr(3X).
61
62       Comparable  functions  in the wide-character (ncursesw) library are de‐
63       scribed in curs_add_wchstr(3X).
64
65
66
67                                                             curs_addchstr(3X)
Impressum