xref: /csrg-svn/usr.bin/pascal/libpc/RSNG4.c (revision 3029)
11698Smckusick /* Copyright (c) 1979 Regents of the University of California */
21698Smckusick 
3*3029Smckusic static char sccsid[] = "@(#)RSNG4.c 1.2 03/07/81";
41698Smckusick 
51698Smckusick #include "h01errs.h"
61698Smckusick 
7*3029Smckusic long
81698Smckusick RSNG4(value, upper)
91698Smckusick 
10*3029Smckusic 	long	value;
11*3029Smckusic 	long	upper;
121698Smckusick {
131698Smckusick 	if (value < 0 || value > upper) {
141698Smckusick 		ERROR(ERANGE, value);
151698Smckusick 		return;
161698Smckusick 	}
171698Smckusick 	return	value;
181698Smckusick }
19