summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2013-02-19 13:39:01 +0800
committerPeng Wu <alexepico@gmail.com>2013-02-19 13:39:01 +0800
commitbbc4626d79a44be615665b1aabf274579a48b281 (patch)
treed75cd16f66a0b4b3c30d62d641a1284e21e6d8d3
parent46b35845078da414b5cd1b51b5bd77334efaf110 (diff)
downloadlibpinyin-bbc4626d79a44be615665b1aabf274579a48b281.tar.gz
libpinyin-bbc4626d79a44be615665b1aabf274579a48b281.tar.xz
libpinyin-bbc4626d79a44be615665b1aabf274579a48b281.zip
add m_dict_index
-rw-r--r--src/storage/phrase_index.cpp32
-rw-r--r--src/storage/phrase_index.h1
2 files changed, 17 insertions, 16 deletions
diff --git a/src/storage/phrase_index.cpp b/src/storage/phrase_index.cpp
index 32b59a2..67afb97 100644
--- a/src/storage/phrase_index.cpp
+++ b/src/storage/phrase_index.cpp
@@ -659,27 +659,27 @@ bool FacadePhraseIndex::mask_out(guint8 phrase_index,
namespace pinyin{
const pinyin_table_info_t pinyin_phrase_files[PHRASE_INDEX_LIBRARY_COUNT] =
{
- {NULL, NULL, NULL, NOT_USED},
- {"gb_char.table", "gb_char.bin", "gb_char.dbin", SYSTEM_FILE},
- {"gbk_char.table", "gbk_char.bin", "gbk_char.dbin", SYSTEM_FILE},
+ {RESERVED, NULL, NULL, NULL, NOT_USED},
+ {GB_DICTIONARY, "gb_char.table", "gb_char.bin", "gb_char.dbin", SYSTEM_FILE},
+ {GBK_DICTIONARY, "gbk_char.table", "gbk_char.bin", "gbk_char.dbin", SYSTEM_FILE},
- {"merged.table", "merged.bin", "merged.dbin", SYSTEM_FILE},
+ {MERGED_DICTIONARY, "merged.table", "merged.bin", "merged.dbin", SYSTEM_FILE},
- {"art.table", "art.bin", "art.dbin", DICTIONARY},
- {"culture.table", "culture.bin", "culture.dbin", DICTIONARY},
- {"economy.table", "economy.bin", "economy.dbin", DICTIONARY},
- {"geology.table", "geology.bin", "geology.dbin", DICTIONARY},
- {"history.table", "history.bin", "history.dbin", DICTIONARY},
+ {ART_DICTIONARY, "art.table", "art.bin", "art.dbin", DICTIONARY},
+ {CULTURE_DICTIONARY, "culture.table", "culture.bin", "culture.dbin", DICTIONARY},
+ {ECONOMY_DICTIONARY, "economy.table", "economy.bin", "economy.dbin", DICTIONARY},
+ {GEOLOGY_DICTIONARY, "geology.table", "geology.bin", "geology.dbin", DICTIONARY},
+ {HISTORY_DICTIONARY, "history.table", "history.bin", "history.dbin", DICTIONARY},
- {"life.table", "life.bin", "life.dbin", DICTIONARY},
- {"nature.table", "nature.bin", "nature.dbin", DICTIONARY},
- {"scitech.table", "scitech.bin", "scitech.dbin", DICTIONARY},
- {"society.table", "society.bin", "society.dbin", DICTIONARY},
- {"sport.table", "sport.bin", "sport.dbin", DICTIONARY},
+ {LIFE_DICTIONARY, "life.table", "life.bin", "life.dbin", DICTIONARY},
+ {NATURE_DICTIONARY, "nature.table", "nature.bin", "nature.dbin", DICTIONARY},
+ {SCITECH_DICTIONARY, "scitech.table", "scitech.bin", "scitech.dbin", DICTIONARY},
+ {SOCIETY_DICTIONARY, "society.table", "society.bin", "society.dbin", DICTIONARY},
+ {SPORT_DICTIONARY, "sport.table", "sport.bin", "sport.dbin", DICTIONARY},
- {NULL, NULL, NULL, NOT_USED},
+ {RESERVED1, NULL, NULL, NULL, NOT_USED},
- {NULL, NULL, "user.bin", USER_FILE}
+ {USER_DICTIONARY, NULL, NULL, "user.bin", USER_FILE}
};
diff --git a/src/storage/phrase_index.h b/src/storage/phrase_index.h
index f529789..3654369 100644
--- a/src/storage/phrase_index.h
+++ b/src/storage/phrase_index.h
@@ -838,6 +838,7 @@ typedef enum {
} PHRASE_FILE_TYPE;
typedef struct {
+ const PHRASE_INDEX_LIBRARIES m_dict_index; /* for assert purpose. */
const char * m_table_filename;
const char * m_system_filename;
const char * m_user_filename;