Пример #1
0
static bool opt_workspace_end(Tokenizer *tokz, int n, Token *toks)
{
	if(current_ws->splitree==NULL){
		tokz_warn(tokz, tokz->line, "Workspace empty");
		destroy_thing((WThing*)current_ws);
	}
	current_ws=NULL;
	return TRUE;
}
Пример #2
0
Файл: thing.c Проект: Cougar/pwm
void destroy_subthings(WThing *parent)
{
	WThing *t, *prev=NULL;

	/* assert(!(parent->flags&WTHING_SUBDEST)); */
    if (parent->flags & WTHING_SUBDEST) {
        fprintf(stderr, __FILE__ ": %d: destroy_subthings: "
            "parent->flags & WTHING_SUBDEST\n", __LINE__);
        /* Do nothing - we're in some weird trouble here. */
    } else {
        parent->flags |= WTHING_SUBDEST;
	
	/* destroy children */
        while ((t = parent->t_children) != NULL) {
		assert(t!=prev);
		prev=t;
		destroy_thing(t);
	}
	
	parent->flags&=~WTHING_SUBDEST;
    }
}
Пример #3
0
 /// Destructor
 ~Thing(void)
 {
   destroy_thing(my_fthing0);
   destroy_thing(my_fthing1);
   destroy_thing(my_fthing2);
 }