aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/test.c
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2004-03-09 12:45:12 +0000
committerrsc <devnull@localhost>2004-03-09 12:45:12 +0000
commitd49a2e4801752c8a1211c7fac8cc08055a6b6fa5 (patch)
tree509d01c729341305f12abc34521276a4ccdb27ce /src/cmd/test.c
parentfb7cc74a929c86ef1c84a971d7a05deaf4d30c85 (diff)
downloadplan9port-d49a2e4801752c8a1211c7fac8cc08055a6b6fa5.tar.gz
plan9port-d49a2e4801752c8a1211c7fac8cc08055a6b6fa5.tar.bz2
plan9port-d49a2e4801752c8a1211c7fac8cc08055a6b6fa5.zip
Various fixes, add spell.
Diffstat (limited to 'src/cmd/test.c')
-rw-r--r--src/cmd/test.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/src/cmd/test.c b/src/cmd/test.c
index 0282f198..ef4b8170 100644
--- a/src/cmd/test.c
+++ b/src/cmd/test.c
@@ -12,6 +12,8 @@
#include <libc.h>
#define EQ(a,b) ((tmp=a)==0?0:(strcmp(tmp,b)==0))
+extern int isatty(int); /* <unistd.h> */
+
int ap;
int ac;
char **av;
@@ -21,7 +23,6 @@ void synbad(char *, char *);
int fsizep(char *);
int isdir(char *);
int isreg(char *);
-int isatty(int);
int isint(char *, int *);
int hasmode(char *, ulong);
int tio(char *, int);
@@ -258,18 +259,6 @@ isreg(char *f)
}
int
-isatty(int fd)
-{
- Dir d1, d2;
-
- if(localfstat(fd, &d1) < 0)
- return 0;
- if(localstat("/dev/cons", &d2) < 0)
- return 0;
- return d1.type==d2.type && d1.dev==d2.dev && d1.qid.path==d2.qid.path;
-}
-
-int
fsizep(char *f)
{
Dir dir;