From: Kirk McKusick Date: Thu, 30 Oct 1980 16:35:40 +0000 (-0800) Subject: date and time created 80/10/30 00:35:40 by mckusick X-Git-Tag: BSD-4^3~83 X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/commitdiff_plain/7cc3480b7cb1abd2ab05f3cbc3b8a4b1eab6b482 date and time created 80/10/30 00:35:40 by mckusick SCCS-vsn: usr.bin/pascal/libpc/SEEK.c 1.1 --- diff --git a/usr/src/usr.bin/pascal/libpc/SEEK.c b/usr/src/usr.bin/pascal/libpc/SEEK.c new file mode 100644 index 0000000000..5042675d18 --- /dev/null +++ b/usr/src/usr.bin/pascal/libpc/SEEK.c @@ -0,0 +1,21 @@ +/* Copyright (c) 1979 Regents of the University of California */ + +static char sccsid[] = "@(#)SEEK.c 1.1 %G%"; + +#include "h00vars.h" +#include "h01errs.h" + +/* + * Random access routine + */ +SEEK(curfile, loc) + + register struct iorec *curfile; + long loc; +{ + curfile->funit |= SYNC; + if (fseek(curfile->fbuf, loc, 0) == -1) { + ERROR(ESEEK, curfile->pfname); + return; + } +}