evolve4src/src/evolve_simulator/kforth_execute.cpp
void kforth_machine_delete(KFORTH_MACHINE *kfm)
{
	KFORTH_STACK_NODE *node;

	ASSERT( kfm != NULL );

	while( kfm->call_sp != NULL ) {
		node = kforth_stack_pop(&kfm->call_sp);
		kforth_stack_node_delete(node);
	}
				
	while( kfm->data_sp != NULL ) {
		node = kforth_stack_pop(&kfm->data_sp);
		kforth_stack_node_delete(node);
	}

	FREE( kfm );
}
/***********************************************************************
 * Delete a KFORTH machine. Delete any stack space occupied
 * by the machine.
 * The program associated with the machine is NOT delete'd
 * however as the program could be in use by another
 * machine. (multi-celled creatures for example)
 *
 */
Delete a KFORTH machine. Delete any stack space occupied
by the machine.
The program associated with the machine is NOT delete'd
however as the program could be in use by another
machine. (multi-celled creatures for example)
Delete a KFORTH machine . Delete any stack space occupied by the machine . The program associated with the machine is NOT delete ' d however as the program could be in use by another machine . ( multi - celled creatures for example )
void kforth_machine_delete(KFORTH_MACHINE *kfm)
{
	KFORTH_STACK_NODE *node;
	ASSERT( kfm != NULL );
	while( kfm->call_sp != NULL ) {
		node = kforth_stack_pop(&kfm->call_sp);
		kforth_stack_node_delete(node);
	}
	while( kfm->data_sp != NULL ) {
		node = kforth_stack_pop(&kfm->data_sp);
		kforth_stack_node_delete(node);
	}
	FREE( kfm );
}
void kforth_machine_delete ( KFORTH_MACHINE * kfm ) { KFORTH_STACK_NODE * node ; ASSERT ( kfm != NULL ) ; while ( kfm -> call_sp != NULL ) { node = kforth_stack_pop ( & kfm -> call_sp ) ; kforth_stack_node_delete ( node ) ; } while ( kfm -> data_sp != NULL ) { node = kforth_stack_pop ( & kfm -> data_sp ) ; kforth_stack_node_delete ( node ) ; } FREE ( kfm ) ; }
Delete a KFORTH machine.
Delete a KFORTH machine .