6 unit_chk(Unit, who) integer Unit; char *who;
8 unit_chk(integer Unit, char *who)
11 if (Unit >= MXUNIT || Unit < 0)
13 return f__units[Unit].ufd;
18 G77_ftell_0 (Unit) integer *Unit;
20 G77_ftell_0 (integer *Unit)
24 return (f = unit_chk(*Unit, "ftell")) ? ftell(f) : -1L;
29 G77_fseek_0 (Unit, offset, xwhence) integer *Unit, *offset, *xwhence;
31 G77_fseek_0 (integer *Unit, integer *offset, integer *xwhence)
35 int w = (int)*xwhence;
37 static int wohin[3] = { SEEK_SET, SEEK_CUR, SEEK_END };
44 return !(f = unit_chk(*Unit, "fseek"))
45 || fseek(f, *offset, w) ? 1 : 0;