Ejemplo n.º 1
0
__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);
}
Ejemplo n.º 2
0
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);
}
Ejemplo n.º 3
0
Archivo: wf.c Proyecto: ZoneMo/backup
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);
}
Ejemplo n.º 4
0
/* 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);
}
Ejemplo n.º 5
0
void printAll( Table_T fpTable )
{
        Table_map(fpTable, applyprinttable, NULL);
}