This function tests whether the file descriptor fd is associated
with terminal device.
Since this function has a direct analog in Windows, the only
changes that should be needed are to rename the function in your
source code, and include the needed Windows header file.
Example of Use in Windows
#include <io.h>
if (_isatty(_fileno(stdout)))
printf("stdout has not been redirected.");
else
printf("stdout has been redirected.");