cs_alloc.c 902 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /* $Id$ */
  2. /*
  3. * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
  4. * See the copyright notice in the ACK home directory, in the file "Copyright".
  5. */
  6. #include "../share/types.h"
  7. #include "../share/alloc.h"
  8. #include "cs.h"
  9. occur_p newoccur(l1, l2, b)
  10. line_p l1, l2;
  11. bblock_p b;
  12. {
  13. /* Allocate a new struct occur and initialize it. */
  14. register occur_p rop;
  15. rop = (occur_p) newcore(sizeof(struct occur));
  16. rop->oc_lfirst = l1; rop->oc_llast = l2; rop->oc_belongs = b;
  17. return rop;
  18. }
  19. oldoccur(ocp)
  20. occur_p ocp;
  21. {
  22. oldcore((char *) ocp, sizeof(struct occur));
  23. }
  24. avail_p newavail()
  25. {
  26. return (avail_p) newcore(sizeof(struct avail));
  27. }
  28. oldavail(avp)
  29. avail_p avp;
  30. {
  31. oldcore((char *) avp, sizeof(struct avail));
  32. }
  33. entity_p newentity()
  34. {
  35. return (entity_p) newcore(sizeof(struct entity));
  36. }
  37. oldentity(enp)
  38. entity_p enp;
  39. {
  40. oldcore((char *) enp, sizeof(struct entity));
  41. }