| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> |
| 33 |
<HTML> |
| 34 |
<HEAD> |
| 35 |
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii"> |
| 36 |
<meta name="generator" content="Manpage converted by man2html - see https://invisible-island.net/scripts/readme.html#others_scripts"> |
| 37 |
<TITLE>curs_add_wchstr 3x 2025-10-20 ncurses 6.6 Library calls</TITLE> |
| 38 |
<link rel="author" href="mailto:[email protected]"> |
| 39 |
|
| 40 |
</HEAD> |
| 41 |
<BODY> |
| 42 |
<H1 class="no-header">curs_add_wchstr 3x 2025-10-20 ncurses 6.6 Library calls</H1> |
| 43 |
<PRE> |
| 44 |
<STRONG><A HREF="curs_add_wchstr.3x.html">curs_add_wchstr(3x)</A></STRONG> Library calls <STRONG><A HREF="curs_add_wchstr.3x.html">curs_add_wchstr(3x)</A></STRONG> |
| 45 |
|
| 46 |
|
| 47 |
</PRE><H2><a name="h2-NAME">NAME</a></H2><PRE> |
| 48 |
<STRONG>add_wchstr</STRONG>, <STRONG>wadd_wchstr</STRONG>, <STRONG>mvadd_wchstr</STRONG>, <STRONG>mvwadd_wchstr</STRONG>, <STRONG>add_wchnstr</STRONG>, |
| 49 |
<STRONG>wadd_wchnstr</STRONG>, <STRONG>mvadd_wchnstr</STRONG>, <STRONG>mvwadd_wchnstr</STRONG> - add a <EM>curses</EM> complex |
| 50 |
character string to a window |
| 51 |
|
| 52 |
|
| 53 |
</PRE><H2><a name="h2-SYNOPSIS">SYNOPSIS</a></H2><PRE> |
| 54 |
<STRONG>#include</STRONG> <STRONG><curses.h></STRONG> |
| 55 |
|
| 56 |
<STRONG>int</STRONG> <STRONG>add_wchstr(const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG> <EM>wchstr</EM><STRONG>);</STRONG> |
| 57 |
<STRONG>int</STRONG> <STRONG>wadd_wchstr(WINDOW</STRONG> <STRONG>*</STRONG> <EM>win</EM><STRONG>,</STRONG> <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG> <EM>wchstr</EM><STRONG>);</STRONG> |
| 58 |
<STRONG>int</STRONG> <STRONG>mvadd_wchstr(int</STRONG> <EM>y</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>x</EM><STRONG>,</STRONG> <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG> <EM>wchstr</EM><STRONG>);</STRONG> |
| 59 |
<STRONG>int</STRONG> <STRONG>mvwadd_wchstr(WINDOW</STRONG> <STRONG>*</STRONG> <EM>win</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>y</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>x</EM><STRONG>,</STRONG> <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG> <EM>wchstr</EM><STRONG>);</STRONG> |
| 60 |
|
| 61 |
<STRONG>int</STRONG> <STRONG>add_wchnstr(const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG> <EM>wchstr</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>n</EM><STRONG>);</STRONG> |
| 62 |
<STRONG>int</STRONG> <STRONG>wadd_wchnstr(WINDOW</STRONG> <STRONG>*</STRONG> <EM>win</EM><STRONG>,</STRONG> <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG> <EM>wchstr</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>n</EM><STRONG>);</STRONG> |
| 63 |
<STRONG>int</STRONG> <STRONG>mvadd_wchnstr(int</STRONG> <EM>y</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>x</EM><STRONG>,</STRONG> <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG> <EM>wchstr</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>n</EM><STRONG>);</STRONG> |
| 64 |
<STRONG>int</STRONG> <STRONG>mvwadd_wchnstr(WINDOW</STRONG> <STRONG>*</STRONG> <EM>win</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>y</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>x</EM><STRONG>,</STRONG> |
| 65 |
<STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG> <EM>wchstr</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>n</EM><STRONG>);</STRONG> |
| 66 |
|
| 67 |
|
| 68 |
</PRE><H2><a name="h2-DESCRIPTION">DESCRIPTION</a></H2><PRE> |
| 69 |
<STRONG>wadd_wchstr</STRONG> copies the string of complex characters <EM>wchstr</EM> to the |
| 70 |
window <EM>win</EM>. A null complex character terminates the string. If a |
| 71 |
complex character does not completely fit at the end of the line, |
| 72 |
<EM>curses</EM> fills its remaining cells with the window's background |
| 73 |
character; see <STRONG><A HREF="curs_bkgrnd.3x.html">bkgrnd(3x)</A></STRONG>. <STRONG>wadd_wchnstr</STRONG> does the same, but copies at |
| 74 |
most <EM>n</EM> characters, or as many as possible if <EM>n</EM> is <STRONG>-1</STRONG>. <STRONG><A HREF="ncurses.3x.html">ncurses(3x)</A></STRONG> |
| 75 |
describes the variants of these functions. |
| 76 |
|
| 77 |
Because these functions do not call <STRONG><A HREF="curs_add_wch.3x.html">wadd_wch(3x)</A></STRONG> internally, they are |
| 78 |
faster than <STRONG><A HREF="curs_addwstr.3x.html">waddwstr(3x)</A></STRONG> and <STRONG><A HREF="curs_addwstr.3x.html">waddnwstr(3x)</A></STRONG>. On the other hand, they |
| 79 |
|
| 80 |
<STRONG>o</STRONG> do not treat the backspace, carriage return, or line feed |
| 81 |
characters specially; |
| 82 |
|
| 83 |
<STRONG>o</STRONG> do not represent unprintable characters with <STRONG><A HREF="curs_util.3x.html">wunctrl(3x)</A></STRONG>; |
| 84 |
|
| 85 |
<STRONG>o</STRONG> do not update the cursor position to follow the last character |
| 86 |
written; and |
| 87 |
|
| 88 |
<STRONG>o</STRONG> truncate the string at the window's right margin, rather than |
| 89 |
wrapping it to the next line and potentially scrolling. |
| 90 |
|
| 91 |
|
| 92 |
</PRE><H2><a name="h2-RETURN-VALUE">RETURN VALUE</a></H2><PRE> |
| 93 |
These functions return <STRONG>OK</STRONG> on success and <STRONG>ERR</STRONG> on failure. |
| 94 |
|
| 95 |
In <EM>ncurses</EM>, these functions fail if |
| 96 |
|
| 97 |
<STRONG>o</STRONG> the <EM>curses</EM> screen has not been initialized, |
| 98 |
|
| 99 |
<STRONG>o</STRONG> <EM>wchstr</EM> is a null pointer, or |
| 100 |
|
| 101 |
<STRONG>o</STRONG> (for functions taking a <EM>WINDOW</EM> pointer argument) <EM>win</EM> is a null |
| 102 |
pointer. |
| 103 |
|
| 104 |
Functions prefixed with "mv" first perform cursor movement and fail if |
| 105 |
the position (<EM>y</EM>, <EM>x</EM>) is outside the window boundaries. |
| 106 |
|
| 107 |
|
| 108 |
</PRE><H2><a name="h2-NOTES">NOTES</a></H2><PRE> |
| 109 |
All of these functions except <STRONG>wadd_wchnstr</STRONG> may be implemented as |
| 110 |
macros. |
| 111 |
|
| 112 |
|
| 113 |
</PRE><H2><a name="h2-PORTABILITY">PORTABILITY</a></H2><PRE> |
| 114 |
X/Open Curses Issue 4 describes these functions. It specifies no error |
| 115 |
conditions for them. |
| 116 |
|
| 117 |
|
| 118 |
</PRE><H2><a name="h2-HISTORY">HISTORY</a></H2><PRE> |
| 119 |
X/Open Curses Issue 4 (1995) initially specified these functions. The |
| 120 |
System V Interface Definition Version 4 of the same year specified |
| 121 |
functions named <EM>waddwchstr</EM> and <EM>waddwchnstr</EM> (and the usual variants). |
| 122 |
These were later additions to SVr4.<EM>x</EM>, not appearing in the first SVr4 |
| 123 |
(1989). They differed from X/Open's later <EM>wadd</EM><STRONG>_</STRONG><EM>wchstr</EM> and <EM>wadd</EM><STRONG>_</STRONG><EM>wchnstr</EM> |
| 124 |
in that they each took an argument of type <EM>wchar</EM><STRONG>_</STRONG><EM>t</EM> instead of <EM>cchar</EM><STRONG>_</STRONG><EM>t</EM>. |
| 125 |
|
| 126 |
|
| 127 |
</PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE> |
| 128 |
<STRONG><A HREF="curs_addchstr.3x.html">curs_addchstr(3x)</A></STRONG> describes comparable functions of the <EM>ncurses</EM> library |
| 129 |
in its non-wide-character configuration. |
| 130 |
|
| 131 |
<STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="curs_addwstr.3x.html">curs_addwstr(3x)</A></STRONG>, <STRONG><A HREF="curs_add_wch.3x.html">curs_add_wch(3x)</A></STRONG> |
| 132 |
|
| 133 |
ncurses 6.6 2025-10-20 <STRONG><A HREF="curs_add_wchstr.3x.html">curs_add_wchstr(3x)</A></STRONG> |
| 134 |
</PRE> |
| 135 |
<div class="nav"> |
| 136 |
<ul> |
| 137 |
<li><a href="#h2-NAME">NAME</a></li> |
| 138 |
<li><a href="#h2-SYNOPSIS">SYNOPSIS</a></li> |
| 139 |
<li><a href="#h2-DESCRIPTION">DESCRIPTION</a></li> |
| 140 |
<li><a href="#h2-RETURN-VALUE">RETURN VALUE</a></li> |
| 141 |
<li><a href="#h2-NOTES">NOTES</a></li> |
| 142 |
<li><a href="#h2-PORTABILITY">PORTABILITY</a></li> |
| 143 |
<li><a href="#h2-HISTORY">HISTORY</a></li> |
| 144 |
<li><a href="#h2-SEE-ALSO">SEE ALSO</a></li> |
| 145 |
</ul> |
| 146 |
</div> |
| 147 |
</BODY> |
| 148 |
</HTML> |