]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - man/curs_inwstr.3x
ncurses 6.4 - patch 20231118
[ncurses.git] / man / curs_inwstr.3x
index 27843122c90554fbefdbdae813572bccd1de500d..8c20d8217315f3cfe9ffbac44757b34b64be2700 100644 (file)
@@ -27,8 +27,8 @@
 .\" authorization.                                                           *
 .\"***************************************************************************
 .\"
-.\" $Id: curs_inwstr.3x,v 1.28 2023/10/07 21:19:07 tom Exp $
-.TH curs_inwstr 3X 2023-10-07 "ncurses 6.4" "Library calls"
+.\" $Id: curs_inwstr.3x,v 1.33 2023/11/19 00:10:50 tom Exp $
+.TH curs_inwstr 3X 2023-11-18 "ncurses 6.4" "Library calls"
 .ie \n(.g \{\
 .ds `` \(lq
 .ds '' \(rq
 .ie t .ds '' ''
 .el   .ds '' ""
 .\}
+.de bP
+.ie n  .IP \(bu 4
+.el    .IP \(bu 2
+..
 .SH NAME
 \fB\%inwstr\fP,
 \fB\%innwstr\fP,
@@ -65,7 +69,7 @@ get a wide-character string from a \fIcurses\fR window
 .fi
 .SH DESCRIPTION
 These routines return a string of \fBwchar_t\fP wide characters in \fIwstr\fP,
-extracted starting at the current cursor position in the named window.
+starting at the current cursor position in the named window.
 .PP
 The four functions with \fIn\fP as the last argument return
 a leading substring at most \fIn\fP characters long
@@ -75,16 +79,6 @@ been stored at the location referenced by \fIwstr\fP.
 .PP
 If the size \fIn\fP is not large enough to store a complete complex character,
 an error is generated.
-.SH NOTES
-All routines except
-\fBwinnwstr\fP
-may be macros.
-.PP
-Each cell in the window holds a complex character (i.e., base-
-and combining-characters) together with attributes and color.
-These functions store only the wide characters,
-ignoring attributes and color.
-Use \fBin_wchstr\fP to return the complex characters from a window.
 .SH RETURN VALUE
 All routines return
 \fBERR\fP
@@ -96,10 +90,47 @@ routines return
 routines return the
 number of characters read into the string.
 .PP
+X/Open defines no error conditions.
+This implementation returns an error
+.bP
+if the \fIwin\fP parameter is null or
+.bP
+if the \fIwstr\fP parameter is null, or
+.bP
+if no characters could be read.
+.PP
 Functions with a \*(``mv\*('' prefix first perform a cursor movement using
 \fBwmove\fP, and return an error if the position is outside the window,
 or if the window pointer is null.
+.SH NOTES
+All routines except
+\fBwinnwstr\fP
+may be macros.
+.PP
+Each cell in the window holds a complex character (i.e., base-
+and combining-characters) together with attributes and color.
+These functions store only the wide characters,
+ignoring attributes and color.
+Use \fBin_wchstr\fP to return the complex characters from a window.
+.PP
+Reading a line that overflows the array pointed to by
+\fIwstr\fP
+with
+\fBinwstr\fP,
+\fBmvinwstr\fP,
+\fBmvwinwstr\fP
+or
+\fBwinwstr\fP
+causes undefined results.
+Therefore, the use of
+\fBinnwstr\fP,
+\fBmvinnwstr\fP,
+\fBmvwinnwstr\fP, or
+\fBwinnwstr\fP
+is recommended.
 .SH SEE ALSO
 \fB\%curses\fP(3X),
+\fB\%curs_inch\fP(3X),
+\fB\%curs_inchstr\fP(3X),
 \fB\%curs_instr\fP(3X),
 \fB\%curs_in_wchstr\fP(3X)