@c ----------------------------------------------------------------------
@node ttyname, unix
@heading @code{ttyname}
@subheading Syntax

@example
#include <osfcn.h>

char *ttyname(int file);
@end example

@subheading Description

Gives the name of the terminal associated with @var{file}. 

@subheading Return Value

Returns "/dev/con" if @var{file} is a device, else @code{NULL}.

@subheading Example

@example
char *tty = ttyname(0);
@end example

