1986-03-10 13:07:55 +00:00
|
|
|
/* $Header$ */
|
|
|
|
/* S T R U C T U R E - S T O R A G E D E F I N I T I O N S */
|
|
|
|
|
1986-07-18 21:10:42 +00:00
|
|
|
/* Storage allocation is one of the most expensive operations in
|
|
|
|
the compiler and consequently much thought and experimentation
|
|
|
|
has gone into it. To simplify the hooking in of new super-fancy
|
|
|
|
algorithms, all allocating and freeing of storage for structs
|
|
|
|
goes through the macros
|
|
|
|
st_alloc(&head, size)
|
|
|
|
st_free(ptr, head, size)
|
|
|
|
which, hopefully, convey enough information.
|
|
|
|
*/
|
|
|
|
|
|
|
|
extern char *head_alloc();
|
|
|
|
|
|
|
|
#define st_alloc(headp, size) head_alloc((char **)headp, size)
|
|
|
|
|
1986-03-10 13:07:55 +00:00
|
|
|
#ifndef BOTCH_FREE
|
1986-07-18 21:10:42 +00:00
|
|
|
#define st_free(ptr, head, size) (ptr->next = head, head = ptr)
|
1986-03-10 13:07:55 +00:00
|
|
|
#else def BOTCH_FREE
|
1986-07-18 21:10:42 +00:00
|
|
|
#define st_free(ptr, head, size) (botch((char *)(ptr), size), \
|
|
|
|
ptr->next = head, head = ptr)
|
1986-03-10 13:07:55 +00:00
|
|
|
#endif BOTCH_FREE
|