2.9BSD/usr/src/lib/c/gen/isatty.c

Compare this file to the similar file:
Show the results in this format:

/*	@(#)isatty.c	2.1	SCCS id keyword	*/
/*
 * Returns 1 iff file is a tty
 */

#include <sgtty.h>

isatty(f)
{
	struct sgttyb ttyb;

	if (gtty(f, &ttyb) < 0)
		return(0);
	return(1);
}