Beispiel #1
0
void
DestroyIdentConfig (IdentConfig * config)
{
    DestroyMyStyleDefinitions (&(config->style_defs));
	DestroyFreeStorage (&(config->more_stuff));
	free (config);
}
Beispiel #2
0
MyStyle *mystyle_find_or_get_from_file(struct ASHashTable *list, const char *name)
{
	MyStyle      *ms;
	if ((ms = mystyle_list_find (list, name)) == NULL)
	{
		char *fn = make_session_data_file  (Session, False, S_IFREG, MYSTYLES_DIR, name, NULL );
		if (fn == NULL)
			fn = make_session_data_file  (Session, False, S_IFREG, MYSTYLES_DIR, "mystyle.", name, NULL ); 
		if (fn == NULL)
			fn = make_session_data_file  (Session, True, S_IFREG, MYSTYLES_DIR, name, NULL ); 
		if (fn == NULL)
			fn = make_session_data_file  (Session, True, S_IFREG, MYSTYLES_DIR, "mystyle.", name, NULL ); 
		if (fn != NULL)
		{
		    FreeStorageElem *Storage = NULL;
		    MyStyleDefinition *msd = NULL;

		    Storage = file2free_storage(fn, MyName, &MyStyleSyntax, NULL, NULL );
			if( Storage ) 
			{
    			msd = free_storage_elem2MyStyleDefinition(Storage, name);
				DestroyFreeStorage (&Storage);
				if (msd != NULL)
				{
					ms = mystyle_create_from_definition (list, msd);
					DestroyMyStyleDefinitions (&msd);
				}
			}
			free (fn);
		}
	}
	return ms;
}
Beispiel #3
0
void DestroyASetRootConfig (ASetRootConfig * config)
{
	if (config->my_desks)
		DestroyDeskBackConfig (&(config->my_desks));
	if (config->my_backs)
		DestroyMyBackgroundConfig (&(config->my_backs));
	DestroyMyStyleDefinitions (&(config->style_defs));
	DestroyFreeStorage (&(config->more_stuff));
	free (config);
}