ack/util/ego/cs/cs_alloc.c

46 lines
885 B
C
Raw Permalink Normal View History

1994-06-24 11:31:16 +00:00
/* $Id$ */
1987-03-09 19:15:41 +00:00
/*
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
* See the copyright notice in the ACK home directory, in the file "Copyright".
*/
#include <stdlib.h>
1984-11-26 13:43:22 +00:00
#include "../share/types.h"
#include "../share/alloc.h"
#include "cs.h"
occur_p newoccur(line_p l1, line_p l2, bblock_p b)
1984-11-26 13:43:22 +00:00
{
/* Allocate a new struct occur and initialize it. */
occur_p rop;
1984-11-26 13:43:22 +00:00
rop = (occur_p) newcore(sizeof(struct occur));
rop->oc_lfirst = l1; rop->oc_llast = l2; rop->oc_belongs = b;
return rop;
}
void oldoccur(occur_p ocp)
1984-11-26 13:43:22 +00:00
{
oldcore(ocp, sizeof(struct occur));
1984-11-26 13:43:22 +00:00
}
avail_p newavail(void)
1984-11-26 13:43:22 +00:00
{
return (avail_p) newcore(sizeof(struct avail));
}
void oldavail(avail_p avp)
1984-11-26 13:43:22 +00:00
{
oldcore(avp, sizeof(struct avail));
1984-11-26 13:43:22 +00:00
}
entity_p newentity(void)
1984-11-26 13:43:22 +00:00
{
return (entity_p) newcore(sizeof(struct entity));
}
void oldentity(entity_p enp)
1984-11-26 13:43:22 +00:00
{
oldcore(enp, sizeof(struct entity));
1984-11-26 13:43:22 +00:00
}