Commit
500d264dbd2d4045d91753441d40e51db5457b7a
Authored by
bjeanlou
create tree ch Slist ch
| @@ -0,0 +1 @@ |
| @@ -0,0 +1 @@ |
| |
1
| +#include "Slist.h" |
| @@ -0,0 +1,23 @@ |
| @@ -0,0 +1,23 @@ |
| |
1
| +#ifndef SLIST_H |
| |
2
| +#define SLIST_H |
| |
3
| + |
| |
4
| +#include "tree.h" |
| |
5
| + |
| |
6
| +typedef |
| |
7
| + struct cell{ |
| |
8
| + node* letter; |
| |
9
| + cell* next;} |
| |
10
| +//defs |
| |
11
| + cell, *List; |
| |
12
| + |
| |
13
| + |
| |
14
| +//function |
| |
15
| +List* make_empty_List(); |
| |
16
| +int is_empty(List); |
| |
17
| +tree* head(List); |
| |
18
| +List* Queue(List); |
| |
19
| + |
| |
20
| + |
| |
21
| + |
| |
22
| + |
| |
23
| +#endif //SLIST_H |
| @@ -0,0 +1 @@ |
| @@ -0,0 +1 @@ |
| |
1
| +#include "tree.h" |
| @@ -0,0 +1,31 @@ |
| @@ -0,0 +1,31 @@ |
| |
1
| +#ifndef TREE_H |
| |
2
| +#define TREE_H |
| |
3
| + |
| |
4
| +#include <stdio.h> |
| |
5
| +#include <stdlib.h> |
| |
6
| +#include <string.h> |
| |
7
| +#include "Slist.h" |
| |
8
| + |
| |
9
| +typedef |
| |
10
| + struct node{ |
| |
11
| + char val; |
| |
12
| + cell* next;} |
| |
13
| +//defs |
| |
14
| + node, *tree; |
| |
15
| + |
| |
16
| + |
| |
17
| +//functions |
| |
18
| +tree* make_empty_tree(); |
| |
19
| +tree* cons_tree(); |
| |
20
| +tree* load_tree(FILE*,tree*); |
| |
21
| +int is_empty(tree); |
| |
22
| +char value(tree); |
| |
23
| +//char*? values(tree); |
| |
24
| +void print_all(tree); |
| |
25
| +int isIn(tree,string); |
| |
26
| + |
| |
27
| + |
| |
28
| + |
| |
29
| + |
| |
30
| + |
| |
31
| +#endif //TREE_H |