xref: /csrg-svn/usr.bin/pascal/libpc/RSNG4.c (revision 40865)
1*40865Sbostic /*-
2*40865Sbostic  * Copyright (c) 1979 The Regents of the University of California.
3*40865Sbostic  * All rights reserved.
4*40865Sbostic  *
5*40865Sbostic  * %sccs.include.redist.c%
6*40865Sbostic  */
71698Smckusick 
8*40865Sbostic #ifndef lint
9*40865Sbostic static char sccsid[] = "@(#)RSNG4.c	1.6 (Berkeley) 04/09/90";
10*40865Sbostic #endif /* not lint */
111698Smckusick 
129136Smckusick extern char ERANG[];	/* ERANG is defined in RANG4.c */
131698Smckusick 
143029Smckusic long
151698Smckusick RSNG4(value, upper)
169136Smckusick 	long		value;
179136Smckusick 	unsigned long	upper;
181698Smckusick {
199136Smckusick 	if (value > upper) {
209136Smckusick 		ERROR(ERANG, value);
211698Smckusick 	}
221698Smckusick 	return	value;
231698Smckusick }
24