__declspec(dllexport) void curl_shim_cleanup() { Table_map(g_delegateTable, vfree, NULL); Table_free(&g_delegateTable); DeleteCriticalSection(&g_csDelegateTable); Table_map(g_shareDelegateTable, vfree, NULL); Table_free(&g_shareDelegateTable); DeleteCriticalSection(&g_csShareDelegateTable); }
void Umsections_free(T *asmp) { Table_map((*asmp)->sections,applyFree,NULL); Table_free(&((*asmp)->sections)); Seq_free(&((*asmp)->sectionOrder)); // Seq_free(((*asmp)->currentSection)); free(*asmp); }
void wf(char *name, FILE *fp) { Table_T table = Table_new(0, NULL, NULL); char buf[128]; while (getword(fp, buf, sizeof buf, first, rest)) { const char *word; int i, *count; for (i = 0; buf[i] != '\0'; i++) buf[i] = tolower(buf[i]); word = Atom_string(buf); count = Table_get(table, word); if (count) (*count)++; else { NEW(count); *count = 1; Table_put(table, word, count); } } if (name) printf("%s:\n", name); { int i; void **array = Table_toArray(table, NULL); qsort(array, Table_length(table), 2*sizeof (*array), compare); for (i = 0; array[i]; i += 2) printf("%d\t%s\n", *(int *)array[i+1], (char *)array[i]); FREE(array); } Table_map(table, vfree, NULL); Table_free(&table); }
/* Frees a given Umsections_T */ void Umsections_free(Umsections_T *asmp) { Table_map((*asmp)->table, apply_free, NULL); Table_free(&((*asmp)->table)); Seq_free(&((*asmp)->order)); free(*asmp); }
void printAll( Table_T fpTable ) { Table_map(fpTable, applyprinttable, NULL); }