getstr.3cur

来自「<B>Digital的Unix操作系统VAX 4.2源码</B>」· 3CUR 代码 · 共 111 行

3CUR
111
字号
.TH getstr 3cur .SH Namegetstr, mvgetstr, mvwgetstr, wgetstr \- read string.SH Syntax.B#include <cursesX.h>.PP.Bint getstr(str).br.Bchar \(**str;.PP.Bint wgetstr(win, str).br.BWINDOW \(**win;.br.Bchar \(**str;.PP.Bint mvgetstr(y, x, str).br.Bint y, x;.br.Bchar \(**str;.PP.Bint mvwgetstr(win, y, x, str).br.BWINDOW \(**win;.br.Bint y, x;.br.Bchar \(**str;.SH Description.NXR "getstr macro".NXR "mvgetstr macro".NXR "mvwgetstr macro".NXR "wgetstr subroutine"The.PN getstrroutinereads characters from the terminal associated with the default window and stores them in abuffer until a carriage return or newline is received from.PN stdscr .The routine.PN getch Bis called by .PN getstr to read each character..PPThe routine.PN wgetstrreads characters from the terminal associated with the specified window.The characters are read from the current cursor positionuntil a newline or carriage return is received..PPThe routine.PN mvgetstrreads characters from the terminal associated with the default window.The characters are read from the specified cursor positionuntil a newline or carriage return is received..PPThe routine.PN mvwgetstrreads characters from the terminal associated with the specified window.The characters are read from the specified cursor positionuntil a newline or carriage return is received..PPThe following information applies to all the routines..PPThe resulting string is placed in the area pointed to by the character pointer .PN str .The user's erase and kill characters are interpreted.The area used to hold the string isassumed to be large enough to handle it, as .PN getstrdoes not check for buffer overflow.If the area is not large enough, the result will be unpredictable..PPThe routines .PN getstr, .PN mvgetstrand .PN mvwgetstrare macros..SH Return ValuesThe .PN getstr ,.PN mvgetstr ,.PN mvwgetstrand.PN wgetstrfunctions return OK on success and ERR on error..SH See Alsogetch(3cur)

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?