Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

term(5) [hpux man page]

term(5) 							File Formats Manual							   term(5)

NAME
term - terminal capabilities SYNOPSIS
DESCRIPTION
The following data type is defined through typedef: TERMINAL An opaque representation of the capabilities for a single terminal from the terminfo database. The header provides a declaration for the following object: cur_term . It represents the current terminal record from the terminfo data- base that the application has selected by calling The header contains the variable names listed in the Variable column in the table in Defined Capabilities in terminfo(4). The following are declared as functions, and may also be defined as macros: int del_curterm(TERMINAL *oterm); int putp(char *const str); int restartterm(char *term, int fildes, int *errret); TERMINAL * set_curterm(TERMINAL *nterm); int setupterm(char *term, int fildes, int *errret); int tgetent(char *bp, char *const name); int tgetflag(char id[2]); int tgetnum(char id[2]); char * tgetstr(char id[2], char **area); char * tgoto(char *const cap, int col, int row); int tigetflag(char *capname); int tigetnum(char *capname); char * tigetstr(char *capname); char * tparm(char *cap, long p1, long p2, long p3, long p4, long p5, long p6, long p7, long p8, long p9); int tputs(char *const str, int affcnt, int (*putfunc)(int)); SEE ALSO
terminfo(4), printf(1), putp(3X), tigetflag(3X), tgetent(3X), <curses.h>. CHANGE HISTORY
First released in X/Open Curses, Issue 4. ENHANCED CURSES term(5)

Check Out this Related Man Page

TERMINFO(3)						   BSD Library Functions Manual 					       TERMINFO(3)

NAME
setupterm, set_curterm, del_curterm, termname, longname, tigetflag, tigetnum, tigetstr, tparm, tputs, putp -- terminal independent operation routines LIBRARY
Terminal Information Library (libterminfo, -lterminfo) SYNOPSIS
#include <term.h> char PC; short ospeed; TERMINAL *cur_term; int setupterm(const char *name, int fildes, int *errret); TERMINAL * set_curterm(TERMINAL *nterm); int del_curterm(TERMINAL *oterm); char * termname(void); char * longname(void); int tigetnum(const char *id); int tigetflag(const char *id); char * tigetstr(const char *id); char * tparm(const char *cm, long p1, long p2, long p3, long p4, long p5, long p6, long p7, long p8, long p9); int tputs(const char *cp, int affcnt, int (*outc)(int)); int putp(const char *cp); int ti_setupterm(TERMINAL **, const char *name, int fildes, int *error); int ti_getflag(const TERMINAL *, const char *id); int ti_getnum(const TERMINAL *, const char *id); const char * ti_getstr(const TERMINAL *, const char *id); char * tiparm(const char *cm, ...); char * ti_tiparm(TERMINAL *, const char *cm, ...); int ti_puts(const TERMINAL *term, const char *str, int affcnt, int (*outc)(int, void *)); int ti_putp(const TERMINAL *term, const char *str); DESCRIPTION
These functions extract and use capabilities from a terminal capability database, usually /usr/share/misc/terminfo, the format of which is described in terminfo(5). These are low level routines; see curses(3) for a higher level package. The setupterm() function extracts the entry for terminal name and then calls set_curterm() to set cur_term to it. If name is NULL then it is replaced by the environment variable TERM. The setupterm() function returns 0 on success and -1 on error. errret is set to -1 if the terminfo database could not be opened, 0 if the terminal could not be found in the database, and 1 if all went well. The set_curterm() function sets the variable cur_term to nterm and makes all of the terminfo boolean, numeric and string variables use the values from nterm. The global variables PC and ospeed are then set. The old value of cur_term is returned. The del_curterm() function frees space pointed to by oterm. The termname() function returns the name of cur_term. The longname() function returns the description of cur_term. The tigetflag() function gets the boolean value of capability id, returning -1 if it is not a valid capability. The tigetnum() function gets the numeric value of the capability id, returning -2 if it is not a valid capability. The tigetstr() function returns the string value of the capability id, returning (char *)-1 if it is not a valid capability. The tparm() function returns a string decoded from cm with the parameters p1 ... p9 applied. Some capabilities require string parameters and only platforms that can fit a char * pointer inside a long can use them. For platforms which don't support this, NULL is returned and errno is set to ENOTSUPP. The string encoding and parameter application is described in terminfo(5). The tputs() function applies padding information to the string cp; affcnt gives the number of lines affected by the operation, or 1 if this is not applicable; outc is a function which is called by each character in turn. The external variable ospeed controls how many padding characters are sent in relation to the terminal speed. The putp() function calls tputs(str, 1, putchar). The output from putp() always goes to stdout. NetBSD Extensions To Terminfo The tiparm() function allows variadic parameters instead of 9 fixed longs. Numeric parameters must be passed as int. String parameters must be passed as char * and works on all platforms, unlike tparm(). The ti_*() functions correspond to the standard t*() functions but take an additional TERMINAL * parameter so that the terminal can be speci- fied instead of assuming cur_term. These functions use private variables to the TERMINAL instead of the global variables, such as PC and ospeed. SEE ALSO
ex(1), curses(3), terminfo(5) AUTHORS
Roy Marples <roy@NetBSD.org> BSD
January 25, 2013 BSD
Man Page