xref: /original-bsd/usr.bin/pascal/libpc/LLIMIT.c (revision 6c57d260)
1 /* Copyright (c) 1979 Regents of the University of California */
2 
3 static char sccsid[] = "@(#)LLIMIT.c 1.2 03/07/81";
4 
5 #include "h00vars.h"
6 #include "h01errs.h"
7 
8 LLIMIT(curfile, limit)
9 
10 	register struct iorec	*curfile;
11 	long			limit;
12 {
13 	if (limit <= 0)
14 		limit = 0x7fffffff;
15 	curfile->llimit = limit;
16 	if (curfile->lcount >= curfile->llimit) {
17 		ERROR(ELLIMIT, curfile->pfname);
18 		return;
19 	}
20 }
21