Exemplo n.º 1
0
void ami_font_cache_init(void)
{
#ifdef __amigaos4__
	ami_font_cache_hook.h_Entry = (HOOKFUNC)ami_font_cache_sort;
	ami_font_cache_hook.h_Data = 0;
	ami_font_cache_list = CreateSkipList(&ami_font_cache_hook, 8);
#else
	ami_font_cache_list = NewObjList();
#endif

	/* run first cleanup in ten minutes */
	ami_schedule(600000, (void *)ami_font_cache_cleanup, ami_font_cache_list);
}
Exemplo n.º 2
0
Arquivo: main.c Projeto: Ribtoks/heap
int main()
{
    FuncFactory stringFunctions;

    SkipList* list = 0;

    FILE* out = 0;

    InitStringFactoryStruct(&stringFunctions);
    list = CreateSkipList(&stringFunctions);

    memset(filename, '\0', MAX_FILENAME_LENGTH*sizeof(char));

    printf("Enter filename :> ");
    gets(filename);


    ProcessFile(filename, list);

    printf("\nAll words:\n");


    PrintList(list);

    if (AskUser("Print results to file?"))
    {
        if ((out = fopen("results.txt", "w+")) == NULL)
        {
            printf("Cannot open file. Press any key to exit.\n");
            getchar();
            exit(-1);
        }

        PrintListToFile(out, FilePrinter, list);
    }

    CleanupList(list);

    printf("Done.\n\nPress any key to exit...");
    getchar();
    return 0;
}