Loading...
--- Libc/Libc-262/gen/ttyname.3
+++ Libc/Libc-498/gen/ttyname.3
@@ -30,26 +30,32 @@
.\" SUCH DAMAGE.
.\"
.\" @(#)ttyname.3 8.1 (Berkeley) 6/4/93
-.\" $FreeBSD: src/lib/libc/gen/ttyname.3,v 1.9 2001/10/01 16:08:51 ru Exp $
+.\" $FreeBSD: src/lib/libc/gen/ttyname.3,v 1.10 2002/12/18 13:33:02 ru Exp $
.\"
.Dd June 4, 1993
.Dt TTYNAME 3
.Os
.Sh NAME
+.Nm isatty ,
.Nm ttyname ,
-.Nm isatty ,
.Nm ttyslot
.Nd get name of associated terminal (tty) from file descriptor
.Sh LIBRARY
.Lb libc
.Sh SYNOPSIS
.In unistd.h
+.Ft int
+.Fo isatty
+.Fa "int fildes"
+.Fc
.Ft char *
-.Fn ttyname "int fd"
+.Fo ttyname
+.Fa "int fildes"
+.Fc
.Ft int
-.Fn isatty "int fd"
-.Ft int
-.Fn ttyslot void
+.Fo ttyslot
+.Fa void
+.Fc
.Sh DESCRIPTION
These functions operate on the system file descriptors for terminal
type devices.
@@ -59,7 +65,7 @@
typedef, but refer to the special device files found in
.Pa /dev
and named
-.Pa /dev/tty Ns Em xx
+.Pa /dev/tty Ns Ar xx
and for which an entry exists
in the initialization file
.Pa /etc/ttys .
@@ -70,7 +76,7 @@
.Fn isatty
function
determines if the file descriptor
-.Fa fd
+.Fa fildes
refers to a valid
terminal type device.
.Pp
@@ -80,7 +86,7 @@
gets the related device name of
a file descriptor for which
.Fn isatty
-is true
+is true.
.Pp
The
.Fn ttyslot
@@ -94,16 +100,14 @@
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/\(**