From 17b49163ea1c6adc8add35dfa06d93032f4654ee Mon Sep 17 00:00:00 2001 From: Baptiste JL Date: Mon, 22 Apr 2019 21:14:39 +0200 Subject: [PATCH] Update2 treeh --- treeh.c | 10 +++++----- treeh.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/treeh.c b/treeh.c index 489ea31..b66e97e 100644 --- a/treeh.c +++ b/treeh.c @@ -45,12 +45,12 @@ bool is_followed(const tree t){ } //functions is_end -bool is_end(const tree t){return t->isEnd & 1;} -bool ends_with_apostrophe(const tree t){return t->isEnd & 2;} +bool is_end(const tree t){return t->isEnd & 13;}//0b00010101 +bool ends_with_apostrophe(const tree t){return t->isEnd & 26;}//0b00101010 -bool is_common_end(const tree t){return !(t->isEnd & 12);} -bool is_proper_end(const tree t){return t->isEnd & 4;} -bool is_acronyme_end(const tree t){return t->isEnd & 8;} +bool is_common_end(const tree t){return t->isEnd & 3;}//0b00000011 +bool is_proper_end(const tree t){return t->isEnd & 12;}//0b00001100 +bool is_acronyme_end(const tree t){return t->isEnd & 48;}//0b00110000 int hash(char c){ //needs to check c wether isalpha diff --git a/treeh.h b/treeh.h index 551ba9a..a004979 100644 --- a/treeh.h +++ b/treeh.h @@ -14,7 +14,7 @@ struct _node{ char letter; byte isEnd; //0 no,1 yes,+2 if ends with 's - //+4if proper, +8if allUpper + //*4 if proper, *16 if allUpper node* next[NBCHAR]; }; -- libgit2 0.21.2