diff --git a/list/list.h b/list/list.h index 38c9203..9b069db 100644 --- a/list/list.h +++ b/list/list.h @@ -1,15 +1,15 @@ typedef struct Node{ - unsigned long int id;//what's this? + unsigned long int id; void *value; - Node *next; - Node *last; -}; + struct Node *next; + struct Node *last; +}Node; typedef struct List{ Node *head; Node *tail; unsigned long int length; -}; +}List; List *init_list(); Node *init_node(); @@ -29,6 +29,7 @@ int insertInHead(List *p_list, Node *p_node){ //p_node->last = NULL; p_node->next = p_list->head; p_list->head = p_node; + return 0; } int insertInTail(List *p_list, Node *p_node){ @@ -36,4 +37,5 @@ int insertInTail(List *p_list, Node *p_node){ //p_node->next = NULL; p_node->last = p_list->tail; p_list->tail = p_node; + return 0; }