rcka.c 503 B

12345678910111213141516171819202122232425
  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, now for array indexing
  7. * Author: Ceriel J.H. Jacobs
  8. * Version: $Id$
  9. */
  10. #include <em_abs.h>
  11. extern TRP();
  12. struct array_descr {
  13. int lbound;
  14. int n_elts_min_one;
  15. unsigned size;
  16. };
  17. rcka(descr, indx)
  18. struct array_descr *descr;
  19. {
  20. if (indx < 0 || indx > descr->n_elts_min_one) TRP(EARRAY);
  21. }