diff --git a/honoka/src/anthyconversion.cpp b/honoka/src/anthyconversion.cpp index eefc0de..a74971d 100644 --- a/honoka/src/anthyconversion.cpp +++ b/honoka/src/anthyconversion.cpp @@ -53,7 +53,7 @@ } bool AnthyConversion::isConnected() { - return(true); + return true; } void AnthyConversion::reset(){ @@ -77,7 +77,7 @@ pos = 0; buildResult(); - return(stat.nr_segment); + return stat.nr_segment; } WideString AnthyConversion::getText() { @@ -85,26 +85,26 @@ for(unsigned int i = 0;i < convResult.size();i ++) { text += convResult[i].kouho[convResult[i].pos]; } - return(text); + return text; } int AnthyConversion::setPos(int p){ if ((p < convResult.size()) && (p >= 0)) pos = p; - return(pos); + return pos; } int AnthyConversion::getPos() { - return(pos); + return pos; } ResultList AnthyConversion::getResultList(int p,int kt){ if (p == -1) p = pos; - if ((kt != 0) || (p >= convResult.size())) return(ResultList()); - return(convResult[p]); + if ((kt != 0) || (p >= convResult.size())) return ResultList(); + return convResult[p]; } ResultList AnthyConversion::getYosokuList(const WideString &str) { - return(ResultList()); + return ResultList(); } bool AnthyConversion::select(int p) { @@ -123,15 +123,15 @@ } l += convResult[i].kouho[convResult[i].pos].length(); } - return(attr); + return attr; } bool AnthyConversion::resizeRegion(int w) { - if ((convResult[pos].kouho[convResult[pos].pos].length() + w) < 1) return(false); - if ((pos >= (convResult.size() - 1)) && (w > 0)) return(false); + if ((convResult[pos].kouho[convResult[pos].pos].length() + w) < 1) return false; + if ((pos >= (convResult.size() - 1)) && (w > 0)) return false; anthy_resize_segment(context,pos,w); buildResult(); - return(true); + return true; } void AnthyConversion::updateFrequency() { @@ -142,7 +142,7 @@ } bool AnthyConversion::connect() { - return(true); + return true; } void AnthyConversion::disconnect() { return; @@ -151,10 +151,10 @@ int AnthyConversion::getCaretPos() { int l = 0; for(unsigned int i = 0;i < convResult.size();i ++) { - if (pos == i) return(l); + if (pos == i) return l; l += convResult[i].kouho[convResult[i].pos].length(); } - return(0); + return 0; } void AnthyConversion::buildResult() { @@ -184,12 +184,12 @@ String AnthyConversion::getName() { - return(String("Anthy")); + return String("Anthy"); } String AnthyConversion::getPropertyName() { - return(String("Anthy")); + return String("Anthy"); } diff --git a/honoka/src/convertor.cpp b/honoka/src/convertor.cpp index c909b7f..1b407b4 100644 --- a/honoka/src/convertor.cpp +++ b/honoka/src/convertor.cpp @@ -32,7 +32,7 @@ } bool Convertor::isConnected() { - return(false); + return false; } void Convertor::reset(){ @@ -44,39 +44,39 @@ } int Convertor::ren_conversion() { - return(0); + return 0; } WideString Convertor::getText() { - return(WideString()); + return WideString(); } int Convertor::setPos(int p){ - return(0); + return 0; } int Convertor::getPos() { - return(0); + return 0; } ResultList Convertor::getResultList(int p,int kt){ - return(ResultList()); + return ResultList(); } ResultList Convertor::getYosokuList(const WideString &str) { - return(ResultList()); + return ResultList(); } bool Convertor::select(int p) { - return(false); + return false; } AttributeList Convertor::getAttributeList() { - return(AttributeList()); + return AttributeList(); } bool Convertor::resizeRegion(int w) { - return(false); + return false; } void Convertor::updateFrequency() { @@ -84,23 +84,23 @@ } bool Convertor::connect() { - return(false); + return false; } void Convertor::disconnect() { return; } int Convertor::getCaretPos() { - return(0); + return 0; } String Convertor::getName() { - return(String("Convertor")); + return String("Convertor"); } String Convertor::getPropertyName() { - return(getName()); + return getName(); } diff --git a/honoka/src/honoka_imengine.cpp b/honoka/src/honoka_imengine.cpp index 8f95e84..c545238 100644 --- a/honoka/src/honoka_imengine.cpp +++ b/honoka/src/honoka_imengine.cpp @@ -173,13 +173,13 @@ else if ((kc > 0x40) && (kc < 0x5b)) kc += 0x20; for (unsigned int i = 0;i < size();i ++) { if ((at(i).code == k.code) && (at(i).mask == k.mask)) { - return(true); + return true; } if (kc && (at(i).code == kc) && (at(i).mask == k.mask)) { - return(true); + return true; } } - return(false); + return false; } @@ -503,14 +503,14 @@ bool HonokaInstance::process_key_event (const KeyEvent& key) { - if (key.is_key_release()) return(false); + if (key.is_key_release()) return false; KeyEvent ke = key; if (ke.mask & SCIM_KEY_CapsLockMask) ke.mask -= SCIM_KEY_CapsLockMask; if (ke.mask & SCIM_KEY_NumLockMask) ke.mask -= SCIM_KEY_NumLockMask; if (ke.mask & SCIM_KEY_ScrollLockMask) ke.mask -= SCIM_KEY_ScrollLockMask; - if (m_conversion) return(process_conversion_key_event(ke)); - else if (m_yosoku) return(process_yosoku_key_event(ke)); - else return(process_preedit_key_event(ke)); + if (m_conversion) return process_conversion_key_event(ke); + else if (m_yosoku) return process_yosoku_key_event(ke); + else return process_preedit_key_event(ke) ; } @@ -522,7 +522,7 @@ // PreEditor�Υ������٥�ȥեå��� if (m_preeditor->keyEventHook(key)) { updatePreEditor(); - return(true); + return true; } else if (k_reconversion.comp(key)) { @@ -533,7 +533,7 @@ // delete_surrounding_text()��ȤäƤκ���Ȥ�����͡� startConversion(w); alp_count ++; - return(true); + return true; } } } @@ -543,7 +543,7 @@ if (k_conversion_start.comp(key)) { startConversion(m_preeditor->getText(true)); alp_count ++; - return(true); + return true; } else if (k_commit.comp(key)) { if (auto_conversion) { @@ -552,46 +552,46 @@ } else commit_string(m_preeditor->getText(true)); m_preeditor->reset(); updatePreEditor(); - return(true); + return true; } else if (k_forward.comp(key) || k_backward.comp(key)) { k_backward.comp(key) ? m_preeditor->setPos(m_preeditor->getPos() - 1) : m_preeditor->setPos(m_preeditor->getPos() + 1); updatePreEditor(); - return(true); + return true; } else if (k_home.comp(key) || k_end.comp(key)) { k_end.comp(key) ? m_preeditor->setPos(m_preeditor->getTextLength()) : m_preeditor->setPos(0); updatePreEditor(); - return(true); + return true; } else if ((k_backspace.comp(key)) || (k_delete.comp(key))) { k_backspace.comp(key) ? m_preeditor->backspace(): m_preeditor->del(); updatePreEditor(); - return(true); + return true; } else if (k_convert_hiragana.comp(key)) { m_preeditor->kataHira(); updatePreEditor(); - return(true); + return true; } else if (k_convert_katakana.comp(key)) { m_preeditor->hiraKata(); updatePreEditor(); - return(true); + return true; } else if (k_convert_half.comp(key)) { m_preeditor->toHalf(); updatePreEditor(); - return(true); + return true; } else if (k_convert_wide.comp(key)) { m_preeditor->toWide(); updatePreEditor(); - return(true); + return true; } else if (k_select_yosoku.comp(key) && yosoku) { if ((m_convList.kType == YOSOKU) && (m_convList.count)) { - return(process_yosoku_key_event(key)); + return process_yosoku_key_event(key); } } } @@ -600,13 +600,13 @@ if (k_cancel.comp(key)) { if (m_preeditor->cancelEvent()) { updatePreEditor(); - return(true); + return true; } if (m_preeditor->getTextLength()) { m_preeditor->reset(); } updatePreEditor(); - return(true); + return true; } if (k_next_convertor.comp(key) || k_prev_convertor.comp(key)) { @@ -621,7 +621,7 @@ } changeConvertor(convertors[i]->getPropertyName()); updatePreEditor(); - return(true); + return true; } } } @@ -629,13 +629,13 @@ if (k_auto_conversion.comp(key)) { auto_conversion ? auto_conversion = false : auto_conversion = true; updatePreEditor(); - return(true); + return true; } if (m_preeditor->inputEvent(key)) { updatePreEditor(); - return(true); + return true; } else { // preeditor�ǽ����Ǥ��ʤ��ä����Ϥ�Ϥ�commit���ƥ��ץꥱ���������֤��٤����� if (m_preeditor->getTextLength()) { @@ -648,7 +648,7 @@ updatePreEditor(); } - return(false); + return false; } /*! @@ -665,16 +665,16 @@ (key.code == SCIM_KEY_Super_L) || (key.code == SCIM_KEY_Super_R) || (key.code == SCIM_KEY_Hyper_L) || - (key.code == SCIM_KEY_Hyper_R)) return(true); + (key.code == SCIM_KEY_Hyper_R)) return true; if ((alp <= alp_count) && (alp != 0)) { if (!m_lookup) startLookup(); } if (k_lookup_popup.comp(key)) { - if (m_lookup) return(true); + if (m_lookup) return true; startLookup(); - return(true); + return true; } else if (k_lookup_pageup.comp(key)) { if (m_lookup) { @@ -695,7 +695,7 @@ updatePreEditor(); m_lookup = false; alp_count = 1; - return(true); + return true; } else if (k_cancel.comp(key) || k_backspace.comp(key)) { m_convertor->reset(); @@ -703,7 +703,7 @@ m_lookup = false; alp_count = 0; updatePreEditor(); - return(true); + return true; } else if (k_conversion_next.comp(key) || k_conversion_prev.comp(key)) { k_conversion_prev.comp(key) ? m_convList.pos --: m_convList.pos ++; @@ -713,35 +713,35 @@ m_convertor->select(m_convList.pos); updateConversion(); - return(true); + return true; } else if (k_conversion_expand.comp(key) || k_conversion_shrink.comp(key)) { bool r; k_conversion_shrink.comp(key) ? r = m_convertor->resizeRegion(-1) : r = m_convertor->resizeRegion(1); - if (!r) return(true); + if (!r) return true; m_convList = m_convertor->getResultList(); if (alp == -1) { startLookup(); } else m_lookup = false; updateConversion(); alp_count = 1; - return(true); + return true; } else if (k_conversion_rensou.comp(key) && ((sType == "Wnn7") || (sType == "Wnn8")) ) { m_convList = m_convertor->getResultList(m_convertor->getPos(),RENSOU); - if (m_convList.count == 0) return(true); + if (m_convList.count == 0) return true; startLookup(); updateConversion(); alp_count = 1; - return(true); + return true; } else if (k_conversion_ikeiji.comp(key) && ((sType == "Wnn7") || (sType == "Wnn8")) ) { m_convList = m_convertor->getResultList(m_convertor->getPos(),IKEIJI); - if (m_convList.count == 0) return(true); + if (m_convList.count == 0) return true; startLookup(); updateConversion(); alp_count = 1; - return(true); + return true; } else if (k_conversion_forward.comp(key) || k_conversion_backward.comp(key)) { k_conversion_backward.comp(key) ? m_convertor->setPos(m_convertor->getPos() - 1) : m_convertor->setPos(m_convertor->getPos() + 1); @@ -751,7 +751,7 @@ } else m_lookup = false; updateConversion(); alp_count = 1; - return(true); + return true; } else if (k_convert_hiragana.comp(key) || k_convert_katakana.comp(key)) { WideString res = m_convList.Yomi; @@ -764,7 +764,7 @@ break; } } - return(true); + return true; } else if (k_next_convertor.comp(key) || k_prev_convertor.comp(key)) { for(unsigned int i = 0;i < convertors.size();i ++) { @@ -781,12 +781,12 @@ m_def_convertor->reset(); startConversion(); } - return(true); + return true; } } } else if (key.get_ascii_code()) { - if (key.mask & (SCIM_KEY_AltMask | SCIM_KEY_ControlMask)) return(false); + if (key.mask & (SCIM_KEY_AltMask | SCIM_KEY_ControlMask)) return false; if (m_lookup && numkeyselect) { char numk[] = "1234567890"; int numc = 0; @@ -798,14 +798,14 @@ } } if (numkey) { - if (m_lookup_table.get_current_page_size() < numc) return(true); + if (m_lookup_table.get_current_page_size() < numc) return true; m_convList.pos = numc + m_lookup_table.get_current_page_start(); m_convertor->select(m_convList.pos); m_convertor->setPos(m_convertor->getPos() + 1); m_convList = m_convertor->getResultList(); updateConversion(); startLookup(); - return(true); + return true; } } @@ -817,11 +817,11 @@ m_lookup = false; alp_count = 0; updatePreEditor(); - return(process_preedit_key_event(key)); + return process_preedit_key_event(key); } - return(true); + return true; } @@ -837,16 +837,16 @@ update_preedit_caret(0); show_preedit_string(); updateProperty(); - return(true); + return true; } if (k_lookup_pageup.comp(key)) { lookup_table_page_up(); - return(true); + return true; } else if (k_lookup_pagedown.comp(key)) { lookup_table_page_down(); - return(true); + return true; } else if (k_conversion_next.comp(key) || k_conversion_prev.comp(key) || k_select_yosoku.comp(key)) { k_conversion_prev.comp(key) ? m_convList.pos --: m_convList.pos ++; @@ -858,28 +858,28 @@ update_preedit_caret(0); // select_candidate((unsigned int)m_convList.pos); updateProperty(); - return(true); + return true; } else if (k_commit.comp(key)) { m_yosoku = false; commit_string(m_convList.kouho.at(m_convList.pos)); m_preeditor->reset(); updatePreEditor(); - return(true); + return true; } else if (k_cancel.comp(key) || k_backspace.comp(key)) { m_yosoku = false; updatePreEditor(); - return(true); + return true; } - if (!key.get_ascii_code()) return(true); + if (!key.get_ascii_code()) return true; if ((!(key.is_control_down() || key.is_alt_down() || key.is_shift_down())) && numkeyselect) { char numk[] = "1234567890"; for(int numc = 0;numk[numc]; ++ numc) { if (key.get_ascii_code() == numk[numc]) { if (m_lookup_table.get_current_page_size() > numc) select_candidate((unsigned int)numc); - return(true); + return true; } } } @@ -888,7 +888,7 @@ commit_string(m_convList.kouho.at(m_convList.pos)); m_preeditor->reset(); updatePreEditor(); - return(process_preedit_key_event(key)); + return process_preedit_key_event(key); } diff --git a/honoka/src/honokapluginbase.cpp b/honoka/src/honokapluginbase.cpp index bb55427..0506355 100644 --- a/honoka/src/honokapluginbase.cpp +++ b/honoka/src/honokapluginbase.cpp @@ -32,6 +32,6 @@ String HonokaPluginBase::getPluginType() { - return(type); + return type; } diff --git a/honoka/src/honokapluginbase.h b/honoka/src/honokapluginbase.h index 218f9a2..dccd9aa 100644 --- a/honoka/src/honokapluginbase.h +++ b/honoka/src/honokapluginbase.h @@ -34,7 +34,7 @@ @author TAM (Teppei Tamra) */ -#define HonokaPluginRegister(pName) extern "C" {HonokaPluginBase *getHonokaPluginInstance(ConfigPointer cfg){return(new pName(cfg));}} +#define HonokaPluginRegister(pName) extern "C" {HonokaPluginBase *getHonokaPluginInstance(ConfigPointer cfg){return new pName(cfg);}} class HonokaPluginBase{ protected: diff --git a/honoka/src/kanainput.cpp b/honoka/src/kanainput.cpp index 099ea3b..9c301fc 100644 --- a/honoka/src/kanainput.cpp +++ b/honoka/src/kanainput.cpp @@ -132,7 +132,7 @@ */ String KanaInput::getModeName() { - return(_("KANA")); + return _("KANA"); } /*! @@ -140,7 +140,7 @@ */ String KanaInput::getName() { - return(String(_("Kana"))); + return String(_("Kana")); } @@ -159,7 +159,7 @@ (key.code == SCIM_KEY_Super_L) || (key.code == SCIM_KEY_Super_R) || (key.code == SCIM_KEY_Hyper_L) || - (key.code == SCIM_KEY_Hyper_R)) return(true); + (key.code == SCIM_KEY_Hyper_R)) return true; for(unsigned int i = 0;KanaInputTable[i].code != 0;++ i) { if (key.code == KanaInputTable[i].code) { @@ -167,7 +167,7 @@ iconvert.convert(w,String(KanaInputTable[i].kana)); text = text.substr(0,pos) + w + text.substr(pos); pos ++; - return(true); + return true; } } if ((((key.get_ascii_code() == '@') && (fakeKanaInput)) || (key.code == SCIM_KEY_voicedsound )) && (pos > 0)) { @@ -177,7 +177,7 @@ for(unsigned int i = 0;i < vs1.length();i ++) { if (vs1[i] == text[pos - 1]) text = text.substr(0,pos - 1) + vs2[i] + text.substr(pos); } - return(true); + return true; } if ((((key.get_ascii_code() == '[') && (fakeKanaInput)) || (key.code == SCIM_KEY_semivoicedsound )) && (pos > 0)) { WideString vs1,vs2; @@ -186,7 +186,7 @@ for(unsigned int i = 0;i < vs1.length();i ++) { if (vs1[i] == text[pos - 1]) text = text.substr(0,pos - 1) + vs2[i] + text.substr(pos); } - return(true); + return true; } if (fakeKanaInput) { char f1[] = "1234567890-^qwertyuiopasdfghjkl;:]zxcvbnm,./\\!\"#$%&'()~=~|QWERTYUIOP`{ASDFGHJKL+*}ZXCVBNM<>?_"; @@ -196,7 +196,7 @@ if (key.get_ascii_code() == f1[i]) { text = text.substr(0,pos) + f2[i] + text.substr(pos); pos ++; - return(true); + return true; } } } @@ -205,8 +205,8 @@ s += key.get_ascii_code(); text = text.substr(0,pos) + utf8_mbstowcs(s) + text.substr(pos); pos ++; - return(true); + return true; } - return(false); + return false; } diff --git a/honoka/src/kanainput.h b/honoka/src/kanainput.h index 0809832..fb7f70e 100644 --- a/honoka/src/kanainput.h +++ b/honoka/src/kanainput.h @@ -42,7 +42,7 @@ virtual bool inputEvent(const KeyEvent &key); virtual String getName(); virtual String getModeName(); - virtual String getPropertyName() {return(String("KanaInput"));}; + virtual String getPropertyName() {return String("KanaInput");}; protected: bool fakeKanaInput; diff --git a/honoka/src/preeditor.cpp b/honoka/src/preeditor.cpp index bf6b24f..296d608 100644 --- a/honoka/src/preeditor.cpp +++ b/honoka/src/preeditor.cpp @@ -36,13 +36,13 @@ else if ((kc > 0x40) && (kc < 0x5b)) kc += 0x20; for (unsigned int i = 0;i < size();i ++) { if ((at(i).code == k.code) && (at(i).mask == k.mask)) { - return(true); + return true; } if (kc && (at(i).code == kc) && (at(i).mask == k.mask)) { - return(true); + return true; } } - return(false); + return false; } PreEditor::PreEditor(ConfigPointer cfg) : HonokaPluginBase(String("PreEditor")) @@ -95,7 +95,7 @@ */ int PreEditor::getPos() { - return(pos); + return pos; } @@ -104,7 +104,7 @@ */ int PreEditor::getTextLength() { - return(text.length()); + return text.length(); } @@ -113,7 +113,7 @@ */ bool PreEditor::textIsEmpty() { - return(text.empty()); + return text.empty(); } @@ -153,7 +153,7 @@ */ WideString PreEditor::getText(bool hosei) { - return(text); + return text; } @@ -215,7 +215,7 @@ if ((t[i] >= convChars[ASCII_START]) && (t[i] <= convChars[ASCII_END])) t[i] = t[i] - convChars[ASCII_START] + convChars[WASCII_START]; } - return(p); + return p; } @@ -239,7 +239,7 @@ i += it->second.length() - 1; } } - return(p); + return p; } @@ -284,7 +284,7 @@ */ bool PreEditor::keyEventHook(const KeyEvent &key) { - return(false); + return false; } @@ -295,7 +295,7 @@ String PreEditor::getModeName() { String s; - return(s); + return s; } @@ -304,7 +304,7 @@ */ bool PreEditor::cancelEvent() { - return(false); + return false; } @@ -319,9 +319,9 @@ s = key.get_ascii_code(); text = text.substr(0,pos) + utf8_mbstowcs(s) + text.substr(pos); pos ++; - return(true); + return true; } - return(false); + return false; } @@ -330,7 +330,7 @@ */ String PreEditor::getName() { - return(String("PreEditor")); + return String("PreEditor"); } @@ -349,5 +349,5 @@ */ AttributeList PreEditor::getAttributeList() { - return(AttributeList()); + return AttributeList(); } diff --git a/honoka/src/preeditor.h b/honoka/src/preeditor.h index c06d4f5..23e5fab 100644 --- a/honoka/src/preeditor.h +++ b/honoka/src/preeditor.h @@ -87,7 +87,7 @@ virtual bool cancelEvent(); virtual bool inputEvent(const KeyEvent &key); virtual String getName(); - virtual String getPropertyName() {return(String("PreEditor"));}; + virtual String getPropertyName() {return String("PreEditor");}; virtual void setText(const WideString &t); virtual void toWide(); virtual void toHalf(); diff --git a/honoka/src/romkan.cpp b/honoka/src/romkan.cpp index 2589106..98bf31c 100644 --- a/honoka/src/romkan.cpp +++ b/honoka/src/romkan.cpp @@ -142,8 +142,8 @@ */ bool Romkan::string2bool(const String &s) { - if ((s == "FALSE") || (s == "false") || (s == "False") || (s == "0") || (!s.size())) return(false); - else return(true); + if ((s == "FALSE") || (s == "false") || (s == "False") || (s == "0") || (!s.size())) return false; + else return true; } @@ -217,13 +217,13 @@ { String s; s = k; - if (k == 0) return(text); + if (k == 0) return text; switch(mode) { case ASCII: { buf.clear(); text = text.substr(0,pos) + utf8_mbstowcs(s) + text.substr(pos); pos ++; - return(text); + return text; break; } case WASCII: { @@ -232,32 +232,32 @@ convHanZen(w,pos); text = text.substr(0,pos) + w + text.substr(pos); pos ++; - return(text); + return text; break; } case ROMA: { buf += s; text = text.substr(0,pos) + utf8_mbstowcs(s) + text.substr(pos); pos ++; - return(eval()); + return eval(); break; } case KROMA: { buf += s; text = text.substr(0,pos) + utf8_mbstowcs(s) + text.substr(pos); pos ++; - return(eval()); + return eval(); break; } case HROMA: { buf += s; text = text.substr(0,pos) + utf8_mbstowcs(s) + text.substr(pos); pos ++; - return(eval()); + return eval(); break; } } - return(text); + return text; } @@ -297,12 +297,12 @@ else if (mode == KROMA) convHiraKata(r); text = text.substr(0,pos - 2) + r + text.substr(pos - 1); buf = buf.substr(buf.length() - 1,1); - return(text); + return text; } } // ��α�ơ��֥�򸡺����롣 - if (keepTable.find(buf) != keepTable.end()) return(text); + if (keepTable.find(buf) != keepTable.end()) return text; // �ơ��֥�򸡺��������Ϥ��롣 map::iterator it = RomkanTable.find(buf); if (it != RomkanTable.end()) { @@ -313,7 +313,7 @@ text = text.substr(0,pos - buf.length()) + r + text.substr(pos); pos = pos - buf.length() + r.length(); buf.clear(); - return(text); + return text; } if (buf.length()) { if (removeRemainder) { @@ -321,10 +321,10 @@ pos --; } buf = buf.substr(1); - return(eval()); + return eval(); } - return(text); + return text; } @@ -378,7 +378,7 @@ } } } - return(text); + return text; } @@ -468,18 +468,18 @@ break; } } - return(true); + return true; } if (key_toggle_hk.comp(key)) { if (mode == ROMA) mode = KROMA; else if (mode == KROMA) mode = ROMA; - return(true); + return true; } if ((isprint(key.code)) && ((mode == ASCII) || (mode == WASCII))) { if ((!key.is_alt_down()) && (!key.is_control_down())) { insert(key.get_ascii_code()); - return(true); + return true; } } @@ -487,15 +487,15 @@ if (it->comp(key)) { text = text.substr(0,pos) + it->p + text.substr(pos); pos += it->p.length(); - return(true); + return true; } } - if ((buf.length() < hookp.length()) || (!hookp.length())) return(false); + if ((buf.length() < hookp.length()) || (!hookp.length())) return false; else if (buf.substr(0,hookp.length()) == hookp) { - return(inputEvent(key)); + return inputEvent(key); } - return(false); + return false; } @@ -506,23 +506,23 @@ { switch(mode) { case ROMA: { - return(String(_("Roma-Kana"))); + return String(_("Roma-Kana")); break; } case KROMA: { - return(String(_("Roma-Katakana"))); + return String(_("Roma-Katakana")); break; } case HROMA: { - return(String(_("Half Roma-Kana"))); + return String(_("Half Roma-Kana")); break; } case ASCII: { - return(String(_("Ascii"))); + return String(_("Ascii")); break; } case WASCII: { - return(String(_("Wide Ascii"))); + return String(_("Wide Ascii")); break; } } @@ -536,9 +536,9 @@ { if (((mode == ASCII) || (mode == WASCII)) && (asciiCancel)) { mode = ROMA; - return(true); + return true; } - return(false); + return false; } @@ -557,26 +557,26 @@ (key.code == SCIM_KEY_Super_L) || (key.code == SCIM_KEY_Super_R) || (key.code == SCIM_KEY_Hyper_L) || - (key.code == SCIM_KEY_Hyper_R)) return(true); + (key.code == SCIM_KEY_Hyper_R)) return true; if (key_ascii_mode.comp(key)) { mode = ASCII; - return(true); + return true; } if (key_wascii_mode.comp(key)) { mode = WASCII; - return(true); + return true; } if (key.get_ascii_code() && (!key.is_alt_down()) && (!key.is_control_down())) { - if ((key.get_ascii_code() == ' ') && (!getTextLength())) return(false); + if ((key.get_ascii_code() == ' ') && (!getTextLength())) return false; // ��ľ���֤��٤���� if ((key.code == SCIM_KEY_Return) || (key.code == SCIM_KEY_Linefeed) || - (key.code == SCIM_KEY_Tab)) return(false); + (key.code == SCIM_KEY_Tab)) return false; insert(key.get_ascii_code()); - return(true); + return true; } - return(false); + return false; } @@ -585,7 +585,7 @@ */ String Romkan::getName() { - return(String(_("Roma"))); + return String(_("Roma")); } @@ -601,5 +601,5 @@ Attribute a(pos - buf.length(),buf.length(),SCIM_ATTR_FOREGROUND,SCIM_RGB_COLOR(255,0,0)); l.push_back(a); } - return(l); + return l; } diff --git a/honoka/src/romkan.h b/honoka/src/romkan.h index e27279d..c78b46d 100644 --- a/honoka/src/romkan.h +++ b/honoka/src/romkan.h @@ -68,7 +68,7 @@ virtual bool cancelEvent(); virtual bool inputEvent(const KeyEvent &key); virtual String getName(); - virtual String getPropertyName() {return(String("Romkan"));}; + virtual String getPropertyName() {return String("Romkan");}; virtual void setText(const WideString &t); virtual AttributeList getAttributeList(); diff --git a/honoka/src/wnnconversion.cpp b/honoka/src/wnnconversion.cpp index c0fe2fb..de3674a 100644 --- a/honoka/src/wnnconversion.cpp +++ b/honoka/src/wnnconversion.cpp @@ -127,13 +127,13 @@ { wnn = jl_open((char *)name.c_str(),(char *)host.c_str(),(char *)rc.c_str(),wnn_error,wnn_message,timeout); //wnn = jl_open_lang("test","localhost","jp_JP","/usr/lib/wnn7/ja_JP/wnnenvrc",wnn_error,wnn_message,10); - if (wnn == NULL) return(false); + if (wnn == NULL) return false; #ifdef HAVE_LIBWNN7 // ͽ¬���Ϥ��������Ƥ����� jl_yosoku_init(wnn); #endif sType = type; - return(true); + return true; } /*! @@ -158,7 +158,7 @@ */ bool WnnConversion::isConnected() { - if (wnn) return(true); + if (wnn) return true; else (false); } @@ -227,7 +227,7 @@ m_iconv.convert(y,yomiText); strtows(ws,(unsigned char*)y.c_str()); bunsetu = jl_fi_ren_conv(wnn,ws,0,-1,WNN_USE_ZENGO); - if (bunsetu == -1) return(-1); + if (bunsetu == -1) return -1; for(unsigned int i = 0;i < bunsetu;i ++) { WideString w; jl_get_kanji(wnn,i,i + 1,ws); @@ -240,7 +240,7 @@ yomiList.push_back(w); } createText(); - return(bunsetu); + return bunsetu; } @@ -249,9 +249,9 @@ */ bool WnnConversion::resizeRegion(int w) { - if (w == 0) return(false); - if ((yomiList[pos].length() + w) <= 0) return(false); - if (((pos + 1) >= yomiList.size()) && (w > 0)) return(false); + if (w == 0) return false; + if ((yomiList[pos].length() + w) <= 0) return false; + if (((pos + 1) >= yomiList.size()) && (w > 0)) return false; w_char ws[1024]; char c[2048]; @@ -275,7 +275,7 @@ yomiList.push_back(w); } createText(); - return(true); + return true; } @@ -303,7 +303,7 @@ */ WideString WnnConversion::getText() { - return(text); + return text; } @@ -312,7 +312,7 @@ */ AttributeList WnnConversion::getAttributeList() { - return(attr); + return attr; } @@ -326,7 +326,7 @@ pos = p; createText(); - return(pos); + return pos; } @@ -335,7 +335,7 @@ */ int WnnConversion::getPos() { - return(pos); + return pos; } @@ -356,7 +356,7 @@ // @todo ������mbstowcs�����ۤ����ɤ��󤫡� char c[1024]; strcpy(c,s.c_str()); - if (jl_yosoku_yosoku(wnn,c) != 0) return(convList); + if (jl_yosoku_yosoku(wnn,c) != 0) return convList; convList.count = ykYosokuKouhoNum; for(unsigned int i = 0;i < convList.count;i ++) { WideString w; @@ -365,7 +365,7 @@ } //jl_yosoku_free(wnn); #endif - return(convList); + return convList; } @@ -381,7 +381,7 @@ convList.Yomi.clear(); convList.pos = 0; convList.count = 0; - if ((sType != Wnn8) && (sType != Wnn7) && (kt != DEFAULT)) return(convList); + if ((sType != Wnn8) && (sType != Wnn7) && (kt != DEFAULT)) return convList; if (p == -1) p = pos; if ((p >= bunsetu) || (p < 0)) p = p % bunsetu; @@ -424,7 +424,7 @@ // @todo jl_zenkouho should change to jl_zenkouho_dai. //convList.pos = jl_zenassoc_dai(wnn,pos,pos + 1,WNN_USE_ZENGO,WNN_UNIQ); //convList.pos = jl_zenkouho(wnn,pos,conn,WNN_UNIQ); - if (convList.pos == -1) return(convList); + if (convList.pos == -1) return convList; convList.count = jl_zenkouho_suu(wnn); for (unsigned int i = 0;i < convList.count; i ++) { @@ -435,7 +435,7 @@ } select(convList.pos); createText(); - return(convList); + return convList; } @@ -456,7 +456,7 @@ #ifdef HAVE_LIBWNN7 jl_yosoku_selected_cand(wnn,p); #endif - return(true); + return true; } default: { break; @@ -466,7 +466,7 @@ bunList.at(pos) = convList.kouho.at(p); createText(); - return(true); + return true; } @@ -497,17 +497,17 @@ */ int WnnConversion::getCaretPos() { - return(caretPos); + return caretPos; } String WnnConversion::getName() { - return(String("Wnn")); + return String("Wnn"); } String WnnConversion::getPropertyName() { - return(String("Wnn")); + return String("Wnn"); }