.th ttyn IV 4/21/86
.sh NAME
ttyn \*- return name of current terminal
.sh SYNOPSIS
ttyn(fildes)
.s3
int fildes;
.ft R
.sh DESCRIPTION
Ttyn hunts up the last character of the name of the terminal which is
the standard input (from as) or is specified by the argument file
descriptor (from C).  If n is returned, the terminal name is then
``/dev/ttyn''.
.s3
x
is returned if the indicated file does not correspond to a
terminal.
.sh "SEE ALSO"
None.
.sh DIAGNOSTICS
None.
