evolve4src/src/evolve_simulator/phascii.cpp
static DLIST *dlist_add(DLIST **head, void *p)
{
	DLIST *curr;

	if( *head == NULL ) {
		*head = dlist_new(p);
		return *head;
	} else {
		for (curr = *head; curr->next; curr = curr->next)
		    ;

		curr->next = dlist_new(p);
		if( curr->next == NULL )
			return NULL;
		curr->next->prev = curr;
		return curr->next;
	}
}
/**********************************************************************
 * Adds data to the end of the list.
 * The newly added element is returned. NULL on error.
 *
 */
Adds data to the end of the list.
The newly added element is returned. NULL on error.
Adds data to the end of the list . The newly added element is returned . NULL on error .
static DLIST *dlist_add(DLIST **head, void *p)
{
	DLIST *curr;
	if( *head == NULL ) {
		*head = dlist_new(p);
		return *head;
	} else {
		for (curr = *head; curr->next; curr = curr->next)
		    ;
		curr->next = dlist_new(p);
		if( curr->next == NULL )
			return NULL;
		curr->next->prev = curr;
		return curr->next;
	}
}
static DLIST * dlist_add ( DLIST * * head , void * p ) { DLIST * curr ; if ( * head == NULL ) { * head = dlist_new ( p ) ; return * head ; } else { for ( curr = * head ; curr -> next ; curr = curr -> next ) ; curr -> next = dlist_new ( p ) ; if ( curr -> next == NULL ) return NULL ; curr -> next -> prev = curr ; return curr -> next ; } }
Adds data to the end of the list.
Adds data to the end of the list .