.TH TTYINFO 3 
.SH NAME
gettient, gettiname, settient, endtient \- get tty info file entry
.SH SYNOPSIS
.nf
.B #include <carl/ttyinfo.h>
.PP
.B struct ttyinfo *gettient()
.PP
.B struct ttyinfo *gettinam(name)
.B char *name;
.PP
.B int settient()
.PP
.B int endtient()
.fi
.SH DESCRIPTION
.B gettient
and
.B gettinam
each return a pointer to an object with the
following structure
containing the broken-out
fields of a line in the tty info file.
.RS
.PP
.nf
.so /usr/include/carl/ttyinfo.h
.ft R
.ad
.fi
.RE
.PP
.PP
.B gettient
reads the next
line (opening the file if necessary);
.B settient
rewinds the file;
.B endtient
closes it.
.PP
.B gettinam
searches from the beginning until a matching
.I name
is found
(or until EOF is encountered).
.SH FILES
/usr/local/lib/ttyinfo
.SH DIAGNOSTICS
Null pointer
(0) returned on EOF or error.
.SH BUGS
All information
is contained in a static area
so it must be copied if it is
to be saved.
.PP
Since
.B gettient
opens the file (if it wasn't opened with
.B settient)
and doesn't close it, the file should be
closed with
.B endtient
when it is no longer being used.
