/*-----------------------------------------------------------------------------*/
void FreeLabeledClassList (
    LIST	ClassList)

/*
 **	Parameters:
 **		FontList	list of all fonts in document
 **	Globals: none
 **	Operation:
 **		This routine deallocates all of the space allocated to
 **		the specified list of training samples.
 **	Return: none
 **	Exceptions: none
 **	History: Fri Aug 18 17:44:27 1989, DSJ, Created.
 */

{
  MERGE_CLASS	MergeClass;

  iterate (ClassList) 		/* iterate thru all of the fonts */
  {
    MergeClass = (MERGE_CLASS) first_node (ClassList);
    free (MergeClass->Label);
    FreeClass(MergeClass->Class);
    delete MergeClass;
  }
  destroy (ClassList);

}	/* FreeLabeledClassList */
示例#2
0
ASM SAVEDS void __UserLibCleanup( register __a6 struct Library *libbase )
{
    D(bug("picture.datatype/__UserLibCleanup\n"));

    D(bug("picture.datatype/__UserLibCleanup: Freeing class\n"));

    if(dt_class)
    {
	RemoveClass(dt_class);
	FreeClass(dt_class);
	dt_class = NULL;
    }

    D(bug("picture.datatype/__UserLibCleanup: Closing Libraries\n"));
    
    if(CyberGfxBase) CloseLibrary(CyberGfxBase);
    if(IFFParseBase) CloseLibrary(IFFParseBase);
    if(DataTypesBase) CloseLibrary(DataTypesBase);
    if(UtilityBase) CloseLibrary((struct Library *)UtilityBase);
    if(DiskfontBase) CloseLibrary(DiskfontBase);
    if(DOSBase) CloseLibrary((struct Library *)DOSBase);
    if(IntuitionBase) CloseLibrary((struct Library *)IntuitionBase);
    if(GfxBase) CloseLibrary((struct Library *)GfxBase);
    if(LayersBase) CloseLibrary(LayersBase);

    D(bug("picture.datatype/__UserLibCleanup: Done\n"));
}
示例#3
0
void CleanupCoolImageClass(void)
{
    if (cool_imageclass)
    {
    	FreeClass(cool_imageclass);
	cool_imageclass = NULL;
    }
}
示例#4
0
/* Load a .class file normally from the local disk */
static ClassClass *
LoadClassFromFile(char *fn, char *dir, char *class_name)
{
    extern int OpenCode(char *, char *, char *, struct stat*);
    struct stat st;
    ClassClass *cb = 0;
    int codefd = -1;
    int	retryCount = 0;
    unsigned char *external_class;
    char *detail;

    codefd = OpenCode(fn, NULL, dir, &st);

    if (codefd < 0)		/* open failed */
	return 0;

    /* Snarf the file into memory. */
    external_class = (unsigned char *)sysMalloc(st.st_size);
    if (external_class == 0)
        goto failed;
    if (sysRead(codefd, external_class, st.st_size) != st.st_size)
        goto failed;
    sysClose(codefd);
    codefd = -1;

    /* Create the internal class */
    cb = allocClassClass();
    if (cb == NULL || 
	!createInternalClass(external_class, external_class + st.st_size, 
			     cb, NULL, class_name, &detail)) {
	sysFree(external_class);
	goto failed;
    }
    sysFree(external_class);

    if (verbose)
	jio_fprintf(stderr, "[Loaded %s]\n", fn);
    return cb;
failed:
    if (codefd >= 0)
	sysClose(codefd);
    if (cb != 0)
        FreeClass(cb);
    return 0;
}
/*
  ====================
  HManagerDeepDestroyClass

  ====================
*/
static void DestroyClassRecursive( hmanager_t *hm, hobj_t *obj )
{
	hobj_t		*o, *next;
	hpair_t		*p, *pnext;

	for ( o = obj->hobjs; o ; o=next )
	{
		next = o->next;
		DestroyClassRecursive( hm, o );		
	}
	for ( p = obj->pairs; p ; p=pnext )
	{
		pnext = p->next;
		FreeHPair( p );
	}

	HManagerUnhashClass( hm, obj );
	FreeClass( obj );
}
示例#6
0
void FreeStringClass(Class *cl)
{
    URLHistory_Free();
    FreeClass(cl);
}
示例#7
0
void DisposeAmigaGuideClass(Class *cl)
{
	FreeClass(cl);
}
示例#8
0
VOID FreeTimerClass(Class *cl)
{
    RemoveClass(cl);
    FreeClass(cl);
}