dlist.c
/*----------------------------------------------------------------------*/
/*    CreateDListNode();                                                */
/*                                                                      */
/*    Create a node element and return a pointer to it.                 */
/*----------------------------------------------------------------------*/
CreateDListNode();
Create a node element and return a pointer to it.
CreateDListNode () ; Create a node element and return a pointer to it .
dlistnode_t *CreateDListNode(void *p_element)
{
    dlistnode_t *p_new;
    if ((p_new = malloc(sizeof(dlistnode_t))) != NULL)
    {
        p_new->L_next = p_new->L_prev = NULL;
        p_new->L_element = p_element;
    }
    return p_new;
}
dlistnode_t * CreateDListNode ( void * p_element ) { dlistnode_t * p_new ; if ( ( p_new = malloc ( sizeof ( dlistnode_t ) ) ) != NULL ) { p_new -> L_next = p_new -> L_prev = NULL ; p_new -> L_element = p_element ; } return p_new ; }
CreateDListNode();
Create a node element and return a pointer to it.
CreateDListNode () ; Create a node element and return a pointer to it .