.\"*************************************************************************** .\" Copyright 2019-2024,2025 Thomas E. Dickey * .\" Copyright 2002-2012,2017 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * .\" copy of this software and associated documentation files (the * .\" "Software"), to deal in the Software without restriction, including * .\" without limitation the rights to use, copy, modify, merge, publish, * .\" distribute, distribute with modifications, sublicense, and/or sell * .\" copies of the Software, and to permit persons to whom the Software is * .\" furnished to do so, subject to the following conditions: * .\" * .\" The above copyright notice and this permission notice shall be included * .\" in all copies or substantial portions of the Software. * .\" * .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * .\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * .\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * .\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * .\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * .\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * .\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * .\" * .\" Except as contained in this notice, the name(s) of the above copyright * .\" holders shall not be used in advertising or otherwise to promote the * .\" sale, use or other dealings in this Software without prior written * .\" authorization. * .\"*************************************************************************** .\" .\" $Id: curs_addwstr.3x,v 1.60 2025/03/15 20:41:04 tom Exp $ .TH curs_addwstr 3X 2025-03-15 "ncurses 6.5" "Library calls" .ie \n(.g \{\ .ds `` \(lq .ds '' \(rq .\} .el \{\ .ie t .ds `` `` .el .ds `` "" .ie t .ds '' '' .el .ds '' "" .\} . .de bP .ie n .IP \(bu 4 .el .IP \(bu 2 .. .SH NAME \fB\%addwstr\fP, \fB\%waddwstr\fP, \fB\%mvaddwstr\fP, \fB\%mvwaddwstr\fP, \fB\%addnwstr\fP, \fB\%waddnwstr\fP, \fB\%mvaddnwstr\fP, \fB\%mvwaddnwstr\fP \- add a wide-character string to a \fIcurses\fR window and advance the cursor .SH SYNOPSIS .nf \fB#include .PP \fBint addwstr(const wchar_t * \fIwstr\fP); \fBint waddwstr(WINDOW * \fIwin\fP, const wchar_t * \fIwstr\fP); \fBint mvaddwstr(int \fIy\fP, int \fIx\fP, const wchar_t * \fIwstr\fP); \fBint mvwaddwstr(WINDOW * \fIwin\fP, int \fIy\fP, int \fIx\fP, const wchar_t * \fIwstr\fP); .PP \fBint addnwstr(const wchar_t * \fIwstr\fP, int \fIn\fP); \fBint waddnwstr(WINDOW * \fIwin\fP, const wchar_t * \fIwstr\fP, int \fIn\fP); \fBint mvaddnwstr(int \fIy\fP, int \fIx\fP, const wchar_t * \fIwstr\fP, int \fIn\fP); \fBint mvwaddnwstr(WINDOW * \fIwin\fP, int \fIy\fP, int \fIx\fP, const wchar_t * \fIwstr\fP, int \fIn\fP); .fi .SH DESCRIPTION .B \%waddwstr writes the characters of the (wide-null-terminated) wide-character string .I wstr to the window .IR win , as if by constructing a .I cchar_t for each .I wchar_t in .IR wstr , then calling \fB\%wadd_wch\fP(3X) with the resulting .IR cchar_t . .I curses processes spacing and non-spacing characters in .I wstr one at a time. .B \%waddnwstr is similar, but writes at most .I n wide characters. If .I n is \-1, .B \%waddnwstr writes the entire wide string. \fB\%ncurses\fP(3X) describes the variants of these functions. .SH RETURN VALUE These functions return .B OK on success and .B ERR on failure. .PP In .IR \%ncurses "," these functions fail if .bP the .I curses screen has not been initialized, .bP .I wstr is a null pointer, .bP (for functions taking a .I \%WINDOW pointer argument) .I win is a null pointer, or .bP an internal \fB\%wadd_wch\fP(3X) call returns .BR ERR "." .PP Functions prefixed with \*(``mv\*('' first perform cursor movement and fail if the position .RI ( y , .IR x ) is outside the window boundaries. .SH NOTES All of these functions except .B \%waddnwstr may be implemented as macros. .SH PORTABILITY X/Open Curses Issue\ 4 describes these functions. .PP SVr4 describes a successful return value only as \*(``an integer value other than .IR ERR \*(''. \" Courier roman in source; SVID 4, vol. 3, p. 478 .SH HISTORY X/Open Curses Issue\ 4 (1995) initially specified these functions. The System\ V Interface Definition Version\ 4 of the same year specified functions named .I \%waddwstr and .I \%waddnwstr (and the usual variants). .\" SVID 4, vol 3., p. 478 These were later additions to .RI SVr4. x , not appearing in the first SVr4 (1989). .SH SEE ALSO \fB\%curs_addstr\fP(3X) describes comparable functions of the .I \%ncurses library in its non-wide-character configuration. .PP \fB\%curses\fP(3X), \fB\%curs_add_wch\fP(3X), \fB\%curs_add_wchstr\fP(3X)