]> ncurses.scripts.mit.edu Git - ncurses.git/blob - man/curs_addchstr.3x
ncurses 4.1
[ncurses.git] / man / curs_addchstr.3x
1 .TH curs_addchstr 3X ""
2 .SH NAME
3 \fBaddchstr\fR, \fBaddchnstr\fR, \fBwaddchstr\fR,
4 \fBwaddchnstr\fR, \fBmvaddchstr\fR, \fBmvaddchnstr\fR, \fBmvwaddchstr\fR,
5 \fBmvwaddchnstr\fR - add a string of characters (and attributes) to a
6 \fBcurses\fR window
7 .SH SYNOPSIS
8 \fB#include <curses.h>\fR
9
10 \fBint addchstr(const chtype *chstr);\fR
11 .br
12 \fBint addchnstr(const chtype *chstr, int n);\fR
13 .br
14 \fBint waddchstr(WINDOW *win, const chtype *chstr);\fR
15 .br
16 \fBint waddchnstr(WINDOW *win, const chtype *chstr, int n);\fR
17 .br
18 \fBint mvaddchstr(int y, int x, const chtype *chstr);\fR
19 .br
20 \fBint mvaddchnstr(int y, int x, const chtype *chstr, int n);\fR
21 .br
22 \fBint mvwaddchstr(WINDOW *win, int y, int x, const chtype *chstr);\fR
23 .br
24 \fBint mvwaddchnstr(WINDOW *win, int y, int x, const chtype *chstr, int n);\fR
25 .SH DESCRIPTION
26 These routines copy \fIchstr\fR into the window image structure at and after
27 the current cursor position.  The four routines with \fIn\fR as the last
28 argument copy at most \fIn\fR elements, but no more than will fit on the line.
29 If \fBn\fR=\fB-1\fR then the whole string is copied, to the maximum number of
30 characters that will fit on the line.
31
32 The window cursor is \fInot\fR advanced, and these routines work faster than
33 \fBwaddnstr\fR.  On the other hand, they don't perform any kind of checking
34 (such as for the newline, backspace, or carriage return characters), they don't
35 advance the current cursor position, they don't expand other control characters
36 to ^-escapes, and they truncate the string if it crosses the right margin,
37 rather then wrapping it around to the new line.
38
39 .SH RETURN VALUES
40 All routines return the integer \fBERR\fR upon failure and \fBOK\fR on success
41 (the SVr4 manuals specify only "an integer value other than \fBERR\fR") upon
42 successful completion, unless otherwise noted in the preceding routine
43 descriptions.
44 .SH NOTES
45 Note that all routines except \fBwaddchnstr\fR may be macros.
46 .SH PORTABILITY
47 All these entry points are described in the XSI Curses standard, Issue 4.
48 .SH SEE ALSO
49 \fBcurses\fR(3X).
50 .\"#
51 .\"# The following sets edit modes for GNU EMACS
52 .\"# Local Variables:
53 .\"# mode:nroff
54 .\"# fill-column:79
55 .\"# End: