cs_alloc.c 730 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #include "../share/types.h"
  2. #include "../share/alloc.h"
  3. #include "cs.h"
  4. occur_p newoccur(l1, l2, b)
  5. line_p l1, l2;
  6. bblock_p b;
  7. {
  8. /* Allocate a new struct occur and initialize it. */
  9. register occur_p rop;
  10. rop = (occur_p) newcore(sizeof(struct occur));
  11. rop->oc_lfirst = l1; rop->oc_llast = l2; rop->oc_belongs = b;
  12. return rop;
  13. }
  14. oldoccur(ocp)
  15. occur_p ocp;
  16. {
  17. oldcore((short *) ocp, sizeof(struct occur));
  18. }
  19. avail_p newavail()
  20. {
  21. return (avail_p) newcore(sizeof(struct avail));
  22. }
  23. oldavail(avp)
  24. avail_p avp;
  25. {
  26. oldcore((short *) avp, sizeof(struct avail));
  27. }
  28. entity_p newentity()
  29. {
  30. return (entity_p) newcore(sizeof(struct entity));
  31. }
  32. oldentity(enp)
  33. entity_p enp;
  34. {
  35. oldcore((short *) enp, sizeof(struct entity));
  36. }