list.h 341 B

123456789101112131415161718192021222324
  1. #ifndef _LIST_H_
  2. #define _LIST_H_
  3. #include <lib.h>
  4. typdef struct node
  5. {
  6. struct node * next;
  7. int val;
  8. } node;
  9. typedef struct list
  10. {
  11. node * front;
  12. int len;
  13. } list;
  14. list * newlist(void);
  15. void listsert(list * l, int x);
  16. void listemove(list * l, int x);
  17. void listelete(list * l);
  18. int listearch(list * l, int x);
  19. #endif /* _LIST_H_ */