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