Blame view

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