1addnstr(3XCURSES)       X/Open Curses Library Functions      addnstr(3XCURSES)
2
3
4

NAME

6       addnstr,  addstr, mvaddnstr, mvaddstr, mvwaddnstr, mvwaddstr, waddnstr,
7       waddstr - add a multi-byte character string (without  rendition)  to  a
8       window
9

SYNOPSIS

11       cc [ flag... ] file... -I /usr/xpg4/include  -L  /usr/xpg4/lib \
12        -R  /usr/xpg4/lib  -lcurses  [ library... ]
13
14       c89 [ flag... ] file... -lcurses [ library ... ]
15
16       #include <curses.h>
17
18       int addnstr(const char *str, int n);
19
20
21       int addstr(const char *str);
22
23
24       int mvaddnstr(int y, int x, const char *str, int n);
25
26
27       int mvaddstr(int y, int x, const char *str);
28
29
30       int mvwaddnstr(WINDOW *win, int y, int x, const char *str, int n);
31
32
33       int mvwaddstr(WINDOW *win, int y, int x, const char *str);
34
35
36       int waddstr(WINDOW *win, const char *str);
37
38
39       int waddnstr(WINDOW *win, const char *str, int n);
40
41

DESCRIPTION

43       The  addstr()  function  writes  a null-terminated string of multi-byte
44       characters to the stdscr window at the  current  cursor  position.  The
45       waddstr()  function performs an identical action, but writes the  char‐
46       acter to the window specified by win.  The mvaddstr()  and  mvwaddstr()
47       functions write the string to the  position indicated by the x (column)
48       and y (row) parameters (the  former to the stdscr window; the latter to
49       window win).
50
51
52       The addnstr(), waddnstr(), mvaddnstr(), and  mvwaddnstr() functions are
53       similar but write at most n characters  to the window.  If  n  is  less
54       than 0, the entire string is written.
55
56
57       All of these functions advance the cursor after writing the string.
58
59
60       These  functions are functionally equivalent to calling the correspond‐
61       ing  function from the addch(3XCURSES) set of functions once  for  each
62       character in  the string.  Refer to the curses(3XCURSES) man page for a
63       complete description of  special character handling and of the interac‐
64       tion  between  the window rendition (or background character and rendi‐
65       tion) and the character written.
66
67
68       Note that these functions differ from the addchstr() set  of  functions
69       in that the addchstr(3XCURSES) functions copy the string as is (without
70       combining each character with the window rendition  or  the  background
71       character  and rendition.
72

PARAMETERS

74       str    Is  a  pointer  to the character string that is to be written to
75              the window.
76
77
78       n      Is the maximum number of characters to be copied from str. If  n
79              is less than 0, the entire string is written or as much of it as
80              fits on the line.
81
82
83       y      Is the y (row) coordinate of the starting position of str in the
84              window.
85
86
87       x      Is  the x (column) coordinate of the starting position of str in
88              the window.
89
90
91       win    Is a pointer to the window in which the string is to be written.
92
93

RETURN VALUES

95       On success, these functions return OK. Otherwise, they return ERR.
96

ERRORS

98       None.
99

ATTRIBUTES

101       See attributes(5) for descriptions of the following attributes:
102
103
104
105
106       ┌─────────────────────────────┬─────────────────────────────┐
107       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
108       ├─────────────────────────────┼─────────────────────────────┤
109       │Interface Stability          │Standard                     │
110       ├─────────────────────────────┼─────────────────────────────┤
111       │MT-Level                     │Unsafe                       │
112       └─────────────────────────────┴─────────────────────────────┘
113

SEE ALSO

115       addch(3XCURSES),         addchstr(3XCURSES),          curses(3XCURSES),
116       libcurses(3XCURSES), attributes(5), standards(5)
117
118
119
120SunOS 5.11                        5 Jun 2002                 addnstr(3XCURSES)
Impressum