diff options
| author | Jakob Kaivo <jkk@ung.org> | 2024-01-31 16:44:28 -0500 |
|---|---|---|
| committer | Jakob Kaivo <jkk@ung.org> | 2024-01-31 16:44:28 -0500 |
| commit | 2bc46bd54cc8cdcd7647461f2d76384266f2a0e4 (patch) | |
| tree | 52b77d68abbe5f971f63d2c82df8e933b831b521 /src/unistd/isatty.c | |
| parent | a05e8f1436eecb990d68bc1de8ba28721f1f387d (diff) | |
remove unistd
Diffstat (limited to 'src/unistd/isatty.c')
| -rw-r--r-- | src/unistd/isatty.c | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/src/unistd/isatty.c b/src/unistd/isatty.c deleted file mode 100644 index 8b8b21c0..00000000 --- a/src/unistd/isatty.c +++ /dev/null @@ -1,35 +0,0 @@ -#if 0 - -#include <sys/types.h> -#include <unistd.h> -#include <termios.h> - -/** test for a terminal device **/ - -int isatty(int fildes) -{ - struct termios tios; - if (tcgetattr(fildes, &tios) == 0) { - /* errno set by tcgetattr() */ - #if 0 - errno = EBADF; /* ARGUMENT(fildes) is not a valid file descriptor */ - errno = ENOTTY; /* ARGUMENT(fildes) is not associated with a terminal */ - #endif - return 1; - } - return 0; -} - -/*** -checks whether the file descriptor ARGUMENT(fildes) is associated with a -terminal device. -***/ - -/* -RETURN(ZERO, ARGUMENT(fildes) is not a terminal) -RETURN(ONE, ARGUMENT(fildes) is a terminal device) -POSIX(1) -*/ - - -#endif |
