list.h 305 B

1234567891011121314151617181920212223
  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();
  15. void listsert(list * l, int x);
  16. void listemove(list * l, int x);
  17. void listelete(list * l);
  18. #endif /* _LIST_H_ */