slist.c
/*----------------------------------------------------------------------*/
/*    CreateLinkedSList();                                              */
/*                                                                      */
/*    Create and initialise a linked list                               */
/*----------------------------------------------------------------------*/
CreateLinkedSList();
Create and initialise a linked list
CreateLinkedSList () ; Create and initialise a linked list
slist_t *CreateLinkedSList(void)
{
    slist_t *p_list;
    if ((p_list = malloc(sizeof(slist_t))) != NULL)
    {
        p_list->L_first = p_list->L_end = NULL;
        p_list->L_elements = 0L;
    }
    return p_list;
}
slist_t * CreateLinkedSList ( void ) { slist_t * p_list ; if ( ( p_list = malloc ( sizeof ( slist_t ) ) ) != NULL ) { p_list -> L_first = p_list -> L_end = NULL ; p_list -> L_elements = 0L ; } return p_list ; }
CreateLinkedSList();
Create and initialise a linked list
CreateLinkedSList () ; Create and initialise a linked list