/** * Returns 0 iff the length of the disjunct list is 0. * If this is the case, it frees the structure rooted at l. */ static int and_purge_E_list(E_list * l) { if (l == NULL) return 1; if ((l->e = purge_Exp(l->e)) == NULL) { free_E_list(l->next); xfree((char *)l, sizeof(E_list)); return 0; } if (and_purge_E_list(l->next) == 0) { free_Exp(l->e); xfree((char *)l, sizeof(E_list)); return 0; } return 1; }
void free_E_list(E_list * l) { if (l == NULL) return; free_E_list(l->next); free_Exp(l->e); xfree((char *)l, sizeof(E_list)); }
void free_Exp(Exp * e) { if (e->type != CONNECTOR_type) { free_E_list(e->u.l); } xfree((char *)e, sizeof(Exp)); }