#include "dico.h" void make_empty_dico(dico d){ for(int i=0;iletter),1); if(is_end(t)){ string word2=calloc((strlen(prefix)+4),sizeof(char)); strcpy(word2,word); //common_end if(is_common_end(t)){ if(is_straight_end(t)){ fprintf(stream,"%s\n",word2); } if(ends_with_apostrophe(t)){ fprintf(stream,"%s's\n",word2); } } //proper_end if(is_proper_end(t)){ word2[0]=toupper(word2[0]); if(is_straight_end(t)){ fprintf(stream,"%s\n",word2); } if(ends_with_apostrophe(t)){ fprintf(stream,"%s's\n",word2); } } //acronyme_end if(is_acronyme_end(t)){ strupper(word2); if(is_straight_end(t)){ fprintf(stream,"%s\n",word2); } if(ends_with_apostrophe(t)){ fprintf(stream,"%s's\n",word2); } } free(word2); } for(int i=0;inext[i],stream,word); } free(word); } void strupper(string str){ for(int i=0;str[i]!='\0';i++) str[i]=toupper(str[i]); } bool is_in(dico d,string word){ byte endKind=end_kind(word); if(!is_word(endKind)){ return false; } tree tmp=d[hash(word[0])]; for(int i=1;word[i]!='\0' && word[i]!='\'' && !is_empty(tmp);i++){ tmp=tmp->next[hash(word[i])]; } return !is_empty(tmp) && (endKind & is_end(tmp)); }