Advertisement
Guest User

linkedList header

a guest
Jan 17th, 2019
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.73 KB | None | 0 0
  1. /********************************************//**
  2.  * @file linkedList.h
  3.  * @brief Implementation of linked list container for C strings
  4.  *
  5.  ***********************************************/
  6.  
  7. #ifndef LINKEDLIST_H_INCLUDED
  8. #define LINKEDLIST_H_INCLUDED
  9.  
  10. #include <stdint.h>
  11. #include <stdlib.h>
  12.  
  13. typedef struct NodeT{
  14.     char *data;
  15.     struct NodeT *next;
  16.     struct NodeT *prev;
  17. }NodeTypeDef;
  18.  
  19. typedef struct{
  20.     NodeTypeDef *head;
  21.     NodeTypeDef *last;
  22.     uint32_t length;
  23. }LinkedListTypeDef;
  24.  
  25. void listInit(LinkedListTypeDef* linkedList);
  26. void listPushBack(LinkedListTypeDef* list, char* str);
  27. char* listPop();
  28. char* listFetch();
  29.  
  30. void listClear(LinkedListTypeDef* linkedList);
  31.  
  32. #endif // LINKEDLIST_H_INCLUDED
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement