1 .\"***************************************************************************
2 .\" Copyright (c) 1998-2010,2012 Free Software Foundation, Inc. *
4 .\" Permission is hereby granted, free of charge, to any person obtaining a *
5 .\" copy of this software and associated documentation files (the *
6 .\" "Software"), to deal in the Software without restriction, including *
7 .\" without limitation the rights to use, copy, modify, merge, publish, *
8 .\" distribute, distribute with modifications, sublicense, and/or sell *
9 .\" copies of the Software, and to permit persons to whom the Software is *
10 .\" furnished to do so, subject to the following conditions: *
12 .\" The above copyright notice and this permission notice shall be included *
13 .\" in all copies or substantial portions of the Software. *
15 .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
16 .\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
17 .\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
18 .\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
19 .\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
20 .\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
21 .\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
23 .\" Except as contained in this notice, the name(s) of the above copyright *
24 .\" holders shall not be used in advertising or otherwise to promote the *
25 .\" sale, use or other dealings in this Software without prior written *
27 .\"***************************************************************************
29 .\" $Id: curs_addchstr.3x,v 1.16 2012/11/03 22:54:43 tom Exp $
30 .TH curs_addchstr 3X ""
44 \fBmvwaddchnstr\fR \- add a string of characters (and attributes) to a \fBcurses\fR window
49 \fB#include <curses.h>\fR
51 \fBint addchstr(const chtype *chstr);\fR
53 \fBint addchnstr(const chtype *chstr, int n);\fR
55 \fBint waddchstr(WINDOW *win, const chtype *chstr);\fR
57 \fBint waddchnstr(WINDOW *win, const chtype *chstr, int n);\fR
59 \fBint mvaddchstr(int y, int x, const chtype *chstr);\fR
61 \fBint mvaddchnstr(int y, int x, const chtype *chstr, int n);\fR
63 \fBint mvwaddchstr(WINDOW *win, int y, int x, const chtype *chstr);\fR
65 \fBint mvwaddchnstr(WINDOW *win, int y, int x, const chtype *chstr, int n);\fR
68 These functions copy the (null-terminated)
70 into the window image structure
71 starting at the current cursor position.
72 The four functions with \fIn\fR as the last
73 argument copy at most \fIn\fR elements,
74 but no more than will fit on the line.
75 If \fBn\fR=\fB\-1\fR then the whole array is copied,
76 to the maximum number of characters that will fit on the line.
78 The window cursor is \fInot\fR advanced.
79 These functions work faster than \fBwaddnstr\fR.
82 they do not perform checking
83 (such as for the newline, backspace, or carriage return characters),
85 they do not advance the current cursor position,
87 they do not expand other control characters to ^-escapes, and
89 they truncate the string if it crosses the right margin,
90 rather than wrapping it around to the new line.
92 All functions return the integer \fBERR\fR upon failure and \fBOK\fR on success.
94 X/Open does not define any error conditions.
95 This implementation returns an error
96 if the window pointer is null.
98 Functions with a "mv" prefix first perform a cursor movement using
99 \fBwmove\fP, and return an error if the position is outside the window,
100 or if the window pointer is null.
102 All functions except \fBwaddchnstr\fR may be macros.
104 These entry points are described in the XSI Curses standard, Issue 4.
106 \fBcurs_addstr\fR(3X),
109 Comparable functions in the wide-character (ncursesw) library are
111 \fBcurs_add_wchstr\fR(3X).