Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

curs_instr(3curses) [linux man page]

curs_instr(3CURSES)                                          Curses Library Functions                                          curs_instr(3CURSES)

NAME
curs_instr, instr, innstr, winstr, winnstr, mvinstr, mvinnstr, mvwinstr, mvwinnstr - get a string of characters from a curses window SYNOPSIS
cc [ flag ... ] file ... -lcurses [ library ... ] #include <curses.h> int instr(char *str); int innstr(char *str, int n); int winstr(WINDOW *win, char *str); int winnstr(WINDOW *win, char *str, int n); int mvinstr(int y, int x, char *str); int mvinnstr(int y, int x, char *str, int n); int mvwinstr(WINDOW *win, int y, int x, char *str); int mvwinnstr(WINDOW *win, int y, int x, char *str, int n); DESCRIPTION
These routines return a string of characters in str, starting at the current cursor position in the named window and ending at the right margin of the window. Attributes are stripped from the characters. The four functions with n as the last argument return the string at most n characters long. RETURN VALUES
All routines return the integer ERR upon failure and an integer value other than ERR upon successful completion. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |MT-Level |Unsafe | +-----------------------------+-----------------------------+ SEE ALSO
curses(3CURSES), attributes(5) NOTES
The header <curses.h> automatically includes the headers <stdio.h> and <unctrl.h>. Note that all routines except winnstr() may be macros. SunOS 5.10 31 Dec 1996 curs_instr(3CURSES)

Check Out this Related Man Page

innstr(3XCURSES)					  X/Open Curses Library Functions					  innstr(3XCURSES)

NAME
innstr, instr, mvinnstr, mvinstr, mvwinnstr, mvwinstr, winnstr, winstr - retrieve a multibyte character string (without rendition) SYNOPSIS
cc [ flag... ] file... -I /usr/xpg4/include -L /usr/xpg4/lib -R /usr/xpg4/lib -lcurses [ library... ] c89 [ flag... ] file... -lcurses [ library... ] :#include <curses.h> int innstr(char *str, int n); int instr(char *str); int mvinnstr(int y, int x, char *str, int n); int mvinstr(int y, int x, char *str); int mvwinnstr(WINDOW *win, int y, int x, char *str, int n); int mvwinstr(WINDOW *win, int y, int x, char *str); int winstr(WINDOW *win, char *str); int winnstr(WINDOW *win, char *str, int n); PARAMETERS
str Is a pointer to an object that can hold the retrieved multibyte character string. n Is the number of characters not to exceed when retrieving str. y Is the y (row) coordinate of the starting position of the string to be retrieved. x Is the x (column) coordinate of the starting position of the string to be retrieved. win Is a pointer to the window in which the string is to be retrieved. DESCRIPTION
The instr() and winstr() functions retrieve a multibyte character string (without attributes) starting at the current cursor position of the stdscr window and window win, respectively, and ending at the right margin. The mvinstr() and mvwinstr() functions retrieve a multibyte character string located at the position indicated by the x (column) and y (row) parameters (the former in the stdscr window; the latter in window win). The innstr(), winnstr(), mvinnstr(), and mvwinnstr() functions retrieve at most n characters from the window stdscr and win, respec- tively. The former two functions retrieve the string starting at the current cursor position; the latter two commands return the string, starting at the position specified by the x and y parameters. All these functions store the retrieved string in the object pointed to by str. They only store complete multibyte characters. If the area pointed to by str is not large enough to hold at least one character, these functions fail. Only the character portion of the character/rendition pair is returned. To return the complete character/rendition pair, use winchstr(). ERRORS
OK Successful completion. ERR An error occurred. USAGE
All functions except winnstr() may be macros. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Standard | +-----------------------------+-----------------------------+ |MT-Level |Unsafe | +-----------------------------+-----------------------------+ SEE ALSO
inch(3XCURSES), inchstr(3XCURSES), libcurses(3XCURSES), attributes(5), standards(5) SunOS 5.10 5 Jun 2002 innstr(3XCURSES)
Man Page