-NCURSES_EXPORT(void)
-_nc_free_entries(ENTRY * headp)
-/* free the allocated storage consumed by list entries */
-{
- while (_nc_head != 0) {
- _nc_free_entry(headp, &(headp->tterm));
- }
-}
-
-NCURSES_EXPORT(ENTRY *)
-_nc_delink_entry(ENTRY * headp, TERMTYPE *tterm)
-/* delink the allocated storage for the given list entry */
-{
- ENTRY *ep, *last;
-
- for (last = 0, ep = headp; ep != 0; last = ep, ep = ep->next) {
- if (&(ep->tterm) == tterm) {
- if (last != 0)
- last->next = ep->next;
- else
- headp = ep->next;
- if (ep == _nc_head)
- _nc_head = 0;
- if (ep == _nc_tail)
- _nc_tail = 0;
- break;
- }
- }
- return ep;
-}
-
-NCURSES_EXPORT(void)
-_nc_free_entry(ENTRY * headp, TERMTYPE *tterm)
-/* free the allocated storage consumed by the given list entry */
-{
- ENTRY *ep;
-
- if ((ep = _nc_delink_entry(headp, tterm)) != 0) {
- _nc_free_termtype(&(ep->tterm));
- free(ep);
- }
-}
-