eb22cb50784b5a92e4599f0239e3958cfc93cf41
char id_util[] = "@(#)util.c 1.6";
extern short ccntrl_
, blzero_
;
p
->uwrt
= (w
==WRITE
)? YES
: NO
;
p
->uscrtch
= p
->uend
= NO
;
canseek(f
) FILE *f
; /*SYSDEP*/
return( (fstat(fileno(f
),&x
)==0) &&
(x
.st_nlink
> 0 /*!pipe*/) && !isatty(fileno(f
)) );
if (freopen(x
->ufnm
,mode
,x
->ufd
))
if (x
->ufd
= fopen(x
->ufnm
, (*mode
=='a')? "r":"a"))
g_char(a
,alen
,b
) char *a
,*b
; ftnlen alen
;
{ char *x
=a
+alen
-1, *y
=b
+alen
-1;
while (x
>= a
&& *x
== ' ') {x
--; y
--;}
while (x
>= a
) *y
-- = *x
--;
b_char(from
, to
, tolen
) char *from
, *to
; ftnlen tolen
;
while (*from
&& i
< tolen
) {
if(stat(a
,&x
)==0) return(x
.st_ino
);
if(fstat(fileno(f
),&x
)==0) return(x
.st_ino
);
if(ftell(f
)) return(getc(f
));