Manual Pages for UNIX Darwin command on man mvgetnstr
MyWebUniversity

Manual Pages for UNIX Darwin command on man mvgetnstr

cursgetstr(3X) cursgetstr(3X)

NAME

ggeettssttrr, ggeettnnssttrr, wwggeettssttrr, wwggeettnnssttrr, mmvvggeettssttrr, mmvvggeettnnssttrr, mmvvwwggeettssttrr,

mmvvwwggeettnnssttrr - accept character strings from ccuurrsseess terminal keyboard

SYNOPSIS

##iinncclluuddee <>

iinntt ggeettssttrr((cchhaarr **ssttrr));; iinntt ggeettnnssttrr((cchhaarr **ssttrr,, iinntt nn));; iinntt wwggeettssttrr((WWIINNDDOOWW **wwiinn,, cchhaarr **ssttrr));; iinntt wwggeettnnssttrr((WWIINNDDOOWW **wwiinn,, cchhaarr **ssttrr,, iinntt nn));; iinntt mmvvggeettssttrr((iinntt yy,, iinntt xx,, cchhaarr **ssttrr));; iinntt mmvvwwggeettssttrr((WWIINNDDOOWW **wwiinn,, iinntt yy,, iinntt xx,, cchhaarr **ssttrr));; iinntt mmvvggeettnnssttrr((iinntt yy,, iinntt xx,, cchhaarr **ssttrr,, iinntt nn));; iinntt mmvvwwggeettnnssttrr((WWIINNDDOOWW **,, iinntt yy,, iinntt xx,, cchhaarr **ssttrr,, iinntt nn));;

DESCRIPTION

The function ggeettssttrr is equivalent to a series of calls to ggeettcchh, until a newline or carriage return is received (the terminating character is not included in the returned string). The resulting value is placed in the area pointed to by the character pointer str.

wwggeettnnssttrr reads at most n characters, thus preventing a possible over-

flow of the input buffer. Any attempt to enter more characters (other

than the terminating newline or carriage return) causes a beep. Func-

tion keys also cause a beep and are ignored. The ggeettnnssttrr function reads from the stdscr default window. The user's erase and kill characters are interpreted. If keypad mode is on for the window, KKEEYYLLEEFFTT and KKEEYYBBAACCKKSSPPAACCEE are both considered equivalent to the user's kill character. Characters input are echoed only if eecchhoo is currently on. In that

case, backspace is echoed as deletion of the previous character (typi-

cally a left motion). RREETTUURRNN VVAALLUUEE

All routines return the integer EERRRR upon failure and an OOKK (SVr4 speci-

fies only "an integer value other than EERRRR") upon successful comple-

tion. X/Open defines no error conditions. In this implementation, these functions return an error if the window pointer is null, or if its timeout expires without having any data. NNOOTTEESS Note that ggeettssttrr, mmvvggeettssttrr, and mmvvwwggeettssttrr may be macros. PPOORRTTAABBIILLIITTYY These functions are described in the XSI Curses standard, Issue 4.

They read single-byte characters only. The standard does not define

any error conditions. This implementation returns ERR if the window

pointer is null, or if the lower-level wwggeettcchh call returns an ERR.

SVr3 and early SVr4 curses implementations did not reject function keys; the SVr4.0 documentation claimed that "special keys" (such as

function keys, "home" key, "clear" key, etc.) are "interpreted", with-

out giving details. It lied. In fact, the `character' value appended to the string by those implementations was predictable but not useful

(being, in fact, the low-order eight bits of the key's KEY value).

The functions ggeettnnssttrr, mmvvggeettnnssttrr, and mmvvwwggeettnnssttrr were present but not documented in SVr4.

SEE ALSO

ccuurrsseess(3X), ccuurrssggeettcchh(3X). cursgetstr(3X)




Contact us      |      About us      |      Term of use      |       Copyright © 2000-2019 MyWebUniversity.com ™