]> ncurses.scripts.mit.edu Git - ncurses.git/blob - man/curs_addchstr.3x
ncurses 5.1
[ncurses.git] / man / curs_addchstr.3x
1 .\"***************************************************************************
2 .\" Copyright (c) 1998,2000 Free Software Foundation, Inc.                   *
3 .\"                                                                          *
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:                 *
11 .\"                                                                          *
12 .\" The above copyright notice and this permission notice shall be included  *
13 .\" in all copies or substantial portions of the Software.                   *
14 .\"                                                                          *
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.                               *
22 .\"                                                                          *
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       *
26 .\" authorization.                                                           *
27 .\"***************************************************************************
28 .\"
29 .\" $Id: curs_addchstr.3x,v 1.7 2000/07/01 19:53:33 tom Exp $
30 .TH curs_addchstr 3X ""
31 .SH NAME
32 \fBaddchstr\fR, \fBaddchnstr\fR, \fBwaddchstr\fR,
33 \fBwaddchnstr\fR, \fBmvaddchstr\fR, \fBmvaddchnstr\fR, \fBmvwaddchstr\fR,
34 \fBmvwaddchnstr\fR - add a string of characters (and attributes) to a \fBcurses\fR window
35 .SH SYNOPSIS
36 \fB#include <curses.h>\fR
37
38 \fBint addchstr(const chtype *chstr);\fR
39 .br
40 \fBint addchnstr(const chtype *chstr, int n);\fR
41 .br
42 \fBint waddchstr(WINDOW *win, const chtype *chstr);\fR
43 .br
44 \fBint waddchnstr(WINDOW *win, const chtype *chstr, int n);\fR
45 .br
46 \fBint mvaddchstr(int y, int x, const chtype *chstr);\fR
47 .br
48 \fBint mvaddchnstr(int y, int x, const chtype *chstr, int n);\fR
49 .br
50 \fBint mvwaddchstr(WINDOW *win, int y, int x, const chtype *chstr);\fR
51 .br
52 \fBint mvwaddchnstr(WINDOW *win, int y, int x, const chtype *chstr, int n);\fR
53 .SH DESCRIPTION
54 These routines copy \fIchstr\fR into the window image structure at and after
55 the current cursor position.  The four routines with \fIn\fR as the last
56 argument copy at most \fIn\fR elements, but no more than will fit on the line.
57 If \fBn\fR=\fB-1\fR then the whole string is copied, to the maximum number of
58 characters that will fit on the line.
59
60 The window cursor is \fInot\fR advanced, and these routines work faster than
61 \fBwaddnstr\fR.  On the other hand, they don't perform any kind of checking
62 (such as for the newline, backspace, or carriage return characters), they don't
63 advance the current cursor position, they don't expand other control characters
64 to ^-escapes, and they truncate the string if it crosses the right margin,
65 rather then wrapping it around to the new line.
66
67 .SH RETURN VALUES
68 All routines return the integer \fBERR\fR upon failure and \fBOK\fR on success
69 (the SVr4 manuals specify only "an integer value other than \fBERR\fR") upon
70 successful completion, unless otherwise noted in the preceding routine
71 descriptions.
72 .SH NOTES
73 Note that all routines except \fBwaddchnstr\fR may be macros.
74 .SH PORTABILITY
75 All these entry points are described in the XSI Curses standard, Issue 4.
76 .SH SEE ALSO
77 \fBcurses\fR(3X).
78 .\"#
79 .\"# The following sets edit modes for GNU EMACS
80 .\"# Local Variables:
81 .\"# mode:nroff
82 .\"# fill-column:79
83 .\"# End: