xref: /csrg-svn/usr.bin/pascal/libpc/SEEK.c (revision 3904)
11701Smckusick /* Copyright (c) 1979 Regents of the University of California */
21701Smckusick 
3*3904Smckusic static char sccsid[] = "@(#)SEEK.c 1.3 06/17/81";
41701Smckusick 
51701Smckusick #include "h00vars.h"
61701Smckusick 
71701Smckusick /*
81701Smckusick  * Random access routine
91701Smckusick  */
101701Smckusick SEEK(curfile, loc)
111701Smckusick 
121701Smckusick 	register struct iorec	*curfile;
13*3904Smckusic 	struct seekptr		*loc;
141701Smckusick {
151701Smckusick 	curfile->funit |= SYNC;
16*3904Smckusic 	if (fseek(curfile->fbuf, loc->cnt, 0) == -1) {
17*3904Smckusic 		PERROR("Could not seek ", curfile->pfname);
181701Smckusick 		return;
191701Smckusick 	}
201701Smckusick }
21