OSDN Git Service

removed some junk
[proj16/16.git] / src / lib / ll.h
1 #ifndef __LL_H__\r
2 #define __LL_H__\r
3 #include <stdio.h>\r
4 #include <stdlib.h>\r
5 #include <assert.h>\r
6 #include "src/lib/16_tail.h"\r
7 \r
8 //#define OTHERMERGELISTSTIFF\r
9 \r
10 /* Link list node_t */\r
11 typedef struct node\r
12 {\r
13         struct node     *prev;\r
14         rgb_t   d;\r
15         int data;\r
16         struct node     *next;\r
17         word    id;\r
18 } node_t;\r
19 \r
20 #ifdef OTHERMERGELISTSTIFF\r
21 int listLength(node_t * item);\r
22 void print_list(node_t * head);\r
23 void pushe(node_t * head, int val);\r
24 void pushs(node_t ** head, int val);\r
25 int pop(node_t ** head);\r
26 int remove_last(node_t * head);\r
27 int remove_by_index(node_t ** head, int n);\r
28 #else\r
29 /* pull off the front node of the source and put it in dest */\r
30 void Movenode(struct node** destRef, struct node** sourceRef);\r
31 struct node* SortedMerge(struct node* a, struct node* b);\r
32 struct node* LL_merge(struct node* a, struct node* b);\r
33 void pushll(struct node** head_ref, int new_data);\r
34 void printList(struct node *node);\r
35 void removeDuplicates(struct node* head);\r
36 #endif\r
37 \r
38 #endif\r