diff options
author | Peng Wu <alexepico@gmail.com> | 2012-06-21 13:06:33 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2012-06-21 13:06:33 +0800 |
commit | 606b4b110302fad6590eca56cba7108681b8b434 (patch) | |
tree | f062b173011b21143538d7f12bc8f5710f695d97 /src/include | |
parent | 9aa87d6bdadf9492a3c09d49841e23052c043d16 (diff) | |
download | libpinyin-606b4b110302fad6590eca56cba7108681b8b434.tar.gz libpinyin-606b4b110302fad6590eca56cba7108681b8b434.tar.xz libpinyin-606b4b110302fad6590eca56cba7108681b8b434.zip |
add ErrorResult
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/novel_types.h | 25 |
1 files changed, 3 insertions, 22 deletions
diff --git a/src/include/novel_types.h b/src/include/novel_types.h index de249ca..014c11a 100644 --- a/src/include/novel_types.h +++ b/src/include/novel_types.h @@ -73,19 +73,11 @@ enum SearchResult{ SEARCH_CONTINUED = 0x02 /* has longer word in the storage to search */ }; -enum AddIndexResult{ - INSERT_OK = 0 , /* insert ok */ - INSERT_ITEM_EXISTS /* item already exists */ -}; - -enum RemoveIndexResult{ - REMOVE_OK = 0, /* remove ok */ - REMOVE_ITEM_DONOT_EXISTS /* item don't exists */ -}; - /* For Phrase Index */ -enum PhraseIndexResult{ +enum ErrorResult{ ERROR_OK = 0, /* operate ok */ + ERROR_INSERT_ITEM_EXISTS, /* item already exists */ + ERROR_REMOVE_ITEM_DONOT_EXISTS, /* item don't exists */ ERROR_NO_SUB_PHRASE_INDEX, /* sub phrase index is not loaded */ ERROR_NO_ITEM, /* item has a null slot */ ERROR_OUT_OF_RANGE, /* beyond the end of the sub phrase index */ @@ -122,17 +114,6 @@ struct BigramPhraseItemWithCount{ typedef GArray * BigramPhraseArray; /* Array of BigramPhraseItem */ typedef GArray * BigramPhraseWithCountArray; /* Array of BigramPhraseItemWithCount */ -/* - * n-gram Definition - * n-gram library - */ - -enum AttachOption{ - ATTACH_NEW_FILE = 1, - ATTACH_READ = 2, - ATTACH_READ_WRITE = 3 -}; - #define MAX_PHRASE_LENGTH 16 const phrase_token_t null_token = 0; |