rcki.c 439 B

1234567891011121314151617181920212223
  1. /*
  2. * (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
  3. * See the copyright notice in the ACK home directory, in the file "Copyright".
  4. *
  5. *
  6. * Module: range checks for INTEGER
  7. * Author: Ceriel J.H. Jacobs
  8. * Version: $Id$
  9. */
  10. #include <em_abs.h>
  11. extern TRP();
  12. struct range_descr {
  13. int low, high;
  14. };
  15. rcki(descr, val)
  16. struct range_descr *descr;
  17. {
  18. if (val < descr->low || val > descr->high) TRP(ERANGE);
  19. }