diff options
Diffstat (limited to 'upstream/archlinux/man3/curs_inwstr.3x')
-rw-r--r-- | upstream/archlinux/man3/curs_inwstr.3x | 137 |
1 files changed, 86 insertions, 51 deletions
diff --git a/upstream/archlinux/man3/curs_inwstr.3x b/upstream/archlinux/man3/curs_inwstr.3x index 3b02feea..f98da461 100644 --- a/upstream/archlinux/man3/curs_inwstr.3x +++ b/upstream/archlinux/man3/curs_inwstr.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright 2018-2021,2022 Thomas E. Dickey * +.\" Copyright 2018-2023,2024 Thomas E. Dickey * .\" Copyright 2002-2012,2017 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * @@ -27,45 +27,49 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_inwstr.3x,v 1.17 2022/02/12 20:05:11 tom Exp $ -.TH curs_inwstr 3X "" -.ie \n(.g .ds `` \(lq -.el .ds `` `` -.ie \n(.g .ds '' \(rq -.el .ds '' '' +.\" $Id: curs_inwstr.3x,v 1.41 2024/04/20 21:20:07 tom Exp $ +.TH curs_inwstr 3X 2024-04-20 "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 -\fBinwstr\fP, -\fBinnwstr\fP, -\fBwinwstr\fP, -\fBwinnwstr\fP, -\fBmvinwstr\fP, -\fBmvinnwstr\fP, -\fBmvwinwstr\fP, -\fBmvwinnwstr\fP \- get a string of \fBwchar_t\fP characters from a curses window +\fB\%inwstr\fP, +\fB\%innwstr\fP, +\fB\%winwstr\fP, +\fB\%winnwstr\fP, +\fB\%mvinwstr\fP, +\fB\%mvinnwstr\fP, +\fB\%mvwinwstr\fP, +\fB\%mvwinnwstr\fP \- +get a wide-character string from a \fIcurses\fR window .SH SYNOPSIS .nf -\fB#include <curses.h> \fP -.sp -\fBint inwstr(\fBwchar_t *\fIwstr\fB);\fR -.br -\fBint innwstr(\fBwchar_t *\fIwstr\fB, int \fIn\fB);\fR -.br -\fBint winwstr(\fBWINDOW *\fIwin\fB, wchar_t *\fIwstr\fB);\fR -.br -\fBint winnwstr(\fBWINDOW *\fIwin\fB, wchar_t *\fIwstr\fB, int \fIn\fB);\fR -.sp -\fBint mvinwstr(\fBint \fIy\fB, int \fIx\fB, wchar_t *\fIwstr\fB);\fR -.br -\fBint mvinnwstr(\fBint \fIy\fB, int \fIx\fB, wchar_t *\fIwstr\fB, int \fIn\fB);\fR -.br -\fBint mvwinwstr(\fBWINDOW *\fIwin\fB, int \fIy\fB, int \fIx\fB, wchar_t *\fIwstr\fB);\fR -.br -\fBint mvwinnwstr(\fBWINDOW *\fIwin\fB, int \fIy\fB, int \fIx\fB, wchar_t *\fIwstr\fB, int \fIn\fB);\fR +\fB#include <curses.h> +.PP +\fBint inwstr(wchar_t *\fIwstr\fP); +\fBint innwstr(wchar_t *\fIwstr\fP, int \fIn\fP); +\fBint winwstr(WINDOW *\fIwin\fP, wchar_t *\fIwstr\fP); +\fBint winnwstr(WINDOW *\fIwin\fP, wchar_t *\fIwstr\fP, int \fIn\fP); +.PP +\fBint mvinwstr(int \fIy\fP, int \fIx\fP, wchar_t *\fIwstr\fP); +\fBint mvinnwstr(int \fIy\fP, int \fIx\fP, wchar_t *\fIwstr\fP, int \fIn\fP); +\fBint mvwinwstr(WINDOW *\fIwin\fP, int \fIy\fP, int \fIx\fP, wchar_t *\fIwstr\fP); +\fBint mvwinnwstr(WINDOW *\fIwin\fP, int \fIy\fP, int \fIx\fP, wchar_t *\fIwstr\fP, int \fIn\fP); .fi .SH DESCRIPTION -.PP 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,17 +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 -.PP -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 @@ -97,10 +90,52 @@ routines return routines return the number of characters read into the string. .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. +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 prefixed with \*(``mv\*('' first perform cursor movement and +fail if the position +.RI ( y , +.IR x ) +is outside the window boundaries. +.SH NOTES +All routines except +\fBwinnwstr\fP +may be macros. +.PP +Each cell in the window holds a complex character +(a spacing character and zero or more non-spacing 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 PORTABILITY +These functions are described in X/Open Curses, Issue 4. .SH SEE ALSO -\fBcurses\fP(3X), -\fBcurs_instr\fP(3X), -\fBcurs_in_wchstr\fP(3X) +\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) |