Annotation of cci/usr/src/man/man3/termcap.3x, revision 1.1

1.1     ! root        1: .TH TERMCAP 3X "9 February 1983"
        !             2: .UC 4
        !             3: .SH NAME
        !             4: tgetent, tgetnum, tgetflag, tgetstr, tgoto, tputs \- terminal independent operation routines
        !             5: .SH SYNOPSIS
        !             6: .nf
        !             7: .B char PC;
        !             8: .B char *BC;
        !             9: .B char *UP;
        !            10: .B short ospeed;
        !            11: .PP
        !            12: .B tgetent(bp, name)
        !            13: .B char *bp, *name;
        !            14: .PP
        !            15: .B tgetnum(id)
        !            16: .B char *id;
        !            17: .PP
        !            18: .B tgetflag(id)
        !            19: .B char *id;
        !            20: .PP
        !            21: .B char *
        !            22: .B tgetstr(id, area)
        !            23: .B char *id, **area;
        !            24: .PP
        !            25: .B char *
        !            26: .B tgoto(cm, destcol, destline)
        !            27: .B char *cm;
        !            28: .PP
        !            29: .B tputs(cp, affcnt, outc)
        !            30: .B register char *cp;
        !            31: .B int affcnt;
        !            32: .B int (*outc)();
        !            33: .fi
        !            34: .SH DESCRIPTION
        !            35: These functions extract and use capabilities from the terminal capability data
        !            36: base
        !            37: .IR termcap (5).
        !            38: These are low level routines;
        !            39: see
        !            40: .IR curses (3X)
        !            41: for a higher level package.
        !            42: .PP
        !            43: .I Tgetent
        !            44: extracts the entry for terminal
        !            45: .I name
        !            46: into the buffer at
        !            47: .I bp.
        !            48: .I Bp
        !            49: should be a character buffer of size
        !            50: 1024 and must be retained through all subsequent calls
        !            51: to
        !            52: .I tgetnum,
        !            53: .I tgetflag,
        !            54: and
        !            55: .I tgetstr.
        !            56: .I Tgetent
        !            57: returns \-1 if it cannot open the
        !            58: .I termcap
        !            59: file, 0 if the terminal name given does not have an entry,
        !            60: and 1 if all goes well.
        !            61: It will look in the environment for a TERMCAP variable.
        !            62: If found, and the value does not begin with a slash,
        !            63: and the terminal type
        !            64: .B name
        !            65: is the same as the environment string TERM,
        !            66: the TERMCAP string is used instead of reading the termcap file.
        !            67: If it does begin with a slash, the string is used as a path name rather than
        !            68: .I /etc/termcap.
        !            69: This can speed up entry into programs that call
        !            70: .IR tgetent ,
        !            71: as well as to help debug new terminal descriptions
        !            72: or to make one for your terminal if you can't write the file
        !            73: .I /etc/termcap.
        !            74: .PP
        !            75: .I Tgetnum
        !            76: gets the numeric value of capability
        !            77: .I id,
        !            78: returning \-1 if is not given for the terminal.
        !            79: .I Tgetflag
        !            80: returns 1 if the specified capability is present in
        !            81: the terminal's entry, 0 if it is not.
        !            82: .I Tgetstr
        !            83: gets the string value of capability
        !            84: .I id,
        !            85: placing it in the buffer at
        !            86: .I area,
        !            87: advancing the
        !            88: .I area
        !            89: pointer.
        !            90: It decodes the abbreviations for this field described in
        !            91: .IR termcap (5),
        !            92: except for cursor addressing and padding information.
        !            93: .PP
        !            94: .I Tgoto
        !            95: returns a cursor addressing string decoded from
        !            96: .I cm
        !            97: to go to column
        !            98: .I destcol
        !            99: in line
        !           100: .I destline.
        !           101: It uses the external variables
        !           102: .B UP
        !           103: (from the \fBup\fR capability)
        !           104: and
        !           105: .B BC
        !           106: (if \fBbc\fR is given rather than \fBbs\fR)
        !           107: if necessary to avoid placing \fB\en\fR, \fB^D\fR or \fB^@\fR in
        !           108: the returned string.
        !           109: (Programs which call tgoto should be sure to turn off the XTABS bit(s),
        !           110: since
        !           111: .I tgoto
        !           112: may now output a tab.
        !           113: Note that programs using termcap should in general turn off XTABS
        !           114: anyway since some terminals use control I for other functions,
        !           115: such as nondestructive space.)
        !           116: If a \fB%\fR sequence is given which is not understood, then
        !           117: .I tgoto
        !           118: returns \*(lqOOPS\*(rq.
        !           119: .PP
        !           120: .I Tputs
        !           121: decodes the leading padding information of the string
        !           122: .IR cp ;
        !           123: .I affcnt
        !           124: gives the number of lines affected by the operation, or 1 if this is
        !           125: not applicable,
        !           126: .I outc
        !           127: is a routine which is called with each character in turn.
        !           128: The external variable
        !           129: .I ospeed
        !           130: should contain the output speed of the terminal as encoded by
        !           131: .IR stty (3).
        !           132: The external variable
        !           133: .B PC
        !           134: should contain a pad character to be used (from the \fBpc\fR capability)
        !           135: if a null (\fB^@\fR) is inappropriate.
        !           136: .SH FILES
        !           137: .ta \w'/usr/lib/libtermcap.a  'u
        !           138: /usr/lib/libtermcap.a  \-ltermcap library
        !           139: .br
        !           140: /etc/termcap   data base
        !           141: .DT
        !           142: .SH SEE ALSO
        !           143: ex(1), curses(3X), termcap(5)
        !           144: .SH AUTHOR
        !           145: William Joy

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.