home *** CD-ROM | disk | FTP | other *** search
- /*
- * expandable lists
- * March 1989, Miles Bader
- */
-
- extern char insertMark;
-
- struct list {
- int num,max;
- int insertionPoint; /* where a new element gets added */
- void **els;
- void (*freeProc)(); /* if non-NULL, used to free elements */
- };
-
- struct list *list_Create(void **initEls);
- void list_Free(struct list *l);
- void list_Add(struct list *l,void *el);
-
- #define list_GetEls(l) ((l)->els)
- #define list_GetLen(l) ((l)->num)
-
- #define list_SetFree(l,fp) ((l)->freeProc=fp)
-