Commit a637cab8d160f197aa6a52430562fbc373c16fcb
1 parent
a4ef278c
update1 withHash
Showing
1 changed file
with
29 additions
and
0 deletions
Show diff stats
treeh.c
1 | 1 | #include "treeh.h" |
2 | 2 | |
3 | +tree make_empty_tree(){ | |
4 | + return NULL; | |
5 | +} | |
6 | + | |
7 | +void addto_tree(tree,char*,int){ | |
8 | + if | |
9 | + | |
10 | +} | |
11 | +void loadfrom_file(tree,FILE*){} | |
12 | +void loadfrom_keyboard(tree){} | |
13 | + | |
14 | +char is_empty(tree){ | |
15 | + int i; | |
16 | + for(i=0;i<NBCHAR;i++){ | |
17 | + if(t->next[i]!=NULL) | |
18 | + return 0; | |
19 | + } | |
20 | + return 1; | |
21 | +} | |
22 | +char is_end(tree t){ | |
23 | + return t->isEnd!=0; | |
24 | +} | |
25 | + | |
26 | +int hash(char c){ | |
27 | + //needs to check c isalpha or '; | |
28 | + if(c='\'') | |
29 | + return 0; | |
30 | + return c%64; | |
31 | +} | ... | ... |