ISTTY - determine if I/O unit is a terminal.

(Not in the ANSI standard)

Usage:

#include <sdgstd.h>
i = istty(f);

Where:

FILE *f;
points to the I/O unit whose status is to be determined.
int i;
is non-zero if the file pointer is associated with a terminal, and is zero otherwise.

Description:

"istty" returns a non-zero value if the file pointer "f" is associated with a terminal; otherwise it returns zero. Thus "istty(stdout)" is non-zero if "stdout" is associated with the terminal and is zero if "stdout" has been redirected to a file.

Copyright 1996, Thinkage Ltd.