diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/include/memory_chunk.h | 2 | ||||
-rw-r--r-- | src/lookup/phonetic_lookup.h | 2 | ||||
-rw-r--r-- | src/pinyin.cpp | 14 | ||||
-rw-r--r-- | src/storage/chewing_large_table.cpp | 14 | ||||
-rw-r--r-- | src/storage/chewing_large_table2.cpp | 4 | ||||
-rw-r--r-- | src/storage/chewing_large_table2_bdb.cpp | 8 | ||||
-rw-r--r-- | src/storage/chewing_large_table2_kyotodb.cpp | 10 | ||||
-rw-r--r-- | src/storage/flexible_ngram_bdb.h | 2 | ||||
-rw-r--r-- | src/storage/ngram.cpp | 2 | ||||
-rw-r--r-- | src/storage/phrase_index.cpp | 4 | ||||
-rw-r--r-- | src/storage/phrase_index_logger.h | 2 | ||||
-rw-r--r-- | src/storage/phrase_large_table2.cpp | 14 | ||||
-rw-r--r-- | src/storage/pinyin_parser2.cpp | 4 | ||||
-rw-r--r-- | src/storage/table_info.cpp | 12 | ||||
-rw-r--r-- | src/storage/zhuyin_parser2.cpp | 4 | ||||
-rw-r--r-- | src/zhuyin.cpp | 8 |
16 files changed, 53 insertions, 53 deletions
diff --git a/src/include/memory_chunk.h b/src/include/memory_chunk.h index 044fa0d..a9b9525 100644 --- a/src/include/memory_chunk.h +++ b/src/include/memory_chunk.h @@ -72,7 +72,7 @@ private: munmap(m_data_begin - header, header + capacity()); #endif else - assert(FALSE); + abort(); } diff --git a/src/lookup/phonetic_lookup.h b/src/lookup/phonetic_lookup.h index 30e1db4..72e70a5 100644 --- a/src/lookup/phonetic_lookup.h +++ b/src/lookup/phonetic_lookup.h @@ -322,7 +322,7 @@ public: return node->eval_item(candidate); } - assert(FALSE); + abort(); } /* get tails */ diff --git a/src/pinyin.cpp b/src/pinyin.cpp index 801e78f..8b0fed6 100644 --- a/src/pinyin.cpp +++ b/src/pinyin.cpp @@ -999,7 +999,7 @@ bool pinyin_set_zhuyin_scheme(pinyin_context_t * context, context->m_chewing_parser = new ZhuyinDaChenCP26Parser2(); break; default: - assert(FALSE); + abort(); } return true; } @@ -1664,7 +1664,7 @@ static bool _compute_phrase_length(pinyin_context_t * context, switch(candidate->m_candidate_type) { case NBEST_MATCH_CANDIDATE: - assert(FALSE); + abort(); case NORMAL_CANDIDATE: case PREDICTED_CANDIDATE: { phrase_index->get_phrase_item(candidate->m_token, item); @@ -1677,7 +1677,7 @@ static bool _compute_phrase_length(pinyin_context_t * context, break; } case ZOMBIE_CANDIDATE: - assert(FALSE); + abort(); } } @@ -1713,7 +1713,7 @@ static bool _compute_phrase_strings_of_items(pinyin_instance_t * instance, &(candidate->m_phrase_string)); break; case ZOMBIE_CANDIDATE: - assert(FALSE); + abort(); } } @@ -2845,7 +2845,7 @@ static gchar * _get_aux_text_prefix(pinyin_instance_t * instance, else if (IS_ZHUYIN == options) str = key.get_zhuyin_string(); else - assert(FALSE); + abort(); gchar * newprefix = g_strconcat(prefix, str, " ", NULL); @@ -2889,7 +2889,7 @@ static gchar * _get_aux_text_postfix(pinyin_instance_t * instance, else if (IS_ZHUYIN == options) str = key.get_zhuyin_string(); else - assert(FALSE); + abort(); gchar * newpostfix = g_strconcat(postfix, str, " ", NULL); @@ -3010,7 +3010,7 @@ bool pinyin_get_double_pinyin_auxiliary_text(pinyin_instance_t * instance, middle = g_strconcat(shengmu, yunmu, "|", NULL); break; default: - assert(FALSE); + abort(); } g_free(shengmu); diff --git a/src/storage/chewing_large_table.cpp b/src/storage/chewing_large_table.cpp index dccdc8e..e856caf 100644 --- a/src/storage/chewing_large_table.cpp +++ b/src/storage/chewing_large_table.cpp @@ -344,7 +344,7 @@ ChewingLengthIndexLevel::~ChewingLengthIndexLevel() { CASE(14); CASE(15); default: - assert(false); + abort(); } } #undef CASE @@ -389,7 +389,7 @@ int ChewingLengthIndexLevel::search(pinyin_option_t options, int phrase_length, CASE(14); CASE(15); default: - assert(false); + abort(); } #undef CASE @@ -545,7 +545,7 @@ int ChewingLengthIndexLevel::add_index(int phrase_length, CASE(14); CASE(15); default: - assert(false); + abort(); } #undef CASE @@ -599,7 +599,7 @@ int ChewingLengthIndexLevel::remove_index(int phrase_length, CASE(14); CASE(15); default: - assert(false); + abort(); } #undef CASE @@ -850,7 +850,7 @@ bool ChewingLengthIndexLevel::load(MemoryChunk * chunk, table_offset_t offset, CASE(14); CASE(15); default: - assert(false); + abort(); } #undef CASE @@ -910,7 +910,7 @@ bool ChewingLengthIndexLevel::store(MemoryChunk * new_chunk, CASE(14); CASE(15); default: - assert(false); + abort(); } #undef CASE @@ -1034,7 +1034,7 @@ bool ChewingLengthIndexLevel::mask_out(phrase_token_t mask, CASE(14); CASE(15); default: - assert(false); + abort(); } } #undef CASE diff --git a/src/storage/chewing_large_table2.cpp b/src/storage/chewing_large_table2.cpp index 0dc96f4..7ac1398 100644 --- a/src/storage/chewing_large_table2.cpp +++ b/src/storage/chewing_large_table2.cpp @@ -56,7 +56,7 @@ void ChewingLargeTable2::init_entries() { CASE(15); CASE(16); default: - assert(false); + abort(); } } @@ -97,7 +97,7 @@ void ChewingLargeTable2::fini_entries() { CASE(15); CASE(16); default: - assert(false); + abort(); } } diff --git a/src/storage/chewing_large_table2_bdb.cpp b/src/storage/chewing_large_table2_bdb.cpp index 9813b57..82b7fd9 100644 --- a/src/storage/chewing_large_table2_bdb.cpp +++ b/src/storage/chewing_large_table2_bdb.cpp @@ -195,7 +195,7 @@ int ChewingLargeTable2::search_internal(int phrase_length, CASE(15); CASE(16); default: - assert(false); + abort(); } #undef CASE @@ -302,7 +302,7 @@ int ChewingLargeTable2::add_index_internal(int phrase_length, CASE(15); CASE(16); default: - assert(false); + abort(); } #undef CASE @@ -376,7 +376,7 @@ int ChewingLargeTable2::remove_index_internal(int phrase_length, CASE(15); CASE(16); default: - assert(false); + abort(); } #undef CASE @@ -443,7 +443,7 @@ bool ChewingLargeTable2::mask_out(phrase_token_t mask, CASE(15); CASE(16); default: - assert(false); + abort(); } #undef CASE diff --git a/src/storage/chewing_large_table2_kyotodb.cpp b/src/storage/chewing_large_table2_kyotodb.cpp index e57552c..c606982 100644 --- a/src/storage/chewing_large_table2_kyotodb.cpp +++ b/src/storage/chewing_large_table2_kyotodb.cpp @@ -179,7 +179,7 @@ int ChewingLargeTable2::search_internal(int phrase_length, CASE(15); CASE(16); default: - assert(false); + abort(); } #undef CASE @@ -277,7 +277,7 @@ int ChewingLargeTable2::add_index_internal(int phrase_length, CASE(15); CASE(16); default: - assert(false); + abort(); } #undef CASE @@ -348,7 +348,7 @@ int ChewingLargeTable2::remove_index_internal(int phrase_length, CASE(15); CASE(16); default: - assert(false); + abort(); } #undef CASE @@ -409,12 +409,12 @@ public: CASE(15); CASE(16); default: - assert(false); + abort(); } #undef CASE - assert(false); + abort(); return NOP; } diff --git a/src/storage/flexible_ngram_bdb.h b/src/storage/flexible_ngram_bdb.h index e526e69..3453752 100644 --- a/src/storage/flexible_ngram_bdb.h +++ b/src/storage/flexible_ngram_bdb.h @@ -105,7 +105,7 @@ public: int ret = db_create(&m_db, NULL, 0); if ( ret != 0 ) - assert(false); + abort(); ret = m_db->open(m_db, NULL, dbfile, NULL, DB_HASH, db_flags, 0644); if ( ret != 0 && (flags & ATTACH_CREATE) ) { diff --git a/src/storage/ngram.cpp b/src/storage/ngram.cpp index ca845c5..c952768 100644 --- a/src/storage/ngram.cpp +++ b/src/storage/ngram.cpp @@ -105,7 +105,7 @@ guint32 SingleGram::mask_out(phrase_token_t mask, phrase_token_t value){ } bool SingleGram::prune(){ - assert(false); + abort(); #if 0 SingleGramItem * begin = (SingleGramItem *) ((const char *)(m_chunk.begin()) + sizeof(guint32)); diff --git a/src/storage/phrase_index.cpp b/src/storage/phrase_index.cpp index 36cb149..e9e9d5d 100644 --- a/src/storage/phrase_index.cpp +++ b/src/storage/phrase_index.cpp @@ -505,7 +505,7 @@ bool SubPhraseIndex::merge(PhraseIndexLogger * logger){ break; } default: - assert(false); + abort(); } } return true; @@ -801,7 +801,7 @@ bool _compute_new_header(PhraseIndexLogger * logger, break; } default: - assert(false); + abort(); } } diff --git a/src/storage/phrase_index_logger.h b/src/storage/phrase_index_logger.h index cffd937..d1e42b6 100644 --- a/src/storage/phrase_index_logger.h +++ b/src/storage/phrase_index_logger.h @@ -294,7 +294,7 @@ public: break; } default: - assert(false); + abort(); } /* store log record. */ diff --git a/src/storage/phrase_large_table2.cpp b/src/storage/phrase_large_table2.cpp index 0e6fa62..b72917c 100644 --- a/src/storage/phrase_large_table2.cpp +++ b/src/storage/phrase_large_table2.cpp @@ -184,7 +184,7 @@ PhraseLengthIndexLevel2::~PhraseLengthIndexLevel2(){ CASE(15); CASE(16); default: - assert(false); + abort(); } } g_array_free(m_phrase_array_indexes, TRUE); @@ -228,7 +228,7 @@ int PhraseLengthIndexLevel2::search(int phrase_length, CASE(15); CASE(16); default: - assert(false); + abort(); } #undef CASE } @@ -348,7 +348,7 @@ int PhraseLengthIndexLevel2::add_index(int phrase_length, CASE(15); CASE(16); default: - assert(false); + abort(); } #undef CASE @@ -402,7 +402,7 @@ int PhraseLengthIndexLevel2::remove_index(int phrase_length, CASE(15); CASE(16); default: - assert(false); + abort(); } #undef CASE } @@ -605,7 +605,7 @@ bool PhraseLengthIndexLevel2::load(MemoryChunk * chunk, CASE(15); CASE(16); default: - assert(false); + abort(); } #undef CASE } @@ -661,7 +661,7 @@ bool PhraseLengthIndexLevel2::store(MemoryChunk * new_chunk, CASE(15); CASE(16); default: - assert(false); + abort(); } //add '#' new_chunk->set_content(offset, &c_separate, sizeof(char)); @@ -781,7 +781,7 @@ bool PhraseLengthIndexLevel2::mask_out(phrase_token_t mask, CASE(15); CASE(16); default: - assert(false); + abort(); } } /* shrink self array. */ diff --git a/src/storage/pinyin_parser2.cpp b/src/storage/pinyin_parser2.cpp index 17aa358..ce640c3 100644 --- a/src/storage/pinyin_parser2.cpp +++ b/src/storage/pinyin_parser2.cpp @@ -395,7 +395,7 @@ bool FullPinyinParser2::set_scheme(FullPinyinScheme scheme){ m_pinyin_index_len = G_N_ELEMENTS(secondary_zhuyin_index); break; default: - assert(false); + abort(); } return true; } @@ -608,7 +608,7 @@ bool DoublePinyinParser2::set_scheme(DoublePinyinScheme scheme) { m_fallback_table = double_pinyin_xhe_fallback; return true; case DOUBLE_PINYIN_CUSTOMIZED: - assert(FALSE); + abort(); }; return false; /* no such scheme. */ diff --git a/src/storage/table_info.cpp b/src/storage/table_info.cpp index 44fcf60..41c7da0 100644 --- a/src/storage/table_info.cpp +++ b/src/storage/table_info.cpp @@ -113,7 +113,7 @@ static TABLE_PHONETIC_TYPE to_table_phonetic_type(const char * str) { if (0 == strcmp("zhuyin", str)) return ZHUYIN_TABLE; - assert(FALSE); + abort(); } static TABLE_DATABASE_FORMAT_TYPE to_table_database_format_type(const char * str) { @@ -123,7 +123,7 @@ static TABLE_DATABASE_FORMAT_TYPE to_table_database_format_type(const char * str if (0 == strcmp("KyotoCabinet", str)) return KYOTO_CABINET_FORMAT; - assert(FALSE); + abort(); } static TABLE_TARGET to_table_target(const char * str) { @@ -133,7 +133,7 @@ static TABLE_TARGET to_table_target(const char * str) { if (0 == strcmp("addon", str)) return ADDON_TABLE; - assert(FALSE); + abort(); } static guint8 to_index_of_default_tables(const char * str) { @@ -147,7 +147,7 @@ static guint8 to_index_of_default_tables(const char * str) { HANDLE(NETWORK_DICTIONARY); HANDLE(USER_DICTIONARY); - assert(FALSE); + abort(); } static guint8 to_index_of_addon_tables(const char * str) { @@ -166,7 +166,7 @@ static PHRASE_FILE_TYPE to_file_type(const char * str) { HANDLE(DICTIONARY); HANDLE(USER_FILE); - assert(FALSE); + abort(); } #undef HANDLE @@ -178,7 +178,7 @@ static const char * from_table_database_format_type(const TABLE_DATABASE_FORMAT_ if (format == KYOTO_CABINET_FORMAT) return "KyotoCabinet"; - assert(FALSE); + abort(); } diff --git a/src/storage/zhuyin_parser2.cpp b/src/storage/zhuyin_parser2.cpp index e711b76..3f14eab 100644 --- a/src/storage/zhuyin_parser2.cpp +++ b/src/storage/zhuyin_parser2.cpp @@ -291,7 +291,7 @@ bool ZhuyinSimpleParser2::set_scheme(ZhuyinScheme scheme) { m_symbol_table = chewing_standard_dvorak_symbols; m_tone_table = chewing_standard_dvorak_tones; default: - assert(FALSE); + abort(); } return false; @@ -484,7 +484,7 @@ bool ZhuyinDiscreteParser2::set_scheme(ZhuyinScheme scheme) { INIT_PARSER(hsu_zhuyin_index, hsu_dvorak); break; default: - assert(FALSE); + abort(); } #undef INIT_PARSER diff --git a/src/zhuyin.cpp b/src/zhuyin.cpp index 3d418c4..1aeecf5 100644 --- a/src/zhuyin.cpp +++ b/src/zhuyin.cpp @@ -733,7 +733,7 @@ bool zhuyin_set_chewing_scheme(zhuyin_context_t * context, context->m_chewing_parser = new ZhuyinDaChenCP26Parser2(); break; default: - assert(FALSE); + abort(); } return true; } @@ -1300,7 +1300,7 @@ static bool _compute_phrase_length(zhuyin_context_t * context, switch(candidate->m_candidate_type) { case BEST_MATCH_CANDIDATE: - assert(FALSE); + abort(); case NORMAL_CANDIDATE_AFTER_CURSOR: case NORMAL_CANDIDATE_BEFORE_CURSOR: { phrase_index->get_phrase_item(candidate->m_token, item); @@ -1308,7 +1308,7 @@ static bool _compute_phrase_length(zhuyin_context_t * context, break; } case ZOMBIE_CANDIDATE: - assert(FALSE); + abort(); } } @@ -1338,7 +1338,7 @@ static bool _compute_phrase_strings_of_items(zhuyin_instance_t * instance, &(candidate->m_phrase_string)); break; case ZOMBIE_CANDIDATE: - assert(FALSE); + abort(); } } |