made more portable
This commit is contained in:
parent
bc6486d7b0
commit
2fba4e5e99
|
@ -24,7 +24,7 @@
|
||||||
extern (*_sig())();
|
extern (*_sig())();
|
||||||
extern _catch();
|
extern _catch();
|
||||||
#ifndef CPM
|
#ifndef CPM
|
||||||
extern int ioctl();
|
extern int gtty();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
char *_hbase;
|
char *_hbase;
|
||||||
|
@ -37,7 +37,7 @@ char **_penvp;
|
||||||
|
|
||||||
_ini(args,hb,p,mainlb) char *args,*hb,*mainlb; int *p; {
|
_ini(args,hb,p,mainlb) char *args,*hb,*mainlb; int *p; {
|
||||||
struct file *f;
|
struct file *f;
|
||||||
char buf[6];
|
char buf[128];
|
||||||
|
|
||||||
_pargc= *(int *)args; args += sizeof (int);
|
_pargc= *(int *)args; args += sizeof (int);
|
||||||
_pargv= *(char ***)args; args += sizeof (char **);
|
_pargv= *(char ***)args; args += sizeof (char **);
|
||||||
|
@ -66,7 +66,7 @@ _ini(args,hb,p,mainlb) char *args,*hb,*mainlb; int *p; {
|
||||||
#ifdef CPM
|
#ifdef CPM
|
||||||
f->count = 1;
|
f->count = 1;
|
||||||
#else
|
#else
|
||||||
f->count = (ioctl(1,(('t'<<8)|8),buf) == 0 ? 1 : 512);
|
f->count = (gtty(1,buf) >= 0 ? 1 : 512);
|
||||||
#endif
|
#endif
|
||||||
f->buflen = f->count;
|
f->buflen = f->count;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue