X-Git-Url: https://ncurses.scripts.mit.edu/?a=blobdiff_plain;f=doc%2Fhtml%2Fman%2Fcurs_inwstr.3x.html;h=0d8c3c1e71dbcddafea11f0909c9a5f35b924355;hb=HEAD;hp=7b034b2027d0a4b4118b48cb0d321453873d919f;hpb=725169bda4d3b4c3fde0d4a94f76d017812c7ea6;p=ncurses.git diff --git a/doc/html/man/curs_inwstr.3x.html b/doc/html/man/curs_inwstr.3x.html index 7b034b20..d5777a28 100644 --- a/doc/html/man/curs_inwstr.3x.html +++ b/doc/html/man/curs_inwstr.3x.html @@ -27,19 +27,19 @@ * sale, use or other dealings in this Software without prior written * * authorization. * **************************************************************************** - * @Id: curs_inwstr.3x,v 1.38 2024/03/16 15:35:01 tom Exp @ + * @Id: curs_inwstr.3x,v 1.45 2024/06/08 21:19:18 tom Exp @ --> -curs_inwstr 3x 2024-03-16 ncurses 6.4 Library calls +curs_inwstr 3x 2024-06-08 ncurses 6.5 Library calls -

curs_inwstr 3x 2024-03-16 ncurses 6.4 Library calls

+

curs_inwstr 3x 2024-06-08 ncurses 6.5 Library calls

 curs_inwstr(3x)                  Library calls                 curs_inwstr(3x)
 
@@ -54,74 +54,88 @@
 

SYNOPSIS

        #include <curses.h>
 
-       int inwstr(wchar_t *wstr);
-       int innwstr(wchar_t *wstr, int n);
-       int winwstr(WINDOW *win, wchar_t *wstr);
-       int winnwstr(WINDOW *win, wchar_t *wstr, int n);
+       int inwstr(wchar_t * wstr);
+       int winwstr(WINDOW * win, wchar_t * wstr);
+       int mvinwstr(int y, int x, wchar_t * wstr);
+       int mvwinwstr(WINDOW * win, int y, int x, wchar_t * wstr);
 
-       int mvinwstr(int y, int x, wchar_t *wstr);
-       int mvinnwstr(int y, int x, wchar_t *wstr, int n);
-       int mvwinwstr(WINDOW *win, int y, int x, wchar_t *wstr);
-       int mvwinnwstr(WINDOW *win, int y, int x, wchar_t *wstr, int n);
+       int innwstr(wchar_t * wstr, int n);
+       int winnwstr(WINDOW * win, wchar_t * wstr, int n);
+       int mvinnwstr(int y, int x, wchar_t * wstr, int n);
+       int mvwinnwstr(WINDOW * win, int y, int x, wchar_t * wstr, int n);
 
 
 

DESCRIPTION

-       These routines return a string of  wchar_t  wide  characters  in  wstr,
-       starting at the current cursor position in the named window.
-
-       The  four  functions  with  n  as  the  last  argument return a leading
-       substring at most n characters long (exclusive of  the  trailing  NUL).
-       Transfer  stops  at  the  end of the current line, or when n characters
-       have been stored at the location referenced by wstr.
-
-       If the size  n  is  not  large  enough  to  store  a  complete  complex
-       character, an error is generated.
+       winwstr extracts a wide-character string  from  a  curses  window  win,
+       starting  at the cursor and stopping at the end of the line, and stores
+       it in wstr, terminating it with a wide null character and omitting  any
+       attributes  and  color pair identifier that curses associates with each
+       character.  winnwstr does the same, but copies  at  most  n  characters
+       from  win.   An  n  of  -1  implies  no limit; winnwstr then works like
+       winwstr.  ncurses(3x) describes the variants of these functions.
 
 
 

RETURN VALUE

-       All  routines return ERR upon failure.  Upon successful completion, the
-       *inwstr routines return OK, and the *innwstr routines return the number
-       of characters read into the string.
+       On successful operation, these  functions  return  the  count  of  wide
+       characters  copied  from  win  to  wstr.  They return ERR upon failure.
+       innwstr, winnwstr,  mvinnwstr,  and  mvwinnwstr  return  ERR  if  n  is
+       insufficiently  large  to  store  a  complete  wide  character  string.
+       (Recall that a curses  complex  character  can  contain  multiple  wide
+       characters, some of which may be non-spacing.)
 
-       X/Open  defines  no  error  conditions.  This implementation returns an
-       error
+       In ncurses, these functions return ERR if
 
-       o   if the win parameter is null or
+       o   win is NULL or
 
-       o   if the wstr parameter is null, or
+       o   wstr is NULL.
 
-       o   if no characters could be read.
-
-       Functions with a "mv" prefix first  perform  a  cursor  movement  using
-       wmove, and return an error if the position is outside the window, or if
-       the window pointer is null.
+       Functions  prefixed with "mv" first perform cursor movement and fail if
+       the position (y, x) is outside the window boundaries.
 
 
 

NOTES

-       All routines except winnwstr may be macros.
+       All of these functions except winnwstr may be implemented as macros.
+
+       Reading a line that overflows the array pointed to by str with  inwstr,
+       winwstr,  mvinwstr,  or  mvwinwstr  causes  undefined  results.  Use of
+       innwstr, winnwstr, mvinnwstr, and mvwinnwstr is recommended instead.
 
-       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 in_wchstr to return the complex characters
-       from a window.
 
-       Reading a line that overflows the array pointed to by wstr with inwstr,
-       mvinwstr,  mvwinwstr  or  winwstr causes undefined results.  Therefore,
-       the use of innwstr, mvinnwstr, mvwinnwstr, or winnwstr is recommended.
+

EXTENSIONS

+       innwstr, winnwstr, mvinnwstr, and mvwinnwstr's treatment  of  -1  as  a
+       valid value of n is an ncurses extension.
 
 
 

PORTABILITY

-       These functions are described in the XSI Curses standard, Issue 4.
+       Applications employing ncurses extensions should condition their use on
+       the visibility of the NCURSES_VERSION preprocessor macro.
+
+       X/Open Curses, Issue 4 describes  these  functions.   It  specifies  no
+       error conditions for them.
+
+       Notwithstanding  the foregoing, X/Open Curses Issues 4 and 7 both state
+       that innwstr, winnwstr, mvinnwstr, and mvwinnwstr "fail  ...  [i]f  the
+       array  is  not  large  enough  to  contain  any  complete  characters".
+       Strictly interpreted, this means  that  a  caller  of  these  functions
+       cannot use their return values to detect truncation of a wide-character
+       string copied from more  than  one  character  cell  in  win.   ncurses
+       reports any truncation with ERR.
+
+       X/Open  Curses  specifies  inwstr,  winwstr, mvinwstr, and mvwinwstr as
+       returning OK rather than a (wide) character count,  unlike  their  non-
+       wide  counterparts  instr,  winstr,  mvinstr,  and  mvwinstr.   ncurses
+       regards this inconsistency as an error in the standard.
 
 
 

SEE ALSO

-       curses(3x),    curs_inch(3x),     curs_inchstr(3x),     curs_instr(3x),
-       curs_in_wchstr(3x)
+       curs_instr(3x) describes comparable functions of the ncurses library in
+       its non-wide-character configuration.
+
+       curses(3x), curs_in_wch(3x), curs_in_wchstr(3x)
 
 
 
-ncurses 6.4                       2024-03-16                   curs_inwstr(3x)
+ncurses 6.5                       2024-06-08                   curs_inwstr(3x)