From: ceriel Date: Tue, 31 Mar 1987 10:05:26 +0000 (+0000) Subject: made more portable X-Git-Tag: release-5-5~4268 X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=2fba4e5e992d98a4478d120349d05def15a0c9f5;p=ack.git made more portable --- diff --git a/lang/pc/libpc/ini.c b/lang/pc/libpc/ini.c index bf995862e..489ea7d49 100644 --- a/lang/pc/libpc/ini.c +++ b/lang/pc/libpc/ini.c @@ -24,7 +24,7 @@ extern (*_sig())(); extern _catch(); #ifndef CPM -extern int ioctl(); +extern int gtty(); #endif char *_hbase; @@ -37,7 +37,7 @@ char **_penvp; _ini(args,hb,p,mainlb) char *args,*hb,*mainlb; int *p; { struct file *f; - char buf[6]; + char buf[128]; _pargc= *(int *)args; args += sizeof (int); _pargv= *(char ***)args; args += sizeof (char **); @@ -66,7 +66,7 @@ _ini(args,hb,p,mainlb) char *args,*hb,*mainlb; int *p; { #ifdef CPM f->count = 1; #else - f->count = (ioctl(1,(('t'<<8)|8),buf) == 0 ? 1 : 512); + f->count = (gtty(1,buf) >= 0 ? 1 : 512); #endif f->buflen = f->count; }