/** * Frees all resources allocated for the given double ring. * * @param d Handle of double ring to destroy. */ void dring_free(DRING d) { _DRING *dring = (_DRING *)d; squeue_free(dring->s); squeue_free(dring->l); free(dring); }
int main(void) { struct symbol sym; wk_table = hmap_init(MAP_SIZE, 15*sizeof(char), sizeof(int), hash); init_wk_table(wk_table); sym_table = hmap_init(MAP_SIZE, ID_SIZE*sizeof(char), sizeof(struct symbol), hash); undeclared_vars = squeue_init(100, sizeof(struct symbol)); codeInit(); yyparse(); finalizeCode(); hmap_free(wk_table); hmap_free(sym_table); squeue_free(undeclared_vars); return SUCCESS; }