getstr(3ncurses)


NAME

   getstr, getnstr, wgetstr, wgetnstr, mvgetstr, mvgetnstr, mvwgetstr,
   mvwgetnstr - accept character strings from curses terminal keyboard

SYNOPSIS

   #include <curses.h>

   int getstr(char *str);
   int getnstr(char *str, int n);
   int wgetstr(WINDOW *win, char *str);
   int wgetnstr(WINDOW *win, char *str, int n);
   int mvgetstr(int y, int x, char *str);
   int mvwgetstr(WINDOW *win, int y, int x, char *str);
   int mvgetnstr(int y, int x, char *str, int n);
   int mvwgetnstr(WINDOW *, int y, int x, char *str, int n);

DESCRIPTION

   The function getstr is equivalent to a series of calls to getch,  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.

   wgetnstr  reads  at  most  n  characters,  thus  preventing  a possible
   overflow of the input buffer.  Any attempt  to  enter  more  characters
   (other  than the terminating newline or carriage return) causes a beep.
   Function keys also cause a beep and are ignored.  The getnstr  function
   reads from the stdscr default window.

   The  user's  erase and kill characters are interpreted.  If keypad mode
   is on for the window, KEY_LEFT and KEY_BACKSPACE  are  both  considered
   equivalent to the user's kill character.

   Characters  input  are  echoed  only  if echo is currently on.  In that
   case, backspace  is  echoed  as  deletion  of  the  previous  character
   (typically a left motion).

RETURN VALUE

   All  routines  return  the  integer  ERR  upon  failure and an OK (SVr4
   specifies only "an integer  value  other  than  ERR")  upon  successful
   completion.

   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.

   This implementation provides an  extension  as  well.   If  a  SIGWINCH
   interrupts  the  function,  it will return KEY_RESIZE rather than OK or
   ERR.

   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.

NOTES

   Note that getstr, mvgetstr, and mvwgetstr may be macros.

PORTABILITY

   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 wgetch 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",
   without 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  getnstr, mvgetnstr, and mvwgetnstr were present but not
   documented in SVr4.

SEE ALSO

   ncurses(3NCURSES), getch(3NCURSES), curses_variables(3NCURSES).

                                                          getstr(3NCURSES)


More Linux Commands

manpages/sane-sm3840.5.html
sane-sm3840(5) - SANE backend for Microtek scanners with SCA
The sane-sm3840 library implements a SANE (Scanner Access Now Easy) backend that provides access to some Microtek scanners with the SCAN08 USB chip. There exist

manpages/res_init.3.html
res_init(3) - resolver routines (Library - Linux man page)
These functions make queries to and interpret the responses from Internet domain name servers. The res_init() function reads the configuration files (see resolv

manpages/NetworkManager.conf.5.html
NetworkManager.conf(5) - NetworkManager configuration file
This is a configuration file for NetworkManager. It is used to set up various aspects of NetworkManagers behavior. The location of the file may be changed throu

manpages/DPMSEnable.3.html
DPMSEnable(3) - enables DPMS on the specified display.......
The DPMSEnable function enables Display Power Management Signaling (DPMS) on the specified display. When DPMS is enabled, DPMS will use the currently saved time

manpages/Tcl_Close.3.html
Tcl_Close(3) - buffered I/O facilities using channels.......
The Tcl channel mechanism provides a device-independent and platform-independent mechanism for performing buffered input and output operations on a variety of f

manpages/Text::Abbrev.3pm.html
Text::Abbrev(3pm) - create an abbreviation table from a list
Stores all unambiguous truncations of each element of LIST as keys in the associative array referenced by $hashref. The values are the original list elements. E

manpages/mvcur.3ncurses.html
mvcur(3ncurses) - curses interfaces to terminfo database....
These low-level routines must be called by programs that have to deal directly with the terminfo database to handle certain terminal capabilities, such as progr

manpages/XTestQueryExtension.3.html
XTestQueryExtension(3) - XTest extension functions (ManPage)
This extension is a minimal set of client and server extensions required to completely test the X11 server with no user intervention. This extension is not inte

manpages/ether_ntoa.3.html
ether_ntoa(3) - Ethernet address manipulation routines......
ether_aton() converts the 48-bit Ethernet host address asc from the standard hex-digits-and-colons notation into binary data in network byte order and returns a

manpages/gnutls_transport_set_errno.3.html
gnutls_transport_set_errno(3) - API function (Man Page).....
Store err in the session-specific errno variable. Useful values for err is EAGAIN and EINTR, other values are treated will be treated as real errors in the push

manpages/getuid.2.html
getuid(2) - get user identity (System - Linux man page).....
getuid() returns the real user ID of the calling process. geteuid() returns the effective user ID of the calling process. ERRORS These functions are always succ

manpages/podofopages.1.html
podofopages(1) move and delete pages in a PDF document......
podofopages is one of the command line tools from the PoDoFo library that provide several useful operations to work with PDF files. It can move and delete pages





We can't live, work or learn in freedom unless the software we use is free.