The Single UNIX ® Specification, Version 2
Copyright © 1997 The Open Group

 NAME

getn_wstr, get_wstr, mvgetn_wstr, mvget_wstr, mvwgetn_wstr, mvwget_wstr, wgetn_wstr, wget_wstr - get an array of wide characters and function key codes from a terminal

 SYNOPSIS



#include <curses.h>

int getn_wstr(wchar_t *wstr, int n);

int get_wstr(wchar_t *wstr);

int mvgetn_wstr(int y, int x, wchar_t *wstr, int n);

int mvget_wstr(int y, int x, wchar_t *wstr);

int mvwgetn_wstr(WINDOW *win, int y, int x, wchar_t *wstr, int n);

int mvwget_wstr(WINDOW *win, int y, int x, wchar_t *wstr);

int wgetn_wstr(WINDOW *win, wchar_t *wstr, int n);

int wget_wstr(WINDOW *win, wchar_t *wstr);

 DESCRIPTION

The effect of get_wstr() is as though a series of calls to get_wch() were made, until a newline character, end-of-line character, or end-of-file character is processed. An end-of-file character is represented by WEOF, as defined in <wchar.h>. A newline or end-of-line is represented as its wchar_t value. In all instances, the end of the string is terminated by a null wchar_t. The resulting values are placed in the area pointed to by wstr.

The user's erase and kill characters are interpreted and affect the sequence of characters returned.

The effect of wget_wstr() is as though a series of calls to wget_wch() were made.

The effect of mvget_wstr() is as though a call to move() and then a series of calls to get_wch() were made. The effect of mvwget_wstr() is as though a call to wmove() and then a series of calls to wget_wch() were made. The effect of mvgetn_wstr() is as though a call to move() and then a series of calls to get_wch() were made. The effect of mvwgetn_wstr() is as though a call to wmove() and then a series of calls to wget_wch() were made.

The getn_wstr(), mvgetn_wstr(), mvwgetn_wstr() and wgetn_wstr() functions read at most n characters, letting the application prevent overflow of the input buffer.

 RETURN VALUE

Upon successful completion, these functions return OK. Otherwise, they return ERR.

 ERRORS

No errors are defined.

 APPLICATION USAGE

Reading a line that overflows the array pointed to by wstr with get_wstr(), mvget_wstr(), mvwget_wstr() or wget_wstr() causes undefined results. The use of getn_wstr(), mvgetn_wstr(), mvwgetn_wstr() or wgetn_wstr(), respectively, is recommended.

These functions cannot return KEY_ values as there is no way to distinguish a KEY_ value from a valid wchar_t value.

 SEE ALSO

get_wch(), getstr(), <curses.h>, <wchar.h> (in the XSH specification), XBD specification, General Terminal Interface  .

UNIX ® is a registered Trademark of The Open Group.
Copyright © 1997 The Open Group
[ Main Index | XSH | XCU | XBD | XCURSES | XNS ]