(Not in the ANSI standard)
#include <sdgstd.h> i = istty(f);
"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.