.Dt TTYNAME 3
.Os
.Sh NAME
-.Nm ttyname ,
.Nm isatty ,
+.Nm ttyname ,
.Nm ttyslot
.Nd get name of associated terminal (tty) from file descriptor
.Sh LIBRARY
.Lb libc
.Sh SYNOPSIS
.In unistd.h
-.Ft char *
-.Fn ttyname "int fd"
.Ft int
-.Fn isatty "int fd"
+.Fo isatty
+.Fa "int fildes"
+.Fc
+.Ft char *
+.Fo ttyname
+.Fa "int fildes"
+.Fc
.Ft int
-.Fn ttyslot void
+.Fo ttyslot
+.Fa void
+.Fc
.Sh DESCRIPTION
These functions operate on the system file descriptors for terminal
type devices.
.Fn isatty
function
determines if the file descriptor
-.Fa fd
+.Fa fildes
refers to a valid
terminal type device.
.Pp
gets the related device name of
a file descriptor for which
.Fn isatty
-is true
+is true.
.Pp
The
.Fn ttyslot
function
returns the null terminated name if the device is found and
.Fn isatty
-is true; otherwise
-a
+is true; otherwise, a
.Dv NULL
pointer is returned.
.Pp
The
.Fn ttyslot
-function
-returns the unit number of the device file if found; otherwise
-the value zero is returned.
+function returns the unit number of the device file if found;
+otherwise, the value zero is returned.
.Sh FILES
.Bl -tag -width /etc/ttys -compact
.It Pa /dev/\(**