United States-English |
|
|
HP-UX Reference > Ggetn_wstr(3X)ENHANCED CURSESHP-UX 11i Version 3: February 2007 |
|
NAMEgetn_wstr(), get_wstr(), mvget_wstr(), mvgetn_wstr(), mvwget_wstr(), mvwgetn_wstr(), wget_wstr(), wgetn_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); DESCRIPTIONThe 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 mvget_nwstr() is as though a call to move() and then a series of calls to get_wch() were made. The effect of mvwget_nwstr() 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. APPLICATION USAGEReading 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 ALSOget_wch(3X), getstr(3X), <curses.h>, <wchar.h>. X/Open System Interfaces and Headers, Issue 4, Version 2 X/Open System Interface Definitions, Issue 4, Version 2, Chapter 9, "General Terminal Interface". |
Printable version | ||
|