
#include <lcio.h> int fterm(FILE *f);
fterm returns an indication of whether or not the stream
associated with the FILE object addressed by f is
assigned to an interactive terminal.
fattr contains the functionality of fterm in addition to
other capabilities and is a better choice in most cases.
fterm returns 0 for a nonterminal FILE. The fterm function
returns a nonzero value if the FILE is assigned to a TSO, CMS,
or OpenEdition terminal.
#include <lcio.h>
#include <stdio.h>
main()
{
int k;
k = fterm(stdout);
if (k == 0)
puts("File 'stdout' is not assigned to an interactive "
"terminal.");
else
puts("File 'stdout' is assigned to an interactive terminal.");
}
fattr, fopen, isatty
Copyright (c) 1998 SAS Institute Inc. Cary, NC, USA. All rights reserved.