4.4BSD/usr/src/lib/libcurses/PSD.doc/intro.2.tbl

.if !\n(.g .ab GNU tbl requires GNU troff.
.if !dTS .ds TS
.if !dTE .ds TE
.lf 1 intro.2
.\" Copyright (c) 1980, 1993
.\"	The Regents of the University of California.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in the
.\"    documentation and/or other materials provided with the distribution.
.\" 3. All advertising materials mentioning features or use of this software
.\"    must display the following acknowledgement:
.\"	This product includes software developed by the University of
.\"	California, Berkeley and its contributors.
.\" 4. Neither the name of the University nor the names of its contributors
.\"    may be used to endorse or promote products derived from this software
.\"    without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\"	@(#)intro.2	8.1 (Berkeley) 6/4/93
.\"
.sh 1 Variables
.pp
Many variables which are used to describe the terminal environment
are available to the programmer. They are:
.(b
.TS
.nr 3c \n(.C
.cp 0
.nr 3lps \n[.s]
.nr 3cent \n[.ce]
.de 3init
.ft \n[.f]
.ps \n[.s]
.vs \n[.v]u
.in \n[.i]u
.ll \n[.l]u
.ls \n[.L]
.ad \n[.j]
.ie \n[.u] .fi
.el .nf
.ce \n[.ce]
..
.nr 3ind \n[.i]
.nr 3fnt \n[.f]
.nr 3sz \n[.s]
.nr 3fll \n[.u]
.nr T. 0
.nr 3crow 0-1
.nr 3passed 0-1
.nr 3sflag 0
.ds 3trans
.ds 3quote
.nr 3brule 1
.nr 3supbot 0
.eo
.de 3rmk
.mk \$1
.if !'\n(.z'' \!.3rmk "\$1"
..
.de 3rvpt
.vpt \$1
.if !'\n(.z'' \!.3rvpt "\$1"
..
.de 3keep
.if '\n[.z]'' \{.ds 3quote \\
.ds 3trans \!
.di 3section
.nr 3sflag 1
.in 0
.\}
..
.de 3release
.if \n[3sflag] \{.di
.in \n[3ind]u
.nr 3dn \n[dn]
.ds 3quote
.ds 3trans
.nr 3sflag 0
.if \n[.t]<=\n[dn] \{.nr T. 1
.T#
.nr 3supbot 1
.sp \n[.t]u
.nr 3supbot 0
.mk #T
.\}
.if \n[.t]<=\n[3dn] .tm warning: page \n%: table text block will not fit on one page
.nf
.ls 1
.3section
.ls
.rm 3section
.\}
..
.nr 3tflag 0
.de 3tkeep
.if '\n[.z]'' \{.di 3table
.nr 3tflag 1
.\}
..
.de 3trelease
.if \n[3tflag] \{.br
.di
.nr 3dn \n[dn]
.ne \n[dn]u+\n[.V]u
.ie \n[.t]<=\n[3dn] .tm error: page \n%: table will not fit on one page; use .TS H/.TH with a supporting macro package
.el \{.in 0
.ls 1
.nf
.3table
.\}
.rm 3table
.\}
..
.ec
.ce 0
.nf
.nr 3sep 1n
.nr 3w0 \n(.H
.nr 3aw0 0
.nr 3lnw0 0
.nr 3rnw0 0
.nr 3w0 6m
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3aw0] .nr 3w0 \n[3w0]>?(\n[3aw0]+2n)
.nr 3w1 \n[3w1]>?(\n[3lnw1]+\n[3rnw1])
.if \n[3aw1] .nr 3w1 \n[3w1]>?(\n[3aw1]+2n)
.nr 3w2 \n[3w2]>?(\n[3lnw2]+\n[3rnw2])
.if \n[3aw2] .nr 3w2 \n[3w2]>?(\n[3aw2]+2n)
.di 3tbd1,2
.if \n[3fll] .fi
.in 0
.ll (n;50n)>?\n[3w2]u
.cp \n(3c
.lf 45
.fi
current version of the screen (terminal screen).
.br
.di
.cp 0
.nr 3w2 \n[3w2]>?\n[dl]
.nr 3tbh1,2 \n[dn]
.nr 3tbw1,2 \n[dl]
.3init
.in \n[3ind]u
.nf
.di 3tbd2,2
.if \n[3fll] .fi
.in 0
.ll (n;50n)>?\n[3w2]u
.cp \n(3c
.lf 49 intro.2
standard screen.  Most updates are usually done here.
.br
.di
.cp 0
.nr 3w2 \n[3w2]>?\n[dl]
.nr 3tbh2,2 \n[dn]
.nr 3tbw2,2 \n[dl]
.3init
.in \n[3ind]u
.nf
.di 3tbd3,2
.if \n[3fll] .fi
.in 0
.ll (n;50n)>?\n[3w2]u
.cp \n(3c
.lf 52 intro.2
default terminal type if type cannot be determined
.br
.di
.cp 0
.nr 3w2 \n[3w2]>?\n[dl]
.nr 3tbh3,2 \n[dn]
.nr 3tbw3,2 \n[dl]
.3init
.in \n[3ind]u
.nf
.di 3tbd4,2
.if \n[3fll] .fi
.in 0
.ll (n;50n)>?\n[3w2]u
.cp \n(3c
.lf 55 intro.2
use the terminal specification in \fIDef\*_term\fR as terminal,
irrelevant of real terminal type
.br
.di
.cp 0
.nr 3w2 \n[3w2]>?\n[dl]
.nr 3tbh4,2 \n[dn]
.nr 3tbw4,2 \n[dl]
.3init
.in \n[3ind]u
.nf
.di 3tbd5,2
.if \n[3fll] .fi
.in 0
.ll (n;50n)>?\n[3w2]u
.cp \n(3c
.lf 59 intro.2
full name of the current terminal.
.br
.di
.cp 0
.nr 3w2 \n[3w2]>?\n[dl]
.nr 3tbh5,2 \n[dn]
.nr 3tbw5,2 \n[dl]
.3init
.in \n[3ind]u
.nf
.di 3tbd6,2
.if \n[3fll] .fi
.in 0
.ll (n;50n)>?\n[3w2]u
.cp \n(3c
.lf 62 intro.2
number of lines on the terminal
.br
.di
.cp 0
.nr 3w2 \n[3w2]>?\n[dl]
.nr 3tbh6,2 \n[dn]
.nr 3tbw6,2 \n[dl]
.3init
.in \n[3ind]u
.nf
.di 3tbd7,2
.if \n[3fll] .fi
.in 0
.ll (n;50n)>?\n[3w2]u
.cp \n(3c
.lf 65 intro.2
number of columns on the terminal
.br
.di
.cp 0
.nr 3w2 \n[3w2]>?\n[dl]
.nr 3tbh7,2 \n[dn]
.nr 3tbw7,2 \n[dl]
.3init
.in \n[3ind]u
.nf
.di 3tbd8,2
.if \n[3fll] .fi
.in 0
.ll (n;50n)>?\n[3w2]u
.cp \n(3c
.lf 68 intro.2
error flag returned by routines on a fail.
.br
.di
.cp 0
.nr 3w2 \n[3w2]>?\n[dl]
.nr 3tbh8,2 \n[dn]
.nr 3tbw8,2 \n[dl]
.3init
.in \n[3ind]u
.nf
.di 3tbd9,2
.if \n[3fll] .fi
.in 0
.ll (n;50n)>?\n[3w2]u
.cp \n(3c
.lf 71 intro.2
flag returned by routines upon success.
.br
.di
.cp 0
.nr 3w2 \n[3w2]>?\n[dl]
.nr 3tbh9,2 \n[dn]
.nr 3tbw9,2 \n[dl]
.3init
.in \n[3ind]u
.nf
.nr 3sep \n[.l]-\n[.i]-\n[3w0]-\n[3w1]-\n[3w2]/6>?0
.nr 3cd0 0
.nr 3cl0 0*\n[3sep]
.nr 3ce0 \n[3cl0]+\n[3w0]
.nr 3cl1 \n[3ce0]+(3*\n[3sep])
.nr 3cd1 \n[3ce0]+\n[3cl1]/2
.nr 3ce1 \n[3cl1]+\n[3w1]
.nr 3cl2 \n[3ce1]+(3*\n[3sep])
.nr 3cd2 \n[3ce1]+\n[3cl2]/2
.nr 3ce2 \n[3cl2]+\n[3w2]
.nr 3cd3 \n[3ce2]+(0*\n[3sep])
.nr TW \n[3cd3]
.if \n[3cent] \{.in +(u;\n[.l]-\n[.i]-\n[TW]/2)
.nr 3ind \n[.i]
.\}
.eo
.de T#
.if !\n[3supbot] \{.3rvpt 0
.mk 3vert
.ls 1
.ls
.nr 3passed \n[3crow]
.sp |\n[3vert]u
.3rvpt 1
.\}
..
.ec
.fc 
.3keep
.3rmk 3rt0
\*[3trans].nr 3crow 0
.3keep
.mk 3rs0
.mk 3bot
.3rvpt 0
.ta \n[3ce0]u \n[3ce1]u \n[3ce2]u
.lf 42 intro.2
\&\h'|\n[3cl0]u'type\h'|\n[3cl1]u'name\h'|\n[3cl2]u'description
.nr 3bot \n[3bot]>?\n[.d]
.sp |\n[3rs0]u
.3rvpt 1
.sp |\n[3bot]u
\*[3trans].nr 3brule 1
.vs 2p>?\n[.V]u
.ls 1
\v'.25m'\s[\n[3lps]]\h'|\n[3cd0]u'\D'l |\n[3cd3]u 0'\s0
.ls
.vs
\*[3trans].nr 3brule 0
.3release
.3keep
.3rmk 3rt1
\*[3trans].nr 3crow 1
.3keep
.mk 3rs1
.mk 3bot
.3rvpt 0
.nr 3bot \n[3bot]>?(\n[3rs1]+\n[3tbh1,2])
.ta \n[3ce0]u \n[3ce1]u
.lf 44
\&\h'|\n[3cl0]u'WINDOW *\h'|\n[3cl1]u'curscr
.nr 3bot \n[3bot]>?\n[.d]
.sp |\n[3rs1]u
.in +\n[3cl2]u
.3tbd1,2
.in
.nr 3bot \n[3bot]>?\n[.d]
.sp |\n[3rs1]u
.3rvpt 1
.sp |\n[3bot]u
\*[3trans].nr 3brule 1
.3release
.3keep
.3rmk 3rt2
\*[3trans].nr 3crow 2
.3keep
.mk 3rs2
.mk 3bot
.3rvpt 0
.nr 3bot \n[3bot]>?(\n[3rs2]+\n[3tbh2,2])
.ta \n[3ce0]u \n[3ce1]u
.lf 48
\&\h'|\n[3cl0]u'WINDOW *\h'|\n[3cl1]u'stdscr
.nr 3bot \n[3bot]>?\n[.d]
.sp |\n[3rs2]u
.in +\n[3cl2]u
.3tbd2,2
.in
.nr 3bot \n[3bot]>?\n[.d]
.sp |\n[3rs2]u
.3rvpt 1
.sp |\n[3bot]u
\*[3trans].nr 3brule 1
.3release
.3keep
.3rmk 3rt3
\*[3trans].nr 3crow 3
.3keep
.mk 3rs3
.mk 3bot
.3rvpt 0
.nr 3bot \n[3bot]>?(\n[3rs3]+\n[3tbh3,2])
.ta \n[3ce0]u \n[3ce1]u
.lf 51
\&\h'|\n[3cl0]u'char *\h'|\n[3cl1]u'Def\*_term
.nr 3bot \n[3bot]>?\n[.d]
.sp |\n[3rs3]u
.in +\n[3cl2]u
.3tbd3,2
.in
.nr 3bot \n[3bot]>?\n[.d]
.sp |\n[3rs3]u
.3rvpt 1
.sp |\n[3bot]u
\*[3trans].nr 3brule 1
.3release
.3keep
.3rmk 3rt4
\*[3trans].nr 3crow 4
.3keep
.mk 3rs4
.mk 3bot
.3rvpt 0
.nr 3bot \n[3bot]>?(\n[3rs4]+\n[3tbh4,2])
.ta \n[3ce0]u \n[3ce1]u
.lf 54
\&\h'|\n[3cl0]u'bool\h'|\n[3cl1]u'My\*_term
.nr 3bot \n[3bot]>?\n[.d]
.sp |\n[3rs4]u
.in +\n[3cl2]u
.3tbd4,2
.in
.nr 3bot \n[3bot]>?\n[.d]
.sp |\n[3rs4]u
.3rvpt 1
.sp |\n[3bot]u
\*[3trans].nr 3brule 1
.3release
.3keep
.3rmk 3rt5
\*[3trans].nr 3crow 5
.3keep
.mk 3rs5
.mk 3bot
.3rvpt 0
.nr 3bot \n[3bot]>?(\n[3rs5]+\n[3tbh5,2])
.ta \n[3ce0]u \n[3ce1]u
.lf 58
\&\h'|\n[3cl0]u'char *\h'|\n[3cl1]u'ttytype
.nr 3bot \n[3bot]>?\n[.d]
.sp |\n[3rs5]u
.in +\n[3cl2]u
.3tbd5,2
.in
.nr 3bot \n[3bot]>?\n[.d]
.sp |\n[3rs5]u
.3rvpt 1
.sp |\n[3bot]u
\*[3trans].nr 3brule 1
.3release
.3keep
.3rmk 3rt6
\*[3trans].nr 3crow 6
.3keep
.mk 3rs6
.mk 3bot
.3rvpt 0
.nr 3bot \n[3bot]>?(\n[3rs6]+\n[3tbh6,2])
.ta \n[3ce0]u \n[3ce1]u
.lf 61
\&\h'|\n[3cl0]u'int\h'|\n[3cl1]u'LINES
.nr 3bot \n[3bot]>?\n[.d]
.sp |\n[3rs6]u
.in +\n[3cl2]u
.3tbd6,2
.in
.nr 3bot \n[3bot]>?\n[.d]
.sp |\n[3rs6]u
.3rvpt 1
.sp |\n[3bot]u
\*[3trans].nr 3brule 1
.3release
.3keep
.3rmk 3rt7
\*[3trans].nr 3crow 7
.3keep
.mk 3rs7
.mk 3bot
.3rvpt 0
.nr 3bot \n[3bot]>?(\n[3rs7]+\n[3tbh7,2])
.ta \n[3ce0]u \n[3ce1]u
.lf 64
\&\h'|\n[3cl0]u'int\h'|\n[3cl1]u'COLS
.nr 3bot \n[3bot]>?\n[.d]
.sp |\n[3rs7]u
.in +\n[3cl2]u
.3tbd7,2
.in
.nr 3bot \n[3bot]>?\n[.d]
.sp |\n[3rs7]u
.3rvpt 1
.sp |\n[3bot]u
\*[3trans].nr 3brule 1
.3release
.3keep
.3rmk 3rt8
\*[3trans].nr 3crow 8
.3keep
.mk 3rs8
.mk 3bot
.3rvpt 0
.nr 3bot \n[3bot]>?(\n[3rs8]+\n[3tbh8,2])
.ta \n[3ce0]u \n[3ce1]u
.lf 67
\&\h'|\n[3cl0]u'int\h'|\n[3cl1]u'ERR
.nr 3bot \n[3bot]>?\n[.d]
.sp |\n[3rs8]u
.in +\n[3cl2]u
.3tbd8,2
.in
.nr 3bot \n[3bot]>?\n[.d]
.sp |\n[3rs8]u
.3rvpt 1
.sp |\n[3bot]u
\*[3trans].nr 3brule 1
.3release
.3keep
.3rmk 3rt9
\*[3trans].nr 3crow 9
.3keep
.mk 3rs9
.mk 3bot
.3rvpt 0
.nr 3bot \n[3bot]>?(\n[3rs9]+\n[3tbh9,2])
.ta \n[3ce0]u \n[3ce1]u
.lf 70
\&\h'|\n[3cl0]u'int\h'|\n[3cl1]u'OK
.nr 3bot \n[3bot]>?\n[.d]
.sp |\n[3rs9]u
.in +\n[3cl2]u
.3tbd9,2
.in
.nr 3bot \n[3bot]>?\n[.d]
.sp |\n[3rs9]u
.3rvpt 1
.sp |\n[3bot]u
\*[3trans].nr 3brule 1
.3release
.mk 3rt10
.nr 3brule 1
.nr T. 1
.T#
.3init
.fc
.cp \n(3c
.lf 73
.TE
.fi
.ev
.)b
.lp