X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=man%2Fcurs_get_wstr.3x;h=23ddb6dc6d8172f689977e721687997413ad82dd;hp=43bd53072b33423810a403d304b3699aefee4f30;hb=96a4663880a73a00b11700da8a404fdd56833925;hpb=17c5992a16be94247b83f2bbb9accdd9b7e7bb72 diff --git a/man/curs_get_wstr.3x b/man/curs_get_wstr.3x index 43bd5307..23ddb6dc 100644 --- a/man/curs_get_wstr.3x +++ b/man/curs_get_wstr.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright (c) 2002-2017,2018 Free Software Foundation, Inc. * +.\" Copyright (c) 2002-2018,2019 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 * @@ -26,8 +26,16 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_get_wstr.3x,v 1.14 2018/07/28 22:15:59 tom Exp $ +.\" $Id: curs_get_wstr.3x,v 1.19 2019/11/30 20:59:22 tom Exp $ .TH curs_get_wstr 3X "" +.ie \n(.g .ds `` \(lq +.el .ds `` `` +.ie \n(.g .ds '' \(rq +.el .ds '' '' +.de bP +.ie n .IP \(bu 4 +.el .IP \(bu 2 +.. .na .hy 0 .SH NAME @@ -160,7 +168,7 @@ Functions using a window parameter return an error if it is null. returns an error if the associated call to \fBwget_wch\fP failed. .RE .PP -Functions with a "mv" prefix first perform a cursor movement using +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 PORTABILITY @@ -184,6 +192,25 @@ end-of-file character is processed. The latter function \fIget_wch()\fP can return a negative value, while \fBwchar_t\fP is a unsigned type. All of the vendors implement this using \fBwint_t\fR, following the standard. +.PP +X/Open Curses, Issue 7 (2009) is unclear regarding whether +the terminating \fInull \fP\fBwchar_t\fP +value is counted in the length parameter \fIn\fP. +X/Open Curses, Issue 7 revised the corresponding description +of \fBwgetnstr\fP to address this issue. +The unrevised description of \fBwget_nwstr\fP can be interpreted either way. +This implementation counts the terminator in the length. +.PP +X/Open Curses does not specify what happens if the length \fIn\fP is negative. +.bP +For analogy with \fBwgetnstr\fP, +ncurses 6.2 uses a limit (based on \fBLINE_MAX\fP). +.bP +Some other implementations (such as Solaris xcurses) do the same, +while others (PDCurses) do not allow this. +.bP +NetBSD 7 curses imitates ncurses 6.1 in this regard, +treating a \fB\-1\fP as an indefinite number of characters. .SH SEE ALSO Functions: \fBcurses\fR(3X),