]> ncurses.scripts.mit.edu Git - ncurses.git/blob - man/curs_addwstr.3x
ncurses 6.2 - patch 20200215
[ncurses.git] / man / curs_addwstr.3x
1 .\"***************************************************************************
2 .\" Copyright 2019,2020 Thomas E. Dickey                                     *
3 .\" Copyright 2002-2012,2017 Free Software Foundation, Inc.                  *
4 .\"                                                                          *
5 .\" Permission is hereby granted, free of charge, to any person obtaining a  *
6 .\" copy of this software and associated documentation files (the            *
7 .\" "Software"), to deal in the Software without restriction, including      *
8 .\" without limitation the rights to use, copy, modify, merge, publish,      *
9 .\" distribute, distribute with modifications, sublicense, and/or sell       *
10 .\" copies of the Software, and to permit persons to whom the Software is    *
11 .\" furnished to do so, subject to the following conditions:                 *
12 .\"                                                                          *
13 .\" The above copyright notice and this permission notice shall be included  *
14 .\" in all copies or substantial portions of the Software.                   *
15 .\"                                                                          *
16 .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
17 .\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
18 .\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
19 .\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
20 .\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
21 .\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
22 .\" THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
23 .\"                                                                          *
24 .\" Except as contained in this notice, the name(s) of the above copyright   *
25 .\" holders shall not be used in advertising or otherwise to promote the     *
26 .\" sale, use or other dealings in this Software without prior written       *
27 .\" authorization.                                                           *
28 .\"***************************************************************************
29 .\"
30 .\" $Id: curs_addwstr.3x,v 1.14 2020/02/02 23:34:34 tom Exp $
31 .TH curs_addwstr 3X ""
32 .ie \n(.g .ds `` \(lq
33 .el       .ds `` ``
34 .ie \n(.g .ds '' \(rq
35 .el       .ds '' ''
36 .de bP
37 .ie n  .IP \(bu 4
38 .el    .IP \(bu 2
39 ..
40 .na
41 .hy 0
42 .SH NAME
43 \fBaddwstr\fR,
44 \fBaddnwstr\fR,
45 \fBwaddwstr\fR,
46 \fBwaddnwstr\fR,
47 \fBmvaddwstr\fR,
48 \fBmvaddnwstr\fR,
49 \fBmvwaddwstr\fR,
50 \fBmvwaddnwstr\fR \- add a string of wide characters to a \fBcurses\fR window and advance cursor
51 .ad
52 .hy
53 .SH SYNOPSIS
54 .nf
55 \fB#include <curses.h>\fR
56 .PP
57 \fBint addwstr(const wchar_t *\fR\fIwstr\fR\fB);\fR
58 .br
59 \fBint addnwstr(const wchar_t *\fR\fIwstr\fR\fB, int \fR\fIn\fR\fB);\fR
60 .br
61 \fBint waddwstr(WINDOW *\fR\fIwin\fR\fB, const wchar_t *\fR\fIwstr\fR\fB);\fR
62 .br
63 \fBint waddnwstr(WINDOW *\fR\fIwin\fR\fB, const wchar_t *\fR\fIwstr\fR\fB, int \fR\fIn\fR\fB);\fR
64 .br
65 \fBint mvaddwstr(int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, const wchar_t *\fR\fIwstr\fR\fB);\fR
66 .br
67 \fBint mvaddnwstr(int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, const wchar_t *\fR\fIwstr\fR\fB, int \fR\fIn\fR\fB);\fR
68 .br
69 \fBint mvwaddwstr(WINDOW *\fR\fIwin\fR\fB, int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, const wchar_t *\fR\fIwstr\fR\fB);\fR
70 .br
71 \fBint mvwaddnwstr(WINDOW *\fR\fIwin\fR\fB, int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, const wchar_t *\fR\fIwstr\fR\fB, int \fR\fIn\fR\fB);\fR
72 .fi
73 .SH DESCRIPTION
74 These functions write the characters of the
75 (null-terminated) \fBwchar_t\fR character string
76 \fIwstr\fR on the given window.
77 It is similar to constructing a \fBcchar_t\fR for each wchar_t in the string,
78 then calling \fBwadd_wch\fR for the resulting \fBcchar_t\fR.
79 .PP
80 The \fImv\fR functions perform cursor movement once, before writing any
81 characters.
82 Thereafter, the cursor is advanced as a side-effect of writing to the window.
83 .PP
84 The four functions with \fIn\fR as the last argument
85 write at most \fIn\fR \fBwchar_t\fR characters,
86 or until a terminating null is reached.
87 If \fIn\fR is \-1, then the entire string will be added.
88 .SH RETURN VALUE
89 All functions return the integer \fBERR\fR upon failure and \fBOK\fR on success.
90 .PP
91 X/Open does not define any error conditions.
92 This implementation returns an error
93 .bP
94 if the window pointer is null or
95 .bP
96 if the string pointer is null or
97 .bP
98 if the corresponding calls to \fBwadd_wch\fP return an error.
99 .PP
100 Functions with a \*(``mv\*('' prefix first perform a cursor movement using
101 \fBwmove\fP, and return an error if the position is outside the window,
102 or if the window pointer is null.
103 .SH NOTES
104 All of these functions except \fBwaddnwstr\fR may be macros.
105 .SH PORTABILITY
106 These functions are described in the XSI Curses standard, Issue 4.
107 .SH SEE ALSO
108 \fBcurses\fR(3X),
109 \fBcurs_add_wch\fR(3X)