From bbc4626d79a44be615665b1aabf274579a48b281 Mon Sep 17 00:00:00 2001 From: Peng Wu Date: Tue, 19 Feb 2013 13:39:01 +0800 Subject: add m_dict_index --- src/storage/phrase_index.cpp | 32 ++++++++++++++++---------------- src/storage/phrase_index.h | 1 + 2 files changed, 17 insertions(+), 16 deletions(-) (limited to 'src/storage') 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; -- cgit