7 unit_chk(Unit
, who
) integer Unit
; char *who
;
9 unit_chk(integer Unit
, char *who
)
12 if (Unit
>= MXUNIT
|| Unit
< 0)
14 return f__units
[Unit
].ufd
;
19 G77_ftell_0 (Unit
) integer
*Unit
;
21 G77_ftell_0 (integer
*Unit
)
25 return (f
= unit_chk(*Unit
, "ftell")) ? (integer
) FTELL(f
) : -1L;
30 G77_fseek_0 (Unit
, offset
, xwhence
) integer
*Unit
, *offset
, *xwhence
;
32 G77_fseek_0 (integer
*Unit
, integer
*offset
, integer
*xwhence
)
36 int w
= (int)*xwhence
;
38 static int wohin
[3] = { SEEK_SET
, SEEK_CUR
, SEEK_END
};
45 return !(f
= unit_chk(*Unit
, "fseek"))
46 || FSEEK(f
, (off_t
) *offset
, w
) ? 1 : 0;