cs_alloc.c 883 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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(line_p l1, line_p l2, bblock_p b)
  10. {
  11. /* Allocate a new struct occur and initialize it. */
  12. occur_p rop;
  13. rop = (occur_p) newcore(sizeof(struct occur));
  14. rop->oc_lfirst = l1; rop->oc_llast = l2; rop->oc_belongs = b;
  15. return rop;
  16. }
  17. void oldoccur(occur_p ocp)
  18. {
  19. oldcore((char *) ocp, sizeof(struct occur));
  20. }
  21. avail_p newavail()
  22. {
  23. return (avail_p) newcore(sizeof(struct avail));
  24. }
  25. void oldavail(avail_p avp)
  26. {
  27. oldcore((char *) avp, sizeof(struct avail));
  28. }
  29. entity_p newentity()
  30. {
  31. return (entity_p) newcore(sizeof(struct entity));
  32. }
  33. void oldentity(entity_p enp)
  34. {
  35. oldcore((char *) enp, sizeof(struct entity));
  36. }