Various fixes, add spell.
This commit is contained in:
parent
fb7cc74a92
commit
d49a2e4801
12 changed files with 1452 additions and 33 deletions
|
|
@ -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);
|
||||
|
|
@ -257,18 +258,6 @@ isreg(char *f)
|
|||
return(!(dir.mode&DMDIR));
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue