xref: /original-bsd/usr.bin/pascal/libpc/SEEK.c (revision 6c57d260)
1 /* Copyright (c) 1979 Regents of the University of California */
2 
3 static char sccsid[] = "@(#)SEEK.c 1.1 10/30/80";
4 
5 #include "h00vars.h"
6 #include "h01errs.h"
7 
8 /*
9  * Random access routine
10  */
11 SEEK(curfile, loc)
12 
13 	register struct iorec	*curfile;
14 	long			loc;
15 {
16 	curfile->funit |= SYNC;
17 	if (fseek(curfile->fbuf, loc, 0) == -1) {
18 		ERROR(ESEEK, curfile->pfname);
19 		return;
20 	}
21 }
22