11970Swnj /* 235453Sbostic * Copyright (c) 1988 The Regents of the University of California. 335453Sbostic * All rights reserved. 435453Sbostic * 535453Sbostic * Redistribution and use in source and binary forms are permitted 635453Sbostic * provided that the above copyright notice and this paragraph are 735453Sbostic * duplicated in all such forms and that any documentation, 835453Sbostic * advertising materials, and other materials related to such 935453Sbostic * distribution and use acknowledge that the software was developed 1035453Sbostic * by the University of California, Berkeley. The name of the 1135453Sbostic * University may not be used to endorse or promote products derived 1235453Sbostic * from this software without specific prior written permission. 1335453Sbostic * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 1435453Sbostic * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 1535453Sbostic * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. 161970Swnj */ 171970Swnj 1835453Sbostic #if defined(LIBC_SCCS) && !defined(lint) 19*40100Smarc static char sccsid[] = "@(#)isatty.c 5.4 (Berkeley) 02/15/90"; 2035453Sbostic #endif /* LIBC_SCCS and not lint */ 2135453Sbostic 22*40100Smarc #include <termios.h> 231970Swnj 2435453Sbostic isatty(fd) 2535453Sbostic int fd; 261970Swnj { 27*40100Smarc struct termios t; 281970Swnj 29*40100Smarc return(tcgetattr(fd, &t) != -1); 301970Swnj } 31