1: /* @(#)isapipe.c 2.1 SCCS id keyword */
2: /*
3: * Returns 1 if file is a pipe or other non-seekable device
4: */
5:
6: #include <errno.h>
7:
8: extern errno;
9: long lseek();
10:
11: isapipe(f)
12: int f;
13: {
14: return(lseek(f, 0L, 1) < 0 && errno == ESPIPE);
15: }