From a33833212f040272fc6c97047c8cb335b6f5405a Mon Sep 17 00:00:00 2001 From: Vadim Dashevskiy Date: Tue, 24 Jul 2012 06:41:19 +0000 Subject: SimpleAR, SimpleStatusMsg, SmileyAdd, SpellChecker: changed folder structure git-svn-id: http://svn.miranda-ng.org/main/trunk@1149 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/SimpleAR/Res/Resource.rc | 93 + plugins/SimpleAR/Res/Version.rc | 42 + plugins/SimpleAR/Resource.h | 25 - plugins/SimpleAR/Resource.rc | 93 - plugins/SimpleAR/SimpleAR_10.vcxproj | 30 +- plugins/SimpleAR/SimpleAR_10.vcxproj.filters | 28 +- plugins/SimpleAR/Src/Common.h | 5 +- plugins/SimpleAR/Src/Resource.h | 25 + plugins/SimpleAR/Src/Version.h | 21 + plugins/SimpleAR/Version.h | 21 - plugins/SimpleAR/Version.rc | 42 - plugins/SimpleAR/docs/simplear-translation.txt | 17 + plugins/SimpleAR/simplear-translation.txt | 17 - plugins/SimpleStatusMsg/awaymsg.cpp | 494 - plugins/SimpleStatusMsg/commonheaders.h | 63 - .../docs/simplestatusmsg-translation.txt | 150 + plugins/SimpleStatusMsg/main.cpp | 2176 -- plugins/SimpleStatusMsg/msgbox.cpp | 1798 -- plugins/SimpleStatusMsg/options.cpp | 1750 -- plugins/SimpleStatusMsg/res/resource.rc | 437 + plugins/SimpleStatusMsg/resource.h | 126 - plugins/SimpleStatusMsg/resource.rc | 437 - .../simplestatusmsg-translation.txt | 150 - plugins/SimpleStatusMsg/simplestatusmsg.h | 105 - plugins/SimpleStatusMsg/simplestatusmsg_10.vcxproj | 40 +- .../simplestatusmsg_10.vcxproj.filters | 44 +- plugins/SimpleStatusMsg/src/awaymsg.cpp | 494 + plugins/SimpleStatusMsg/src/commonheaders.h | 65 + plugins/SimpleStatusMsg/src/main.cpp | 2176 ++ plugins/SimpleStatusMsg/src/msgbox.cpp | 1798 ++ plugins/SimpleStatusMsg/src/options.cpp | 1750 ++ plugins/SimpleStatusMsg/src/resource.h | 126 + plugins/SimpleStatusMsg/src/simplestatusmsg.h | 105 + plugins/SimpleStatusMsg/src/utils.cpp | 226 + plugins/SimpleStatusMsg/utils.cpp | 226 - plugins/SmileyAdd/AniSmileyObject.cpp | 450 - plugins/SmileyAdd/Res/resource.rc | 214 + plugins/SmileyAdd/SmileyAdd_10.vcxproj | 84 +- plugins/SmileyAdd/SmileyAdd_10.vcxproj.filters | 79 +- plugins/SmileyAdd/SmileyBase.cpp | 391 - plugins/SmileyAdd/SmileyBase.h | 127 - plugins/SmileyAdd/anim.cpp | 184 - plugins/SmileyAdd/anim.h | 87 - plugins/SmileyAdd/bkstring.cpp | 215 - plugins/SmileyAdd/bkstring.h | 270 - plugins/SmileyAdd/customsmiley.cpp | 172 - plugins/SmileyAdd/customsmiley.h | 85 - plugins/SmileyAdd/dlgboxsubclass.cpp | 568 - plugins/SmileyAdd/docs/smileyadd-translation.txt | 54 + plugins/SmileyAdd/download.cpp | 292 - plugins/SmileyAdd/download.h | 28 - plugins/SmileyAdd/general.cpp | 299 - plugins/SmileyAdd/general.h | 232 - plugins/SmileyAdd/imagecache.cpp | 775 - plugins/SmileyAdd/imagecache.h | 166 - plugins/SmileyAdd/main.cpp | 225 - plugins/SmileyAdd/options.cpp | 728 - plugins/SmileyAdd/options.h | 60 - plugins/SmileyAdd/regexp/Matcher.cpp | 178 - plugins/SmileyAdd/regexp/Matcher.h | 248 - plugins/SmileyAdd/regexp/Pattern.cpp | 1709 -- plugins/SmileyAdd/regexp/Pattern.h | 1663 -- plugins/SmileyAdd/regexp/WCMatcher.cpp | 181 - plugins/SmileyAdd/regexp/WCMatcher.h | 234 - plugins/SmileyAdd/regexp/WCPattern.cpp | 1747 -- plugins/SmileyAdd/regexp/WCPattern.h | 1663 -- plugins/SmileyAdd/regexp/test.cpp | 38 - plugins/SmileyAdd/resource.h | 49 - plugins/SmileyAdd/resource.rc | 214 - plugins/SmileyAdd/richcall.cpp | 554 - plugins/SmileyAdd/services.cpp | 590 - plugins/SmileyAdd/services.h | 48 - plugins/SmileyAdd/smileyadd-translation.txt | 54 - plugins/SmileyAdd/smileyroutines.cpp | 610 - plugins/SmileyAdd/smileyroutines.h | 49 - plugins/SmileyAdd/smileys.cpp | 1146 -- plugins/SmileyAdd/smileys.h | 287 - plugins/SmileyAdd/smltool.cpp | 785 - plugins/SmileyAdd/smltool.h | 45 - plugins/SmileyAdd/src/AniSmileyObject.cpp | 450 + plugins/SmileyAdd/src/SmileyBase.cpp | 391 + plugins/SmileyAdd/src/SmileyBase.h | 127 + plugins/SmileyAdd/src/anim.cpp | 184 + plugins/SmileyAdd/src/anim.h | 87 + plugins/SmileyAdd/src/bkstring.cpp | 215 + plugins/SmileyAdd/src/bkstring.h | 270 + plugins/SmileyAdd/src/customsmiley.cpp | 172 + plugins/SmileyAdd/src/customsmiley.h | 85 + plugins/SmileyAdd/src/dlgboxsubclass.cpp | 568 + plugins/SmileyAdd/src/download.cpp | 292 + plugins/SmileyAdd/src/download.h | 28 + plugins/SmileyAdd/src/general.cpp | 299 + plugins/SmileyAdd/src/general.h | 232 + plugins/SmileyAdd/src/imagecache.cpp | 775 + plugins/SmileyAdd/src/imagecache.h | 166 + plugins/SmileyAdd/src/main.cpp | 225 + plugins/SmileyAdd/src/options.cpp | 728 + plugins/SmileyAdd/src/options.h | 60 + plugins/SmileyAdd/src/regexp/Matcher.cpp | 178 + plugins/SmileyAdd/src/regexp/Matcher.h | 248 + plugins/SmileyAdd/src/regexp/Pattern.cpp | 1709 ++ plugins/SmileyAdd/src/regexp/Pattern.h | 1663 ++ plugins/SmileyAdd/src/regexp/WCMatcher.cpp | 181 + plugins/SmileyAdd/src/regexp/WCMatcher.h | 234 + plugins/SmileyAdd/src/regexp/WCPattern.cpp | 1747 ++ plugins/SmileyAdd/src/regexp/WCPattern.h | 1663 ++ plugins/SmileyAdd/src/regexp/test.cpp | 38 + plugins/SmileyAdd/src/resource.h | 49 + plugins/SmileyAdd/src/richcall.cpp | 554 + plugins/SmileyAdd/src/services.cpp | 590 + plugins/SmileyAdd/src/services.h | 48 + plugins/SmileyAdd/src/smileyroutines.cpp | 610 + plugins/SmileyAdd/src/smileyroutines.h | 49 + plugins/SmileyAdd/src/smileys.cpp | 1146 ++ plugins/SmileyAdd/src/smileys.h | 287 + plugins/SmileyAdd/src/smltool.cpp | 785 + plugins/SmileyAdd/src/smltool.h | 45 + plugins/SmileyAdd/src/version.h | 3 + plugins/SmileyAdd/version.h | 3 - .../SpellChecker/Docs/spellchecker-translation.txt | 71 + plugins/SpellChecker/Flags-Angelika/Unknown.ico | Bin 2038 -> 0 bytes plugins/SpellChecker/Flags-Angelika/af_ZA.ico | Bin 2038 -> 0 bytes plugins/SpellChecker/Flags-Angelika/ar_AR.ico | Bin 2038 -> 0 bytes plugins/SpellChecker/Flags-Angelika/az_AZ.ico | Bin 2038 -> 0 bytes plugins/SpellChecker/Flags-Angelika/bg_BG.ico | Bin 2038 -> 0 bytes plugins/SpellChecker/Flags-Angelika/bn_IN.ico | Bin 2038 -> 0 bytes plugins/SpellChecker/Flags-Angelika/ca_ES.ico | Bin 2038 -> 0 bytes plugins/SpellChecker/Flags-Angelika/cs_CZ.ico | Bin 2038 -> 0 bytes plugins/SpellChecker/Flags-Angelika/csb_PO.ico | Bin 2038 -> 0 bytes plugins/SpellChecker/Flags-Angelika/cy_GB.ico | Bin 2038 -> 0 bytes plugins/SpellChecker/Flags-Angelika/da_DK.ico | Bin 2038 -> 0 bytes plugins/SpellChecker/Flags-Angelika/de_AT.ico | Bin 2038 -> 0 bytes plugins/SpellChecker/Flags-Angelika/de_CH.ico | Bin 2038 -> 0 bytes plugins/SpellChecker/Flags-Angelika/de_DE.ico | Bin 2038 -> 0 bytes plugins/SpellChecker/Flags-Angelika/el_GR.ico | Bin 2038 -> 0 bytes plugins/SpellChecker/Flags-Angelika/em_ET.ico | Bin 2038 -> 0 bytes plugins/SpellChecker/Flags-Angelika/en_AU.ico | Bin 2038 -> 0 bytes plugins/SpellChecker/Flags-Angelika/en_CA.ico | Bin 2038 -> 0 bytes plugins/SpellChecker/Flags-Angelika/en_GB.ico | Bin 2038 -> 0 bytes plugins/SpellChecker/Flags-Angelika/en_NZ.ico | Bin 2038 -> 0 bytes plugins/SpellChecker/Flags-Angelika/en_US.ico | Bin 2038 -> 0 bytes plugins/SpellChecker/Flags-Angelika/en_ZA.ico | Bin 2038 -> 0 bytes plugins/SpellChecker/Flags-Angelika/es_ES.ico | Bin 2038 -> 0 bytes plugins/SpellChecker/Flags-Angelika/es_MX.ico | Bin 2038 -> 0 bytes plugins/SpellChecker/Flags-Angelika/et_EE.ico | Bin 2038 -> 0 bytes plugins/SpellChecker/Flags-Angelika/fa_IR.ico | Bin 2038 -> 0 bytes plugins/SpellChecker/Flags-Angelika/fi_FI.ico | Bin 2038 -> 0 bytes plugins/SpellChecker/Flags-Angelika/fj_FJ.ico | Bin 2038 -> 0 bytes plugins/SpellChecker/Flags-Angelika/fo_FO.ico | Bin 2038 -> 0 bytes plugins/SpellChecker/Flags-Angelika/fr_BE.ico | Bin 2038 -> 0 bytes plugins/SpellChecker/Flags-Angelika/fr_FR.ico | Bin 2038 -> 0 bytes plugins/SpellChecker/Flags-Angelika/ga_IE.ico | Bin 2038 -> 0 bytes plugins/SpellChecker/Flags-Angelika/gd_GB.ico | Bin 2038 -> 0 bytes plugins/SpellChecker/Flags-Angelika/gl_ES.ico | Bin 2038 -> 0 bytes plugins/SpellChecker/Flags-Angelika/he_IL.ico | Bin 2038 -> 0 bytes plugins/SpellChecker/Flags-Angelika/hi_IN.ico | Bin 2038 -> 0 bytes plugins/SpellChecker/Flags-Angelika/hr_Hr.ico | Bin 2038 -> 0 bytes plugins/SpellChecker/Flags-Angelika/hu_HU.ico | Bin 2038 -> 0 bytes plugins/SpellChecker/Flags-Angelika/id_ID.ico | Bin 2038 -> 0 bytes plugins/SpellChecker/Flags-Angelika/is_IS.ico | Bin 2038 -> 0 bytes plugins/SpellChecker/Flags-Angelika/it_IT.ico | Bin 2038 -> 0 bytes plugins/SpellChecker/Flags-Angelika/km_KH.ico | Bin 2038 -> 0 bytes plugins/SpellChecker/Flags-Angelika/ku_TR.ico | Bin 2038 -> 0 bytes plugins/SpellChecker/Flags-Angelika/lt_LT.ico | Bin 2038 -> 0 bytes plugins/SpellChecker/Flags-Angelika/lu_LU.ico | Bin 2038 -> 0 bytes plugins/SpellChecker/Flags-Angelika/lv_LV.ico | Bin 2038 -> 0 bytes plugins/SpellChecker/Flags-Angelika/mg_MG.ico | Bin 2038 -> 0 bytes plugins/SpellChecker/Flags-Angelika/mi_NZ.ico | Bin 2038 -> 0 bytes plugins/SpellChecker/Flags-Angelika/mn_MN.ico | Bin 2038 -> 0 bytes plugins/SpellChecker/Flags-Angelika/mo_BF.ico | Bin 2038 -> 0 bytes plugins/SpellChecker/Flags-Angelika/mr_IN.ico | Bin 2038 -> 0 bytes plugins/SpellChecker/Flags-Angelika/ms_MY.ico | Bin 2038 -> 0 bytes plugins/SpellChecker/Flags-Angelika/nb_NO.ico | Bin 2038 -> 0 bytes plugins/SpellChecker/Flags-Angelika/ne_NP.ico | Bin 2038 -> 0 bytes plugins/SpellChecker/Flags-Angelika/nl_NL.ico | Bin 2038 -> 0 bytes plugins/SpellChecker/Flags-Angelika/nn_NO.ico | Bin 2038 -> 0 bytes plugins/SpellChecker/Flags-Angelika/nr_ZA.ico | Bin 2038 -> 0 bytes plugins/SpellChecker/Flags-Angelika/ns_ZA.ico | Bin 2038 -> 0 bytes plugins/SpellChecker/Flags-Angelika/or_IN.ico | Bin 2038 -> 0 bytes plugins/SpellChecker/Flags-Angelika/pl_PL.ico | Bin 2038 -> 0 bytes plugins/SpellChecker/Flags-Angelika/pt_BR.ico | Bin 2038 -> 0 bytes plugins/SpellChecker/Flags-Angelika/pt_PT.ico | Bin 2038 -> 0 bytes plugins/SpellChecker/Flags-Angelika/qu_BO.ico | Bin 2038 -> 0 bytes plugins/SpellChecker/Flags-Angelika/ro_RO.ico | Bin 2038 -> 0 bytes plugins/SpellChecker/Flags-Angelika/ru_RU.ico | Bin 2038 -> 0 bytes plugins/SpellChecker/Flags-Angelika/rw_RW.ico | Bin 2038 -> 0 bytes plugins/SpellChecker/Flags-Angelika/sk_SK.ico | Bin 2038 -> 0 bytes plugins/SpellChecker/Flags-Angelika/sl_SI.ico | Bin 2038 -> 0 bytes plugins/SpellChecker/Flags-Angelika/ss_ZA.ico | Bin 2038 -> 0 bytes plugins/SpellChecker/Flags-Angelika/st_ZA.ico | Bin 2038 -> 0 bytes plugins/SpellChecker/Flags-Angelika/sv_SE.ico | Bin 2038 -> 0 bytes plugins/SpellChecker/Flags-Angelika/ta_IN.ico | Bin 2038 -> 0 bytes plugins/SpellChecker/Flags-Angelika/tet_ID.ico | Bin 2038 -> 0 bytes plugins/SpellChecker/Flags-Angelika/tl_PH.ico | Bin 2038 -> 0 bytes plugins/SpellChecker/Flags-Angelika/tn_ZA.ico | Bin 2038 -> 0 bytes plugins/SpellChecker/Flags-Angelika/ts_ZA.ico | Bin 2038 -> 0 bytes plugins/SpellChecker/Flags-Angelika/uk_UA.ico | Bin 2038 -> 0 bytes plugins/SpellChecker/Flags-Angelika/uz_UZ.ico | Bin 2038 -> 0 bytes plugins/SpellChecker/Flags-Angelika/ve_ZA.ico | Bin 2038 -> 0 bytes plugins/SpellChecker/Flags-Angelika/vi_VI.ico | Bin 2038 -> 0 bytes plugins/SpellChecker/Flags-Angelika/xh_ZA.ico | Bin 2038 -> 0 bytes plugins/SpellChecker/Flags-Angelika/zu_ZA.ico | Bin 2038 -> 0 bytes plugins/SpellChecker/Flags/ad.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/ae.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/af_ZA.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/ag.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/ai.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/al.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/am.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/an.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/ao.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/ar.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/as.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/aw.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/ax.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/az_AZ.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/ba.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/bb.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/bg_BG.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/bh.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/bi.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/bj.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/bm.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/bn.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/bn_IN.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/bs.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/bt.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/bv.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/by.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/bz.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/cc.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/cd.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/cf.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/cg.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/ci.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/ck.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/cl.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/cm.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/cn.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/co.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/cr.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/cs_CZ.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/cu.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/cv.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/cx.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/cy.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/cy_GB.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/da_DK.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/de_AT.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/de_CH.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/de_DE.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/dj.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/dm.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/do.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/dz.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/ec.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/eg.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/eh.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/el_GR.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/em_ET.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/en_AU.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/en_CA.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/en_GB.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/en_NZ.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/en_US.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/en_ZA.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/england.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/er.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/es_ES.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/es_MX.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/et_EE.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/fa_IR.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/fi_FI.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/fj_FJ.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/fk.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/fm.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/fo_FO.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/fr_BE.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/fr_FR.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/ga.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/ga_IE.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/gd.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/gd_GB.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/ge.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/gi.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/gl.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/gm.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/gn.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/gp.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/gq.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/gs.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/gt.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/gu.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/gw.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/gy.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/he_IL.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/hi_IN.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/hk.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/hn.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/hr_HR.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/ht.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/hu_HU.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/id_ID.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/io.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/iq.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/is_IS.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/it_IT.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/jm.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/jo.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/jp.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/ke.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/kg.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/ki.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/km.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/km_KH.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/kn.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/kp.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/kr.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/ku_TR.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/kw.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/ky.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/kz.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/la.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/lb.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/lc.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/li.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/lk.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/lr.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/ls.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/lt_LT.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/lu_LU.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/lv_LV.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/ly.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/ma.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/mc.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/md.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/mg_MG.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/mh.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/mi_NZ.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/mk.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/ml.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/mm.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/mn_MN.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/mo.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/mo_BF.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/mp.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/mq.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/mr.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/mr_IN.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/ms.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/ms_MY.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/mt.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/mu.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/mv.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/mz.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/na.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/nb_NO.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/nc.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/ne.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/ne_NP.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/nf.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/ng.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/ni.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/nl_NL.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/nn_NO.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/nr.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/nr_ZA.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/ns_ZA.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/nu.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/ny_MW.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/om.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/or_IN.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/pa.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/pe.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/pf.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/pg.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/pk.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/pl_PL.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/pm.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/pn.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/pr.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/ps.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/pt_BR.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/pt_PT.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/pw.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/py.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/qa.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/qu_BO.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/readme.txt | 8 - plugins/SpellChecker/Flags/ro_BO.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/ro_RO.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/ru_RU.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/rw_RW.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/sa.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/sb.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/sc.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/sd.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/sg.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/sh.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/sk_SK.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/sl.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/sl_SI.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/sm.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/sn.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/so.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/sr.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/sr_CS.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/ss_ZA.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/st.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/st_ZA.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/sv.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/sv_SE.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/sy.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/tc.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/td.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/tet_ID.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/tf.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/tg.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/th.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/tj.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/tk.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/tl.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/tl_PH.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/tm.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/tn.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/tn_ZA.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/to.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/ts_ZA.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/tt.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/tv.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/tw.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/tz.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/ug.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/uk_UA.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/um.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/uy.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/uz_UZ.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/va.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/vc.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/ve.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/ve_ZA.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/vg.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/vi.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/vi_VI.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/vu.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/wf.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/ws.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/xh_ZA.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/ye.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/yt.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/zm.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/zu_ZA.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/Flags/zw.ico | Bin 1150 -> 0 bytes plugins/SpellChecker/RichEdit.cpp | 332 - plugins/SpellChecker/RichEdit.h | 71 - plugins/SpellChecker/Version.h | 20 - plugins/SpellChecker/Version.rc | 42 - plugins/SpellChecker/ardialog.cpp | 316 - plugins/SpellChecker/ardialog.h | 33 - plugins/SpellChecker/autoreplace.cpp | 229 - plugins/SpellChecker/autoreplace.h | 70 - plugins/SpellChecker/codepages.cpp | 307 - plugins/SpellChecker/commons.h | 154 - plugins/SpellChecker/dictionary.cpp | 721 - plugins/SpellChecker/dictionary.h | 86 - plugins/SpellChecker/flags-angelika.rc | 118 - plugins/SpellChecker/flags-angelika.vcxproj | 2 +- plugins/SpellChecker/flags.rc | 119 - plugins/SpellChecker/hunspell/README | 21 - plugins/SpellChecker/hunspell/affentry.cxx | 962 - plugins/SpellChecker/hunspell/affentry.hxx | 136 - plugins/SpellChecker/hunspell/affixmgr.cxx | 4521 ----- plugins/SpellChecker/hunspell/affixmgr.hxx | 250 - plugins/SpellChecker/hunspell/atypes.hxx | 107 - plugins/SpellChecker/hunspell/baseaffix.hxx | 28 - plugins/SpellChecker/hunspell/config.h | 217 - plugins/SpellChecker/hunspell/csutil.cxx | 5834 ------ plugins/SpellChecker/hunspell/csutil.hxx | 220 - plugins/SpellChecker/hunspell/dictmgr.cxx | 180 - plugins/SpellChecker/hunspell/dictmgr.hxx | 36 - plugins/SpellChecker/hunspell/filemgr.cxx | 49 - plugins/SpellChecker/hunspell/filemgr.hxx | 25 - plugins/SpellChecker/hunspell/hashmgr.cxx | 928 - plugins/SpellChecker/hunspell/hashmgr.hxx | 69 - plugins/SpellChecker/hunspell/htypes.hxx | 32 - plugins/SpellChecker/hunspell/hunspell.cxx | 2011 -- plugins/SpellChecker/hunspell/hunspell.dsp | 164 - plugins/SpellChecker/hunspell/hunspell.h | 95 - plugins/SpellChecker/hunspell/hunspell.hxx | 174 - plugins/SpellChecker/hunspell/hunvisapi.h | 18 - plugins/SpellChecker/hunspell/hunzip.cxx | 193 - plugins/SpellChecker/hunspell/hunzip.hxx | 45 - plugins/SpellChecker/hunspell/langnum.hxx | 38 - plugins/SpellChecker/hunspell/license.hunspell | 59 - plugins/SpellChecker/hunspell/license.myspell | 61 - plugins/SpellChecker/hunspell/phonet.cxx | 292 - plugins/SpellChecker/hunspell/phonet.hxx | 52 - plugins/SpellChecker/hunspell/replist.cxx | 87 - plugins/SpellChecker/hunspell/replist.hxx | 27 - plugins/SpellChecker/hunspell/suggestmgr.cxx | 2001 -- plugins/SpellChecker/hunspell/suggestmgr.hxx | 111 - plugins/SpellChecker/hunspell/utf_info.cxx | 19676 ------------------- plugins/SpellChecker/hunspell/w_char.hxx | 21 - plugins/SpellChecker/options.cpp | 605 - plugins/SpellChecker/options.h | 68 - .../SpellChecker/res/Flags-Angelika/Unknown.ico | Bin 0 -> 2038 bytes plugins/SpellChecker/res/Flags-Angelika/af_ZA.ico | Bin 0 -> 2038 bytes plugins/SpellChecker/res/Flags-Angelika/ar_AR.ico | Bin 0 -> 2038 bytes plugins/SpellChecker/res/Flags-Angelika/az_AZ.ico | Bin 0 -> 2038 bytes plugins/SpellChecker/res/Flags-Angelika/bg_BG.ico | Bin 0 -> 2038 bytes plugins/SpellChecker/res/Flags-Angelika/bn_IN.ico | Bin 0 -> 2038 bytes plugins/SpellChecker/res/Flags-Angelika/ca_ES.ico | Bin 0 -> 2038 bytes plugins/SpellChecker/res/Flags-Angelika/cs_CZ.ico | Bin 0 -> 2038 bytes plugins/SpellChecker/res/Flags-Angelika/csb_PO.ico | Bin 0 -> 2038 bytes plugins/SpellChecker/res/Flags-Angelika/cy_GB.ico | Bin 0 -> 2038 bytes plugins/SpellChecker/res/Flags-Angelika/da_DK.ico | Bin 0 -> 2038 bytes plugins/SpellChecker/res/Flags-Angelika/de_AT.ico | Bin 0 -> 2038 bytes plugins/SpellChecker/res/Flags-Angelika/de_CH.ico | Bin 0 -> 2038 bytes plugins/SpellChecker/res/Flags-Angelika/de_DE.ico | Bin 0 -> 2038 bytes plugins/SpellChecker/res/Flags-Angelika/el_GR.ico | Bin 0 -> 2038 bytes plugins/SpellChecker/res/Flags-Angelika/em_ET.ico | Bin 0 -> 2038 bytes plugins/SpellChecker/res/Flags-Angelika/en_AU.ico | Bin 0 -> 2038 bytes plugins/SpellChecker/res/Flags-Angelika/en_CA.ico | Bin 0 -> 2038 bytes plugins/SpellChecker/res/Flags-Angelika/en_GB.ico | Bin 0 -> 2038 bytes plugins/SpellChecker/res/Flags-Angelika/en_NZ.ico | Bin 0 -> 2038 bytes plugins/SpellChecker/res/Flags-Angelika/en_US.ico | Bin 0 -> 2038 bytes plugins/SpellChecker/res/Flags-Angelika/en_ZA.ico | Bin 0 -> 2038 bytes plugins/SpellChecker/res/Flags-Angelika/es_ES.ico | Bin 0 -> 2038 bytes plugins/SpellChecker/res/Flags-Angelika/es_MX.ico | Bin 0 -> 2038 bytes plugins/SpellChecker/res/Flags-Angelika/et_EE.ico | Bin 0 -> 2038 bytes plugins/SpellChecker/res/Flags-Angelika/fa_IR.ico | Bin 0 -> 2038 bytes plugins/SpellChecker/res/Flags-Angelika/fi_FI.ico | Bin 0 -> 2038 bytes plugins/SpellChecker/res/Flags-Angelika/fj_FJ.ico | Bin 0 -> 2038 bytes plugins/SpellChecker/res/Flags-Angelika/fo_FO.ico | Bin 0 -> 2038 bytes plugins/SpellChecker/res/Flags-Angelika/fr_BE.ico | Bin 0 -> 2038 bytes plugins/SpellChecker/res/Flags-Angelika/fr_FR.ico | Bin 0 -> 2038 bytes plugins/SpellChecker/res/Flags-Angelika/ga_IE.ico | Bin 0 -> 2038 bytes plugins/SpellChecker/res/Flags-Angelika/gd_GB.ico | Bin 0 -> 2038 bytes plugins/SpellChecker/res/Flags-Angelika/gl_ES.ico | Bin 0 -> 2038 bytes plugins/SpellChecker/res/Flags-Angelika/he_IL.ico | Bin 0 -> 2038 bytes plugins/SpellChecker/res/Flags-Angelika/hi_IN.ico | Bin 0 -> 2038 bytes plugins/SpellChecker/res/Flags-Angelika/hr_Hr.ico | Bin 0 -> 2038 bytes plugins/SpellChecker/res/Flags-Angelika/hu_HU.ico | Bin 0 -> 2038 bytes plugins/SpellChecker/res/Flags-Angelika/id_ID.ico | Bin 0 -> 2038 bytes plugins/SpellChecker/res/Flags-Angelika/is_IS.ico | Bin 0 -> 2038 bytes plugins/SpellChecker/res/Flags-Angelika/it_IT.ico | Bin 0 -> 2038 bytes plugins/SpellChecker/res/Flags-Angelika/km_KH.ico | Bin 0 -> 2038 bytes plugins/SpellChecker/res/Flags-Angelika/ku_TR.ico | Bin 0 -> 2038 bytes plugins/SpellChecker/res/Flags-Angelika/lt_LT.ico | Bin 0 -> 2038 bytes plugins/SpellChecker/res/Flags-Angelika/lu_LU.ico | Bin 0 -> 2038 bytes plugins/SpellChecker/res/Flags-Angelika/lv_LV.ico | Bin 0 -> 2038 bytes plugins/SpellChecker/res/Flags-Angelika/mg_MG.ico | Bin 0 -> 2038 bytes plugins/SpellChecker/res/Flags-Angelika/mi_NZ.ico | Bin 0 -> 2038 bytes plugins/SpellChecker/res/Flags-Angelika/mn_MN.ico | Bin 0 -> 2038 bytes plugins/SpellChecker/res/Flags-Angelika/mo_BF.ico | Bin 0 -> 2038 bytes plugins/SpellChecker/res/Flags-Angelika/mr_IN.ico | Bin 0 -> 2038 bytes plugins/SpellChecker/res/Flags-Angelika/ms_MY.ico | Bin 0 -> 2038 bytes plugins/SpellChecker/res/Flags-Angelika/nb_NO.ico | Bin 0 -> 2038 bytes plugins/SpellChecker/res/Flags-Angelika/ne_NP.ico | Bin 0 -> 2038 bytes plugins/SpellChecker/res/Flags-Angelika/nl_NL.ico | Bin 0 -> 2038 bytes plugins/SpellChecker/res/Flags-Angelika/nn_NO.ico | Bin 0 -> 2038 bytes plugins/SpellChecker/res/Flags-Angelika/nr_ZA.ico | Bin 0 -> 2038 bytes plugins/SpellChecker/res/Flags-Angelika/ns_ZA.ico | Bin 0 -> 2038 bytes plugins/SpellChecker/res/Flags-Angelika/or_IN.ico | Bin 0 -> 2038 bytes plugins/SpellChecker/res/Flags-Angelika/pl_PL.ico | Bin 0 -> 2038 bytes plugins/SpellChecker/res/Flags-Angelika/pt_BR.ico | Bin 0 -> 2038 bytes plugins/SpellChecker/res/Flags-Angelika/pt_PT.ico | Bin 0 -> 2038 bytes plugins/SpellChecker/res/Flags-Angelika/qu_BO.ico | Bin 0 -> 2038 bytes plugins/SpellChecker/res/Flags-Angelika/ro_RO.ico | Bin 0 -> 2038 bytes plugins/SpellChecker/res/Flags-Angelika/ru_RU.ico | Bin 0 -> 2038 bytes plugins/SpellChecker/res/Flags-Angelika/rw_RW.ico | Bin 0 -> 2038 bytes plugins/SpellChecker/res/Flags-Angelika/sk_SK.ico | Bin 0 -> 2038 bytes plugins/SpellChecker/res/Flags-Angelika/sl_SI.ico | Bin 0 -> 2038 bytes plugins/SpellChecker/res/Flags-Angelika/ss_ZA.ico | Bin 0 -> 2038 bytes plugins/SpellChecker/res/Flags-Angelika/st_ZA.ico | Bin 0 -> 2038 bytes plugins/SpellChecker/res/Flags-Angelika/sv_SE.ico | Bin 0 -> 2038 bytes plugins/SpellChecker/res/Flags-Angelika/ta_IN.ico | Bin 0 -> 2038 bytes plugins/SpellChecker/res/Flags-Angelika/tet_ID.ico | Bin 0 -> 2038 bytes plugins/SpellChecker/res/Flags-Angelika/tl_PH.ico | Bin 0 -> 2038 bytes plugins/SpellChecker/res/Flags-Angelika/tn_ZA.ico | Bin 0 -> 2038 bytes plugins/SpellChecker/res/Flags-Angelika/ts_ZA.ico | Bin 0 -> 2038 bytes plugins/SpellChecker/res/Flags-Angelika/uk_UA.ico | Bin 0 -> 2038 bytes plugins/SpellChecker/res/Flags-Angelika/uz_UZ.ico | Bin 0 -> 2038 bytes plugins/SpellChecker/res/Flags-Angelika/ve_ZA.ico | Bin 0 -> 2038 bytes plugins/SpellChecker/res/Flags-Angelika/vi_VI.ico | Bin 0 -> 2038 bytes plugins/SpellChecker/res/Flags-Angelika/xh_ZA.ico | Bin 0 -> 2038 bytes plugins/SpellChecker/res/Flags-Angelika/zu_ZA.ico | Bin 0 -> 2038 bytes plugins/SpellChecker/res/Flags/ad.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/ae.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/af_ZA.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/ag.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/ai.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/al.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/am.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/an.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/ao.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/ar.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/as.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/aw.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/ax.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/az_AZ.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/ba.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/bb.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/bg_BG.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/bh.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/bi.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/bj.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/bm.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/bn.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/bn_IN.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/bs.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/bt.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/bv.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/by.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/bz.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/cc.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/cd.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/cf.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/cg.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/ci.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/ck.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/cl.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/cm.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/cn.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/co.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/cr.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/cs_CZ.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/cu.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/cv.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/cx.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/cy.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/cy_GB.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/da_DK.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/de_AT.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/de_CH.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/de_DE.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/dj.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/dm.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/do.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/dz.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/ec.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/eg.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/eh.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/el_GR.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/em_ET.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/en_AU.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/en_CA.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/en_GB.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/en_NZ.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/en_US.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/en_ZA.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/england.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/er.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/es_ES.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/es_MX.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/et_EE.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/fa_IR.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/fi_FI.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/fj_FJ.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/fk.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/fm.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/fo_FO.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/fr_BE.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/fr_FR.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/ga.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/ga_IE.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/gd.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/gd_GB.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/ge.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/gi.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/gl.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/gm.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/gn.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/gp.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/gq.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/gs.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/gt.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/gu.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/gw.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/gy.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/he_IL.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/hi_IN.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/hk.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/hn.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/hr_HR.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/ht.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/hu_HU.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/id_ID.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/io.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/iq.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/is_IS.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/it_IT.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/jm.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/jo.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/jp.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/ke.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/kg.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/ki.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/km.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/km_KH.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/kn.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/kp.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/kr.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/ku_TR.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/kw.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/ky.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/kz.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/la.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/lb.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/lc.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/li.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/lk.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/lr.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/ls.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/lt_LT.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/lu_LU.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/lv_LV.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/ly.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/ma.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/mc.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/md.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/mg_MG.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/mh.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/mi_NZ.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/mk.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/ml.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/mm.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/mn_MN.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/mo.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/mo_BF.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/mp.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/mq.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/mr.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/mr_IN.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/ms.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/ms_MY.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/mt.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/mu.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/mv.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/mz.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/na.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/nb_NO.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/nc.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/ne.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/ne_NP.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/nf.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/ng.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/ni.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/nl_NL.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/nn_NO.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/nr.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/nr_ZA.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/ns_ZA.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/nu.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/ny_MW.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/om.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/or_IN.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/pa.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/pe.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/pf.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/pg.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/pk.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/pl_PL.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/pm.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/pn.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/pr.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/ps.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/pt_BR.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/pt_PT.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/pw.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/py.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/qa.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/qu_BO.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/readme.txt | 8 + plugins/SpellChecker/res/Flags/ro_BO.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/ro_RO.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/ru_RU.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/rw_RW.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/sa.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/sb.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/sc.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/sd.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/sg.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/sh.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/sk_SK.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/sl.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/sl_SI.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/sm.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/sn.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/so.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/sr.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/sr_CS.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/ss_ZA.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/st.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/st_ZA.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/sv.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/sv_SE.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/sy.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/tc.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/td.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/tet_ID.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/tf.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/tg.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/th.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/tj.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/tk.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/tl.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/tl_PH.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/tm.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/tn.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/tn_ZA.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/to.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/ts_ZA.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/tt.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/tv.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/tw.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/tz.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/ug.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/uk_UA.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/um.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/uy.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/uz_UZ.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/va.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/vc.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/ve.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/ve_ZA.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/vg.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/vi.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/vi_VI.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/vu.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/wf.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/ws.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/xh_ZA.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/ye.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/yt.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/zm.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/zu_ZA.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Flags/zw.ico | Bin 0 -> 1150 bytes plugins/SpellChecker/res/Version.rc | 42 + plugins/SpellChecker/res/flags-angelika.rc | 118 + plugins/SpellChecker/res/flags.rc | 119 + plugins/SpellChecker/res/resource.rc | 198 + plugins/SpellChecker/resource.h | 93 - plugins/SpellChecker/resource.rc | 200 - plugins/SpellChecker/spellchecker-translation.txt | 71 - plugins/SpellChecker/spellchecker.cpp | 2252 --- plugins/SpellChecker/spellchecker.vcxproj | 105 +- plugins/SpellChecker/spellchecker.vcxproj.filters | 114 +- plugins/SpellChecker/spellchecker_flags.vcxproj | 2 +- plugins/SpellChecker/src/RichEdit.cpp | 332 + plugins/SpellChecker/src/RichEdit.h | 71 + plugins/SpellChecker/src/Version.h | 20 + plugins/SpellChecker/src/ardialog.cpp | 316 + plugins/SpellChecker/src/ardialog.h | 33 + plugins/SpellChecker/src/autoreplace.cpp | 229 + plugins/SpellChecker/src/autoreplace.h | 70 + plugins/SpellChecker/src/codepages.cpp | 307 + plugins/SpellChecker/src/commons.h | 153 + plugins/SpellChecker/src/dictionary.cpp | 721 + plugins/SpellChecker/src/dictionary.h | 86 + plugins/SpellChecker/src/hunspell/README | 21 + plugins/SpellChecker/src/hunspell/affentry.cxx | 962 + plugins/SpellChecker/src/hunspell/affentry.hxx | 136 + plugins/SpellChecker/src/hunspell/affixmgr.cxx | 4521 +++++ plugins/SpellChecker/src/hunspell/affixmgr.hxx | 250 + plugins/SpellChecker/src/hunspell/atypes.hxx | 107 + plugins/SpellChecker/src/hunspell/baseaffix.hxx | 28 + plugins/SpellChecker/src/hunspell/config.h | 216 + plugins/SpellChecker/src/hunspell/csutil.cxx | 5834 ++++++ plugins/SpellChecker/src/hunspell/csutil.hxx | 220 + plugins/SpellChecker/src/hunspell/dictmgr.cxx | 180 + plugins/SpellChecker/src/hunspell/dictmgr.hxx | 36 + plugins/SpellChecker/src/hunspell/filemgr.cxx | 49 + plugins/SpellChecker/src/hunspell/filemgr.hxx | 25 + plugins/SpellChecker/src/hunspell/hashmgr.cxx | 928 + plugins/SpellChecker/src/hunspell/hashmgr.hxx | 69 + plugins/SpellChecker/src/hunspell/htypes.hxx | 32 + plugins/SpellChecker/src/hunspell/hunspell.cxx | 2011 ++ plugins/SpellChecker/src/hunspell/hunspell.dsp | 164 + plugins/SpellChecker/src/hunspell/hunspell.h | 95 + plugins/SpellChecker/src/hunspell/hunspell.hxx | 174 + plugins/SpellChecker/src/hunspell/hunvisapi.h | 18 + plugins/SpellChecker/src/hunspell/hunzip.cxx | 193 + plugins/SpellChecker/src/hunspell/hunzip.hxx | 45 + plugins/SpellChecker/src/hunspell/langnum.hxx | 38 + plugins/SpellChecker/src/hunspell/license.hunspell | 59 + plugins/SpellChecker/src/hunspell/license.myspell | 61 + plugins/SpellChecker/src/hunspell/phonet.cxx | 292 + plugins/SpellChecker/src/hunspell/phonet.hxx | 52 + plugins/SpellChecker/src/hunspell/replist.cxx | 87 + plugins/SpellChecker/src/hunspell/replist.hxx | 27 + plugins/SpellChecker/src/hunspell/suggestmgr.cxx | 2001 ++ plugins/SpellChecker/src/hunspell/suggestmgr.hxx | 111 + plugins/SpellChecker/src/hunspell/utf_info.cxx | 19676 +++++++++++++++++++ plugins/SpellChecker/src/hunspell/w_char.hxx | 21 + plugins/SpellChecker/src/options.cpp | 605 + plugins/SpellChecker/src/options.h | 68 + plugins/SpellChecker/src/resource.h | 93 + plugins/SpellChecker/src/spellchecker.cpp | 2252 +++ plugins/Utils/mir_icons.h | 2 - plugins/Utils/mir_options.cpp | 2 - 901 files changed, 69835 insertions(+), 69954 deletions(-) create mode 100644 plugins/SimpleAR/Res/Resource.rc create mode 100644 plugins/SimpleAR/Res/Version.rc delete mode 100644 plugins/SimpleAR/Resource.h delete mode 100644 plugins/SimpleAR/Resource.rc create mode 100644 plugins/SimpleAR/Src/Resource.h create mode 100644 plugins/SimpleAR/Src/Version.h delete mode 100644 plugins/SimpleAR/Version.h delete mode 100644 plugins/SimpleAR/Version.rc create mode 100644 plugins/SimpleAR/docs/simplear-translation.txt delete mode 100644 plugins/SimpleAR/simplear-translation.txt delete mode 100644 plugins/SimpleStatusMsg/awaymsg.cpp delete mode 100644 plugins/SimpleStatusMsg/commonheaders.h create mode 100644 plugins/SimpleStatusMsg/docs/simplestatusmsg-translation.txt delete mode 100644 plugins/SimpleStatusMsg/main.cpp delete mode 100644 plugins/SimpleStatusMsg/msgbox.cpp delete mode 100644 plugins/SimpleStatusMsg/options.cpp create mode 100644 plugins/SimpleStatusMsg/res/resource.rc delete mode 100644 plugins/SimpleStatusMsg/resource.h delete mode 100644 plugins/SimpleStatusMsg/resource.rc delete mode 100644 plugins/SimpleStatusMsg/simplestatusmsg-translation.txt delete mode 100644 plugins/SimpleStatusMsg/simplestatusmsg.h create mode 100644 plugins/SimpleStatusMsg/src/awaymsg.cpp create mode 100644 plugins/SimpleStatusMsg/src/commonheaders.h create mode 100644 plugins/SimpleStatusMsg/src/main.cpp create mode 100644 plugins/SimpleStatusMsg/src/msgbox.cpp create mode 100644 plugins/SimpleStatusMsg/src/options.cpp create mode 100644 plugins/SimpleStatusMsg/src/resource.h create mode 100644 plugins/SimpleStatusMsg/src/simplestatusmsg.h create mode 100644 plugins/SimpleStatusMsg/src/utils.cpp delete mode 100644 plugins/SimpleStatusMsg/utils.cpp delete mode 100644 plugins/SmileyAdd/AniSmileyObject.cpp create mode 100644 plugins/SmileyAdd/Res/resource.rc delete mode 100644 plugins/SmileyAdd/SmileyBase.cpp delete mode 100644 plugins/SmileyAdd/SmileyBase.h delete mode 100644 plugins/SmileyAdd/anim.cpp delete mode 100644 plugins/SmileyAdd/anim.h delete mode 100644 plugins/SmileyAdd/bkstring.cpp delete mode 100644 plugins/SmileyAdd/bkstring.h delete mode 100644 plugins/SmileyAdd/customsmiley.cpp delete mode 100644 plugins/SmileyAdd/customsmiley.h delete mode 100644 plugins/SmileyAdd/dlgboxsubclass.cpp create mode 100644 plugins/SmileyAdd/docs/smileyadd-translation.txt delete mode 100644 plugins/SmileyAdd/download.cpp delete mode 100644 plugins/SmileyAdd/download.h delete mode 100644 plugins/SmileyAdd/general.cpp delete mode 100644 plugins/SmileyAdd/general.h delete mode 100644 plugins/SmileyAdd/imagecache.cpp delete mode 100644 plugins/SmileyAdd/imagecache.h delete mode 100644 plugins/SmileyAdd/main.cpp delete mode 100644 plugins/SmileyAdd/options.cpp delete mode 100644 plugins/SmileyAdd/options.h delete mode 100644 plugins/SmileyAdd/regexp/Matcher.cpp delete mode 100644 plugins/SmileyAdd/regexp/Matcher.h delete mode 100644 plugins/SmileyAdd/regexp/Pattern.cpp delete mode 100644 plugins/SmileyAdd/regexp/Pattern.h delete mode 100644 plugins/SmileyAdd/regexp/WCMatcher.cpp delete mode 100644 plugins/SmileyAdd/regexp/WCMatcher.h delete mode 100644 plugins/SmileyAdd/regexp/WCPattern.cpp delete mode 100644 plugins/SmileyAdd/regexp/WCPattern.h delete mode 100644 plugins/SmileyAdd/regexp/test.cpp delete mode 100644 plugins/SmileyAdd/resource.h delete mode 100644 plugins/SmileyAdd/resource.rc delete mode 100644 plugins/SmileyAdd/richcall.cpp delete mode 100644 plugins/SmileyAdd/services.cpp delete mode 100644 plugins/SmileyAdd/services.h delete mode 100644 plugins/SmileyAdd/smileyadd-translation.txt delete mode 100644 plugins/SmileyAdd/smileyroutines.cpp delete mode 100644 plugins/SmileyAdd/smileyroutines.h delete mode 100644 plugins/SmileyAdd/smileys.cpp delete mode 100644 plugins/SmileyAdd/smileys.h delete mode 100644 plugins/SmileyAdd/smltool.cpp delete mode 100644 plugins/SmileyAdd/smltool.h create mode 100644 plugins/SmileyAdd/src/AniSmileyObject.cpp create mode 100644 plugins/SmileyAdd/src/SmileyBase.cpp create mode 100644 plugins/SmileyAdd/src/SmileyBase.h create mode 100644 plugins/SmileyAdd/src/anim.cpp create mode 100644 plugins/SmileyAdd/src/anim.h create mode 100644 plugins/SmileyAdd/src/bkstring.cpp create mode 100644 plugins/SmileyAdd/src/bkstring.h create mode 100644 plugins/SmileyAdd/src/customsmiley.cpp create mode 100644 plugins/SmileyAdd/src/customsmiley.h create mode 100644 plugins/SmileyAdd/src/dlgboxsubclass.cpp create mode 100644 plugins/SmileyAdd/src/download.cpp create mode 100644 plugins/SmileyAdd/src/download.h create mode 100644 plugins/SmileyAdd/src/general.cpp create mode 100644 plugins/SmileyAdd/src/general.h create mode 100644 plugins/SmileyAdd/src/imagecache.cpp create mode 100644 plugins/SmileyAdd/src/imagecache.h create mode 100644 plugins/SmileyAdd/src/main.cpp create mode 100644 plugins/SmileyAdd/src/options.cpp create mode 100644 plugins/SmileyAdd/src/options.h create mode 100644 plugins/SmileyAdd/src/regexp/Matcher.cpp create mode 100644 plugins/SmileyAdd/src/regexp/Matcher.h create mode 100644 plugins/SmileyAdd/src/regexp/Pattern.cpp create mode 100644 plugins/SmileyAdd/src/regexp/Pattern.h create mode 100644 plugins/SmileyAdd/src/regexp/WCMatcher.cpp create mode 100644 plugins/SmileyAdd/src/regexp/WCMatcher.h create mode 100644 plugins/SmileyAdd/src/regexp/WCPattern.cpp create mode 100644 plugins/SmileyAdd/src/regexp/WCPattern.h create mode 100644 plugins/SmileyAdd/src/regexp/test.cpp create mode 100644 plugins/SmileyAdd/src/resource.h create mode 100644 plugins/SmileyAdd/src/richcall.cpp create mode 100644 plugins/SmileyAdd/src/services.cpp create mode 100644 plugins/SmileyAdd/src/services.h create mode 100644 plugins/SmileyAdd/src/smileyroutines.cpp create mode 100644 plugins/SmileyAdd/src/smileyroutines.h create mode 100644 plugins/SmileyAdd/src/smileys.cpp create mode 100644 plugins/SmileyAdd/src/smileys.h create mode 100644 plugins/SmileyAdd/src/smltool.cpp create mode 100644 plugins/SmileyAdd/src/smltool.h create mode 100644 plugins/SmileyAdd/src/version.h delete mode 100644 plugins/SmileyAdd/version.h create mode 100644 plugins/SpellChecker/Docs/spellchecker-translation.txt delete mode 100644 plugins/SpellChecker/Flags-Angelika/Unknown.ico delete mode 100644 plugins/SpellChecker/Flags-Angelika/af_ZA.ico delete mode 100644 plugins/SpellChecker/Flags-Angelika/ar_AR.ico delete mode 100644 plugins/SpellChecker/Flags-Angelika/az_AZ.ico delete mode 100644 plugins/SpellChecker/Flags-Angelika/bg_BG.ico delete mode 100644 plugins/SpellChecker/Flags-Angelika/bn_IN.ico delete mode 100644 plugins/SpellChecker/Flags-Angelika/ca_ES.ico delete mode 100644 plugins/SpellChecker/Flags-Angelika/cs_CZ.ico delete mode 100644 plugins/SpellChecker/Flags-Angelika/csb_PO.ico delete mode 100644 plugins/SpellChecker/Flags-Angelika/cy_GB.ico delete mode 100644 plugins/SpellChecker/Flags-Angelika/da_DK.ico delete mode 100644 plugins/SpellChecker/Flags-Angelika/de_AT.ico delete mode 100644 plugins/SpellChecker/Flags-Angelika/de_CH.ico delete mode 100644 plugins/SpellChecker/Flags-Angelika/de_DE.ico delete mode 100644 plugins/SpellChecker/Flags-Angelika/el_GR.ico delete mode 100644 plugins/SpellChecker/Flags-Angelika/em_ET.ico delete mode 100644 plugins/SpellChecker/Flags-Angelika/en_AU.ico delete mode 100644 plugins/SpellChecker/Flags-Angelika/en_CA.ico delete mode 100644 plugins/SpellChecker/Flags-Angelika/en_GB.ico delete mode 100644 plugins/SpellChecker/Flags-Angelika/en_NZ.ico delete mode 100644 plugins/SpellChecker/Flags-Angelika/en_US.ico delete mode 100644 plugins/SpellChecker/Flags-Angelika/en_ZA.ico delete mode 100644 plugins/SpellChecker/Flags-Angelika/es_ES.ico delete mode 100644 plugins/SpellChecker/Flags-Angelika/es_MX.ico delete mode 100644 plugins/SpellChecker/Flags-Angelika/et_EE.ico delete mode 100644 plugins/SpellChecker/Flags-Angelika/fa_IR.ico delete mode 100644 plugins/SpellChecker/Flags-Angelika/fi_FI.ico delete mode 100644 plugins/SpellChecker/Flags-Angelika/fj_FJ.ico delete mode 100644 plugins/SpellChecker/Flags-Angelika/fo_FO.ico delete mode 100644 plugins/SpellChecker/Flags-Angelika/fr_BE.ico delete mode 100644 plugins/SpellChecker/Flags-Angelika/fr_FR.ico delete mode 100644 plugins/SpellChecker/Flags-Angelika/ga_IE.ico delete mode 100644 plugins/SpellChecker/Flags-Angelika/gd_GB.ico delete mode 100644 plugins/SpellChecker/Flags-Angelika/gl_ES.ico delete mode 100644 plugins/SpellChecker/Flags-Angelika/he_IL.ico delete mode 100644 plugins/SpellChecker/Flags-Angelika/hi_IN.ico delete mode 100644 plugins/SpellChecker/Flags-Angelika/hr_Hr.ico delete mode 100644 plugins/SpellChecker/Flags-Angelika/hu_HU.ico delete mode 100644 plugins/SpellChecker/Flags-Angelika/id_ID.ico delete mode 100644 plugins/SpellChecker/Flags-Angelika/is_IS.ico delete mode 100644 plugins/SpellChecker/Flags-Angelika/it_IT.ico delete mode 100644 plugins/SpellChecker/Flags-Angelika/km_KH.ico delete mode 100644 plugins/SpellChecker/Flags-Angelika/ku_TR.ico delete mode 100644 plugins/SpellChecker/Flags-Angelika/lt_LT.ico delete mode 100644 plugins/SpellChecker/Flags-Angelika/lu_LU.ico delete mode 100644 plugins/SpellChecker/Flags-Angelika/lv_LV.ico delete mode 100644 plugins/SpellChecker/Flags-Angelika/mg_MG.ico delete mode 100644 plugins/SpellChecker/Flags-Angelika/mi_NZ.ico delete mode 100644 plugins/SpellChecker/Flags-Angelika/mn_MN.ico delete mode 100644 plugins/SpellChecker/Flags-Angelika/mo_BF.ico delete mode 100644 plugins/SpellChecker/Flags-Angelika/mr_IN.ico delete mode 100644 plugins/SpellChecker/Flags-Angelika/ms_MY.ico delete mode 100644 plugins/SpellChecker/Flags-Angelika/nb_NO.ico delete mode 100644 plugins/SpellChecker/Flags-Angelika/ne_NP.ico delete mode 100644 plugins/SpellChecker/Flags-Angelika/nl_NL.ico delete mode 100644 plugins/SpellChecker/Flags-Angelika/nn_NO.ico delete mode 100644 plugins/SpellChecker/Flags-Angelika/nr_ZA.ico delete mode 100644 plugins/SpellChecker/Flags-Angelika/ns_ZA.ico delete mode 100644 plugins/SpellChecker/Flags-Angelika/or_IN.ico delete mode 100644 plugins/SpellChecker/Flags-Angelika/pl_PL.ico delete mode 100644 plugins/SpellChecker/Flags-Angelika/pt_BR.ico delete mode 100644 plugins/SpellChecker/Flags-Angelika/pt_PT.ico delete mode 100644 plugins/SpellChecker/Flags-Angelika/qu_BO.ico delete mode 100644 plugins/SpellChecker/Flags-Angelika/ro_RO.ico delete mode 100644 plugins/SpellChecker/Flags-Angelika/ru_RU.ico delete mode 100644 plugins/SpellChecker/Flags-Angelika/rw_RW.ico delete mode 100644 plugins/SpellChecker/Flags-Angelika/sk_SK.ico delete mode 100644 plugins/SpellChecker/Flags-Angelika/sl_SI.ico delete mode 100644 plugins/SpellChecker/Flags-Angelika/ss_ZA.ico delete mode 100644 plugins/SpellChecker/Flags-Angelika/st_ZA.ico delete mode 100644 plugins/SpellChecker/Flags-Angelika/sv_SE.ico delete mode 100644 plugins/SpellChecker/Flags-Angelika/ta_IN.ico delete mode 100644 plugins/SpellChecker/Flags-Angelika/tet_ID.ico delete mode 100644 plugins/SpellChecker/Flags-Angelika/tl_PH.ico delete mode 100644 plugins/SpellChecker/Flags-Angelika/tn_ZA.ico delete mode 100644 plugins/SpellChecker/Flags-Angelika/ts_ZA.ico delete mode 100644 plugins/SpellChecker/Flags-Angelika/uk_UA.ico delete mode 100644 plugins/SpellChecker/Flags-Angelika/uz_UZ.ico delete mode 100644 plugins/SpellChecker/Flags-Angelika/ve_ZA.ico delete mode 100644 plugins/SpellChecker/Flags-Angelika/vi_VI.ico delete mode 100644 plugins/SpellChecker/Flags-Angelika/xh_ZA.ico delete mode 100644 plugins/SpellChecker/Flags-Angelika/zu_ZA.ico delete mode 100644 plugins/SpellChecker/Flags/ad.ico delete mode 100644 plugins/SpellChecker/Flags/ae.ico delete mode 100644 plugins/SpellChecker/Flags/af_ZA.ico delete mode 100644 plugins/SpellChecker/Flags/ag.ico delete mode 100644 plugins/SpellChecker/Flags/ai.ico delete mode 100644 plugins/SpellChecker/Flags/al.ico delete mode 100644 plugins/SpellChecker/Flags/am.ico delete mode 100644 plugins/SpellChecker/Flags/an.ico delete mode 100644 plugins/SpellChecker/Flags/ao.ico delete mode 100644 plugins/SpellChecker/Flags/ar.ico delete mode 100644 plugins/SpellChecker/Flags/as.ico delete mode 100644 plugins/SpellChecker/Flags/aw.ico delete mode 100644 plugins/SpellChecker/Flags/ax.ico delete mode 100644 plugins/SpellChecker/Flags/az_AZ.ico delete mode 100644 plugins/SpellChecker/Flags/ba.ico delete mode 100644 plugins/SpellChecker/Flags/bb.ico delete mode 100644 plugins/SpellChecker/Flags/bg_BG.ico delete mode 100644 plugins/SpellChecker/Flags/bh.ico delete mode 100644 plugins/SpellChecker/Flags/bi.ico delete mode 100644 plugins/SpellChecker/Flags/bj.ico delete mode 100644 plugins/SpellChecker/Flags/bm.ico delete mode 100644 plugins/SpellChecker/Flags/bn.ico delete mode 100644 plugins/SpellChecker/Flags/bn_IN.ico delete mode 100644 plugins/SpellChecker/Flags/bs.ico delete mode 100644 plugins/SpellChecker/Flags/bt.ico delete mode 100644 plugins/SpellChecker/Flags/bv.ico delete mode 100644 plugins/SpellChecker/Flags/by.ico delete mode 100644 plugins/SpellChecker/Flags/bz.ico delete mode 100644 plugins/SpellChecker/Flags/cc.ico delete mode 100644 plugins/SpellChecker/Flags/cd.ico delete mode 100644 plugins/SpellChecker/Flags/cf.ico delete mode 100644 plugins/SpellChecker/Flags/cg.ico delete mode 100644 plugins/SpellChecker/Flags/ci.ico delete mode 100644 plugins/SpellChecker/Flags/ck.ico delete mode 100644 plugins/SpellChecker/Flags/cl.ico delete mode 100644 plugins/SpellChecker/Flags/cm.ico delete mode 100644 plugins/SpellChecker/Flags/cn.ico delete mode 100644 plugins/SpellChecker/Flags/co.ico delete mode 100644 plugins/SpellChecker/Flags/cr.ico delete mode 100644 plugins/SpellChecker/Flags/cs_CZ.ico delete mode 100644 plugins/SpellChecker/Flags/cu.ico delete mode 100644 plugins/SpellChecker/Flags/cv.ico delete mode 100644 plugins/SpellChecker/Flags/cx.ico delete mode 100644 plugins/SpellChecker/Flags/cy.ico delete mode 100644 plugins/SpellChecker/Flags/cy_GB.ico delete mode 100644 plugins/SpellChecker/Flags/da_DK.ico delete mode 100644 plugins/SpellChecker/Flags/de_AT.ico delete mode 100644 plugins/SpellChecker/Flags/de_CH.ico delete mode 100644 plugins/SpellChecker/Flags/de_DE.ico delete mode 100644 plugins/SpellChecker/Flags/dj.ico delete mode 100644 plugins/SpellChecker/Flags/dm.ico delete mode 100644 plugins/SpellChecker/Flags/do.ico delete mode 100644 plugins/SpellChecker/Flags/dz.ico delete mode 100644 plugins/SpellChecker/Flags/ec.ico delete mode 100644 plugins/SpellChecker/Flags/eg.ico delete mode 100644 plugins/SpellChecker/Flags/eh.ico delete mode 100644 plugins/SpellChecker/Flags/el_GR.ico delete mode 100644 plugins/SpellChecker/Flags/em_ET.ico delete mode 100644 plugins/SpellChecker/Flags/en_AU.ico delete mode 100644 plugins/SpellChecker/Flags/en_CA.ico delete mode 100644 plugins/SpellChecker/Flags/en_GB.ico delete mode 100644 plugins/SpellChecker/Flags/en_NZ.ico delete mode 100644 plugins/SpellChecker/Flags/en_US.ico delete mode 100644 plugins/SpellChecker/Flags/en_ZA.ico delete mode 100644 plugins/SpellChecker/Flags/england.ico delete mode 100644 plugins/SpellChecker/Flags/er.ico delete mode 100644 plugins/SpellChecker/Flags/es_ES.ico delete mode 100644 plugins/SpellChecker/Flags/es_MX.ico delete mode 100644 plugins/SpellChecker/Flags/et_EE.ico delete mode 100644 plugins/SpellChecker/Flags/fa_IR.ico delete mode 100644 plugins/SpellChecker/Flags/fi_FI.ico delete mode 100644 plugins/SpellChecker/Flags/fj_FJ.ico delete mode 100644 plugins/SpellChecker/Flags/fk.ico delete mode 100644 plugins/SpellChecker/Flags/fm.ico delete mode 100644 plugins/SpellChecker/Flags/fo_FO.ico delete mode 100644 plugins/SpellChecker/Flags/fr_BE.ico delete mode 100644 plugins/SpellChecker/Flags/fr_FR.ico delete mode 100644 plugins/SpellChecker/Flags/ga.ico delete mode 100644 plugins/SpellChecker/Flags/ga_IE.ico delete mode 100644 plugins/SpellChecker/Flags/gd.ico delete mode 100644 plugins/SpellChecker/Flags/gd_GB.ico delete mode 100644 plugins/SpellChecker/Flags/ge.ico delete mode 100644 plugins/SpellChecker/Flags/gi.ico delete mode 100644 plugins/SpellChecker/Flags/gl.ico delete mode 100644 plugins/SpellChecker/Flags/gm.ico delete mode 100644 plugins/SpellChecker/Flags/gn.ico delete mode 100644 plugins/SpellChecker/Flags/gp.ico delete mode 100644 plugins/SpellChecker/Flags/gq.ico delete mode 100644 plugins/SpellChecker/Flags/gs.ico delete mode 100644 plugins/SpellChecker/Flags/gt.ico delete mode 100644 plugins/SpellChecker/Flags/gu.ico delete mode 100644 plugins/SpellChecker/Flags/gw.ico delete mode 100644 plugins/SpellChecker/Flags/gy.ico delete mode 100644 plugins/SpellChecker/Flags/he_IL.ico delete mode 100644 plugins/SpellChecker/Flags/hi_IN.ico delete mode 100644 plugins/SpellChecker/Flags/hk.ico delete mode 100644 plugins/SpellChecker/Flags/hn.ico delete mode 100644 plugins/SpellChecker/Flags/hr_HR.ico delete mode 100644 plugins/SpellChecker/Flags/ht.ico delete mode 100644 plugins/SpellChecker/Flags/hu_HU.ico delete mode 100644 plugins/SpellChecker/Flags/id_ID.ico delete mode 100644 plugins/SpellChecker/Flags/io.ico delete mode 100644 plugins/SpellChecker/Flags/iq.ico delete mode 100644 plugins/SpellChecker/Flags/is_IS.ico delete mode 100644 plugins/SpellChecker/Flags/it_IT.ico delete mode 100644 plugins/SpellChecker/Flags/jm.ico delete mode 100644 plugins/SpellChecker/Flags/jo.ico delete mode 100644 plugins/SpellChecker/Flags/jp.ico delete mode 100644 plugins/SpellChecker/Flags/ke.ico delete mode 100644 plugins/SpellChecker/Flags/kg.ico delete mode 100644 plugins/SpellChecker/Flags/ki.ico delete mode 100644 plugins/SpellChecker/Flags/km.ico delete mode 100644 plugins/SpellChecker/Flags/km_KH.ico delete mode 100644 plugins/SpellChecker/Flags/kn.ico delete mode 100644 plugins/SpellChecker/Flags/kp.ico delete mode 100644 plugins/SpellChecker/Flags/kr.ico delete mode 100644 plugins/SpellChecker/Flags/ku_TR.ico delete mode 100644 plugins/SpellChecker/Flags/kw.ico delete mode 100644 plugins/SpellChecker/Flags/ky.ico delete mode 100644 plugins/SpellChecker/Flags/kz.ico delete mode 100644 plugins/SpellChecker/Flags/la.ico delete mode 100644 plugins/SpellChecker/Flags/lb.ico delete mode 100644 plugins/SpellChecker/Flags/lc.ico delete mode 100644 plugins/SpellChecker/Flags/li.ico delete mode 100644 plugins/SpellChecker/Flags/lk.ico delete mode 100644 plugins/SpellChecker/Flags/lr.ico delete mode 100644 plugins/SpellChecker/Flags/ls.ico delete mode 100644 plugins/SpellChecker/Flags/lt_LT.ico delete mode 100644 plugins/SpellChecker/Flags/lu_LU.ico delete mode 100644 plugins/SpellChecker/Flags/lv_LV.ico delete mode 100644 plugins/SpellChecker/Flags/ly.ico delete mode 100644 plugins/SpellChecker/Flags/ma.ico delete mode 100644 plugins/SpellChecker/Flags/mc.ico delete mode 100644 plugins/SpellChecker/Flags/md.ico delete mode 100644 plugins/SpellChecker/Flags/mg_MG.ico delete mode 100644 plugins/SpellChecker/Flags/mh.ico delete mode 100644 plugins/SpellChecker/Flags/mi_NZ.ico delete mode 100644 plugins/SpellChecker/Flags/mk.ico delete mode 100644 plugins/SpellChecker/Flags/ml.ico delete mode 100644 plugins/SpellChecker/Flags/mm.ico delete mode 100644 plugins/SpellChecker/Flags/mn_MN.ico delete mode 100644 plugins/SpellChecker/Flags/mo.ico delete mode 100644 plugins/SpellChecker/Flags/mo_BF.ico delete mode 100644 plugins/SpellChecker/Flags/mp.ico delete mode 100644 plugins/SpellChecker/Flags/mq.ico delete mode 100644 plugins/SpellChecker/Flags/mr.ico delete mode 100644 plugins/SpellChecker/Flags/mr_IN.ico delete mode 100644 plugins/SpellChecker/Flags/ms.ico delete mode 100644 plugins/SpellChecker/Flags/ms_MY.ico delete mode 100644 plugins/SpellChecker/Flags/mt.ico delete mode 100644 plugins/SpellChecker/Flags/mu.ico delete mode 100644 plugins/SpellChecker/Flags/mv.ico delete mode 100644 plugins/SpellChecker/Flags/mz.ico delete mode 100644 plugins/SpellChecker/Flags/na.ico delete mode 100644 plugins/SpellChecker/Flags/nb_NO.ico delete mode 100644 plugins/SpellChecker/Flags/nc.ico delete mode 100644 plugins/SpellChecker/Flags/ne.ico delete mode 100644 plugins/SpellChecker/Flags/ne_NP.ico delete mode 100644 plugins/SpellChecker/Flags/nf.ico delete mode 100644 plugins/SpellChecker/Flags/ng.ico delete mode 100644 plugins/SpellChecker/Flags/ni.ico delete mode 100644 plugins/SpellChecker/Flags/nl_NL.ico delete mode 100644 plugins/SpellChecker/Flags/nn_NO.ico delete mode 100644 plugins/SpellChecker/Flags/nr.ico delete mode 100644 plugins/SpellChecker/Flags/nr_ZA.ico delete mode 100644 plugins/SpellChecker/Flags/ns_ZA.ico delete mode 100644 plugins/SpellChecker/Flags/nu.ico delete mode 100644 plugins/SpellChecker/Flags/ny_MW.ico delete mode 100644 plugins/SpellChecker/Flags/om.ico delete mode 100644 plugins/SpellChecker/Flags/or_IN.ico delete mode 100644 plugins/SpellChecker/Flags/pa.ico delete mode 100644 plugins/SpellChecker/Flags/pe.ico delete mode 100644 plugins/SpellChecker/Flags/pf.ico delete mode 100644 plugins/SpellChecker/Flags/pg.ico delete mode 100644 plugins/SpellChecker/Flags/pk.ico delete mode 100644 plugins/SpellChecker/Flags/pl_PL.ico delete mode 100644 plugins/SpellChecker/Flags/pm.ico delete mode 100644 plugins/SpellChecker/Flags/pn.ico delete mode 100644 plugins/SpellChecker/Flags/pr.ico delete mode 100644 plugins/SpellChecker/Flags/ps.ico delete mode 100644 plugins/SpellChecker/Flags/pt_BR.ico delete mode 100644 plugins/SpellChecker/Flags/pt_PT.ico delete mode 100644 plugins/SpellChecker/Flags/pw.ico delete mode 100644 plugins/SpellChecker/Flags/py.ico delete mode 100644 plugins/SpellChecker/Flags/qa.ico delete mode 100644 plugins/SpellChecker/Flags/qu_BO.ico delete mode 100644 plugins/SpellChecker/Flags/readme.txt delete mode 100644 plugins/SpellChecker/Flags/ro_BO.ico delete mode 100644 plugins/SpellChecker/Flags/ro_RO.ico delete mode 100644 plugins/SpellChecker/Flags/ru_RU.ico delete mode 100644 plugins/SpellChecker/Flags/rw_RW.ico delete mode 100644 plugins/SpellChecker/Flags/sa.ico delete mode 100644 plugins/SpellChecker/Flags/sb.ico delete mode 100644 plugins/SpellChecker/Flags/sc.ico delete mode 100644 plugins/SpellChecker/Flags/sd.ico delete mode 100644 plugins/SpellChecker/Flags/sg.ico delete mode 100644 plugins/SpellChecker/Flags/sh.ico delete mode 100644 plugins/SpellChecker/Flags/sk_SK.ico delete mode 100644 plugins/SpellChecker/Flags/sl.ico delete mode 100644 plugins/SpellChecker/Flags/sl_SI.ico delete mode 100644 plugins/SpellChecker/Flags/sm.ico delete mode 100644 plugins/SpellChecker/Flags/sn.ico delete mode 100644 plugins/SpellChecker/Flags/so.ico delete mode 100644 plugins/SpellChecker/Flags/sr.ico delete mode 100644 plugins/SpellChecker/Flags/sr_CS.ico delete mode 100644 plugins/SpellChecker/Flags/ss_ZA.ico delete mode 100644 plugins/SpellChecker/Flags/st.ico delete mode 100644 plugins/SpellChecker/Flags/st_ZA.ico delete mode 100644 plugins/SpellChecker/Flags/sv.ico delete mode 100644 plugins/SpellChecker/Flags/sv_SE.ico delete mode 100644 plugins/SpellChecker/Flags/sy.ico delete mode 100644 plugins/SpellChecker/Flags/tc.ico delete mode 100644 plugins/SpellChecker/Flags/td.ico delete mode 100644 plugins/SpellChecker/Flags/tet_ID.ico delete mode 100644 plugins/SpellChecker/Flags/tf.ico delete mode 100644 plugins/SpellChecker/Flags/tg.ico delete mode 100644 plugins/SpellChecker/Flags/th.ico delete mode 100644 plugins/SpellChecker/Flags/tj.ico delete mode 100644 plugins/SpellChecker/Flags/tk.ico delete mode 100644 plugins/SpellChecker/Flags/tl.ico delete mode 100644 plugins/SpellChecker/Flags/tl_PH.ico delete mode 100644 plugins/SpellChecker/Flags/tm.ico delete mode 100644 plugins/SpellChecker/Flags/tn.ico delete mode 100644 plugins/SpellChecker/Flags/tn_ZA.ico delete mode 100644 plugins/SpellChecker/Flags/to.ico delete mode 100644 plugins/SpellChecker/Flags/ts_ZA.ico delete mode 100644 plugins/SpellChecker/Flags/tt.ico delete mode 100644 plugins/SpellChecker/Flags/tv.ico delete mode 100644 plugins/SpellChecker/Flags/tw.ico delete mode 100644 plugins/SpellChecker/Flags/tz.ico delete mode 100644 plugins/SpellChecker/Flags/ug.ico delete mode 100644 plugins/SpellChecker/Flags/uk_UA.ico delete mode 100644 plugins/SpellChecker/Flags/um.ico delete mode 100644 plugins/SpellChecker/Flags/uy.ico delete mode 100644 plugins/SpellChecker/Flags/uz_UZ.ico delete mode 100644 plugins/SpellChecker/Flags/va.ico delete mode 100644 plugins/SpellChecker/Flags/vc.ico delete mode 100644 plugins/SpellChecker/Flags/ve.ico delete mode 100644 plugins/SpellChecker/Flags/ve_ZA.ico delete mode 100644 plugins/SpellChecker/Flags/vg.ico delete mode 100644 plugins/SpellChecker/Flags/vi.ico delete mode 100644 plugins/SpellChecker/Flags/vi_VI.ico delete mode 100644 plugins/SpellChecker/Flags/vu.ico delete mode 100644 plugins/SpellChecker/Flags/wf.ico delete mode 100644 plugins/SpellChecker/Flags/ws.ico delete mode 100644 plugins/SpellChecker/Flags/xh_ZA.ico delete mode 100644 plugins/SpellChecker/Flags/ye.ico delete mode 100644 plugins/SpellChecker/Flags/yt.ico delete mode 100644 plugins/SpellChecker/Flags/zm.ico delete mode 100644 plugins/SpellChecker/Flags/zu_ZA.ico delete mode 100644 plugins/SpellChecker/Flags/zw.ico delete mode 100644 plugins/SpellChecker/RichEdit.cpp delete mode 100644 plugins/SpellChecker/RichEdit.h delete mode 100644 plugins/SpellChecker/Version.h delete mode 100644 plugins/SpellChecker/Version.rc delete mode 100644 plugins/SpellChecker/ardialog.cpp delete mode 100644 plugins/SpellChecker/ardialog.h delete mode 100644 plugins/SpellChecker/autoreplace.cpp delete mode 100644 plugins/SpellChecker/autoreplace.h delete mode 100644 plugins/SpellChecker/codepages.cpp delete mode 100644 plugins/SpellChecker/commons.h delete mode 100644 plugins/SpellChecker/dictionary.cpp delete mode 100644 plugins/SpellChecker/dictionary.h delete mode 100644 plugins/SpellChecker/flags-angelika.rc delete mode 100644 plugins/SpellChecker/flags.rc delete mode 100644 plugins/SpellChecker/hunspell/README delete mode 100644 plugins/SpellChecker/hunspell/affentry.cxx delete mode 100644 plugins/SpellChecker/hunspell/affentry.hxx delete mode 100644 plugins/SpellChecker/hunspell/affixmgr.cxx delete mode 100644 plugins/SpellChecker/hunspell/affixmgr.hxx delete mode 100644 plugins/SpellChecker/hunspell/atypes.hxx delete mode 100644 plugins/SpellChecker/hunspell/baseaffix.hxx delete mode 100644 plugins/SpellChecker/hunspell/config.h delete mode 100644 plugins/SpellChecker/hunspell/csutil.cxx delete mode 100644 plugins/SpellChecker/hunspell/csutil.hxx delete mode 100644 plugins/SpellChecker/hunspell/dictmgr.cxx delete mode 100644 plugins/SpellChecker/hunspell/dictmgr.hxx delete mode 100644 plugins/SpellChecker/hunspell/filemgr.cxx delete mode 100644 plugins/SpellChecker/hunspell/filemgr.hxx delete mode 100644 plugins/SpellChecker/hunspell/hashmgr.cxx delete mode 100644 plugins/SpellChecker/hunspell/hashmgr.hxx delete mode 100644 plugins/SpellChecker/hunspell/htypes.hxx delete mode 100644 plugins/SpellChecker/hunspell/hunspell.cxx delete mode 100644 plugins/SpellChecker/hunspell/hunspell.dsp delete mode 100644 plugins/SpellChecker/hunspell/hunspell.h delete mode 100644 plugins/SpellChecker/hunspell/hunspell.hxx delete mode 100644 plugins/SpellChecker/hunspell/hunvisapi.h delete mode 100644 plugins/SpellChecker/hunspell/hunzip.cxx delete mode 100644 plugins/SpellChecker/hunspell/hunzip.hxx delete mode 100644 plugins/SpellChecker/hunspell/langnum.hxx delete mode 100644 plugins/SpellChecker/hunspell/license.hunspell delete mode 100644 plugins/SpellChecker/hunspell/license.myspell delete mode 100644 plugins/SpellChecker/hunspell/phonet.cxx delete mode 100644 plugins/SpellChecker/hunspell/phonet.hxx delete mode 100644 plugins/SpellChecker/hunspell/replist.cxx delete mode 100644 plugins/SpellChecker/hunspell/replist.hxx delete mode 100644 plugins/SpellChecker/hunspell/suggestmgr.cxx delete mode 100644 plugins/SpellChecker/hunspell/suggestmgr.hxx delete mode 100644 plugins/SpellChecker/hunspell/utf_info.cxx delete mode 100644 plugins/SpellChecker/hunspell/w_char.hxx delete mode 100644 plugins/SpellChecker/options.cpp delete mode 100644 plugins/SpellChecker/options.h create mode 100644 plugins/SpellChecker/res/Flags-Angelika/Unknown.ico create mode 100644 plugins/SpellChecker/res/Flags-Angelika/af_ZA.ico create mode 100644 plugins/SpellChecker/res/Flags-Angelika/ar_AR.ico create mode 100644 plugins/SpellChecker/res/Flags-Angelika/az_AZ.ico create mode 100644 plugins/SpellChecker/res/Flags-Angelika/bg_BG.ico create mode 100644 plugins/SpellChecker/res/Flags-Angelika/bn_IN.ico create mode 100644 plugins/SpellChecker/res/Flags-Angelika/ca_ES.ico create mode 100644 plugins/SpellChecker/res/Flags-Angelika/cs_CZ.ico create mode 100644 plugins/SpellChecker/res/Flags-Angelika/csb_PO.ico create mode 100644 plugins/SpellChecker/res/Flags-Angelika/cy_GB.ico create mode 100644 plugins/SpellChecker/res/Flags-Angelika/da_DK.ico create mode 100644 plugins/SpellChecker/res/Flags-Angelika/de_AT.ico create mode 100644 plugins/SpellChecker/res/Flags-Angelika/de_CH.ico create mode 100644 plugins/SpellChecker/res/Flags-Angelika/de_DE.ico create mode 100644 plugins/SpellChecker/res/Flags-Angelika/el_GR.ico create mode 100644 plugins/SpellChecker/res/Flags-Angelika/em_ET.ico create mode 100644 plugins/SpellChecker/res/Flags-Angelika/en_AU.ico create mode 100644 plugins/SpellChecker/res/Flags-Angelika/en_CA.ico create mode 100644 plugins/SpellChecker/res/Flags-Angelika/en_GB.ico create mode 100644 plugins/SpellChecker/res/Flags-Angelika/en_NZ.ico create mode 100644 plugins/SpellChecker/res/Flags-Angelika/en_US.ico create mode 100644 plugins/SpellChecker/res/Flags-Angelika/en_ZA.ico create mode 100644 plugins/SpellChecker/res/Flags-Angelika/es_ES.ico create mode 100644 plugins/SpellChecker/res/Flags-Angelika/es_MX.ico create mode 100644 plugins/SpellChecker/res/Flags-Angelika/et_EE.ico create mode 100644 plugins/SpellChecker/res/Flags-Angelika/fa_IR.ico create mode 100644 plugins/SpellChecker/res/Flags-Angelika/fi_FI.ico create mode 100644 plugins/SpellChecker/res/Flags-Angelika/fj_FJ.ico create mode 100644 plugins/SpellChecker/res/Flags-Angelika/fo_FO.ico create mode 100644 plugins/SpellChecker/res/Flags-Angelika/fr_BE.ico create mode 100644 plugins/SpellChecker/res/Flags-Angelika/fr_FR.ico create mode 100644 plugins/SpellChecker/res/Flags-Angelika/ga_IE.ico create mode 100644 plugins/SpellChecker/res/Flags-Angelika/gd_GB.ico create mode 100644 plugins/SpellChecker/res/Flags-Angelika/gl_ES.ico create mode 100644 plugins/SpellChecker/res/Flags-Angelika/he_IL.ico create mode 100644 plugins/SpellChecker/res/Flags-Angelika/hi_IN.ico create mode 100644 plugins/SpellChecker/res/Flags-Angelika/hr_Hr.ico create mode 100644 plugins/SpellChecker/res/Flags-Angelika/hu_HU.ico create mode 100644 plugins/SpellChecker/res/Flags-Angelika/id_ID.ico create mode 100644 plugins/SpellChecker/res/Flags-Angelika/is_IS.ico create mode 100644 plugins/SpellChecker/res/Flags-Angelika/it_IT.ico create mode 100644 plugins/SpellChecker/res/Flags-Angelika/km_KH.ico create mode 100644 plugins/SpellChecker/res/Flags-Angelika/ku_TR.ico create mode 100644 plugins/SpellChecker/res/Flags-Angelika/lt_LT.ico create mode 100644 plugins/SpellChecker/res/Flags-Angelika/lu_LU.ico create mode 100644 plugins/SpellChecker/res/Flags-Angelika/lv_LV.ico create mode 100644 plugins/SpellChecker/res/Flags-Angelika/mg_MG.ico create mode 100644 plugins/SpellChecker/res/Flags-Angelika/mi_NZ.ico create mode 100644 plugins/SpellChecker/res/Flags-Angelika/mn_MN.ico create mode 100644 plugins/SpellChecker/res/Flags-Angelika/mo_BF.ico create mode 100644 plugins/SpellChecker/res/Flags-Angelika/mr_IN.ico create mode 100644 plugins/SpellChecker/res/Flags-Angelika/ms_MY.ico create mode 100644 plugins/SpellChecker/res/Flags-Angelika/nb_NO.ico create mode 100644 plugins/SpellChecker/res/Flags-Angelika/ne_NP.ico create mode 100644 plugins/SpellChecker/res/Flags-Angelika/nl_NL.ico create mode 100644 plugins/SpellChecker/res/Flags-Angelika/nn_NO.ico create mode 100644 plugins/SpellChecker/res/Flags-Angelika/nr_ZA.ico create mode 100644 plugins/SpellChecker/res/Flags-Angelika/ns_ZA.ico create mode 100644 plugins/SpellChecker/res/Flags-Angelika/or_IN.ico create mode 100644 plugins/SpellChecker/res/Flags-Angelika/pl_PL.ico create mode 100644 plugins/SpellChecker/res/Flags-Angelika/pt_BR.ico create mode 100644 plugins/SpellChecker/res/Flags-Angelika/pt_PT.ico create mode 100644 plugins/SpellChecker/res/Flags-Angelika/qu_BO.ico create mode 100644 plugins/SpellChecker/res/Flags-Angelika/ro_RO.ico create mode 100644 plugins/SpellChecker/res/Flags-Angelika/ru_RU.ico create mode 100644 plugins/SpellChecker/res/Flags-Angelika/rw_RW.ico create mode 100644 plugins/SpellChecker/res/Flags-Angelika/sk_SK.ico create mode 100644 plugins/SpellChecker/res/Flags-Angelika/sl_SI.ico create mode 100644 plugins/SpellChecker/res/Flags-Angelika/ss_ZA.ico create mode 100644 plugins/SpellChecker/res/Flags-Angelika/st_ZA.ico create mode 100644 plugins/SpellChecker/res/Flags-Angelika/sv_SE.ico create mode 100644 plugins/SpellChecker/res/Flags-Angelika/ta_IN.ico create mode 100644 plugins/SpellChecker/res/Flags-Angelika/tet_ID.ico create mode 100644 plugins/SpellChecker/res/Flags-Angelika/tl_PH.ico create mode 100644 plugins/SpellChecker/res/Flags-Angelika/tn_ZA.ico create mode 100644 plugins/SpellChecker/res/Flags-Angelika/ts_ZA.ico create mode 100644 plugins/SpellChecker/res/Flags-Angelika/uk_UA.ico create mode 100644 plugins/SpellChecker/res/Flags-Angelika/uz_UZ.ico create mode 100644 plugins/SpellChecker/res/Flags-Angelika/ve_ZA.ico create mode 100644 plugins/SpellChecker/res/Flags-Angelika/vi_VI.ico create mode 100644 plugins/SpellChecker/res/Flags-Angelika/xh_ZA.ico create mode 100644 plugins/SpellChecker/res/Flags-Angelika/zu_ZA.ico create mode 100644 plugins/SpellChecker/res/Flags/ad.ico create mode 100644 plugins/SpellChecker/res/Flags/ae.ico create mode 100644 plugins/SpellChecker/res/Flags/af_ZA.ico create mode 100644 plugins/SpellChecker/res/Flags/ag.ico create mode 100644 plugins/SpellChecker/res/Flags/ai.ico create mode 100644 plugins/SpellChecker/res/Flags/al.ico create mode 100644 plugins/SpellChecker/res/Flags/am.ico create mode 100644 plugins/SpellChecker/res/Flags/an.ico create mode 100644 plugins/SpellChecker/res/Flags/ao.ico create mode 100644 plugins/SpellChecker/res/Flags/ar.ico create mode 100644 plugins/SpellChecker/res/Flags/as.ico create mode 100644 plugins/SpellChecker/res/Flags/aw.ico create mode 100644 plugins/SpellChecker/res/Flags/ax.ico create mode 100644 plugins/SpellChecker/res/Flags/az_AZ.ico create mode 100644 plugins/SpellChecker/res/Flags/ba.ico create mode 100644 plugins/SpellChecker/res/Flags/bb.ico create mode 100644 plugins/SpellChecker/res/Flags/bg_BG.ico create mode 100644 plugins/SpellChecker/res/Flags/bh.ico create mode 100644 plugins/SpellChecker/res/Flags/bi.ico create mode 100644 plugins/SpellChecker/res/Flags/bj.ico create mode 100644 plugins/SpellChecker/res/Flags/bm.ico create mode 100644 plugins/SpellChecker/res/Flags/bn.ico create mode 100644 plugins/SpellChecker/res/Flags/bn_IN.ico create mode 100644 plugins/SpellChecker/res/Flags/bs.ico create mode 100644 plugins/SpellChecker/res/Flags/bt.ico create mode 100644 plugins/SpellChecker/res/Flags/bv.ico create mode 100644 plugins/SpellChecker/res/Flags/by.ico create mode 100644 plugins/SpellChecker/res/Flags/bz.ico create mode 100644 plugins/SpellChecker/res/Flags/cc.ico create mode 100644 plugins/SpellChecker/res/Flags/cd.ico create mode 100644 plugins/SpellChecker/res/Flags/cf.ico create mode 100644 plugins/SpellChecker/res/Flags/cg.ico create mode 100644 plugins/SpellChecker/res/Flags/ci.ico create mode 100644 plugins/SpellChecker/res/Flags/ck.ico create mode 100644 plugins/SpellChecker/res/Flags/cl.ico create mode 100644 plugins/SpellChecker/res/Flags/cm.ico create mode 100644 plugins/SpellChecker/res/Flags/cn.ico create mode 100644 plugins/SpellChecker/res/Flags/co.ico create mode 100644 plugins/SpellChecker/res/Flags/cr.ico create mode 100644 plugins/SpellChecker/res/Flags/cs_CZ.ico create mode 100644 plugins/SpellChecker/res/Flags/cu.ico create mode 100644 plugins/SpellChecker/res/Flags/cv.ico create mode 100644 plugins/SpellChecker/res/Flags/cx.ico create mode 100644 plugins/SpellChecker/res/Flags/cy.ico create mode 100644 plugins/SpellChecker/res/Flags/cy_GB.ico create mode 100644 plugins/SpellChecker/res/Flags/da_DK.ico create mode 100644 plugins/SpellChecker/res/Flags/de_AT.ico create mode 100644 plugins/SpellChecker/res/Flags/de_CH.ico create mode 100644 plugins/SpellChecker/res/Flags/de_DE.ico create mode 100644 plugins/SpellChecker/res/Flags/dj.ico create mode 100644 plugins/SpellChecker/res/Flags/dm.ico create mode 100644 plugins/SpellChecker/res/Flags/do.ico create mode 100644 plugins/SpellChecker/res/Flags/dz.ico create mode 100644 plugins/SpellChecker/res/Flags/ec.ico create mode 100644 plugins/SpellChecker/res/Flags/eg.ico create mode 100644 plugins/SpellChecker/res/Flags/eh.ico create mode 100644 plugins/SpellChecker/res/Flags/el_GR.ico create mode 100644 plugins/SpellChecker/res/Flags/em_ET.ico create mode 100644 plugins/SpellChecker/res/Flags/en_AU.ico create mode 100644 plugins/SpellChecker/res/Flags/en_CA.ico create mode 100644 plugins/SpellChecker/res/Flags/en_GB.ico create mode 100644 plugins/SpellChecker/res/Flags/en_NZ.ico create mode 100644 plugins/SpellChecker/res/Flags/en_US.ico create mode 100644 plugins/SpellChecker/res/Flags/en_ZA.ico create mode 100644 plugins/SpellChecker/res/Flags/england.ico create mode 100644 plugins/SpellChecker/res/Flags/er.ico create mode 100644 plugins/SpellChecker/res/Flags/es_ES.ico create mode 100644 plugins/SpellChecker/res/Flags/es_MX.ico create mode 100644 plugins/SpellChecker/res/Flags/et_EE.ico create mode 100644 plugins/SpellChecker/res/Flags/fa_IR.ico create mode 100644 plugins/SpellChecker/res/Flags/fi_FI.ico create mode 100644 plugins/SpellChecker/res/Flags/fj_FJ.ico create mode 100644 plugins/SpellChecker/res/Flags/fk.ico create mode 100644 plugins/SpellChecker/res/Flags/fm.ico create mode 100644 plugins/SpellChecker/res/Flags/fo_FO.ico create mode 100644 plugins/SpellChecker/res/Flags/fr_BE.ico create mode 100644 plugins/SpellChecker/res/Flags/fr_FR.ico create mode 100644 plugins/SpellChecker/res/Flags/ga.ico create mode 100644 plugins/SpellChecker/res/Flags/ga_IE.ico create mode 100644 plugins/SpellChecker/res/Flags/gd.ico create mode 100644 plugins/SpellChecker/res/Flags/gd_GB.ico create mode 100644 plugins/SpellChecker/res/Flags/ge.ico create mode 100644 plugins/SpellChecker/res/Flags/gi.ico create mode 100644 plugins/SpellChecker/res/Flags/gl.ico create mode 100644 plugins/SpellChecker/res/Flags/gm.ico create mode 100644 plugins/SpellChecker/res/Flags/gn.ico create mode 100644 plugins/SpellChecker/res/Flags/gp.ico create mode 100644 plugins/SpellChecker/res/Flags/gq.ico create mode 100644 plugins/SpellChecker/res/Flags/gs.ico create mode 100644 plugins/SpellChecker/res/Flags/gt.ico create mode 100644 plugins/SpellChecker/res/Flags/gu.ico create mode 100644 plugins/SpellChecker/res/Flags/gw.ico create mode 100644 plugins/SpellChecker/res/Flags/gy.ico create mode 100644 plugins/SpellChecker/res/Flags/he_IL.ico create mode 100644 plugins/SpellChecker/res/Flags/hi_IN.ico create mode 100644 plugins/SpellChecker/res/Flags/hk.ico create mode 100644 plugins/SpellChecker/res/Flags/hn.ico create mode 100644 plugins/SpellChecker/res/Flags/hr_HR.ico create mode 100644 plugins/SpellChecker/res/Flags/ht.ico create mode 100644 plugins/SpellChecker/res/Flags/hu_HU.ico create mode 100644 plugins/SpellChecker/res/Flags/id_ID.ico create mode 100644 plugins/SpellChecker/res/Flags/io.ico create mode 100644 plugins/SpellChecker/res/Flags/iq.ico create mode 100644 plugins/SpellChecker/res/Flags/is_IS.ico create mode 100644 plugins/SpellChecker/res/Flags/it_IT.ico create mode 100644 plugins/SpellChecker/res/Flags/jm.ico create mode 100644 plugins/SpellChecker/res/Flags/jo.ico create mode 100644 plugins/SpellChecker/res/Flags/jp.ico create mode 100644 plugins/SpellChecker/res/Flags/ke.ico create mode 100644 plugins/SpellChecker/res/Flags/kg.ico create mode 100644 plugins/SpellChecker/res/Flags/ki.ico create mode 100644 plugins/SpellChecker/res/Flags/km.ico create mode 100644 plugins/SpellChecker/res/Flags/km_KH.ico create mode 100644 plugins/SpellChecker/res/Flags/kn.ico create mode 100644 plugins/SpellChecker/res/Flags/kp.ico create mode 100644 plugins/SpellChecker/res/Flags/kr.ico create mode 100644 plugins/SpellChecker/res/Flags/ku_TR.ico create mode 100644 plugins/SpellChecker/res/Flags/kw.ico create mode 100644 plugins/SpellChecker/res/Flags/ky.ico create mode 100644 plugins/SpellChecker/res/Flags/kz.ico create mode 100644 plugins/SpellChecker/res/Flags/la.ico create mode 100644 plugins/SpellChecker/res/Flags/lb.ico create mode 100644 plugins/SpellChecker/res/Flags/lc.ico create mode 100644 plugins/SpellChecker/res/Flags/li.ico create mode 100644 plugins/SpellChecker/res/Flags/lk.ico create mode 100644 plugins/SpellChecker/res/Flags/lr.ico create mode 100644 plugins/SpellChecker/res/Flags/ls.ico create mode 100644 plugins/SpellChecker/res/Flags/lt_LT.ico create mode 100644 plugins/SpellChecker/res/Flags/lu_LU.ico create mode 100644 plugins/SpellChecker/res/Flags/lv_LV.ico create mode 100644 plugins/SpellChecker/res/Flags/ly.ico create mode 100644 plugins/SpellChecker/res/Flags/ma.ico create mode 100644 plugins/SpellChecker/res/Flags/mc.ico create mode 100644 plugins/SpellChecker/res/Flags/md.ico create mode 100644 plugins/SpellChecker/res/Flags/mg_MG.ico create mode 100644 plugins/SpellChecker/res/Flags/mh.ico create mode 100644 plugins/SpellChecker/res/Flags/mi_NZ.ico create mode 100644 plugins/SpellChecker/res/Flags/mk.ico create mode 100644 plugins/SpellChecker/res/Flags/ml.ico create mode 100644 plugins/SpellChecker/res/Flags/mm.ico create mode 100644 plugins/SpellChecker/res/Flags/mn_MN.ico create mode 100644 plugins/SpellChecker/res/Flags/mo.ico create mode 100644 plugins/SpellChecker/res/Flags/mo_BF.ico create mode 100644 plugins/SpellChecker/res/Flags/mp.ico create mode 100644 plugins/SpellChecker/res/Flags/mq.ico create mode 100644 plugins/SpellChecker/res/Flags/mr.ico create mode 100644 plugins/SpellChecker/res/Flags/mr_IN.ico create mode 100644 plugins/SpellChecker/res/Flags/ms.ico create mode 100644 plugins/SpellChecker/res/Flags/ms_MY.ico create mode 100644 plugins/SpellChecker/res/Flags/mt.ico create mode 100644 plugins/SpellChecker/res/Flags/mu.ico create mode 100644 plugins/SpellChecker/res/Flags/mv.ico create mode 100644 plugins/SpellChecker/res/Flags/mz.ico create mode 100644 plugins/SpellChecker/res/Flags/na.ico create mode 100644 plugins/SpellChecker/res/Flags/nb_NO.ico create mode 100644 plugins/SpellChecker/res/Flags/nc.ico create mode 100644 plugins/SpellChecker/res/Flags/ne.ico create mode 100644 plugins/SpellChecker/res/Flags/ne_NP.ico create mode 100644 plugins/SpellChecker/res/Flags/nf.ico create mode 100644 plugins/SpellChecker/res/Flags/ng.ico create mode 100644 plugins/SpellChecker/res/Flags/ni.ico create mode 100644 plugins/SpellChecker/res/Flags/nl_NL.ico create mode 100644 plugins/SpellChecker/res/Flags/nn_NO.ico create mode 100644 plugins/SpellChecker/res/Flags/nr.ico create mode 100644 plugins/SpellChecker/res/Flags/nr_ZA.ico create mode 100644 plugins/SpellChecker/res/Flags/ns_ZA.ico create mode 100644 plugins/SpellChecker/res/Flags/nu.ico create mode 100644 plugins/SpellChecker/res/Flags/ny_MW.ico create mode 100644 plugins/SpellChecker/res/Flags/om.ico create mode 100644 plugins/SpellChecker/res/Flags/or_IN.ico create mode 100644 plugins/SpellChecker/res/Flags/pa.ico create mode 100644 plugins/SpellChecker/res/Flags/pe.ico create mode 100644 plugins/SpellChecker/res/Flags/pf.ico create mode 100644 plugins/SpellChecker/res/Flags/pg.ico create mode 100644 plugins/SpellChecker/res/Flags/pk.ico create mode 100644 plugins/SpellChecker/res/Flags/pl_PL.ico create mode 100644 plugins/SpellChecker/res/Flags/pm.ico create mode 100644 plugins/SpellChecker/res/Flags/pn.ico create mode 100644 plugins/SpellChecker/res/Flags/pr.ico create mode 100644 plugins/SpellChecker/res/Flags/ps.ico create mode 100644 plugins/SpellChecker/res/Flags/pt_BR.ico create mode 100644 plugins/SpellChecker/res/Flags/pt_PT.ico create mode 100644 plugins/SpellChecker/res/Flags/pw.ico create mode 100644 plugins/SpellChecker/res/Flags/py.ico create mode 100644 plugins/SpellChecker/res/Flags/qa.ico create mode 100644 plugins/SpellChecker/res/Flags/qu_BO.ico create mode 100644 plugins/SpellChecker/res/Flags/readme.txt create mode 100644 plugins/SpellChecker/res/Flags/ro_BO.ico create mode 100644 plugins/SpellChecker/res/Flags/ro_RO.ico create mode 100644 plugins/SpellChecker/res/Flags/ru_RU.ico create mode 100644 plugins/SpellChecker/res/Flags/rw_RW.ico create mode 100644 plugins/SpellChecker/res/Flags/sa.ico create mode 100644 plugins/SpellChecker/res/Flags/sb.ico create mode 100644 plugins/SpellChecker/res/Flags/sc.ico create mode 100644 plugins/SpellChecker/res/Flags/sd.ico create mode 100644 plugins/SpellChecker/res/Flags/sg.ico create mode 100644 plugins/SpellChecker/res/Flags/sh.ico create mode 100644 plugins/SpellChecker/res/Flags/sk_SK.ico create mode 100644 plugins/SpellChecker/res/Flags/sl.ico create mode 100644 plugins/SpellChecker/res/Flags/sl_SI.ico create mode 100644 plugins/SpellChecker/res/Flags/sm.ico create mode 100644 plugins/SpellChecker/res/Flags/sn.ico create mode 100644 plugins/SpellChecker/res/Flags/so.ico create mode 100644 plugins/SpellChecker/res/Flags/sr.ico create mode 100644 plugins/SpellChecker/res/Flags/sr_CS.ico create mode 100644 plugins/SpellChecker/res/Flags/ss_ZA.ico create mode 100644 plugins/SpellChecker/res/Flags/st.ico create mode 100644 plugins/SpellChecker/res/Flags/st_ZA.ico create mode 100644 plugins/SpellChecker/res/Flags/sv.ico create mode 100644 plugins/SpellChecker/res/Flags/sv_SE.ico create mode 100644 plugins/SpellChecker/res/Flags/sy.ico create mode 100644 plugins/SpellChecker/res/Flags/tc.ico create mode 100644 plugins/SpellChecker/res/Flags/td.ico create mode 100644 plugins/SpellChecker/res/Flags/tet_ID.ico create mode 100644 plugins/SpellChecker/res/Flags/tf.ico create mode 100644 plugins/SpellChecker/res/Flags/tg.ico create mode 100644 plugins/SpellChecker/res/Flags/th.ico create mode 100644 plugins/SpellChecker/res/Flags/tj.ico create mode 100644 plugins/SpellChecker/res/Flags/tk.ico create mode 100644 plugins/SpellChecker/res/Flags/tl.ico create mode 100644 plugins/SpellChecker/res/Flags/tl_PH.ico create mode 100644 plugins/SpellChecker/res/Flags/tm.ico create mode 100644 plugins/SpellChecker/res/Flags/tn.ico create mode 100644 plugins/SpellChecker/res/Flags/tn_ZA.ico create mode 100644 plugins/SpellChecker/res/Flags/to.ico create mode 100644 plugins/SpellChecker/res/Flags/ts_ZA.ico create mode 100644 plugins/SpellChecker/res/Flags/tt.ico create mode 100644 plugins/SpellChecker/res/Flags/tv.ico create mode 100644 plugins/SpellChecker/res/Flags/tw.ico create mode 100644 plugins/SpellChecker/res/Flags/tz.ico create mode 100644 plugins/SpellChecker/res/Flags/ug.ico create mode 100644 plugins/SpellChecker/res/Flags/uk_UA.ico create mode 100644 plugins/SpellChecker/res/Flags/um.ico create mode 100644 plugins/SpellChecker/res/Flags/uy.ico create mode 100644 plugins/SpellChecker/res/Flags/uz_UZ.ico create mode 100644 plugins/SpellChecker/res/Flags/va.ico create mode 100644 plugins/SpellChecker/res/Flags/vc.ico create mode 100644 plugins/SpellChecker/res/Flags/ve.ico create mode 100644 plugins/SpellChecker/res/Flags/ve_ZA.ico create mode 100644 plugins/SpellChecker/res/Flags/vg.ico create mode 100644 plugins/SpellChecker/res/Flags/vi.ico create mode 100644 plugins/SpellChecker/res/Flags/vi_VI.ico create mode 100644 plugins/SpellChecker/res/Flags/vu.ico create mode 100644 plugins/SpellChecker/res/Flags/wf.ico create mode 100644 plugins/SpellChecker/res/Flags/ws.ico create mode 100644 plugins/SpellChecker/res/Flags/xh_ZA.ico create mode 100644 plugins/SpellChecker/res/Flags/ye.ico create mode 100644 plugins/SpellChecker/res/Flags/yt.ico create mode 100644 plugins/SpellChecker/res/Flags/zm.ico create mode 100644 plugins/SpellChecker/res/Flags/zu_ZA.ico create mode 100644 plugins/SpellChecker/res/Flags/zw.ico create mode 100644 plugins/SpellChecker/res/Version.rc create mode 100644 plugins/SpellChecker/res/flags-angelika.rc create mode 100644 plugins/SpellChecker/res/flags.rc create mode 100644 plugins/SpellChecker/res/resource.rc delete mode 100644 plugins/SpellChecker/resource.h delete mode 100644 plugins/SpellChecker/resource.rc delete mode 100644 plugins/SpellChecker/spellchecker-translation.txt delete mode 100644 plugins/SpellChecker/spellchecker.cpp create mode 100644 plugins/SpellChecker/src/RichEdit.cpp create mode 100644 plugins/SpellChecker/src/RichEdit.h create mode 100644 plugins/SpellChecker/src/Version.h create mode 100644 plugins/SpellChecker/src/ardialog.cpp create mode 100644 plugins/SpellChecker/src/ardialog.h create mode 100644 plugins/SpellChecker/src/autoreplace.cpp create mode 100644 plugins/SpellChecker/src/autoreplace.h create mode 100644 plugins/SpellChecker/src/codepages.cpp create mode 100644 plugins/SpellChecker/src/commons.h create mode 100644 plugins/SpellChecker/src/dictionary.cpp create mode 100644 plugins/SpellChecker/src/dictionary.h create mode 100644 plugins/SpellChecker/src/hunspell/README create mode 100644 plugins/SpellChecker/src/hunspell/affentry.cxx create mode 100644 plugins/SpellChecker/src/hunspell/affentry.hxx create mode 100644 plugins/SpellChecker/src/hunspell/affixmgr.cxx create mode 100644 plugins/SpellChecker/src/hunspell/affixmgr.hxx create mode 100644 plugins/SpellChecker/src/hunspell/atypes.hxx create mode 100644 plugins/SpellChecker/src/hunspell/baseaffix.hxx create mode 100644 plugins/SpellChecker/src/hunspell/config.h create mode 100644 plugins/SpellChecker/src/hunspell/csutil.cxx create mode 100644 plugins/SpellChecker/src/hunspell/csutil.hxx create mode 100644 plugins/SpellChecker/src/hunspell/dictmgr.cxx create mode 100644 plugins/SpellChecker/src/hunspell/dictmgr.hxx create mode 100644 plugins/SpellChecker/src/hunspell/filemgr.cxx create mode 100644 plugins/SpellChecker/src/hunspell/filemgr.hxx create mode 100644 plugins/SpellChecker/src/hunspell/hashmgr.cxx create mode 100644 plugins/SpellChecker/src/hunspell/hashmgr.hxx create mode 100644 plugins/SpellChecker/src/hunspell/htypes.hxx create mode 100644 plugins/SpellChecker/src/hunspell/hunspell.cxx create mode 100644 plugins/SpellChecker/src/hunspell/hunspell.dsp create mode 100644 plugins/SpellChecker/src/hunspell/hunspell.h create mode 100644 plugins/SpellChecker/src/hunspell/hunspell.hxx create mode 100644 plugins/SpellChecker/src/hunspell/hunvisapi.h create mode 100644 plugins/SpellChecker/src/hunspell/hunzip.cxx create mode 100644 plugins/SpellChecker/src/hunspell/hunzip.hxx create mode 100644 plugins/SpellChecker/src/hunspell/langnum.hxx create mode 100644 plugins/SpellChecker/src/hunspell/license.hunspell create mode 100644 plugins/SpellChecker/src/hunspell/license.myspell create mode 100644 plugins/SpellChecker/src/hunspell/phonet.cxx create mode 100644 plugins/SpellChecker/src/hunspell/phonet.hxx create mode 100644 plugins/SpellChecker/src/hunspell/replist.cxx create mode 100644 plugins/SpellChecker/src/hunspell/replist.hxx create mode 100644 plugins/SpellChecker/src/hunspell/suggestmgr.cxx create mode 100644 plugins/SpellChecker/src/hunspell/suggestmgr.hxx create mode 100644 plugins/SpellChecker/src/hunspell/utf_info.cxx create mode 100644 plugins/SpellChecker/src/hunspell/w_char.hxx create mode 100644 plugins/SpellChecker/src/options.cpp create mode 100644 plugins/SpellChecker/src/options.h create mode 100644 plugins/SpellChecker/src/resource.h create mode 100644 plugins/SpellChecker/src/spellchecker.cpp diff --git a/plugins/SimpleAR/Res/Resource.rc b/plugins/SimpleAR/Res/Resource.rc new file mode 100644 index 0000000000..4a43561be7 --- /dev/null +++ b/plugins/SimpleAR/Res/Resource.rc @@ -0,0 +1,93 @@ +// Microsoft Visual C++ generated resource script. +// +#include "..\src\resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "afxres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +//resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) +#endif //_WIN32 + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "..\\src\\resource.h\0" +END + +2 TEXTINCLUDE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_OPTION DIALOGEX 0, 0, 295, 158 +STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_VISIBLE +EXSTYLE WS_EX_CONTROLPARENT +FONT 8, "MS Shell Dlg", 0, 0, 0x1 +BEGIN + CONTROL "Enable Auto Replier",IDC_ENABLEREPLIER,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,9,7,79,10 + LTEXT "Reply Message Heading:",IDC_STATIC,9,22,85,8 + EDITTEXT IDC_HEADING,96,21,190,12,ES_AUTOHSCROLL + LTEXT "Reply Message when",IDC_STATIC,9,42,73,8 + COMBOBOX IDC_STATUSMODE,96,40,77,30,CBS_DROPDOWNLIST | WS_VSCROLL | + WS_TABSTOP + EDITTEXT IDC_MESSAGE,9,59,277,54,ES_MULTILINE | ES_AUTOHSCROLL + LTEXT "No-repeat Interval:",IDC_STATIC,96,7,64,8 + EDITTEXT IDC_INTERVAL,163,5,36,12,ES_AUTOHSCROLL | ES_NUMBER + LTEXT "mins",IDC_STATIC,201,7,30,9 + PUSHBUTTON "&Default",IDC_DEFAULT,226,40,60,13 +END + +#endif //resources +///////////////////////////////////////////////////////////////////////////// + +// Icon +// remains consistent on all systems. +IDI_ON ICON "On.ico" +IDI_OFF ICON "Off.ico" +///////////////////////////////////////////////////////////////////////////// + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/plugins/SimpleAR/Res/Version.rc b/plugins/SimpleAR/Res/Version.rc new file mode 100644 index 0000000000..d741488c4f --- /dev/null +++ b/plugins/SimpleAR/Res/Version.rc @@ -0,0 +1,42 @@ +// Microsoft Visual C++ generated resource script. +// +#ifdef APSTUDIO_INVOKED +#error this file is not editable by Microsoft Visual C++ +#endif //APSTUDIO_INVOKED + +#include "afxres.h" +#include "..\src\version.h" + +#ifdef _WIN32 +LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL +#endif //_WIN32 + +VS_VERSION_INFO VERSIONINFO + FILEVERSION __FILEVERSION_STRING + PRODUCTVERSION __FILEVERSION_STRING + FILEFLAGSMASK 0x17L +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x4L + FILETYPE 0x0L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "000004b0" + BEGIN + VALUE "FileDescription", __DESCRIPTION + VALUE "InternalName", __PLUGIN_NAME + VALUE "LegalCopyright", __COPYRIGHT + VALUE "OriginalFilename", __FILENAME + VALUE "ProductName", __PLUGIN_NAME + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x0, 1200 + END +END diff --git a/plugins/SimpleAR/Resource.h b/plugins/SimpleAR/Resource.h deleted file mode 100644 index 384930dd39..0000000000 --- a/plugins/SimpleAR/Resource.h +++ /dev/null @@ -1,25 +0,0 @@ -//{{NO_DEPENDENCIES}} -// Microsoft Visual C++ generated include file. -// Used by resource.rc -// -#define IDD_OPTION 102 -#define IDC_ENABLEREPLIER 1001 -#define IDC_HEADING 1002 -#define IDC_STATUSMODE 1004 -#define IDC_MESSAGE 1005 -#define IDC_INTERVAL 1006 -#define IDC_DEFAULT 1007 -#define IDI_ON 103 -#define IDI_OFF 104 - -// Next default values for new objects -// -#ifdef APSTUDIO_INVOKED -#ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_NO_MFC 1 -#define _APS_NEXT_RESOURCE_VALUE 101 -#define _APS_NEXT_COMMAND_VALUE 40001 -#define _APS_NEXT_CONTROL_VALUE 1008 -#define _APS_NEXT_SYMED_VALUE 101 -#endif -#endif diff --git a/plugins/SimpleAR/Resource.rc b/plugins/SimpleAR/Resource.rc deleted file mode 100644 index 9a3b32351f..0000000000 --- a/plugins/SimpleAR/Resource.rc +++ /dev/null @@ -1,93 +0,0 @@ -// Microsoft Visual C++ generated resource script. -// -#include "resource.h" - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -#include "afxres.h" - -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -//resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -#ifdef _WIN32 -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -#pragma code_page(1252) -#endif //_WIN32 - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE -BEGIN - "resource.h\0" -END - -2 TEXTINCLUDE -BEGIN - "#include ""afxres.h""\r\n" - "\0" -END - -3 TEXTINCLUDE -BEGIN - "\r\n" - "\0" -END - -#endif // APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// -// Dialog -// - -IDD_OPTION DIALOGEX 0, 0, 295, 158 -STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_VISIBLE -EXSTYLE WS_EX_CONTROLPARENT -FONT 8, "MS Shell Dlg", 0, 0, 0x1 -BEGIN - CONTROL "Enable Auto Replier",IDC_ENABLEREPLIER,"Button", - BS_AUTOCHECKBOX | WS_TABSTOP,9,7,79,10 - LTEXT "Reply Message Heading:",IDC_STATIC,9,22,85,8 - EDITTEXT IDC_HEADING,96,21,190,12,ES_AUTOHSCROLL - LTEXT "Reply Message when",IDC_STATIC,9,42,73,8 - COMBOBOX IDC_STATUSMODE,96,40,77,30,CBS_DROPDOWNLIST | WS_VSCROLL | - WS_TABSTOP - EDITTEXT IDC_MESSAGE,9,59,277,54,ES_MULTILINE | ES_AUTOHSCROLL - LTEXT "No-repeat Interval:",IDC_STATIC,96,7,64,8 - EDITTEXT IDC_INTERVAL,163,5,36,12,ES_AUTOHSCROLL | ES_NUMBER - LTEXT "mins",IDC_STATIC,201,7,30,9 - PUSHBUTTON "&Default",IDC_DEFAULT,226,40,60,13 -END - -#endif //resources -///////////////////////////////////////////////////////////////////////////// - -// Icon -// remains consistent on all systems. -IDI_ON ICON "Res/On.ico" -IDI_OFF ICON "Res/Off.ico" -///////////////////////////////////////////////////////////////////////////// - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// - - -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED - diff --git a/plugins/SimpleAR/SimpleAR_10.vcxproj b/plugins/SimpleAR/SimpleAR_10.vcxproj index 9f3318be48..e0f8f32914 100644 --- a/plugins/SimpleAR/SimpleAR_10.vcxproj +++ b/plugins/SimpleAR/SimpleAR_10.vcxproj @@ -73,12 +73,11 @@ Disabled ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;_USRDLL;SAR_EXPORTS;%(PreprocessorDefinitions) + WIN32;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) Use Common.h Level3 EditAndContinue - 4996;%(DisableSpecificWarnings) MultiThreadedDebugDLL @@ -99,12 +98,11 @@ AnySuitable Size ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;_USRDLL;SAR_EXPORTS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) true Use Common.h Level3 - 4996;%(DisableSpecificWarnings) Windows @@ -124,11 +122,10 @@ Disabled ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) - WIN64;_DEBUG;_WINDOWS;_USRDLL;SAR_EXPORTS;%(PreprocessorDefinitions) + WIN64;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) Use Common.h Level3 - 4996;%(DisableSpecificWarnings) MultiThreadedDebugDLL @@ -149,12 +146,11 @@ AnySuitable Size ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) - WIN64;NDEBUG;_WINDOWS;_USRDLL;SAR_EXPORTS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + WIN64;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) true Use Common.h Level3 - 4996;%(DisableSpecificWarnings) Windows @@ -171,23 +167,19 @@ - + Create - + - - - + + + - - - - - - + + diff --git a/plugins/SimpleAR/SimpleAR_10.vcxproj.filters b/plugins/SimpleAR/SimpleAR_10.vcxproj.filters index 11860e6f80..5e00533b00 100644 --- a/plugins/SimpleAR/SimpleAR_10.vcxproj.filters +++ b/plugins/SimpleAR/SimpleAR_10.vcxproj.filters @@ -1,51 +1,43 @@  - + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx - + {93995380-89BD-4b04-88EB-625FBE52EBFB} h;hpp;hxx;hm;inl;inc;xsd - + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx - + Source - + Source - + Header - + Header - + Header - - Resource - - - Resource - - - - + Resource - + Resource diff --git a/plugins/SimpleAR/Src/Common.h b/plugins/SimpleAR/Src/Common.h index 085786d869..ca873cb2ae 100644 --- a/plugins/SimpleAR/Src/Common.h +++ b/plugins/SimpleAR/Src/Common.h @@ -1,4 +1,5 @@ #define MIRANDA_VER 0x0A00 +#define _CRT_SECURE_NO_WARNINGS // Windows Header Files #include @@ -30,8 +31,8 @@ #include "m_clc.h" #include -#include "..\Resource.h" -#include "..\Version.h" +#include "Resource.h" +#include "Version.h" #define protocolname "SimpleAutoReplier" //no spaces here :) diff --git a/plugins/SimpleAR/Src/Resource.h b/plugins/SimpleAR/Src/Resource.h new file mode 100644 index 0000000000..384930dd39 --- /dev/null +++ b/plugins/SimpleAR/Src/Resource.h @@ -0,0 +1,25 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by resource.rc +// +#define IDD_OPTION 102 +#define IDC_ENABLEREPLIER 1001 +#define IDC_HEADING 1002 +#define IDC_STATUSMODE 1004 +#define IDC_MESSAGE 1005 +#define IDC_INTERVAL 1006 +#define IDC_DEFAULT 1007 +#define IDI_ON 103 +#define IDI_OFF 104 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NO_MFC 1 +#define _APS_NEXT_RESOURCE_VALUE 101 +#define _APS_NEXT_COMMAND_VALUE 40001 +#define _APS_NEXT_CONTROL_VALUE 1008 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/plugins/SimpleAR/Src/Version.h b/plugins/SimpleAR/Src/Version.h new file mode 100644 index 0000000000..76395a436a --- /dev/null +++ b/plugins/SimpleAR/Src/Version.h @@ -0,0 +1,21 @@ +#define __MAJOR_VERSION 2 +#define __MINOR_VERSION 0 +#define __RELEASE_NUM 2 +#define __BUILD_NUM 6 + +#define __FILEVERSION_STRING __MAJOR_VERSION,__MINOR_VERSION,__RELEASE_NUM,__BUILD_NUM +#define __FILEVERSION_DOTS __MAJOR_VERSION.__MINOR_VERSION.__RELEASE_NUM.__BUILD_NUM + +#define __STRINGIFY_IMPL(x) #x +#define __STRINGIFY(x) __STRINGIFY_IMPL(x) +#define __VERSION_STRING __STRINGIFY(__FILEVERSION_DOTS) + + +#define __PLUGIN_NAME "SimpleAR" +#define __INTERNAL_NAME "Simple Auto Replier" +#define __FILENAME "SimpleAR.dll" +#define __DESCRIPTION "Simple Auto Replier." +#define __AUTHOR "Stark Wong, Mataes, Mikel-Ard-Ri" +#define __AUTHOREMAIL "mikelardri@gmail.com" +#define __AUTHORWEB "http://nightly.miranda.im/" +#define __COPYRIGHT "© 2012" diff --git a/plugins/SimpleAR/Version.h b/plugins/SimpleAR/Version.h deleted file mode 100644 index 76395a436a..0000000000 --- a/plugins/SimpleAR/Version.h +++ /dev/null @@ -1,21 +0,0 @@ -#define __MAJOR_VERSION 2 -#define __MINOR_VERSION 0 -#define __RELEASE_NUM 2 -#define __BUILD_NUM 6 - -#define __FILEVERSION_STRING __MAJOR_VERSION,__MINOR_VERSION,__RELEASE_NUM,__BUILD_NUM -#define __FILEVERSION_DOTS __MAJOR_VERSION.__MINOR_VERSION.__RELEASE_NUM.__BUILD_NUM - -#define __STRINGIFY_IMPL(x) #x -#define __STRINGIFY(x) __STRINGIFY_IMPL(x) -#define __VERSION_STRING __STRINGIFY(__FILEVERSION_DOTS) - - -#define __PLUGIN_NAME "SimpleAR" -#define __INTERNAL_NAME "Simple Auto Replier" -#define __FILENAME "SimpleAR.dll" -#define __DESCRIPTION "Simple Auto Replier." -#define __AUTHOR "Stark Wong, Mataes, Mikel-Ard-Ri" -#define __AUTHOREMAIL "mikelardri@gmail.com" -#define __AUTHORWEB "http://nightly.miranda.im/" -#define __COPYRIGHT "© 2012" diff --git a/plugins/SimpleAR/Version.rc b/plugins/SimpleAR/Version.rc deleted file mode 100644 index d1da5e8d6a..0000000000 --- a/plugins/SimpleAR/Version.rc +++ /dev/null @@ -1,42 +0,0 @@ -// Microsoft Visual C++ generated resource script. -// -#ifdef APSTUDIO_INVOKED -#error this file is not editable by Microsoft Visual C++ -#endif //APSTUDIO_INVOKED - -#include "afxres.h" -#include "version.h" - -#ifdef _WIN32 -LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL -#endif //_WIN32 - -VS_VERSION_INFO VERSIONINFO - FILEVERSION __FILEVERSION_STRING - PRODUCTVERSION __FILEVERSION_STRING - FILEFLAGSMASK 0x17L -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x4L - FILETYPE 0x0L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "000004b0" - BEGIN - VALUE "FileDescription", __DESCRIPTION - VALUE "InternalName", __PLUGIN_NAME - VALUE "LegalCopyright", __COPYRIGHT - VALUE "OriginalFilename", __FILENAME - VALUE "ProductName", __PLUGIN_NAME - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x0, 1200 - END -END diff --git a/plugins/SimpleAR/docs/simplear-translation.txt b/plugins/SimpleAR/docs/simplear-translation.txt new file mode 100644 index 0000000000..215cfdcb9d --- /dev/null +++ b/plugins/SimpleAR/docs/simplear-translation.txt @@ -0,0 +1,17 @@ +; Common strings that belong to many files +;[] + +; ../../plugins/SimpleAR/Resource.rc +;[&Default] +;[Enable Auto Replier] +;[No-repeat Interval:] +;[Reply Message Heading:] +;[Reply Message when] +;[mins] + +; ../../plugins/SimpleAR/Src/Main.cpp +;[Dear %user%, the owner left the following message:] + +; ../../plugins/SimpleAR/Src/Options.cpp +;[Plugins] +;[Simple Auto Replier] diff --git a/plugins/SimpleAR/simplear-translation.txt b/plugins/SimpleAR/simplear-translation.txt deleted file mode 100644 index 215cfdcb9d..0000000000 --- a/plugins/SimpleAR/simplear-translation.txt +++ /dev/null @@ -1,17 +0,0 @@ -; Common strings that belong to many files -;[] - -; ../../plugins/SimpleAR/Resource.rc -;[&Default] -;[Enable Auto Replier] -;[No-repeat Interval:] -;[Reply Message Heading:] -;[Reply Message when] -;[mins] - -; ../../plugins/SimpleAR/Src/Main.cpp -;[Dear %user%, the owner left the following message:] - -; ../../plugins/SimpleAR/Src/Options.cpp -;[Plugins] -;[Simple Auto Replier] diff --git a/plugins/SimpleStatusMsg/awaymsg.cpp b/plugins/SimpleStatusMsg/awaymsg.cpp deleted file mode 100644 index 705b860cc5..0000000000 --- a/plugins/SimpleStatusMsg/awaymsg.cpp +++ /dev/null @@ -1,494 +0,0 @@ -/* - -Miranda IM: the free IM client for Microsoft* Windows* - -Copyright 2000-2010 Miranda ICQ/IM project, -all portions of this codebase are copyrighted to the people -listed in contributors.txt. - -Portions of this code modified for Simple Status Message plugin -Copyright (C) 2006-2011 Bartosz 'Dezeath' Bia³ek, (C) 2005 Harven - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along -with this program; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -*/ -#include "commonheaders.h" -#include "simplestatusmsg.h" - -static HANDLE hAwayMsgMenuItem; -static HANDLE hCopyMsgMenuItem; -static HANDLE hGoToURLMenuItem; -static HANDLE hWindowList; -static HANDLE hWindowList2; - -static char *StrNormNewlineA(char *szStr) -{ - if (szStr == NULL) return NULL; - - int nCR = 0; - for (int i = 0; szStr[i]; i++) - if (szStr[i] != 0x0D && szStr[i + 1] == 0x0A) nCR++; - - if (!nCR) return mir_strdup(szStr); - - char *szNewStr = (char*)mir_alloc(lstrlenA(szStr) + nCR + 1), *pszStr = szNewStr; - while (*szStr) - { - if (*szStr == 0x0A) - *pszStr++ = 0x0D; - *pszStr++ = *szStr++; - } - *pszStr++ = 0; - - return szNewStr; -} - - -static TCHAR *StrNormNewline(TCHAR *tszStr) -{ - if (tszStr == NULL) return NULL; - - int nCR = 0; - for (int i = 0; tszStr[i]; i++) - if (tszStr[i] != 0x0D && tszStr[i + 1] == 0x0A) nCR++; - - if (!nCR) return mir_tstrdup(tszStr); - - TCHAR *tszNewStr = (TCHAR*)mir_alloc((lstrlen(tszStr) + nCR + 1) * sizeof(TCHAR)), *ptszStr = tszNewStr; - while (*tszStr) - { - if (*tszStr == 0x0A) - *ptszStr++ = 0x0D; - *ptszStr++ = *tszStr++; - } - *ptszStr++ = 0; - - return tszNewStr; -} - - -struct AwayMsgDlgData -{ - HANDLE hContact; - HANDLE hSeq; - HANDLE hAwayMsgEvent; -}; - -#define HM_AWAYMSG (WM_USER + 10) - -static INT_PTR CALLBACK ReadAwayMsgDlgProc(HWND hwndDlg, UINT message, WPARAM wParam, LPARAM lParam) -{ - AwayMsgDlgData *dat = (AwayMsgDlgData*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA); - - switch (message) - { - case WM_INITDIALOG: - TranslateDialogDefault(hwndDlg); - dat = (AwayMsgDlgData*)mir_alloc(sizeof(AwayMsgDlgData)); - SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)dat); - - dat->hContact = (HANDLE)lParam; - dat->hSeq = (HANDLE)CallContactService(dat->hContact, PSS_GETAWAYMSG, 0, 0); - dat->hAwayMsgEvent = dat->hSeq ? HookEventMessage(ME_PROTO_ACK, hwndDlg, HM_AWAYMSG) : NULL; - WindowList_Add(hWindowList, hwndDlg, dat->hContact); - { - TCHAR str[256], format[128]; - TCHAR *contactName = (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)dat->hContact, GCDNF_TCHAR); - char *szProto = (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)dat->hContact, 0); - WORD dwStatus = DBGetContactSettingWord(dat->hContact, szProto, "Status", ID_STATUS_OFFLINE); - TCHAR *status = (TCHAR*)CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, dwStatus, GSMDF_TCHAR); - - GetWindowText(hwndDlg, format, SIZEOF(format)); - mir_sntprintf(str, SIZEOF(str), format, status, contactName); - SetWindowText(hwndDlg, str); - if (dat->hSeq) - { - GetDlgItemText(hwndDlg, IDC_RETRIEVING, format, SIZEOF(format)); - mir_sntprintf(str, SIZEOF(str), format, status); - } - else - { - mir_sntprintf(str, SIZEOF(str), TranslateT("Failed to retrieve %s message."), status); - SetDlgItemText(hwndDlg, IDOK, TranslateT("&Close")); - } - SetDlgItemText(hwndDlg, IDC_RETRIEVING, str); - SendMessage(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)LoadSkinnedProtoIcon(szProto, dwStatus)); - SendMessage(hwndDlg, WM_SETICON, ICON_SMALL, (LPARAM)LoadSkinnedProtoIcon(szProto, dwStatus)); - EnableWindow(GetDlgItem(hwndDlg, IDC_COPY), FALSE); - } - Utils_RestoreWindowPosition(hwndDlg, (HANDLE)lParam, "SRAway", "AwayMsgDlg"); - return TRUE; - - case HM_AWAYMSG: - { - ACKDATA *ack = (ACKDATA*)lParam; - if (ack->hContact != dat->hContact || ack->type != ACKTYPE_AWAYMSG) break; - if (ack->result != ACKRESULT_SUCCESS) break; - if (dat->hAwayMsgEvent && ack->hProcess == dat->hSeq) { UnhookEvent(dat->hAwayMsgEvent); dat->hAwayMsgEvent = NULL; } - - TCHAR *tszMsg = StrNormNewline((TCHAR*)ack->lParam); - SetDlgItemText(hwndDlg, IDC_MSG, tszMsg); - mir_free(tszMsg); - - if (ack->lParam && *((char*)ack->lParam) != '\0') - EnableWindow(GetDlgItem(hwndDlg, IDC_COPY), TRUE); - ShowWindow(GetDlgItem(hwndDlg, IDC_RETRIEVING), SW_HIDE); - ShowWindow(GetDlgItem(hwndDlg, IDC_MSG), SW_SHOW); - SetDlgItemText(hwndDlg, IDOK, TranslateT("&Close")); - break; - } - - case WM_COMMAND: - switch (LOWORD(wParam)) - { - case IDCANCEL: - case IDOK: - DestroyWindow(hwndDlg); - break; - - case IDC_COPY: - if (!OpenClipboard(hwndDlg)) break; - if (EmptyClipboard()) - { - TCHAR msg[1024]; - int len = GetDlgItemText(hwndDlg, IDC_MSG, msg, SIZEOF(msg)); - if (len) - { - LPTSTR lptstrCopy; - HGLOBAL hglbCopy = GlobalAlloc(GMEM_MOVEABLE, (len + 1) * sizeof(TCHAR)); - if (hglbCopy == NULL) - { - CloseClipboard(); - break; - } - lptstrCopy = (LPTSTR)GlobalLock(hglbCopy); - memcpy(lptstrCopy, msg, len * sizeof(TCHAR)); - lptstrCopy[len] = (TCHAR)0; - GlobalUnlock(hglbCopy); - - SetClipboardData(CF_UNICODETEXT, hglbCopy); - - } - } - CloseClipboard(); - break; - } - break; - - case WM_CLOSE: - DestroyWindow(hwndDlg); - break; - - case WM_DESTROY: - if (dat->hAwayMsgEvent) UnhookEvent(dat->hAwayMsgEvent); - Utils_SaveWindowPosition(hwndDlg, dat->hContact, "SRAway", "AwayMsgDlg"); - WindowList_Remove(hWindowList, hwndDlg); - CallService(MS_SKIN2_RELEASEICON, (WPARAM)SendMessage(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)NULL), 0); - CallService(MS_SKIN2_RELEASEICON, (WPARAM)SendMessage(hwndDlg, WM_SETICON, ICON_SMALL, (LPARAM)NULL), 0); - mir_free(dat); - break; - } - return FALSE; -} - -static INT_PTR GetMessageCommand(WPARAM wParam, LPARAM) -{ - if (HWND hwnd = WindowList_Find(hWindowList, (HANDLE)wParam)) - { - SetForegroundWindow(hwnd); - SetFocus(hwnd); - } - else CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_READAWAYMSG), NULL, ReadAwayMsgDlgProc, wParam); - return 0; -} - -static INT_PTR CALLBACK CopyAwayMsgDlgProc(HWND hwndDlg, UINT message, WPARAM wParam, LPARAM lParam) -{ - AwayMsgDlgData *dat = (AwayMsgDlgData*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA); - - switch (message) - { - case WM_INITDIALOG: - { - TCHAR str[256], format[128]; - TCHAR *contactName; - - TranslateDialogDefault(hwndDlg); - dat = (AwayMsgDlgData*)mir_alloc(sizeof(AwayMsgDlgData)); - SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)dat); - - dat->hContact = (HANDLE)lParam; - dat->hSeq = (HANDLE)CallContactService(dat->hContact, PSS_GETAWAYMSG, 0, 0); - dat->hAwayMsgEvent = dat->hSeq ? HookEventMessage(ME_PROTO_ACK, hwndDlg, HM_AWAYMSG) : NULL; - WindowList_Add(hWindowList2, hwndDlg, dat->hContact); - contactName = (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)dat->hContact, GCDNF_TCHAR); - GetWindowText(hwndDlg, format, SIZEOF(format)); - mir_sntprintf(str, SIZEOF(str), format, contactName); - SetWindowText(hwndDlg, str); - if (!dat->hSeq) DestroyWindow(hwndDlg); - return TRUE; - } - - case HM_AWAYMSG: - { - ACKDATA *ack = (ACKDATA*)lParam; - if (ack->hContact != dat->hContact || ack->type != ACKTYPE_AWAYMSG) { DestroyWindow(hwndDlg); break; } - if (ack->result != ACKRESULT_SUCCESS) { DestroyWindow(hwndDlg); break; } - if (dat->hAwayMsgEvent && ack->hProcess == dat->hSeq) { UnhookEvent(dat->hAwayMsgEvent); dat->hAwayMsgEvent = NULL; } - - if (!OpenClipboard(hwndDlg)) { DestroyWindow(hwndDlg); break; } - if (EmptyClipboard()) - { - TCHAR msg[1024]; - TCHAR *tszMsg = StrNormNewline((TCHAR*)ack->lParam); - mir_sntprintf(msg, SIZEOF(msg), _T("%s"), tszMsg); - mir_free(tszMsg); - size_t len = lstrlen(msg); - if (len) - { - LPTSTR lptstrCopy; - HGLOBAL hglbCopy = GlobalAlloc(GMEM_MOVEABLE, (len + 1) * sizeof(TCHAR)); - if (hglbCopy == NULL) { - CloseClipboard(); - DestroyWindow(hwndDlg); - break; - } - lptstrCopy = (LPTSTR)GlobalLock(hglbCopy); - memcpy(lptstrCopy, msg, len * sizeof(TCHAR)); - lptstrCopy[len] = (TCHAR)0; - GlobalUnlock(hglbCopy); - - SetClipboardData(CF_UNICODETEXT, hglbCopy); - } - } - CloseClipboard(); - DestroyWindow(hwndDlg); - break; - } - - case WM_COMMAND: - switch (LOWORD(wParam)) - { - case IDCANCEL: - case IDOK: - DestroyWindow(hwndDlg); - break; - } - break; - - case WM_CLOSE: - DestroyWindow(hwndDlg); - break; - - case WM_DESTROY: - if (dat->hAwayMsgEvent) UnhookEvent(dat->hAwayMsgEvent); - WindowList_Remove(hWindowList2, hwndDlg); - mir_free(dat); - break; - } - return FALSE; -} - -static INT_PTR CopyAwayMsgCommand(WPARAM wParam, LPARAM) -{ - if (HWND hwnd = WindowList_Find(hWindowList2, (HANDLE)wParam)) - { - SetForegroundWindow(hwnd); - SetFocus(hwnd); - } - else CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_COPY), NULL, CopyAwayMsgDlgProc, wParam); - return 0; -} - -static char *StrFindURL(char *pszStr) -{ - char *pszURL = NULL; - - if (pszStr != NULL && *pszStr != '\0') - { - pszURL = strstr(pszStr, "www."); - if (pszURL == NULL) - pszURL = strstr(pszStr, "http://"); - if (pszURL == NULL) - pszURL = strstr(pszStr, "https://"); - if (pszURL == NULL) - pszURL = strstr(pszStr, "ftp://"); - } - - return pszURL; -} - -static INT_PTR GoToURLMsgCommand(WPARAM wParam, LPARAM lParam) -{ - DBVARIANT dbv; - char *szMsg; - - - int unicode = !DBGetContactSetting((HANDLE)wParam, "CList", "StatusMsg", &dbv) && (dbv.type == DBVT_UTF8 || dbv.type == DBVT_WCHAR); - DBFreeVariant(&dbv); - if (unicode) - { - DBGetContactSettingWString((HANDLE)wParam, "CList", "StatusMsg", &dbv); - szMsg = mir_u2a(dbv.pwszVal); - } - else - - { - DBGetContactSettingString((HANDLE)wParam, "CList", "StatusMsg", &dbv); - szMsg = mir_strdup(dbv.pszVal); - } - DBFreeVariant(&dbv); - - char *szURL = StrFindURL(szMsg); - if (szURL != NULL) - { - int i; - for (i = 0; szURL[i] != ' ' && szURL[i] != '\n' && szURL[i] != '\r' && - szURL[i] != '\t' && szURL[i] != '\0'; i++); - - char *szMsgURL = (char *)mir_alloc(i + 1); - if (szMsgURL) - { - lstrcpynA(szMsgURL, szURL, i + 1); - CallService(MS_UTILS_OPENURL, (WPARAM)1, (LPARAM)szMsgURL); - mir_free(szMsgURL); - } - } - mir_free(szMsg); - - return 0; -} - -static int AwayMsgPreBuildMenu(WPARAM wParam, LPARAM lParam) -{ - CLISTMENUITEM clmi = {0}; - TCHAR str[128]; - char *szProto = (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, wParam, 0); - int iHidden = szProto ? DBGetContactSettingByte((HANDLE)wParam, szProto, "ChatRoom", 0) : 0; - char *szMsg; - int iStatus; - - clmi.cbSize = sizeof(clmi); - clmi.flags = CMIM_FLAGS | CMIF_HIDDEN | CMIF_TCHAR; - - if (!iHidden) - { - iHidden = 1; - iStatus = DBGetContactSettingWord((HANDLE)wParam, szProto, "Status", ID_STATUS_OFFLINE); - if (CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1,0) & PF1_MODEMSGRECV) - { - if (CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_3,0) & Proto_Status2Flag(iStatus == ID_STATUS_OFFLINE ? ID_STATUS_INVISIBLE : iStatus)) - { - iHidden = 0; - clmi.flags = CMIM_FLAGS | CMIM_NAME | CMIM_ICON | CMIF_TCHAR; - clmi.hIcon = LoadSkinnedProtoIcon(szProto, iStatus); - mir_sntprintf(str, SIZEOF(str), TranslateT("Re&ad %s Message"), (TCHAR*)CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, iStatus, GSMDF_TCHAR)); - clmi.ptszName = str; - } - } - } - CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hAwayMsgMenuItem, (LPARAM)&clmi); - CallService(MS_SKIN2_RELEASEICON, (WPARAM)clmi.hIcon, (LPARAM)0); - clmi.flags = CMIM_FLAGS | CMIF_HIDDEN | CMIF_TCHAR; - - if (!iHidden) - { - DBVARIANT dbv; - - int unicode = !DBGetContactSetting((HANDLE)wParam, "CList", "StatusMsg", &dbv) && (dbv.type == DBVT_UTF8 || dbv.type == DBVT_WCHAR); - DBFreeVariant(&dbv); - if (unicode) - { - DBGetContactSettingWString((HANDLE)wParam, "CList", "StatusMsg", &dbv); - szMsg = mir_u2a(dbv.pwszVal); - } - else - - { - DBGetContactSettingString((HANDLE)wParam, "CList", "StatusMsg", &dbv); - szMsg = mir_strdup(dbv.pszVal); - } - DBFreeVariant(&dbv); - - if (DBGetContactSettingByte(NULL, "SimpleStatusMsg", "ShowCopy", 1) && szMsg && *szMsg != '\0') - { - clmi.flags = CMIM_FLAGS | CMIM_NAME | CMIF_TCHAR; - mir_sntprintf(str, SIZEOF(str), TranslateT("Copy %s Message"), (TCHAR*)CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, iStatus, GSMDF_TCHAR)); - clmi.ptszName = str; - } - } - CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hCopyMsgMenuItem, (LPARAM)&clmi); - clmi.flags = CMIM_FLAGS | CMIF_HIDDEN | CMIF_TCHAR; - - if (!iHidden) - { - if (DBGetContactSettingByte(NULL, "SimpleStatusMsg", "ShowGoToURL", 1) && StrFindURL(szMsg) != NULL) - { - clmi.flags = CMIM_FLAGS | CMIM_NAME | CMIF_TCHAR; - mir_sntprintf(str, SIZEOF(str), TranslateT("&Go to URL in %s Message"), (TCHAR*)CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, iStatus, GSMDF_TCHAR)); - clmi.ptszName = str; - } - mir_free(szMsg); - } - CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hGoToURLMenuItem, (LPARAM)&clmi); - - return 0; -} - -int AwayMsgPreShutdown(void) -{ - if (hWindowList) WindowList_BroadcastAsync(hWindowList, WM_CLOSE, 0, 0); - if (hWindowList2) WindowList_BroadcastAsync(hWindowList2, WM_CLOSE, 0, 0); - - return 0; -} - -int LoadAwayMsgModule(void) -{ - CLISTMENUITEM mi = {0}; - - hWindowList = (HANDLE)CallService(MS_UTILS_ALLOCWINDOWLIST, 0, 0); - hWindowList2 = (HANDLE)CallService(MS_UTILS_ALLOCWINDOWLIST, 0, 0); - mi.cbSize = sizeof(mi); - mi.flags = CMIF_TCHAR; - - CreateServiceFunctionEx(MS_AWAYMSG_SHOWAWAYMSG, GetMessageCommand); - mi.position = -2000005000; - mi.ptszName = LPGENT("Re&ad Away Message"); - mi.pszService = MS_AWAYMSG_SHOWAWAYMSG; - hAwayMsgMenuItem = Menu_AddContactMenuItem(&mi); - - mi.flags |= CMIF_ICONFROMICOLIB; - CreateServiceFunctionEx(MS_SIMPLESTATUSMSG_COPYMSG, CopyAwayMsgCommand); - mi.position = -2000006000; - mi.icolibItem = GetIconHandle(IDI_COPY); - mi.ptszName = LPGENT("Copy Away Message"); - mi.pszService = MS_SIMPLESTATUSMSG_COPYMSG; - hCopyMsgMenuItem = Menu_AddContactMenuItem(&mi); - - CreateServiceFunctionEx(MS_SIMPLESTATUSMSG_GOTOURLMSG, GoToURLMsgCommand); - mi.position = -2000007000; - mi.icolibItem = GetIconHandle(IDI_GOTOURL); - mi.ptszName = LPGENT("&Go to URL in Away Message"); - mi.pszService = MS_SIMPLESTATUSMSG_GOTOURLMSG; - hGoToURLMenuItem = Menu_AddContactMenuItem(&mi); - - HookEventEx(ME_CLIST_PREBUILDCONTACTMENU, AwayMsgPreBuildMenu); - - // Deprecated SimpleAway services - CreateServiceFunctionEx(MS_SA_COPYAWAYMSG, CopyAwayMsgCommand); - CreateServiceFunctionEx(MS_SA_GOTOURLMSG, GoToURLMsgCommand); - - return 0; -} diff --git a/plugins/SimpleStatusMsg/commonheaders.h b/plugins/SimpleStatusMsg/commonheaders.h deleted file mode 100644 index 594fbfa546..0000000000 --- a/plugins/SimpleStatusMsg/commonheaders.h +++ /dev/null @@ -1,63 +0,0 @@ -/* - -Simple Status Message plugin for Miranda IM -Copyright (C) 2006-2011 Bartosz 'Dezeath' Bia³ek, (C) 2005 Harven - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along -with this program; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -*/ - -// to enable all 0.9.0 core functions -#define MIRANDA_VER 0x0A00 -// to enable custom langpacks -#define MIRANDA_CUSTOM_LP - -#define _WIN32_IE 0x0501 - -#include - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "../../protocols/IcqOscarJ/icq_constants.h" -#include "m_fortunemsg.h" -#include "m_statusplugins.h" -#include "m_toptoolbar.h" -#include "m_variables.h" -#include "m_simpleaway.h" -#include "m_simplestatusmsg.h" - -#include "resource.h" diff --git a/plugins/SimpleStatusMsg/docs/simplestatusmsg-translation.txt b/plugins/SimpleStatusMsg/docs/simplestatusmsg-translation.txt new file mode 100644 index 0000000000..37e50a086e --- /dev/null +++ b/plugins/SimpleStatusMsg/docs/simplestatusmsg-translation.txt @@ -0,0 +1,150 @@ +; Common strings that belong to many files +;[%s Message (%s)] +;[Add to Predefined] +;[Are you sure you want to clear status message history?] +;[Change Status Message] +;[Clear History] +;[Confirm clearing history] +;[Copy Away Message] +;[Delete Selected] +;[Show status profiles in status list] +;[Status Messages] +;[Variables] + +; ../../plugins/SimpleStatusMsg/awaymsg.cpp +;[&Close] +;[&Go to URL in %s Message] +;[&Go to URL in Away Message] +;[Copy %s Message] +;[Failed to retrieve %s message.] +;[Re&ad %s Message] +;[Re&ad Away Message] + +; ../../plugins/SimpleStatusMsg/main.cpp +;[%s (locked)] +;[External Applications\tretrieves song name of the song currently playing in Winamp (Simple Status Message compatible)] +;[Miranda Related\tget the date (Simple Status Message compatible)] +;[Status Message...] + +; ../../plugins/SimpleStatusMsg/msgbox.cpp +;[] +;[] +;[Closing in %d] +;[Global] +;[OK (%d)] + +; ../../plugins/SimpleStatusMsg/options.cpp +;[] +;[Advanced] +;[Are you sure you want to clear predefined status messages?] +;[Confirm clearing predefined] +;[Flat, next to cancel button] +;[General] +;[Global status change] +;[Hide] +;[Open String Formatting Help] +;[Show in message list] +;[Show next to cancel button] +;[Status] + +; ../../plugins/SimpleStatusMsg/resource.rc +;[%date%] +;[%fortunemsg%] +;[%protofortunemsg%] +;[%rand(x,y)%] +;[%randdefmsg%] +;[%randmsg%] +;[%s Message for %s] +;[%statusfortunemsg%] +;[%time%] +;[%winampsong%] +;[&Cancel] +;[* This feature is available only when using StartupStatus plugin.] +;[?cdate(format)] +;[?cinfo(contact,property)] +;[?contact(string,property)] +;[?ctime(format)] +;[?dbsetting(contact,module,setting)] +;[?if(condition,true,false)] +;[?lower(string)] +;[?lsdate(contact,format)] +;[?lsstatus(contact)] +;[?lstime(contact,format)] +;[?mstatus(protocol)] +;[?replace(sub,string1,string2)] +;[?scroll(string,numchars,numchars)] +;[?strcmp(string1,string2)] +;[?stricmp(string1,string2)] +;[?txtfile(file,line)] +;[?upper(string)] +;[Always set the same message] +;[Apply to all] +;[Automatically close dialog window after] +;[Behaviour on status change] +;[Buttons:] +;[Clear Predefined] +;[Co&py to Clipboard] +;[Copy] +;[Cut] +;[Delete] +;[Do not change status message] +;[Do not set status message] +;[Do not update variables during idle] +;[Do not update variables on ICQ status message requests] +;[Enable status messages parsing by Variables plugin] +;[Exclude %date% token from parsing (restart required)] +;[Fortune] +;[Independent setting for each protocol] +;[Layout] +;[Leave last played track's title after exiting the player] +;[Max length:] +;[More variables...] +;[OK] +;[Other] +;[Paste] +;[Pop up dialog asking for new message] +;[Pop up dialog asking for status message] +;[Pop up dialog box] +;[Protocol:] +;[Put default message in message list] +;[Remember last dialog window position] +;[Remove Carriage Return (CR = '\\r' = #0D) chars from status messages] +;[Retrieving %s message...] +;[Retrieving status message for %s...] +;[Select All] +;[Set an empty message] +;[Set status after] +;[Set the following message:] +;[Show 'Copy Away Message' item in contact menu] +;[Show 'Go to URL in Away Message' item in contact menu] +;[Show 'Status Message...' item in status menu] +;[Show icons in message list] +;[Show icons in status list] +;[Show status list] +;[Spin2] +;[Status on Startup] +;[Status:] +;[Store up to] +;[Update variables in status messages every] +;[Use default message] +;[Use last message] +;[Use last message set for this status] +;[miliseconds] +;[recent messages (0 = disable)] +;[seconds] + +; ../../plugins/SimpleStatusMsg/utils.cpp +;[Give a guy some peace, would ya?] +;[Give it up, I'm not in!] +;[Go to URL in Away Message] +;[I'm a chatbot!] +;[I'm hiding from the mafia.] +;[I've been away since %time%.] +;[Mmm...food.] +;[Nope, not here.] +;[Not right now.] +;[Predefined Message] +;[Recent Message] +;[That'll be the phone.] +;[Yep, I'm here.] +;[idleeeeeeee] diff --git a/plugins/SimpleStatusMsg/main.cpp b/plugins/SimpleStatusMsg/main.cpp deleted file mode 100644 index 95212f4d59..0000000000 --- a/plugins/SimpleStatusMsg/main.cpp +++ /dev/null @@ -1,2176 +0,0 @@ -/* - -Simple Status Message plugin for Miranda IM -Copyright (C) 2006-2011 Bartosz 'Dezeath' Bia³ek, (C) 2005 Harven - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along -with this program; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -*/ -#include "commonheaders.h" -#include "simplestatusmsg.h" -#include - -HINSTANCE g_hInst; - -int hLangpack; -PROTOACCOUNTS *accounts; - -static int g_iIdleTime = -1; -UINT_PTR g_uUpdateMsgTimer = 0, *g_uSetStatusTimer; -static TCHAR *g_ptszWinampSong; -HANDLE hTTBButton = 0, h_statusmodechange; -HWND hwndSAMsgDialog; -static HANDLE *hProtoStatusMenuItem; - -PLUGININFOEX pluginInfo = { - sizeof(PLUGININFOEX), - "Simple Status Message", - PLUGIN_MAKE_VERSION(1, 9, 0, 4), - "Provides a simple way to set status and away messages", - "Bartosz 'Dezeath' Bia³ek, Harven", - "dezred"/*antispam*/"@"/*antispam*/"gmail"/*antispam*/"."/*antispam*/"com", - "© 2006-2011 Bartosz Bia³ek, © 2005 Harven", - "http://code.google.com/p/dezeath", - UNICODE_AWARE, - // {768CE156-34AC-45a3-B53B-0083C47615C4} - { 0x768ce156, 0x34ac, 0x45a3, { 0xb5, 0x3b, 0x0, 0x83, 0xc4, 0x76, 0x15, 0xc4 } } -}; - -BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) -{ - g_hInst = hinstDLL; - return TRUE; -} - -extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion) -{ - return &pluginInfo; -} - -extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = {MIID_SRAWAY, MIID_LAST}; - -#ifdef _DEBUG -void log2file(const char *fmt, ...) -{ - DWORD dwBytesWritten; - va_list va; - char szText[1024]; - HANDLE hFile = CreateFileA("simplestatusmsg.log", GENERIC_WRITE, FILE_SHARE_READ, 0, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); - SetFilePointer(hFile, 0, 0, FILE_END); - - strncpy(szText, "[\0", SIZEOF(szText)); - WriteFile(hFile, szText, (DWORD)strlen(szText), &dwBytesWritten, NULL); - - GetTimeFormatA(LOCALE_USER_DEFAULT, 0, NULL, NULL, szText, SIZEOF(szText)); - WriteFile(hFile, szText, (DWORD)strlen(szText), &dwBytesWritten, NULL); - - strncpy(szText, "] \0", SIZEOF(szText)); - - va_start(va, fmt); - mir_vsnprintf(szText + strlen(szText), SIZEOF(szText) - strlen(szText), fmt, va); - va_end(va); - - WriteFile(hFile, szText, (DWORD)strlen(szText), &dwBytesWritten, NULL); - - strncpy(szText, "\n\0", SIZEOF(szText)); - WriteFile(hFile, szText, (DWORD)strlen(szText), &dwBytesWritten, NULL); - - CloseHandle(hFile); -} -#endif - -static TCHAR *GetWinampSong(void) -{ - TCHAR *szTitle, *pstr, *res = NULL; - HWND hwndWinamp = FindWindow(_T("STUDIO"), NULL); - int iTitleLen; - - if (hwndWinamp == NULL) - hwndWinamp = FindWindow(_T("Winamp v1.x"), NULL); - - if (hwndWinamp == NULL) - return NULL; - - iTitleLen = GetWindowTextLength(hwndWinamp); - szTitle = (TCHAR *)mir_alloc((iTitleLen + 1) * sizeof(TCHAR)); - if (szTitle == NULL) - return NULL; - - if (GetWindowText(hwndWinamp, szTitle, iTitleLen + 1) == 0) - { - mir_free(szTitle); - return NULL; - } - - pstr = _tcsstr(szTitle, _T(" - Winamp")); - if (pstr == NULL) - { - mir_free(szTitle); - return NULL; - } - - if (pstr < szTitle + (iTitleLen / 2)) - { - MoveMemory(szTitle, pstr + 9, _tcslen(pstr + 9) * sizeof(TCHAR)); - pstr = _tcsstr(pstr + 1, _T(" - Winamp")); - if (pstr == NULL) - { - mir_free(szTitle); - return NULL; - } - } - *pstr = 0; - - pstr = _tcschr(szTitle, _T('.')); - if (pstr == NULL) - { - mir_free(szTitle); - return NULL; - } - - pstr += 2; - res = mir_tstrdup(pstr); - mir_free(szTitle); - - return res; -} - -TCHAR *InsertBuiltinVarsIntoMsg(TCHAR *in, const char *szProto, int status) -{ - int i, count = 0, len; - TCHAR substituteStr[1024], *msg = mir_tstrdup(in); - - for (i = 0; msg[i]; i++) - { - if (msg[i] == 0x0D && DBGetContactSettingByte(NULL, "SimpleStatusMsg", "RemoveCR", 0)) - { - TCHAR *p = msg + i; - if (i + 1 <= 1024 && msg[i + 1]) - { - if (msg[i + 1] == 0x0A) - { - if (i + 2 <= 1024 && msg[i + 2]) - { - count++; - MoveMemory(p, p + 1, (lstrlen(p) - 1) * sizeof(TCHAR)); - } - else - { - msg[i + 1] = 0; - msg[i] = 0x0A; - } - } - } - } - - if (msg[i] != '%') - continue; - - if (!_tcsnicmp(msg+i, _T("%winampsong%"), 12)) - { - TCHAR *ptszWinampTitle = GetWinampSong(); - - if (ptszWinampTitle != NULL) - { - mir_free(g_ptszWinampSong); - g_ptszWinampSong = mir_tstrdup(ptszWinampTitle); - } - else if (g_ptszWinampSong && lstrcmp(g_ptszWinampSong, _T("SimpleStatusMsg")) - && DBGetContactSettingByte(NULL, "SimpleStatusMsg", "AmpLeaveTitle", 1)) - { - ptszWinampTitle = mir_tstrdup(g_ptszWinampSong); - } - else - continue; - - if (lstrlen(ptszWinampTitle) > 12) - msg = (TCHAR *)mir_realloc(msg, (lstrlen(msg) + 1 + lstrlen(ptszWinampTitle) - 12) * sizeof(TCHAR)); - - MoveMemory(msg + i + lstrlen(ptszWinampTitle), msg + i + 12, (lstrlen(msg) - i - 11) * sizeof(TCHAR)); - CopyMemory(msg + i, ptszWinampTitle, lstrlen(ptszWinampTitle) * sizeof(TCHAR)); - - mir_free(ptszWinampTitle); - } - else if (!_tcsnicmp(msg+i, _T("%fortunemsg%"), 12)) - { - TCHAR *FortuneMsg; - - char *FortuneMsgA; - - - if (!ServiceExists(MS_FORTUNEMSG_GETMESSAGE)) - continue; - - - FortuneMsgA = (char*)CallService(MS_FORTUNEMSG_GETMESSAGE, 0, 0); - FortuneMsg = mir_a2u(FortuneMsgA); - - if (lstrlen(FortuneMsg) > 12) - msg = (TCHAR *)mir_realloc(msg, (lstrlen(msg) + 1 + lstrlen(FortuneMsg) - 12) * sizeof(TCHAR)); - - MoveMemory(msg + i + lstrlen(FortuneMsg), msg + i + 12, (lstrlen(msg) - i - 11) * sizeof(TCHAR)); - CopyMemory(msg + i, FortuneMsg, lstrlen(FortuneMsg) * sizeof(TCHAR)); - - - mir_free(FortuneMsg); - CallService(MS_FORTUNEMSG_FREEMEMORY, 0, (LPARAM)FortuneMsgA); - - } - else if (!_tcsnicmp(msg+i, _T("%protofortunemsg%"), 17)) - { - TCHAR *FortuneMsg; - - char *FortuneMsgA; - - - if (!ServiceExists(MS_FORTUNEMSG_GETPROTOMSG)) - continue; - - - FortuneMsgA = (char*)CallService(MS_FORTUNEMSG_GETPROTOMSG, (WPARAM)szProto, 0); - FortuneMsg = mir_a2u(FortuneMsgA); - - - if (lstrlen(FortuneMsg) > 17) - msg = (TCHAR *)mir_realloc(msg, (lstrlen(msg) + 1 + lstrlen(FortuneMsg) - 17) * sizeof(TCHAR)); - - MoveMemory(msg + i + lstrlen(FortuneMsg), msg + i + 17, (lstrlen(msg) - i - 16) * sizeof(TCHAR)); - CopyMemory(msg + i, FortuneMsg, lstrlen(FortuneMsg) * sizeof(TCHAR)); - - - mir_free(FortuneMsg); - CallService(MS_FORTUNEMSG_FREEMEMORY, 0, (LPARAM)FortuneMsgA); - - } - else if (!_tcsnicmp(msg+i, _T("%statusfortunemsg%"), 18)) - { - TCHAR *FortuneMsg; - - char *FortuneMsgA; - - - if (!ServiceExists(MS_FORTUNEMSG_GETSTATUSMSG)) - continue; - - - FortuneMsgA = (char*)CallService(MS_FORTUNEMSG_GETSTATUSMSG, (WPARAM)status, 0); - FortuneMsg = mir_a2u(FortuneMsgA); - - - if (lstrlen(FortuneMsg) > 18) - msg = (TCHAR *)mir_realloc(msg, (lstrlen(msg) + 1 + lstrlen(FortuneMsg) - 18) * sizeof(TCHAR)); - - MoveMemory(msg + i + lstrlen(FortuneMsg), msg + i + 18, (lstrlen(msg) - i - 17) * sizeof(TCHAR)); - CopyMemory(msg + i, FortuneMsg, lstrlen(FortuneMsg) * sizeof(TCHAR)); - - - mir_free(FortuneMsg); - CallService(MS_FORTUNEMSG_FREEMEMORY, 0, (LPARAM)FortuneMsgA); - - } - else if (!_tcsnicmp(msg + i, _T("%time%"), 6)) - { - MIRANDA_IDLE_INFO mii = {0}; - mii.cbSize = sizeof(mii); - CallService(MS_IDLE_GETIDLEINFO, 0, (LPARAM)&mii); - - if (mii.idleType) - { - int mm; - SYSTEMTIME t; - GetLocalTime(&t); - if ((mm = g_iIdleTime) == -1) - { - mm = t.wMinute + t.wHour * 60; - if (mii.idleType == 1) - { - mm -= mii.idleTime; - if (mm < 0) mm += 60 * 24; - } - g_iIdleTime = mm; - } - t.wMinute = mm % 60; - t.wHour = mm / 60; - GetTimeFormat(LOCALE_USER_DEFAULT, TIME_NOSECONDS, &t, NULL, substituteStr, SIZEOF(substituteStr)); - } - else GetTimeFormat(LOCALE_USER_DEFAULT, TIME_NOSECONDS, NULL, NULL, substituteStr, SIZEOF(substituteStr)); - - if (lstrlen(substituteStr) > 6) - msg = (TCHAR *)mir_realloc(msg, (lstrlen(msg) + 1 + lstrlen(substituteStr) - 6) * sizeof(TCHAR)); - - MoveMemory(msg + i + lstrlen(substituteStr), msg + i + 6, (lstrlen(msg) - i - 5) * sizeof(TCHAR)); - CopyMemory(msg + i, substituteStr, lstrlen(substituteStr) * sizeof(TCHAR)); - } - else if (!_tcsnicmp(msg + i, _T("%date%"), 6)) - { - GetDateFormat(LOCALE_USER_DEFAULT, DATE_SHORTDATE, NULL, NULL, substituteStr, SIZEOF(substituteStr)); - - if (lstrlen(substituteStr) > 6) - msg = (TCHAR *)mir_realloc(msg, (lstrlen(msg) + 1 + lstrlen(substituteStr) - 6) * sizeof(TCHAR)); - - MoveMemory(msg + i + lstrlen(substituteStr), msg + i + 6, (lstrlen(msg) - i - 5) * sizeof(TCHAR)); - CopyMemory(msg + i, substituteStr, lstrlen(substituteStr) * sizeof(TCHAR)); - } - else if (!_tcsnicmp(msg+i, _T("%rand("), 6)) - { - TCHAR *temp, *token; - int ran_from, ran_to, k; - - temp = mir_tstrdup(msg + i + 6); - token = _tcstok(temp, _T(",)")); - ran_from = _ttoi(token); - token = _tcstok(NULL, _T(",)%%")); - ran_to = _ttoi(token); - - if (ran_to > ran_from) - { - mir_sntprintf(substituteStr, SIZEOF(substituteStr), _T("%d"), GetRandom(ran_from, ran_to)); - for (k = i + 1; msg[k]; k++) if (msg[k] == '%') { k++; break; } - - if (lstrlen(substituteStr) > k - i) - msg = (TCHAR *)mir_realloc(msg, (lstrlen(msg) + 1 + lstrlen(substituteStr) - (k - i)) * sizeof(TCHAR)); - - MoveMemory(msg + i + lstrlen(substituteStr), msg + i + (k - i), (lstrlen(msg) - i - (k - i - 1)) * sizeof(TCHAR)); - CopyMemory(msg + i, substituteStr, lstrlen(substituteStr) * sizeof(TCHAR)); - } - mir_free(temp); - } - else if (!_tcsnicmp(msg+i, _T("%randmsg%"), 9)) - { - char buff[16]; - int k, maxk, k2 = 0; - DBVARIANT dbv; - BOOL rmark[25]; - - for (k = 0; k < 26; k++) rmark[k] = FALSE; - maxk = DBGetContactSettingByte(NULL, "SimpleStatusMsg", "MaxHist", 10); - if (maxk == 0) rmark[0] = TRUE; - - while (!rmark[0]) - { - k = GetRandom(1, maxk); - if (rmark[k]) continue; - rmark[k] = TRUE; - k2++; - if (k2 == maxk || k2 > maxk) rmark[0] = TRUE; - - mir_snprintf(buff, SIZEOF(buff), "SMsg%d", k); - if (!DBGetContactSettingTString(NULL, "SimpleStatusMsg", buff, &dbv)) - { - if (dbv.ptszVal == NULL) - { - DBFreeVariant(&dbv); - continue; - } - lstrcpy(substituteStr, dbv.ptszVal); - DBFreeVariant(&dbv); - } - else continue; - - if (!lstrlen(substituteStr)) continue; - if (_tcsstr(substituteStr, _T("%randmsg%")) != NULL || _tcsstr(substituteStr, _T("%randdefmsg%")) != NULL) - { - if (k == maxk) maxk--; - } - else rmark[0] = TRUE; - } - - if (k2 == maxk || k2 > maxk) lstrcpy(substituteStr, _T("")); - - if (lstrlen(substituteStr) > 9) - msg = (TCHAR *)mir_realloc(msg, (lstrlen(msg) + 1 + lstrlen(substituteStr) - 9) * sizeof(TCHAR)); - - MoveMemory(msg + i + lstrlen(substituteStr), msg + i + 9, (lstrlen(msg) - i - 8) * sizeof(TCHAR)); - CopyMemory(msg + i, substituteStr, lstrlen(substituteStr) * sizeof(TCHAR)); - } - else if (!_tcsnicmp(msg+i, _T("%randdefmsg%"), 12)) - { - char buff[16]; - int k, maxk, k2 = 0; - DBVARIANT dbv; - BOOL rmark[25]; - - for (k = 0; k < 26; k++) rmark[k] = FALSE; - maxk = DBGetContactSettingWord(NULL, "SimpleStatusMsg", "DefMsgCount", 0); - if (maxk == 0) rmark[0] = TRUE; - - while (!rmark[0]) - { - k = GetRandom(1, maxk); - if (rmark[k]) continue; - rmark[k] = TRUE; - k2++; - if (k2 == maxk || k2 > maxk) rmark[0] = TRUE; - - mir_snprintf(buff, SIZEOF(buff), "DefMsg%d", k); - if (!DBGetContactSettingTString(NULL, "SimpleStatusMsg", buff, &dbv)) - { - if (dbv.ptszVal == NULL) - { - DBFreeVariant(&dbv); - continue; - } - lstrcpy(substituteStr, dbv.ptszVal); - DBFreeVariant(&dbv); - } - else continue; - - if (!lstrlen(substituteStr)) continue; - if (_tcsstr(substituteStr, _T("%randmsg%")) != NULL || _tcsstr(substituteStr, _T("%randdefmsg%")) != NULL) - { - if (k == maxk) maxk--; - } - else rmark[0] = TRUE; - } - - if (k2 == maxk || k2 > maxk) lstrcpy(substituteStr, _T("")); - - if (lstrlen(substituteStr) > 12) - msg = (TCHAR *)mir_realloc(msg, (lstrlen(msg)+1+lstrlen(substituteStr)-12) * sizeof(TCHAR)); - - MoveMemory(msg + i + lstrlen(substituteStr), msg + i + 12, (lstrlen(msg) - i - 11) * sizeof(TCHAR)); - CopyMemory(msg + i, substituteStr, lstrlen(substituteStr) * sizeof(TCHAR)); - } - } - - if (count) msg[lstrlen(msg) - count] = 0; - - if (szProto) - { - char szSetting[80]; - mir_snprintf(szSetting, SIZEOF(szSetting), "Proto%sMaxLen", szProto); - len = DBGetContactSettingWord(NULL, "SimpleStatusMsg", szSetting, 1024); - if (len < lstrlen(msg)) - { - msg = (TCHAR *)mir_realloc(msg, len * sizeof(TCHAR)); - msg[len] = 0; - } - } - - return msg; -} - -TCHAR *InsertVarsIntoMsg(TCHAR *tszMsg, const char *szProto, int iStatus, HANDLE hContact) -{ - if (ServiceExists(MS_VARS_FORMATSTRING) && DBGetContactSettingByte(NULL, "SimpleStatusMsg", "EnableVariables", 1)) - { - FORMATINFO fInfo = {0}; - fInfo.cbSize = sizeof(fInfo); - fInfo.flags = FIF_TCHAR; - fInfo.tszFormat = tszMsg; - fInfo.hContact = hContact; - TCHAR *tszVarsMsg = (TCHAR *)CallService(MS_VARS_FORMATSTRING, (WPARAM)&fInfo, 0); - if (tszVarsMsg != NULL) - { - TCHAR *format = InsertBuiltinVarsIntoMsg(tszVarsMsg, szProto, iStatus); - CallService(MS_VARS_FREEMEMORY, (WPARAM)tszVarsMsg, 0); - return format; - } - } - - return InsertBuiltinVarsIntoMsg(tszMsg, szProto, iStatus); -} - -static TCHAR *GetAwayMessageFormat(int iStatus, const char *szProto) -{ - DBVARIANT dbv, dbv2; - int flags; - char szSetting[80]; - TCHAR *format; - - mir_snprintf(szSetting, SIZEOF(szSetting), "%sFlags", szProto ? szProto : ""); - flags = DBGetContactSettingByte(NULL, "SimpleStatusMsg", (char *)StatusModeToDbSetting(iStatus, szSetting), STATUS_DEFAULT); - - if (flags & STATUS_EMPTY_MSG) - return mir_tstrdup(_T("")); - - if (flags & STATUS_LAST_STATUS_MSG) - { - if (szProto) - mir_snprintf(szSetting, SIZEOF(szSetting), "%sMsg", szProto); - else - mir_snprintf(szSetting, SIZEOF(szSetting), "Msg"); - - if (DBGetContactSettingTString(NULL, "SRAway", StatusModeToDbSetting(iStatus, szSetting), &dbv)) - return NULL; //mir_tstrdup(_T("")); - - format = mir_tstrdup(dbv.ptszVal); - DBFreeVariant(&dbv); - } - else if (flags & STATUS_LAST_MSG) - { - if (szProto) - mir_snprintf(szSetting, SIZEOF(szSetting), "Last%sMsg", szProto); - else - mir_snprintf(szSetting, SIZEOF(szSetting), "LastMsg"); - - if (DBGetContactSetting(NULL, "SimpleStatusMsg", szSetting, &dbv2)) - return NULL; //mir_tstrdup(_T("")); - - if (DBGetContactSettingTString(NULL, "SimpleStatusMsg", dbv2.pszVal, &dbv)) - { - DBFreeVariant(&dbv2); - return NULL; //mir_tstrdup(_T("")); - } - - format = mir_tstrdup(dbv.ptszVal); - DBFreeVariant(&dbv); - DBFreeVariant(&dbv2); - } - else if (flags & STATUS_THIS_MSG) - { - if (szProto) - mir_snprintf(szSetting, SIZEOF(szSetting), "%sDefault", szProto); - else - mir_snprintf(szSetting, SIZEOF(szSetting), "Default"); - - if (DBGetContactSettingTString(NULL, "SRAway", StatusModeToDbSetting(iStatus, szSetting), &dbv)) - return mir_tstrdup(_T("")); - - format = mir_tstrdup(dbv.ptszVal); - DBFreeVariant(&dbv); - } - else - format = mir_tstrdup(GetDefaultMessage(iStatus)); - - return format; -} - -void DBWriteMessage(char *szSetting, TCHAR *tszMsg) -{ - if (tszMsg && lstrlen(tszMsg)) - DBWriteContactSettingTString(NULL, "SimpleStatusMsg", szSetting, tszMsg); - else - DBDeleteContactSetting(NULL, "SimpleStatusMsg", szSetting); -} - -void SaveMessageToDB(const char *szProto, TCHAR *tszMsg, BOOL bIsFormat) -{ - char szSetting[80]; - - if (!szProto) - { - for (int i = 0; i < accounts->count; ++i) - { - if (!IsAccountEnabled(accounts->pa[i])) - continue; - - if (!CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_3, 0)) - continue; - - if (!(CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_MODEMSGSEND)) - continue; - - mir_snprintf(szSetting, SIZEOF(szSetting), bIsFormat ? "FCur%sMsg" : "Cur%sMsg", accounts->pa[i]->szModuleName); - DBWriteMessage(szSetting, tszMsg); -#ifdef _DEBUG - if (bIsFormat) - log2file("SaveMessageToDB(): Set \"" TCHAR_STR_PARAM "\" status message (without inserted vars) for %s.", tszMsg, accounts->pa[i]->szModuleName); - else - log2file("SaveMessageToDB(): Set \"" TCHAR_STR_PARAM "\" status message for %s.", tszMsg, accounts->pa[i]->szModuleName); -#endif - } - } - else - { - if (!(CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_MODEMSGSEND)) - return; - - mir_snprintf(szSetting, SIZEOF(szSetting), bIsFormat ? "FCur%sMsg" : "Cur%sMsg", szProto); - DBWriteMessage(szSetting, tszMsg); -#ifdef _DEBUG - if (bIsFormat) - log2file("SaveMessageToDB(): Set \"" TCHAR_STR_PARAM "\" status message (without inserted vars) for %s.", tszMsg, szProto); - else - log2file("SaveMessageToDB(): Set \"" TCHAR_STR_PARAM "\" status message for %s.", tszMsg, szProto); -#endif - } -} - -void SaveStatusAsCurrent(const char *szProto, int iStatus) -{ - char szSetting[80]; - mir_snprintf(szSetting, SIZEOF(szSetting), "Cur%sStatus", szProto); - DBWriteContactSettingWord(NULL, "SimpleStatusMsg", szSetting, (WORD)iStatus); -} - -static TCHAR *GetAwayMessage(int iStatus, const char *szProto, BOOL bInsertVars, HANDLE hContact) -{ - TCHAR *format = NULL; - char szSetting[80]; - - if ((!iStatus || iStatus == ID_STATUS_CURRENT) && szProto) - { - DBVARIANT dbv; - mir_snprintf(szSetting, SIZEOF(szSetting), "FCur%sMsg", szProto); - if (!DBGetContactSettingTString(NULL, "SimpleStatusMsg", szSetting, &dbv)) - { - format = mir_tstrdup(dbv.ptszVal); - DBFreeVariant(&dbv); - } - //else - // format = mir_tstrdup(_T("")); - } - else - { - int flags; - - if (!iStatus || iStatus == ID_STATUS_CURRENT) - iStatus = GetCurrentStatus(szProto); - - if (szProto && !(CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_3, 0) & Proto_Status2Flag(iStatus))) - return NULL; - - mir_snprintf(szSetting, SIZEOF(szSetting), "Proto%sFlags", szProto ? szProto : ""); - flags = DBGetContactSettingByte(NULL, "SimpleStatusMsg", szSetting, PROTO_DEFAULT); - - //if (flags & PROTO_NO_MSG) - //{ - // format = mir_tstrdup(_T("")); - //} - //else - if (flags & PROTO_THIS_MSG) - { - DBVARIANT dbv; - mir_snprintf(szSetting, SIZEOF(szSetting), "Proto%sDefault", szProto); - if (!DBGetContactSettingTString(NULL, "SimpleStatusMsg", szSetting, &dbv)) - { - format = mir_tstrdup(dbv.ptszVal); - DBFreeVariant(&dbv); - } - else - format = mir_tstrdup(_T("")); - } - else if (flags & PROTO_NOCHANGE && szProto) - { - DBVARIANT dbv; - mir_snprintf(szSetting, SIZEOF(szSetting), "FCur%sMsg", szProto); - if (!DBGetContactSettingTString(NULL, "SimpleStatusMsg", szSetting, &dbv)) - { - format = mir_tstrdup(dbv.ptszVal); - DBFreeVariant(&dbv); - } - //else - // format = mir_tstrdup(_T("")); - } - else if (flags & PROTO_POPUPDLG) - format = GetAwayMessageFormat(iStatus, szProto); - } -#ifdef _DEBUG - log2file("GetAwayMessage(): %s has %s status and \"" TCHAR_STR_PARAM "\" status message.", szProto, StatusModeToDbSetting(iStatus, ""), format); -#endif - - if (bInsertVars && format != NULL) - { - TCHAR *tszVarsMsg = InsertVarsIntoMsg(format, szProto, iStatus, hContact); // TODO random values not the same! - mir_free(format); - return tszVarsMsg; - } - - return format; -} - -int CheckProtoSettings(const char *szProto, int iInitialStatus) -{ - int iSetting = DBGetContactSettingWord(NULL, szProto, "LeaveStatus", -1); //GG settings - if (iSetting != -1) - return iSetting ? iSetting : iInitialStatus; - iSetting = DBGetContactSettingWord(NULL, szProto, "OfflineMessageOption", -1); //TLEN settings - if (iSetting != -1) - { - switch (iSetting) - { - case 1: return ID_STATUS_ONLINE; - case 2: return ID_STATUS_AWAY; - case 3: return ID_STATUS_NA; - case 4: return ID_STATUS_DND; - case 5: return ID_STATUS_FREECHAT; - case 6: return ID_STATUS_INVISIBLE; - default: return iInitialStatus; - } - } - return iInitialStatus; -} - -static void Proto_SetAwayMsgT(const char *szProto, int iStatus, TCHAR *tszMsg) -{ - if (!(CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_INDIVMODEMSG)) - { - - if (CallProtoService(szProto, PS_SETAWAYMSGW, (WPARAM)iStatus, (LPARAM)tszMsg) == CALLSERVICE_NOTFOUND) - { - char *szMsg = mir_u2a(tszMsg); - CallProtoService(szProto, PS_SETAWAYMSG, (WPARAM)iStatus, (LPARAM)szMsg); - mir_free(szMsg); - } - - } -} - -static void Proto_SetStatus(const char *szProto, int iInitialStatus, int iStatus, TCHAR *tszMsg) -{ - if (iStatus == ID_STATUS_OFFLINE && iStatus != iInitialStatus) - { - // ugly hack to set offline status message - if (!(CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_INDIVMODEMSG)) - { - int iMsgStatus = CheckProtoSettings(szProto, iInitialStatus); - - if (CallProtoService(szProto, PS_SETAWAYMSGW, (WPARAM)iMsgStatus, (LPARAM)tszMsg) == CALLSERVICE_NOTFOUND) - { - char *szMsg = mir_u2a(tszMsg); - CallProtoService(szProto, PS_SETAWAYMSG, (WPARAM)iMsgStatus, (LPARAM)szMsg); - mir_free(szMsg); - } - - CallProtoService(szProto, PS_SETSTATUS, (WPARAM)iMsgStatus, 0); - } - if (ServiceExists(MS_KS_ANNOUNCESTATUSCHANGE)) - announce_status_change((char*)szProto, ID_STATUS_OFFLINE, NULL); - CallProtoService(szProto, PS_SETSTATUS, ID_STATUS_OFFLINE, 0); - return; - } - - Proto_SetAwayMsgT(szProto, iStatus, tszMsg /* ? tszMsg : _T("")*/); - if (iStatus != iInitialStatus) - CallProtoService(szProto, PS_SETSTATUS, iStatus, 0); -} - -int HasProtoStaticStatusMsg(const char *szProto, int iInitialStatus, int iStatus) -{ - char szSetting[80]; - int flags; - - mir_snprintf(szSetting, SIZEOF(szSetting), "Proto%sFlags", szProto); - flags = DBGetContactSettingByte(NULL, "SimpleStatusMsg", szSetting, PROTO_DEFAULT); - - if (flags & PROTO_NO_MSG) - { - Proto_SetStatus(szProto, iInitialStatus, iStatus, NULL); - SaveMessageToDB(szProto, NULL, TRUE); - SaveMessageToDB(szProto, NULL, FALSE); - return 1; - } - else if (flags & PROTO_THIS_MSG) - { - DBVARIANT dbv; - TCHAR *msg; - - mir_snprintf(szSetting, SIZEOF(szSetting), "Proto%sDefault", szProto); - if (!DBGetContactSettingTString(NULL, "SimpleStatusMsg", szSetting, &dbv)) - { - SaveMessageToDB(szProto, dbv.ptszVal, TRUE); - msg = InsertVarsIntoMsg(dbv.ptszVal, szProto, iStatus, NULL); - DBFreeVariant(&dbv); - Proto_SetStatus(szProto, iInitialStatus, iStatus, msg); - SaveMessageToDB(szProto, msg, FALSE); - mir_free(msg); - } - else - { - Proto_SetStatus(szProto, iInitialStatus, iStatus, _T("")); - SaveMessageToDB(szProto, _T(""), TRUE); - SaveMessageToDB(szProto, _T(""), FALSE); - } - return 1; - } - return 0; -} - -INT_PTR SetStatusModeFromExtern(WPARAM wParam, LPARAM lParam) -{ - if ((wParam < ID_STATUS_OFFLINE && wParam != 0) || (wParam > ID_STATUS_OUTTOLUNCH && wParam != ID_STATUS_CURRENT)) - return 0; - - int newStatus = (int)wParam; - - for (int i = 0; i < accounts->count; ++i) - { - if (!IsAccountEnabled(accounts->pa[i])) - continue; - - if (!(CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_2, 0) &~ CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_5, 0))) - continue; - - if (DBGetContactSettingByte(NULL, accounts->pa[i]->szModuleName, "LockMainStatus", 0)) - continue; - - if (wParam == ID_STATUS_CURRENT || wParam == 0) - newStatus = GetCurrentStatus(accounts->pa[i]->szModuleName); - - if (!(CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_MODEMSGSEND)) - { - CallProtoService(accounts->pa[i]->szModuleName, PS_SETSTATUS, newStatus, 0); - continue; - } - - int status_modes_msg = CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_3, 0); - - if ((Proto_Status2Flag(newStatus) & status_modes_msg) || (newStatus == ID_STATUS_OFFLINE && (Proto_Status2Flag(ID_STATUS_INVISIBLE) & status_modes_msg))) - { - TCHAR *msg = NULL; - - if (HasProtoStaticStatusMsg(accounts->pa[i]->szModuleName, GetCurrentStatus(accounts->pa[i]->szModuleName), newStatus)) - continue; - - if (lParam) - msg = InsertVarsIntoMsg((TCHAR *)lParam, accounts->pa[i]->szModuleName, newStatus, NULL); - - SaveMessageToDB(accounts->pa[i]->szModuleName, (TCHAR *)lParam, TRUE); - SaveMessageToDB(accounts->pa[i]->szModuleName, msg, FALSE); - Proto_SetStatus(accounts->pa[i]->szModuleName, GetCurrentStatus(accounts->pa[i]->szModuleName), newStatus, msg /*? msg : _T("")*/); - mir_free(msg); - } - else - CallProtoService(accounts->pa[i]->szModuleName, PS_SETSTATUS, newStatus, 0); - } - - return 0; -} - -int ChangeStatusMessage(WPARAM wParam, LPARAM lParam); - -void SetStatusMessage(const char *szProto, int iInitialStatus, int iStatus, TCHAR *message, BOOL bOnStartup) -{ - TCHAR *msg = NULL; -#ifdef _DEBUG - log2file("SetStatusMessage(\"%s\", %d, %d, \"" TCHAR_STR_PARAM "\", %d)", szProto, iInitialStatus, iStatus, message, bOnStartup); -#endif - if (szProto) - { - if (bOnStartup && accounts->statusCount > 1) // TODO not only at startup? - { - int status; - for (int i = 0; i < accounts->count; ++i) - { - if (!IsAccountEnabled(accounts->pa[i])) - continue; - - if (!(CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_2, 0)&~CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_5, 0))) - continue; - - status = iStatus == ID_STATUS_CURRENT ? GetStartupStatus(accounts->pa[i]->szModuleName) : iStatus; - - if (!CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_3, 0) || - !(CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_MODEMSGSEND)) - { - if (!(bOnStartup && status == ID_STATUS_OFFLINE) && GetCurrentStatus(accounts->pa[i]->szModuleName) != status) - CallProtoService(accounts->pa[i]->szModuleName, PS_SETSTATUS, (WPARAM)status, 0); - } - } - } - - if (message) - msg = InsertVarsIntoMsg(message, szProto, iStatus, NULL); - - SaveMessageToDB(szProto, message, TRUE); - SaveMessageToDB(szProto, msg, FALSE); - - if (iInitialStatus == ID_STATUS_CURRENT) - iInitialStatus = bOnStartup ? ID_STATUS_OFFLINE : GetCurrentStatus(szProto); - - Proto_SetStatus(szProto, iInitialStatus, iStatus, msg); - mir_free(msg); - } - else - { - int iProfileStatus = iStatus > ID_STATUS_CURRENT ? iStatus : 0; - BOOL bIsStatusCurrent = iStatus == ID_STATUS_CURRENT; - BOOL bIsInitialStatusCurrent = iInitialStatus == ID_STATUS_CURRENT; - - for (int i = 0; i < accounts->count; ++i) - { - if (!IsAccountEnabled(accounts->pa[i])) - continue; - - if (!(CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_2, 0)&~CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_5, 0))) - continue; - - if (!bOnStartup && DBGetContactSettingByte(NULL, accounts->pa[i]->szModuleName, "LockMainStatus", 0)) - continue; - - if (iProfileStatus) - { - int iProfileNumber = iStatus - 40083; - char szSetting[128]; - mir_snprintf(szSetting, SIZEOF(szSetting), "%d_%s", iProfileNumber, accounts->pa[i]->szModuleName); - iStatus = DBGetContactSettingWord(NULL, "StartupStatus", szSetting, ID_STATUS_OFFLINE); - if (iStatus == ID_STATUS_IDLE) // the same as ID_STATUS_LAST in StartupStatus - { - mir_snprintf(szSetting, SIZEOF(szSetting), "last_%s", accounts->pa[i]->szModuleName); - iStatus = DBGetContactSettingWord(NULL, "StartupStatus", szSetting, ID_STATUS_OFFLINE); - } - else if (iStatus == ID_STATUS_CURRENT) - iStatus = GetCurrentStatus(accounts->pa[i]->szModuleName); - } - - if (bIsStatusCurrent) - iStatus = bOnStartup ? GetStartupStatus(accounts->pa[i]->szModuleName) : GetCurrentStatus(accounts->pa[i]->szModuleName); - - if (bIsInitialStatusCurrent) - iInitialStatus = bOnStartup ? ID_STATUS_OFFLINE : GetCurrentStatus(accounts->pa[i]->szModuleName); - - if (!(CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_3, 0) & Proto_Status2Flag(iStatus)) || - !(CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_MODEMSGSEND)) - { - if (!(bOnStartup && iStatus == ID_STATUS_OFFLINE) && GetCurrentStatus(accounts->pa[i]->szModuleName) != iStatus && iStatus != iInitialStatus) - { - CallProtoService(accounts->pa[i]->szModuleName, PS_SETSTATUS, (WPARAM)iStatus, 0); -#ifdef _DEBUG - log2file("SetStatusMessage(): Set %s status for %s.", StatusModeToDbSetting(iStatus, ""), accounts->pa[i]->szModuleName); -#endif - } - continue; - } - - if (HasProtoStaticStatusMsg(accounts->pa[i]->szModuleName, iInitialStatus, iStatus)) - continue; - - if (message) - msg = InsertVarsIntoMsg(message, accounts->pa[i]->szModuleName, iStatus, NULL); - - SaveMessageToDB(accounts->pa[i]->szModuleName, message, TRUE); - SaveMessageToDB(accounts->pa[i]->szModuleName, msg, FALSE); - - Proto_SetStatus(accounts->pa[i]->szModuleName, iInitialStatus, iStatus, msg); - mir_free(msg); - } - - if (GetCurrentStatus(NULL) != iStatus && !bIsStatusCurrent && !iProfileStatus) - { - // not so nice... - UnhookEvent(h_statusmodechange); - CallService(MS_CLIST_SETSTATUSMODE, (WPARAM)iStatus, 0); - h_statusmodechange = HookEvent(ME_CLIST_STATUSMODECHANGE, ChangeStatusMessage); - } - } -} - -INT_PTR ShowStatusMessageDialogInternal(WPARAM wParam, LPARAM lParam) -{ - struct MsgBoxInitData *box_data; - BOOL idvstatusmsg = FALSE; - - if (Miranda_Terminated()) return 0; - - if (hTTBButton) - { - CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)hTTBButton, (LPARAM)TTBST_RELEASED); - CallService(MS_TTB_SETBUTTONOPTIONS, MAKEWPARAM((WORD)TTBO_TIPNAME, (WORD)hTTBButton), (LPARAM)Translate("Change Status Message")); - } - - box_data = (struct MsgBoxInitData *)mir_alloc(sizeof(struct MsgBoxInitData)); - - if (accounts->statusMsgCount == 1) - { - for (int i = 0; i < accounts->count; ++i) - { - if (!IsAccountEnabled(accounts->pa[i])) - continue; - - if (!CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_3, 0)) - continue; - - if (!(CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_MODEMSGSEND)) - continue; - - box_data->m_szProto = accounts->pa[i]->szModuleName; - box_data->m_iStatusModes = CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_2, 0)&~CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_5, 0); - box_data->m_iStatusMsgModes = CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_3, 0); - break; - } - } - else - { - for (int i = 0; i < accounts->count; ++i) - { - if (!IsAccountEnabled(accounts->pa[i])) - continue; - - if (!CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_3, 0)) - continue; - - if (!(CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_MODEMSGSEND)) - continue; - - if (!accounts->pa[i]->bIsVisible) - continue; - - if (hProtoStatusMenuItem[i] == (HANDLE)lParam) - { - box_data->m_szProto = accounts->pa[i]->szModuleName; - box_data->m_iStatusModes = CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_2, 0)&~CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_5, 0); - box_data->m_iStatusMsgModes = CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_3, 0); - - idvstatusmsg = TRUE; - break; - } - } - if (!idvstatusmsg) - { - box_data->m_szProto = NULL; - box_data->m_iStatusModes = accounts->statusFlags; - box_data->m_iStatusMsgModes = accounts->statusMsgFlags; - } - } - box_data->m_iStatus = ID_STATUS_CURRENT; - box_data->m_bOnEvent = FALSE; - box_data->m_bOnStartup = FALSE; - - if (hwndSAMsgDialog) - DestroyWindow(hwndSAMsgDialog); - hwndSAMsgDialog = CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_AWAYMSGBOX), NULL, AwayMsgBoxDlgProc, (LPARAM)box_data); - return 0; -} - -INT_PTR ShowStatusMessageDialog(WPARAM wParam, LPARAM lParam) -{ - struct MsgBoxInitData *box_data; - BOOL idvstatusmsg = FALSE; - - if (Miranda_Terminated()) return 0; - - box_data = (struct MsgBoxInitData *)mir_alloc(sizeof(struct MsgBoxInitData)); - - for (int i = 0; i < accounts->count; ++i) - { - if (!IsAccountEnabled(accounts->pa[i])) - continue; - - if (!CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_3, 0)) - continue; - - if (!(CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_MODEMSGSEND)) - continue; - - if (!accounts->pa[i]->bIsVisible) - continue; - - if (!strcmp(accounts->pa[i]->szModuleName, (char *)lParam)) - { - box_data->m_szProto = accounts->pa[i]->szModuleName; - box_data->m_iStatusModes = CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_2, 0)&~CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_5, 0); - box_data->m_iStatusMsgModes = CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_3, 0); - - idvstatusmsg = TRUE; - break; - } - } - if (!idvstatusmsg) - { - box_data->m_szProto = NULL; - box_data->m_iStatusModes = accounts->statusFlags; - box_data->m_iStatusMsgModes = accounts->statusMsgFlags; - } - box_data->m_iStatus = ID_STATUS_CURRENT; - box_data->m_bOnEvent = FALSE; - box_data->m_bOnStartup = FALSE; - - if (hwndSAMsgDialog) - DestroyWindow(hwndSAMsgDialog); - hwndSAMsgDialog = CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_AWAYMSGBOX), NULL, AwayMsgBoxDlgProc, (LPARAM)box_data); - - return 0; -} - -static int ChangeStatusMessage(WPARAM wParam, LPARAM lParam) -{ - int iStatus = (int)wParam; - char *szProto = (char*)lParam; - int iDlgFlags; - BOOL bShowDlg, bOnStartup = FALSE, bGlobalStartupStatus = TRUE, bScreenSaverRunning = FALSE; - char szSetting[80]; - - if (Miranda_Terminated()) return 0; - - // TODO this could be done better - if (szProto && !strcmp(szProto, "SimpleStatusMsgGlobalStartupStatus")) - { - szProto = NULL; - bOnStartup = TRUE; - } - - if (accounts->statusMsgCount == 1 && !szProto) - { - for (int i = 0; i < accounts->count; ++i) - { - if (!IsAccountEnabled(accounts->pa[i])) - continue; - - if (!CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_3, 0)) - continue; - - if (!(CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_MODEMSGSEND)) - continue; - - szProto = accounts->pa[i]->szModuleName; - if (bOnStartup && iStatus == ID_STATUS_CURRENT) - { - iStatus = GetStartupStatus(accounts->pa[i]->szModuleName); - bGlobalStartupStatus = FALSE; - } - break; - } - } - - mir_snprintf(szSetting, SIZEOF(szSetting), "%sFlags", szProto ? szProto : ""); - iDlgFlags = DBGetContactSettingByte(NULL, "SimpleStatusMsg", (char *)StatusModeToDbSetting(iStatus, szSetting), STATUS_DEFAULT); - bShowDlg = iDlgFlags & STATUS_SHOW_DLG || bOnStartup; - SystemParametersInfo(SPI_GETSCREENSAVERRUNNING, 0, &bScreenSaverRunning, 0); - - if (szProto) - { - struct MsgBoxInitData *box_data; - int status_modes = 0, status_modes_msg = 0, iProtoFlags; - - status_modes = CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_2, 0)&~CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_5, 0); - if (!(Proto_Status2Flag(iStatus) & status_modes) && iStatus != ID_STATUS_OFFLINE) - return 0; - - status_modes_msg = CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_3, 0); - if (!(Proto_Status2Flag(iStatus) & status_modes_msg) || !(CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_MODEMSGSEND)) - { - if (bOnStartup && GetCurrentStatus(szProto) != iStatus) - { - CallProtoService(szProto, PS_SETSTATUS, iStatus, 0); -#ifdef _DEBUG - log2file("ChangeStatusMessage(): Set %s status for %s.", StatusModeToDbSetting(iStatus, ""), szProto); -#endif - } - return 0; - } - - mir_snprintf(szSetting, SIZEOF(szSetting), "Proto%sFlags", szProto); - iProtoFlags = DBGetContactSettingByte(NULL, "SimpleStatusMsg", szSetting, PROTO_DEFAULT); - if (iProtoFlags & PROTO_NO_MSG || iProtoFlags & PROTO_THIS_MSG) - { - if (HasProtoStaticStatusMsg(szProto, iStatus, iStatus)) - return 1; - } - else if (iProtoFlags & PROTO_NOCHANGE && !bOnStartup) - { - DBVARIANT dbv; - TCHAR *msg = NULL; - - mir_snprintf(szSetting, SIZEOF(szSetting), "FCur%sMsg", szProto); - if (!DBGetContactSettingTString(NULL, "SimpleStatusMsg", szSetting, &dbv)) - { - msg = mir_tstrdup(dbv.ptszVal); - DBFreeVariant(&dbv); - } - //else - // msg = mir_tstrdup(_T("")); -#ifdef _DEBUG - log2file("ChangeStatusMessage(): Set %s status and \"" TCHAR_STR_PARAM "\" status message for %s.", StatusModeToDbSetting(iStatus, ""), msg, szProto); -#endif - SetStatusMessage(szProto, iStatus, iStatus, msg, FALSE); - if (msg) mir_free(msg); - return 1; - } - - if (!bShowDlg || bScreenSaverRunning) - { - TCHAR *msg = GetAwayMessageFormat(iStatus, szProto); -#ifdef _DEBUG - log2file("ChangeStatusMessage(): Set %s status and \"" TCHAR_STR_PARAM "\" status message for %s.", StatusModeToDbSetting(iStatus, ""), msg, szProto); -#endif - SetStatusMessage(szProto, iStatus, iStatus, msg, FALSE); - if (msg) mir_free(msg); - return 1; - } - - box_data = (struct MsgBoxInitData *) mir_alloc(sizeof(struct MsgBoxInitData)); - box_data->m_szProto = szProto; - - if (!bOnStartup) - SaveStatusAsCurrent(szProto, iStatus); - - if (GetCurrentStatus(szProto) == iStatus || (bOnStartup && !bGlobalStartupStatus)) - box_data->m_iStatus = ID_STATUS_CURRENT; - else - box_data->m_iStatus = iStatus; - - box_data->m_iStatusModes = status_modes; - box_data->m_iStatusMsgModes = status_modes_msg; - box_data->m_bOnEvent = TRUE; - box_data->m_bOnStartup = bOnStartup; - - if (hwndSAMsgDialog) - DestroyWindow(hwndSAMsgDialog); - hwndSAMsgDialog = CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_AWAYMSGBOX), NULL, AwayMsgBoxDlgProc, (LPARAM)box_data); - } - else - { - struct MsgBoxInitData *box_data; - int iProtoFlags; - - // iStatus == ID_STATUS_CURRENT only when bOnStartup == TRUE - if (iStatus == ID_STATUS_OFFLINE || (!(accounts->statusMsgFlags & Proto_Status2Flag(iStatus)) && iStatus != ID_STATUS_CURRENT)) - return 0; - - iProtoFlags = DBGetContactSettingByte(NULL, "SimpleStatusMsg", "ProtoFlags", PROTO_DEFAULT); - if (!bShowDlg || bScreenSaverRunning || (iProtoFlags & PROTO_NOCHANGE && !bOnStartup)) - { - TCHAR *msg = NULL; - for (int i = 0; i < accounts->count; ++i) - { - if (!IsAccountEnabled(accounts->pa[i])) - continue; - - if (!(CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_2, 0)&~CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_5, 0))) - continue; - - if (DBGetContactSettingByte(NULL, accounts->pa[i]->szModuleName, "LockMainStatus", 0)) - continue; - - if (!(CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_3, 0) & Proto_Status2Flag(iStatus)) || - !(CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_MODEMSGSEND)) - continue; - - if (iProtoFlags & PROTO_NOCHANGE) - { - DBVARIANT dbv; - mir_snprintf(szSetting, SIZEOF(szSetting), "FCur%sMsg", accounts->pa[i]->szModuleName); - if (!DBGetContactSettingTString(NULL, "SimpleStatusMsg", szSetting, &dbv)) - { - msg = mir_tstrdup(dbv.ptszVal); - DBFreeVariant(&dbv); - } - //else - // msg = mir_tstrdup(_T("")); - } - else - msg = GetAwayMessageFormat(iStatus, NULL); -#ifdef _DEBUG - log2file("ChangeStatusMessage(): Set %s status and \"" TCHAR_STR_PARAM "\" status message for %s.", StatusModeToDbSetting(iStatus, ""), msg, accounts->pa[i]->szModuleName); -#endif - SetStatusMessage(accounts->pa[i]->szModuleName, iStatus, iStatus, msg, FALSE); - if (msg) { mir_free(msg); msg = NULL; } - } - return 1; - } - - box_data = (struct MsgBoxInitData *)mir_alloc(sizeof(struct MsgBoxInitData)); - box_data->m_szProto = NULL; - box_data->m_iStatus = iStatus; - box_data->m_iStatusModes = accounts->statusFlags; - box_data->m_iStatusMsgModes = accounts->statusMsgFlags; - box_data->m_bOnEvent = TRUE; - box_data->m_bOnStartup = bOnStartup; - - if (hwndSAMsgDialog) - DestroyWindow(hwndSAMsgDialog); - hwndSAMsgDialog = CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_AWAYMSGBOX), NULL, AwayMsgBoxDlgProc, (LPARAM)box_data); - } - return 0; -} - -static INT_PTR ChangeStatusMsg(WPARAM wParam, LPARAM lParam) -{ - ChangeStatusMessage(wParam, lParam); - return 0; -} - -static INT_PTR SetOfflineStatus(WPARAM wParam, LPARAM lParam) -{ - ChangeStatusMessage((WPARAM)ID_STATUS_OFFLINE, (LPARAM)NULL); - return 0; -} - -static INT_PTR SetOnlineStatus(WPARAM wParam, LPARAM lParam) -{ - ChangeStatusMessage((WPARAM)ID_STATUS_ONLINE, (LPARAM)NULL); - return 0; -} - -static INT_PTR SetAwayStatus(WPARAM wParam, LPARAM lParam) -{ - ChangeStatusMessage((WPARAM)ID_STATUS_AWAY, (LPARAM)NULL); - return 0; -} - -static INT_PTR SetDNDStatus(WPARAM wParam, LPARAM lParam) -{ - ChangeStatusMessage((WPARAM)ID_STATUS_DND, (LPARAM)NULL); - return 0; -} - -static INT_PTR SetNAStatus(WPARAM wParam, LPARAM lParam) -{ - ChangeStatusMessage((WPARAM)ID_STATUS_NA, (LPARAM)NULL); - return 0; -} - -static INT_PTR SetOccupiedStatus(WPARAM wParam, LPARAM lParam) -{ - ChangeStatusMessage((WPARAM)ID_STATUS_OCCUPIED, (LPARAM)NULL); - return 0; -} - -static INT_PTR SetFreeChatStatus(WPARAM wParam, LPARAM lParam) -{ - ChangeStatusMessage((WPARAM)ID_STATUS_FREECHAT, (LPARAM)NULL); - return 0; -} - -static INT_PTR SetInvisibleStatus(WPARAM wParam, LPARAM lParam) -{ - ChangeStatusMessage((WPARAM)ID_STATUS_INVISIBLE, (LPARAM)NULL); - return 0; -} - -static INT_PTR SetOnThePhoneStatus(WPARAM wParam, LPARAM lParam) -{ - ChangeStatusMessage((WPARAM)ID_STATUS_ONTHEPHONE, (LPARAM)NULL); - return 0; -} - -static INT_PTR SetOutToLunchStatus(WPARAM wParam, LPARAM lParam) -{ - ChangeStatusMessage((WPARAM)ID_STATUS_OUTTOLUNCH, (LPARAM)NULL); - return 0; -} - -static int ProcessProtoAck(WPARAM wParam,LPARAM lParam) -{ - ACKDATA *ack = (ACKDATA *)lParam; - - if (!ack || !ack->szModule) - return 0; - - if (ack->type == ACKTYPE_AWAYMSG && ack->result == ACKRESULT_SENTREQUEST && !ack->lParam) - { - TCHAR *tszMsg = GetAwayMessage(CallProtoService((char *)ack->szModule, PS_GETSTATUS, 0, 0), (char *)ack->szModule, TRUE, NULL); - - { - char *szMsg = mir_u2a(tszMsg); - CallContactService(ack->hContact, PSS_AWAYMSG, (WPARAM)(HANDLE)ack->hProcess, (LPARAM)szMsg); - if (szMsg) mir_free(szMsg); - } - -#ifdef _DEBUG - log2file("ProcessProtoAck(): Send away message \"" TCHAR_STR_PARAM "\" reply.", tszMsg); -#endif - if (tszMsg) mir_free(tszMsg); - return 0; - } - - if (ack->type != ACKTYPE_STATUS || ack->result != ACKRESULT_SUCCESS || ack->hContact != NULL) - return 0; - - if (ack->lParam >= ID_STATUS_CONNECTING && ack->lParam < ID_STATUS_CONNECTING + MAX_CONNECT_RETRIES) - ack->lParam = ID_STATUS_OFFLINE; - - SaveStatusAsCurrent(ack->szModule, (int)ack->lParam); -#ifdef _DEBUG - log2file("ProcessProtoAck(): Set %s (%d) status for %s.", StatusModeToDbSetting((int)ack->lParam, ""), (int)ack->lParam, (char *)ack->szModule); -#endif - - return 0; -} - -int SetStartupStatus(int i) -{ - int flags; - char szSetting[80]; - TCHAR *fmsg = NULL, *msg = NULL; - int iStatus = GetStartupStatus(accounts->pa[i]->szModuleName); - - if (iStatus == ID_STATUS_OFFLINE) - return -1; - - if (!CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_3, 0) || - !(CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_MODEMSGSEND)) - { - CallProtoService(accounts->pa[i]->szModuleName, PS_SETSTATUS, (WPARAM)iStatus, 0); - return -1; - } - - mir_snprintf(szSetting, SIZEOF(szSetting), "Proto%sFlags", accounts->pa[i]->szModuleName); - flags = DBGetContactSettingByte(NULL, "SimpleStatusMsg", szSetting, PROTO_DEFAULT); - if (flags & PROTO_NO_MSG || flags & PROTO_THIS_MSG) - { - if (HasProtoStaticStatusMsg(accounts->pa[i]->szModuleName, ID_STATUS_OFFLINE, iStatus)) - return 0; - } - else if (flags & PROTO_NOCHANGE) - { - DBVARIANT dbv; - mir_snprintf(szSetting, SIZEOF(szSetting), "FCur%sMsg", accounts->pa[i]->szModuleName); - if (!DBGetContactSettingTString(NULL, "SimpleStatusMsg", szSetting, &dbv)) - { - fmsg = mir_tstrdup(dbv.ptszVal); - DBFreeVariant(&dbv); - } - //else - // fmsg = mir_tstrdup(_T("")); - } - else - fmsg = GetAwayMessageFormat(iStatus, accounts->pa[i]->szModuleName); - -#ifdef _DEBUG - log2file("SetStartupStatus(): Set %s status and \"" TCHAR_STR_PARAM "\" status message for %s.", StatusModeToDbSetting(iStatus, ""), fmsg, accounts->pa[i]->szModuleName); -#endif - - if (fmsg) - msg = InsertVarsIntoMsg(fmsg, accounts->pa[i]->szModuleName, iStatus, NULL); - - SaveMessageToDB(accounts->pa[i]->szModuleName, fmsg, TRUE); - SaveMessageToDB(accounts->pa[i]->szModuleName, msg, FALSE); - - if (fmsg) - mir_free(fmsg); - - Proto_SetStatus(accounts->pa[i]->szModuleName, ID_STATUS_OFFLINE, iStatus, msg /*? msg : _T("")*/); - mir_free(msg); - - return 0; -} - -VOID CALLBACK SetStartupStatusGlobal(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime) -{ - int prev_status_mode = -1, status_mode, temp_status_mode = ID_STATUS_OFFLINE, i; - BOOL globalstatus = TRUE; - - KillTimer(hwnd, idEvent); - - // is global status mode going to be set? - for (i = 0; i < accounts->count; ++i) - { - if (!IsAccountEnabled(accounts->pa[i])) - continue; - - if (!(CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_2, 0)&~CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_5, 0))) - continue; - - status_mode = GetStartupStatus(accounts->pa[i]->szModuleName); - - if (status_mode != ID_STATUS_OFFLINE) - temp_status_mode = status_mode; - - if (status_mode != prev_status_mode && prev_status_mode != -1) - { - globalstatus = FALSE; - break; - } - - prev_status_mode = status_mode; - } - - // popup status msg dialog at startup? - if (DBGetContactSettingByte(NULL, "SimpleStatusMsg", "StartupPopupDlg", 1) && accounts->statusMsgFlags) - { - if (globalstatus) - { - ChangeStatusMessage((WPARAM)status_mode, (LPARAM)"SimpleStatusMsgGlobalStartupStatus"); - } - else - { - // pseudo-currentDesiredStatusMode ;-) - DBWriteContactSettingWord(NULL, "SimpleStatusMsg", "StartupStatus", (WORD)temp_status_mode); - ChangeStatusMessage((WPARAM)ID_STATUS_CURRENT, (LPARAM)"SimpleStatusMsgGlobalStartupStatus"); - } - return; - } - - for (i = 0; i < accounts->count; ++i) - { - if (!IsAccountEnabled(accounts->pa[i])) - continue; - - if (!(CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_2, 0)&~CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_5, 0))) - continue; - -// if (DBGetContactSettingByte(NULL, accounts->pa[i]->szModuleName, "LockMainStatus", 0)) -// continue; - - SetStartupStatus(i); - } -} - -VOID CALLBACK SetStartupStatusProc(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime) -{ - BOOL found = FALSE; - int i; - - for (i = 0; i < accounts->count; ++i) - { - if (!IsAccountEnabled(accounts->pa[i])) - continue; - - if (!(CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_2, 0)&~CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_5, 0))) - continue; - - if (g_uSetStatusTimer[i] == idEvent) - { - KillTimer(NULL, g_uSetStatusTimer[i]); - found = TRUE; - break; - } - } - - if (!found) - { - KillTimer(hwnd, idEvent); - return; - } - - SetStartupStatus(i); -} - -VOID CALLBACK UpdateMsgTimerProc(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime) -{ - MIRANDA_IDLE_INFO mii = {0}; - mii.cbSize = sizeof(mii); - CallService(MS_IDLE_GETIDLEINFO, 0, (LPARAM)&mii); - if (DBGetContactSettingByte(NULL, "SimpleStatusMsg", "NoUpdateOnIdle", 1) && mii.idleType) - return; - - if (!hwndSAMsgDialog) - { - char szBuffer[64]; - DBVARIANT dbv; - TCHAR *tszMsg; - int iCurrentStatus; - - for (int i = 0; i < accounts->count; ++i) - { - if (!IsAccountEnabled(accounts->pa[i])) - continue; - - if (!CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_3, 0)) - continue; - - if (!(CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_MODEMSGSEND)) - continue; - - iCurrentStatus = CallProtoService(accounts->pa[i]->szModuleName, PS_GETSTATUS, 0, 0); - if (iCurrentStatus < ID_STATUS_ONLINE) - continue; - - mir_snprintf(szBuffer, SIZEOF(szBuffer), "FCur%sMsg", accounts->pa[i]->szModuleName); - if (DBGetContactSettingTString(NULL, "SimpleStatusMsg", szBuffer, &dbv)) - continue; - - tszMsg = InsertVarsIntoMsg(dbv.ptszVal, accounts->pa[i]->szModuleName, iCurrentStatus, NULL); - DBFreeVariant(&dbv); - - mir_snprintf(szBuffer, SIZEOF(szBuffer), "Cur%sMsg", accounts->pa[i]->szModuleName); - if (!DBGetContactSettingTString(NULL, "SimpleStatusMsg", szBuffer, &dbv)) - { - if (tszMsg && dbv.ptszVal && !lstrcmp(tszMsg, dbv.ptszVal) || !tszMsg && !dbv.ptszVal) - { - DBFreeVariant(&dbv); - mir_free(tszMsg); - continue; - } - DBFreeVariant(&dbv); - } - - if (tszMsg && lstrlen(tszMsg)) - { -#ifdef _DEBUG - log2file("UpdateMsgTimerProc(): Set %s status and \"" TCHAR_STR_PARAM "\" status message for %s.", StatusModeToDbSetting(iCurrentStatus, ""), tszMsg, accounts->pa[i]->szModuleName); -#endif - Proto_SetStatus(accounts->pa[i]->szModuleName, iCurrentStatus, iCurrentStatus, tszMsg); - SaveMessageToDB(accounts->pa[i]->szModuleName, tszMsg, FALSE); - } - mir_free(tszMsg); - } - } -} - -static int AddTopToolbarButton(WPARAM wParam, LPARAM lParam) -{ - TTBButton ttbb = {0}; - ttbb.cbSize = sizeof(ttbb); - ttbb.hIconHandleUp = GetIconHandle(IDI_CSMSG); - ttbb.pszService = MS_SIMPLESTATUSMSG_SHOWDIALOGINT; - ttbb.dwFlags = TTBBF_VISIBLE | TTBBF_SHOWTOOLTIP; - ttbb.name = ttbb.pszTooltipUp = LPGEN("Change Status Message"); - hTTBButton = TopToolbar_AddButton(&ttbb); - - ReleaseIconEx("csmsg"); - return 0; -} - -void RegisterHotkey(void) -{ - HOTKEYDESC hkd = {0}; - - hkd.cbSize = sizeof(hkd); - hkd.dwFlags = HKD_TCHAR; - hkd.pszName = "SimpleStatusMsg_OpenDialog"; - hkd.ptszDescription = _T("Open Status Message Dialog"); - hkd.ptszSection = _T("Status Message"); - hkd.pszService = MS_SIMPLESTATUSMSG_SHOWDIALOGINT; - hkd.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL, VK_OEM_3); - Hotkey_Register(&hkd); -} - -static int ChangeStatusMsgPrebuild(WPARAM wParam, LPARAM lParam) -{ -#ifdef _DEBUG - log2file("ChangeStatusMsgPrebuild()"); -#endif - PROTOACCOUNT **pa; - int iStatusMenuItemCount = 0, count, i; - DWORD iStatusMsgFlags = 0; - - ProtoEnumAccounts(&count, &pa); - hProtoStatusMenuItem = (HANDLE *)mir_realloc(hProtoStatusMenuItem, sizeof(HANDLE) * count); - for (i = 0; i < count; ++i) - { - if (!IsAccountEnabled(pa[i])) - continue; - - if (CallProtoService(pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_MODEMSGSEND) - iStatusMsgFlags |= CallProtoService(pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_3,0); - - if (!pa[i]->bIsVisible) - continue; - - iStatusMenuItemCount++; - } - - if (!iStatusMsgFlags || !iStatusMenuItemCount) - return 0; - - CLISTMENUITEM mi = {0}; - mi.cbSize = sizeof(mi); - mi.flags = CMIF_ICONFROMICOLIB | CMIF_TCHAR; - if (!DBGetContactSettingByte(NULL, "SimpleStatusMsg", "ShowStatusMenuItem", 1)) - mi.flags |= CMIF_HIDDEN; - mi.icolibItem = GetIconHandle(IDI_CSMSG); - mi.pszService = MS_SIMPLESTATUSMSG_SHOWDIALOGINT; - mi.ptszName = LPGENT("Status Message..."); - mi.position = 2000200000; - Menu_AddStatusMenuItem(&mi); - - mi.popupPosition = 500084000; - mi.position = 2000040000; - - for (i = 0; i < count; ++i) - { - char szSetting[80]; - TCHAR szBuffer[256]; - int iProtoFlags; - - if (!IsAccountEnabled(pa[i])) - continue; - - if (!CallProtoService(pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_3, 0)) - continue; - - if (!(CallProtoService(pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_MODEMSGSEND)) - continue; - - if (!pa[i]->bIsVisible) - continue; - - mir_snprintf(szSetting, SIZEOF(szSetting), "Proto%sFlags", pa[i]->szModuleName); - iProtoFlags = DBGetContactSettingByte(NULL, "SimpleStatusMsg", szSetting, PROTO_DEFAULT); - if (iProtoFlags & PROTO_NO_MSG || iProtoFlags & PROTO_THIS_MSG) - continue; - - if (DBGetContactSettingByte(NULL, pa[i]->szModuleName, "LockMainStatus", 0) && - CallService(MS_SYSTEM_GETVERSION, 0, 0) >= PLUGIN_MAKE_VERSION(0, 9, 0, 10)) - { - mir_sntprintf(szBuffer, SIZEOF(szBuffer), TranslateT("%s (locked)"), pa[i]->tszAccountName); - mi.ptszPopupName = szBuffer; - } - else mi.ptszPopupName = pa[i]->tszAccountName; - hProtoStatusMenuItem[i] = Menu_AddStatusMenuItem(&mi); - } - - return 0; -} - -static int OnIdleChanged(WPARAM, LPARAM lParam) -{ -#ifdef _DEBUG - log2file("OnIdleChanged()"); -#endif - if (!(lParam & IDF_ISIDLE)) - g_iIdleTime = -1; - - MIRANDA_IDLE_INFO mii = {0}; - mii.cbSize = sizeof(mii); - CallService(MS_IDLE_GETIDLEINFO, 0, (LPARAM)&mii); - if (mii.aaStatus == 0) - { -#ifdef _DEBUG - log2file("OnIdleChanged(): AutoAway disabled"); -#endif - return 0; - } - - for (int i = 0; i < accounts->count; ++i) - { - if (!IsAccountEnabled(accounts->pa[i])) - continue; - - if (DBGetContactSettingByte(NULL, accounts->pa[i]->szModuleName, "LockMainStatus", 0)) - continue; - - int iStatusBits = CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_3, 0); - int iStatus = mii.aaStatus; - if (!(iStatusBits & Proto_Status2Flag(iStatus))) - { - if (iStatusBits & Proto_Status2Flag(ID_STATUS_AWAY)) - iStatus = ID_STATUS_AWAY; - else - continue; - } - - int iCurrentStatus = CallProtoService(accounts->pa[i]->szModuleName, PS_GETSTATUS, 0, 0); - if (iCurrentStatus < ID_STATUS_ONLINE || iCurrentStatus == ID_STATUS_INVISIBLE) - continue; - - if ((lParam & IDF_ISIDLE && (DBGetContactSettingByte(NULL, "AutoAway", accounts->pa[i]->szModuleName, 0) || - iCurrentStatus == ID_STATUS_ONLINE || iCurrentStatus == ID_STATUS_FREECHAT)) || - (!(lParam & IDF_ISIDLE) && !mii.aaLock)) - { - if (!(lParam & IDF_ISIDLE)) - iStatus = ID_STATUS_ONLINE; - TCHAR *tszMsg = GetAwayMessage(iStatus, accounts->pa[i]->szModuleName, FALSE, NULL); - TCHAR *tszVarsMsg = InsertVarsIntoMsg(tszMsg, accounts->pa[i]->szModuleName, iStatus, NULL); - SaveMessageToDB(accounts->pa[i]->szModuleName, tszMsg, TRUE); - SaveMessageToDB(accounts->pa[i]->szModuleName, tszVarsMsg, FALSE); - mir_free(tszMsg); - mir_free(tszVarsMsg); - } - } - - return 0; -} - -static int CSStatusChange(WPARAM wParam, LPARAM lParam) -{ - PROTOCOLSETTINGEX** ps = *(PROTOCOLSETTINGEX***)wParam; - int status_mode, CSProtoCount; - char szSetting[80]; - TCHAR *msg = NULL; - - if (ps == NULL) return -1; - - CSProtoCount = CallService(MS_CS_GETPROTOCOUNT, 0, 0); - for (int i = 0; i < CSProtoCount; ++i) - { - if (ps[i]->szName == NULL || !*ps[i]->szName) continue; - if (ps[i]->status == ID_STATUS_IDLE) - status_mode = ps[i]->lastStatus; - else if (ps[i]->status == ID_STATUS_CURRENT) - status_mode = CallProtoService(ps[i]->szName, PS_GETSTATUS, 0, 0); - else - status_mode = ps[i]->status; - - SaveStatusAsCurrent(ps[i]->szName, status_mode); -#ifdef _DEBUG - log2file("CSStatusChange(): Set %s status for %s.", StatusModeToDbSetting(status_mode, ""), ps[i]->szName); -#endif - - // TODO SaveMessageToDB also when NULL? - if (ps[i]->szMsg) - { - int max_hist_msgs, j; - DBVARIANT dbv; - char buff[80]; - BOOL found = FALSE; - - wchar_t *szMsgW = mir_t2u(ps[i]->szMsg); - - -#ifdef _DEBUG - log2file("CSStatusChange(): Set \"%s\" status message for %s.", ps[i]->szMsg, ps[i]->szName); -#endif - max_hist_msgs = DBGetContactSettingByte(NULL, "SimpleStatusMsg", "MaxHist", 10); - for (j = 1; j <= max_hist_msgs; j++) - { - mir_snprintf(buff, SIZEOF(buff), "SMsg%d", j); - if (!DBGetContactSettingTString(NULL, "SimpleStatusMsg", buff, &dbv)) - { - - if (!lstrcmp(dbv.ptszVal, szMsgW)) - - { - found = TRUE; - mir_snprintf(szSetting, SIZEOF(szSetting), "Last%sMsg", ps[i]->szName); - DBWriteContactSettingString(NULL, "SimpleStatusMsg", szSetting, buff); - DBFreeVariant(&dbv); - break; - } - } - } - - if (!found) - { - mir_snprintf(buff, SIZEOF(buff), "FCur%sMsg", ps[i]->szName); - mir_snprintf(szSetting, SIZEOF(szSetting), "Last%sMsg", ps[i]->szName); - DBWriteContactSettingString(NULL, "SimpleStatusMsg", szSetting, buff); - } - - mir_snprintf(szSetting, SIZEOF(szSetting), "%sMsg", ps[i]->szName); - - DBWriteContactSettingWString(NULL, "SRAway", StatusModeToDbSetting(status_mode, szSetting), szMsgW); - msg = InsertVarsIntoMsg(szMsgW, ps[i]->szName, status_mode, NULL); - SaveMessageToDB(ps[i]->szName, szMsgW, TRUE); - mir_free(szMsgW); - - SaveMessageToDB(ps[i]->szName, msg, FALSE); - mir_free(msg); - } - } - - return 0; -} - -static TCHAR *ParseWinampSong(ARGUMENTSINFO *ai) -{ - TCHAR *ptszWinampTitle; - - if (ai->argc != 1) - return NULL; - - ai->flags |= AIF_DONTPARSE; - ptszWinampTitle = GetWinampSong(); - - if (ptszWinampTitle != NULL) - { - mir_free(g_ptszWinampSong); - g_ptszWinampSong = mir_tstrdup(ptszWinampTitle); - } - else if (g_ptszWinampSong && lstrcmp(g_ptszWinampSong, _T("SimpleStatusMsg")) && DBGetContactSettingByte(NULL, "SimpleStatusMsg", "AmpLeaveTitle", 1)) - ptszWinampTitle = mir_tstrdup(g_ptszWinampSong); - - return ptszWinampTitle; -} - -static TCHAR *ParseDate(ARGUMENTSINFO *ai) -{ - TCHAR szStr[128] = {0}; - - if (ai->argc != 1) - return NULL; - - ai->flags |= AIF_DONTPARSE; - GetDateFormat(LOCALE_USER_DEFAULT, DATE_SHORTDATE, NULL, NULL, szStr, SIZEOF(szStr)); - - return mir_tstrdup(szStr); -} - -int ICQMsgTypeToStatus(int iMsgType) -{ - switch (iMsgType) - { - case MTYPE_AUTOONLINE: return ID_STATUS_ONLINE; - case MTYPE_AUTOAWAY: return ID_STATUS_AWAY; - case MTYPE_AUTOBUSY: return ID_STATUS_OCCUPIED; - case MTYPE_AUTONA: return ID_STATUS_NA; - case MTYPE_AUTODND: return ID_STATUS_DND; - case MTYPE_AUTOFFC: return ID_STATUS_FREECHAT; - default: return ID_STATUS_OFFLINE; - } -} - -static int OnICQStatusMsgRequest(WPARAM wParam, LPARAM lParam, LPARAM lMirParam) -{ -#ifdef _DEBUG - log2file("OnICQStatusMsgRequest(): UIN: %d on %s", (int)lParam, (char *)lMirParam); -#endif - - if (DBGetContactSettingByte(NULL, "SimpleStatusMsg", "NoUpdateOnICQReq", 1)) - return 0; - - HANDLE hContact; - char *szProto; - BOOL bContactFound = FALSE; - - hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST, 0, 0); - while (hContact) - { - szProto = (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0); - if (szProto != NULL && !strcmp(szProto, (char *)lMirParam) && DBGetContactSettingDword(hContact, szProto, "UIN", 0) == (DWORD)lParam) - { - bContactFound = TRUE; - break; - } - hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM)hContact, 0); - } - if (!bContactFound) - return 0; - - int iStatus = ICQMsgTypeToStatus(wParam); - TCHAR *tszMsg = GetAwayMessage(iStatus, szProto, TRUE, hContact); - Proto_SetAwayMsgT(szProto, iStatus, tszMsg); - mir_free(tszMsg); - - return 0; -} - -static int OnAccListChanged(WPARAM wParam, LPARAM lParam) -{ -#ifdef _DEBUG - log2file("OnAccListChanged()"); -#endif - accounts->statusFlags = 0; - accounts->statusCount = 0; - accounts->statusMsgFlags = 0; - accounts->statusMsgCount = 0; - UnhookProtoEvents(); - - ProtoEnumAccounts(&accounts->count, &accounts->pa); - for (int i = 0; i < accounts->count; ++i) - { - if (!IsAccountEnabled(accounts->pa[i])) - continue; - - if (!strcmp(accounts->pa[i]->szProtoName, "ICQ")) - HookProtoEvent(accounts->pa[i]->szModuleName, ME_ICQ_STATUSMSGREQ, OnICQStatusMsgRequest); - - accounts->statusFlags |= (CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_2, 0) &~ CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_5, 0)); - - if (CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_2, 0) &~ CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_5, 0)) - accounts->statusCount++; - - if (!(CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_MODEMSGSEND)) - continue; - - accounts->statusMsgFlags |= CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_3,0); - - if (!CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_3, 0)) - continue; - - accounts->statusMsgCount++; - } - - return 0; -} - -static int OnModulesLoaded(WPARAM wParam, LPARAM lParam) -{ -#ifdef _DEBUG - log2file("### Session started ###"); -#endif - // known modules list - if (ServiceExists("DBEditorpp/RegisterSingleModule")) - CallService("DBEditorpp/RegisterSingleModule", (WPARAM)"SimpleStatusMsg", 0); - - IconsInit(); - OnAccListChanged(0, 0); - - LoadAwayMsgModule(); - - HookEventEx(ME_TTB_MODULELOADED, AddTopToolbarButton); - - RegisterHotkey(); - - HookEventEx(ME_OPT_INITIALISE, InitOptions); - h_statusmodechange = HookEvent(ME_CLIST_STATUSMODECHANGE, ChangeStatusMessage); - HookEventEx(ME_PROTO_ACK, ProcessProtoAck); - HookEventEx(ME_IDLE_CHANGED, OnIdleChanged); - - HookEventEx(ME_CLIST_PREBUILDSTATUSMENU, ChangeStatusMsgPrebuild); - ChangeStatusMsgPrebuild(0, 0); - - if (ServiceExists(MS_VARS_REGISTERTOKEN)) - { - TOKENREGISTER tr = {0}; - tr.cbSize = sizeof(TOKENREGISTER); - tr.memType = TR_MEM_MIRANDA; - tr.flags = TRF_FREEMEM | TRF_FIELD | TRF_TCHAR | TRF_PARSEFUNC; - tr.tszTokenString = _T("winampsong"); - tr.parseFunctionT = ParseWinampSong; - tr.szHelpText = LPGEN("External Applications\tretrieves song name of the song currently playing in Winamp (Simple Status Message compatible)"); - CallService(MS_VARS_REGISTERTOKEN, 0, (LPARAM)&tr); - - if (DBGetContactSettingByte(NULL, "SimpleStatusMsg", "ExclDateToken", 0) != 0) - { - tr.tszTokenString = _T("date"); - tr.parseFunctionT = ParseDate; - tr.szHelpText = LPGEN("Miranda Related\tget the date (Simple Status Message compatible)"); - CallService(MS_VARS_REGISTERTOKEN, 0, (LPARAM)&tr); - } - } - -/* if (DBGetContactSettingByte(NULL, "SimpleStatusMsg", "AmpLeaveTitle", 1))*/ { - DBVARIANT dbv; - - if (!DBGetContactSettingTString(NULL, "SimpleStatusMsg", "AmpLastTitle", &dbv)) - { - g_ptszWinampSong = mir_tstrdup(dbv.ptszVal); - DBFreeVariant(&dbv); - } - else - g_ptszWinampSong = mir_tstrdup(_T("SimpleStatusMsg")); - } -/* else - g_ptszWinampSong = mir_tstrdup(_T("SimpleStatusMsg"));*/ - - if (DBGetContactSettingByte(NULL, "SimpleStatusMsg", "UpdateMsgOn", 1)) - g_uUpdateMsgTimer = SetTimer(NULL, 0, DBGetContactSettingWord(NULL, "SimpleStatusMsg", "UpdateMsgInt", 10) * 1000, (TIMERPROC)UpdateMsgTimerProc); - - if (ServiceExists(MS_CS_SETSTATUSEX)) - HookEventEx(ME_CS_STATUSCHANGEEX, CSStatusChange); - - if (accounts->statusCount == 0) - return 0; - - if (!ServiceExists(MS_SS_GETPROFILECOUNT)) - { - if (DBGetContactSettingByte(NULL, "SimpleStatusMsg", "GlobalStatusDelay", 1)) - { - SetTimer(NULL, 0, DBGetContactSettingWord(NULL, "SimpleStatusMsg", "SetStatusDelay", 300), (TIMERPROC)SetStartupStatusGlobal); - } - else - { - char szSetting[80]; - - g_uSetStatusTimer = (UINT_PTR*)mir_alloc(sizeof(UINT_PTR) * accounts->count); - for (int i = 0; i < accounts->count; ++i) - { - if (!IsAccountEnabled(accounts->pa[i])) - continue; - - if (!(CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_2, 0) &~ CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_5, 0))) - continue; - - mir_snprintf(szSetting, SIZEOF(szSetting), "Set%sStatusDelay", accounts->pa[i]->szModuleName); - g_uSetStatusTimer[i] = SetTimer(NULL, 0, DBGetContactSettingWord(NULL, "SimpleStatusMsg", szSetting, 300), (TIMERPROC)SetStartupStatusProc); - } - } - } - - return 0; -} - -static int OnOkToExit(WPARAM wParam, LPARAM lParam) -{ - if (accounts->statusCount) - { - char szSetting[80]; - - for (int i = 0; i < accounts->count; ++i) - { - if (!IsAccountEnabled(accounts->pa[i])) - continue; - - if (!(CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_2, 0) &~ CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_5, 0))) - continue; - - mir_snprintf(szSetting, SIZEOF(szSetting), "Last%sStatus", accounts->pa[i]->szModuleName); - DBWriteContactSettingWord(NULL, "SimpleStatusMsg", szSetting, (WORD)CallProtoService(accounts->pa[i]->szModuleName, PS_GETSTATUS, 0, 0)); - } - - if (g_ptszWinampSong && lstrcmp(g_ptszWinampSong, _T("SimpleStatusMsg")) /*&& DBGetContactSettingByte(NULL, "SimpleStatusMsg", "AmpLeaveTitle", 1)*/) - DBWriteMessage("AmpLastTitle", g_ptszWinampSong); - } - - return 0; -} - -static int OnPreShutdown(WPARAM wParam, LPARAM lParam) -{ - if (!accounts->statusMsgFlags) - return 0; - - AwayMsgPreShutdown(); - if (hwndSAMsgDialog) DestroyWindow(hwndSAMsgDialog); - if (hProtoStatusMenuItem) mir_free(hProtoStatusMenuItem); - if (g_uSetStatusTimer) mir_free(g_uSetStatusTimer); - if (g_ptszWinampSong) mir_free(g_ptszWinampSong); - if (g_uUpdateMsgTimer) KillTimer(NULL, g_uUpdateMsgTimer); - - return 0; -} - -static INT_PTR IsSARunning(WPARAM wParam, LPARAM lParam) -{ - return 1; -} - -//remember to mir_free() the return value -static INT_PTR sttGetAwayMessageT(WPARAM wParam, LPARAM lParam) -{ - return (INT_PTR)GetAwayMessage((int)wParam, (char*)lParam, TRUE, NULL); -} - - -static INT_PTR sttGetAwayMessage(WPARAM wParam, LPARAM lParam) -{ - TCHAR* msg = GetAwayMessage((int)wParam, (char*)lParam, TRUE, NULL); - char* res = mir_t2a(msg); - mir_free(msg); - return (INT_PTR)res; -} - - -extern "C" int __declspec(dllexport) Load(void) -{ - - mir_getLP(&pluginInfo); - hwndSAMsgDialog = NULL; - accounts = (PROTOACCOUNTS *)mir_alloc(sizeof(PROTOACCOUNTS)); - - DBWriteContactSettingWord(NULL, "CList", "Status", (WORD)ID_STATUS_OFFLINE); - HookEventEx(ME_SYSTEM_MODULESLOADED, OnModulesLoaded); - HookEventEx(ME_PROTO_ACCLISTCHANGED, OnAccListChanged); - - - CreateServiceFunctionEx(MS_AWAYMSG_GETSTATUSMSG, sttGetAwayMessage); - CreateServiceFunctionEx(MS_AWAYMSG_GETSTATUSMSGW, sttGetAwayMessageT); - - CreateServiceFunctionEx(MS_SIMPLESTATUSMSG_SETSTATUS, SetStatusModeFromExtern); - CreateServiceFunctionEx(MS_SIMPLESTATUSMSG_SHOWDIALOG, ShowStatusMessageDialog); - CreateServiceFunctionEx(MS_SIMPLESTATUSMSG_CHANGESTATUSMSG, ChangeStatusMsg); - CreateServiceFunctionEx(MS_SIMPLESTATUSMSG_SHOWDIALOGINT, ShowStatusMessageDialogInternal); // internal use ONLY - - // Deprecated SimpleAway services - CreateServiceFunctionEx(MS_SA_ISSARUNNING, IsSARunning); - CreateServiceFunctionEx(MS_SA_CHANGESTATUSMSG, ChangeStatusMsg); - CreateServiceFunctionEx(MS_SA_TTCHANGESTATUSMSG, ShowStatusMessageDialogInternal); - CreateServiceFunctionEx(MS_SA_SHOWSTATUSMSGDIALOG, ShowStatusMessageDialog); - CreateServiceFunctionEx(MS_SA_SETSTATUSMODE, SetStatusModeFromExtern); - - CreateServiceFunctionEx(MS_SA_SETOFFLINESTATUS, SetOfflineStatus); - CreateServiceFunctionEx(MS_SA_SETONLINESTATUS, SetOnlineStatus); - CreateServiceFunctionEx(MS_SA_SETAWAYSTATUS, SetAwayStatus); - CreateServiceFunctionEx(MS_SA_SETDNDSTATUS, SetDNDStatus); - CreateServiceFunctionEx(MS_SA_SETNASTATUS, SetNAStatus); - CreateServiceFunctionEx(MS_SA_SETOCCUPIEDSTATUS, SetOccupiedStatus); - CreateServiceFunctionEx(MS_SA_SETFREECHATSTATUS, SetFreeChatStatus); - CreateServiceFunctionEx(MS_SA_SETINVISIBLESTATUS, SetInvisibleStatus); - CreateServiceFunctionEx(MS_SA_SETONTHEPHONESTATUS, SetOnThePhoneStatus); - CreateServiceFunctionEx(MS_SA_SETOUTTOLUNCHSTATUS, SetOutToLunchStatus); - - HookEventEx(ME_SYSTEM_OKTOEXIT, OnOkToExit); - HookEventEx(ME_SYSTEM_PRESHUTDOWN, OnPreShutdown); - - return 0; -} - -extern "C" int __declspec(dllexport) Unload(void) -{ - UnhookEvents(); - UnhookEvent(h_statusmodechange); - UnhookProtoEvents(); - DestroyServiceFunctionsEx(); - mir_free(accounts); - -#ifdef _DEBUG - log2file("### Session ended ###"); -#endif - - return 0; -} diff --git a/plugins/SimpleStatusMsg/msgbox.cpp b/plugins/SimpleStatusMsg/msgbox.cpp deleted file mode 100644 index 924307ea04..0000000000 --- a/plugins/SimpleStatusMsg/msgbox.cpp +++ /dev/null @@ -1,1798 +0,0 @@ -/* - -Simple Status Message plugin for Miranda IM -Copyright (C) 2006-2011 Bartosz 'Dezeath' Bia³ek, (C) 2005 Harven - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along -with this program; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -*/ -#include "commonheaders.h" -#include "simplestatusmsg.h" - -#define I_ICON_DEL 0 -#define I_ICON_HIST 1 -#define I_ICON_MSG 2 -#define I_ICON_ADD 3 -#define I_ICON_CLEAR 4 - -struct MsgBoxData -{ - char *m_szProto; - int m_iStatus; - int m_iInitialStatus; - int m_iStatusModes; - int m_iStatusMsgModes; - HWND status_cbex; - HWND recent_cbex; - HICON icon[5]; - HIMAGELIST status_icons; - HIMAGELIST other_icons; - int m_iCountdown; - int curr_sel_msg; - int m_iDlgFlags; - int max_hist_msgs; - int num_def_msgs; - BOOL m_bPredefChanged; - BOOL m_bIsMsgHistory; - BOOL m_bOnStartup; -}; - -typedef struct -{ - clock_t ctLastDblClk; - UINT uClocksPerDblClk; -} -MsgEditCtrl; - -HIMAGELIST AddOtherIconsToImageList(struct MsgBoxData *data) -{ - HIMAGELIST himlIcons = ImageList_Create(16, 16, (IsWinVerXPPlus() ? ILC_COLOR32 : ILC_COLOR16) | ILC_MASK, 4, 0); - - for (int i = 0; i < 5; ++i) - ImageList_AddIcon(himlIcons, data->icon[i]); - - return himlIcons; -} - -int statusicon_nr[9]; - -HIMAGELIST AddStatusIconsToImageList(const char *szProto, int status_flags) -{ - int num_icons = 1; - int i; - - for (i = 0; i < 9; ++i) - if (Proto_Status2Flag(ID_STATUS_ONLINE + i) & status_flags) num_icons++; - - HIMAGELIST himlIcons = ImageList_Create(16, 16, (IsWinVerXPPlus() ? ILC_COLOR32 : ILC_COLOR16) | ILC_MASK, num_icons, 0); - HICON hicon = LoadSkinnedProtoIcon(szProto, ID_STATUS_OFFLINE); - ImageList_AddIcon(himlIcons, hicon); - CallService(MS_SKIN2_RELEASEICON, (LPARAM)hicon, (WPARAM)0); - statusicon_nr[0] = 0; - - int j = 1; - for (i = 0; i < 9; ++i) - { - if (Proto_Status2Flag(ID_STATUS_ONLINE + i) & status_flags) - { - hicon = LoadSkinnedProtoIcon(szProto, ID_STATUS_ONLINE + i); - ImageList_AddIcon(himlIcons, hicon); - CallService(MS_SKIN2_RELEASEICON, (LPARAM)hicon, (WPARAM)0); - statusicon_nr[i + 1] = j; - j++; - } - else - statusicon_nr[i + 1] = 0; - } - - return himlIcons; -} - -HWND WINAPI CreateStatusComboBoxEx(HWND hwndDlg, struct MsgBoxData *data) -{ - int j = 0, cur_sel = 0; - TCHAR *status_desc; - - if (!(data->m_iDlgFlags & DLG_SHOW_STATUS)) - return NULL; - - HWND handle = CreateWindowEx(0, WC_COMBOBOXEX, NULL, - WS_TABSTOP | CBS_NOINTEGRALHEIGHT | WS_VISIBLE | WS_CHILD | CBS_DROPDOWNLIST, - 0, 0, 0, 240, hwndDlg, NULL, g_hInst, NULL); - - COMBOBOXEXITEM cbei = {0}; - if (!(data->m_iDlgFlags & DLG_SHOW_STATUS_ICONS)) - cbei.mask = CBEIF_LPARAM | CBEIF_TEXT; - else - cbei.mask = CBEIF_LPARAM | CBEIF_TEXT | CBEIF_IMAGE | CBEIF_SELECTEDIMAGE; - - if (data->m_bOnStartup) - status_desc = (TCHAR*)TranslateT(""); - else - status_desc = (TCHAR*)TranslateT(""); - cbei.iItem = j; - cbei.pszText = (LPTSTR)status_desc; - cbei.cchTextMax = sizeof(status_desc); - - if (data->m_szProto || data->m_iStatus == ID_STATUS_CURRENT) - { - if (data->m_bOnStartup) - j = GetStartupStatus(data->m_szProto) - ID_STATUS_OFFLINE; - else - j = GetCurrentStatus(data->m_szProto) - ID_STATUS_OFFLINE; - } - else - j = data->m_iStatus - ID_STATUS_OFFLINE; - - if (j < 0 || j > 9) j = 0; // valid status modes only - - if (data->m_iDlgFlags & DLG_SHOW_STATUS_ICONS) - { - cbei.iImage = statusicon_nr[j]; - cbei.iSelectedImage = statusicon_nr[j]; - } - j = 0; - cbei.lParam = (LPARAM)ID_STATUS_CURRENT; - - if (ID_STATUS_CURRENT == data->m_iInitialStatus) - cur_sel = j; - - SendMessage(handle, CBEM_INSERTITEM, 0, (LPARAM)&cbei); - j++; - - for (int i = 0; i < 10; ++i) - { - if ((Proto_Status2Flag(ID_STATUS_OFFLINE + i) & data->m_iStatusModes) || i == 0) - { - status_desc = (TCHAR*)CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, ID_STATUS_OFFLINE + i, GSMDF_TCHAR); - cbei.iItem = j; - cbei.pszText = (LPTSTR)status_desc; - cbei.cchTextMax = sizeof(status_desc); - if (data->m_iDlgFlags & DLG_SHOW_STATUS_ICONS) - { - cbei.iImage = j - 1; - cbei.iSelectedImage = j - 1; - } - cbei.lParam = (LPARAM)ID_STATUS_OFFLINE + i; - - if (ID_STATUS_OFFLINE + i == data->m_iInitialStatus) - cur_sel = j; - - if (SendMessage(handle, CBEM_INSERTITEM, 0, (LPARAM)&cbei) == -1) - break; - j++; - } - } - - if (!data->m_szProto && (data->m_iDlgFlags & DLG_SHOW_STATUS_PROFILES) && ServiceExists(MS_SS_GETPROFILECOUNT)) - { - int defaultProfile; - int profileCount = (int)CallService(MS_SS_GETPROFILECOUNT, (WPARAM)&defaultProfile, 0); - char buff1[128]; - - for (int i = 0; i < profileCount; ++i) - { - CallService(MS_SS_GETPROFILENAME, (WPARAM)i, (LPARAM)buff1); - - status_desc = mir_a2u(buff1); - - cbei.iItem = j; - cbei.pszText = (LPTSTR)status_desc; - cbei.cchTextMax = sizeof(status_desc); - if (data->m_iDlgFlags & DLG_SHOW_STATUS_ICONS) - { - int k = GetCurrentStatus(NULL) - ID_STATUS_OFFLINE; - if (k < 0 || k > 9) k = 0; // valid status modes only - cbei.iImage = statusicon_nr[k]; - cbei.iSelectedImage = statusicon_nr[k]; - } - cbei.lParam = (LPARAM)40083+i; - - mir_free(status_desc); - - if (SendMessage(handle, CBEM_INSERTITEM, 0, (LPARAM)&cbei) == -1) - break; - j++; - } - } - - if (!(data->m_iDlgFlags & DLG_SHOW_STATUS_ICONS)) - SendMessage(handle, CB_SETITEMHEIGHT, (WPARAM)0, (LPARAM)16); - else - { - SendMessage(handle, CB_SETITEMHEIGHT, (WPARAM)0, (LPARAM)18); - SendMessage(handle, CBEM_SETIMAGELIST, 0, (LPARAM)data->status_icons); - } - SetWindowPos(handle, NULL, 11, 11, 112, 20, SWP_NOACTIVATE); - SendMessage(handle, CB_SETCURSEL, (WPARAM)cur_sel, 0); - SendMessage(handle, CB_SETITEMHEIGHT, (WPARAM)-1, (LPARAM)16); - - return handle; -} - -#define HISTORY_MSG 1 -#define CLEAR_HISTORY 2 -#define PREDEFINED_MSG 3 -#define ADD_MSG 4 -#define DELETE_SELECTED 5 -#define DEFAULT_MSG 6 - -HWND WINAPI CreateRecentComboBoxEx(HWND hwndDlg, struct MsgBoxData *data) -{ - int i, j; - char buff[16]; - BOOL found = FALSE; - DBVARIANT dbv; - TCHAR text[128]; - - HWND handle = CreateWindowEx(0, WC_COMBOBOXEX, NULL, - WS_TABSTOP | CBS_NOINTEGRALHEIGHT | WS_VISIBLE | WS_CHILD | CBS_DROPDOWNLIST, - 0, 0, 0, 300, hwndDlg, NULL, g_hInst, NULL); - - COMBOBOXEXITEM cbei = {0}; - if (!(data->m_iDlgFlags & DLG_SHOW_LIST_ICONS)) - cbei.mask = CBEIF_LPARAM | CBEIF_TEXT | CBEIF_INDENT; - else - cbei.mask = CBEIF_LPARAM | CBEIF_TEXT | CBEIF_IMAGE | CBEIF_SELECTEDIMAGE; - - j = DBGetContactSettingWord(NULL, "SimpleStatusMsg", "LMMsg", 1); - - for (i = 1; i <= data->max_hist_msgs; ++i) - { - // history messages - if (j < 1) j = data->max_hist_msgs; - mir_snprintf(buff, SIZEOF(buff), "SMsg%d", j); - j--; - if (!DBGetContactSettingTString(NULL, "SimpleStatusMsg", buff, &dbv)) - { - if (dbv.ptszVal != NULL && dbv.ptszVal != '\0') - { - found = TRUE; - cbei.iItem = -1; - cbei.pszText = (LPTSTR)dbv.ptszVal; - cbei.cchTextMax = sizeof(dbv.ptszVal); - if (data->m_iDlgFlags & DLG_SHOW_LIST_ICONS) - { - cbei.iImage = I_ICON_HIST; - cbei.iSelectedImage = I_ICON_HIST; - } - else - cbei.iIndent = 0; - cbei.lParam = MAKELPARAM(HISTORY_MSG, j + 1); - - if (SendMessage(handle, CBEM_INSERTITEM, 0, (LPARAM)&cbei) == -1) - { - DBFreeVariant(&dbv); - break; - } - } - DBFreeVariant(&dbv); - } - } - - data->m_bIsMsgHistory = found; - - if ((data->m_iDlgFlags & DLG_SHOW_BUTTONS) || (data->m_iDlgFlags & DLG_SHOW_BUTTONS_FLAT)) - { - if (found) - { - if (!IsWindowEnabled(GetDlgItem(hwndDlg, IDC_BCLEAR))) - EnableWindow(GetDlgItem(hwndDlg, IDC_BCLEAR), TRUE); - } - else if (IsWindowEnabled(GetDlgItem(hwndDlg, IDC_BCLEAR))) - EnableWindow(GetDlgItem(hwndDlg, IDC_BCLEAR), FALSE); - } - else if (data->m_iDlgFlags & DLG_SHOW_BUTTONS_INLIST) - { - if (found) - { - if (data->m_iDlgFlags & DLG_SHOW_LIST_ICONS) - { - mir_sntprintf(text, SIZEOF(text), TranslateT("Clear History")); - cbei.iImage = I_ICON_CLEAR; - cbei.iSelectedImage = I_ICON_CLEAR; - } - else - { - mir_sntprintf(text, SIZEOF(text), _T("## %s ##"), TranslateT("Clear History")); - cbei.iIndent = 1; - } - cbei.iItem = -1; - cbei.pszText = (LPTSTR)text; - cbei.cchTextMax = SIZEOF(text); - cbei.lParam = MAKELPARAM(CLEAR_HISTORY, 0); - SendMessage(handle, CBEM_INSERTITEM, 0, (LPARAM)&cbei); - } - - cbei.iItem = -1; - if (data->m_iDlgFlags & DLG_SHOW_LIST_ICONS) - { - mir_sntprintf(text, SIZEOF(text), TranslateT("Add to Predefined")); - cbei.iImage = I_ICON_ADD; - cbei.iSelectedImage = I_ICON_ADD; - } - else - { - mir_sntprintf(text, SIZEOF(text), _T("## %s ##"), TranslateT("Add to Predefined")); - cbei.iIndent = 1; - } - cbei.pszText = (LPTSTR)text; - cbei.cchTextMax = SIZEOF(text); - cbei.lParam = MAKELPARAM(ADD_MSG, 0); - SendMessage(handle, CBEM_INSERTITEM, 0, (LPARAM)&cbei); - - if (data->m_iDlgFlags & DLG_SHOW_LIST_ICONS) - { - mir_sntprintf(text, SIZEOF(text), TranslateT("Delete Selected")); - cbei.iImage = I_ICON_DEL; - cbei.iSelectedImage = I_ICON_DEL; - } - else - { - cbei.iIndent = 1; - mir_sntprintf(text, SIZEOF(text), _T("## %s ##"), TranslateT("Delete Selected")); - } - cbei.iItem = -1; - cbei.pszText = (LPTSTR)text; - cbei.cchTextMax = SIZEOF(text); - cbei.lParam = MAKELPARAM(DELETE_SELECTED, 0); - SendMessage(handle, CBEM_INSERTITEM, 0, (LPARAM)&cbei); - } - - if ((data->m_iDlgFlags & DLG_SHOW_BUTTONS) || (data->m_iDlgFlags & DLG_SHOW_BUTTONS_FLAT)) - { - if (data->num_def_msgs || found) - { - if (!IsWindowEnabled(GetDlgItem(hwndDlg, IDC_BDEL))) - EnableWindow(GetDlgItem(hwndDlg, IDC_BDEL), TRUE); - } - else if (IsWindowEnabled(GetDlgItem(hwndDlg, IDC_BDEL))) - EnableWindow(GetDlgItem(hwndDlg, IDC_BDEL), FALSE); - } - - for (i = 1; i <= data->num_def_msgs; ++i) - { - // predefined messages - mir_snprintf(buff, SIZEOF(buff), "DefMsg%d", i); - if (!DBGetContactSettingTString(NULL, "SimpleStatusMsg", buff, &dbv)) - { - if (dbv.ptszVal) - { - if (!lstrlen(dbv.ptszVal)) - { - DBFreeVariant(&dbv); - continue; - } - - cbei.iItem = -1; - cbei.pszText = (LPTSTR)dbv.ptszVal; - cbei.cchTextMax = sizeof(dbv.ptszVal); - if (data->m_iDlgFlags & DLG_SHOW_LIST_ICONS) - { - cbei.iImage = I_ICON_MSG; - cbei.iSelectedImage = I_ICON_MSG; - } - else - cbei.iIndent = 0; - cbei.lParam = MAKELPARAM(PREDEFINED_MSG, i); - - if (SendMessage(handle,CBEM_INSERTITEM,0,(LPARAM)&cbei) == -1) - break; - } - DBFreeVariant(&dbv); - } - } - - if (DBGetContactSettingByte(NULL, "SimpleStatusMsg", "PutDefInList", 0)) - { - cbei.iItem = -1; - cbei.pszText = (LPTSTR)GetDefaultMessage(data->m_iStatus); - cbei.cchTextMax = sizeof(GetDefaultMessage(data->m_iStatus)); - if (data->m_iDlgFlags & DLG_SHOW_LIST_ICONS) - { - cbei.iImage = I_ICON_MSG; - cbei.iSelectedImage = I_ICON_MSG; - } - else - cbei.iIndent = 0; - cbei.lParam = MAKELPARAM(DEFAULT_MSG, 0); - - SendMessage(handle,CBEM_INSERTITEM,0,(LPARAM)&cbei); - } - - if (data->m_iDlgFlags & DLG_SHOW_LIST_ICONS) - SendMessage(handle, CBEM_SETIMAGELIST, 0, (LPARAM)data->other_icons); - if (!(data->m_iDlgFlags & DLG_SHOW_STATUS)) - { - SetWindowPos(handle, NULL, 11, 11, 290, 20, SWP_NOACTIVATE); - SendMessage(handle, CB_SETDROPPEDWIDTH, (WPARAM)290, 0); - } - else - { - SetWindowPos(handle, NULL, 127, 11, 174, 20, SWP_NOACTIVATE); - SendMessage(handle, CB_SETDROPPEDWIDTH, (WPARAM)250, 0); - } - SendMessage(handle, CB_SETITEMHEIGHT, (WPARAM)-1, (LPARAM)16); - SendMessage(handle, CB_SETITEMHEIGHT, (WPARAM)0, (LPARAM)16); - - if (((data->m_iDlgFlags & DLG_SHOW_BUTTONS) || (data->m_iDlgFlags & DLG_SHOW_BUTTONS_FLAT)) && !found && !data->num_def_msgs) - EnableWindow(handle, FALSE); - - if (((!(data->m_iDlgFlags & DLG_SHOW_BUTTONS)) && (!(data->m_iDlgFlags & DLG_SHOW_BUTTONS_FLAT)) && (!(data->m_iDlgFlags & DLG_SHOW_BUTTONS_INLIST))) && !found && !data->num_def_msgs) - EnableWindow(handle, FALSE); - - return handle; -} - -VOID APIENTRY HandlePopupMenu(HWND hwnd, POINT pt, HWND edit_control) -{ - HMENU hmenu = LoadMenu(g_hInst, MAKEINTRESOURCE(IDR_EDITMENU)); - if (hmenu == NULL) - return; - - HMENU hmenuTrackPopup = GetSubMenu(hmenu, 0); - - TranslateMenu(hmenuTrackPopup); - - ClientToScreen(hwnd, (LPPOINT) &pt); - - LPDWORD sel_s = NULL, sel_e = NULL; - SendMessage(edit_control, EM_GETSEL, (WPARAM)&sel_s, (LPARAM)&sel_e); - if (sel_s == sel_e) - { - EnableMenuItem(hmenuTrackPopup, IDM_COPY, MF_BYCOMMAND | MF_GRAYED); - EnableMenuItem(hmenuTrackPopup, IDM_CUT, MF_BYCOMMAND | MF_GRAYED); - } - if (SendMessage(edit_control, WM_GETTEXTLENGTH, 0, 0) == 0) - EnableMenuItem(hmenuTrackPopup, IDM_DELETE, MF_BYCOMMAND | MF_GRAYED); - - if (ServiceExists(MS_VARS_FORMATSTRING)) - DeleteMenu(hmenuTrackPopup, ID__VARIABLES, MF_BYCOMMAND); - else - DeleteMenu(hmenuTrackPopup, 8, MF_BYPOSITION); - - if (ServiceExists(MS_FORTUNEMSG_GETSTATUSMSG)) - DeleteMenu(hmenuTrackPopup, ID__FORTUNEAWAYMSG, MF_BYCOMMAND); - else - DeleteMenu(hmenuTrackPopup, 7, MF_BYPOSITION); - - int m_selection = TrackPopupMenu(hmenuTrackPopup, TPM_LEFTALIGN | TPM_RETURNCMD, pt.x, pt.y, 0, hwnd, NULL); - switch (m_selection) - { - case IDM_COPY: - SendMessage(edit_control, WM_COPY, 0, 0); - break; - - case IDM_CUT: - SendMessage(edit_control, WM_CUT, 0, 0); - break; - - case IDM_PASTE: - SendMessage(edit_control, WM_PASTE, 0, 0); - break; - - case IDM_SELECTALL: - SendMessage(edit_control, EM_SETSEL, 0, -1); - break; - - case IDM_DELETE: - SendMessage(edit_control, WM_SETTEXT, 0, (LPARAM)""); - SendMessage(GetParent(hwnd), WM_COMMAND, MAKEWPARAM(IDC_EDIT1, EN_CHANGE), (LPARAM)edit_control); - break; - - case ID__FORTUNEAWAYMSG: - CallService(MS_UTILS_OPENURL,1,(LPARAM)"http://nightly.miranda.im/"); - break; - - case ID__VARIABLES: - - CallService(MS_UTILS_OPENURL,1,(LPARAM)"http://nightly.miranda.im/"); - - break; - - case ID__VARIABLES_MOREVARIABLES: - { - VARHELPINFO vhi = {0}; - vhi.cbSize = sizeof(vhi); - vhi.flags = VHF_FULLDLG | VHF_SETLASTSUBJECT; - vhi.hwndCtrl = edit_control; - vhi.szSubjectDesc = NULL; - vhi.szExtraTextDesc = NULL; - CallService(MS_VARS_SHOWHELPEX, (WPARAM)hwnd, (LPARAM)&vhi); - break; - } - - default: - if (!OpenClipboard(GetParent(hwnd))) break; - if (EmptyClipboard()) - { - TCHAR item_string[128]; - int len; - - GetMenuString(hmenu, m_selection, (LPTSTR)&item_string, 128, MF_BYCOMMAND); - len = lstrlen(item_string); - if (len) - { - LPTSTR lptstrCopy; - HGLOBAL hglbCopy = GlobalAlloc(GMEM_MOVEABLE, (len + 1) * sizeof(TCHAR)); - if (hglbCopy == NULL) - { - CloseClipboard(); - break; - } - lptstrCopy = (LPTSTR)GlobalLock(hglbCopy); - memcpy(lptstrCopy, item_string, len * sizeof(TCHAR)); - lptstrCopy[len] = (TCHAR)0; - GlobalUnlock(hglbCopy); - - SetClipboardData(CF_UNICODETEXT, hglbCopy); - - } - } - CloseClipboard(); - SendMessage(edit_control, WM_PASTE, 0, 0); - break; - } - DestroyMenu(hmenu); -} - -static WNDPROC MainDlgProc; - -static LRESULT CALLBACK EditBoxSubProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) -{ - switch (uMsg) - { - case WM_CONTEXTMENU: - { - POINT pt = {(LONG)LOWORD(lParam), (LONG)HIWORD(lParam)}; - RECT rc; - GetClientRect(hwndDlg, &rc); - - if (pt.x == -1 && pt.y == -1) - { - GetCursorPos(&pt); - if (!PtInRect(&rc, pt)) - { - pt.x = rc.left + (rc.right - rc.left) / 2; - pt.y = rc.top + (rc.bottom - rc.top) / 2; - } - } - else - ScreenToClient(hwndDlg, &pt); - - if (PtInRect(&rc, pt)) - HandlePopupMenu(hwndDlg, pt, GetDlgItem(GetParent(hwndDlg), IDC_EDIT1)); - - return 0; - } - - case WM_CHAR: - if (wParam=='\n' && GetKeyState(VK_CONTROL) & 0x8000) - { - PostMessage(GetParent(hwndDlg), WM_COMMAND, IDC_OK, 0); - return 0; - } - if (wParam == 1 && GetKeyState(VK_CONTROL) & 0x8000) // Ctrl + A - { - SendMessage(hwndDlg, EM_SETSEL, 0, -1); - return 0; - } - if (wParam == 23 && GetKeyState(VK_CONTROL) & 0x8000) // Ctrl + W - { - SendMessage(GetParent(hwndDlg), WM_COMMAND, IDC_CANCEL, 0); - return 0; - } - if (wParam == 127 && GetKeyState(VK_CONTROL) & 0x8000) // Ctrl + Backspace - { - DWORD start, end; - TCHAR *text; - int textLen; - SendMessage(hwndDlg, EM_GETSEL, (WPARAM)&end, (LPARAM)(PDWORD)NULL); - SendMessage(hwndDlg, WM_KEYDOWN, VK_LEFT, 0); - SendMessage(hwndDlg, EM_GETSEL, (WPARAM)&start, (LPARAM)(PDWORD)NULL); - textLen = GetWindowTextLength(hwndDlg); - text = (TCHAR *)mir_alloc(sizeof(TCHAR) * (textLen + 1)); - GetWindowText(hwndDlg, text, textLen + 1); - MoveMemory(text + start, text + end, sizeof(TCHAR) * (textLen + 1 - end)); - SetWindowText(hwndDlg, text); - mir_free(text); - SendMessage(hwndDlg, EM_SETSEL, start, start); - SendMessage(GetParent(hwndDlg), WM_COMMAND, MAKEWPARAM(GetDlgCtrlID(hwndDlg), EN_CHANGE), (LPARAM)hwndDlg); - return 0; - } - break; - - case WM_LBUTTONDBLCLK: - { - MsgEditCtrl* mec = (MsgEditCtrl*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA); - if (mec != NULL) - { - mec->ctLastDblClk = clock(); - mec->uClocksPerDblClk = GetDoubleClickTime() * CLOCKS_PER_SEC / 1000; - SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)mec); - } - break; - } - - case WM_LBUTTONDOWN: - { - MsgEditCtrl* mec = (MsgEditCtrl*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA); - if (mec != NULL && UINT(clock() - mec->ctLastDblClk) < mec->uClocksPerDblClk) - { - SendMessage(hwndDlg, EM_SETSEL, 0, -1); - return 0; - } - break; - } - - case WM_SETFOCUS: - { - MsgEditCtrl* mec = (MsgEditCtrl*)mir_calloc(sizeof(MsgEditCtrl)); - SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)mec); - break; - } - - case WM_KILLFOCUS: - { - MsgEditCtrl* mec = (MsgEditCtrl*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA); - mir_free(mec); - mec = NULL; - SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)mec); - break; - } - } - - return CallWindowProc(MainDlgProc, hwndDlg, uMsg, wParam, lParam); -} - -int AddToPredefined(HWND hwndDlg, struct MsgBoxData *data) -{ - COMBOBOXEXITEM newitem = {0}; - int len = 0, num_items; - TCHAR msg[1024], text[1024]; - - if (IsWindowEnabled(GetDlgItem(hwndDlg, IDC_EDIT1))) - len = GetDlgItemText(hwndDlg, IDC_EDIT1, msg, SIZEOF(msg)); - - if (!len) - return -1; - - num_items = SendMessage(data->recent_cbex, CB_GETCOUNT, 0, 0) - 1; - for (int i = 1; i <= data->num_def_msgs; i++, num_items--) - { - newitem.mask = CBEIF_LPARAM | CBEIF_TEXT; - newitem.iItem = num_items; - newitem.cchTextMax = SIZEOF(text); - newitem.pszText = text; - - SendMessage(data->recent_cbex, CBEM_GETITEM, 0, (LPARAM)&newitem); - if (LOWORD(newitem.lParam) == PREDEFINED_MSG && !lstrcmp(text, msg)) - return num_items; - } - - data->num_def_msgs++; - data->m_bPredefChanged = TRUE; - - newitem.iItem = -1; - newitem.pszText = (LPTSTR)msg; - newitem.cchTextMax = SIZEOF(msg); - if (data->m_iDlgFlags & DLG_SHOW_LIST_ICONS) - { - newitem.mask = CBEIF_LPARAM | CBEIF_TEXT | CBEIF_IMAGE | CBEIF_SELECTEDIMAGE; - newitem.iImage = I_ICON_MSG; - newitem.iSelectedImage = I_ICON_MSG; - } - else - { - newitem.mask = CBEIF_LPARAM | CBEIF_TEXT | CBEIF_INDENT; - newitem.iIndent = 0; - } - newitem.lParam = MAKELPARAM(PREDEFINED_MSG, 0); - return SendMessage(data->recent_cbex, CBEM_INSERTITEM, 0, (LPARAM)&newitem); -} - -void ClearHistory(struct MsgBoxData *data, int cur_sel) -{ - COMBOBOXEXITEM histitem = {0}; - int i, num_items; - char text[16], buff2[80]; - - for (i = 1; i <= data->max_hist_msgs; i++) - { - mir_snprintf(text, SIZEOF(text), "SMsg%d", i); - DBWriteContactSettingTString(NULL, "SimpleStatusMsg", text, _T("")); - } - DBWriteContactSettingString(NULL, "SimpleStatusMsg", "LastMsg", ""); - for (i = 0; i < accounts->count; i++) - { - if (!IsAccountEnabled(accounts->pa[i])) - continue; - - if (!CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_3, 0)) - continue; - - if (!(CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_MODEMSGSEND)) - continue; - - mir_snprintf(buff2, SIZEOF(buff2), "Last%sMsg", accounts->pa[i]->szModuleName); - DBWriteContactSettingString(NULL, "SimpleStatusMsg", buff2, ""); - } - DBWriteContactSettingWord(NULL, "SimpleStatusMsg", "LMMsg", (WORD)data->max_hist_msgs); - SendMessage(data->recent_cbex, CB_SETCURSEL, -1, 0); - num_items = SendMessage(data->recent_cbex, CB_GETCOUNT, 0, 0); - if (num_items == CB_ERR) - return; - - if ((!(data->m_iDlgFlags & DLG_SHOW_BUTTONS)) && (!(data->m_iDlgFlags & DLG_SHOW_BUTTONS_FLAT))) - SendMessage(data->recent_cbex, CBEM_DELETEITEM, (WPARAM)cur_sel, 0); - - for (i = num_items; i >= 0; i--) - { - histitem.mask = CBEIF_LPARAM; - histitem.iItem = i; - SendMessage(data->recent_cbex, CBEM_GETITEM, 0, (LPARAM)&histitem); - if (LOWORD(histitem.lParam) == HISTORY_MSG) - SendMessage(data->recent_cbex, CBEM_DELETEITEM, (WPARAM)i, 0); - } -} - -void DisplayCharsCount(struct MsgBoxData *dlg_data, HWND hwndDlg) -{ - TCHAR msg[1024]; - TCHAR status_text[128]; - int len, lines = 1; - - if (dlg_data->m_iCountdown != -2) - return; - - len = GetDlgItemText(hwndDlg, IDC_EDIT1, msg, SIZEOF(msg)); - if (DBGetContactSettingByte(NULL, "SimpleStatusMsg", "RemoveCR", 0)) - { - int index, num_lines = SendMessage(GetDlgItem(hwndDlg, IDC_EDIT1), EM_GETLINECOUNT, 0, 0); - for (int i = 1; i < num_lines; ++i) - { - index = SendMessage(GetDlgItem(hwndDlg, IDC_EDIT1), EM_LINEINDEX, (WPARAM)i, 0); - if (msg[index - 1] == '\n') lines++; - } - } - mir_sntprintf(status_text, SIZEOF(status_text), TranslateT("OK (%d)"), len - (lines - 1)); - SendMessage(GetDlgItem(hwndDlg, IDC_OK), WM_SETTEXT, 0, (LPARAM)status_text); -} - -void SetEditControlText(struct MsgBoxData *data, HWND hwndDlg, int iStatus) -{ - int flags, fcursel = CB_ERR, num_start; - DBVARIANT dbv, dbv2; - char setting[80]; - - num_start = SendMessage(data->recent_cbex, CB_GETCOUNT, 0, 0); - num_start -= data->num_def_msgs + 1; - - mir_snprintf(setting, SIZEOF(setting), "%sFlags", data->m_szProto ? data->m_szProto : ""); - flags = DBGetContactSettingByte(NULL, "SimpleStatusMsg", (char *)StatusModeToDbSetting(iStatus, setting), STATUS_DEFAULT); - - if (flags & STATUS_LAST_MSG) - { - if (data->m_szProto) - mir_snprintf(setting, SIZEOF(setting), "Last%sMsg", data->m_szProto); - else - mir_snprintf(setting, SIZEOF(setting), "LastMsg"); - - if (!DBGetContactSetting(NULL, "SimpleStatusMsg", setting, &dbv)) - { - if (dbv.pszVal) - { - if (strlen(dbv.pszVal) && !DBGetContactSettingTString(NULL, "SimpleStatusMsg", dbv.pszVal, &dbv2)) - { - if (dbv2.ptszVal && lstrlen(dbv2.ptszVal)) - { - SetDlgItemText(hwndDlg, IDC_EDIT1, dbv2.ptszVal); - fcursel = SendMessage(data->recent_cbex, CB_FINDSTRINGEXACT, num_start, (LPARAM)dbv2.ptszVal); - if (fcursel != CB_ERR) - SendMessage(data->recent_cbex, CB_SETCURSEL, (WPARAM)fcursel, 0); - } - DBFreeVariant(&dbv2); - } - } - DBFreeVariant(&dbv); - } - } - else if (flags & STATUS_DEFAULT_MSG) - { - SetDlgItemText(hwndDlg, IDC_EDIT1, GetDefaultMessage(iStatus)); - - if (DBGetContactSettingByte(NULL, "SimpleStatusMsg", "PutDefInList", 0)) - { - fcursel = SendMessage(data->recent_cbex, CB_FINDSTRINGEXACT, num_start, (LPARAM)GetDefaultMessage(iStatus)); - if (fcursel != CB_ERR) - SendMessage(data->recent_cbex, CB_SETCURSEL, (WPARAM)fcursel, 0); - } - } - else if (flags & STATUS_THIS_MSG) - { - if (data->m_szProto) - mir_snprintf(setting, SIZEOF(setting), "%sDefault", data->m_szProto); - else - mir_snprintf(setting, SIZEOF(setting), "Default"); - - if (!DBGetContactSettingTString(NULL, "SRAway", StatusModeToDbSetting(iStatus, setting), &dbv)) - { - SetDlgItemText(hwndDlg, IDC_EDIT1, dbv.ptszVal); - fcursel = SendMessage(data->recent_cbex, CB_FINDSTRINGEXACT, num_start, (LPARAM)dbv.ptszVal); - if (fcursel != CB_ERR) - SendMessage(data->recent_cbex, CB_SETCURSEL, (WPARAM)fcursel, 0); - DBFreeVariant(&dbv); - } - } - else if (flags & STATUS_LAST_STATUS_MSG) - { - if (data->m_szProto) - mir_snprintf(setting, SIZEOF(setting), "%sMsg", data->m_szProto); - else - mir_snprintf(setting, SIZEOF(setting), "Msg"); - - if (!DBGetContactSettingTString(NULL, "SRAway", StatusModeToDbSetting(iStatus, setting), &dbv)) - { - SetDlgItemText(hwndDlg, IDC_EDIT1, dbv.ptszVal); - fcursel = SendMessage(data->recent_cbex, CB_FINDSTRINGEXACT, num_start, (LPARAM)dbv.ptszVal); - if (fcursel != CB_ERR) - SendMessage(data->recent_cbex, CB_SETCURSEL, (WPARAM)fcursel, 0); - DBFreeVariant(&dbv); - } - } - - if (fcursel != CB_ERR) - data->curr_sel_msg = fcursel; -} - -void ChangeDlgStatus(HWND hwndDlg, struct MsgBoxData *msgbox_data, int iStatus) -{ - TCHAR szTitle[256], szProtoName[128]; - BOOL bDisabled = msgbox_data->m_szProto && !(CallProtoService(msgbox_data->m_szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_MODEMSGSEND); - - mir_sntprintf(szProtoName, SIZEOF(szProtoName), msgbox_data->m_szProto ? ProtoGetAccount(msgbox_data->m_szProto)->tszAccountName : TranslateT("Global")); - if (iStatus == ID_STATUS_CURRENT) - { - if (msgbox_data->m_bOnStartup) - mir_sntprintf(szTitle, SIZEOF(szTitle), TranslateT("%s Message (%s)"), TranslateT(""), szProtoName); - else - mir_sntprintf(szTitle, SIZEOF(szTitle), TranslateT("%s Message (%s)"), TranslateT(""), szProtoName); - } - else if (iStatus > ID_STATUS_CURRENT) - { - TCHAR buff[128]; - - char buff1[128]; - CallService(MS_SS_GETPROFILENAME, iStatus - 40083, (LPARAM)buff1); - MultiByteToWideChar(CallService(MS_LANGPACK_GETCODEPAGE, 0, 0), 0, buff1, -1, buff, 128); - - mir_sntprintf(szTitle, SIZEOF(szTitle), TranslateT("%s Message (%s)"), (TCHAR*)buff, szProtoName); - } - else - mir_sntprintf(szTitle, SIZEOF(szTitle), TranslateT("%s Message (%s)"), (TCHAR*)CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, iStatus, GSMDF_TCHAR), szProtoName); - SetWindowText(hwndDlg, szTitle); - - if (iStatus == ID_STATUS_CURRENT) - iStatus = msgbox_data->m_bOnStartup ? GetStartupStatus(msgbox_data->m_szProto) : GetCurrentStatus(msgbox_data->m_szProto); - else if (iStatus > ID_STATUS_CURRENT) - iStatus = GetCurrentStatus(NULL); - - CallService(MS_SKIN2_RELEASEICON, (WPARAM)SendMessage(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)LoadSkinnedProtoIcon(msgbox_data->m_szProto, iStatus)), 0); - CallService(MS_SKIN2_RELEASEICON, (WPARAM)SendMessage(hwndDlg, WM_SETICON, ICON_SMALL, (LPARAM)LoadSkinnedProtoIcon(msgbox_data->m_szProto, iStatus)) , 0); - - if (!bDisabled && ((Proto_Status2Flag(iStatus) & msgbox_data->m_iStatusMsgModes) - || (iStatus == ID_STATUS_OFFLINE && (Proto_Status2Flag(ID_STATUS_INVISIBLE) & msgbox_data->m_iStatusMsgModes)))) - { - int num_items = SendMessage(msgbox_data->recent_cbex, CB_GETCOUNT, 0, 0); - int fcursel = CB_ERR, num_start = num_items - msgbox_data->num_def_msgs - 1; - TCHAR msg[1024]; - - if (!IsWindowEnabled(GetDlgItem(hwndDlg, IDC_EDIT1))) - EnableWindow(GetDlgItem(hwndDlg, IDC_EDIT1), TRUE); - - if (!IsWindowEnabled(msgbox_data->recent_cbex) && num_items) - EnableWindow(msgbox_data->recent_cbex, TRUE); - - // TODO what if num_start <= 0 ? - if (GetDlgItemText(hwndDlg, IDC_EDIT1, msg, SIZEOF(msg))) - fcursel = SendMessage(msgbox_data->recent_cbex, CB_FINDSTRINGEXACT, num_start, (LPARAM)msg); - if (fcursel != CB_ERR) - { - SendMessage(msgbox_data->recent_cbex, CB_SETCURSEL, fcursel, 0); - msgbox_data->curr_sel_msg = fcursel; - } - - if ((msgbox_data->m_iDlgFlags & DLG_SHOW_BUTTONS) || (msgbox_data->m_iDlgFlags & DLG_SHOW_BUTTONS_FLAT)) - { - if (!GetDlgItemText(hwndDlg, IDC_EDIT1, msg, SIZEOF(msg))) - { - if (IsWindowEnabled(GetDlgItem(hwndDlg, IDC_BADD))) - EnableWindow(GetDlgItem(hwndDlg, IDC_BADD), FALSE); - } - else if (!IsWindowEnabled(GetDlgItem(hwndDlg, IDC_BADD))) - EnableWindow(GetDlgItem(hwndDlg, IDC_BADD), TRUE); - if (num_items) - { - if (msgbox_data->curr_sel_msg == -1) - { - if (IsWindowEnabled(GetDlgItem(hwndDlg, IDC_BDEL))) - EnableWindow(GetDlgItem(hwndDlg, IDC_BDEL), FALSE); - } - else - { - COMBOBOXEXITEM cbitem = {0}; - cbitem.mask = CBEIF_LPARAM | CBEIF_TEXT; - cbitem.iItem = msgbox_data->curr_sel_msg; - cbitem.cchTextMax = SIZEOF(msg); - cbitem.pszText = msg; - SendMessage(msgbox_data->recent_cbex, CBEM_GETITEM, 0, (LPARAM)&cbitem); - if (LOWORD(cbitem.lParam) == PREDEFINED_MSG) - { - if (IsWindowEnabled(GetDlgItem(hwndDlg, IDC_BADD))) - EnableWindow(GetDlgItem(hwndDlg, IDC_BADD), FALSE); - } - else if (!IsWindowEnabled(GetDlgItem(hwndDlg, IDC_BADD))) - EnableWindow(GetDlgItem(hwndDlg, IDC_BADD), TRUE); - - if (!IsWindowEnabled(GetDlgItem(hwndDlg, IDC_BDEL))) - EnableWindow(GetDlgItem(hwndDlg, IDC_BDEL), TRUE); - } - - if (msgbox_data->m_bIsMsgHistory && !IsWindowEnabled(GetDlgItem(hwndDlg, IDC_BCLEAR))) - EnableWindow(GetDlgItem(hwndDlg, IDC_BCLEAR), TRUE); - } - } - } - else - { - if (IsWindowEnabled(GetDlgItem(hwndDlg, IDC_EDIT1))) - EnableWindow(GetDlgItem(hwndDlg, IDC_EDIT1), FALSE); - if (IsWindowEnabled(msgbox_data->recent_cbex)) - EnableWindow(msgbox_data->recent_cbex, FALSE); - - if ((msgbox_data->m_iDlgFlags & DLG_SHOW_BUTTONS) || (msgbox_data->m_iDlgFlags & DLG_SHOW_BUTTONS_FLAT)) - { - if (IsWindowEnabled(GetDlgItem(hwndDlg, IDC_BADD))) - EnableWindow(GetDlgItem(hwndDlg, IDC_BADD), FALSE); - if (IsWindowEnabled(GetDlgItem(hwndDlg, IDC_BCLEAR))) - EnableWindow(GetDlgItem(hwndDlg, IDC_BCLEAR), FALSE); - if (IsWindowEnabled(GetDlgItem(hwndDlg, IDC_BDEL))) - EnableWindow(GetDlgItem(hwndDlg, IDC_BDEL), FALSE); - } - } -} - -#define DM_SIMPAWAY_SHUTDOWN (WM_USER + 10) -#define DM_SIMPAWAY_CHANGEICONS (WM_USER + 11) - -INT_PTR CALLBACK AwayMsgBoxDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) -{ - struct MsgBoxData *msgbox_data = (struct MsgBoxData*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA); - - switch (uMsg) - { - case WM_INITDIALOG: - { - TCHAR szTitle[256], szFormat[256], szProtoName[128]; - struct MsgBoxInitData *init_data; - struct MsgBoxData *copy_init_data; - INITCOMMONCONTROLSEX icex = {0}; - BOOL bCurrentStatus = FALSE, bDisabled = FALSE; - - InitCommonControls(); - icex.dwSize = sizeof(INITCOMMONCONTROLSEX); - icex.dwICC = ICC_USEREX_CLASSES; - InitCommonControlsEx(&icex); - - TranslateDialogDefault(hwndDlg); - init_data = (struct MsgBoxInitData*)lParam; - GetWindowText(hwndDlg, szFormat, SIZEOF(szFormat)); - mir_sntprintf(szProtoName, SIZEOF(szProtoName), init_data->m_szProto ? ProtoGetAccount(init_data->m_szProto)->tszAccountName : TranslateT("Global")); - - if (init_data->m_iStatus == ID_STATUS_CURRENT) - { - if (init_data->m_bOnStartup) - mir_sntprintf(szTitle, SIZEOF(szTitle), szFormat, TranslateT(""), szProtoName); - else - mir_sntprintf(szTitle, SIZEOF(szTitle), szFormat, TranslateT(""), szProtoName); - } - else - mir_sntprintf(szTitle, SIZEOF(szTitle), szFormat, (TCHAR*)CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, init_data->m_iStatus, GSMDF_TCHAR), szProtoName); - SetWindowText(hwndDlg, szTitle); - - int icoStatus = ID_STATUS_OFFLINE; - if (init_data->m_iStatus == ID_STATUS_CURRENT) - icoStatus = init_data->m_bOnStartup ? GetStartupStatus(init_data->m_szProto) : GetCurrentStatus(init_data->m_szProto); - else - icoStatus = init_data->m_iStatus; - if (icoStatus < ID_STATUS_OFFLINE) - icoStatus = ID_STATUS_OFFLINE; - SendMessage(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)LoadSkinnedProtoIcon(init_data->m_szProto, icoStatus)); - SendMessage(hwndDlg, WM_SETICON, ICON_SMALL, (LPARAM)LoadSkinnedProtoIcon(init_data->m_szProto, icoStatus)); - - copy_init_data = (struct MsgBoxData *)mir_alloc(sizeof(struct MsgBoxData)); - - SendDlgItemMessage(hwndDlg, IDC_EDIT1, EM_LIMITTEXT, 1024, 0); - - HookEventMessage(ME_SYSTEM_PRESHUTDOWN, hwndDlg, DM_SIMPAWAY_SHUTDOWN); - HookEventMessage(ME_SKIN2_ICONSCHANGED, hwndDlg, DM_SIMPAWAY_CHANGEICONS); - - copy_init_data->num_def_msgs = DBGetContactSettingWord(NULL, "SimpleStatusMsg", "DefMsgCount", 0); - copy_init_data->max_hist_msgs = DBGetContactSettingByte(NULL, "SimpleStatusMsg", "MaxHist", 10); - copy_init_data->m_iDlgFlags = DBGetContactSettingByte(NULL, "SimpleStatusMsg", "DlgFlags", DLG_SHOW_DEFAULT); - copy_init_data->m_szProto = init_data->m_szProto; - copy_init_data->m_iStatus = init_data->m_iStatus; - copy_init_data->m_iStatusModes = init_data->m_iStatusModes; - copy_init_data->m_iStatusMsgModes = init_data->m_iStatusMsgModes; - copy_init_data->m_iInitialStatus = init_data->m_iStatus; - copy_init_data->m_bOnStartup = init_data->m_bOnStartup; - - //Load Icons - copy_init_data->icon[I_ICON_DEL] = LoadIconEx("cross"); - copy_init_data->icon[I_ICON_HIST] = LoadIconEx("recent"); - copy_init_data->icon[I_ICON_MSG] = LoadIconEx("predef"); - copy_init_data->icon[I_ICON_ADD] = LoadIconEx("add"); - copy_init_data->icon[I_ICON_CLEAR] = LoadIconEx("clear"); - if (copy_init_data->m_iDlgFlags & DLG_SHOW_STATUS_ICONS) - copy_init_data->status_icons = AddStatusIconsToImageList(init_data->m_szProto, copy_init_data->m_iStatusModes); - if (copy_init_data->m_iDlgFlags & DLG_SHOW_LIST_ICONS) - copy_init_data->other_icons = AddOtherIconsToImageList(copy_init_data); - - if ((copy_init_data->m_iDlgFlags & DLG_SHOW_BUTTONS) || (copy_init_data->m_iDlgFlags & DLG_SHOW_BUTTONS_FLAT)) - { - SendMessage(GetDlgItem(hwndDlg, IDC_BADD), BUTTONADDTOOLTIP, (WPARAM)Translate("Add to Predefined"), 0); - SendMessage(GetDlgItem(hwndDlg, IDC_BADD), BM_SETIMAGE, IMAGE_ICON, (LPARAM)copy_init_data->icon[I_ICON_ADD]); - EnableWindow(GetDlgItem(hwndDlg, IDC_BADD), TRUE); - ShowWindow(GetDlgItem(hwndDlg, IDC_BADD), TRUE); - - SendMessage(GetDlgItem(hwndDlg, IDC_BDEL), BUTTONADDTOOLTIP, (WPARAM)Translate("Delete Selected"), 0); - SendMessage(GetDlgItem(hwndDlg, IDC_BDEL), BM_SETIMAGE, IMAGE_ICON, (LPARAM)copy_init_data->icon[I_ICON_DEL]); - ShowWindow(GetDlgItem(hwndDlg, IDC_BDEL), TRUE); - - SendMessage(GetDlgItem(hwndDlg, IDC_BCLEAR), BUTTONADDTOOLTIP, (WPARAM)Translate("Clear History"), 0); - SendMessage(GetDlgItem(hwndDlg, IDC_BCLEAR), BM_SETIMAGE, IMAGE_ICON, (LPARAM)copy_init_data->icon[I_ICON_CLEAR]); - ShowWindow(GetDlgItem(hwndDlg, IDC_BCLEAR), TRUE); - - if (copy_init_data->m_iDlgFlags & DLG_SHOW_BUTTONS_FLAT) - { - SendMessage(GetDlgItem(hwndDlg, IDC_BADD), BUTTONSETASFLATBTN, TRUE, 0); - SendMessage(GetDlgItem(hwndDlg, IDC_BDEL), BUTTONSETASFLATBTN, TRUE, 0); - SendMessage(GetDlgItem(hwndDlg, IDC_BCLEAR), BUTTONSETASFLATBTN, TRUE, 0); - } - } - else - { - SetWindowPos(GetDlgItem(hwndDlg, IDC_OK), NULL, 52, 115, 0, 0, SWP_NOSIZE|SWP_NOZORDER); - SetWindowPos(GetDlgItem(hwndDlg, IDC_CANCEL), NULL, 160, 115, 0, 0, SWP_NOSIZE|SWP_NOZORDER); - ShowWindow(GetDlgItem(hwndDlg, IDC_BADD), FALSE); - ShowWindow(GetDlgItem(hwndDlg, IDC_BDEL), FALSE); - ShowWindow(GetDlgItem(hwndDlg, IDC_BCLEAR), FALSE); - } - copy_init_data->status_cbex = CreateStatusComboBoxEx(hwndDlg, copy_init_data); - - if (copy_init_data->m_iStatus == ID_STATUS_CURRENT) - { - if (copy_init_data->m_bOnStartup) - copy_init_data->m_iStatus = GetStartupStatus(copy_init_data->m_szProto); - else - copy_init_data->m_iStatus = GetCurrentStatus(copy_init_data->m_szProto); - if (copy_init_data->m_szProto == NULL) - bCurrentStatus = TRUE; - } - - copy_init_data->recent_cbex = CreateRecentComboBoxEx(hwndDlg, copy_init_data); - copy_init_data->curr_sel_msg = -1; - copy_init_data->m_bPredefChanged = FALSE; - - SetEditControlText(copy_init_data, hwndDlg, copy_init_data->m_iStatus); - if ((copy_init_data->m_iDlgFlags & DLG_SHOW_BUTTONS) || (copy_init_data->m_iDlgFlags & DLG_SHOW_BUTTONS_FLAT)) - { - TCHAR msg[1024]; - - if (!GetDlgItemText(hwndDlg, IDC_EDIT1, msg, SIZEOF(msg))) - EnableWindow(GetDlgItem(hwndDlg, IDC_BADD), FALSE); - - if (copy_init_data->curr_sel_msg == -1) - { - if (IsWindowEnabled(GetDlgItem(hwndDlg, IDC_BDEL))) - EnableWindow(GetDlgItem(hwndDlg, IDC_BDEL), FALSE); - } - else - { - COMBOBOXEXITEM cbitem = {0}; - cbitem.mask = CBEIF_LPARAM|CBEIF_TEXT; - cbitem.iItem = copy_init_data->curr_sel_msg; - cbitem.cchTextMax = SIZEOF(msg); - cbitem.pszText = msg; - - SendMessage(copy_init_data->recent_cbex, CBEM_GETITEM, 0, (LPARAM)&cbitem); - if (LOWORD(cbitem.lParam) == PREDEFINED_MSG) - { - if (IsWindowEnabled(GetDlgItem(hwndDlg, IDC_BADD))) - EnableWindow(GetDlgItem(hwndDlg, IDC_BADD), FALSE); - } - else if (!IsWindowEnabled(GetDlgItem(hwndDlg, IDC_BADD))) - EnableWindow(GetDlgItem(hwndDlg, IDC_BADD), TRUE); - } - } - - SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)copy_init_data); - - if (copy_init_data->m_szProto && !(CallProtoService(copy_init_data->m_szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_MODEMSGSEND)) - bDisabled = TRUE; - - if (!(((Proto_Status2Flag(copy_init_data->m_iStatus) & copy_init_data->m_iStatusMsgModes) || - (copy_init_data->m_iStatus == ID_STATUS_OFFLINE && (Proto_Status2Flag(ID_STATUS_INVISIBLE) & copy_init_data->m_iStatusMsgModes))) && !bDisabled)) - { - if (IsWindowEnabled(GetDlgItem(hwndDlg, IDC_EDIT1))) - EnableWindow(GetDlgItem(hwndDlg, IDC_EDIT1), FALSE); - if (IsWindowEnabled(copy_init_data->recent_cbex)) - EnableWindow(copy_init_data->recent_cbex, FALSE); - - if ((copy_init_data->m_iDlgFlags & DLG_SHOW_BUTTONS) || (copy_init_data->m_iDlgFlags & DLG_SHOW_BUTTONS_FLAT)) - { - if (IsWindowEnabled(GetDlgItem(hwndDlg, IDC_BADD))) - EnableWindow(GetDlgItem(hwndDlg, IDC_BADD), FALSE); - if (IsWindowEnabled(GetDlgItem(hwndDlg, IDC_BCLEAR))) - EnableWindow(GetDlgItem(hwndDlg, IDC_BCLEAR), FALSE); - if (IsWindowEnabled(GetDlgItem(hwndDlg, IDC_BDEL))) - EnableWindow(GetDlgItem(hwndDlg, IDC_BDEL), FALSE); - } - } - - if (DBGetContactSettingByte(NULL, "SimpleStatusMsg", "AutoClose", 1) && init_data->m_bOnEvent) - { - copy_init_data->m_iCountdown = DBGetContactSettingByte(NULL, "SimpleStatusMsg", "DlgTime", 5); - SendMessage(hwndDlg, WM_TIMER, 0, 0); - SetTimer(hwndDlg, 1, 1000, 0); - } - else - { - copy_init_data->m_iCountdown = -2; - DisplayCharsCount(copy_init_data, hwndDlg); - } - - if (bCurrentStatus) - copy_init_data->m_iStatus = ID_STATUS_CURRENT; - - mir_free(init_data); - - MainDlgProc = (WNDPROC)SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_EDIT1), GWLP_WNDPROC, (LONG_PTR)EditBoxSubProc); - if (!init_data->m_bOnEvent && IsWindowEnabled(GetDlgItem(hwndDlg, IDC_EDIT1))) - { - SetFocus(GetDlgItem(hwndDlg, IDC_EDIT1)); - SendMessage(GetDlgItem(hwndDlg, IDC_EDIT1), EM_SETSEL, 0, -1); - } - else - SetFocus(GetDlgItem(hwndDlg, IDC_OK)); - - if (!DBGetContactSettingByte(NULL, "SimpleStatusMsg", "WinCentered", 1)) - { - WINDOWPLACEMENT wp; - int x, y; - - wp.length = sizeof(wp); - GetWindowPlacement(hwndDlg, &wp); - - x = (int)DBGetContactSettingDword(NULL, "SimpleStatusMsg", "Winx", -1); - y = (int)DBGetContactSettingDword(NULL, "SimpleStatusMsg", "Winy", -1); - - if (x !=- 1) - { - OffsetRect(&wp.rcNormalPosition, x - wp.rcNormalPosition.left, y - wp.rcNormalPosition.top); - wp.flags = 0; - SetWindowPlacement(hwndDlg, &wp); - } - } - return FALSE; - } - - case WM_TIMER: - if (msgbox_data->m_iCountdown == -1) - { - SendMessage(hwndDlg, WM_COMMAND, (WPARAM)IDC_OK, 0); - msgbox_data->m_iCountdown = -2; - DisplayCharsCount(msgbox_data, hwndDlg); - break; - } - else - { - TCHAR str[64]; - mir_sntprintf(str, SIZEOF(str), TranslateT("Closing in %d"), msgbox_data->m_iCountdown); - SetDlgItemText(hwndDlg, IDC_OK, str); - } - msgbox_data->m_iCountdown--; - break; - - case WM_COMMAND: - switch (LOWORD(wParam)) - { - case IDC_OK: - { - TCHAR tszMsg[1024]; - int iStatus, iMsgLen = 0, iProfileStatus = 0; - BOOL bCurrentStatus = FALSE; - - if (msgbox_data->m_iStatus == ID_STATUS_CURRENT) - { - msgbox_data->m_iStatus = msgbox_data->m_bOnStartup ? GetStartupStatus(msgbox_data->m_szProto) : GetCurrentStatus(msgbox_data->m_szProto); - if (msgbox_data->m_szProto == NULL) - bCurrentStatus = TRUE; - } - else if (msgbox_data->m_iStatus >= ID_STATUS_CURRENT) - { - iProfileStatus = msgbox_data->m_iStatus; - msgbox_data->m_iStatus = GetCurrentStatus(NULL); - } - - if (IsWindowEnabled(GetDlgItem(hwndDlg, IDC_EDIT1))) - iMsgLen = GetDlgItemText(hwndDlg, IDC_EDIT1, tszMsg, SIZEOF(tszMsg)); - - if (iMsgLen == 0) - { - char szSetting[80]; - if (msgbox_data->m_szProto) - { - mir_snprintf(szSetting, SIZEOF(szSetting), "Last%sMsg", msgbox_data->m_szProto); - DBWriteContactSettingString(NULL, "SimpleStatusMsg", szSetting, ""); - - mir_snprintf(szSetting, SIZEOF(szSetting), "%sMsg", msgbox_data->m_szProto); - DBWriteContactSettingTString(NULL, "SRAway", StatusModeToDbSetting(msgbox_data->m_iStatus, szSetting), _T("")); - } - else - { - DBWriteContactSettingString(NULL, "SimpleStatusMsg", "LastMsg", ""); - for (int j = 0; j < accounts->count; j++) - { - if (!IsAccountEnabled(accounts->pa[j])) - continue; - - if (!CallProtoService(accounts->pa[j]->szModuleName, PS_GETCAPS, PFLAGNUM_3, 0)) - continue; - - if (DBGetContactSettingByte(NULL, accounts->pa[j]->szModuleName, "LockMainStatus", 0)) - continue; - - if (!(CallProtoService(accounts->pa[j]->szModuleName, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_MODEMSGSEND)) - continue; - - mir_snprintf(szSetting, SIZEOF(szSetting), "Last%sMsg", accounts->pa[j]->szModuleName); - DBWriteContactSettingString(NULL, "SimpleStatusMsg", szSetting, ""); - - mir_snprintf(szSetting, SIZEOF(szSetting), "%sMsg", accounts->pa[j]->szModuleName); - iStatus = msgbox_data->m_bOnStartup ? GetStartupStatus(accounts->pa[j]->szModuleName) : GetCurrentStatus(accounts->pa[j]->szModuleName); - DBWriteContactSettingTString(NULL, "SRAway", StatusModeToDbSetting(iStatus, szSetting), _T("")); - } - - DBWriteContactSettingTString(NULL, "SRAway", StatusModeToDbSetting(msgbox_data->m_iStatus, "Msg"), _T("")); // for compatibility with some plugins - } - - if (bCurrentStatus) - SetStatusMessage(msgbox_data->m_szProto, msgbox_data->m_iInitialStatus, ID_STATUS_CURRENT, 0, msgbox_data->m_bOnStartup); - else if (iProfileStatus != 0) - SetStatusMessage(msgbox_data->m_szProto, msgbox_data->m_iInitialStatus, iProfileStatus, 0, FALSE); - else - SetStatusMessage(msgbox_data->m_szProto, msgbox_data->m_iInitialStatus, msgbox_data->m_iStatus, 0, msgbox_data->m_bOnStartup); - } - else - { - char buff[64], buff2[80]; - DBVARIANT dbv; - BOOL found = FALSE; - - for (int i = 1; i <= msgbox_data->max_hist_msgs; i++) - { - mir_snprintf(buff, SIZEOF(buff), "SMsg%d", i); - if (!DBGetContactSettingTString(NULL, "SimpleStatusMsg", buff, &dbv)) - { - if (!lstrcmp(dbv.ptszVal, tszMsg)) - { - found = TRUE; - if (msgbox_data->m_szProto) - { - mir_snprintf(buff2, SIZEOF(buff2), "Last%sMsg", msgbox_data->m_szProto); - DBWriteContactSettingString(NULL, "SimpleStatusMsg", buff2, buff); - - mir_snprintf(buff2, SIZEOF(buff2), "%sMsg", msgbox_data->m_szProto); - DBWriteContactSettingTString(NULL, "SRAway", StatusModeToDbSetting(msgbox_data->m_iStatus, buff2), tszMsg); - } - else - { - DBWriteContactSettingString(NULL, "SimpleStatusMsg", "LastMsg", buff); - for (int j = 0; j < accounts->count; j++) - { - if (!IsAccountEnabled(accounts->pa[j])) - continue; - - if (!CallProtoService(accounts->pa[j]->szModuleName, PS_GETCAPS, PFLAGNUM_3, 0)) - continue; - - if (DBGetContactSettingByte(NULL, accounts->pa[j]->szModuleName, "LockMainStatus", 0)) - continue; - - if (!(CallProtoService(accounts->pa[j]->szModuleName, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_MODEMSGSEND)) - continue; - - mir_snprintf(buff2, SIZEOF(buff2), "Last%sMsg", accounts->pa[j]->szModuleName); - DBWriteContactSettingString(NULL, "SimpleStatusMsg", buff2, buff); - - mir_snprintf(buff2, SIZEOF(buff2), "%sMsg", accounts->pa[j]->szModuleName); - iStatus = msgbox_data->m_bOnStartup ? GetStartupStatus(accounts->pa[j]->szModuleName) : GetCurrentStatus(accounts->pa[j]->szModuleName); - DBWriteContactSettingTString(NULL, "SRAway", StatusModeToDbSetting(iStatus, buff2), tszMsg); - } - } - DBFreeVariant(&dbv); - break; - } - } - } - - if (!found) - { - int last_modified_msg = DBGetContactSettingWord(NULL, "SimpleStatusMsg", "LMMsg", msgbox_data->max_hist_msgs); - - if (last_modified_msg == msgbox_data->max_hist_msgs) - last_modified_msg = 1; - else - last_modified_msg++; - - mir_snprintf(buff, SIZEOF(buff), "SMsg%d", last_modified_msg); - DBWriteContactSettingTString(NULL, "SimpleStatusMsg", buff, tszMsg); - - if (msgbox_data->m_szProto) - { - mir_snprintf(buff2, SIZEOF(buff2), "Last%sMsg", msgbox_data->m_szProto); - DBWriteContactSettingString(NULL, "SimpleStatusMsg", buff2, buff); - - mir_snprintf(buff2, SIZEOF(buff2), "%sMsg", msgbox_data->m_szProto); - DBWriteContactSettingTString(NULL, "SRAway", StatusModeToDbSetting(msgbox_data->m_iStatus, buff2), tszMsg); - } - else - { - DBWriteContactSettingString(NULL, "SimpleStatusMsg", "LastMsg", buff); - for (int j = 0; j < accounts->count; j++) - { - if (!IsAccountEnabled(accounts->pa[j])) - continue; - - if (!CallProtoService(accounts->pa[j]->szModuleName, PS_GETCAPS, PFLAGNUM_3, 0)) - continue; - - if (DBGetContactSettingByte(NULL, accounts->pa[j]->szModuleName, "LockMainStatus", 0)) - continue; - - if (!(CallProtoService(accounts->pa[j]->szModuleName, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_MODEMSGSEND)) - continue; - - mir_snprintf(buff2, SIZEOF(buff2), "Last%sMsg", accounts->pa[j]->szModuleName); - DBWriteContactSettingString(NULL, "SimpleStatusMsg", buff2, buff); - - mir_snprintf(buff2, SIZEOF(buff2), "%sMsg", accounts->pa[j]->szModuleName); - iStatus = msgbox_data->m_bOnStartup ? GetStartupStatus(accounts->pa[j]->szModuleName) : GetCurrentStatus(accounts->pa[j]->szModuleName); - DBWriteContactSettingTString(NULL, "SRAway", StatusModeToDbSetting(iStatus, buff2), tszMsg); - } - } - DBWriteContactSettingWord(NULL, "SimpleStatusMsg", "LMMsg", (WORD)last_modified_msg); - } - - if (!msgbox_data->m_szProto) - DBWriteContactSettingTString(NULL, "SRAway", StatusModeToDbSetting(msgbox_data->m_iStatus, "Msg"), tszMsg); // for compatibility with some plugins - - if (bCurrentStatus) - SetStatusMessage(msgbox_data->m_szProto, msgbox_data->m_iInitialStatus, ID_STATUS_CURRENT, tszMsg, msgbox_data->m_bOnStartup); - else if (iProfileStatus != 0) - SetStatusMessage(msgbox_data->m_szProto, msgbox_data->m_iInitialStatus, iProfileStatus, tszMsg, FALSE); - else - SetStatusMessage(msgbox_data->m_szProto, msgbox_data->m_iInitialStatus, msgbox_data->m_iStatus, tszMsg, msgbox_data->m_bOnStartup); - } - } - - case IDCANCEL: - case IDC_CANCEL: - DestroyWindow(hwndDlg); - return TRUE; - - case IDC_EDIT1: // Notification from the edit control - if (msgbox_data->m_iCountdown > -2) - { - KillTimer(hwndDlg, 1); - msgbox_data->m_iCountdown = -2; - DisplayCharsCount(msgbox_data, hwndDlg); - } - switch (HIWORD(wParam)) - { - case EN_CHANGE: - DisplayCharsCount(msgbox_data, hwndDlg); - SendMessage(msgbox_data->recent_cbex, CB_SETCURSEL, -1, 0); - if ((msgbox_data->m_iDlgFlags & DLG_SHOW_BUTTONS) || (msgbox_data->m_iDlgFlags & DLG_SHOW_BUTTONS_FLAT)) - { - TCHAR msg[1024]; - - if (IsWindowEnabled(GetDlgItem(hwndDlg, IDC_BDEL))) - EnableWindow(GetDlgItem(hwndDlg, IDC_BDEL), FALSE); - - if (!GetDlgItemText(hwndDlg, IDC_EDIT1, msg, SIZEOF(msg))) - { - if (IsWindowEnabled(GetDlgItem(hwndDlg, IDC_BADD))) - EnableWindow(GetDlgItem(hwndDlg, IDC_BADD), FALSE); - } - else if (!IsWindowEnabled(GetDlgItem(hwndDlg, IDC_BADD))) - EnableWindow(GetDlgItem(hwndDlg, IDC_BADD), TRUE); - } - break; - } - break; - } - - if ((HWND)lParam == msgbox_data->status_cbex) - { - if (msgbox_data->m_iCountdown > -2) - { - KillTimer(hwndDlg, 1); - msgbox_data->m_iCountdown = -2; - DisplayCharsCount(msgbox_data, hwndDlg); - } - switch (HIWORD(wParam)) - { - case CBN_SELENDOK: - case CBN_SELCHANGE: - { - COMBOBOXEXITEM cbitem = {0}; - - cbitem.mask = CBEIF_LPARAM; - cbitem.iItem = SendMessage(msgbox_data->status_cbex, CB_GETCURSEL, 0, 0); - SendMessage(msgbox_data->status_cbex, CBEM_GETITEM, 0, (LPARAM)&cbitem); - - msgbox_data->m_iStatus = cbitem.lParam; - ChangeDlgStatus(hwndDlg, msgbox_data, (int)cbitem.lParam); - - if (HIWORD(wParam) == CBN_SELENDOK && IsWindowEnabled(GetDlgItem(hwndDlg, IDC_EDIT1))) - SetFocus(GetDlgItem(hwndDlg, IDC_EDIT1)); - break; - } - } - } - - if ((HWND)lParam == msgbox_data->recent_cbex) - { - if (msgbox_data->m_iCountdown > -2) - { - KillTimer(hwndDlg, 1); - msgbox_data->m_iCountdown = -2; - DisplayCharsCount(msgbox_data, hwndDlg); - } - switch (HIWORD(wParam)) - { - case CBN_SELENDOK: - { - TCHAR text[1024]; - int cur_sel = SendMessage(msgbox_data->recent_cbex, CB_GETCURSEL, 0, 0); - COMBOBOXEXITEM cbitem = {0}; - - cbitem.mask = CBEIF_LPARAM | CBEIF_TEXT; - cbitem.iItem = cur_sel; - cbitem.cchTextMax = SIZEOF(text); - cbitem.pszText = text; - - SendMessage(msgbox_data->recent_cbex, CBEM_GETITEM, 0, (LPARAM)&cbitem); - if (LOWORD(cbitem.lParam) == HISTORY_MSG || LOWORD(cbitem.lParam) == PREDEFINED_MSG || LOWORD(cbitem.lParam) == DEFAULT_MSG) - { - SetDlgItemText(hwndDlg, IDC_EDIT1, text); - DisplayCharsCount(msgbox_data, hwndDlg); - if ((msgbox_data->m_iDlgFlags & DLG_SHOW_BUTTONS) || (msgbox_data->m_iDlgFlags & DLG_SHOW_BUTTONS_FLAT)) - { - if (!IsWindowEnabled(GetDlgItem(hwndDlg, IDC_BDEL))) - EnableWindow(GetDlgItem(hwndDlg, IDC_BDEL), TRUE); - if (LOWORD(cbitem.lParam) == PREDEFINED_MSG) - { - if (IsWindowEnabled(GetDlgItem(hwndDlg, IDC_BADD))) - EnableWindow(GetDlgItem(hwndDlg, IDC_BADD), FALSE); - } - else if (!IsWindowEnabled(GetDlgItem(hwndDlg, IDC_BADD))) - EnableWindow(GetDlgItem(hwndDlg, IDC_BADD), TRUE); - } - } - else if (LOWORD(cbitem.lParam) == CLEAR_HISTORY) - { - if (MessageBox(NULL, TranslateT("Are you sure you want to clear status message history?"), TranslateT("Confirm clearing history"), MB_ICONQUESTION | MB_YESNO) == IDYES) - { - ClearHistory(msgbox_data, cur_sel); - } - else if (IsWindowEnabled(GetDlgItem(hwndDlg, IDC_EDIT1))) - { - TCHAR msg[1024]; - int fcursel = CB_ERR, num_start; - num_start = SendMessage(msgbox_data->recent_cbex, CB_GETCOUNT, 0, 0); - num_start -= msgbox_data->num_def_msgs + 1; - GetDlgItemText(hwndDlg, IDC_EDIT1, msg, SIZEOF(msg)); - fcursel = SendMessage(msgbox_data->recent_cbex, CB_FINDSTRINGEXACT, num_start, (LPARAM)msg); - SendMessage(msgbox_data->recent_cbex, CB_SETCURSEL, fcursel, 0); - } - } - else if (LOWORD(cbitem.lParam) == DELETE_SELECTED) - { - COMBOBOXEXITEM histitem = {0}; - BOOL scursel = FALSE; - - histitem.mask = CBEIF_LPARAM; - histitem.iItem = msgbox_data->curr_sel_msg; - SendMessage(msgbox_data->recent_cbex, CBEM_GETITEM, 0, (LPARAM)&histitem); - - if (LOWORD(histitem.lParam) == HISTORY_MSG) - { - char szSetting[16]; - mir_snprintf(szSetting, SIZEOF(szSetting), "SMsg%d", (int)HIWORD(histitem.lParam)); - DBWriteContactSettingTString(NULL, "SimpleStatusMsg", szSetting, _T("")); - SendMessage(msgbox_data->recent_cbex, CBEM_DELETEITEM, (WPARAM)msgbox_data->curr_sel_msg, 0); - } - if (LOWORD(histitem.lParam) == PREDEFINED_MSG) - { - msgbox_data->m_bPredefChanged = TRUE; - SendMessage(msgbox_data->recent_cbex, CBEM_DELETEITEM, (WPARAM)msgbox_data->curr_sel_msg, 0); - } - - cur_sel = msgbox_data->curr_sel_msg; - while (!scursel) - { - if (cur_sel - 1 >= 0) - cur_sel--; - else - { - scursel = TRUE; - break; - } - histitem.mask = CBEIF_LPARAM; - histitem.iItem = cur_sel; - SendMessage(msgbox_data->recent_cbex, CBEM_GETITEM, 0, (LPARAM)&histitem); - - if ((LOWORD(histitem.lParam) != CLEAR_HISTORY) && (LOWORD(histitem.lParam) != DELETE_SELECTED) && (LOWORD(histitem.lParam) != ADD_MSG)) - scursel = TRUE; - } - msgbox_data->curr_sel_msg = cur_sel; - SendMessage(msgbox_data->recent_cbex, CB_SETCURSEL, (WPARAM)cur_sel, 0); - - histitem.mask = CBEIF_LPARAM | CBEIF_TEXT; - histitem.iItem = cur_sel; - histitem.cchTextMax = SIZEOF(text); - histitem.pszText = text; - - SendMessage(msgbox_data->recent_cbex, CBEM_GETITEM, 0, (LPARAM)&histitem); - if (LOWORD(histitem.lParam) == HISTORY_MSG || LOWORD(histitem.lParam) == PREDEFINED_MSG || LOWORD(histitem.lParam) == DEFAULT_MSG) - { - SetDlgItemText(hwndDlg, IDC_EDIT1, text); - DisplayCharsCount(msgbox_data, hwndDlg); - } - } - else if (LOWORD(cbitem.lParam) == ADD_MSG) - { - int sel = AddToPredefined(hwndDlg, msgbox_data); - if (sel != -1) - { - SendMessage(msgbox_data->recent_cbex, CB_SETCURSEL, (WPARAM)sel, 0); - msgbox_data->curr_sel_msg = sel; - } - else - SendMessage(msgbox_data->recent_cbex, CB_SETCURSEL, (WPARAM)msgbox_data->curr_sel_msg, 0); - break; - } - msgbox_data->curr_sel_msg = cur_sel; - - if (IsWindowEnabled(GetDlgItem(hwndDlg, IDC_EDIT1))) - { - SetFocus(GetDlgItem(hwndDlg, IDC_EDIT1)); - SendMessage(GetDlgItem(hwndDlg, IDC_EDIT1), EM_SETSEL, 0, -1); - } - break; - } - } - } - - if ((HWND)lParam == GetDlgItem(hwndDlg, IDC_BADD)) - { - switch (HIWORD(wParam)) - { - case BN_CLICKED: - { - int sel = AddToPredefined(hwndDlg, msgbox_data); - if (sel != -1) - { - if (!IsWindowEnabled(msgbox_data->recent_cbex)) - EnableWindow(msgbox_data->recent_cbex, TRUE); - if (!IsWindowEnabled(GetDlgItem(hwndDlg, IDC_BDEL))) - EnableWindow(GetDlgItem(hwndDlg, IDC_BDEL), TRUE); - if (IsWindowEnabled(GetDlgItem(hwndDlg, IDC_BADD))) - EnableWindow(GetDlgItem(hwndDlg, IDC_BADD), FALSE); - - SendMessage(msgbox_data->recent_cbex, CB_SETCURSEL, (WPARAM)sel, 0); - msgbox_data->curr_sel_msg = sel; - } - break; - } - } - } - - if ((HWND)lParam == GetDlgItem(hwndDlg, IDC_BCLEAR)) - { - switch (HIWORD(wParam)) - { - case BN_CLICKED: - if (MessageBox(NULL, TranslateT("Are you sure you want to clear status message history?"), TranslateT("Confirm clearing history"), MB_ICONQUESTION | MB_YESNO) == IDYES) - { - ClearHistory(msgbox_data, 0); - - int num_items = SendMessage(msgbox_data->recent_cbex, CB_GETCOUNT, 0, 0); - if (!num_items) - { - if (IsWindowEnabled(msgbox_data->recent_cbex)) - { - EnableWindow(GetDlgItem(hwndDlg, IDC_BDEL), FALSE); - EnableWindow(msgbox_data->recent_cbex, FALSE); - } - } - EnableWindow(GetDlgItem(hwndDlg, IDC_BCLEAR), FALSE); - } - break; - } - } - - if ((HWND)lParam == GetDlgItem(hwndDlg, IDC_BDEL)) - { - switch (HIWORD(wParam)) - { - case BN_CLICKED: - { - int cur_sel; - char buff[16]; - int left_items = 0; - COMBOBOXEXITEM histitem = {0}; - - cur_sel = SendMessage(msgbox_data->recent_cbex, CB_GETCURSEL, 0, 0); - - histitem.mask = CBEIF_LPARAM; - histitem.iItem = msgbox_data->curr_sel_msg; - - SendMessage(msgbox_data->recent_cbex, CBEM_GETITEM, 0, (LPARAM)&histitem); - - if (LOWORD(histitem.lParam) == HISTORY_MSG) - { - mir_snprintf(buff, SIZEOF(buff), "SMsg%d", (int)HIWORD(histitem.lParam)); - DBWriteContactSettingTString(NULL, "SimpleStatusMsg", buff, _T("")); - } - else if (LOWORD(histitem.lParam) == PREDEFINED_MSG) - { - msgbox_data->m_bPredefChanged = TRUE; - } - left_items = SendMessage(msgbox_data->recent_cbex, CBEM_DELETEITEM, (WPARAM)msgbox_data->curr_sel_msg, 0); - - if (!left_items) - { - if (IsWindowEnabled(msgbox_data->recent_cbex)) - EnableWindow(msgbox_data->recent_cbex, FALSE); - if (IsWindowEnabled(GetDlgItem(hwndDlg, IDC_BCLEAR))) - EnableWindow(GetDlgItem(hwndDlg, IDC_BCLEAR), FALSE); - EnableWindow(GetDlgItem(hwndDlg, IDC_BDEL), FALSE); - } - else - { - TCHAR text[1024]; - - if (cur_sel - 1 >= 0) - cur_sel--; - msgbox_data->curr_sel_msg = cur_sel; - SendMessage(msgbox_data->recent_cbex, CB_SETCURSEL, (WPARAM)cur_sel, 0); - - histitem.mask = CBEIF_LPARAM | CBEIF_TEXT; - histitem.iItem = cur_sel; - histitem.cchTextMax = SIZEOF(text); - histitem.pszText = text; - - SendMessage(msgbox_data->recent_cbex, CBEM_GETITEM, 0, (LPARAM)&histitem); - if (LOWORD(histitem.lParam) == HISTORY_MSG || LOWORD(histitem.lParam) == PREDEFINED_MSG || LOWORD(histitem.lParam) == DEFAULT_MSG) - { - SetDlgItemText(hwndDlg, IDC_EDIT1, text); - DisplayCharsCount(msgbox_data, hwndDlg); - EnableWindow(GetDlgItem(hwndDlg, IDC_BADD), LOWORD(histitem.lParam) == PREDEFINED_MSG ? FALSE : TRUE); - } - } - break; - } - } - } - break; - - case DM_SIMPAWAY_SHUTDOWN: - DestroyWindow(hwndDlg); - break; - - case DM_SIMPAWAY_CHANGEICONS: - ReleaseIconEx("cross"); - ReleaseIconEx("recent"); - ReleaseIconEx("predef"); - ReleaseIconEx("add"); - ReleaseIconEx("clear"); - msgbox_data->icon[I_ICON_DEL] = LoadIconEx("cross"); - msgbox_data->icon[I_ICON_HIST] = LoadIconEx("recent"); - msgbox_data->icon[I_ICON_MSG] = LoadIconEx("predef"); - msgbox_data->icon[I_ICON_ADD] = LoadIconEx("add"); - msgbox_data->icon[I_ICON_CLEAR] = LoadIconEx("clear"); - if (msgbox_data->m_iDlgFlags & DLG_SHOW_LIST_ICONS) - { - for (int i = 0; i < 5; ++i) - ImageList_ReplaceIcon(msgbox_data->other_icons, i, msgbox_data->icon[i]); - } - if ((msgbox_data->m_iDlgFlags & DLG_SHOW_BUTTONS) || (msgbox_data->m_iDlgFlags & DLG_SHOW_BUTTONS_FLAT)) - { - SendMessage(GetDlgItem(hwndDlg, IDC_BADD), BM_SETIMAGE, IMAGE_ICON, (LPARAM)msgbox_data->icon[I_ICON_ADD]); - SendMessage(GetDlgItem(hwndDlg, IDC_BCLEAR), BM_SETIMAGE, IMAGE_ICON, (LPARAM)msgbox_data->icon[I_ICON_CLEAR]); - SendMessage(GetDlgItem(hwndDlg, IDC_BDEL), BM_SETIMAGE, IMAGE_ICON, (LPARAM)msgbox_data->icon[I_ICON_DEL]); - } - break; - - case WM_DESTROY: - { - WINDOWPLACEMENT wp; - wp.length = sizeof(wp); - GetWindowPlacement(hwndDlg, &wp); - DBWriteContactSettingDword(NULL, "SimpleStatusMsg", "Winx", wp.rcNormalPosition.left); - DBWriteContactSettingDword(NULL, "SimpleStatusMsg", "Winy", wp.rcNormalPosition.top); - - if (msgbox_data->m_bPredefChanged) - { - int i, num_items, new_num_def_msgs = 0; - COMBOBOXEXITEM cbitem = {0}; - TCHAR text[1024]; - char buff[64]; - - num_items = SendMessage(msgbox_data->recent_cbex, CB_GETCOUNT, 0, 0); - num_items--; - for (i = 1; i <= msgbox_data->num_def_msgs; i++) - { - cbitem.mask = CBEIF_LPARAM|CBEIF_TEXT; - cbitem.iItem = num_items; - cbitem.cchTextMax = SIZEOF(text); - cbitem.pszText = text; - - SendMessage(msgbox_data->recent_cbex, CBEM_GETITEM, 0, (LPARAM)&cbitem); - mir_snprintf(buff, SIZEOF(buff), "DefMsg%d", i); - if (LOWORD(cbitem.lParam) == PREDEFINED_MSG) - { - new_num_def_msgs++; - DBWriteContactSettingTString(NULL, "SimpleStatusMsg", buff, text); - } - else - DBDeleteContactSetting(NULL, "SimpleStatusMsg", buff); - num_items--; - } - DBWriteContactSettingWord(NULL, "SimpleStatusMsg", "DefMsgCount", (WORD)new_num_def_msgs); - } - - ImageList_Destroy(msgbox_data->status_icons); - ImageList_Destroy(msgbox_data->other_icons); - ReleaseIconEx("cross"); - ReleaseIconEx("recent"); - ReleaseIconEx("predef"); - ReleaseIconEx("add"); - ReleaseIconEx("clear"); - CallService(MS_SKIN2_RELEASEICON, (WPARAM)SendMessage(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)NULL), 0); - CallService(MS_SKIN2_RELEASEICON, (WPARAM)SendMessage(hwndDlg, WM_SETICON, ICON_SMALL, (LPARAM)NULL), 0); - - SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_EDIT1), GWLP_WNDPROC, (LONG_PTR)MainDlgProc); - if (msgbox_data) - mir_free(msgbox_data); - hwndSAMsgDialog = NULL; - break; - } - } - return FALSE; -} diff --git a/plugins/SimpleStatusMsg/options.cpp b/plugins/SimpleStatusMsg/options.cpp deleted file mode 100644 index cc450c12e4..0000000000 --- a/plugins/SimpleStatusMsg/options.cpp +++ /dev/null @@ -1,1750 +0,0 @@ -/* - -Simple Status Message plugin for Miranda IM -Copyright (C) 2006-2011 Bartosz 'Dezeath' Bia³ek, (C) 2005 Harven - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along -with this program; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -*/ -#include "commonheaders.h" -#include "simplestatusmsg.h" - -extern UINT_PTR g_uUpdateMsgTimer; -extern VOID CALLBACK UpdateMsgTimerProc(HWND, UINT, UINT_PTR, DWORD); -extern VOID APIENTRY HandlePopupMenu(HWND hwnd, POINT pt, HWND edit_control); - -static WNDPROC OldDlgProc; - -static void RebuildStatusMenu(void) -{ - CLIST_INTERFACE* pcli = (CLIST_INTERFACE*)CallService(MS_CLIST_RETRIEVE_INTERFACE, 0, 0); - if (pcli && pcli->version > 4) - pcli->pfnReloadProtoMenus(); -} - -static LRESULT CALLBACK OptEditBoxSubProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) -{ - switch (uMsg) - { - case WM_CONTEXTMENU: - { - POINT pt = {(LONG)LOWORD(lParam), (LONG)HIWORD(lParam)}; - RECT rc; - GetClientRect(hwndDlg, &rc); - - if (pt.x == -1 && pt.y == -1) - { - GetCursorPos(&pt); - if (!PtInRect(&rc, pt)) - { - pt.x = rc.left + (rc.right - rc.left) / 2; - pt.y = rc.top + (rc.bottom - rc.top) / 2; - } - } - else - ScreenToClient(hwndDlg, &pt); - - if (PtInRect(&rc, pt)) - HandlePopupMenu(hwndDlg, pt, GetDlgItem(GetParent(hwndDlg), IDC_OPTEDIT1)); - - return 0; - } - - case WM_CHAR: - if (wParam == 1 && GetKeyState(VK_CONTROL) & 0x8000) // Ctrl + A - { - SendMessage(hwndDlg, EM_SETSEL, 0, -1); - return 0; - } - if (wParam == 127 && GetKeyState(VK_CONTROL) & 0x8000) // Ctrl + Backspace - { - DWORD start, end; - TCHAR *text; - int textLen; - SendMessage(hwndDlg, EM_GETSEL, (WPARAM)&end, (LPARAM)(PDWORD)NULL); - SendMessage(hwndDlg, WM_KEYDOWN, VK_LEFT, 0); - SendMessage(hwndDlg, EM_GETSEL, (WPARAM)&start, (LPARAM)(PDWORD)NULL); - textLen = GetWindowTextLength(hwndDlg); - text = (TCHAR *)mir_alloc(sizeof(TCHAR) * (textLen + 1)); - GetWindowText(hwndDlg, text, textLen + 1); - MoveMemory(text + start, text + end, sizeof(TCHAR) * (textLen + 1 - end)); - SetWindowText(hwndDlg, text); - mir_free(text); - SendMessage(hwndDlg, EM_SETSEL, start, start); - SendMessage(GetParent(hwndDlg), WM_COMMAND, MAKEWPARAM(GetDlgCtrlID(hwndDlg), EN_CHANGE), (LPARAM)hwndDlg); - return 0; - } - break; - } - - return CallWindowProc(OldDlgProc, hwndDlg, uMsg, wParam, lParam); -} - -struct SingleProtoMsg -{ - int flags; - TCHAR *msg; - int max_length; -}; - -struct SingleStatusMsg -{ - int flags[9]; - TCHAR msg[9][1024]; -}; - -struct OptDlgData -{ - BOOL proto_ok; - struct SingleProtoMsg *proto_msg; - struct SingleStatusMsg *status_msg; -}; - -static INT_PTR CALLBACK DlgOptionsProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) -{ - struct OptDlgData *data = (struct OptDlgData *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA); - - switch (uMsg) - { - case WM_INITDIALOG: - { - int val, i, index; - DBVARIANT dbv; - - TranslateDialogDefault(hwndDlg); - - data = (struct OptDlgData *)mir_alloc(sizeof(struct OptDlgData)); - SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)data); - - SendDlgItemMessage(hwndDlg, IDC_OPTEDIT1, EM_LIMITTEXT, 1024, 0); - SendMessage(GetDlgItem(hwndDlg, IDC_SMAXLENGTH), UDM_SETBUDDY, (WPARAM)GetDlgItem(hwndDlg, IDC_EMAXLENGTH), 0); - SendMessage(GetDlgItem(hwndDlg, IDC_SMAXLENGTH), UDM_SETRANGE32, 1, 1024); - SendMessage(GetDlgItem(hwndDlg, IDC_EMAXLENGTH), EM_LIMITTEXT, 4, 0); - - data->status_msg = (struct SingleStatusMsg *)mir_alloc(sizeof(struct SingleStatusMsg)*(accounts->count + 1)); - - for (i = ID_STATUS_ONLINE; i <= ID_STATUS_OUTTOLUNCH; i++) - { - if (accounts->statusMsgFlags & Proto_Status2Flag(i)) - { - index = SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTSTATUS), CB_INSERTSTRING, -1, (LPARAM)CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, i, GSMDF_TCHAR)); - if (index != CB_ERR && index != CB_ERRSPACE) - { - int j; - char setting[80]; - - SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTSTATUS), CB_SETITEMDATA, (WPARAM)index, (LPARAM)i - ID_STATUS_ONLINE); - - val = DBGetContactSettingByte(NULL, "SimpleStatusMsg", (char *)StatusModeToDbSetting(i, "Flags"), STATUS_DEFAULT); - data->status_msg[0].flags[i - ID_STATUS_ONLINE] = val; - if (DBGetContactSettingTString(NULL, "SRAway", StatusModeToDbSetting(i, "Default"), &dbv)) - dbv.ptszVal = mir_tstrdup(GetDefaultMessage(i)); - lstrcpy(data->status_msg[0].msg[i - ID_STATUS_ONLINE], dbv.ptszVal); - mir_free(dbv.ptszVal); - DBFreeVariant(&dbv); - - for (j = 0; j < accounts->count; j++) - { - if (!IsAccountEnabled(accounts->pa[j]) || !CallProtoService(accounts->pa[j]->szModuleName, PS_GETCAPS, PFLAGNUM_3, 0) || !(CallProtoService(accounts->pa[j]->szModuleName, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_MODEMSGSEND)) - continue; - - mir_snprintf(setting, SIZEOF(setting), "%sFlags", accounts->pa[j]->szModuleName); - val = DBGetContactSettingByte(NULL, "SimpleStatusMsg", (char *)StatusModeToDbSetting(i, setting), STATUS_DEFAULT); - data->status_msg[j+1].flags[i-ID_STATUS_ONLINE] = val; - mir_snprintf(setting, SIZEOF(setting), "%sDefault", accounts->pa[j]->szModuleName); - if (DBGetContactSettingTString(NULL, "SRAway", StatusModeToDbSetting(i, setting), &dbv)) - dbv.ptszVal = mir_tstrdup(GetDefaultMessage(i)); - lstrcpy(data->status_msg[j + 1].msg[i - ID_STATUS_ONLINE], dbv.ptszVal); - mir_free(dbv.ptszVal); - DBFreeVariant(&dbv); - } - } - } - } - SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTSTATUS), CB_SETCURSEL, 0, 0); - - data->proto_msg = (struct SingleProtoMsg *)mir_alloc(sizeof(struct SingleProtoMsg)*(accounts->count + 1)); - if (!data->proto_msg) - { - // TODO not really needed? - EnableWindow(GetDlgItem(hwndDlg, IDC_CBOPTPROTO), FALSE); - EnableWindow(GetDlgItem(hwndDlg, IDC_BOPTPROTO), FALSE); - EnableWindow(GetDlgItem(hwndDlg, IDC_ROPTPROTO1), FALSE); - EnableWindow(GetDlgItem(hwndDlg, IDC_ROPTPROTO2), FALSE); - EnableWindow(GetDlgItem(hwndDlg, IDC_ROPTPROTO3), FALSE); - EnableWindow(GetDlgItem(hwndDlg, IDC_ROPTPROTO4), FALSE); - data->proto_ok = FALSE; - } - else - { - char setting[64]; - - data->proto_ok = TRUE; - - index = SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTPROTO), CB_ADDSTRING, 0, (LPARAM)TranslateT("Global status change")); -// SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTPROTO), CB_SETITEMDATA, index, 0); - if (index != CB_ERR && index != CB_ERRSPACE) - { - data->proto_msg[0].msg = NULL; - - val = DBGetContactSettingByte(NULL, "SimpleStatusMsg", "ProtoFlags", PROTO_DEFAULT); - data->proto_msg[0].flags = val; - data->proto_msg[0].max_length = 0; - SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTPROTO), CB_SETITEMDATA, (WPARAM)index, 0); - } - - for (i = 0; i < accounts->count; ++i) - { - if (!IsAccountEnabled(accounts->pa[i]) - || !CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_3, 0) - || !(CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_MODEMSGSEND)) - { - data->proto_msg[i+1].msg = NULL; - continue; - } - - index = SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTPROTO), CB_ADDSTRING, 0, (LPARAM)accounts->pa[i]->tszAccountName); -// SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTPROTO), CB_SETITEMDATA, index, (LPARAM)i + 1); - if (index != CB_ERR && index != CB_ERRSPACE) - { - mir_snprintf(setting, SIZEOF(setting), "Proto%sDefault", accounts->pa[i]->szModuleName); - if (!DBGetContactSettingTString(NULL, "SimpleStatusMsg", setting, &dbv)) - { - data->proto_msg[i+1].msg = mir_tstrdup(dbv.ptszVal); - DBFreeVariant(&dbv); - } - else - data->proto_msg[i+1].msg = NULL; - - mir_snprintf(setting, SIZEOF(setting), "Proto%sFlags", accounts->pa[i]->szModuleName); - val = DBGetContactSettingByte(NULL, "SimpleStatusMsg", setting, PROTO_DEFAULT); - data->proto_msg[i+1].flags = val; - mir_snprintf(setting, SIZEOF(setting), "Proto%sMaxLen", accounts->pa[i]->szModuleName); - val = DBGetContactSettingWord(NULL, "SimpleStatusMsg", setting, 1024); - data->proto_msg[i+1].max_length = val; - SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTPROTO), CB_SETITEMDATA, (WPARAM)index, (LPARAM)i + 1); - } - } - - if (accounts->statusMsgCount == 1) - { -// ShowWindow(GetDlgItem(hwndDlg, IDC_BOPTPROTO), SW_HIDE); - EnableWindow(GetDlgItem(hwndDlg, IDC_BOPTPROTO), FALSE); - EnableWindow(GetDlgItem(hwndDlg, IDC_CBOPTPROTO), FALSE); - SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTPROTO), CB_SETCURSEL, 1, 0); - } - else - SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTPROTO), CB_SETCURSEL, 0, 0); - - SendMessage(hwndDlg, WM_COMMAND, MAKEWPARAM(IDC_CBOPTPROTO, CBN_SELCHANGE), (LPARAM)GetDlgItem(hwndDlg, IDC_CBOPTPROTO)); - } - - if (DBGetContactSettingByte(NULL, "SimpleStatusMsg", "PutDefInList", 0)) - CheckDlgButton(hwndDlg, IDC_COPTMSG2, BST_CHECKED); - - if (ServiceExists(MS_VARS_FORMATSTRING)) - { - HICON hIcon=NULL; - char *szTipInfo=NULL; - - if (ServiceExists(MS_VARS_GETSKINITEM)) - { - hIcon = (HICON)CallService(MS_VARS_GETSKINITEM, 0, VSI_HELPICON); - szTipInfo = (char *)CallService(MS_VARS_GETSKINITEM, 0, VSI_HELPTIPTEXT); - } - - if (hIcon != NULL) - SendMessage(GetDlgItem(hwndDlg, IDC_VARSHELP), BM_SETIMAGE, IMAGE_ICON, (LPARAM)hIcon); - else - SetDlgItemText(hwndDlg, IDC_VARSHELP, _T("V")); - - if (szTipInfo == NULL) - SendMessage(GetDlgItem(hwndDlg, IDC_VARSHELP), BUTTONADDTOOLTIP, (WPARAM)TranslateT("Open String Formatting Help"), 0); - else - SendMessage(GetDlgItem(hwndDlg, IDC_VARSHELP), BUTTONADDTOOLTIP, (WPARAM)szTipInfo, 0); - - SendDlgItemMessage(hwndDlg, IDC_VARSHELP, BUTTONSETASFLATBTN, TRUE, 0); - } - ShowWindow(GetDlgItem(hwndDlg, IDC_VARSHELP), ServiceExists(MS_VARS_FORMATSTRING)); - - OldDlgProc = (WNDPROC)SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_OPTEDIT1), GWLP_WNDPROC, (LONG_PTR)OptEditBoxSubProc); - - return TRUE; - } - - case WM_COMMAND: - if ( ( (HIWORD(wParam) == BN_CLICKED) || /*(HIWORD(wParam) == EN_KILLFOCUS) ||*/ (HIWORD(wParam) == EN_CHANGE) - || ( (HIWORD(wParam) == CBN_SELCHANGE) && (LOWORD(wParam) != IDC_CBOPTPROTO) && (LOWORD(wParam) != IDC_CBOPTSTATUS)) - ) && (HWND)lParam == GetFocus()) - SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0); - switch (LOWORD(wParam)) - { - case IDC_EMAXLENGTH: - switch (HIWORD(wParam)) - { - case EN_KILLFOCUS: - { - BOOL translated; - int val, i; - - val = GetDlgItemInt(hwndDlg, IDC_EMAXLENGTH, &translated, FALSE); - if (translated && val > 1024) - SetDlgItemInt(hwndDlg, IDC_EMAXLENGTH, 1024, FALSE); - if (translated && val < 1) - SetDlgItemInt(hwndDlg, IDC_EMAXLENGTH, 1, FALSE); - val = GetDlgItemInt(hwndDlg, IDC_EMAXLENGTH, &translated, FALSE); - - i = SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTPROTO), CB_GETITEMDATA, (WPARAM)SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTPROTO), CB_GETCURSEL, 0, 0), 0); - data->proto_msg[i].max_length = val; - break; - } - } - break; - - case IDC_CBOPTPROTO: - switch (HIWORD(wParam)) - { - case CBN_SELCHANGE: - case CBN_SELENDOK: - { - int i, j, l, k, status_modes = 0, newindex = 0; - - i = SendMessage((HWND)lParam, CB_GETITEMDATA, (WPARAM)SendMessage((HWND)lParam, CB_GETCURSEL, 0, 0), 0); - - if (i == 0) - { - EnableWindow(GetDlgItem(hwndDlg, IDC_MAXLENGTH), FALSE); - EnableWindow(GetDlgItem(hwndDlg, IDC_EMAXLENGTH), FALSE); - EnableWindow(GetDlgItem(hwndDlg, IDC_SMAXLENGTH), FALSE); - EnableWindow(GetDlgItem(hwndDlg, IDC_ROPTPROTO3), FALSE); - EnableWindow(GetDlgItem(hwndDlg, IDC_ROPTPROTO4), FALSE); - SetDlgItemInt(hwndDlg, IDC_EMAXLENGTH, 1024, FALSE); - - if (data->proto_msg[i].flags & PROTO_POPUPDLG) - CheckRadioButton(hwndDlg, IDC_ROPTPROTO1, IDC_ROPTPROTO4, IDC_ROPTPROTO1); - else if (data->proto_msg[i].flags & PROTO_NOCHANGE) - CheckRadioButton(hwndDlg, IDC_ROPTPROTO1, IDC_ROPTPROTO4, IDC_ROPTPROTO2); - } - else - { - EnableWindow(GetDlgItem(hwndDlg, IDC_MAXLENGTH), TRUE); - EnableWindow(GetDlgItem(hwndDlg, IDC_EMAXLENGTH), TRUE); - EnableWindow(GetDlgItem(hwndDlg, IDC_SMAXLENGTH), TRUE); - EnableWindow(GetDlgItem(hwndDlg, IDC_ROPTPROTO3), TRUE); - EnableWindow(GetDlgItem(hwndDlg, IDC_ROPTPROTO4), TRUE); - SetDlgItemInt(hwndDlg, IDC_EMAXLENGTH, data->proto_msg[i].max_length, FALSE); - - if (data->proto_msg[i].flags & PROTO_POPUPDLG) - CheckRadioButton(hwndDlg, IDC_ROPTPROTO1, IDC_ROPTPROTO4, IDC_ROPTPROTO1); - else if (data->proto_msg[i].flags & PROTO_NOCHANGE) - CheckRadioButton(hwndDlg, IDC_ROPTPROTO1, IDC_ROPTPROTO4, IDC_ROPTPROTO2); - else if (data->proto_msg[i].flags & PROTO_THIS_MSG) - CheckRadioButton(hwndDlg, IDC_ROPTPROTO1, IDC_ROPTPROTO4, IDC_ROPTPROTO3); - else if (data->proto_msg[i].flags & PROTO_NO_MSG) - CheckRadioButton(hwndDlg, IDC_ROPTPROTO1, IDC_ROPTPROTO4, IDC_ROPTPROTO4); - } - - if (data->proto_msg[i].flags & PROTO_NO_MSG || data->proto_msg[i].flags & PROTO_THIS_MSG - || data->proto_msg[i].flags & PROTO_NOCHANGE) - { - EnableWindow(GetDlgItem(hwndDlg, IDC_CBOPTSTATUS), FALSE); - EnableWindow(GetDlgItem(hwndDlg, IDC_BOPTSTATUS), FALSE); - EnableWindow(GetDlgItem(hwndDlg, IDC_COPTMSG1), FALSE); - - EnableWindow(GetDlgItem(hwndDlg, IDC_ROPTMSG1), FALSE); - EnableWindow(GetDlgItem(hwndDlg, IDC_ROPTMSG2), FALSE); - EnableWindow(GetDlgItem(hwndDlg, IDC_ROPTMSG3), FALSE); - EnableWindow(GetDlgItem(hwndDlg, IDC_ROPTMSG5), FALSE); - - if (data->proto_msg[i].flags & PROTO_NO_MSG || data->proto_msg[i].flags & PROTO_NOCHANGE) - { - EnableWindow(GetDlgItem(hwndDlg, IDC_ROPTMSG4), FALSE); - EnableWindow(GetDlgItem(hwndDlg, IDC_OPTEDIT1), FALSE); - EnableWindow(GetDlgItem(hwndDlg, IDC_VARSHELP), FALSE); - } - else - { - EnableWindow(GetDlgItem(hwndDlg, IDC_ROPTMSG4), TRUE); - EnableWindow(GetDlgItem(hwndDlg, IDC_OPTEDIT1), TRUE); - EnableWindow(GetDlgItem(hwndDlg, IDC_VARSHELP), TRUE); - } - - EnableWindow(GetDlgItem(hwndDlg, IDC_COPTMSG2), FALSE); - } - else - { - EnableWindow(GetDlgItem(hwndDlg, IDC_CBOPTSTATUS), TRUE); - EnableWindow(GetDlgItem(hwndDlg, IDC_BOPTSTATUS), TRUE); - EnableWindow(GetDlgItem(hwndDlg, IDC_COPTMSG1), TRUE); - - EnableWindow(GetDlgItem(hwndDlg, IDC_ROPTMSG1), TRUE); - EnableWindow(GetDlgItem(hwndDlg, IDC_ROPTMSG2), TRUE); - EnableWindow(GetDlgItem(hwndDlg, IDC_ROPTMSG3), TRUE); - EnableWindow(GetDlgItem(hwndDlg, IDC_ROPTMSG4), TRUE); - EnableWindow(GetDlgItem(hwndDlg, IDC_ROPTMSG5), TRUE); - - EnableWindow(GetDlgItem(hwndDlg, IDC_OPTEDIT1), FALSE); - EnableWindow(GetDlgItem(hwndDlg, IDC_VARSHELP), FALSE); - - EnableWindow(GetDlgItem(hwndDlg, IDC_COPTMSG2), TRUE); - } - - if (i) - { - k = i - 1; - status_modes = CallProtoService(accounts->pa[k]->szModuleName, PS_GETCAPS, PFLAGNUM_3, 0); - } - else - status_modes = accounts->statusMsgFlags; - - j = SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTSTATUS), CB_GETITEMDATA, (WPARAM)SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTSTATUS), CB_GETCURSEL, 0, 0), 0); - SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTSTATUS), CB_RESETCONTENT, 0, 0); - - for (l=ID_STATUS_ONLINE; l<=ID_STATUS_OUTTOLUNCH; l++) - { - int index; - if (status_modes & Proto_Status2Flag(l)) - { - index = SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTSTATUS), CB_INSERTSTRING, -1, (LPARAM)CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, l, GSMDF_TCHAR)); - - if (index != CB_ERR && index != CB_ERRSPACE) - { - SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTSTATUS), CB_SETITEMDATA, (WPARAM)index, (LPARAM)l - ID_STATUS_ONLINE); - if (j == l-ID_STATUS_ONLINE) - newindex=index; - } - } - } - - if (!newindex) - { - SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTSTATUS), CB_SETCURSEL, 0, 0); - j = SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTSTATUS), CB_GETITEMDATA, (WPARAM)SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTSTATUS), CB_GETCURSEL, 0, 0), 0); - } - else - SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTSTATUS), CB_SETCURSEL, (WPARAM)newindex, 0); - - if (data->status_msg[i].flags[j] & STATUS_SHOW_DLG) - CheckDlgButton(hwndDlg, IDC_COPTMSG1, BST_CHECKED); - else - CheckDlgButton(hwndDlg, IDC_COPTMSG1, BST_UNCHECKED); - - if (data->proto_msg[i].flags & PROTO_THIS_MSG) - { - CheckRadioButton(hwndDlg, IDC_ROPTMSG1, IDC_ROPTMSG5, IDC_ROPTMSG4); - if (data->proto_msg[i].msg) - SetDlgItemText(hwndDlg, IDC_OPTEDIT1, data->proto_msg[i].msg); - else - SetDlgItemText(hwndDlg, IDC_OPTEDIT1, _T("")); - } - else - { - if (data->status_msg[i].flags[j] & STATUS_EMPTY_MSG) - { - SetDlgItemText(hwndDlg, IDC_OPTEDIT1, _T("")); - EnableWindow(GetDlgItem(hwndDlg, IDC_OPTEDIT1), FALSE); - EnableWindow(GetDlgItem(hwndDlg, IDC_VARSHELP), FALSE); - CheckRadioButton(hwndDlg, IDC_ROPTMSG1, IDC_ROPTMSG5, IDC_ROPTMSG1); - } - else if (data->status_msg[i].flags[j] & STATUS_DEFAULT_MSG) - { - SetDlgItemText(hwndDlg, IDC_OPTEDIT1, GetDefaultMessage(j+ID_STATUS_ONLINE)); - EnableWindow(GetDlgItem(hwndDlg, IDC_OPTEDIT1), FALSE); - EnableWindow(GetDlgItem(hwndDlg, IDC_VARSHELP), FALSE); - CheckRadioButton(hwndDlg, IDC_ROPTMSG1, IDC_ROPTMSG5, IDC_ROPTMSG2); - } - else if (data->status_msg[i].flags[j] & STATUS_LAST_MSG) - { - char setting[80]; - DBVARIANT dbv, dbv2; - - if (i) - mir_snprintf(setting, SIZEOF(setting), "Last%sMsg", accounts->pa[k]->szModuleName); - else - mir_snprintf(setting, SIZEOF(setting), "LastMsg"); - - SetDlgItemText(hwndDlg, IDC_OPTEDIT1, _T("")); - if (!DBGetContactSetting(NULL, "SimpleStatusMsg", setting, &dbv)) - { - if (dbv.pszVal) - { - if (!DBGetContactSettingTString(NULL, "SimpleStatusMsg", dbv.pszVal, &dbv2) && strlen(dbv.pszVal)) - { - if ((dbv2.ptszVal) && (lstrlen(dbv2.ptszVal))) - SetDlgItemText(hwndDlg, IDC_OPTEDIT1, dbv2.ptszVal); - - DBFreeVariant(&dbv2); - } - } - DBFreeVariant(&dbv); - } - EnableWindow(GetDlgItem(hwndDlg, IDC_OPTEDIT1), FALSE); - EnableWindow(GetDlgItem(hwndDlg, IDC_VARSHELP), FALSE); - CheckRadioButton(hwndDlg, IDC_ROPTMSG1, IDC_ROPTMSG5, IDC_ROPTMSG3); - } - else if (data->status_msg[i].flags[j] & STATUS_THIS_MSG) - { - if (data->proto_msg[i].flags & PROTO_NO_MSG || data->proto_msg[i].flags & PROTO_NOCHANGE) - { - EnableWindow(GetDlgItem(hwndDlg, IDC_OPTEDIT1), FALSE); - EnableWindow(GetDlgItem(hwndDlg, IDC_VARSHELP), FALSE); - } - else - { - EnableWindow(GetDlgItem(hwndDlg, IDC_OPTEDIT1), TRUE); - EnableWindow(GetDlgItem(hwndDlg, IDC_VARSHELP), TRUE); - } - CheckRadioButton(hwndDlg, IDC_ROPTMSG1, IDC_ROPTMSG5, IDC_ROPTMSG4); - SetDlgItemText(hwndDlg, IDC_OPTEDIT1, data->status_msg[i].msg[j]); - } - else if (data->status_msg[i].flags[j] & STATUS_LAST_STATUS_MSG) - { - char setting[80]; - DBVARIANT dbv; - - if (i) - mir_snprintf(setting, SIZEOF(setting), "%sMsg", accounts->pa[k]->szModuleName); - else - mir_snprintf(setting, SIZEOF(setting), "Msg"); - - if (!DBGetContactSettingTString(NULL, "SRAway", StatusModeToDbSetting(j + ID_STATUS_ONLINE, setting), &dbv)) - { - SetDlgItemText(hwndDlg, IDC_OPTEDIT1, dbv.ptszVal); - DBFreeVariant(&dbv); - } - else - SetDlgItemText(hwndDlg, IDC_OPTEDIT1, _T("")); - - EnableWindow(GetDlgItem(hwndDlg, IDC_OPTEDIT1), FALSE); - EnableWindow(GetDlgItem(hwndDlg, IDC_VARSHELP), FALSE); - CheckRadioButton(hwndDlg, IDC_ROPTMSG1, IDC_ROPTMSG5, IDC_ROPTMSG5); - } - } - break; - } - } - break; - - case IDC_ROPTPROTO1: - case IDC_ROPTPROTO2: - case IDC_ROPTPROTO3: - case IDC_ROPTPROTO4: - switch (HIWORD(wParam)) - { - case BN_CLICKED: - { - int i, j; - - i = SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTPROTO), CB_GETITEMDATA, (WPARAM)SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTPROTO), CB_GETCURSEL, 0, 0), 0); - j = SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTSTATUS), CB_GETITEMDATA, (WPARAM)SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTSTATUS), CB_GETCURSEL, 0, 0), 0); - - data->proto_msg[i].flags = 0; - - if ((LOWORD(wParam) == IDC_ROPTPROTO2) || (LOWORD(wParam) == IDC_ROPTPROTO4)) - { - data->proto_msg[i].flags |= (LOWORD(wParam) == IDC_ROPTPROTO4) ? PROTO_NO_MSG : PROTO_NOCHANGE; - EnableWindow(GetDlgItem(hwndDlg, IDC_CBOPTSTATUS), FALSE); - EnableWindow(GetDlgItem(hwndDlg, IDC_BOPTSTATUS), FALSE); - EnableWindow(GetDlgItem(hwndDlg, IDC_COPTMSG1), FALSE); - - EnableWindow(GetDlgItem(hwndDlg, IDC_ROPTMSG1), FALSE); - EnableWindow(GetDlgItem(hwndDlg, IDC_ROPTMSG2), FALSE); - EnableWindow(GetDlgItem(hwndDlg, IDC_ROPTMSG3), FALSE); - EnableWindow(GetDlgItem(hwndDlg, IDC_ROPTMSG4), FALSE); - EnableWindow(GetDlgItem(hwndDlg, IDC_ROPTMSG5), FALSE); - - EnableWindow(GetDlgItem(hwndDlg, IDC_COPTMSG2), FALSE); - } - else if (LOWORD(wParam) == IDC_ROPTPROTO3) - { - data->proto_msg[i].flags |= PROTO_THIS_MSG; - EnableWindow(GetDlgItem(hwndDlg, IDC_OPTEDIT1), TRUE); - EnableWindow(GetDlgItem(hwndDlg, IDC_VARSHELP), TRUE); - if (data->proto_msg[i].msg) - SetDlgItemText(hwndDlg, IDC_OPTEDIT1, data->proto_msg[i].msg); - else - SetDlgItemText(hwndDlg, IDC_OPTEDIT1, _T("")); - EnableWindow(GetDlgItem(hwndDlg, IDC_CBOPTSTATUS), FALSE); - EnableWindow(GetDlgItem(hwndDlg, IDC_BOPTSTATUS), FALSE); - EnableWindow(GetDlgItem(hwndDlg, IDC_COPTMSG1), FALSE); - - EnableWindow(GetDlgItem(hwndDlg, IDC_ROPTMSG1), FALSE); - EnableWindow(GetDlgItem(hwndDlg, IDC_ROPTMSG2), FALSE); - EnableWindow(GetDlgItem(hwndDlg, IDC_ROPTMSG3), FALSE); - EnableWindow(GetDlgItem(hwndDlg, IDC_ROPTMSG4), TRUE); - EnableWindow(GetDlgItem(hwndDlg, IDC_ROPTMSG5), FALSE); - CheckRadioButton(hwndDlg, IDC_ROPTMSG1, IDC_ROPTMSG5, IDC_ROPTMSG4); - - EnableWindow(GetDlgItem(hwndDlg, IDC_COPTMSG2), FALSE); - } - else if (LOWORD(wParam) == IDC_ROPTPROTO1) - { - data->proto_msg[i].flags |= PROTO_POPUPDLG; - EnableWindow(GetDlgItem(hwndDlg, IDC_CBOPTSTATUS), TRUE); - EnableWindow(GetDlgItem(hwndDlg, IDC_BOPTSTATUS), TRUE); - EnableWindow(GetDlgItem(hwndDlg, IDC_COPTMSG1), TRUE); - - EnableWindow(GetDlgItem(hwndDlg, IDC_ROPTMSG1), TRUE); - EnableWindow(GetDlgItem(hwndDlg, IDC_ROPTMSG2), TRUE); - EnableWindow(GetDlgItem(hwndDlg, IDC_ROPTMSG3), TRUE); - EnableWindow(GetDlgItem(hwndDlg, IDC_ROPTMSG4), TRUE); - EnableWindow(GetDlgItem(hwndDlg, IDC_ROPTMSG5), TRUE); - - EnableWindow(GetDlgItem(hwndDlg, IDC_COPTMSG2), TRUE); - } - - if (LOWORD(wParam) != IDC_ROPTPROTO3) - { - if (data->status_msg[i].flags[j] & STATUS_EMPTY_MSG) - { - SetDlgItemText(hwndDlg, IDC_OPTEDIT1, _T("")); - EnableWindow(GetDlgItem(hwndDlg, IDC_OPTEDIT1), FALSE); - EnableWindow(GetDlgItem(hwndDlg, IDC_VARSHELP), FALSE); - CheckRadioButton(hwndDlg, IDC_ROPTMSG1, IDC_ROPTMSG5, IDC_ROPTMSG1); - } - else if (data->status_msg[i].flags[j] & STATUS_DEFAULT_MSG) - { - SetDlgItemText(hwndDlg, IDC_OPTEDIT1, GetDefaultMessage(j+ID_STATUS_ONLINE)); - EnableWindow(GetDlgItem(hwndDlg, IDC_OPTEDIT1), FALSE); - EnableWindow(GetDlgItem(hwndDlg, IDC_VARSHELP), FALSE); - CheckRadioButton(hwndDlg, IDC_ROPTMSG1, IDC_ROPTMSG5, IDC_ROPTMSG2); - } - else if (data->status_msg[i].flags[j] & STATUS_LAST_MSG) - { - char setting[80]; - DBVARIANT dbv, dbv2; - - if (i) - mir_snprintf(setting, SIZEOF(setting), "Last%sMsg", accounts->pa[i-1]->szModuleName); - else - mir_snprintf(setting, SIZEOF(setting), "LastMsg"); - - SetDlgItemText(hwndDlg, IDC_OPTEDIT1, _T("")); - if (!DBGetContactSetting(NULL, "SimpleStatusMsg", setting, &dbv)) - { - if (dbv.pszVal) - { - if (!DBGetContactSettingTString(NULL, "SimpleStatusMsg", dbv.pszVal, &dbv2) && strlen(dbv.pszVal)) - { - if (dbv2.ptszVal && lstrlen(dbv2.ptszVal)) - SetDlgItemText(hwndDlg, IDC_OPTEDIT1, dbv2.ptszVal); - DBFreeVariant(&dbv2); - } - } - DBFreeVariant(&dbv); - } - EnableWindow(GetDlgItem(hwndDlg, IDC_OPTEDIT1), FALSE); - EnableWindow(GetDlgItem(hwndDlg, IDC_VARSHELP), FALSE); - CheckRadioButton(hwndDlg, IDC_ROPTMSG1, IDC_ROPTMSG5, IDC_ROPTMSG3); - } - else if (data->status_msg[i].flags[j] & STATUS_THIS_MSG) - { - if ((LOWORD(wParam) == IDC_ROPTPROTO2) || (LOWORD(wParam) == IDC_ROPTPROTO4)) - { - EnableWindow(GetDlgItem(hwndDlg, IDC_OPTEDIT1), FALSE); - EnableWindow(GetDlgItem(hwndDlg, IDC_VARSHELP), FALSE); - } - else - { - EnableWindow(GetDlgItem(hwndDlg, IDC_OPTEDIT1), TRUE); - EnableWindow(GetDlgItem(hwndDlg, IDC_VARSHELP), TRUE); - } - CheckRadioButton(hwndDlg, IDC_ROPTMSG1, IDC_ROPTMSG5, IDC_ROPTMSG4); - SetDlgItemText(hwndDlg, IDC_OPTEDIT1, data->status_msg[i].msg[j]); - } - else if (data->status_msg[i].flags[j] & STATUS_LAST_STATUS_MSG) - { - char setting[80]; - DBVARIANT dbv; - - if (i) - mir_snprintf(setting, SIZEOF(setting), "%sMsg", accounts->pa[i-1]->szModuleName); - else - mir_snprintf(setting, SIZEOF(setting), "Msg"); - - if (!DBGetContactSettingTString(NULL, "SRAway", StatusModeToDbSetting(j + ID_STATUS_ONLINE, setting), &dbv)) - { - SetDlgItemText(hwndDlg, IDC_OPTEDIT1, dbv.ptszVal); - DBFreeVariant(&dbv); - } - else - SetDlgItemText(hwndDlg, IDC_OPTEDIT1, _T("")); - - EnableWindow(GetDlgItem(hwndDlg, IDC_OPTEDIT1), FALSE); - EnableWindow(GetDlgItem(hwndDlg, IDC_VARSHELP), FALSE); - CheckRadioButton(hwndDlg, IDC_ROPTMSG1, IDC_ROPTMSG5, IDC_ROPTMSG5); - } - } - break; - } - } - break; - - case IDC_CBOPTSTATUS: - switch (HIWORD(wParam)) - { - case CBN_SELCHANGE: - case CBN_SELENDOK: - { - int i, j; - - i = SendMessage((HWND)lParam, CB_GETITEMDATA, (WPARAM)SendMessage((HWND)lParam, CB_GETCURSEL, 0, 0), 0); - j = SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTPROTO), CB_GETITEMDATA, (WPARAM)SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTPROTO), CB_GETCURSEL, 0, 0), 0); - - if (data->status_msg[j].flags[i] & STATUS_SHOW_DLG) - CheckDlgButton(hwndDlg, IDC_COPTMSG1, BST_CHECKED); - else - CheckDlgButton(hwndDlg, IDC_COPTMSG1, BST_UNCHECKED); - - if (data->status_msg[j].flags[i] & STATUS_EMPTY_MSG) - { - SetDlgItemText(hwndDlg, IDC_OPTEDIT1, _T("")); - EnableWindow(GetDlgItem(hwndDlg, IDC_OPTEDIT1), FALSE); - EnableWindow(GetDlgItem(hwndDlg, IDC_VARSHELP), FALSE); - CheckRadioButton(hwndDlg, IDC_ROPTMSG1, IDC_ROPTMSG5, IDC_ROPTMSG1); - } - else if (data->status_msg[j].flags[i] & STATUS_DEFAULT_MSG) - { - SetDlgItemText(hwndDlg, IDC_OPTEDIT1, GetDefaultMessage(i+ID_STATUS_ONLINE)); - EnableWindow(GetDlgItem(hwndDlg, IDC_OPTEDIT1), FALSE); - EnableWindow(GetDlgItem(hwndDlg, IDC_VARSHELP), FALSE); - CheckRadioButton(hwndDlg, IDC_ROPTMSG1, IDC_ROPTMSG5, IDC_ROPTMSG2); - } - else if (data->status_msg[j].flags[i] & STATUS_LAST_MSG) - { - char setting[80]; - DBVARIANT dbv,dbv2; - - if (j) - mir_snprintf(setting, SIZEOF(setting), "Last%sMsg", accounts->pa[j-1]->szModuleName); - else - mir_snprintf(setting, SIZEOF(setting), "LastMsg"); - - SetDlgItemText(hwndDlg, IDC_OPTEDIT1, _T("")); - if (!DBGetContactSetting(NULL, "SimpleStatusMsg", setting, &dbv)) - { - if (dbv.pszVal) - { - if (!DBGetContactSettingTString(NULL, "SimpleStatusMsg", dbv.pszVal, &dbv2) && strlen(dbv.pszVal)) - { - if (dbv2.ptszVal && lstrlen(dbv2.ptszVal)) - SetDlgItemText(hwndDlg, IDC_OPTEDIT1, dbv2.ptszVal); - DBFreeVariant(&dbv2); - } - } - DBFreeVariant(&dbv); - } - EnableWindow(GetDlgItem(hwndDlg, IDC_OPTEDIT1), FALSE); - EnableWindow(GetDlgItem(hwndDlg, IDC_VARSHELP), FALSE); - CheckRadioButton(hwndDlg, IDC_ROPTMSG1, IDC_ROPTMSG5, IDC_ROPTMSG3); - } - else if (data->status_msg[j].flags[i] & STATUS_THIS_MSG) - { - EnableWindow(GetDlgItem(hwndDlg, IDC_OPTEDIT1), TRUE); - EnableWindow(GetDlgItem(hwndDlg, IDC_VARSHELP), TRUE); - CheckRadioButton(hwndDlg, IDC_ROPTMSG1, IDC_ROPTMSG5, IDC_ROPTMSG4); - SetDlgItemText(hwndDlg, IDC_OPTEDIT1, data->status_msg[j].msg[i]); - } - else if (data->status_msg[j].flags[i] & STATUS_LAST_STATUS_MSG) - { - char setting[80]; - DBVARIANT dbv; - - if (j) - mir_snprintf(setting, SIZEOF(setting), "%sMsg", accounts->pa[j-1]->szModuleName); - else - mir_snprintf(setting, SIZEOF(setting), "Msg"); - - if (!DBGetContactSettingTString(NULL, "SRAway", StatusModeToDbSetting(i + ID_STATUS_ONLINE, setting), &dbv)) - { - SetDlgItemText(hwndDlg, IDC_OPTEDIT1, dbv.ptszVal); - DBFreeVariant(&dbv); - } - else - SetDlgItemText(hwndDlg, IDC_OPTEDIT1, _T("")); - - EnableWindow(GetDlgItem(hwndDlg, IDC_OPTEDIT1), FALSE); - EnableWindow(GetDlgItem(hwndDlg, IDC_VARSHELP), FALSE); - CheckRadioButton(hwndDlg, IDC_ROPTMSG1, IDC_ROPTMSG5, IDC_ROPTMSG5); - } - break; - } - } - break; - - case IDC_COPTMSG1: - switch (HIWORD(wParam)) - { - case BN_CLICKED: - { - int i, j; - - i = SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTSTATUS), CB_GETITEMDATA, (WPARAM)SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTSTATUS), CB_GETCURSEL, 0, 0), 0); - j = SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTPROTO), CB_GETITEMDATA, (WPARAM)SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTPROTO), CB_GETCURSEL, 0, 0), 0); - if (IsDlgButtonChecked(hwndDlg, IDC_COPTMSG1) == BST_CHECKED) - data->status_msg[j].flags[i] |= STATUS_SHOW_DLG; - else - data->status_msg[j].flags[i] &= ~STATUS_SHOW_DLG; - break; - } - } - break; - - case IDC_ROPTMSG1: - case IDC_ROPTMSG2: - case IDC_ROPTMSG3: - case IDC_ROPTMSG4: - case IDC_ROPTMSG5: - switch (HIWORD(wParam)) - { - case BN_CLICKED: - { - int i, j; - - i = SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTSTATUS), CB_GETITEMDATA, (WPARAM)SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTSTATUS), CB_GETCURSEL, 0, 0), 0); - j = SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTPROTO), CB_GETITEMDATA, (WPARAM)SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTPROTO), CB_GETCURSEL, 0, 0), 0); - - if (LOWORD(wParam) == IDC_ROPTMSG4 && data->proto_msg[j].flags & PROTO_THIS_MSG) - break; - - data->status_msg[j].flags[i] = 0; - - if (IsDlgButtonChecked(hwndDlg, IDC_COPTMSG1) == BST_CHECKED) - data->status_msg[j].flags[i] |= STATUS_SHOW_DLG; - - if (LOWORD(wParam) == IDC_ROPTMSG1) - { - SetDlgItemText(hwndDlg, IDC_OPTEDIT1, _T("")); - EnableWindow(GetDlgItem(hwndDlg, IDC_OPTEDIT1), FALSE); - EnableWindow(GetDlgItem(hwndDlg, IDC_VARSHELP), FALSE); - data->status_msg[j].flags[i] |= STATUS_EMPTY_MSG; - } - else if (LOWORD(wParam) == IDC_ROPTMSG2) - { - SetDlgItemText(hwndDlg, IDC_OPTEDIT1, GetDefaultMessage(i+ID_STATUS_ONLINE)); - EnableWindow(GetDlgItem(hwndDlg, IDC_OPTEDIT1), FALSE); - EnableWindow(GetDlgItem(hwndDlg, IDC_VARSHELP), FALSE); - data->status_msg[j].flags[i] |= STATUS_DEFAULT_MSG; - } - else if (LOWORD(wParam) == IDC_ROPTMSG3) - { - char setting[80]; - DBVARIANT dbv, dbv2; - - if (j) - mir_snprintf(setting, SIZEOF(setting), "Last%sMsg", accounts->pa[j-1]->szModuleName); - else - mir_snprintf(setting, SIZEOF(setting), "LastMsg"); - - SetDlgItemText(hwndDlg, IDC_OPTEDIT1, _T("")); - if (!DBGetContactSetting(NULL, "SimpleStatusMsg", setting, &dbv)) - { - if (dbv.pszVal) - { - if (!DBGetContactSettingTString(NULL, "SimpleStatusMsg", dbv.pszVal, &dbv2) && strlen(dbv.pszVal)) - { - if (dbv2.ptszVal && lstrlen(dbv2.ptszVal)) - SetDlgItemText(hwndDlg, IDC_OPTEDIT1, dbv2.ptszVal); - DBFreeVariant(&dbv2); - } - } - DBFreeVariant(&dbv); - } - EnableWindow(GetDlgItem(hwndDlg, IDC_OPTEDIT1), FALSE); - EnableWindow(GetDlgItem(hwndDlg, IDC_VARSHELP), FALSE); - data->status_msg[j].flags[i] |= STATUS_LAST_MSG; - } - else if (LOWORD(wParam) == IDC_ROPTMSG4) - { - data->status_msg[j].flags[i] |= STATUS_THIS_MSG; - EnableWindow(GetDlgItem(hwndDlg, IDC_OPTEDIT1), TRUE); - EnableWindow(GetDlgItem(hwndDlg, IDC_VARSHELP), TRUE); - SetDlgItemText(hwndDlg, IDC_OPTEDIT1, data->status_msg[j].msg[i]); - } - else if (LOWORD(wParam) == IDC_ROPTMSG5) - { - char setting[80]; - DBVARIANT dbv; - - if (j) - mir_snprintf(setting, SIZEOF(setting), "%sMsg", accounts->pa[j-1]->szModuleName); - else - mir_snprintf(setting, SIZEOF(setting), "Msg"); - - if (!DBGetContactSettingTString(NULL, "SRAway", StatusModeToDbSetting(i+ID_STATUS_ONLINE, setting), &dbv)) - { - SetDlgItemText(hwndDlg, IDC_OPTEDIT1, dbv.ptszVal); - DBFreeVariant(&dbv); - } - else - SetDlgItemText(hwndDlg, IDC_OPTEDIT1, _T("")); - - EnableWindow(GetDlgItem(hwndDlg, IDC_OPTEDIT1), FALSE); - EnableWindow(GetDlgItem(hwndDlg, IDC_VARSHELP), FALSE); - data->status_msg[j].flags[i] |= STATUS_LAST_STATUS_MSG; - } - break; - } - } - break; - - case IDC_OPTEDIT1: - { - int i = SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTSTATUS), CB_GETITEMDATA, (WPARAM)SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTSTATUS), CB_GETCURSEL, 0, 0), 0); - int j = SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTPROTO), CB_GETITEMDATA, (WPARAM)SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTPROTO), CB_GETCURSEL, 0, 0), 0); - - if (HIWORD(wParam) == EN_KILLFOCUS) - { - TCHAR msg[1024]; - - if (data->proto_msg[j].flags & PROTO_THIS_MSG) - { - int len = GetDlgItemText(hwndDlg, IDC_OPTEDIT1, msg, SIZEOF(msg)); - if (len > 0) - { - if (data->proto_msg[j].msg == NULL) - data->proto_msg[j].msg = mir_tstrdup(msg); - else - { - mir_free(data->proto_msg[j].msg); - data->proto_msg[j].msg = mir_tstrdup(msg); - } - } - else - { - if (data->proto_msg[j].msg != NULL) - { - mir_free(data->proto_msg[j].msg); - data->proto_msg[j].msg = NULL; - } - } - } - else - { - GetDlgItemText(hwndDlg, IDC_OPTEDIT1, msg, SIZEOF(msg)); - lstrcpy(data->status_msg[j].msg[i], msg); - } - } - break; - } - - case IDC_VARSHELP: - variables_showhelp(hwndDlg, IDC_OPTEDIT1, VHF_FULLDLG|VHF_SETLASTSUBJECT, NULL, NULL); - break; - - case IDC_BOPTPROTO: - { - int i, j, k; - j = SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTPROTO), CB_GETITEMDATA, (WPARAM)SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTPROTO), CB_GETCURSEL, 0, 0), 0); - - if (j) - { - for (i = ID_STATUS_ONLINE; i <= ID_STATUS_OUTTOLUNCH; i++) - { - if (accounts->statusMsgFlags & Proto_Status2Flag(i)) - { - data->status_msg[0].flags[i-ID_STATUS_ONLINE] = data->status_msg[j].flags[i-ID_STATUS_ONLINE]; - if (data->status_msg[j].flags[i-ID_STATUS_ONLINE] & STATUS_THIS_MSG) - lstrcpy(data->status_msg[0].msg[i-ID_STATUS_ONLINE], data->status_msg[j].msg[i-ID_STATUS_ONLINE]); - } - } - } - - for (k = 0; k < accounts->count; k++) - { - if (!IsAccountEnabled(accounts->pa[k]) || !CallProtoService(accounts->pa[k]->szModuleName, PS_GETCAPS, PFLAGNUM_3, 0) || !(CallProtoService(accounts->pa[k]->szModuleName, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_MODEMSGSEND)) - continue; - - if (k != j - 1) - { - data->proto_msg[k+1].flags = data->proto_msg[j].flags; - if (j) - data->proto_msg[k+1].max_length = data->proto_msg[j].max_length; - - if (data->proto_msg[j].flags & PROTO_THIS_MSG) - { - int len = lstrlen(data->proto_msg[j].msg); - if (len > 0) - { - if (data->proto_msg[k+1].msg == NULL) - data->proto_msg[k+1].msg = mir_tstrdup(data->proto_msg[j].msg); - else - { - mir_free(data->proto_msg[k+1].msg); - data->proto_msg[k+1].msg = mir_tstrdup(data->proto_msg[j].msg); - } - } - else - { - if (data->proto_msg[k+1].msg != NULL) - { - mir_free(data->proto_msg[k+1].msg); - data->proto_msg[k+1].msg = NULL; - } - } - } - else if (data->proto_msg[j].flags & PROTO_POPUPDLG) - { - for (i = ID_STATUS_ONLINE; i <= ID_STATUS_OUTTOLUNCH; i++) - { - if (CallProtoService(accounts->pa[k]->szModuleName, PS_GETCAPS, PFLAGNUM_3, 0) & Proto_Status2Flag(i)) - { - data->status_msg[k + 1].flags[i - ID_STATUS_ONLINE] = data->status_msg[j].flags[i - ID_STATUS_ONLINE]; - if (data->status_msg[j].flags[i - ID_STATUS_ONLINE] & STATUS_THIS_MSG) - lstrcpy(data->status_msg[k + 1].msg[i - ID_STATUS_ONLINE], data->status_msg[j].msg[i - ID_STATUS_ONLINE]); - } - } - } - } - } - break; - } // case IDC_BOPTPROTO - - case IDC_BOPTSTATUS: - { - int status_modes, i, j, k; - - i = SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTSTATUS), CB_GETITEMDATA, (WPARAM)SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTSTATUS), CB_GETCURSEL, 0, 0), 0); - j = SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTPROTO), CB_GETITEMDATA, (WPARAM)SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTPROTO), CB_GETCURSEL, 0, 0), 0); - - if (j) - status_modes = CallProtoService(accounts->pa[j-1]->szModuleName, PS_GETCAPS, PFLAGNUM_3, 0); - else - status_modes = accounts->statusMsgFlags; - - for (k = ID_STATUS_ONLINE; k <= ID_STATUS_OUTTOLUNCH; k++) - { - if (k - ID_STATUS_ONLINE != i && status_modes & Proto_Status2Flag(k)) - { - data->status_msg[j].flags[k - ID_STATUS_ONLINE] = data->status_msg[j].flags[i]; - if (data->status_msg[j].flags[i] & STATUS_THIS_MSG) - lstrcpy(data->status_msg[j].msg[k - ID_STATUS_ONLINE], data->status_msg[j].msg[i]); - } - } - break; - } //case IDC_BOPTSTATUS - } - break; - - case WM_NOTIFY: - if (((LPNMHDR)lParam)->idFrom == 0 && ((LPNMHDR)lParam)->code == PSN_APPLY) - { - char szSetting[80]; - int i; - - for (i = ID_STATUS_ONLINE; i <= ID_STATUS_OUTTOLUNCH; i++) - { - if (accounts->statusMsgFlags & Proto_Status2Flag(i)) - { - DBWriteContactSettingTString(NULL, "SRAway", StatusModeToDbSetting(i, "Default"), data->status_msg[0].msg[i - ID_STATUS_ONLINE]); - DBWriteContactSettingByte(NULL, "SimpleStatusMsg", StatusModeToDbSetting(i, "Flags"), (BYTE)data->status_msg[0].flags[i - ID_STATUS_ONLINE]); - - for (int j = 0; j < accounts->count; j++) - { - if (!IsAccountEnabled(accounts->pa[j])) - continue; - - if (!(CallProtoService(accounts->pa[j]->szModuleName, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_MODEMSGSEND)) - continue; - - if (CallProtoService(accounts->pa[j]->szModuleName, PS_GETCAPS, PFLAGNUM_3, 0) & Proto_Status2Flag(i)) - { - mir_snprintf(szSetting, SIZEOF(szSetting), "%sDefault", accounts->pa[j]->szModuleName); - DBWriteContactSettingTString(NULL, "SRAway", StatusModeToDbSetting(i, szSetting), data->status_msg[j + 1].msg[i - ID_STATUS_ONLINE]); - - mir_snprintf(szSetting, SIZEOF(szSetting), "%sFlags", accounts->pa[j]->szModuleName); - DBWriteContactSettingByte(NULL, "SimpleStatusMsg", StatusModeToDbSetting(i, szSetting), (BYTE)data->status_msg[j + 1].flags[i - ID_STATUS_ONLINE]); - } - } - } - } - - DBWriteContactSettingByte(NULL, "SimpleStatusMsg", "PutDefInList", (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_COPTMSG2) == BST_CHECKED)); - - if (data->proto_ok) - { - DBWriteContactSettingByte(NULL, "SimpleStatusMsg", "ProtoFlags", (BYTE)data->proto_msg[0].flags); - - for (i = 0; i < accounts->count; i++) - { - if (!IsAccountEnabled(accounts->pa[i])) - continue; - - if (!CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_3, 0)) - continue; - - if (!(CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_MODEMSGSEND)) - continue; - - mir_snprintf(szSetting, SIZEOF(szSetting), "Proto%sDefault", accounts->pa[i]->szModuleName); - if (data->proto_msg[i+1].msg && (data->proto_msg[i+1].flags & PROTO_THIS_MSG)) - DBWriteContactSettingTString(NULL, "SimpleStatusMsg", szSetting, data->proto_msg[i+1].msg); -// else -// DBDeleteContactSetting(NULL, "SimpleStatusMsg", szSetting); - - mir_snprintf(szSetting, SIZEOF(szSetting), "Proto%sMaxLen", accounts->pa[i]->szModuleName); - DBWriteContactSettingWord(NULL, "SimpleStatusMsg", szSetting, (WORD)data->proto_msg[i+1].max_length); - - mir_snprintf(szSetting, SIZEOF(szSetting), "Proto%sFlags", accounts->pa[i]->szModuleName); - DBWriteContactSettingByte(NULL, "SimpleStatusMsg", szSetting, (BYTE)data->proto_msg[i+1].flags); - } - } - RebuildStatusMenu(); - return TRUE; - } - break; - - case WM_DESTROY: - SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_OPTEDIT1), GWLP_WNDPROC, (LONG_PTR)OldDlgProc); - if (data->proto_ok) - { - for (int i = 0; i < accounts->count + 1; ++i) - { - if (data->proto_msg[i].msg) // they want to be free, do they? - mir_free(data->proto_msg[i].msg); - } - mir_free(data->proto_msg); - } - mir_free(data->status_msg); - mir_free(data); - break; - } - return FALSE; -} - -static INT_PTR CALLBACK DlgVariablesOptionsProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) -{ - switch (uMsg) - { - case WM_INITDIALOG: - { - TranslateDialogDefault(hwndDlg); - - SendDlgItemMessage(hwndDlg, IDC_SSECUPDTMSG, UDM_SETBUDDY, (WPARAM)GetDlgItem(hwndDlg, IDC_ESECUPDTMSG), 0); - SendDlgItemMessage(hwndDlg, IDC_SSECUPDTMSG, UDM_SETRANGE32, 1, 999); - SendDlgItemMessage(hwndDlg, IDC_SSECUPDTMSG, UDM_SETPOS, 0, MAKELONG((short)DBGetContactSettingWord(NULL, "SimpleStatusMsg", "UpdateMsgInt", 10), 0)); - SendDlgItemMessage(hwndDlg, IDC_ESECUPDTMSG, EM_LIMITTEXT, 3, 0); - - CheckDlgButton(hwndDlg, IDC_CUPDATEMSG, DBGetContactSettingByte(NULL, "SimpleStatusMsg", "UpdateMsgOn", 1) ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(hwndDlg, IDC_CNOIDLE, DBGetContactSettingByte(NULL, "SimpleStatusMsg", "NoUpdateOnIdle", 1) ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(hwndDlg, IDC_CNOICQREQ, DBGetContactSettingByte(NULL, "SimpleStatusMsg", "NoUpdateOnICQReq", 1) ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(hwndDlg, IDC_CLEAVEWINAMP, DBGetContactSettingByte(NULL, "SimpleStatusMsg", "AmpLeaveTitle", 1) ? BST_CHECKED : BST_UNCHECKED); - if (ServiceExists(MS_VARS_FORMATSTRING)) - { - CheckDlgButton(hwndDlg, IDC_CVARIABLES, DBGetContactSettingByte(NULL, "SimpleStatusMsg", "EnableVariables", 1) ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(hwndDlg, IDC_CDATEPARSING, DBGetContactSettingByte(NULL, "SimpleStatusMsg", "ExclDateToken", 0) ? BST_CHECKED : BST_UNCHECKED); - } - else - { - EnableWindow(GetDlgItem(hwndDlg, IDC_CVARIABLES), FALSE); - } - EnableWindow(GetDlgItem(hwndDlg, IDC_CDATEPARSING), IsDlgButtonChecked(hwndDlg, IDC_CVARIABLES) == BST_CHECKED); - - SendMessage(hwndDlg, WM_USER + 2, 0, 0); - return TRUE; - } - - case WM_USER + 2: - { - BOOL bChecked = IsDlgButtonChecked(hwndDlg, IDC_CUPDATEMSG) == BST_CHECKED; - EnableWindow(GetDlgItem(hwndDlg, IDC_ESECUPDTMSG), bChecked); - EnableWindow(GetDlgItem(hwndDlg, IDC_SSECUPDTMSG), bChecked); - EnableWindow(GetDlgItem(hwndDlg, IDC_CNOIDLE), bChecked); - EnableWindow(GetDlgItem(hwndDlg, IDC_CNOICQREQ), bChecked); - EnableWindow(GetDlgItem(hwndDlg, IDC_CLEAVEWINAMP), bChecked); - break; - } - - case WM_COMMAND: - switch (LOWORD(wParam)) - { - case IDC_ESECUPDTMSG: - { - if ((HWND)lParam != GetFocus() || HIWORD(wParam) != EN_CHANGE) return 0; - int val = GetDlgItemInt(hwndDlg, IDC_ESECUPDTMSG, NULL, FALSE); - if (val == 0 && GetWindowTextLength(GetDlgItem(hwndDlg, IDC_ESECUPDTMSG))) - SendDlgItemMessage(hwndDlg, IDC_SSECUPDTMSG, UDM_SETPOS, 0, MAKELONG((short)1, 0)); - break; - } - - case IDC_CUPDATEMSG: - SendMessage(hwndDlg, WM_USER + 2, 0, 0); - break; - - case IDC_CVARIABLES: - EnableWindow(GetDlgItem(hwndDlg, IDC_CDATEPARSING), IsDlgButtonChecked(hwndDlg, IDC_CVARIABLES) == BST_CHECKED); - break; - } - SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0); - break; - - case WM_NOTIFY: - if (((LPNMHDR)lParam)->idFrom == 0 && ((LPNMHDR)lParam)->code == PSN_APPLY) - { - if (g_uUpdateMsgTimer) - KillTimer(NULL, g_uUpdateMsgTimer); - - int val = SendDlgItemMessage(hwndDlg, IDC_SSECUPDTMSG, UDM_GETPOS, 0, 0); - DBWriteContactSettingWord(NULL, "SimpleStatusMsg", "UpdateMsgInt", (WORD)val); - - if (IsDlgButtonChecked(hwndDlg, IDC_CUPDATEMSG) == BST_CHECKED && val) - { - DBWriteContactSettingByte(NULL, "SimpleStatusMsg", "UpdateMsgOn", (BYTE)1); - g_uUpdateMsgTimer = SetTimer(NULL, 0, val * 1000, (TIMERPROC)UpdateMsgTimerProc); - } - else - { - DBWriteContactSettingByte(NULL, "SimpleStatusMsg", "UpdateMsgOn", (BYTE)0); - } - - DBWriteContactSettingByte(NULL, "SimpleStatusMsg", "NoUpdateOnIdle", (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_CNOIDLE) == BST_CHECKED)); - DBWriteContactSettingByte(NULL, "SimpleStatusMsg", "NoUpdateOnICQReq", (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_CNOICQREQ) == BST_CHECKED)); - DBWriteContactSettingByte(NULL, "SimpleStatusMsg", "AmpLeaveTitle", (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_CLEAVEWINAMP) == BST_CHECKED)); - if (ServiceExists(MS_VARS_FORMATSTRING)) - { - DBWriteContactSettingByte(NULL, "SimpleStatusMsg", "EnableVariables", (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_CVARIABLES) == BST_CHECKED)); - DBWriteContactSettingByte(NULL, "SimpleStatusMsg", "ExclDateToken", (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_CDATEPARSING) == BST_CHECKED)); - } - return TRUE; - } - break; - } - return FALSE; -} - -static BOOL IsHistoryMsgsFound(HWND hwndDlg, int histMax) -{ - char szSetting[16]; - DBVARIANT dbv; - int j = DBGetContactSettingWord(NULL, "SimpleStatusMsg", "LMMsg", 1); - for (int i = 1; i <= histMax; ++i, --j) - { - if (j < 1) j = histMax; - mir_snprintf(szSetting, SIZEOF(szSetting), "SMsg%d", j); - if (!DBGetContactSettingTString(NULL, "SimpleStatusMsg", szSetting, &dbv)) - { - if (dbv.ptszVal != NULL && *dbv.ptszVal != '\0') - { - DBFreeVariant(&dbv); - return TRUE; - } - DBFreeVariant(&dbv); - } - } - return FALSE; -} - -static INT_PTR CALLBACK DlgAdvancedOptionsProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) -{ - switch (uMsg) - { - case WM_INITDIALOG: - { - int settingValue; - - TranslateDialogDefault(hwndDlg); - - // Layout - int i_btnhide = SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTBUTTONS), CB_ADDSTRING, 0, (LPARAM)TranslateT("Hide")); - int i_btndown = SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTBUTTONS), CB_ADDSTRING, 0, (LPARAM)TranslateT("Show next to cancel button")); - int i_btndownflat = SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTBUTTONS), CB_ADDSTRING, 0, (LPARAM)TranslateT("Flat, next to cancel button")); - int i_btnlist = SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTBUTTONS), CB_ADDSTRING, 0, (LPARAM)TranslateT("Show in message list")); - - SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTBUTTONS), CB_SETITEMDATA, (WPARAM)i_btnhide, 0); - SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTBUTTONS), CB_SETITEMDATA, (WPARAM)i_btndown, DLG_SHOW_BUTTONS); - SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTBUTTONS), CB_SETITEMDATA, (WPARAM)i_btndownflat, DLG_SHOW_BUTTONS_FLAT); - SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTBUTTONS), CB_SETITEMDATA, (WPARAM)i_btnlist, DLG_SHOW_BUTTONS_INLIST); - - settingValue = DBGetContactSettingByte(NULL, "SimpleStatusMsg", "DlgFlags", DLG_SHOW_DEFAULT); - CheckDlgButton(hwndDlg, IDC_CSTATUSLIST, settingValue & DLG_SHOW_STATUS ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(hwndDlg, IDC_CPROFILES, settingValue & DLG_SHOW_STATUS_PROFILES ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(hwndDlg, IDC_CICONS1, settingValue & DLG_SHOW_STATUS_ICONS ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(hwndDlg, IDC_CICONS2, settingValue & DLG_SHOW_LIST_ICONS ? BST_CHECKED : BST_UNCHECKED); - - if (!(settingValue & DLG_SHOW_STATUS)) - { - EnableWindow(GetDlgItem(hwndDlg, IDC_CPROFILES), FALSE); - EnableWindow(GetDlgItem(hwndDlg, IDC_CICONS1), FALSE); - } - - if (settingValue & DLG_SHOW_BUTTONS) - SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTBUTTONS), CB_SETCURSEL, (WPARAM)i_btndown, 0); - else if (settingValue & DLG_SHOW_BUTTONS_FLAT) - SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTBUTTONS), CB_SETCURSEL, (WPARAM)i_btndownflat, 0); - else if (settingValue & DLG_SHOW_BUTTONS_INLIST) - SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTBUTTONS), CB_SETCURSEL, (WPARAM)i_btnlist, 0); - else - SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTBUTTONS), CB_SETCURSEL, (WPARAM)i_btnhide, 0); - - if (!ServiceExists(MS_SS_GETPROFILECOUNT)) - { - TCHAR szText[100]; - mir_sntprintf(szText, SIZEOF(szText), _T("%s *"), TranslateT("Show status profiles in status list")); - SetDlgItemText(hwndDlg, IDC_CPROFILES, szText); - EnableWindow(GetDlgItem(hwndDlg, IDC_CPROFILES), FALSE); - ShowWindow(GetDlgItem(hwndDlg, IDC_NOTE1), SW_SHOW); - } - - // Misc. - settingValue = DBGetContactSettingByte(NULL, "SimpleStatusMsg", "MaxHist", 10); - - SendDlgItemMessage(hwndDlg, IDC_SMAXHIST, UDM_SETBUDDY, (WPARAM)GetDlgItem(hwndDlg, IDC_EMAXHIST), 0); - SendDlgItemMessage(hwndDlg, IDC_SMAXHIST, UDM_SETRANGE32, 0, 25); - SendDlgItemMessage(hwndDlg, IDC_SMAXHIST, UDM_SETPOS, 0, MAKELONG((short)settingValue, 0)); - SendDlgItemMessage(hwndDlg, IDC_EMAXHIST, EM_LIMITTEXT, 2, 0); - - if (settingValue == 0) - EnableWindow(GetDlgItem(hwndDlg, IDC_CICONS2), FALSE); - - EnableWindow(GetDlgItem(hwndDlg, IDC_BOPTHIST), IsHistoryMsgsFound(hwndDlg, settingValue)); - EnableWindow(GetDlgItem(hwndDlg, IDC_BOPTDEF), DBGetContactSettingWord(NULL, "SimpleStatusMsg", "DefMsgCount", 0) != 0); - - SendDlgItemMessage(hwndDlg, IDC_STIMEOUT, UDM_SETBUDDY, (WPARAM)GetDlgItem(hwndDlg, IDC_ETIMEOUT), 0); - SendDlgItemMessage(hwndDlg, IDC_STIMEOUT, UDM_SETRANGE32, 1, 60); - SendDlgItemMessage(hwndDlg, IDC_STIMEOUT, UDM_SETPOS, 0, MAKELONG((short)DBGetContactSettingByte(NULL, "SimpleStatusMsg", "DlgTime", 5), 0)); - SendDlgItemMessage(hwndDlg, IDC_ETIMEOUT, EM_LIMITTEXT, 2, 0); - - CheckDlgButton(hwndDlg, IDC_CCLOSEWND, DBGetContactSettingByte(NULL, "SimpleStatusMsg", "AutoClose", 1) ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(hwndDlg, IDC_CRPOSWND, !DBGetContactSettingByte(NULL, "SimpleStatusMsg", "WinCentered", 1) ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(hwndDlg, IDC_CREMOVECR, DBGetContactSettingByte(NULL, "SimpleStatusMsg", "RemoveCR", 0) ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(hwndDlg, IDC_CSHOWCOPY, DBGetContactSettingByte(NULL, "SimpleStatusMsg", "ShowCopy", 1) ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(hwndDlg, IDC_CSHOWGURL, DBGetContactSettingByte(NULL, "SimpleStatusMsg", "ShowGoToURL", 1) ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(hwndDlg, IDC_CSHOWSMSG, DBGetContactSettingByte(NULL, "SimpleStatusMsg", "ShowStatusMenuItem", 1) ? BST_CHECKED : BST_UNCHECKED); - - SendMessage(hwndDlg, WM_USER + 2, 0, 0); - return TRUE; - } - - case WM_USER + 2: - { - BOOL bChecked = IsDlgButtonChecked(hwndDlg, IDC_CCLOSEWND) == BST_CHECKED; - EnableWindow(GetDlgItem(hwndDlg, IDC_ETIMEOUT), bChecked); - EnableWindow(GetDlgItem(hwndDlg, IDC_STIMEOUT), bChecked); - break; - } - - case WM_COMMAND: - switch (LOWORD(wParam)) - { - case IDC_CSTATUSLIST: - { - BOOL bChecked = IsDlgButtonChecked(hwndDlg, IDC_CSTATUSLIST) == BST_CHECKED; - EnableWindow(GetDlgItem(hwndDlg, IDC_CPROFILES), bChecked && ServiceExists(MS_SS_GETPROFILECOUNT)); - EnableWindow(GetDlgItem(hwndDlg, IDC_CICONS1), bChecked); - break; - } - - case IDC_CBOPTBUTTONS: - if ((HWND)lParam != GetFocus() || HIWORD(wParam) != CBN_SELCHANGE) return 0; - break; - - case IDC_EMAXHIST: - { - if ((HWND)lParam != GetFocus() || HIWORD(wParam) != EN_CHANGE) return 0; - int val = GetDlgItemInt(hwndDlg, IDC_EMAXHIST, NULL, FALSE); - if (val > 25) - SendDlgItemMessage(hwndDlg, IDC_SMAXHIST, UDM_SETPOS, 0, MAKELONG((short)25, 0)); - EnableWindow(GetDlgItem(hwndDlg, IDC_CICONS2), val != 0); - break; - } - - case IDC_CCLOSEWND: - SendMessage(hwndDlg, WM_USER + 2, 0, 0); - break; - - case IDC_ETIMEOUT: - { - if ((HWND)lParam != GetFocus() || HIWORD(wParam) != EN_CHANGE) return 0; - int val = GetDlgItemInt(hwndDlg, IDC_ETIMEOUT, NULL, FALSE); - if (val == 0 && GetWindowTextLength(GetDlgItem(hwndDlg, IDC_ETIMEOUT))) - SendDlgItemMessage(hwndDlg, IDC_STIMEOUT, UDM_SETPOS, 0, MAKELONG((short)1, 0)); - else if (val > 60) - SendDlgItemMessage(hwndDlg, IDC_STIMEOUT, UDM_SETPOS, 0, MAKELONG((short)60, 0)); - break; - } - - case IDC_BOPTHIST: - if (MessageBox(NULL, TranslateT("Are you sure you want to clear status message history?"), TranslateT("Confirm clearing history"), MB_ICONQUESTION | MB_YESNO) == IDYES) - { - int i, max_hist_msgs; - char text[8], setting[80]; - - if (hwndSAMsgDialog) DestroyWindow(hwndSAMsgDialog); - - max_hist_msgs = DBGetContactSettingByte(NULL, "SimpleStatusMsg", "MaxHist", 10); - for (i = 1; i <= max_hist_msgs; i++) - { - mir_snprintf(text, SIZEOF(text), "SMsg%d", i); - DBWriteContactSettingTString(NULL, "SimpleStatusMsg", text, _T("")); - } - DBWriteContactSettingString(NULL, "SimpleStatusMsg", "LastMsg", ""); - for (i = 0; i < accounts->count; i++) - { - if (!IsAccountEnabled(accounts->pa[i])) - continue; - - if (!CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_3, 0)) - continue; - - if (!(CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_MODEMSGSEND)) - continue; - - mir_snprintf(setting, SIZEOF(setting), "Last%sMsg", accounts->pa[i]->szModuleName); - DBWriteContactSettingString(NULL, "SimpleStatusMsg", setting, ""); - } - DBWriteContactSettingWord(NULL, "SimpleStatusMsg", "LMMsg", (WORD)max_hist_msgs); - EnableWindow(GetDlgItem(hwndDlg, IDC_BOPTHIST), FALSE); - } - return 0; - - case IDC_BOPTDEF: - if (MessageBox(NULL, TranslateT("Are you sure you want to clear predefined status messages?"), TranslateT("Confirm clearing predefined"), MB_ICONQUESTION | MB_YESNO) == IDYES) - { - char szSetting[16]; - int nDefMSgCount; - - if (hwndSAMsgDialog) DestroyWindow(hwndSAMsgDialog); - - nDefMSgCount = DBGetContactSettingWord(NULL, "SimpleStatusMsg", "DefMsgCount", 0); - for (int i = 1; i <= nDefMSgCount; i++) - { - mir_snprintf(szSetting, SIZEOF(szSetting), "DefMsg%d", i); - DBDeleteContactSetting(NULL, "SimpleStatusMsg", szSetting); - } - DBWriteContactSettingWord(NULL, "SimpleStatusMsg", "DefMsgCount", 0); - EnableWindow(GetDlgItem(hwndDlg, IDC_BOPTDEF), FALSE); - } - return 0; - } - SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0); - break; - - case WM_NOTIFY: - if (((LPNMHDR)lParam)->idFrom == 0 && ((LPNMHDR)lParam)->code == PSN_APPLY) - { - // Layout - int flags = 0, curSel; - - if (IsDlgButtonChecked(hwndDlg, IDC_CSTATUSLIST) == BST_CHECKED) flags |= DLG_SHOW_STATUS; - if (IsDlgButtonChecked(hwndDlg, IDC_CICONS1) == BST_CHECKED) flags |= DLG_SHOW_STATUS_ICONS; - if (IsDlgButtonChecked(hwndDlg, IDC_CICONS2) == BST_CHECKED) flags |= DLG_SHOW_LIST_ICONS; - if (IsDlgButtonChecked(hwndDlg, IDC_CPROFILES) == BST_CHECKED) flags |= DLG_SHOW_STATUS_PROFILES; - - curSel = SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTBUTTONS), CB_GETCURSEL, 0, 0); - if (curSel != CB_ERR) - flags |= SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTBUTTONS), CB_GETITEMDATA, (WPARAM)curSel, 0); - - DBWriteContactSettingByte(NULL, "SimpleStatusMsg", "DlgFlags", (BYTE)flags); - - // Misc. - DBWriteContactSettingByte(NULL, "SimpleStatusMsg", "MaxHist", (BYTE)GetDlgItemInt(hwndDlg, IDC_EMAXHIST, NULL, FALSE)); - DBWriteContactSettingByte(NULL, "SimpleStatusMsg", "AutoClose", (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_CCLOSEWND) == BST_CHECKED)); - DBWriteContactSettingByte(NULL, "SimpleStatusMsg", "DlgTime", (BYTE)GetDlgItemInt(hwndDlg, IDC_ETIMEOUT, NULL, FALSE)); - DBWriteContactSettingByte(NULL, "SimpleStatusMsg", "WinCentered", (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_CRPOSWND) != BST_CHECKED)); - DBWriteContactSettingByte(NULL, "SimpleStatusMsg", "RemoveCR", (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_CREMOVECR) == BST_CHECKED)); - DBWriteContactSettingByte(NULL, "SimpleStatusMsg", "ShowCopy", (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_CSHOWCOPY) == BST_CHECKED)); - DBWriteContactSettingByte(NULL, "SimpleStatusMsg", "ShowGoToURL", (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_CSHOWGURL) == BST_CHECKED)); - DBWriteContactSettingByte(NULL, "SimpleStatusMsg", "ShowStatusMenuItem", (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_CSHOWSMSG) == BST_CHECKED)); - RebuildStatusMenu(); - - return TRUE; - } - break; - } - return FALSE; -} - -struct StatusOptDlgData -{ - int *status; - int *setdelay; - int setglobaldelay; -}; - -static INT_PTR CALLBACK DlgStatusOptionsProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) -{ - struct StatusOptDlgData *data = (struct StatusOptDlgData *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA); - - switch (uMsg) - { - case WM_INITDIALOG: - { - int index, i; - - TranslateDialogDefault(hwndDlg); - - data = (struct StatusOptDlgData *)mir_alloc(sizeof(struct StatusOptDlgData)); - SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)data); - - data->status = (int *)mir_alloc(sizeof(int) * accounts->count); - data->setdelay = (int *)mir_alloc(sizeof(int) * accounts->count); - for (i = 0; i < accounts->count; ++i) - { - if (!IsAccountEnabled(accounts->pa[i]) || !(CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_2, 0) &~ CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_5, 0))) - continue; - - index = SendMessage(GetDlgItem(hwndDlg, IDC_LISTPROTO), LB_ADDSTRING, 0, (LPARAM)accounts->pa[i]->tszAccountName); - if (index != LB_ERR && index != LB_ERRSPACE) - { - char setting[80]; - mir_snprintf(setting, SIZEOF(setting), "Startup%sStatus", accounts->pa[i]->szModuleName); - data->status[i] = DBGetContactSettingWord(NULL, "SimpleStatusMsg", setting, ID_STATUS_OFFLINE); - mir_snprintf(setting, SIZEOF(setting), "Set%sStatusDelay", accounts->pa[i]->szModuleName); - data->setdelay[i] = DBGetContactSettingWord(NULL, "SimpleStatusMsg", setting, 300); - SendMessage(GetDlgItem(hwndDlg, IDC_LISTPROTO), LB_SETITEMDATA, (WPARAM)index, (LPARAM)i); - } - } - SendMessage(GetDlgItem(hwndDlg, IDC_LISTPROTO), LB_SETCURSEL, 0, 0); - SendMessage(hwndDlg, WM_COMMAND, MAKEWPARAM(IDC_LISTPROTO, LBN_SELCHANGE), (LPARAM)GetDlgItem(hwndDlg, IDC_LISTPROTO)); - - data->setglobaldelay = DBGetContactSettingWord(NULL, "SimpleStatusMsg", "SetStatusDelay", 300); - - SendMessage(GetDlgItem(hwndDlg, IDC_SSETSTATUS), UDM_SETBUDDY, (WPARAM)GetDlgItem(hwndDlg, IDC_ESETSTATUS), 0); - SendMessage(GetDlgItem(hwndDlg, IDC_SSETSTATUS), UDM_SETRANGE32, 0, 9000); - SendMessage(GetDlgItem(hwndDlg, IDC_ESETSTATUS), EM_LIMITTEXT, 4, 0); - - if (!DBGetContactSettingByte(NULL, "SimpleStatusMsg", "GlobalStatusDelay", 1)) - { - CheckDlgButton(hwndDlg, IDC_SPECSET, BST_CHECKED); - i = SendMessage(GetDlgItem(hwndDlg, IDC_LISTPROTO), LB_GETITEMDATA, (WPARAM)SendMessage(GetDlgItem(hwndDlg, IDC_LISTPROTO), LB_GETCURSEL, 0, 0), 0); - SetDlgItemInt(hwndDlg, IDC_ESETSTATUS, data->setdelay[i], FALSE); - } - else - { - CheckDlgButton(hwndDlg, IDC_SPECSET, BST_UNCHECKED); - SetDlgItemInt(hwndDlg, IDC_ESETSTATUS, data->setglobaldelay, FALSE); - } - - if (DBGetContactSettingByte(NULL, "SimpleStatusMsg", "StartupPopupDlg", 1)) - { - CheckDlgButton(hwndDlg, IDC_POPUPDLG, BST_CHECKED); - if (IsDlgButtonChecked(hwndDlg, IDC_SPECSET) == BST_CHECKED) - { - CheckDlgButton(hwndDlg, IDC_SPECSET, BST_UNCHECKED); - SetDlgItemInt(hwndDlg, IDC_ESETSTATUS, data->setglobaldelay, FALSE); - } - EnableWindow(GetDlgItem(hwndDlg, IDC_SPECSET), FALSE); - } - else - CheckDlgButton(hwndDlg, IDC_POPUPDLG, BST_UNCHECKED); - - if (accounts->statusCount == 1 && accounts->statusMsgCount == 1) - { - EnableWindow(GetDlgItem(hwndDlg, IDC_SPECSET), FALSE); - CheckDlgButton(hwndDlg, IDC_SPECSET, BST_UNCHECKED); //should work like when checked, but should not be checked - i = SendMessage(GetDlgItem(hwndDlg, IDC_LISTPROTO), LB_GETITEMDATA, (WPARAM)SendMessage(GetDlgItem(hwndDlg, IDC_LISTPROTO), LB_GETCURSEL, 0, 0), 0); - SetDlgItemInt(hwndDlg, IDC_ESETSTATUS, data->setdelay[i], FALSE); - } - - return TRUE; - } - - case WM_COMMAND: - if ( ( (HIWORD(wParam) == BN_CLICKED) || /*(HIWORD(wParam) == EN_KILLFOCUS) ||*/ (HIWORD(wParam) == EN_CHANGE) - || ( (HIWORD(wParam) == LBN_SELCHANGE) && (LOWORD(wParam) != IDC_LISTPROTO)) - ) && (HWND)lParam == GetFocus()) - SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0); - switch (LOWORD(wParam)) - { - case IDC_ESETSTATUS: - switch (HIWORD(wParam)) - { - case EN_KILLFOCUS: - { - BOOL translated; - int val = GetDlgItemInt(hwndDlg, IDC_ESETSTATUS, &translated, FALSE); - if (translated && val > 9000) - SetDlgItemInt(hwndDlg, IDC_ESETSTATUS, 9000, FALSE); - if (translated && val < 0) - SetDlgItemInt(hwndDlg, IDC_ESETSTATUS, 0, FALSE); - val = GetDlgItemInt(hwndDlg, IDC_ESETSTATUS, &translated, FALSE); - - if (IsDlgButtonChecked(hwndDlg, IDC_SPECSET) == BST_CHECKED || (accounts->statusCount == 1 && accounts->statusMsgCount == 1)) - { - int i = SendMessage(GetDlgItem(hwndDlg, IDC_LISTPROTO), LB_GETITEMDATA, (WPARAM)SendMessage(GetDlgItem(hwndDlg, IDC_LISTPROTO), LB_GETCURSEL, 0, 0), 0); - data->setdelay[i] = val; - } - else - data->setglobaldelay = val; - break; - } - } - break; - - case IDC_SPECSET: - switch (HIWORD(wParam)) - { - case BN_CLICKED: - if (SendMessage((HWND)lParam, BM_GETCHECK, 0, 0) == BST_CHECKED || (accounts->statusCount == 1 && accounts->statusMsgCount == 1)) - { - int i = SendMessage(GetDlgItem(hwndDlg, IDC_LISTPROTO), LB_GETITEMDATA, (WPARAM)SendMessage(GetDlgItem(hwndDlg, IDC_LISTPROTO), LB_GETCURSEL, 0, 0), 0); - SetDlgItemInt(hwndDlg, IDC_ESETSTATUS, data->setdelay[i], FALSE); - } - else - SetDlgItemInt(hwndDlg, IDC_ESETSTATUS, data->setglobaldelay, FALSE); - break; - } - break; - - case IDC_POPUPDLG: - switch (HIWORD(wParam)) - { - case BN_CLICKED: - if (accounts->statusCount == 1 && accounts->statusMsgCount == 1) - break; - - if (SendMessage((HWND)lParam, BM_GETCHECK, 0, 0) == BST_CHECKED) - { - if (IsDlgButtonChecked(hwndDlg, IDC_SPECSET) == BST_CHECKED) - { - CheckDlgButton(hwndDlg, IDC_SPECSET, BST_UNCHECKED); - SetDlgItemInt(hwndDlg, IDC_ESETSTATUS, data->setglobaldelay, FALSE); - } - EnableWindow(GetDlgItem(hwndDlg, IDC_SPECSET), FALSE); - } - else - EnableWindow(GetDlgItem(hwndDlg, IDC_SPECSET), TRUE); - break; - } - break; - - case IDC_LISTPROTO: - switch (HIWORD(wParam)) - { - case LBN_SELCHANGE: - { - int status_modes, i, l, index, newindex = 0; - - i = SendMessage((HWND)lParam, LB_GETITEMDATA, (WPARAM)SendMessage((HWND)lParam, LB_GETCURSEL, 0, 0), 0); - status_modes = CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_2, 0) & ~CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_5, 0); - - SendMessage(GetDlgItem(hwndDlg, IDC_LISTSTATUS), LB_RESETCONTENT, 0, 0); - for (l = ID_STATUS_OFFLINE; l <= ID_STATUS_OUTTOLUNCH; l++) - { - if (status_modes & Proto_Status2Flag(l) || l == ID_STATUS_OFFLINE) - { - index = SendMessage(GetDlgItem(hwndDlg, IDC_LISTSTATUS), LB_INSERTSTRING, -1, (LPARAM)CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, l, GSMDF_TCHAR)); - if (index != LB_ERR && index != LB_ERRSPACE) - { - SendMessage(GetDlgItem(hwndDlg, IDC_LISTSTATUS), LB_SETITEMDATA, (WPARAM)index, (LPARAM)l - ID_STATUS_OFFLINE); - if (data->status[i] == l) - newindex = index; - } - } - } - - index = SendMessage(GetDlgItem(hwndDlg, IDC_LISTSTATUS), LB_INSERTSTRING, -1, (LPARAM)TranslateT("")); - if (index != LB_ERR && index != LB_ERRSPACE) - { - SendMessage(GetDlgItem(hwndDlg, IDC_LISTSTATUS), LB_SETITEMDATA, (WPARAM)index, (LPARAM)ID_STATUS_CURRENT-ID_STATUS_OFFLINE); - if (data->status[i] == ID_STATUS_CURRENT) - newindex = index; - } - - SendMessage(GetDlgItem(hwndDlg, IDC_LISTSTATUS), LB_SETCURSEL, (WPARAM)newindex, 0); - - if (IsDlgButtonChecked(hwndDlg, IDC_SPECSET) == BST_CHECKED || (accounts->statusCount == 1 && accounts->statusMsgCount == 1)) - SetDlgItemInt(hwndDlg, IDC_ESETSTATUS, data->setdelay[i], FALSE); - break; - } - } - break; - - case IDC_LISTSTATUS: - switch (HIWORD(wParam)) - { - case LBN_SELCHANGE: - { - int i = SendMessage((HWND)lParam, LB_GETITEMDATA, (WPARAM)SendMessage((HWND)lParam, LB_GETCURSEL, 0, 0), 0); - int j = SendMessage(GetDlgItem(hwndDlg, IDC_LISTPROTO), LB_GETITEMDATA, (WPARAM)SendMessage(GetDlgItem(hwndDlg, IDC_LISTPROTO), LB_GETCURSEL, 0, 0), 0); - data->status[j] = i + ID_STATUS_OFFLINE; - break; - } - } - break; - } - break; - - case WM_NOTIFY: - if (((LPNMHDR)lParam)->idFrom == 0 && ((LPNMHDR)lParam)->code == PSN_APPLY) - { - char szSetting[80]; - for (int i = 0; i < accounts->count; i++) - { - if (!IsAccountEnabled(accounts->pa[i]) || !(CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_2, 0)&~CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_5, 0))) - continue; - - mir_snprintf(szSetting, SIZEOF(szSetting), "Startup%sStatus", accounts->pa[i]->szModuleName); - DBWriteContactSettingWord(NULL, "SimpleStatusMsg", szSetting, (WORD)data->status[i]); - - mir_snprintf(szSetting, SIZEOF(szSetting), "Set%sStatusDelay", accounts->pa[i]->szModuleName); - DBWriteContactSettingWord(NULL, "SimpleStatusMsg", szSetting, (WORD)data->setdelay[i]); - } - DBWriteContactSettingWord(NULL, "SimpleStatusMsg", "SetStatusDelay", (WORD)data->setglobaldelay); - DBWriteContactSettingByte(NULL, "SimpleStatusMsg", "GlobalStatusDelay", (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_SPECSET) != BST_CHECKED)); - DBWriteContactSettingByte(NULL, "SimpleStatusMsg", "StartupPopupDlg", (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_POPUPDLG) == BST_CHECKED)); - return TRUE; - } - break; - - case WM_DESTROY: - mir_free(data->status); - mir_free(data->setdelay); - mir_free(data); - break; - } - return FALSE; -} - -int InitOptions(WPARAM wParam, LPARAM lParam) -{ - if (accounts->statusCount == 0) - return 0; - - OPTIONSDIALOGPAGE odp = {0}; - odp.cbSize = sizeof(odp); - odp.hInstance = g_hInst; - odp.flags = ODPF_BOLDGROUPS; - - if (!ServiceExists(MS_SS_GETPROFILECOUNT)) { - odp.pszTitle = LPGEN("Status"); - odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_STATUS); - odp.pfnDlgProc = DlgStatusOptionsProc; - Options_AddPage(wParam, &odp); - } - - if (accounts->statusMsgCount == 0) - return 0; - - odp.position = 870000000; - odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_GENERAL); - odp.pszTitle = LPGEN("Status Messages"); - odp.pszGroup = LPGEN("Status"); - odp.pszTab = LPGEN("General"); - odp.pfnDlgProc = DlgOptionsProc; - Options_AddPage(wParam, &odp); - - odp.pszTab = LPGEN("Variables"); - odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_VARIABLES); - odp.pfnDlgProc = DlgVariablesOptionsProc; - Options_AddPage(wParam, &odp); - - odp.pszTab = LPGEN("Advanced"); - odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_ADVANCED); - odp.pfnDlgProc = DlgAdvancedOptionsProc; - odp.flags |= ODPF_EXPERTONLY; - Options_AddPage(wParam, &odp); - - return 0; -} diff --git a/plugins/SimpleStatusMsg/res/resource.rc b/plugins/SimpleStatusMsg/res/resource.rc new file mode 100644 index 0000000000..2014c9da82 --- /dev/null +++ b/plugins/SimpleStatusMsg/res/resource.rc @@ -0,0 +1,437 @@ +// Microsoft Visual C++ generated resource script. +// +#include "..\src\resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "afxres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// Neutral resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NEU) +#ifdef _WIN32 +LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL +#pragma code_page(1250) +#endif //_WIN32 + +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 1,9,0,4 + PRODUCTVERSION 1,9,0,4 + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x40004L + FILETYPE 0x2L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "000004b0" + BEGIN + VALUE "Comments", "Licensed under the terms of the GNU General Public License" + VALUE "CompanyName", "Bartosz 'Dezeath' Bia³ek, Harven" + VALUE "FileDescription", "Simple Status Message plugin for Miranda IM" + VALUE "FileVersion", "1.9.0.4" + VALUE "InternalName", "simplestatusmsg" + VALUE "LegalCopyright", "Copyright © 2006-2011 Bartosz Bia³ek, © 2005 Harven" + VALUE "OriginalFilename", "simplestatusmsg.dll" + VALUE "ProductName", "Simple Status Message" + VALUE "ProductVersion", "1.9.0.4" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x0, 1200 + END +END + +#endif // Neutral resources +///////////////////////////////////////////////////////////////////////////// + + +///////////////////////////////////////////////////////////////////////////// +// Polish resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_PLK) +#ifdef _WIN32 +LANGUAGE LANG_POLISH, SUBLANG_DEFAULT +#pragma code_page(1250) +#endif //_WIN32 + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "..\\src\\resource.h\0" +END + +2 TEXTINCLUDE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_READAWAYMSG DIALOGEX 0, 0, 187, 72 +STYLE DS_SETFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_3DLOOK | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +EXSTYLE WS_EX_CONTROLPARENT +CAPTION "%s Message for %s" +FONT 8, "MS Shell Dlg", 0, 0, 0x1 +BEGIN + DEFPUSHBUTTON "&Cancel",IDOK,32,53,50,14 + CTEXT "Retrieving %s message...",IDC_RETRIEVING,5,21,177,8,SS_NOPREFIX + EDITTEXT IDC_MSG,5,5,177,43,ES_MULTILINE | ES_AUTOVSCROLL | ES_READONLY | NOT WS_VISIBLE | WS_VSCROLL + PUSHBUTTON "Co&py to Clipboard",IDC_COPY,92,53,63,14,BS_CENTER | BS_VCENTER +END + +IDD_AWAYMSGBOX DIALOG 0, 0, 208, 90 +STYLE DS_SETFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_3DLOOK | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "%s Message (%s)" +FONT 8, "MS Shell Dlg" +BEGIN + EDITTEXT IDC_EDIT1,7,23,193,44,ES_MULTILINE | ES_AUTOVSCROLL | ES_NOHIDESEL | ES_WANTRETURN | WS_VSCROLL + DEFPUSHBUTTON "OK",IDC_OK,7,71,66,14,BS_CENTER | BS_VCENTER + PUSHBUTTON "&Cancel",IDC_CANCEL,78,71,66,14,BS_CENTER | BS_VCENTER + CONTROL "",IDC_BADD,"MButtonClass",WS_TABSTOP,149,71,16,14,WS_EX_NOACTIVATE | 0x10000000L + CONTROL "",IDC_BDEL,"MButtonClass",WS_TABSTOP,167,71,16,14,WS_EX_NOACTIVATE | 0x10000000L + CONTROL "",IDC_BCLEAR,"MButtonClass",WS_TABSTOP,185,71,16,14,WS_EX_NOACTIVATE | 0x10000000L +END + +IDD_COPY DIALOGEX 0, 0, 159, 25 +STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION +EXSTYLE WS_EX_TOOLWINDOW +CAPTION "Retrieving status message for %s..." +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + DEFPUSHBUTTON "&Cancel",IDCANCEL,55,6,50,14,BS_CENTER | BS_VCENTER +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO +BEGIN + IDD_READAWAYMSG, DIALOG + BEGIN + LEFTMARGIN, 5 + RIGHTMARGIN, 182 + TOPMARGIN, 5 + BOTTOMMARGIN, 67 + END + + IDD_AWAYMSGBOX, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 201 + TOPMARGIN, 7 + BOTTOMMARGIN, 83 + END + + IDD_COPY, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 152 + TOPMARGIN, 7 + BOTTOMMARGIN, 18 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDI_CROSS ICON "cross.ico" +IDI_HISTORY ICON "history.ico" +IDI_MESSAGE ICON "msg.ico" +IDI_PLUS ICON "plus.ico" +IDI_CHIST ICON "cbook.ico" +IDI_COPY ICON "copy.ico" +IDI_CSMSG ICON "csmsg.ico" +IDI_GOTOURL ICON "gotourl.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Menu +// + +IDR_EDITMENU MENU +BEGIN + POPUP "" + BEGIN + MENUITEM "%time%", IDM_VTIME + MENUITEM "%date%", IDM_VDATE + MENUITEM "%winampsong%", IDM_VWINAMPSONG + MENUITEM "%rand(x,y)%", IDM_VRANDXY + MENUITEM "%randmsg%", IDM_VRANDMSG + MENUITEM "%randdefmsg%", IDM_VRANDDEFMSG + MENUITEM SEPARATOR + POPUP "Fortune" + BEGIN + MENUITEM "%fortunemsg%", ID__FORTUNE + MENUITEM "%protofortunemsg%", ID__FORTUNEAWAYMSG_PROTOFORTUNEMSG + MENUITEM "%statusfortunemsg%", ID__FORTUNEAWAYMSG_STATUSFORTUNEMSG + END + POPUP "Variables" + BEGIN + MENUITEM "?cinfo(contact,property)", ID__VARIABLES_CINFOCONTACTPROPERTY + MENUITEM "?contact(string,property)", ID__VARIABLES_CONTACTSTRINGPROPERTY + MENUITEM "?mstatus(protocol)", ID__VARIABLES_MSTATUSPROTOCOL + MENUITEM "?lsdate(contact,format)", ID__VARIABLES_LSDATECONTACTFORMAT + MENUITEM "?lsstatus(contact)", ID__VARIABLES_LSSTATUSCONTACT + MENUITEM "?lstime(contact,format)", ID__VARIABLES_LSTIMECONTACTFORMAT + MENUITEM "?dbsetting(contact,module,setting)", ID__VARIABLES_DBSETTINGCONTACTMODULESETTING + MENUITEM "?txtfile(file,line)", ID__VARIABLES_TXTFILEFILELINE + MENUITEM "?if(condition,true,false)", ID__VARIABLES_IFCONDITIONTRUEFALSE + MENUITEM "?strcmp(string1,string2)", ID__VARIABLES_STRCMPSTRING1STRING2 + MENUITEM "?stricmp(string1,string2)", ID__VARIABLES_STRICMPSTRING1STRING2 + MENUITEM "?cdate(format)", ID__VARIABLES_CDATEFORMAT + MENUITEM "?ctime(format)", ID__VARIABLES_CTIMEFORMAT + MENUITEM "?replace(sub,string1,string2)", ID__VARIABLES_REPLACESUBSTRING1STRING2 + MENUITEM "?lower(string)", ID__VARIABLES_LOWERSTRING + MENUITEM "?upper(string)", ID__VARIABLES_UPPERSTRING + MENUITEM "?scroll(string,numchars,numchars)", ID__VARIABLES_SCROLLSTRINGNUMCHARSNUMCHARS + MENUITEM SEPARATOR + MENUITEM "More variables...", ID__VARIABLES_MOREVARIABLES + END + MENUITEM "Fortune", ID__FORTUNEAWAYMSG + MENUITEM "Variables", ID__VARIABLES + MENUITEM SEPARATOR + MENUITEM "Cut", IDM_CUT + MENUITEM "Copy", IDM_COPY + MENUITEM "Paste", IDM_PASTE + MENUITEM "Delete", IDM_DELETE + MENUITEM SEPARATOR + MENUITEM "Select All", IDM_SELECTALL + END +END + +#endif // Polish resources +///////////////////////////////////////////////////////////////////////////// + + +///////////////////////////////////////////////////////////////////////////// +// English (U.S.) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) +#endif //_WIN32 + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_OPT_GENERAL DIALOGEX 0, 0, 307, 216 +STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_VISIBLE +EXSTYLE WS_EX_CONTROLPARENT +FONT 8, "MS Shell Dlg", 0, 0, 0x1 +BEGIN + GROUPBOX "Behaviour on status change",IDC_STATIC,4,2,300,58,WS_GROUP + COMBOBOX IDC_CBOPTPROTO,13,15,106,97,CBS_DROPDOWNLIST | WS_TABSTOP + PUSHBUTTON "Apply to all",IDC_BOPTPROTO,123,15,60,13 + LTEXT "Max length:",IDC_MAXLENGTH,198,17,63,8 + EDITTEXT IDC_EMAXLENGTH,262,15,36,12,ES_NUMBER | NOT WS_BORDER,WS_EX_CLIENTEDGE + CONTROL "Spin2",IDC_SMAXLENGTH,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_ARROWKEYS | UDS_NOTHOUSANDS,288,15,10,14 + CONTROL "Pop up dialog box",IDC_ROPTPROTO1,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,26,31,128,8 + CONTROL "Do not change status message",IDC_ROPTPROTO2,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,26,43,128,8 + CONTROL "Always set the same message",IDC_ROPTPROTO3,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,155,31,144,8 + CONTROL "Do not set status message",IDC_ROPTPROTO4,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,155,43,144,8 + GROUPBOX "Status Messages",IDC_STATIC,4,62,300,148,WS_GROUP + COMBOBOX IDC_CBOPTSTATUS,35,73,240,97,CBS_DROPDOWNLIST | WS_TABSTOP + PUSHBUTTON "Apply to all",IDC_BOPTSTATUS,215,90,60,13 + CONTROL "Pop up dialog asking for new message",IDC_COPTMSG1, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,48,89,166,8 + CONTROL "Set an empty message",IDC_ROPTMSG1,"Button",BS_AUTORADIOBUTTON | BS_VCENTER | WS_TABSTOP,48,100,166,8 + CONTROL "Use default message",IDC_ROPTMSG2,"Button",BS_AUTORADIOBUTTON | BS_VCENTER | WS_TABSTOP,48,111,166,8 + CONTROL "Use last message",IDC_ROPTMSG3,"Button",BS_AUTORADIOBUTTON | BS_VCENTER | WS_TABSTOP,48,122,166,8 + CONTROL "Use last message set for this status",IDC_ROPTMSG5, + "Button",BS_AUTORADIOBUTTON | BS_VCENTER | WS_TABSTOP,48,133,166,8 + CONTROL "Set the following message:",IDC_ROPTMSG4,"Button",BS_AUTORADIOBUTTON | BS_VCENTER | WS_TABSTOP,48,144,166,8 + EDITTEXT IDC_OPTEDIT1,58,155,219,38,ES_MULTILINE | ES_AUTOVSCROLL | ES_WANTRETURN | WS_VSCROLL + CONTROL "",IDC_VARSHELP,"MButtonClass",WS_TABSTOP,261,141,16,14,WS_EX_NOACTIVATE | 0x10000000L + CONTROL "Put default message in message list",IDC_COPTMSG2, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,35,196,179,8 +END + +IDD_OPT_VARIABLES DIALOGEX 0, 0, 307, 226 +STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_VISIBLE +EXSTYLE WS_EX_CONTROLPARENT +FONT 8, "MS Shell Dlg", 0, 0, 0x1 +BEGIN + GROUPBOX "Variables",IDC_STATIC,4,2,300,100,WS_GROUP + CONTROL "Update variables in status messages every",IDC_CUPDATEMSG, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,16,150,8 + EDITTEXT IDC_ESECUPDTMSG,166,14,32,12,ES_AUTOHSCROLL | ES_NUMBER + CONTROL "Spin2",IDC_SSECUPDTMSG,"msctls_updown32",UDS_WRAP | UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,188,14,11,14 + LTEXT "seconds",IDC_STATIC,202,16,32,8 + CONTROL "Do not update variables during idle",IDC_CNOIDLE, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,25,30,274,8 + CONTROL "Do not update variables on ICQ status message requests",IDC_CNOICQREQ, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,25,44,274,8 + CONTROL "Leave last played track's title after exiting the player",IDC_CLEAVEWINAMP, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,25,58,274,8 + CONTROL "Enable status messages parsing by Variables plugin",IDC_CVARIABLES, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,72,287,8 + CONTROL "Exclude %date% token from parsing (restart required)",IDC_CDATEPARSING, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,25,86,274,8 +END + +IDD_OPT_ADVANCED DIALOGEX 0, 0, 307, 226 +STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_VISIBLE +EXSTYLE WS_EX_CONTROLPARENT +FONT 8, "MS Shell Dlg", 0, 0, 0x1 +BEGIN + GROUPBOX "Layout",IDC_STATIC,4,2,300,58,WS_GROUP + CONTROL "Show status list",IDC_CSTATUSLIST,"Button",BS_AUTOCHECKBOX | BS_LEFT | BS_VCENTER | WS_TABSTOP,12,16,137,10 + CONTROL "Show status profiles in status list",IDC_CPROFILES, + "Button",BS_AUTOCHECKBOX | BS_LEFT | BS_VCENTER | WS_TABSTOP,12,30,140,10 + CONTROL "Show icons in status list",IDC_CICONS1,"Button",BS_AUTOCHECKBOX | BS_LEFT | BS_VCENTER | WS_TABSTOP,12,44,138,10 + LTEXT "Buttons:",IDC_STATIC,154,16,58,8 + COMBOBOX IDC_CBOPTBUTTONS,154,28,144,100,CBS_DROPDOWNLIST | WS_TABSTOP + CONTROL "Show icons in message list",IDC_CICONS2,"Button",BS_AUTOCHECKBOX | BS_LEFT | BS_VCENTER | WS_TABSTOP,154,44,140,10 + GROUPBOX "Other",IDC_STATIC,4,62,300,112,WS_GROUP + CONTROL "Store up to",IDC_STATIC,"Static",SS_LEFTNOWORDWRAP,12,76,45,8 + EDITTEXT IDC_EMAXHIST,58,74,28,12,ES_AUTOHSCROLL | ES_NUMBER + CONTROL "Spin2",IDC_SMAXHIST,"msctls_updown32",UDS_WRAP | UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,76,73,11,14 + LTEXT "recent messages (0 = disable)",IDC_STATIC,90,76,143,8 + CONTROL "Automatically close dialog window after",IDC_CCLOSEWND, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,90,150,8 + EDITTEXT IDC_ETIMEOUT,166,88,28,12,ES_AUTOHSCROLL | ES_NUMBER + CONTROL "Spin2",IDC_STIMEOUT,"msctls_updown32",UDS_WRAP | UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,184,87,11,14 + LTEXT "seconds",IDC_STATIC,198,90,36,8 + CONTROL "Remember last dialog window position",IDC_CRPOSWND, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,104,222,8 + CONTROL "Remove Carriage Return (CR = '\\r' = #0D) chars from status messages",IDC_CREMOVECR, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,118,287,8 + CONTROL "Show 'Copy Away Message' item in contact menu",IDC_CSHOWCOPY, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,132,287,8 + CONTROL "Show 'Go to URL in Away Message' item in contact menu",IDC_CSHOWGURL, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,146,287,8 + CONTROL "Show 'Status Message...' item in status menu",IDC_CSHOWSMSG, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,160,287,8 + CONTROL "Clear History",IDC_BOPTHIST,"MButtonClass",WS_TABSTOP,236,73,61,14,WS_EX_NOACTIVATE | 0x10000000L + CONTROL "Clear Predefined",IDC_BOPTDEF,"MButtonClass",WS_TABSTOP,236,90,61,14,WS_EX_NOACTIVATE | 0x10000000L + LTEXT "* This feature is available only when using StartupStatus plugin.",IDC_NOTE1,11,177,287,8,NOT WS_VISIBLE +END + +IDD_OPT_STATUS DIALOGEX 0, 0, 241, 162 +STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_VISIBLE +EXSTYLE WS_EX_CONTROLPARENT +FONT 8, "MS Shell Dlg", 0, 0, 0x1 +BEGIN + GROUPBOX "Status on Startup",IDC_STATIC,5,2,230,154,WS_GROUP + LTEXT "Set status after",IDC_STATIC,15,18,80,8 + EDITTEXT IDC_ESETSTATUS,96,16,36,12,ES_NUMBER | NOT WS_BORDER,WS_EX_CLIENTEDGE + CONTROL "Spin2",IDC_SSETSTATUS,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_ARROWKEYS | UDS_NOTHOUSANDS,122,16,11,14 + LTEXT "miliseconds",IDC_STATIC,136,18,90,8 + LTEXT "Protocol:",IDC_STATIC,16,34,63,8 + LISTBOX IDC_LISTPROTO,15,45,100,75,LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP + LTEXT "Status:",IDC_STATIC,126,34,63,8 + LISTBOX IDC_LISTSTATUS,125,45,100,75,LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP + CONTROL "Independent setting for each protocol",IDC_SPECSET, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,126,210,8 + CONTROL "Pop up dialog asking for status message",IDC_POPUPDLG, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,138,210,8 +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO +BEGIN + IDD_OPT_GENERAL, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 300 + TOPMARGIN, 7 + BOTTOMMARGIN, 209 + END + + IDD_OPT_VARIABLES, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 300 + TOPMARGIN, 7 + BOTTOMMARGIN, 219 + END + + IDD_OPT_ADVANCED, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 300 + TOPMARGIN, 7 + BOTTOMMARGIN, 219 + END + + IDD_OPT_STATUS, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 234 + TOPMARGIN, 7 + BOTTOMMARGIN, 155 + END +END +#endif // APSTUDIO_INVOKED + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/plugins/SimpleStatusMsg/resource.h b/plugins/SimpleStatusMsg/resource.h deleted file mode 100644 index 137327acac..0000000000 --- a/plugins/SimpleStatusMsg/resource.h +++ /dev/null @@ -1,126 +0,0 @@ -//{{NO_DEPENDENCIES}} -// Microsoft Developer Studio generated include file. -// Used by resource.rc -// -#define IDD_COPY 101 -#define IDD_AWAYMSGBOX 102 -#define IDD_OPT_GENERAL 103 -#define IDD_READAWAYMSG 104 -#define IDI_CROSS 105 -#define IDI_HISTORY 106 -#define IDI_MESSAGE 107 -#define IDI_PLUS 108 -#define IDI_CHIST 109 -#define IDI_COPY 110 -#define IDI_CSMSG 111 -#define IDR_EDITMENU 112 -#define IDD_OPT_ADVANCED 113 -#define IDD_OPT_STATUS 114 -#define IDI_GOTOURL 115 -#define IDD_OPT_VARIABLES 116 -#define IDC_BOPTDEF 1000 -#define IDC_BOPTHIST 1001 -#define IDC_OK 1002 -#define IDC_EDIT1 1003 -#define IDC_CANCEL 1004 -#define IDC_ROPTMSG1 1005 -#define IDC_ROPTMSG2 1006 -#define IDC_ROPTMSG3 1007 -#define IDC_ROPTMSG4 1008 -#define IDC_ROPTMSG5 1009 -#define IDC_SPECSET 1010 -#define IDC_MSG 1011 -#define IDC_RETRIEVING 1012 -#define IDC_CLEAVEWINAMP 1013 -#define IDC_COPY 1014 -#define IDC_CSTATUSLIST 1015 -#define IDC_CICONS2 1016 -#define IDC_CICONS1 1017 -#define IDC_CPROFILES 1018 -#define IDC_EMAXHIST 1019 -#define IDC_ETIMEOUT 1020 -#define IDC_CSHOWGURL 1021 -#define IDC_SMAXHIST 1022 -#define IDC_CCLOSEWND 1023 -#define IDC_STIMEOUT 1024 -#define IDC_CBOPTSTATUS 1025 -#define IDC_COPTMSG1 1026 -#define IDC_OPTEDIT1 1027 -#define IDC_CBOPTPROTO 1028 -#define IDC_ROPTPROTO1 1029 -#define IDC_ROPTPROTO2 1030 -#define IDC_ROPTPROTO3 1031 -#define IDC_CREMOVECR 1032 -#define IDC_CSHOWCOPY 1033 -#define IDC_EMAXLENGTH 1034 -#define IDC_SMAXLENGTH 1035 -#define IDC_COPTMSG2 1036 -#define IDC_VARSHELP 1037 -#define IDC_CBOPTBUTTONS 1038 -#define IDC_CSHOWSMSG 1039 -#define IDC_CRPOSWND 1040 -#define IDC_ESECUPDTMSG 1041 -#define IDC_CUPDATEMSG 1042 -#define IDC_SSECUPDTMSG 1043 -#define IDC_BOPTPROTO 1044 -#define IDC_BOPTSTATUS 1045 -#define IDC_LISTPROTO 1046 -#define IDC_LISTSTATUS 1047 -#define IDC_ESETSTATUS 1048 -#define IDC_SSETSTATUS 1049 -#define IDC_NOTE1 1050 -#define IDC_POPUPDLG 1051 -#define IDC_ROPTPROTO4 1052 -#define IDC_BADD 1053 -#define IDC_BDEL 1054 -#define IDC_BCLEAR 1055 -#define IDC_CNOIDLE 1056 -#define IDC_CNOICQREQ 1057 -#define IDC_CVARIABLES 1058 -#define IDC_CDATEPARSING 1059 -#define IDC_MAXLENGTH 1060 -#define IDM_VDATE 40002 -#define IDM_VWINAMPSONG 40003 -#define IDM_VRANDXY 40004 -#define IDM_VTIME 40006 -#define IDM_CUT 40007 -#define IDM_COPY 40008 -#define IDM_PASTE 40009 -#define IDM_DELETE 40010 -#define IDM_SELECTALL 40011 -#define ID__FORTUNE 40012 -#define ID__FORTUNEAWAYMSG_PROTOFORTUNEMSG 40013 -#define ID__FORTUNEAWAYMSG_STATUSFORTUNEMSG 40014 -#define ID__VARIABLES_LSSTATUSCONTACT 40015 -#define ID__VARIABLES_LSDATECONTACTFORMAT 40016 -#define ID__VARIABLES_CINFOCONTACTPROPERTY 40017 -#define ID__VARIABLES_MSTATUSPROTOCOL 40018 -#define ID__VARIABLES_LSTIMECONTACTFORMAT 40019 -#define ID__VARIABLES_DBSETTINGCONTACTMODULESETTING 40020 -#define ID__VARIABLES_TXTFILEFILELINE 40021 -#define ID__VARIABLES_IFCONDITIONTRUEFALSE 40022 -#define ID__VARIABLES_STRCMPSTRING1STRING2 40023 -#define ID__VARIABLES_STRICMPSTRING1STRING2 40024 -#define ID__VARIABLES_CDATEFORMAT 40025 -#define ID__VARIABLES_CTIMEFORMAT 40026 -#define ID__VARIABLES_REPLACESUBSTRING1STRING2 40027 -#define ID__VARIABLES_LOWERSTRING 40028 -#define ID__VARIABLES_UPPERSTRING 40029 -#define ID__VARIABLES_CONTACTSTRINGPROPERTY 40030 -#define ID__VARIABLES_SCROLLSTRINGNUMCHARSNUMCHARS 40031 -#define ID__VARIABLES_MOREVARIABLES 40032 -#define ID__VARIABLES 40033 -#define ID__FORTUNEAWAYMSG 40034 -#define IDM_VRANDMSG 40035 -#define IDM_VRANDDEFMSG 40036 - -// Next default values for new objects -// -#ifdef APSTUDIO_INVOKED -#ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_NEXT_RESOURCE_VALUE 117 -#define _APS_NEXT_COMMAND_VALUE 40037 -#define _APS_NEXT_CONTROL_VALUE 1061 -#define _APS_NEXT_SYMED_VALUE 100 -#endif -#endif diff --git a/plugins/SimpleStatusMsg/resource.rc b/plugins/SimpleStatusMsg/resource.rc deleted file mode 100644 index 4a81378d39..0000000000 --- a/plugins/SimpleStatusMsg/resource.rc +++ /dev/null @@ -1,437 +0,0 @@ -// Microsoft Visual C++ generated resource script. -// -#include "resource.h" - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -#include "afxres.h" - -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// Neutral resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NEU) -#ifdef _WIN32 -LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL -#pragma code_page(1250) -#endif //_WIN32 - -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,9,0,4 - PRODUCTVERSION 1,9,0,4 - FILEFLAGSMASK 0x3fL -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x40004L - FILETYPE 0x2L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "000004b0" - BEGIN - VALUE "Comments", "Licensed under the terms of the GNU General Public License" - VALUE "CompanyName", "Bartosz 'Dezeath' Bia³ek, Harven" - VALUE "FileDescription", "Simple Status Message plugin for Miranda IM" - VALUE "FileVersion", "1.9.0.4" - VALUE "InternalName", "simplestatusmsg" - VALUE "LegalCopyright", "Copyright © 2006-2011 Bartosz Bia³ek, © 2005 Harven" - VALUE "OriginalFilename", "simplestatusmsg.dll" - VALUE "ProductName", "Simple Status Message" - VALUE "ProductVersion", "1.9.0.4" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x0, 1200 - END -END - -#endif // Neutral resources -///////////////////////////////////////////////////////////////////////////// - - -///////////////////////////////////////////////////////////////////////////// -// Polish resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_PLK) -#ifdef _WIN32 -LANGUAGE LANG_POLISH, SUBLANG_DEFAULT -#pragma code_page(1250) -#endif //_WIN32 - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE -BEGIN - "resource.h\0" -END - -2 TEXTINCLUDE -BEGIN - "#include ""afxres.h""\r\n" - "\0" -END - -3 TEXTINCLUDE -BEGIN - "\r\n" - "\0" -END - -#endif // APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// -// Dialog -// - -IDD_READAWAYMSG DIALOGEX 0, 0, 187, 72 -STYLE DS_SETFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_3DLOOK | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -EXSTYLE WS_EX_CONTROLPARENT -CAPTION "%s Message for %s" -FONT 8, "MS Shell Dlg", 0, 0, 0x1 -BEGIN - DEFPUSHBUTTON "&Cancel",IDOK,32,53,50,14 - CTEXT "Retrieving %s message...",IDC_RETRIEVING,5,21,177,8,SS_NOPREFIX - EDITTEXT IDC_MSG,5,5,177,43,ES_MULTILINE | ES_AUTOVSCROLL | ES_READONLY | NOT WS_VISIBLE | WS_VSCROLL - PUSHBUTTON "Co&py to Clipboard",IDC_COPY,92,53,63,14,BS_CENTER | BS_VCENTER -END - -IDD_AWAYMSGBOX DIALOG 0, 0, 208, 90 -STYLE DS_SETFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_3DLOOK | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "%s Message (%s)" -FONT 8, "MS Shell Dlg" -BEGIN - EDITTEXT IDC_EDIT1,7,23,193,44,ES_MULTILINE | ES_AUTOVSCROLL | ES_NOHIDESEL | ES_WANTRETURN | WS_VSCROLL - DEFPUSHBUTTON "OK",IDC_OK,7,71,66,14,BS_CENTER | BS_VCENTER - PUSHBUTTON "&Cancel",IDC_CANCEL,78,71,66,14,BS_CENTER | BS_VCENTER - CONTROL "",IDC_BADD,"MButtonClass",WS_TABSTOP,149,71,16,14,WS_EX_NOACTIVATE | 0x10000000L - CONTROL "",IDC_BDEL,"MButtonClass",WS_TABSTOP,167,71,16,14,WS_EX_NOACTIVATE | 0x10000000L - CONTROL "",IDC_BCLEAR,"MButtonClass",WS_TABSTOP,185,71,16,14,WS_EX_NOACTIVATE | 0x10000000L -END - -IDD_COPY DIALOGEX 0, 0, 159, 25 -STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION -EXSTYLE WS_EX_TOOLWINDOW -CAPTION "Retrieving status message for %s..." -FONT 8, "MS Sans Serif", 0, 0, 0x1 -BEGIN - DEFPUSHBUTTON "&Cancel",IDCANCEL,55,6,50,14,BS_CENTER | BS_VCENTER -END - - -///////////////////////////////////////////////////////////////////////////// -// -// DESIGNINFO -// - -#ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO -BEGIN - IDD_READAWAYMSG, DIALOG - BEGIN - LEFTMARGIN, 5 - RIGHTMARGIN, 182 - TOPMARGIN, 5 - BOTTOMMARGIN, 67 - END - - IDD_AWAYMSGBOX, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 201 - TOPMARGIN, 7 - BOTTOMMARGIN, 83 - END - - IDD_COPY, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 152 - TOPMARGIN, 7 - BOTTOMMARGIN, 18 - END -END -#endif // APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// -// Icon -// - -// Icon with lowest ID value placed first to ensure application icon -// remains consistent on all systems. -IDI_CROSS ICON "res\\cross.ico" -IDI_HISTORY ICON "res\\history.ico" -IDI_MESSAGE ICON "res\\msg.ico" -IDI_PLUS ICON "res\\plus.ico" -IDI_CHIST ICON "res\\cbook.ico" -IDI_COPY ICON "res\\copy.ico" -IDI_CSMSG ICON "res\\csmsg.ico" -IDI_GOTOURL ICON "res\\gotourl.ico" - -///////////////////////////////////////////////////////////////////////////// -// -// Menu -// - -IDR_EDITMENU MENU -BEGIN - POPUP "" - BEGIN - MENUITEM "%time%", IDM_VTIME - MENUITEM "%date%", IDM_VDATE - MENUITEM "%winampsong%", IDM_VWINAMPSONG - MENUITEM "%rand(x,y)%", IDM_VRANDXY - MENUITEM "%randmsg%", IDM_VRANDMSG - MENUITEM "%randdefmsg%", IDM_VRANDDEFMSG - MENUITEM SEPARATOR - POPUP "Fortune" - BEGIN - MENUITEM "%fortunemsg%", ID__FORTUNE - MENUITEM "%protofortunemsg%", ID__FORTUNEAWAYMSG_PROTOFORTUNEMSG - MENUITEM "%statusfortunemsg%", ID__FORTUNEAWAYMSG_STATUSFORTUNEMSG - END - POPUP "Variables" - BEGIN - MENUITEM "?cinfo(contact,property)", ID__VARIABLES_CINFOCONTACTPROPERTY - MENUITEM "?contact(string,property)", ID__VARIABLES_CONTACTSTRINGPROPERTY - MENUITEM "?mstatus(protocol)", ID__VARIABLES_MSTATUSPROTOCOL - MENUITEM "?lsdate(contact,format)", ID__VARIABLES_LSDATECONTACTFORMAT - MENUITEM "?lsstatus(contact)", ID__VARIABLES_LSSTATUSCONTACT - MENUITEM "?lstime(contact,format)", ID__VARIABLES_LSTIMECONTACTFORMAT - MENUITEM "?dbsetting(contact,module,setting)", ID__VARIABLES_DBSETTINGCONTACTMODULESETTING - MENUITEM "?txtfile(file,line)", ID__VARIABLES_TXTFILEFILELINE - MENUITEM "?if(condition,true,false)", ID__VARIABLES_IFCONDITIONTRUEFALSE - MENUITEM "?strcmp(string1,string2)", ID__VARIABLES_STRCMPSTRING1STRING2 - MENUITEM "?stricmp(string1,string2)", ID__VARIABLES_STRICMPSTRING1STRING2 - MENUITEM "?cdate(format)", ID__VARIABLES_CDATEFORMAT - MENUITEM "?ctime(format)", ID__VARIABLES_CTIMEFORMAT - MENUITEM "?replace(sub,string1,string2)", ID__VARIABLES_REPLACESUBSTRING1STRING2 - MENUITEM "?lower(string)", ID__VARIABLES_LOWERSTRING - MENUITEM "?upper(string)", ID__VARIABLES_UPPERSTRING - MENUITEM "?scroll(string,numchars,numchars)", ID__VARIABLES_SCROLLSTRINGNUMCHARSNUMCHARS - MENUITEM SEPARATOR - MENUITEM "More variables...", ID__VARIABLES_MOREVARIABLES - END - MENUITEM "Fortune", ID__FORTUNEAWAYMSG - MENUITEM "Variables", ID__VARIABLES - MENUITEM SEPARATOR - MENUITEM "Cut", IDM_CUT - MENUITEM "Copy", IDM_COPY - MENUITEM "Paste", IDM_PASTE - MENUITEM "Delete", IDM_DELETE - MENUITEM SEPARATOR - MENUITEM "Select All", IDM_SELECTALL - END -END - -#endif // Polish resources -///////////////////////////////////////////////////////////////////////////// - - -///////////////////////////////////////////////////////////////////////////// -// English (U.S.) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -#ifdef _WIN32 -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -#pragma code_page(1252) -#endif //_WIN32 - -///////////////////////////////////////////////////////////////////////////// -// -// Dialog -// - -IDD_OPT_GENERAL DIALOGEX 0, 0, 307, 216 -STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_VISIBLE -EXSTYLE WS_EX_CONTROLPARENT -FONT 8, "MS Shell Dlg", 0, 0, 0x1 -BEGIN - GROUPBOX "Behaviour on status change",IDC_STATIC,4,2,300,58,WS_GROUP - COMBOBOX IDC_CBOPTPROTO,13,15,106,97,CBS_DROPDOWNLIST | WS_TABSTOP - PUSHBUTTON "Apply to all",IDC_BOPTPROTO,123,15,60,13 - LTEXT "Max length:",IDC_MAXLENGTH,198,17,63,8 - EDITTEXT IDC_EMAXLENGTH,262,15,36,12,ES_NUMBER | NOT WS_BORDER,WS_EX_CLIENTEDGE - CONTROL "Spin2",IDC_SMAXLENGTH,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_ARROWKEYS | UDS_NOTHOUSANDS,288,15,10,14 - CONTROL "Pop up dialog box",IDC_ROPTPROTO1,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,26,31,128,8 - CONTROL "Do not change status message",IDC_ROPTPROTO2,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,26,43,128,8 - CONTROL "Always set the same message",IDC_ROPTPROTO3,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,155,31,144,8 - CONTROL "Do not set status message",IDC_ROPTPROTO4,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,155,43,144,8 - GROUPBOX "Status Messages",IDC_STATIC,4,62,300,148,WS_GROUP - COMBOBOX IDC_CBOPTSTATUS,35,73,240,97,CBS_DROPDOWNLIST | WS_TABSTOP - PUSHBUTTON "Apply to all",IDC_BOPTSTATUS,215,90,60,13 - CONTROL "Pop up dialog asking for new message",IDC_COPTMSG1, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,48,89,166,8 - CONTROL "Set an empty message",IDC_ROPTMSG1,"Button",BS_AUTORADIOBUTTON | BS_VCENTER | WS_TABSTOP,48,100,166,8 - CONTROL "Use default message",IDC_ROPTMSG2,"Button",BS_AUTORADIOBUTTON | BS_VCENTER | WS_TABSTOP,48,111,166,8 - CONTROL "Use last message",IDC_ROPTMSG3,"Button",BS_AUTORADIOBUTTON | BS_VCENTER | WS_TABSTOP,48,122,166,8 - CONTROL "Use last message set for this status",IDC_ROPTMSG5, - "Button",BS_AUTORADIOBUTTON | BS_VCENTER | WS_TABSTOP,48,133,166,8 - CONTROL "Set the following message:",IDC_ROPTMSG4,"Button",BS_AUTORADIOBUTTON | BS_VCENTER | WS_TABSTOP,48,144,166,8 - EDITTEXT IDC_OPTEDIT1,58,155,219,38,ES_MULTILINE | ES_AUTOVSCROLL | ES_WANTRETURN | WS_VSCROLL - CONTROL "",IDC_VARSHELP,"MButtonClass",WS_TABSTOP,261,141,16,14,WS_EX_NOACTIVATE | 0x10000000L - CONTROL "Put default message in message list",IDC_COPTMSG2, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,35,196,179,8 -END - -IDD_OPT_VARIABLES DIALOGEX 0, 0, 307, 226 -STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_VISIBLE -EXSTYLE WS_EX_CONTROLPARENT -FONT 8, "MS Shell Dlg", 0, 0, 0x1 -BEGIN - GROUPBOX "Variables",IDC_STATIC,4,2,300,100,WS_GROUP - CONTROL "Update variables in status messages every",IDC_CUPDATEMSG, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,16,150,8 - EDITTEXT IDC_ESECUPDTMSG,166,14,32,12,ES_AUTOHSCROLL | ES_NUMBER - CONTROL "Spin2",IDC_SSECUPDTMSG,"msctls_updown32",UDS_WRAP | UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,188,14,11,14 - LTEXT "seconds",IDC_STATIC,202,16,32,8 - CONTROL "Do not update variables during idle",IDC_CNOIDLE, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,25,30,274,8 - CONTROL "Do not update variables on ICQ status message requests",IDC_CNOICQREQ, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,25,44,274,8 - CONTROL "Leave last played track's title after exiting the player",IDC_CLEAVEWINAMP, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,25,58,274,8 - CONTROL "Enable status messages parsing by Variables plugin",IDC_CVARIABLES, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,72,287,8 - CONTROL "Exclude %date% token from parsing (restart required)",IDC_CDATEPARSING, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,25,86,274,8 -END - -IDD_OPT_ADVANCED DIALOGEX 0, 0, 307, 226 -STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_VISIBLE -EXSTYLE WS_EX_CONTROLPARENT -FONT 8, "MS Shell Dlg", 0, 0, 0x1 -BEGIN - GROUPBOX "Layout",IDC_STATIC,4,2,300,58,WS_GROUP - CONTROL "Show status list",IDC_CSTATUSLIST,"Button",BS_AUTOCHECKBOX | BS_LEFT | BS_VCENTER | WS_TABSTOP,12,16,137,10 - CONTROL "Show status profiles in status list",IDC_CPROFILES, - "Button",BS_AUTOCHECKBOX | BS_LEFT | BS_VCENTER | WS_TABSTOP,12,30,140,10 - CONTROL "Show icons in status list",IDC_CICONS1,"Button",BS_AUTOCHECKBOX | BS_LEFT | BS_VCENTER | WS_TABSTOP,12,44,138,10 - LTEXT "Buttons:",IDC_STATIC,154,16,58,8 - COMBOBOX IDC_CBOPTBUTTONS,154,28,144,100,CBS_DROPDOWNLIST | WS_TABSTOP - CONTROL "Show icons in message list",IDC_CICONS2,"Button",BS_AUTOCHECKBOX | BS_LEFT | BS_VCENTER | WS_TABSTOP,154,44,140,10 - GROUPBOX "Other",IDC_STATIC,4,62,300,112,WS_GROUP - CONTROL "Store up to",IDC_STATIC,"Static",SS_LEFTNOWORDWRAP,12,76,45,8 - EDITTEXT IDC_EMAXHIST,58,74,28,12,ES_AUTOHSCROLL | ES_NUMBER - CONTROL "Spin2",IDC_SMAXHIST,"msctls_updown32",UDS_WRAP | UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,76,73,11,14 - LTEXT "recent messages (0 = disable)",IDC_STATIC,90,76,143,8 - CONTROL "Automatically close dialog window after",IDC_CCLOSEWND, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,90,150,8 - EDITTEXT IDC_ETIMEOUT,166,88,28,12,ES_AUTOHSCROLL | ES_NUMBER - CONTROL "Spin2",IDC_STIMEOUT,"msctls_updown32",UDS_WRAP | UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,184,87,11,14 - LTEXT "seconds",IDC_STATIC,198,90,36,8 - CONTROL "Remember last dialog window position",IDC_CRPOSWND, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,104,222,8 - CONTROL "Remove Carriage Return (CR = '\\r' = #0D) chars from status messages",IDC_CREMOVECR, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,118,287,8 - CONTROL "Show 'Copy Away Message' item in contact menu",IDC_CSHOWCOPY, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,132,287,8 - CONTROL "Show 'Go to URL in Away Message' item in contact menu",IDC_CSHOWGURL, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,146,287,8 - CONTROL "Show 'Status Message...' item in status menu",IDC_CSHOWSMSG, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,160,287,8 - CONTROL "Clear History",IDC_BOPTHIST,"MButtonClass",WS_TABSTOP,236,73,61,14,WS_EX_NOACTIVATE | 0x10000000L - CONTROL "Clear Predefined",IDC_BOPTDEF,"MButtonClass",WS_TABSTOP,236,90,61,14,WS_EX_NOACTIVATE | 0x10000000L - LTEXT "* This feature is available only when using StartupStatus plugin.",IDC_NOTE1,11,177,287,8,NOT WS_VISIBLE -END - -IDD_OPT_STATUS DIALOGEX 0, 0, 241, 162 -STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_VISIBLE -EXSTYLE WS_EX_CONTROLPARENT -FONT 8, "MS Shell Dlg", 0, 0, 0x1 -BEGIN - GROUPBOX "Status on Startup",IDC_STATIC,5,2,230,154,WS_GROUP - LTEXT "Set status after",IDC_STATIC,15,18,80,8 - EDITTEXT IDC_ESETSTATUS,96,16,36,12,ES_NUMBER | NOT WS_BORDER,WS_EX_CLIENTEDGE - CONTROL "Spin2",IDC_SSETSTATUS,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_ARROWKEYS | UDS_NOTHOUSANDS,122,16,11,14 - LTEXT "miliseconds",IDC_STATIC,136,18,90,8 - LTEXT "Protocol:",IDC_STATIC,16,34,63,8 - LISTBOX IDC_LISTPROTO,15,45,100,75,LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP - LTEXT "Status:",IDC_STATIC,126,34,63,8 - LISTBOX IDC_LISTSTATUS,125,45,100,75,LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP - CONTROL "Independent setting for each protocol",IDC_SPECSET, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,126,210,8 - CONTROL "Pop up dialog asking for status message",IDC_POPUPDLG, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,138,210,8 -END - - -///////////////////////////////////////////////////////////////////////////// -// -// DESIGNINFO -// - -#ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO -BEGIN - IDD_OPT_GENERAL, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 300 - TOPMARGIN, 7 - BOTTOMMARGIN, 209 - END - - IDD_OPT_VARIABLES, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 300 - TOPMARGIN, 7 - BOTTOMMARGIN, 219 - END - - IDD_OPT_ADVANCED, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 300 - TOPMARGIN, 7 - BOTTOMMARGIN, 219 - END - - IDD_OPT_STATUS, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 234 - TOPMARGIN, 7 - BOTTOMMARGIN, 155 - END -END -#endif // APSTUDIO_INVOKED - -#endif // English (U.S.) resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// - - -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED - diff --git a/plugins/SimpleStatusMsg/simplestatusmsg-translation.txt b/plugins/SimpleStatusMsg/simplestatusmsg-translation.txt deleted file mode 100644 index 37e50a086e..0000000000 --- a/plugins/SimpleStatusMsg/simplestatusmsg-translation.txt +++ /dev/null @@ -1,150 +0,0 @@ -; Common strings that belong to many files -;[%s Message (%s)] -;[Add to Predefined] -;[Are you sure you want to clear status message history?] -;[Change Status Message] -;[Clear History] -;[Confirm clearing history] -;[Copy Away Message] -;[Delete Selected] -;[Show status profiles in status list] -;[Status Messages] -;[Variables] - -; ../../plugins/SimpleStatusMsg/awaymsg.cpp -;[&Close] -;[&Go to URL in %s Message] -;[&Go to URL in Away Message] -;[Copy %s Message] -;[Failed to retrieve %s message.] -;[Re&ad %s Message] -;[Re&ad Away Message] - -; ../../plugins/SimpleStatusMsg/main.cpp -;[%s (locked)] -;[External Applications\tretrieves song name of the song currently playing in Winamp (Simple Status Message compatible)] -;[Miranda Related\tget the date (Simple Status Message compatible)] -;[Status Message...] - -; ../../plugins/SimpleStatusMsg/msgbox.cpp -;[] -;[] -;[Closing in %d] -;[Global] -;[OK (%d)] - -; ../../plugins/SimpleStatusMsg/options.cpp -;[] -;[Advanced] -;[Are you sure you want to clear predefined status messages?] -;[Confirm clearing predefined] -;[Flat, next to cancel button] -;[General] -;[Global status change] -;[Hide] -;[Open String Formatting Help] -;[Show in message list] -;[Show next to cancel button] -;[Status] - -; ../../plugins/SimpleStatusMsg/resource.rc -;[%date%] -;[%fortunemsg%] -;[%protofortunemsg%] -;[%rand(x,y)%] -;[%randdefmsg%] -;[%randmsg%] -;[%s Message for %s] -;[%statusfortunemsg%] -;[%time%] -;[%winampsong%] -;[&Cancel] -;[* This feature is available only when using StartupStatus plugin.] -;[?cdate(format)] -;[?cinfo(contact,property)] -;[?contact(string,property)] -;[?ctime(format)] -;[?dbsetting(contact,module,setting)] -;[?if(condition,true,false)] -;[?lower(string)] -;[?lsdate(contact,format)] -;[?lsstatus(contact)] -;[?lstime(contact,format)] -;[?mstatus(protocol)] -;[?replace(sub,string1,string2)] -;[?scroll(string,numchars,numchars)] -;[?strcmp(string1,string2)] -;[?stricmp(string1,string2)] -;[?txtfile(file,line)] -;[?upper(string)] -;[Always set the same message] -;[Apply to all] -;[Automatically close dialog window after] -;[Behaviour on status change] -;[Buttons:] -;[Clear Predefined] -;[Co&py to Clipboard] -;[Copy] -;[Cut] -;[Delete] -;[Do not change status message] -;[Do not set status message] -;[Do not update variables during idle] -;[Do not update variables on ICQ status message requests] -;[Enable status messages parsing by Variables plugin] -;[Exclude %date% token from parsing (restart required)] -;[Fortune] -;[Independent setting for each protocol] -;[Layout] -;[Leave last played track's title after exiting the player] -;[Max length:] -;[More variables...] -;[OK] -;[Other] -;[Paste] -;[Pop up dialog asking for new message] -;[Pop up dialog asking for status message] -;[Pop up dialog box] -;[Protocol:] -;[Put default message in message list] -;[Remember last dialog window position] -;[Remove Carriage Return (CR = '\\r' = #0D) chars from status messages] -;[Retrieving %s message...] -;[Retrieving status message for %s...] -;[Select All] -;[Set an empty message] -;[Set status after] -;[Set the following message:] -;[Show 'Copy Away Message' item in contact menu] -;[Show 'Go to URL in Away Message' item in contact menu] -;[Show 'Status Message...' item in status menu] -;[Show icons in message list] -;[Show icons in status list] -;[Show status list] -;[Spin2] -;[Status on Startup] -;[Status:] -;[Store up to] -;[Update variables in status messages every] -;[Use default message] -;[Use last message] -;[Use last message set for this status] -;[miliseconds] -;[recent messages (0 = disable)] -;[seconds] - -; ../../plugins/SimpleStatusMsg/utils.cpp -;[Give a guy some peace, would ya?] -;[Give it up, I'm not in!] -;[Go to URL in Away Message] -;[I'm a chatbot!] -;[I'm hiding from the mafia.] -;[I've been away since %time%.] -;[Mmm...food.] -;[Nope, not here.] -;[Not right now.] -;[Predefined Message] -;[Recent Message] -;[That'll be the phone.] -;[Yep, I'm here.] -;[idleeeeeeee] diff --git a/plugins/SimpleStatusMsg/simplestatusmsg.h b/plugins/SimpleStatusMsg/simplestatusmsg.h deleted file mode 100644 index d66aba197c..0000000000 --- a/plugins/SimpleStatusMsg/simplestatusmsg.h +++ /dev/null @@ -1,105 +0,0 @@ -/* - -Simple Status Message plugin for Miranda IM -Copyright (C) 2006-2011 Bartosz 'Dezeath' Bia³ek, (C) 2005 Harven - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along -with this program; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -*/ -#ifndef SIMPLESTATUSMSG_H__ -#define SIMPLESTATUSMSG_H__ 1 - -typedef struct tagACCOUNTS -{ - PROTOACCOUNT **pa; - int count; - int statusCount; - DWORD statusFlags; - int statusMsgCount; - DWORD statusMsgFlags; -} -PROTOACCOUNTS; - -extern PROTOACCOUNTS *accounts; - -#define DLG_SHOW_STATUS 1 -#define DLG_SHOW_STATUS_ICONS 2 -#define DLG_SHOW_LIST_ICONS 4 -#define DLG_SHOW_BUTTONS 8 -#define DLG_SHOW_BUTTONS_INLIST 16 -#define DLG_SHOW_BUTTONS_FLAT 32 -#define DLG_SHOW_STATUS_PROFILES 64 -//NOTE: MAX 128 -#define DLG_SHOW_DEFAULT DLG_SHOW_STATUS | DLG_SHOW_STATUS_ICONS | DLG_SHOW_LIST_ICONS | DLG_SHOW_BUTTONS - -#define STATUS_SHOW_DLG 1 -#define STATUS_EMPTY_MSG 2 -#define STATUS_DEFAULT_MSG 4 -#define STATUS_LAST_MSG 8 -#define STATUS_THIS_MSG 16 -#define STATUS_LAST_STATUS_MSG 32 -#define STATUS_DEFAULT STATUS_SHOW_DLG | STATUS_LAST_MSG - -#define PROTO_NO_MSG 1 -#define PROTO_THIS_MSG 2 -#define PROTO_POPUPDLG 4 -#define PROTO_NOCHANGE 8 -#define PROTO_DEFAULT PROTO_NOCHANGE - -struct MsgBoxInitData -{ - char *m_szProto; - int m_iStatus; - int m_iStatusModes; - int m_iStatusMsgModes; - BOOL m_bOnEvent; - BOOL m_bOnStartup; -}; - -extern HINSTANCE g_hInst; -extern HWND hwndSAMsgDialog; - -#define MS_SIMPLESTATUSMSG_SHOWDIALOGINT "SimpleStatusMsg/ShowDialogInternal" // internal use ONLY - -/* awaymsg.cpp */ -int LoadAwayMsgModule(void); -int AwayMsgPreShutdown(void); - -/* main.cpp */ -void SetStatusMessage(const char *szProto, int initial_status_mode, int status_mode, TCHAR *message, BOOL on_startup); - -/* msgbox.cpp */ -INT_PTR CALLBACK AwayMsgBoxDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); - -/* options.cpp */ -int InitOptions(WPARAM wParam, LPARAM lParam); - -/* utils.cpp */ -void IconsInit(void); -HICON LoadIconEx(const char* name); -HANDLE GetIconHandle(int iconId); -void ReleaseIconEx(const char* name); -HANDLE HookEventEx(const char *szEvent, MIRANDAHOOK hookProc); -void UnhookEvents(void); -HANDLE HookProtoEvent(const char *szModule, const char *szEvent, MIRANDAHOOKPARAM hookProc); -void UnhookProtoEvents(void); -HANDLE CreateServiceFunctionEx(const char *name, MIRANDASERVICE serviceProc); -void DestroyServiceFunctionsEx(void); -int GetRandom(int from, int to); -const TCHAR *GetDefaultMessage(int status); -const char *StatusModeToDbSetting(int status, const char *suffix); -int GetCurrentStatus(const char *szProto); -int GetStartupStatus(const char *szProto); - -#endif // SIMPLESTATUSMSG_H__ diff --git a/plugins/SimpleStatusMsg/simplestatusmsg_10.vcxproj b/plugins/SimpleStatusMsg/simplestatusmsg_10.vcxproj index afea8eaf86..1cff22adf5 100644 --- a/plugins/SimpleStatusMsg/simplestatusmsg_10.vcxproj +++ b/plugins/SimpleStatusMsg/simplestatusmsg_10.vcxproj @@ -73,14 +73,13 @@ Disabled ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;UNICODE;_USRDLL;SIMPLESTATUSMSG_EXPORTS;%(PreprocessorDefinitions) + WIN32;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL true Level3 EditAndContinue - 4996;%(DisableSpecificWarnings) _DEBUG;%(PreprocessorDefinitions) @@ -100,13 +99,12 @@ Disabled ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) - WIN64;_DEBUG;_WINDOWS;UNICODE;_USRDLL;SIMPLESTATUSMSG_EXPORTS;%(PreprocessorDefinitions) + WIN64;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL true Level3 - 4996;%(DisableSpecificWarnings) _DEBUG;%(PreprocessorDefinitions) @@ -128,13 +126,12 @@ OnlyExplicitInline Size ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;UNICODE;_USRDLL;SIMPLESTATUSMSG_EXPORTS;%(PreprocessorDefinitions) + WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) true false true Fast Level3 - 4996;%(DisableSpecificWarnings) NDEBUG;%(PreprocessorDefinitions) @@ -158,13 +155,12 @@ OnlyExplicitInline Size ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) - WIN64;NDEBUG;_WINDOWS;UNICODE;_USRDLL;SIMPLESTATUSMSG_EXPORTS;%(PreprocessorDefinitions) + WIN64;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) true false true Fast Level3 - 4996;%(DisableSpecificWarnings) NDEBUG;%(PreprocessorDefinitions) @@ -183,29 +179,19 @@ - - - - - + + + + + - - - + + + - - - - - - - - - - - + diff --git a/plugins/SimpleStatusMsg/simplestatusmsg_10.vcxproj.filters b/plugins/SimpleStatusMsg/simplestatusmsg_10.vcxproj.filters index 84705e53ed..c797e51b5e 100644 --- a/plugins/SimpleStatusMsg/simplestatusmsg_10.vcxproj.filters +++ b/plugins/SimpleStatusMsg/simplestatusmsg_10.vcxproj.filters @@ -15,61 +15,35 @@ - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Header Files - + Header Files - + Header Files - - Resource Files - - - Resource Files - - - Resource Files - - - Resource Files - - - Resource Files - - - Resource Files - - - Resource Files - - - Resource Files - - - - + Resource Files diff --git a/plugins/SimpleStatusMsg/src/awaymsg.cpp b/plugins/SimpleStatusMsg/src/awaymsg.cpp new file mode 100644 index 0000000000..705b860cc5 --- /dev/null +++ b/plugins/SimpleStatusMsg/src/awaymsg.cpp @@ -0,0 +1,494 @@ +/* + +Miranda IM: the free IM client for Microsoft* Windows* + +Copyright 2000-2010 Miranda ICQ/IM project, +all portions of this codebase are copyrighted to the people +listed in contributors.txt. + +Portions of this code modified for Simple Status Message plugin +Copyright (C) 2006-2011 Bartosz 'Dezeath' Bia³ek, (C) 2005 Harven + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License along +with this program; if not, write to the Free Software Foundation, Inc., +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +*/ +#include "commonheaders.h" +#include "simplestatusmsg.h" + +static HANDLE hAwayMsgMenuItem; +static HANDLE hCopyMsgMenuItem; +static HANDLE hGoToURLMenuItem; +static HANDLE hWindowList; +static HANDLE hWindowList2; + +static char *StrNormNewlineA(char *szStr) +{ + if (szStr == NULL) return NULL; + + int nCR = 0; + for (int i = 0; szStr[i]; i++) + if (szStr[i] != 0x0D && szStr[i + 1] == 0x0A) nCR++; + + if (!nCR) return mir_strdup(szStr); + + char *szNewStr = (char*)mir_alloc(lstrlenA(szStr) + nCR + 1), *pszStr = szNewStr; + while (*szStr) + { + if (*szStr == 0x0A) + *pszStr++ = 0x0D; + *pszStr++ = *szStr++; + } + *pszStr++ = 0; + + return szNewStr; +} + + +static TCHAR *StrNormNewline(TCHAR *tszStr) +{ + if (tszStr == NULL) return NULL; + + int nCR = 0; + for (int i = 0; tszStr[i]; i++) + if (tszStr[i] != 0x0D && tszStr[i + 1] == 0x0A) nCR++; + + if (!nCR) return mir_tstrdup(tszStr); + + TCHAR *tszNewStr = (TCHAR*)mir_alloc((lstrlen(tszStr) + nCR + 1) * sizeof(TCHAR)), *ptszStr = tszNewStr; + while (*tszStr) + { + if (*tszStr == 0x0A) + *ptszStr++ = 0x0D; + *ptszStr++ = *tszStr++; + } + *ptszStr++ = 0; + + return tszNewStr; +} + + +struct AwayMsgDlgData +{ + HANDLE hContact; + HANDLE hSeq; + HANDLE hAwayMsgEvent; +}; + +#define HM_AWAYMSG (WM_USER + 10) + +static INT_PTR CALLBACK ReadAwayMsgDlgProc(HWND hwndDlg, UINT message, WPARAM wParam, LPARAM lParam) +{ + AwayMsgDlgData *dat = (AwayMsgDlgData*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA); + + switch (message) + { + case WM_INITDIALOG: + TranslateDialogDefault(hwndDlg); + dat = (AwayMsgDlgData*)mir_alloc(sizeof(AwayMsgDlgData)); + SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)dat); + + dat->hContact = (HANDLE)lParam; + dat->hSeq = (HANDLE)CallContactService(dat->hContact, PSS_GETAWAYMSG, 0, 0); + dat->hAwayMsgEvent = dat->hSeq ? HookEventMessage(ME_PROTO_ACK, hwndDlg, HM_AWAYMSG) : NULL; + WindowList_Add(hWindowList, hwndDlg, dat->hContact); + { + TCHAR str[256], format[128]; + TCHAR *contactName = (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)dat->hContact, GCDNF_TCHAR); + char *szProto = (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)dat->hContact, 0); + WORD dwStatus = DBGetContactSettingWord(dat->hContact, szProto, "Status", ID_STATUS_OFFLINE); + TCHAR *status = (TCHAR*)CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, dwStatus, GSMDF_TCHAR); + + GetWindowText(hwndDlg, format, SIZEOF(format)); + mir_sntprintf(str, SIZEOF(str), format, status, contactName); + SetWindowText(hwndDlg, str); + if (dat->hSeq) + { + GetDlgItemText(hwndDlg, IDC_RETRIEVING, format, SIZEOF(format)); + mir_sntprintf(str, SIZEOF(str), format, status); + } + else + { + mir_sntprintf(str, SIZEOF(str), TranslateT("Failed to retrieve %s message."), status); + SetDlgItemText(hwndDlg, IDOK, TranslateT("&Close")); + } + SetDlgItemText(hwndDlg, IDC_RETRIEVING, str); + SendMessage(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)LoadSkinnedProtoIcon(szProto, dwStatus)); + SendMessage(hwndDlg, WM_SETICON, ICON_SMALL, (LPARAM)LoadSkinnedProtoIcon(szProto, dwStatus)); + EnableWindow(GetDlgItem(hwndDlg, IDC_COPY), FALSE); + } + Utils_RestoreWindowPosition(hwndDlg, (HANDLE)lParam, "SRAway", "AwayMsgDlg"); + return TRUE; + + case HM_AWAYMSG: + { + ACKDATA *ack = (ACKDATA*)lParam; + if (ack->hContact != dat->hContact || ack->type != ACKTYPE_AWAYMSG) break; + if (ack->result != ACKRESULT_SUCCESS) break; + if (dat->hAwayMsgEvent && ack->hProcess == dat->hSeq) { UnhookEvent(dat->hAwayMsgEvent); dat->hAwayMsgEvent = NULL; } + + TCHAR *tszMsg = StrNormNewline((TCHAR*)ack->lParam); + SetDlgItemText(hwndDlg, IDC_MSG, tszMsg); + mir_free(tszMsg); + + if (ack->lParam && *((char*)ack->lParam) != '\0') + EnableWindow(GetDlgItem(hwndDlg, IDC_COPY), TRUE); + ShowWindow(GetDlgItem(hwndDlg, IDC_RETRIEVING), SW_HIDE); + ShowWindow(GetDlgItem(hwndDlg, IDC_MSG), SW_SHOW); + SetDlgItemText(hwndDlg, IDOK, TranslateT("&Close")); + break; + } + + case WM_COMMAND: + switch (LOWORD(wParam)) + { + case IDCANCEL: + case IDOK: + DestroyWindow(hwndDlg); + break; + + case IDC_COPY: + if (!OpenClipboard(hwndDlg)) break; + if (EmptyClipboard()) + { + TCHAR msg[1024]; + int len = GetDlgItemText(hwndDlg, IDC_MSG, msg, SIZEOF(msg)); + if (len) + { + LPTSTR lptstrCopy; + HGLOBAL hglbCopy = GlobalAlloc(GMEM_MOVEABLE, (len + 1) * sizeof(TCHAR)); + if (hglbCopy == NULL) + { + CloseClipboard(); + break; + } + lptstrCopy = (LPTSTR)GlobalLock(hglbCopy); + memcpy(lptstrCopy, msg, len * sizeof(TCHAR)); + lptstrCopy[len] = (TCHAR)0; + GlobalUnlock(hglbCopy); + + SetClipboardData(CF_UNICODETEXT, hglbCopy); + + } + } + CloseClipboard(); + break; + } + break; + + case WM_CLOSE: + DestroyWindow(hwndDlg); + break; + + case WM_DESTROY: + if (dat->hAwayMsgEvent) UnhookEvent(dat->hAwayMsgEvent); + Utils_SaveWindowPosition(hwndDlg, dat->hContact, "SRAway", "AwayMsgDlg"); + WindowList_Remove(hWindowList, hwndDlg); + CallService(MS_SKIN2_RELEASEICON, (WPARAM)SendMessage(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)NULL), 0); + CallService(MS_SKIN2_RELEASEICON, (WPARAM)SendMessage(hwndDlg, WM_SETICON, ICON_SMALL, (LPARAM)NULL), 0); + mir_free(dat); + break; + } + return FALSE; +} + +static INT_PTR GetMessageCommand(WPARAM wParam, LPARAM) +{ + if (HWND hwnd = WindowList_Find(hWindowList, (HANDLE)wParam)) + { + SetForegroundWindow(hwnd); + SetFocus(hwnd); + } + else CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_READAWAYMSG), NULL, ReadAwayMsgDlgProc, wParam); + return 0; +} + +static INT_PTR CALLBACK CopyAwayMsgDlgProc(HWND hwndDlg, UINT message, WPARAM wParam, LPARAM lParam) +{ + AwayMsgDlgData *dat = (AwayMsgDlgData*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA); + + switch (message) + { + case WM_INITDIALOG: + { + TCHAR str[256], format[128]; + TCHAR *contactName; + + TranslateDialogDefault(hwndDlg); + dat = (AwayMsgDlgData*)mir_alloc(sizeof(AwayMsgDlgData)); + SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)dat); + + dat->hContact = (HANDLE)lParam; + dat->hSeq = (HANDLE)CallContactService(dat->hContact, PSS_GETAWAYMSG, 0, 0); + dat->hAwayMsgEvent = dat->hSeq ? HookEventMessage(ME_PROTO_ACK, hwndDlg, HM_AWAYMSG) : NULL; + WindowList_Add(hWindowList2, hwndDlg, dat->hContact); + contactName = (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)dat->hContact, GCDNF_TCHAR); + GetWindowText(hwndDlg, format, SIZEOF(format)); + mir_sntprintf(str, SIZEOF(str), format, contactName); + SetWindowText(hwndDlg, str); + if (!dat->hSeq) DestroyWindow(hwndDlg); + return TRUE; + } + + case HM_AWAYMSG: + { + ACKDATA *ack = (ACKDATA*)lParam; + if (ack->hContact != dat->hContact || ack->type != ACKTYPE_AWAYMSG) { DestroyWindow(hwndDlg); break; } + if (ack->result != ACKRESULT_SUCCESS) { DestroyWindow(hwndDlg); break; } + if (dat->hAwayMsgEvent && ack->hProcess == dat->hSeq) { UnhookEvent(dat->hAwayMsgEvent); dat->hAwayMsgEvent = NULL; } + + if (!OpenClipboard(hwndDlg)) { DestroyWindow(hwndDlg); break; } + if (EmptyClipboard()) + { + TCHAR msg[1024]; + TCHAR *tszMsg = StrNormNewline((TCHAR*)ack->lParam); + mir_sntprintf(msg, SIZEOF(msg), _T("%s"), tszMsg); + mir_free(tszMsg); + size_t len = lstrlen(msg); + if (len) + { + LPTSTR lptstrCopy; + HGLOBAL hglbCopy = GlobalAlloc(GMEM_MOVEABLE, (len + 1) * sizeof(TCHAR)); + if (hglbCopy == NULL) { + CloseClipboard(); + DestroyWindow(hwndDlg); + break; + } + lptstrCopy = (LPTSTR)GlobalLock(hglbCopy); + memcpy(lptstrCopy, msg, len * sizeof(TCHAR)); + lptstrCopy[len] = (TCHAR)0; + GlobalUnlock(hglbCopy); + + SetClipboardData(CF_UNICODETEXT, hglbCopy); + } + } + CloseClipboard(); + DestroyWindow(hwndDlg); + break; + } + + case WM_COMMAND: + switch (LOWORD(wParam)) + { + case IDCANCEL: + case IDOK: + DestroyWindow(hwndDlg); + break; + } + break; + + case WM_CLOSE: + DestroyWindow(hwndDlg); + break; + + case WM_DESTROY: + if (dat->hAwayMsgEvent) UnhookEvent(dat->hAwayMsgEvent); + WindowList_Remove(hWindowList2, hwndDlg); + mir_free(dat); + break; + } + return FALSE; +} + +static INT_PTR CopyAwayMsgCommand(WPARAM wParam, LPARAM) +{ + if (HWND hwnd = WindowList_Find(hWindowList2, (HANDLE)wParam)) + { + SetForegroundWindow(hwnd); + SetFocus(hwnd); + } + else CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_COPY), NULL, CopyAwayMsgDlgProc, wParam); + return 0; +} + +static char *StrFindURL(char *pszStr) +{ + char *pszURL = NULL; + + if (pszStr != NULL && *pszStr != '\0') + { + pszURL = strstr(pszStr, "www."); + if (pszURL == NULL) + pszURL = strstr(pszStr, "http://"); + if (pszURL == NULL) + pszURL = strstr(pszStr, "https://"); + if (pszURL == NULL) + pszURL = strstr(pszStr, "ftp://"); + } + + return pszURL; +} + +static INT_PTR GoToURLMsgCommand(WPARAM wParam, LPARAM lParam) +{ + DBVARIANT dbv; + char *szMsg; + + + int unicode = !DBGetContactSetting((HANDLE)wParam, "CList", "StatusMsg", &dbv) && (dbv.type == DBVT_UTF8 || dbv.type == DBVT_WCHAR); + DBFreeVariant(&dbv); + if (unicode) + { + DBGetContactSettingWString((HANDLE)wParam, "CList", "StatusMsg", &dbv); + szMsg = mir_u2a(dbv.pwszVal); + } + else + + { + DBGetContactSettingString((HANDLE)wParam, "CList", "StatusMsg", &dbv); + szMsg = mir_strdup(dbv.pszVal); + } + DBFreeVariant(&dbv); + + char *szURL = StrFindURL(szMsg); + if (szURL != NULL) + { + int i; + for (i = 0; szURL[i] != ' ' && szURL[i] != '\n' && szURL[i] != '\r' && + szURL[i] != '\t' && szURL[i] != '\0'; i++); + + char *szMsgURL = (char *)mir_alloc(i + 1); + if (szMsgURL) + { + lstrcpynA(szMsgURL, szURL, i + 1); + CallService(MS_UTILS_OPENURL, (WPARAM)1, (LPARAM)szMsgURL); + mir_free(szMsgURL); + } + } + mir_free(szMsg); + + return 0; +} + +static int AwayMsgPreBuildMenu(WPARAM wParam, LPARAM lParam) +{ + CLISTMENUITEM clmi = {0}; + TCHAR str[128]; + char *szProto = (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, wParam, 0); + int iHidden = szProto ? DBGetContactSettingByte((HANDLE)wParam, szProto, "ChatRoom", 0) : 0; + char *szMsg; + int iStatus; + + clmi.cbSize = sizeof(clmi); + clmi.flags = CMIM_FLAGS | CMIF_HIDDEN | CMIF_TCHAR; + + if (!iHidden) + { + iHidden = 1; + iStatus = DBGetContactSettingWord((HANDLE)wParam, szProto, "Status", ID_STATUS_OFFLINE); + if (CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1,0) & PF1_MODEMSGRECV) + { + if (CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_3,0) & Proto_Status2Flag(iStatus == ID_STATUS_OFFLINE ? ID_STATUS_INVISIBLE : iStatus)) + { + iHidden = 0; + clmi.flags = CMIM_FLAGS | CMIM_NAME | CMIM_ICON | CMIF_TCHAR; + clmi.hIcon = LoadSkinnedProtoIcon(szProto, iStatus); + mir_sntprintf(str, SIZEOF(str), TranslateT("Re&ad %s Message"), (TCHAR*)CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, iStatus, GSMDF_TCHAR)); + clmi.ptszName = str; + } + } + } + CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hAwayMsgMenuItem, (LPARAM)&clmi); + CallService(MS_SKIN2_RELEASEICON, (WPARAM)clmi.hIcon, (LPARAM)0); + clmi.flags = CMIM_FLAGS | CMIF_HIDDEN | CMIF_TCHAR; + + if (!iHidden) + { + DBVARIANT dbv; + + int unicode = !DBGetContactSetting((HANDLE)wParam, "CList", "StatusMsg", &dbv) && (dbv.type == DBVT_UTF8 || dbv.type == DBVT_WCHAR); + DBFreeVariant(&dbv); + if (unicode) + { + DBGetContactSettingWString((HANDLE)wParam, "CList", "StatusMsg", &dbv); + szMsg = mir_u2a(dbv.pwszVal); + } + else + + { + DBGetContactSettingString((HANDLE)wParam, "CList", "StatusMsg", &dbv); + szMsg = mir_strdup(dbv.pszVal); + } + DBFreeVariant(&dbv); + + if (DBGetContactSettingByte(NULL, "SimpleStatusMsg", "ShowCopy", 1) && szMsg && *szMsg != '\0') + { + clmi.flags = CMIM_FLAGS | CMIM_NAME | CMIF_TCHAR; + mir_sntprintf(str, SIZEOF(str), TranslateT("Copy %s Message"), (TCHAR*)CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, iStatus, GSMDF_TCHAR)); + clmi.ptszName = str; + } + } + CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hCopyMsgMenuItem, (LPARAM)&clmi); + clmi.flags = CMIM_FLAGS | CMIF_HIDDEN | CMIF_TCHAR; + + if (!iHidden) + { + if (DBGetContactSettingByte(NULL, "SimpleStatusMsg", "ShowGoToURL", 1) && StrFindURL(szMsg) != NULL) + { + clmi.flags = CMIM_FLAGS | CMIM_NAME | CMIF_TCHAR; + mir_sntprintf(str, SIZEOF(str), TranslateT("&Go to URL in %s Message"), (TCHAR*)CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, iStatus, GSMDF_TCHAR)); + clmi.ptszName = str; + } + mir_free(szMsg); + } + CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hGoToURLMenuItem, (LPARAM)&clmi); + + return 0; +} + +int AwayMsgPreShutdown(void) +{ + if (hWindowList) WindowList_BroadcastAsync(hWindowList, WM_CLOSE, 0, 0); + if (hWindowList2) WindowList_BroadcastAsync(hWindowList2, WM_CLOSE, 0, 0); + + return 0; +} + +int LoadAwayMsgModule(void) +{ + CLISTMENUITEM mi = {0}; + + hWindowList = (HANDLE)CallService(MS_UTILS_ALLOCWINDOWLIST, 0, 0); + hWindowList2 = (HANDLE)CallService(MS_UTILS_ALLOCWINDOWLIST, 0, 0); + mi.cbSize = sizeof(mi); + mi.flags = CMIF_TCHAR; + + CreateServiceFunctionEx(MS_AWAYMSG_SHOWAWAYMSG, GetMessageCommand); + mi.position = -2000005000; + mi.ptszName = LPGENT("Re&ad Away Message"); + mi.pszService = MS_AWAYMSG_SHOWAWAYMSG; + hAwayMsgMenuItem = Menu_AddContactMenuItem(&mi); + + mi.flags |= CMIF_ICONFROMICOLIB; + CreateServiceFunctionEx(MS_SIMPLESTATUSMSG_COPYMSG, CopyAwayMsgCommand); + mi.position = -2000006000; + mi.icolibItem = GetIconHandle(IDI_COPY); + mi.ptszName = LPGENT("Copy Away Message"); + mi.pszService = MS_SIMPLESTATUSMSG_COPYMSG; + hCopyMsgMenuItem = Menu_AddContactMenuItem(&mi); + + CreateServiceFunctionEx(MS_SIMPLESTATUSMSG_GOTOURLMSG, GoToURLMsgCommand); + mi.position = -2000007000; + mi.icolibItem = GetIconHandle(IDI_GOTOURL); + mi.ptszName = LPGENT("&Go to URL in Away Message"); + mi.pszService = MS_SIMPLESTATUSMSG_GOTOURLMSG; + hGoToURLMenuItem = Menu_AddContactMenuItem(&mi); + + HookEventEx(ME_CLIST_PREBUILDCONTACTMENU, AwayMsgPreBuildMenu); + + // Deprecated SimpleAway services + CreateServiceFunctionEx(MS_SA_COPYAWAYMSG, CopyAwayMsgCommand); + CreateServiceFunctionEx(MS_SA_GOTOURLMSG, GoToURLMsgCommand); + + return 0; +} diff --git a/plugins/SimpleStatusMsg/src/commonheaders.h b/plugins/SimpleStatusMsg/src/commonheaders.h new file mode 100644 index 0000000000..54bf654ca4 --- /dev/null +++ b/plugins/SimpleStatusMsg/src/commonheaders.h @@ -0,0 +1,65 @@ +/* + +Simple Status Message plugin for Miranda IM +Copyright (C) 2006-2011 Bartosz 'Dezeath' Bia³ek, (C) 2005 Harven + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License along +with this program; if not, write to the Free Software Foundation, Inc., +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +*/ + +// to enable all 0.9.0 core functions +#define MIRANDA_VER 0x0A00 +// to enable custom langpacks +#define MIRANDA_CUSTOM_LP + +#define _WIN32_IE 0x0501 + +#define _CRT_SECURE_NO_WARNINGS + +#include + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "../../protocols/IcqOscarJ/icq_constants.h" +#include "m_fortunemsg.h" +#include "m_statusplugins.h" +#include "m_toptoolbar.h" +#include "m_variables.h" +#include "m_simpleaway.h" +#include "m_simplestatusmsg.h" + +#include "resource.h" diff --git a/plugins/SimpleStatusMsg/src/main.cpp b/plugins/SimpleStatusMsg/src/main.cpp new file mode 100644 index 0000000000..95212f4d59 --- /dev/null +++ b/plugins/SimpleStatusMsg/src/main.cpp @@ -0,0 +1,2176 @@ +/* + +Simple Status Message plugin for Miranda IM +Copyright (C) 2006-2011 Bartosz 'Dezeath' Bia³ek, (C) 2005 Harven + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License along +with this program; if not, write to the Free Software Foundation, Inc., +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +*/ +#include "commonheaders.h" +#include "simplestatusmsg.h" +#include + +HINSTANCE g_hInst; + +int hLangpack; +PROTOACCOUNTS *accounts; + +static int g_iIdleTime = -1; +UINT_PTR g_uUpdateMsgTimer = 0, *g_uSetStatusTimer; +static TCHAR *g_ptszWinampSong; +HANDLE hTTBButton = 0, h_statusmodechange; +HWND hwndSAMsgDialog; +static HANDLE *hProtoStatusMenuItem; + +PLUGININFOEX pluginInfo = { + sizeof(PLUGININFOEX), + "Simple Status Message", + PLUGIN_MAKE_VERSION(1, 9, 0, 4), + "Provides a simple way to set status and away messages", + "Bartosz 'Dezeath' Bia³ek, Harven", + "dezred"/*antispam*/"@"/*antispam*/"gmail"/*antispam*/"."/*antispam*/"com", + "© 2006-2011 Bartosz Bia³ek, © 2005 Harven", + "http://code.google.com/p/dezeath", + UNICODE_AWARE, + // {768CE156-34AC-45a3-B53B-0083C47615C4} + { 0x768ce156, 0x34ac, 0x45a3, { 0xb5, 0x3b, 0x0, 0x83, 0xc4, 0x76, 0x15, 0xc4 } } +}; + +BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) +{ + g_hInst = hinstDLL; + return TRUE; +} + +extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion) +{ + return &pluginInfo; +} + +extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = {MIID_SRAWAY, MIID_LAST}; + +#ifdef _DEBUG +void log2file(const char *fmt, ...) +{ + DWORD dwBytesWritten; + va_list va; + char szText[1024]; + HANDLE hFile = CreateFileA("simplestatusmsg.log", GENERIC_WRITE, FILE_SHARE_READ, 0, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); + SetFilePointer(hFile, 0, 0, FILE_END); + + strncpy(szText, "[\0", SIZEOF(szText)); + WriteFile(hFile, szText, (DWORD)strlen(szText), &dwBytesWritten, NULL); + + GetTimeFormatA(LOCALE_USER_DEFAULT, 0, NULL, NULL, szText, SIZEOF(szText)); + WriteFile(hFile, szText, (DWORD)strlen(szText), &dwBytesWritten, NULL); + + strncpy(szText, "] \0", SIZEOF(szText)); + + va_start(va, fmt); + mir_vsnprintf(szText + strlen(szText), SIZEOF(szText) - strlen(szText), fmt, va); + va_end(va); + + WriteFile(hFile, szText, (DWORD)strlen(szText), &dwBytesWritten, NULL); + + strncpy(szText, "\n\0", SIZEOF(szText)); + WriteFile(hFile, szText, (DWORD)strlen(szText), &dwBytesWritten, NULL); + + CloseHandle(hFile); +} +#endif + +static TCHAR *GetWinampSong(void) +{ + TCHAR *szTitle, *pstr, *res = NULL; + HWND hwndWinamp = FindWindow(_T("STUDIO"), NULL); + int iTitleLen; + + if (hwndWinamp == NULL) + hwndWinamp = FindWindow(_T("Winamp v1.x"), NULL); + + if (hwndWinamp == NULL) + return NULL; + + iTitleLen = GetWindowTextLength(hwndWinamp); + szTitle = (TCHAR *)mir_alloc((iTitleLen + 1) * sizeof(TCHAR)); + if (szTitle == NULL) + return NULL; + + if (GetWindowText(hwndWinamp, szTitle, iTitleLen + 1) == 0) + { + mir_free(szTitle); + return NULL; + } + + pstr = _tcsstr(szTitle, _T(" - Winamp")); + if (pstr == NULL) + { + mir_free(szTitle); + return NULL; + } + + if (pstr < szTitle + (iTitleLen / 2)) + { + MoveMemory(szTitle, pstr + 9, _tcslen(pstr + 9) * sizeof(TCHAR)); + pstr = _tcsstr(pstr + 1, _T(" - Winamp")); + if (pstr == NULL) + { + mir_free(szTitle); + return NULL; + } + } + *pstr = 0; + + pstr = _tcschr(szTitle, _T('.')); + if (pstr == NULL) + { + mir_free(szTitle); + return NULL; + } + + pstr += 2; + res = mir_tstrdup(pstr); + mir_free(szTitle); + + return res; +} + +TCHAR *InsertBuiltinVarsIntoMsg(TCHAR *in, const char *szProto, int status) +{ + int i, count = 0, len; + TCHAR substituteStr[1024], *msg = mir_tstrdup(in); + + for (i = 0; msg[i]; i++) + { + if (msg[i] == 0x0D && DBGetContactSettingByte(NULL, "SimpleStatusMsg", "RemoveCR", 0)) + { + TCHAR *p = msg + i; + if (i + 1 <= 1024 && msg[i + 1]) + { + if (msg[i + 1] == 0x0A) + { + if (i + 2 <= 1024 && msg[i + 2]) + { + count++; + MoveMemory(p, p + 1, (lstrlen(p) - 1) * sizeof(TCHAR)); + } + else + { + msg[i + 1] = 0; + msg[i] = 0x0A; + } + } + } + } + + if (msg[i] != '%') + continue; + + if (!_tcsnicmp(msg+i, _T("%winampsong%"), 12)) + { + TCHAR *ptszWinampTitle = GetWinampSong(); + + if (ptszWinampTitle != NULL) + { + mir_free(g_ptszWinampSong); + g_ptszWinampSong = mir_tstrdup(ptszWinampTitle); + } + else if (g_ptszWinampSong && lstrcmp(g_ptszWinampSong, _T("SimpleStatusMsg")) + && DBGetContactSettingByte(NULL, "SimpleStatusMsg", "AmpLeaveTitle", 1)) + { + ptszWinampTitle = mir_tstrdup(g_ptszWinampSong); + } + else + continue; + + if (lstrlen(ptszWinampTitle) > 12) + msg = (TCHAR *)mir_realloc(msg, (lstrlen(msg) + 1 + lstrlen(ptszWinampTitle) - 12) * sizeof(TCHAR)); + + MoveMemory(msg + i + lstrlen(ptszWinampTitle), msg + i + 12, (lstrlen(msg) - i - 11) * sizeof(TCHAR)); + CopyMemory(msg + i, ptszWinampTitle, lstrlen(ptszWinampTitle) * sizeof(TCHAR)); + + mir_free(ptszWinampTitle); + } + else if (!_tcsnicmp(msg+i, _T("%fortunemsg%"), 12)) + { + TCHAR *FortuneMsg; + + char *FortuneMsgA; + + + if (!ServiceExists(MS_FORTUNEMSG_GETMESSAGE)) + continue; + + + FortuneMsgA = (char*)CallService(MS_FORTUNEMSG_GETMESSAGE, 0, 0); + FortuneMsg = mir_a2u(FortuneMsgA); + + if (lstrlen(FortuneMsg) > 12) + msg = (TCHAR *)mir_realloc(msg, (lstrlen(msg) + 1 + lstrlen(FortuneMsg) - 12) * sizeof(TCHAR)); + + MoveMemory(msg + i + lstrlen(FortuneMsg), msg + i + 12, (lstrlen(msg) - i - 11) * sizeof(TCHAR)); + CopyMemory(msg + i, FortuneMsg, lstrlen(FortuneMsg) * sizeof(TCHAR)); + + + mir_free(FortuneMsg); + CallService(MS_FORTUNEMSG_FREEMEMORY, 0, (LPARAM)FortuneMsgA); + + } + else if (!_tcsnicmp(msg+i, _T("%protofortunemsg%"), 17)) + { + TCHAR *FortuneMsg; + + char *FortuneMsgA; + + + if (!ServiceExists(MS_FORTUNEMSG_GETPROTOMSG)) + continue; + + + FortuneMsgA = (char*)CallService(MS_FORTUNEMSG_GETPROTOMSG, (WPARAM)szProto, 0); + FortuneMsg = mir_a2u(FortuneMsgA); + + + if (lstrlen(FortuneMsg) > 17) + msg = (TCHAR *)mir_realloc(msg, (lstrlen(msg) + 1 + lstrlen(FortuneMsg) - 17) * sizeof(TCHAR)); + + MoveMemory(msg + i + lstrlen(FortuneMsg), msg + i + 17, (lstrlen(msg) - i - 16) * sizeof(TCHAR)); + CopyMemory(msg + i, FortuneMsg, lstrlen(FortuneMsg) * sizeof(TCHAR)); + + + mir_free(FortuneMsg); + CallService(MS_FORTUNEMSG_FREEMEMORY, 0, (LPARAM)FortuneMsgA); + + } + else if (!_tcsnicmp(msg+i, _T("%statusfortunemsg%"), 18)) + { + TCHAR *FortuneMsg; + + char *FortuneMsgA; + + + if (!ServiceExists(MS_FORTUNEMSG_GETSTATUSMSG)) + continue; + + + FortuneMsgA = (char*)CallService(MS_FORTUNEMSG_GETSTATUSMSG, (WPARAM)status, 0); + FortuneMsg = mir_a2u(FortuneMsgA); + + + if (lstrlen(FortuneMsg) > 18) + msg = (TCHAR *)mir_realloc(msg, (lstrlen(msg) + 1 + lstrlen(FortuneMsg) - 18) * sizeof(TCHAR)); + + MoveMemory(msg + i + lstrlen(FortuneMsg), msg + i + 18, (lstrlen(msg) - i - 17) * sizeof(TCHAR)); + CopyMemory(msg + i, FortuneMsg, lstrlen(FortuneMsg) * sizeof(TCHAR)); + + + mir_free(FortuneMsg); + CallService(MS_FORTUNEMSG_FREEMEMORY, 0, (LPARAM)FortuneMsgA); + + } + else if (!_tcsnicmp(msg + i, _T("%time%"), 6)) + { + MIRANDA_IDLE_INFO mii = {0}; + mii.cbSize = sizeof(mii); + CallService(MS_IDLE_GETIDLEINFO, 0, (LPARAM)&mii); + + if (mii.idleType) + { + int mm; + SYSTEMTIME t; + GetLocalTime(&t); + if ((mm = g_iIdleTime) == -1) + { + mm = t.wMinute + t.wHour * 60; + if (mii.idleType == 1) + { + mm -= mii.idleTime; + if (mm < 0) mm += 60 * 24; + } + g_iIdleTime = mm; + } + t.wMinute = mm % 60; + t.wHour = mm / 60; + GetTimeFormat(LOCALE_USER_DEFAULT, TIME_NOSECONDS, &t, NULL, substituteStr, SIZEOF(substituteStr)); + } + else GetTimeFormat(LOCALE_USER_DEFAULT, TIME_NOSECONDS, NULL, NULL, substituteStr, SIZEOF(substituteStr)); + + if (lstrlen(substituteStr) > 6) + msg = (TCHAR *)mir_realloc(msg, (lstrlen(msg) + 1 + lstrlen(substituteStr) - 6) * sizeof(TCHAR)); + + MoveMemory(msg + i + lstrlen(substituteStr), msg + i + 6, (lstrlen(msg) - i - 5) * sizeof(TCHAR)); + CopyMemory(msg + i, substituteStr, lstrlen(substituteStr) * sizeof(TCHAR)); + } + else if (!_tcsnicmp(msg + i, _T("%date%"), 6)) + { + GetDateFormat(LOCALE_USER_DEFAULT, DATE_SHORTDATE, NULL, NULL, substituteStr, SIZEOF(substituteStr)); + + if (lstrlen(substituteStr) > 6) + msg = (TCHAR *)mir_realloc(msg, (lstrlen(msg) + 1 + lstrlen(substituteStr) - 6) * sizeof(TCHAR)); + + MoveMemory(msg + i + lstrlen(substituteStr), msg + i + 6, (lstrlen(msg) - i - 5) * sizeof(TCHAR)); + CopyMemory(msg + i, substituteStr, lstrlen(substituteStr) * sizeof(TCHAR)); + } + else if (!_tcsnicmp(msg+i, _T("%rand("), 6)) + { + TCHAR *temp, *token; + int ran_from, ran_to, k; + + temp = mir_tstrdup(msg + i + 6); + token = _tcstok(temp, _T(",)")); + ran_from = _ttoi(token); + token = _tcstok(NULL, _T(",)%%")); + ran_to = _ttoi(token); + + if (ran_to > ran_from) + { + mir_sntprintf(substituteStr, SIZEOF(substituteStr), _T("%d"), GetRandom(ran_from, ran_to)); + for (k = i + 1; msg[k]; k++) if (msg[k] == '%') { k++; break; } + + if (lstrlen(substituteStr) > k - i) + msg = (TCHAR *)mir_realloc(msg, (lstrlen(msg) + 1 + lstrlen(substituteStr) - (k - i)) * sizeof(TCHAR)); + + MoveMemory(msg + i + lstrlen(substituteStr), msg + i + (k - i), (lstrlen(msg) - i - (k - i - 1)) * sizeof(TCHAR)); + CopyMemory(msg + i, substituteStr, lstrlen(substituteStr) * sizeof(TCHAR)); + } + mir_free(temp); + } + else if (!_tcsnicmp(msg+i, _T("%randmsg%"), 9)) + { + char buff[16]; + int k, maxk, k2 = 0; + DBVARIANT dbv; + BOOL rmark[25]; + + for (k = 0; k < 26; k++) rmark[k] = FALSE; + maxk = DBGetContactSettingByte(NULL, "SimpleStatusMsg", "MaxHist", 10); + if (maxk == 0) rmark[0] = TRUE; + + while (!rmark[0]) + { + k = GetRandom(1, maxk); + if (rmark[k]) continue; + rmark[k] = TRUE; + k2++; + if (k2 == maxk || k2 > maxk) rmark[0] = TRUE; + + mir_snprintf(buff, SIZEOF(buff), "SMsg%d", k); + if (!DBGetContactSettingTString(NULL, "SimpleStatusMsg", buff, &dbv)) + { + if (dbv.ptszVal == NULL) + { + DBFreeVariant(&dbv); + continue; + } + lstrcpy(substituteStr, dbv.ptszVal); + DBFreeVariant(&dbv); + } + else continue; + + if (!lstrlen(substituteStr)) continue; + if (_tcsstr(substituteStr, _T("%randmsg%")) != NULL || _tcsstr(substituteStr, _T("%randdefmsg%")) != NULL) + { + if (k == maxk) maxk--; + } + else rmark[0] = TRUE; + } + + if (k2 == maxk || k2 > maxk) lstrcpy(substituteStr, _T("")); + + if (lstrlen(substituteStr) > 9) + msg = (TCHAR *)mir_realloc(msg, (lstrlen(msg) + 1 + lstrlen(substituteStr) - 9) * sizeof(TCHAR)); + + MoveMemory(msg + i + lstrlen(substituteStr), msg + i + 9, (lstrlen(msg) - i - 8) * sizeof(TCHAR)); + CopyMemory(msg + i, substituteStr, lstrlen(substituteStr) * sizeof(TCHAR)); + } + else if (!_tcsnicmp(msg+i, _T("%randdefmsg%"), 12)) + { + char buff[16]; + int k, maxk, k2 = 0; + DBVARIANT dbv; + BOOL rmark[25]; + + for (k = 0; k < 26; k++) rmark[k] = FALSE; + maxk = DBGetContactSettingWord(NULL, "SimpleStatusMsg", "DefMsgCount", 0); + if (maxk == 0) rmark[0] = TRUE; + + while (!rmark[0]) + { + k = GetRandom(1, maxk); + if (rmark[k]) continue; + rmark[k] = TRUE; + k2++; + if (k2 == maxk || k2 > maxk) rmark[0] = TRUE; + + mir_snprintf(buff, SIZEOF(buff), "DefMsg%d", k); + if (!DBGetContactSettingTString(NULL, "SimpleStatusMsg", buff, &dbv)) + { + if (dbv.ptszVal == NULL) + { + DBFreeVariant(&dbv); + continue; + } + lstrcpy(substituteStr, dbv.ptszVal); + DBFreeVariant(&dbv); + } + else continue; + + if (!lstrlen(substituteStr)) continue; + if (_tcsstr(substituteStr, _T("%randmsg%")) != NULL || _tcsstr(substituteStr, _T("%randdefmsg%")) != NULL) + { + if (k == maxk) maxk--; + } + else rmark[0] = TRUE; + } + + if (k2 == maxk || k2 > maxk) lstrcpy(substituteStr, _T("")); + + if (lstrlen(substituteStr) > 12) + msg = (TCHAR *)mir_realloc(msg, (lstrlen(msg)+1+lstrlen(substituteStr)-12) * sizeof(TCHAR)); + + MoveMemory(msg + i + lstrlen(substituteStr), msg + i + 12, (lstrlen(msg) - i - 11) * sizeof(TCHAR)); + CopyMemory(msg + i, substituteStr, lstrlen(substituteStr) * sizeof(TCHAR)); + } + } + + if (count) msg[lstrlen(msg) - count] = 0; + + if (szProto) + { + char szSetting[80]; + mir_snprintf(szSetting, SIZEOF(szSetting), "Proto%sMaxLen", szProto); + len = DBGetContactSettingWord(NULL, "SimpleStatusMsg", szSetting, 1024); + if (len < lstrlen(msg)) + { + msg = (TCHAR *)mir_realloc(msg, len * sizeof(TCHAR)); + msg[len] = 0; + } + } + + return msg; +} + +TCHAR *InsertVarsIntoMsg(TCHAR *tszMsg, const char *szProto, int iStatus, HANDLE hContact) +{ + if (ServiceExists(MS_VARS_FORMATSTRING) && DBGetContactSettingByte(NULL, "SimpleStatusMsg", "EnableVariables", 1)) + { + FORMATINFO fInfo = {0}; + fInfo.cbSize = sizeof(fInfo); + fInfo.flags = FIF_TCHAR; + fInfo.tszFormat = tszMsg; + fInfo.hContact = hContact; + TCHAR *tszVarsMsg = (TCHAR *)CallService(MS_VARS_FORMATSTRING, (WPARAM)&fInfo, 0); + if (tszVarsMsg != NULL) + { + TCHAR *format = InsertBuiltinVarsIntoMsg(tszVarsMsg, szProto, iStatus); + CallService(MS_VARS_FREEMEMORY, (WPARAM)tszVarsMsg, 0); + return format; + } + } + + return InsertBuiltinVarsIntoMsg(tszMsg, szProto, iStatus); +} + +static TCHAR *GetAwayMessageFormat(int iStatus, const char *szProto) +{ + DBVARIANT dbv, dbv2; + int flags; + char szSetting[80]; + TCHAR *format; + + mir_snprintf(szSetting, SIZEOF(szSetting), "%sFlags", szProto ? szProto : ""); + flags = DBGetContactSettingByte(NULL, "SimpleStatusMsg", (char *)StatusModeToDbSetting(iStatus, szSetting), STATUS_DEFAULT); + + if (flags & STATUS_EMPTY_MSG) + return mir_tstrdup(_T("")); + + if (flags & STATUS_LAST_STATUS_MSG) + { + if (szProto) + mir_snprintf(szSetting, SIZEOF(szSetting), "%sMsg", szProto); + else + mir_snprintf(szSetting, SIZEOF(szSetting), "Msg"); + + if (DBGetContactSettingTString(NULL, "SRAway", StatusModeToDbSetting(iStatus, szSetting), &dbv)) + return NULL; //mir_tstrdup(_T("")); + + format = mir_tstrdup(dbv.ptszVal); + DBFreeVariant(&dbv); + } + else if (flags & STATUS_LAST_MSG) + { + if (szProto) + mir_snprintf(szSetting, SIZEOF(szSetting), "Last%sMsg", szProto); + else + mir_snprintf(szSetting, SIZEOF(szSetting), "LastMsg"); + + if (DBGetContactSetting(NULL, "SimpleStatusMsg", szSetting, &dbv2)) + return NULL; //mir_tstrdup(_T("")); + + if (DBGetContactSettingTString(NULL, "SimpleStatusMsg", dbv2.pszVal, &dbv)) + { + DBFreeVariant(&dbv2); + return NULL; //mir_tstrdup(_T("")); + } + + format = mir_tstrdup(dbv.ptszVal); + DBFreeVariant(&dbv); + DBFreeVariant(&dbv2); + } + else if (flags & STATUS_THIS_MSG) + { + if (szProto) + mir_snprintf(szSetting, SIZEOF(szSetting), "%sDefault", szProto); + else + mir_snprintf(szSetting, SIZEOF(szSetting), "Default"); + + if (DBGetContactSettingTString(NULL, "SRAway", StatusModeToDbSetting(iStatus, szSetting), &dbv)) + return mir_tstrdup(_T("")); + + format = mir_tstrdup(dbv.ptszVal); + DBFreeVariant(&dbv); + } + else + format = mir_tstrdup(GetDefaultMessage(iStatus)); + + return format; +} + +void DBWriteMessage(char *szSetting, TCHAR *tszMsg) +{ + if (tszMsg && lstrlen(tszMsg)) + DBWriteContactSettingTString(NULL, "SimpleStatusMsg", szSetting, tszMsg); + else + DBDeleteContactSetting(NULL, "SimpleStatusMsg", szSetting); +} + +void SaveMessageToDB(const char *szProto, TCHAR *tszMsg, BOOL bIsFormat) +{ + char szSetting[80]; + + if (!szProto) + { + for (int i = 0; i < accounts->count; ++i) + { + if (!IsAccountEnabled(accounts->pa[i])) + continue; + + if (!CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_3, 0)) + continue; + + if (!(CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_MODEMSGSEND)) + continue; + + mir_snprintf(szSetting, SIZEOF(szSetting), bIsFormat ? "FCur%sMsg" : "Cur%sMsg", accounts->pa[i]->szModuleName); + DBWriteMessage(szSetting, tszMsg); +#ifdef _DEBUG + if (bIsFormat) + log2file("SaveMessageToDB(): Set \"" TCHAR_STR_PARAM "\" status message (without inserted vars) for %s.", tszMsg, accounts->pa[i]->szModuleName); + else + log2file("SaveMessageToDB(): Set \"" TCHAR_STR_PARAM "\" status message for %s.", tszMsg, accounts->pa[i]->szModuleName); +#endif + } + } + else + { + if (!(CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_MODEMSGSEND)) + return; + + mir_snprintf(szSetting, SIZEOF(szSetting), bIsFormat ? "FCur%sMsg" : "Cur%sMsg", szProto); + DBWriteMessage(szSetting, tszMsg); +#ifdef _DEBUG + if (bIsFormat) + log2file("SaveMessageToDB(): Set \"" TCHAR_STR_PARAM "\" status message (without inserted vars) for %s.", tszMsg, szProto); + else + log2file("SaveMessageToDB(): Set \"" TCHAR_STR_PARAM "\" status message for %s.", tszMsg, szProto); +#endif + } +} + +void SaveStatusAsCurrent(const char *szProto, int iStatus) +{ + char szSetting[80]; + mir_snprintf(szSetting, SIZEOF(szSetting), "Cur%sStatus", szProto); + DBWriteContactSettingWord(NULL, "SimpleStatusMsg", szSetting, (WORD)iStatus); +} + +static TCHAR *GetAwayMessage(int iStatus, const char *szProto, BOOL bInsertVars, HANDLE hContact) +{ + TCHAR *format = NULL; + char szSetting[80]; + + if ((!iStatus || iStatus == ID_STATUS_CURRENT) && szProto) + { + DBVARIANT dbv; + mir_snprintf(szSetting, SIZEOF(szSetting), "FCur%sMsg", szProto); + if (!DBGetContactSettingTString(NULL, "SimpleStatusMsg", szSetting, &dbv)) + { + format = mir_tstrdup(dbv.ptszVal); + DBFreeVariant(&dbv); + } + //else + // format = mir_tstrdup(_T("")); + } + else + { + int flags; + + if (!iStatus || iStatus == ID_STATUS_CURRENT) + iStatus = GetCurrentStatus(szProto); + + if (szProto && !(CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_3, 0) & Proto_Status2Flag(iStatus))) + return NULL; + + mir_snprintf(szSetting, SIZEOF(szSetting), "Proto%sFlags", szProto ? szProto : ""); + flags = DBGetContactSettingByte(NULL, "SimpleStatusMsg", szSetting, PROTO_DEFAULT); + + //if (flags & PROTO_NO_MSG) + //{ + // format = mir_tstrdup(_T("")); + //} + //else + if (flags & PROTO_THIS_MSG) + { + DBVARIANT dbv; + mir_snprintf(szSetting, SIZEOF(szSetting), "Proto%sDefault", szProto); + if (!DBGetContactSettingTString(NULL, "SimpleStatusMsg", szSetting, &dbv)) + { + format = mir_tstrdup(dbv.ptszVal); + DBFreeVariant(&dbv); + } + else + format = mir_tstrdup(_T("")); + } + else if (flags & PROTO_NOCHANGE && szProto) + { + DBVARIANT dbv; + mir_snprintf(szSetting, SIZEOF(szSetting), "FCur%sMsg", szProto); + if (!DBGetContactSettingTString(NULL, "SimpleStatusMsg", szSetting, &dbv)) + { + format = mir_tstrdup(dbv.ptszVal); + DBFreeVariant(&dbv); + } + //else + // format = mir_tstrdup(_T("")); + } + else if (flags & PROTO_POPUPDLG) + format = GetAwayMessageFormat(iStatus, szProto); + } +#ifdef _DEBUG + log2file("GetAwayMessage(): %s has %s status and \"" TCHAR_STR_PARAM "\" status message.", szProto, StatusModeToDbSetting(iStatus, ""), format); +#endif + + if (bInsertVars && format != NULL) + { + TCHAR *tszVarsMsg = InsertVarsIntoMsg(format, szProto, iStatus, hContact); // TODO random values not the same! + mir_free(format); + return tszVarsMsg; + } + + return format; +} + +int CheckProtoSettings(const char *szProto, int iInitialStatus) +{ + int iSetting = DBGetContactSettingWord(NULL, szProto, "LeaveStatus", -1); //GG settings + if (iSetting != -1) + return iSetting ? iSetting : iInitialStatus; + iSetting = DBGetContactSettingWord(NULL, szProto, "OfflineMessageOption", -1); //TLEN settings + if (iSetting != -1) + { + switch (iSetting) + { + case 1: return ID_STATUS_ONLINE; + case 2: return ID_STATUS_AWAY; + case 3: return ID_STATUS_NA; + case 4: return ID_STATUS_DND; + case 5: return ID_STATUS_FREECHAT; + case 6: return ID_STATUS_INVISIBLE; + default: return iInitialStatus; + } + } + return iInitialStatus; +} + +static void Proto_SetAwayMsgT(const char *szProto, int iStatus, TCHAR *tszMsg) +{ + if (!(CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_INDIVMODEMSG)) + { + + if (CallProtoService(szProto, PS_SETAWAYMSGW, (WPARAM)iStatus, (LPARAM)tszMsg) == CALLSERVICE_NOTFOUND) + { + char *szMsg = mir_u2a(tszMsg); + CallProtoService(szProto, PS_SETAWAYMSG, (WPARAM)iStatus, (LPARAM)szMsg); + mir_free(szMsg); + } + + } +} + +static void Proto_SetStatus(const char *szProto, int iInitialStatus, int iStatus, TCHAR *tszMsg) +{ + if (iStatus == ID_STATUS_OFFLINE && iStatus != iInitialStatus) + { + // ugly hack to set offline status message + if (!(CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_INDIVMODEMSG)) + { + int iMsgStatus = CheckProtoSettings(szProto, iInitialStatus); + + if (CallProtoService(szProto, PS_SETAWAYMSGW, (WPARAM)iMsgStatus, (LPARAM)tszMsg) == CALLSERVICE_NOTFOUND) + { + char *szMsg = mir_u2a(tszMsg); + CallProtoService(szProto, PS_SETAWAYMSG, (WPARAM)iMsgStatus, (LPARAM)szMsg); + mir_free(szMsg); + } + + CallProtoService(szProto, PS_SETSTATUS, (WPARAM)iMsgStatus, 0); + } + if (ServiceExists(MS_KS_ANNOUNCESTATUSCHANGE)) + announce_status_change((char*)szProto, ID_STATUS_OFFLINE, NULL); + CallProtoService(szProto, PS_SETSTATUS, ID_STATUS_OFFLINE, 0); + return; + } + + Proto_SetAwayMsgT(szProto, iStatus, tszMsg /* ? tszMsg : _T("")*/); + if (iStatus != iInitialStatus) + CallProtoService(szProto, PS_SETSTATUS, iStatus, 0); +} + +int HasProtoStaticStatusMsg(const char *szProto, int iInitialStatus, int iStatus) +{ + char szSetting[80]; + int flags; + + mir_snprintf(szSetting, SIZEOF(szSetting), "Proto%sFlags", szProto); + flags = DBGetContactSettingByte(NULL, "SimpleStatusMsg", szSetting, PROTO_DEFAULT); + + if (flags & PROTO_NO_MSG) + { + Proto_SetStatus(szProto, iInitialStatus, iStatus, NULL); + SaveMessageToDB(szProto, NULL, TRUE); + SaveMessageToDB(szProto, NULL, FALSE); + return 1; + } + else if (flags & PROTO_THIS_MSG) + { + DBVARIANT dbv; + TCHAR *msg; + + mir_snprintf(szSetting, SIZEOF(szSetting), "Proto%sDefault", szProto); + if (!DBGetContactSettingTString(NULL, "SimpleStatusMsg", szSetting, &dbv)) + { + SaveMessageToDB(szProto, dbv.ptszVal, TRUE); + msg = InsertVarsIntoMsg(dbv.ptszVal, szProto, iStatus, NULL); + DBFreeVariant(&dbv); + Proto_SetStatus(szProto, iInitialStatus, iStatus, msg); + SaveMessageToDB(szProto, msg, FALSE); + mir_free(msg); + } + else + { + Proto_SetStatus(szProto, iInitialStatus, iStatus, _T("")); + SaveMessageToDB(szProto, _T(""), TRUE); + SaveMessageToDB(szProto, _T(""), FALSE); + } + return 1; + } + return 0; +} + +INT_PTR SetStatusModeFromExtern(WPARAM wParam, LPARAM lParam) +{ + if ((wParam < ID_STATUS_OFFLINE && wParam != 0) || (wParam > ID_STATUS_OUTTOLUNCH && wParam != ID_STATUS_CURRENT)) + return 0; + + int newStatus = (int)wParam; + + for (int i = 0; i < accounts->count; ++i) + { + if (!IsAccountEnabled(accounts->pa[i])) + continue; + + if (!(CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_2, 0) &~ CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_5, 0))) + continue; + + if (DBGetContactSettingByte(NULL, accounts->pa[i]->szModuleName, "LockMainStatus", 0)) + continue; + + if (wParam == ID_STATUS_CURRENT || wParam == 0) + newStatus = GetCurrentStatus(accounts->pa[i]->szModuleName); + + if (!(CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_MODEMSGSEND)) + { + CallProtoService(accounts->pa[i]->szModuleName, PS_SETSTATUS, newStatus, 0); + continue; + } + + int status_modes_msg = CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_3, 0); + + if ((Proto_Status2Flag(newStatus) & status_modes_msg) || (newStatus == ID_STATUS_OFFLINE && (Proto_Status2Flag(ID_STATUS_INVISIBLE) & status_modes_msg))) + { + TCHAR *msg = NULL; + + if (HasProtoStaticStatusMsg(accounts->pa[i]->szModuleName, GetCurrentStatus(accounts->pa[i]->szModuleName), newStatus)) + continue; + + if (lParam) + msg = InsertVarsIntoMsg((TCHAR *)lParam, accounts->pa[i]->szModuleName, newStatus, NULL); + + SaveMessageToDB(accounts->pa[i]->szModuleName, (TCHAR *)lParam, TRUE); + SaveMessageToDB(accounts->pa[i]->szModuleName, msg, FALSE); + Proto_SetStatus(accounts->pa[i]->szModuleName, GetCurrentStatus(accounts->pa[i]->szModuleName), newStatus, msg /*? msg : _T("")*/); + mir_free(msg); + } + else + CallProtoService(accounts->pa[i]->szModuleName, PS_SETSTATUS, newStatus, 0); + } + + return 0; +} + +int ChangeStatusMessage(WPARAM wParam, LPARAM lParam); + +void SetStatusMessage(const char *szProto, int iInitialStatus, int iStatus, TCHAR *message, BOOL bOnStartup) +{ + TCHAR *msg = NULL; +#ifdef _DEBUG + log2file("SetStatusMessage(\"%s\", %d, %d, \"" TCHAR_STR_PARAM "\", %d)", szProto, iInitialStatus, iStatus, message, bOnStartup); +#endif + if (szProto) + { + if (bOnStartup && accounts->statusCount > 1) // TODO not only at startup? + { + int status; + for (int i = 0; i < accounts->count; ++i) + { + if (!IsAccountEnabled(accounts->pa[i])) + continue; + + if (!(CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_2, 0)&~CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_5, 0))) + continue; + + status = iStatus == ID_STATUS_CURRENT ? GetStartupStatus(accounts->pa[i]->szModuleName) : iStatus; + + if (!CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_3, 0) || + !(CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_MODEMSGSEND)) + { + if (!(bOnStartup && status == ID_STATUS_OFFLINE) && GetCurrentStatus(accounts->pa[i]->szModuleName) != status) + CallProtoService(accounts->pa[i]->szModuleName, PS_SETSTATUS, (WPARAM)status, 0); + } + } + } + + if (message) + msg = InsertVarsIntoMsg(message, szProto, iStatus, NULL); + + SaveMessageToDB(szProto, message, TRUE); + SaveMessageToDB(szProto, msg, FALSE); + + if (iInitialStatus == ID_STATUS_CURRENT) + iInitialStatus = bOnStartup ? ID_STATUS_OFFLINE : GetCurrentStatus(szProto); + + Proto_SetStatus(szProto, iInitialStatus, iStatus, msg); + mir_free(msg); + } + else + { + int iProfileStatus = iStatus > ID_STATUS_CURRENT ? iStatus : 0; + BOOL bIsStatusCurrent = iStatus == ID_STATUS_CURRENT; + BOOL bIsInitialStatusCurrent = iInitialStatus == ID_STATUS_CURRENT; + + for (int i = 0; i < accounts->count; ++i) + { + if (!IsAccountEnabled(accounts->pa[i])) + continue; + + if (!(CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_2, 0)&~CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_5, 0))) + continue; + + if (!bOnStartup && DBGetContactSettingByte(NULL, accounts->pa[i]->szModuleName, "LockMainStatus", 0)) + continue; + + if (iProfileStatus) + { + int iProfileNumber = iStatus - 40083; + char szSetting[128]; + mir_snprintf(szSetting, SIZEOF(szSetting), "%d_%s", iProfileNumber, accounts->pa[i]->szModuleName); + iStatus = DBGetContactSettingWord(NULL, "StartupStatus", szSetting, ID_STATUS_OFFLINE); + if (iStatus == ID_STATUS_IDLE) // the same as ID_STATUS_LAST in StartupStatus + { + mir_snprintf(szSetting, SIZEOF(szSetting), "last_%s", accounts->pa[i]->szModuleName); + iStatus = DBGetContactSettingWord(NULL, "StartupStatus", szSetting, ID_STATUS_OFFLINE); + } + else if (iStatus == ID_STATUS_CURRENT) + iStatus = GetCurrentStatus(accounts->pa[i]->szModuleName); + } + + if (bIsStatusCurrent) + iStatus = bOnStartup ? GetStartupStatus(accounts->pa[i]->szModuleName) : GetCurrentStatus(accounts->pa[i]->szModuleName); + + if (bIsInitialStatusCurrent) + iInitialStatus = bOnStartup ? ID_STATUS_OFFLINE : GetCurrentStatus(accounts->pa[i]->szModuleName); + + if (!(CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_3, 0) & Proto_Status2Flag(iStatus)) || + !(CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_MODEMSGSEND)) + { + if (!(bOnStartup && iStatus == ID_STATUS_OFFLINE) && GetCurrentStatus(accounts->pa[i]->szModuleName) != iStatus && iStatus != iInitialStatus) + { + CallProtoService(accounts->pa[i]->szModuleName, PS_SETSTATUS, (WPARAM)iStatus, 0); +#ifdef _DEBUG + log2file("SetStatusMessage(): Set %s status for %s.", StatusModeToDbSetting(iStatus, ""), accounts->pa[i]->szModuleName); +#endif + } + continue; + } + + if (HasProtoStaticStatusMsg(accounts->pa[i]->szModuleName, iInitialStatus, iStatus)) + continue; + + if (message) + msg = InsertVarsIntoMsg(message, accounts->pa[i]->szModuleName, iStatus, NULL); + + SaveMessageToDB(accounts->pa[i]->szModuleName, message, TRUE); + SaveMessageToDB(accounts->pa[i]->szModuleName, msg, FALSE); + + Proto_SetStatus(accounts->pa[i]->szModuleName, iInitialStatus, iStatus, msg); + mir_free(msg); + } + + if (GetCurrentStatus(NULL) != iStatus && !bIsStatusCurrent && !iProfileStatus) + { + // not so nice... + UnhookEvent(h_statusmodechange); + CallService(MS_CLIST_SETSTATUSMODE, (WPARAM)iStatus, 0); + h_statusmodechange = HookEvent(ME_CLIST_STATUSMODECHANGE, ChangeStatusMessage); + } + } +} + +INT_PTR ShowStatusMessageDialogInternal(WPARAM wParam, LPARAM lParam) +{ + struct MsgBoxInitData *box_data; + BOOL idvstatusmsg = FALSE; + + if (Miranda_Terminated()) return 0; + + if (hTTBButton) + { + CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)hTTBButton, (LPARAM)TTBST_RELEASED); + CallService(MS_TTB_SETBUTTONOPTIONS, MAKEWPARAM((WORD)TTBO_TIPNAME, (WORD)hTTBButton), (LPARAM)Translate("Change Status Message")); + } + + box_data = (struct MsgBoxInitData *)mir_alloc(sizeof(struct MsgBoxInitData)); + + if (accounts->statusMsgCount == 1) + { + for (int i = 0; i < accounts->count; ++i) + { + if (!IsAccountEnabled(accounts->pa[i])) + continue; + + if (!CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_3, 0)) + continue; + + if (!(CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_MODEMSGSEND)) + continue; + + box_data->m_szProto = accounts->pa[i]->szModuleName; + box_data->m_iStatusModes = CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_2, 0)&~CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_5, 0); + box_data->m_iStatusMsgModes = CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_3, 0); + break; + } + } + else + { + for (int i = 0; i < accounts->count; ++i) + { + if (!IsAccountEnabled(accounts->pa[i])) + continue; + + if (!CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_3, 0)) + continue; + + if (!(CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_MODEMSGSEND)) + continue; + + if (!accounts->pa[i]->bIsVisible) + continue; + + if (hProtoStatusMenuItem[i] == (HANDLE)lParam) + { + box_data->m_szProto = accounts->pa[i]->szModuleName; + box_data->m_iStatusModes = CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_2, 0)&~CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_5, 0); + box_data->m_iStatusMsgModes = CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_3, 0); + + idvstatusmsg = TRUE; + break; + } + } + if (!idvstatusmsg) + { + box_data->m_szProto = NULL; + box_data->m_iStatusModes = accounts->statusFlags; + box_data->m_iStatusMsgModes = accounts->statusMsgFlags; + } + } + box_data->m_iStatus = ID_STATUS_CURRENT; + box_data->m_bOnEvent = FALSE; + box_data->m_bOnStartup = FALSE; + + if (hwndSAMsgDialog) + DestroyWindow(hwndSAMsgDialog); + hwndSAMsgDialog = CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_AWAYMSGBOX), NULL, AwayMsgBoxDlgProc, (LPARAM)box_data); + return 0; +} + +INT_PTR ShowStatusMessageDialog(WPARAM wParam, LPARAM lParam) +{ + struct MsgBoxInitData *box_data; + BOOL idvstatusmsg = FALSE; + + if (Miranda_Terminated()) return 0; + + box_data = (struct MsgBoxInitData *)mir_alloc(sizeof(struct MsgBoxInitData)); + + for (int i = 0; i < accounts->count; ++i) + { + if (!IsAccountEnabled(accounts->pa[i])) + continue; + + if (!CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_3, 0)) + continue; + + if (!(CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_MODEMSGSEND)) + continue; + + if (!accounts->pa[i]->bIsVisible) + continue; + + if (!strcmp(accounts->pa[i]->szModuleName, (char *)lParam)) + { + box_data->m_szProto = accounts->pa[i]->szModuleName; + box_data->m_iStatusModes = CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_2, 0)&~CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_5, 0); + box_data->m_iStatusMsgModes = CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_3, 0); + + idvstatusmsg = TRUE; + break; + } + } + if (!idvstatusmsg) + { + box_data->m_szProto = NULL; + box_data->m_iStatusModes = accounts->statusFlags; + box_data->m_iStatusMsgModes = accounts->statusMsgFlags; + } + box_data->m_iStatus = ID_STATUS_CURRENT; + box_data->m_bOnEvent = FALSE; + box_data->m_bOnStartup = FALSE; + + if (hwndSAMsgDialog) + DestroyWindow(hwndSAMsgDialog); + hwndSAMsgDialog = CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_AWAYMSGBOX), NULL, AwayMsgBoxDlgProc, (LPARAM)box_data); + + return 0; +} + +static int ChangeStatusMessage(WPARAM wParam, LPARAM lParam) +{ + int iStatus = (int)wParam; + char *szProto = (char*)lParam; + int iDlgFlags; + BOOL bShowDlg, bOnStartup = FALSE, bGlobalStartupStatus = TRUE, bScreenSaverRunning = FALSE; + char szSetting[80]; + + if (Miranda_Terminated()) return 0; + + // TODO this could be done better + if (szProto && !strcmp(szProto, "SimpleStatusMsgGlobalStartupStatus")) + { + szProto = NULL; + bOnStartup = TRUE; + } + + if (accounts->statusMsgCount == 1 && !szProto) + { + for (int i = 0; i < accounts->count; ++i) + { + if (!IsAccountEnabled(accounts->pa[i])) + continue; + + if (!CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_3, 0)) + continue; + + if (!(CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_MODEMSGSEND)) + continue; + + szProto = accounts->pa[i]->szModuleName; + if (bOnStartup && iStatus == ID_STATUS_CURRENT) + { + iStatus = GetStartupStatus(accounts->pa[i]->szModuleName); + bGlobalStartupStatus = FALSE; + } + break; + } + } + + mir_snprintf(szSetting, SIZEOF(szSetting), "%sFlags", szProto ? szProto : ""); + iDlgFlags = DBGetContactSettingByte(NULL, "SimpleStatusMsg", (char *)StatusModeToDbSetting(iStatus, szSetting), STATUS_DEFAULT); + bShowDlg = iDlgFlags & STATUS_SHOW_DLG || bOnStartup; + SystemParametersInfo(SPI_GETSCREENSAVERRUNNING, 0, &bScreenSaverRunning, 0); + + if (szProto) + { + struct MsgBoxInitData *box_data; + int status_modes = 0, status_modes_msg = 0, iProtoFlags; + + status_modes = CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_2, 0)&~CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_5, 0); + if (!(Proto_Status2Flag(iStatus) & status_modes) && iStatus != ID_STATUS_OFFLINE) + return 0; + + status_modes_msg = CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_3, 0); + if (!(Proto_Status2Flag(iStatus) & status_modes_msg) || !(CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_MODEMSGSEND)) + { + if (bOnStartup && GetCurrentStatus(szProto) != iStatus) + { + CallProtoService(szProto, PS_SETSTATUS, iStatus, 0); +#ifdef _DEBUG + log2file("ChangeStatusMessage(): Set %s status for %s.", StatusModeToDbSetting(iStatus, ""), szProto); +#endif + } + return 0; + } + + mir_snprintf(szSetting, SIZEOF(szSetting), "Proto%sFlags", szProto); + iProtoFlags = DBGetContactSettingByte(NULL, "SimpleStatusMsg", szSetting, PROTO_DEFAULT); + if (iProtoFlags & PROTO_NO_MSG || iProtoFlags & PROTO_THIS_MSG) + { + if (HasProtoStaticStatusMsg(szProto, iStatus, iStatus)) + return 1; + } + else if (iProtoFlags & PROTO_NOCHANGE && !bOnStartup) + { + DBVARIANT dbv; + TCHAR *msg = NULL; + + mir_snprintf(szSetting, SIZEOF(szSetting), "FCur%sMsg", szProto); + if (!DBGetContactSettingTString(NULL, "SimpleStatusMsg", szSetting, &dbv)) + { + msg = mir_tstrdup(dbv.ptszVal); + DBFreeVariant(&dbv); + } + //else + // msg = mir_tstrdup(_T("")); +#ifdef _DEBUG + log2file("ChangeStatusMessage(): Set %s status and \"" TCHAR_STR_PARAM "\" status message for %s.", StatusModeToDbSetting(iStatus, ""), msg, szProto); +#endif + SetStatusMessage(szProto, iStatus, iStatus, msg, FALSE); + if (msg) mir_free(msg); + return 1; + } + + if (!bShowDlg || bScreenSaverRunning) + { + TCHAR *msg = GetAwayMessageFormat(iStatus, szProto); +#ifdef _DEBUG + log2file("ChangeStatusMessage(): Set %s status and \"" TCHAR_STR_PARAM "\" status message for %s.", StatusModeToDbSetting(iStatus, ""), msg, szProto); +#endif + SetStatusMessage(szProto, iStatus, iStatus, msg, FALSE); + if (msg) mir_free(msg); + return 1; + } + + box_data = (struct MsgBoxInitData *) mir_alloc(sizeof(struct MsgBoxInitData)); + box_data->m_szProto = szProto; + + if (!bOnStartup) + SaveStatusAsCurrent(szProto, iStatus); + + if (GetCurrentStatus(szProto) == iStatus || (bOnStartup && !bGlobalStartupStatus)) + box_data->m_iStatus = ID_STATUS_CURRENT; + else + box_data->m_iStatus = iStatus; + + box_data->m_iStatusModes = status_modes; + box_data->m_iStatusMsgModes = status_modes_msg; + box_data->m_bOnEvent = TRUE; + box_data->m_bOnStartup = bOnStartup; + + if (hwndSAMsgDialog) + DestroyWindow(hwndSAMsgDialog); + hwndSAMsgDialog = CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_AWAYMSGBOX), NULL, AwayMsgBoxDlgProc, (LPARAM)box_data); + } + else + { + struct MsgBoxInitData *box_data; + int iProtoFlags; + + // iStatus == ID_STATUS_CURRENT only when bOnStartup == TRUE + if (iStatus == ID_STATUS_OFFLINE || (!(accounts->statusMsgFlags & Proto_Status2Flag(iStatus)) && iStatus != ID_STATUS_CURRENT)) + return 0; + + iProtoFlags = DBGetContactSettingByte(NULL, "SimpleStatusMsg", "ProtoFlags", PROTO_DEFAULT); + if (!bShowDlg || bScreenSaverRunning || (iProtoFlags & PROTO_NOCHANGE && !bOnStartup)) + { + TCHAR *msg = NULL; + for (int i = 0; i < accounts->count; ++i) + { + if (!IsAccountEnabled(accounts->pa[i])) + continue; + + if (!(CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_2, 0)&~CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_5, 0))) + continue; + + if (DBGetContactSettingByte(NULL, accounts->pa[i]->szModuleName, "LockMainStatus", 0)) + continue; + + if (!(CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_3, 0) & Proto_Status2Flag(iStatus)) || + !(CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_MODEMSGSEND)) + continue; + + if (iProtoFlags & PROTO_NOCHANGE) + { + DBVARIANT dbv; + mir_snprintf(szSetting, SIZEOF(szSetting), "FCur%sMsg", accounts->pa[i]->szModuleName); + if (!DBGetContactSettingTString(NULL, "SimpleStatusMsg", szSetting, &dbv)) + { + msg = mir_tstrdup(dbv.ptszVal); + DBFreeVariant(&dbv); + } + //else + // msg = mir_tstrdup(_T("")); + } + else + msg = GetAwayMessageFormat(iStatus, NULL); +#ifdef _DEBUG + log2file("ChangeStatusMessage(): Set %s status and \"" TCHAR_STR_PARAM "\" status message for %s.", StatusModeToDbSetting(iStatus, ""), msg, accounts->pa[i]->szModuleName); +#endif + SetStatusMessage(accounts->pa[i]->szModuleName, iStatus, iStatus, msg, FALSE); + if (msg) { mir_free(msg); msg = NULL; } + } + return 1; + } + + box_data = (struct MsgBoxInitData *)mir_alloc(sizeof(struct MsgBoxInitData)); + box_data->m_szProto = NULL; + box_data->m_iStatus = iStatus; + box_data->m_iStatusModes = accounts->statusFlags; + box_data->m_iStatusMsgModes = accounts->statusMsgFlags; + box_data->m_bOnEvent = TRUE; + box_data->m_bOnStartup = bOnStartup; + + if (hwndSAMsgDialog) + DestroyWindow(hwndSAMsgDialog); + hwndSAMsgDialog = CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_AWAYMSGBOX), NULL, AwayMsgBoxDlgProc, (LPARAM)box_data); + } + return 0; +} + +static INT_PTR ChangeStatusMsg(WPARAM wParam, LPARAM lParam) +{ + ChangeStatusMessage(wParam, lParam); + return 0; +} + +static INT_PTR SetOfflineStatus(WPARAM wParam, LPARAM lParam) +{ + ChangeStatusMessage((WPARAM)ID_STATUS_OFFLINE, (LPARAM)NULL); + return 0; +} + +static INT_PTR SetOnlineStatus(WPARAM wParam, LPARAM lParam) +{ + ChangeStatusMessage((WPARAM)ID_STATUS_ONLINE, (LPARAM)NULL); + return 0; +} + +static INT_PTR SetAwayStatus(WPARAM wParam, LPARAM lParam) +{ + ChangeStatusMessage((WPARAM)ID_STATUS_AWAY, (LPARAM)NULL); + return 0; +} + +static INT_PTR SetDNDStatus(WPARAM wParam, LPARAM lParam) +{ + ChangeStatusMessage((WPARAM)ID_STATUS_DND, (LPARAM)NULL); + return 0; +} + +static INT_PTR SetNAStatus(WPARAM wParam, LPARAM lParam) +{ + ChangeStatusMessage((WPARAM)ID_STATUS_NA, (LPARAM)NULL); + return 0; +} + +static INT_PTR SetOccupiedStatus(WPARAM wParam, LPARAM lParam) +{ + ChangeStatusMessage((WPARAM)ID_STATUS_OCCUPIED, (LPARAM)NULL); + return 0; +} + +static INT_PTR SetFreeChatStatus(WPARAM wParam, LPARAM lParam) +{ + ChangeStatusMessage((WPARAM)ID_STATUS_FREECHAT, (LPARAM)NULL); + return 0; +} + +static INT_PTR SetInvisibleStatus(WPARAM wParam, LPARAM lParam) +{ + ChangeStatusMessage((WPARAM)ID_STATUS_INVISIBLE, (LPARAM)NULL); + return 0; +} + +static INT_PTR SetOnThePhoneStatus(WPARAM wParam, LPARAM lParam) +{ + ChangeStatusMessage((WPARAM)ID_STATUS_ONTHEPHONE, (LPARAM)NULL); + return 0; +} + +static INT_PTR SetOutToLunchStatus(WPARAM wParam, LPARAM lParam) +{ + ChangeStatusMessage((WPARAM)ID_STATUS_OUTTOLUNCH, (LPARAM)NULL); + return 0; +} + +static int ProcessProtoAck(WPARAM wParam,LPARAM lParam) +{ + ACKDATA *ack = (ACKDATA *)lParam; + + if (!ack || !ack->szModule) + return 0; + + if (ack->type == ACKTYPE_AWAYMSG && ack->result == ACKRESULT_SENTREQUEST && !ack->lParam) + { + TCHAR *tszMsg = GetAwayMessage(CallProtoService((char *)ack->szModule, PS_GETSTATUS, 0, 0), (char *)ack->szModule, TRUE, NULL); + + { + char *szMsg = mir_u2a(tszMsg); + CallContactService(ack->hContact, PSS_AWAYMSG, (WPARAM)(HANDLE)ack->hProcess, (LPARAM)szMsg); + if (szMsg) mir_free(szMsg); + } + +#ifdef _DEBUG + log2file("ProcessProtoAck(): Send away message \"" TCHAR_STR_PARAM "\" reply.", tszMsg); +#endif + if (tszMsg) mir_free(tszMsg); + return 0; + } + + if (ack->type != ACKTYPE_STATUS || ack->result != ACKRESULT_SUCCESS || ack->hContact != NULL) + return 0; + + if (ack->lParam >= ID_STATUS_CONNECTING && ack->lParam < ID_STATUS_CONNECTING + MAX_CONNECT_RETRIES) + ack->lParam = ID_STATUS_OFFLINE; + + SaveStatusAsCurrent(ack->szModule, (int)ack->lParam); +#ifdef _DEBUG + log2file("ProcessProtoAck(): Set %s (%d) status for %s.", StatusModeToDbSetting((int)ack->lParam, ""), (int)ack->lParam, (char *)ack->szModule); +#endif + + return 0; +} + +int SetStartupStatus(int i) +{ + int flags; + char szSetting[80]; + TCHAR *fmsg = NULL, *msg = NULL; + int iStatus = GetStartupStatus(accounts->pa[i]->szModuleName); + + if (iStatus == ID_STATUS_OFFLINE) + return -1; + + if (!CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_3, 0) || + !(CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_MODEMSGSEND)) + { + CallProtoService(accounts->pa[i]->szModuleName, PS_SETSTATUS, (WPARAM)iStatus, 0); + return -1; + } + + mir_snprintf(szSetting, SIZEOF(szSetting), "Proto%sFlags", accounts->pa[i]->szModuleName); + flags = DBGetContactSettingByte(NULL, "SimpleStatusMsg", szSetting, PROTO_DEFAULT); + if (flags & PROTO_NO_MSG || flags & PROTO_THIS_MSG) + { + if (HasProtoStaticStatusMsg(accounts->pa[i]->szModuleName, ID_STATUS_OFFLINE, iStatus)) + return 0; + } + else if (flags & PROTO_NOCHANGE) + { + DBVARIANT dbv; + mir_snprintf(szSetting, SIZEOF(szSetting), "FCur%sMsg", accounts->pa[i]->szModuleName); + if (!DBGetContactSettingTString(NULL, "SimpleStatusMsg", szSetting, &dbv)) + { + fmsg = mir_tstrdup(dbv.ptszVal); + DBFreeVariant(&dbv); + } + //else + // fmsg = mir_tstrdup(_T("")); + } + else + fmsg = GetAwayMessageFormat(iStatus, accounts->pa[i]->szModuleName); + +#ifdef _DEBUG + log2file("SetStartupStatus(): Set %s status and \"" TCHAR_STR_PARAM "\" status message for %s.", StatusModeToDbSetting(iStatus, ""), fmsg, accounts->pa[i]->szModuleName); +#endif + + if (fmsg) + msg = InsertVarsIntoMsg(fmsg, accounts->pa[i]->szModuleName, iStatus, NULL); + + SaveMessageToDB(accounts->pa[i]->szModuleName, fmsg, TRUE); + SaveMessageToDB(accounts->pa[i]->szModuleName, msg, FALSE); + + if (fmsg) + mir_free(fmsg); + + Proto_SetStatus(accounts->pa[i]->szModuleName, ID_STATUS_OFFLINE, iStatus, msg /*? msg : _T("")*/); + mir_free(msg); + + return 0; +} + +VOID CALLBACK SetStartupStatusGlobal(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime) +{ + int prev_status_mode = -1, status_mode, temp_status_mode = ID_STATUS_OFFLINE, i; + BOOL globalstatus = TRUE; + + KillTimer(hwnd, idEvent); + + // is global status mode going to be set? + for (i = 0; i < accounts->count; ++i) + { + if (!IsAccountEnabled(accounts->pa[i])) + continue; + + if (!(CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_2, 0)&~CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_5, 0))) + continue; + + status_mode = GetStartupStatus(accounts->pa[i]->szModuleName); + + if (status_mode != ID_STATUS_OFFLINE) + temp_status_mode = status_mode; + + if (status_mode != prev_status_mode && prev_status_mode != -1) + { + globalstatus = FALSE; + break; + } + + prev_status_mode = status_mode; + } + + // popup status msg dialog at startup? + if (DBGetContactSettingByte(NULL, "SimpleStatusMsg", "StartupPopupDlg", 1) && accounts->statusMsgFlags) + { + if (globalstatus) + { + ChangeStatusMessage((WPARAM)status_mode, (LPARAM)"SimpleStatusMsgGlobalStartupStatus"); + } + else + { + // pseudo-currentDesiredStatusMode ;-) + DBWriteContactSettingWord(NULL, "SimpleStatusMsg", "StartupStatus", (WORD)temp_status_mode); + ChangeStatusMessage((WPARAM)ID_STATUS_CURRENT, (LPARAM)"SimpleStatusMsgGlobalStartupStatus"); + } + return; + } + + for (i = 0; i < accounts->count; ++i) + { + if (!IsAccountEnabled(accounts->pa[i])) + continue; + + if (!(CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_2, 0)&~CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_5, 0))) + continue; + +// if (DBGetContactSettingByte(NULL, accounts->pa[i]->szModuleName, "LockMainStatus", 0)) +// continue; + + SetStartupStatus(i); + } +} + +VOID CALLBACK SetStartupStatusProc(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime) +{ + BOOL found = FALSE; + int i; + + for (i = 0; i < accounts->count; ++i) + { + if (!IsAccountEnabled(accounts->pa[i])) + continue; + + if (!(CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_2, 0)&~CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_5, 0))) + continue; + + if (g_uSetStatusTimer[i] == idEvent) + { + KillTimer(NULL, g_uSetStatusTimer[i]); + found = TRUE; + break; + } + } + + if (!found) + { + KillTimer(hwnd, idEvent); + return; + } + + SetStartupStatus(i); +} + +VOID CALLBACK UpdateMsgTimerProc(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime) +{ + MIRANDA_IDLE_INFO mii = {0}; + mii.cbSize = sizeof(mii); + CallService(MS_IDLE_GETIDLEINFO, 0, (LPARAM)&mii); + if (DBGetContactSettingByte(NULL, "SimpleStatusMsg", "NoUpdateOnIdle", 1) && mii.idleType) + return; + + if (!hwndSAMsgDialog) + { + char szBuffer[64]; + DBVARIANT dbv; + TCHAR *tszMsg; + int iCurrentStatus; + + for (int i = 0; i < accounts->count; ++i) + { + if (!IsAccountEnabled(accounts->pa[i])) + continue; + + if (!CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_3, 0)) + continue; + + if (!(CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_MODEMSGSEND)) + continue; + + iCurrentStatus = CallProtoService(accounts->pa[i]->szModuleName, PS_GETSTATUS, 0, 0); + if (iCurrentStatus < ID_STATUS_ONLINE) + continue; + + mir_snprintf(szBuffer, SIZEOF(szBuffer), "FCur%sMsg", accounts->pa[i]->szModuleName); + if (DBGetContactSettingTString(NULL, "SimpleStatusMsg", szBuffer, &dbv)) + continue; + + tszMsg = InsertVarsIntoMsg(dbv.ptszVal, accounts->pa[i]->szModuleName, iCurrentStatus, NULL); + DBFreeVariant(&dbv); + + mir_snprintf(szBuffer, SIZEOF(szBuffer), "Cur%sMsg", accounts->pa[i]->szModuleName); + if (!DBGetContactSettingTString(NULL, "SimpleStatusMsg", szBuffer, &dbv)) + { + if (tszMsg && dbv.ptszVal && !lstrcmp(tszMsg, dbv.ptszVal) || !tszMsg && !dbv.ptszVal) + { + DBFreeVariant(&dbv); + mir_free(tszMsg); + continue; + } + DBFreeVariant(&dbv); + } + + if (tszMsg && lstrlen(tszMsg)) + { +#ifdef _DEBUG + log2file("UpdateMsgTimerProc(): Set %s status and \"" TCHAR_STR_PARAM "\" status message for %s.", StatusModeToDbSetting(iCurrentStatus, ""), tszMsg, accounts->pa[i]->szModuleName); +#endif + Proto_SetStatus(accounts->pa[i]->szModuleName, iCurrentStatus, iCurrentStatus, tszMsg); + SaveMessageToDB(accounts->pa[i]->szModuleName, tszMsg, FALSE); + } + mir_free(tszMsg); + } + } +} + +static int AddTopToolbarButton(WPARAM wParam, LPARAM lParam) +{ + TTBButton ttbb = {0}; + ttbb.cbSize = sizeof(ttbb); + ttbb.hIconHandleUp = GetIconHandle(IDI_CSMSG); + ttbb.pszService = MS_SIMPLESTATUSMSG_SHOWDIALOGINT; + ttbb.dwFlags = TTBBF_VISIBLE | TTBBF_SHOWTOOLTIP; + ttbb.name = ttbb.pszTooltipUp = LPGEN("Change Status Message"); + hTTBButton = TopToolbar_AddButton(&ttbb); + + ReleaseIconEx("csmsg"); + return 0; +} + +void RegisterHotkey(void) +{ + HOTKEYDESC hkd = {0}; + + hkd.cbSize = sizeof(hkd); + hkd.dwFlags = HKD_TCHAR; + hkd.pszName = "SimpleStatusMsg_OpenDialog"; + hkd.ptszDescription = _T("Open Status Message Dialog"); + hkd.ptszSection = _T("Status Message"); + hkd.pszService = MS_SIMPLESTATUSMSG_SHOWDIALOGINT; + hkd.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL, VK_OEM_3); + Hotkey_Register(&hkd); +} + +static int ChangeStatusMsgPrebuild(WPARAM wParam, LPARAM lParam) +{ +#ifdef _DEBUG + log2file("ChangeStatusMsgPrebuild()"); +#endif + PROTOACCOUNT **pa; + int iStatusMenuItemCount = 0, count, i; + DWORD iStatusMsgFlags = 0; + + ProtoEnumAccounts(&count, &pa); + hProtoStatusMenuItem = (HANDLE *)mir_realloc(hProtoStatusMenuItem, sizeof(HANDLE) * count); + for (i = 0; i < count; ++i) + { + if (!IsAccountEnabled(pa[i])) + continue; + + if (CallProtoService(pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_MODEMSGSEND) + iStatusMsgFlags |= CallProtoService(pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_3,0); + + if (!pa[i]->bIsVisible) + continue; + + iStatusMenuItemCount++; + } + + if (!iStatusMsgFlags || !iStatusMenuItemCount) + return 0; + + CLISTMENUITEM mi = {0}; + mi.cbSize = sizeof(mi); + mi.flags = CMIF_ICONFROMICOLIB | CMIF_TCHAR; + if (!DBGetContactSettingByte(NULL, "SimpleStatusMsg", "ShowStatusMenuItem", 1)) + mi.flags |= CMIF_HIDDEN; + mi.icolibItem = GetIconHandle(IDI_CSMSG); + mi.pszService = MS_SIMPLESTATUSMSG_SHOWDIALOGINT; + mi.ptszName = LPGENT("Status Message..."); + mi.position = 2000200000; + Menu_AddStatusMenuItem(&mi); + + mi.popupPosition = 500084000; + mi.position = 2000040000; + + for (i = 0; i < count; ++i) + { + char szSetting[80]; + TCHAR szBuffer[256]; + int iProtoFlags; + + if (!IsAccountEnabled(pa[i])) + continue; + + if (!CallProtoService(pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_3, 0)) + continue; + + if (!(CallProtoService(pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_MODEMSGSEND)) + continue; + + if (!pa[i]->bIsVisible) + continue; + + mir_snprintf(szSetting, SIZEOF(szSetting), "Proto%sFlags", pa[i]->szModuleName); + iProtoFlags = DBGetContactSettingByte(NULL, "SimpleStatusMsg", szSetting, PROTO_DEFAULT); + if (iProtoFlags & PROTO_NO_MSG || iProtoFlags & PROTO_THIS_MSG) + continue; + + if (DBGetContactSettingByte(NULL, pa[i]->szModuleName, "LockMainStatus", 0) && + CallService(MS_SYSTEM_GETVERSION, 0, 0) >= PLUGIN_MAKE_VERSION(0, 9, 0, 10)) + { + mir_sntprintf(szBuffer, SIZEOF(szBuffer), TranslateT("%s (locked)"), pa[i]->tszAccountName); + mi.ptszPopupName = szBuffer; + } + else mi.ptszPopupName = pa[i]->tszAccountName; + hProtoStatusMenuItem[i] = Menu_AddStatusMenuItem(&mi); + } + + return 0; +} + +static int OnIdleChanged(WPARAM, LPARAM lParam) +{ +#ifdef _DEBUG + log2file("OnIdleChanged()"); +#endif + if (!(lParam & IDF_ISIDLE)) + g_iIdleTime = -1; + + MIRANDA_IDLE_INFO mii = {0}; + mii.cbSize = sizeof(mii); + CallService(MS_IDLE_GETIDLEINFO, 0, (LPARAM)&mii); + if (mii.aaStatus == 0) + { +#ifdef _DEBUG + log2file("OnIdleChanged(): AutoAway disabled"); +#endif + return 0; + } + + for (int i = 0; i < accounts->count; ++i) + { + if (!IsAccountEnabled(accounts->pa[i])) + continue; + + if (DBGetContactSettingByte(NULL, accounts->pa[i]->szModuleName, "LockMainStatus", 0)) + continue; + + int iStatusBits = CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_3, 0); + int iStatus = mii.aaStatus; + if (!(iStatusBits & Proto_Status2Flag(iStatus))) + { + if (iStatusBits & Proto_Status2Flag(ID_STATUS_AWAY)) + iStatus = ID_STATUS_AWAY; + else + continue; + } + + int iCurrentStatus = CallProtoService(accounts->pa[i]->szModuleName, PS_GETSTATUS, 0, 0); + if (iCurrentStatus < ID_STATUS_ONLINE || iCurrentStatus == ID_STATUS_INVISIBLE) + continue; + + if ((lParam & IDF_ISIDLE && (DBGetContactSettingByte(NULL, "AutoAway", accounts->pa[i]->szModuleName, 0) || + iCurrentStatus == ID_STATUS_ONLINE || iCurrentStatus == ID_STATUS_FREECHAT)) || + (!(lParam & IDF_ISIDLE) && !mii.aaLock)) + { + if (!(lParam & IDF_ISIDLE)) + iStatus = ID_STATUS_ONLINE; + TCHAR *tszMsg = GetAwayMessage(iStatus, accounts->pa[i]->szModuleName, FALSE, NULL); + TCHAR *tszVarsMsg = InsertVarsIntoMsg(tszMsg, accounts->pa[i]->szModuleName, iStatus, NULL); + SaveMessageToDB(accounts->pa[i]->szModuleName, tszMsg, TRUE); + SaveMessageToDB(accounts->pa[i]->szModuleName, tszVarsMsg, FALSE); + mir_free(tszMsg); + mir_free(tszVarsMsg); + } + } + + return 0; +} + +static int CSStatusChange(WPARAM wParam, LPARAM lParam) +{ + PROTOCOLSETTINGEX** ps = *(PROTOCOLSETTINGEX***)wParam; + int status_mode, CSProtoCount; + char szSetting[80]; + TCHAR *msg = NULL; + + if (ps == NULL) return -1; + + CSProtoCount = CallService(MS_CS_GETPROTOCOUNT, 0, 0); + for (int i = 0; i < CSProtoCount; ++i) + { + if (ps[i]->szName == NULL || !*ps[i]->szName) continue; + if (ps[i]->status == ID_STATUS_IDLE) + status_mode = ps[i]->lastStatus; + else if (ps[i]->status == ID_STATUS_CURRENT) + status_mode = CallProtoService(ps[i]->szName, PS_GETSTATUS, 0, 0); + else + status_mode = ps[i]->status; + + SaveStatusAsCurrent(ps[i]->szName, status_mode); +#ifdef _DEBUG + log2file("CSStatusChange(): Set %s status for %s.", StatusModeToDbSetting(status_mode, ""), ps[i]->szName); +#endif + + // TODO SaveMessageToDB also when NULL? + if (ps[i]->szMsg) + { + int max_hist_msgs, j; + DBVARIANT dbv; + char buff[80]; + BOOL found = FALSE; + + wchar_t *szMsgW = mir_t2u(ps[i]->szMsg); + + +#ifdef _DEBUG + log2file("CSStatusChange(): Set \"%s\" status message for %s.", ps[i]->szMsg, ps[i]->szName); +#endif + max_hist_msgs = DBGetContactSettingByte(NULL, "SimpleStatusMsg", "MaxHist", 10); + for (j = 1; j <= max_hist_msgs; j++) + { + mir_snprintf(buff, SIZEOF(buff), "SMsg%d", j); + if (!DBGetContactSettingTString(NULL, "SimpleStatusMsg", buff, &dbv)) + { + + if (!lstrcmp(dbv.ptszVal, szMsgW)) + + { + found = TRUE; + mir_snprintf(szSetting, SIZEOF(szSetting), "Last%sMsg", ps[i]->szName); + DBWriteContactSettingString(NULL, "SimpleStatusMsg", szSetting, buff); + DBFreeVariant(&dbv); + break; + } + } + } + + if (!found) + { + mir_snprintf(buff, SIZEOF(buff), "FCur%sMsg", ps[i]->szName); + mir_snprintf(szSetting, SIZEOF(szSetting), "Last%sMsg", ps[i]->szName); + DBWriteContactSettingString(NULL, "SimpleStatusMsg", szSetting, buff); + } + + mir_snprintf(szSetting, SIZEOF(szSetting), "%sMsg", ps[i]->szName); + + DBWriteContactSettingWString(NULL, "SRAway", StatusModeToDbSetting(status_mode, szSetting), szMsgW); + msg = InsertVarsIntoMsg(szMsgW, ps[i]->szName, status_mode, NULL); + SaveMessageToDB(ps[i]->szName, szMsgW, TRUE); + mir_free(szMsgW); + + SaveMessageToDB(ps[i]->szName, msg, FALSE); + mir_free(msg); + } + } + + return 0; +} + +static TCHAR *ParseWinampSong(ARGUMENTSINFO *ai) +{ + TCHAR *ptszWinampTitle; + + if (ai->argc != 1) + return NULL; + + ai->flags |= AIF_DONTPARSE; + ptszWinampTitle = GetWinampSong(); + + if (ptszWinampTitle != NULL) + { + mir_free(g_ptszWinampSong); + g_ptszWinampSong = mir_tstrdup(ptszWinampTitle); + } + else if (g_ptszWinampSong && lstrcmp(g_ptszWinampSong, _T("SimpleStatusMsg")) && DBGetContactSettingByte(NULL, "SimpleStatusMsg", "AmpLeaveTitle", 1)) + ptszWinampTitle = mir_tstrdup(g_ptszWinampSong); + + return ptszWinampTitle; +} + +static TCHAR *ParseDate(ARGUMENTSINFO *ai) +{ + TCHAR szStr[128] = {0}; + + if (ai->argc != 1) + return NULL; + + ai->flags |= AIF_DONTPARSE; + GetDateFormat(LOCALE_USER_DEFAULT, DATE_SHORTDATE, NULL, NULL, szStr, SIZEOF(szStr)); + + return mir_tstrdup(szStr); +} + +int ICQMsgTypeToStatus(int iMsgType) +{ + switch (iMsgType) + { + case MTYPE_AUTOONLINE: return ID_STATUS_ONLINE; + case MTYPE_AUTOAWAY: return ID_STATUS_AWAY; + case MTYPE_AUTOBUSY: return ID_STATUS_OCCUPIED; + case MTYPE_AUTONA: return ID_STATUS_NA; + case MTYPE_AUTODND: return ID_STATUS_DND; + case MTYPE_AUTOFFC: return ID_STATUS_FREECHAT; + default: return ID_STATUS_OFFLINE; + } +} + +static int OnICQStatusMsgRequest(WPARAM wParam, LPARAM lParam, LPARAM lMirParam) +{ +#ifdef _DEBUG + log2file("OnICQStatusMsgRequest(): UIN: %d on %s", (int)lParam, (char *)lMirParam); +#endif + + if (DBGetContactSettingByte(NULL, "SimpleStatusMsg", "NoUpdateOnICQReq", 1)) + return 0; + + HANDLE hContact; + char *szProto; + BOOL bContactFound = FALSE; + + hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST, 0, 0); + while (hContact) + { + szProto = (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0); + if (szProto != NULL && !strcmp(szProto, (char *)lMirParam) && DBGetContactSettingDword(hContact, szProto, "UIN", 0) == (DWORD)lParam) + { + bContactFound = TRUE; + break; + } + hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM)hContact, 0); + } + if (!bContactFound) + return 0; + + int iStatus = ICQMsgTypeToStatus(wParam); + TCHAR *tszMsg = GetAwayMessage(iStatus, szProto, TRUE, hContact); + Proto_SetAwayMsgT(szProto, iStatus, tszMsg); + mir_free(tszMsg); + + return 0; +} + +static int OnAccListChanged(WPARAM wParam, LPARAM lParam) +{ +#ifdef _DEBUG + log2file("OnAccListChanged()"); +#endif + accounts->statusFlags = 0; + accounts->statusCount = 0; + accounts->statusMsgFlags = 0; + accounts->statusMsgCount = 0; + UnhookProtoEvents(); + + ProtoEnumAccounts(&accounts->count, &accounts->pa); + for (int i = 0; i < accounts->count; ++i) + { + if (!IsAccountEnabled(accounts->pa[i])) + continue; + + if (!strcmp(accounts->pa[i]->szProtoName, "ICQ")) + HookProtoEvent(accounts->pa[i]->szModuleName, ME_ICQ_STATUSMSGREQ, OnICQStatusMsgRequest); + + accounts->statusFlags |= (CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_2, 0) &~ CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_5, 0)); + + if (CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_2, 0) &~ CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_5, 0)) + accounts->statusCount++; + + if (!(CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_MODEMSGSEND)) + continue; + + accounts->statusMsgFlags |= CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_3,0); + + if (!CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_3, 0)) + continue; + + accounts->statusMsgCount++; + } + + return 0; +} + +static int OnModulesLoaded(WPARAM wParam, LPARAM lParam) +{ +#ifdef _DEBUG + log2file("### Session started ###"); +#endif + // known modules list + if (ServiceExists("DBEditorpp/RegisterSingleModule")) + CallService("DBEditorpp/RegisterSingleModule", (WPARAM)"SimpleStatusMsg", 0); + + IconsInit(); + OnAccListChanged(0, 0); + + LoadAwayMsgModule(); + + HookEventEx(ME_TTB_MODULELOADED, AddTopToolbarButton); + + RegisterHotkey(); + + HookEventEx(ME_OPT_INITIALISE, InitOptions); + h_statusmodechange = HookEvent(ME_CLIST_STATUSMODECHANGE, ChangeStatusMessage); + HookEventEx(ME_PROTO_ACK, ProcessProtoAck); + HookEventEx(ME_IDLE_CHANGED, OnIdleChanged); + + HookEventEx(ME_CLIST_PREBUILDSTATUSMENU, ChangeStatusMsgPrebuild); + ChangeStatusMsgPrebuild(0, 0); + + if (ServiceExists(MS_VARS_REGISTERTOKEN)) + { + TOKENREGISTER tr = {0}; + tr.cbSize = sizeof(TOKENREGISTER); + tr.memType = TR_MEM_MIRANDA; + tr.flags = TRF_FREEMEM | TRF_FIELD | TRF_TCHAR | TRF_PARSEFUNC; + tr.tszTokenString = _T("winampsong"); + tr.parseFunctionT = ParseWinampSong; + tr.szHelpText = LPGEN("External Applications\tretrieves song name of the song currently playing in Winamp (Simple Status Message compatible)"); + CallService(MS_VARS_REGISTERTOKEN, 0, (LPARAM)&tr); + + if (DBGetContactSettingByte(NULL, "SimpleStatusMsg", "ExclDateToken", 0) != 0) + { + tr.tszTokenString = _T("date"); + tr.parseFunctionT = ParseDate; + tr.szHelpText = LPGEN("Miranda Related\tget the date (Simple Status Message compatible)"); + CallService(MS_VARS_REGISTERTOKEN, 0, (LPARAM)&tr); + } + } + +/* if (DBGetContactSettingByte(NULL, "SimpleStatusMsg", "AmpLeaveTitle", 1))*/ { + DBVARIANT dbv; + + if (!DBGetContactSettingTString(NULL, "SimpleStatusMsg", "AmpLastTitle", &dbv)) + { + g_ptszWinampSong = mir_tstrdup(dbv.ptszVal); + DBFreeVariant(&dbv); + } + else + g_ptszWinampSong = mir_tstrdup(_T("SimpleStatusMsg")); + } +/* else + g_ptszWinampSong = mir_tstrdup(_T("SimpleStatusMsg"));*/ + + if (DBGetContactSettingByte(NULL, "SimpleStatusMsg", "UpdateMsgOn", 1)) + g_uUpdateMsgTimer = SetTimer(NULL, 0, DBGetContactSettingWord(NULL, "SimpleStatusMsg", "UpdateMsgInt", 10) * 1000, (TIMERPROC)UpdateMsgTimerProc); + + if (ServiceExists(MS_CS_SETSTATUSEX)) + HookEventEx(ME_CS_STATUSCHANGEEX, CSStatusChange); + + if (accounts->statusCount == 0) + return 0; + + if (!ServiceExists(MS_SS_GETPROFILECOUNT)) + { + if (DBGetContactSettingByte(NULL, "SimpleStatusMsg", "GlobalStatusDelay", 1)) + { + SetTimer(NULL, 0, DBGetContactSettingWord(NULL, "SimpleStatusMsg", "SetStatusDelay", 300), (TIMERPROC)SetStartupStatusGlobal); + } + else + { + char szSetting[80]; + + g_uSetStatusTimer = (UINT_PTR*)mir_alloc(sizeof(UINT_PTR) * accounts->count); + for (int i = 0; i < accounts->count; ++i) + { + if (!IsAccountEnabled(accounts->pa[i])) + continue; + + if (!(CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_2, 0) &~ CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_5, 0))) + continue; + + mir_snprintf(szSetting, SIZEOF(szSetting), "Set%sStatusDelay", accounts->pa[i]->szModuleName); + g_uSetStatusTimer[i] = SetTimer(NULL, 0, DBGetContactSettingWord(NULL, "SimpleStatusMsg", szSetting, 300), (TIMERPROC)SetStartupStatusProc); + } + } + } + + return 0; +} + +static int OnOkToExit(WPARAM wParam, LPARAM lParam) +{ + if (accounts->statusCount) + { + char szSetting[80]; + + for (int i = 0; i < accounts->count; ++i) + { + if (!IsAccountEnabled(accounts->pa[i])) + continue; + + if (!(CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_2, 0) &~ CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_5, 0))) + continue; + + mir_snprintf(szSetting, SIZEOF(szSetting), "Last%sStatus", accounts->pa[i]->szModuleName); + DBWriteContactSettingWord(NULL, "SimpleStatusMsg", szSetting, (WORD)CallProtoService(accounts->pa[i]->szModuleName, PS_GETSTATUS, 0, 0)); + } + + if (g_ptszWinampSong && lstrcmp(g_ptszWinampSong, _T("SimpleStatusMsg")) /*&& DBGetContactSettingByte(NULL, "SimpleStatusMsg", "AmpLeaveTitle", 1)*/) + DBWriteMessage("AmpLastTitle", g_ptszWinampSong); + } + + return 0; +} + +static int OnPreShutdown(WPARAM wParam, LPARAM lParam) +{ + if (!accounts->statusMsgFlags) + return 0; + + AwayMsgPreShutdown(); + if (hwndSAMsgDialog) DestroyWindow(hwndSAMsgDialog); + if (hProtoStatusMenuItem) mir_free(hProtoStatusMenuItem); + if (g_uSetStatusTimer) mir_free(g_uSetStatusTimer); + if (g_ptszWinampSong) mir_free(g_ptszWinampSong); + if (g_uUpdateMsgTimer) KillTimer(NULL, g_uUpdateMsgTimer); + + return 0; +} + +static INT_PTR IsSARunning(WPARAM wParam, LPARAM lParam) +{ + return 1; +} + +//remember to mir_free() the return value +static INT_PTR sttGetAwayMessageT(WPARAM wParam, LPARAM lParam) +{ + return (INT_PTR)GetAwayMessage((int)wParam, (char*)lParam, TRUE, NULL); +} + + +static INT_PTR sttGetAwayMessage(WPARAM wParam, LPARAM lParam) +{ + TCHAR* msg = GetAwayMessage((int)wParam, (char*)lParam, TRUE, NULL); + char* res = mir_t2a(msg); + mir_free(msg); + return (INT_PTR)res; +} + + +extern "C" int __declspec(dllexport) Load(void) +{ + + mir_getLP(&pluginInfo); + hwndSAMsgDialog = NULL; + accounts = (PROTOACCOUNTS *)mir_alloc(sizeof(PROTOACCOUNTS)); + + DBWriteContactSettingWord(NULL, "CList", "Status", (WORD)ID_STATUS_OFFLINE); + HookEventEx(ME_SYSTEM_MODULESLOADED, OnModulesLoaded); + HookEventEx(ME_PROTO_ACCLISTCHANGED, OnAccListChanged); + + + CreateServiceFunctionEx(MS_AWAYMSG_GETSTATUSMSG, sttGetAwayMessage); + CreateServiceFunctionEx(MS_AWAYMSG_GETSTATUSMSGW, sttGetAwayMessageT); + + CreateServiceFunctionEx(MS_SIMPLESTATUSMSG_SETSTATUS, SetStatusModeFromExtern); + CreateServiceFunctionEx(MS_SIMPLESTATUSMSG_SHOWDIALOG, ShowStatusMessageDialog); + CreateServiceFunctionEx(MS_SIMPLESTATUSMSG_CHANGESTATUSMSG, ChangeStatusMsg); + CreateServiceFunctionEx(MS_SIMPLESTATUSMSG_SHOWDIALOGINT, ShowStatusMessageDialogInternal); // internal use ONLY + + // Deprecated SimpleAway services + CreateServiceFunctionEx(MS_SA_ISSARUNNING, IsSARunning); + CreateServiceFunctionEx(MS_SA_CHANGESTATUSMSG, ChangeStatusMsg); + CreateServiceFunctionEx(MS_SA_TTCHANGESTATUSMSG, ShowStatusMessageDialogInternal); + CreateServiceFunctionEx(MS_SA_SHOWSTATUSMSGDIALOG, ShowStatusMessageDialog); + CreateServiceFunctionEx(MS_SA_SETSTATUSMODE, SetStatusModeFromExtern); + + CreateServiceFunctionEx(MS_SA_SETOFFLINESTATUS, SetOfflineStatus); + CreateServiceFunctionEx(MS_SA_SETONLINESTATUS, SetOnlineStatus); + CreateServiceFunctionEx(MS_SA_SETAWAYSTATUS, SetAwayStatus); + CreateServiceFunctionEx(MS_SA_SETDNDSTATUS, SetDNDStatus); + CreateServiceFunctionEx(MS_SA_SETNASTATUS, SetNAStatus); + CreateServiceFunctionEx(MS_SA_SETOCCUPIEDSTATUS, SetOccupiedStatus); + CreateServiceFunctionEx(MS_SA_SETFREECHATSTATUS, SetFreeChatStatus); + CreateServiceFunctionEx(MS_SA_SETINVISIBLESTATUS, SetInvisibleStatus); + CreateServiceFunctionEx(MS_SA_SETONTHEPHONESTATUS, SetOnThePhoneStatus); + CreateServiceFunctionEx(MS_SA_SETOUTTOLUNCHSTATUS, SetOutToLunchStatus); + + HookEventEx(ME_SYSTEM_OKTOEXIT, OnOkToExit); + HookEventEx(ME_SYSTEM_PRESHUTDOWN, OnPreShutdown); + + return 0; +} + +extern "C" int __declspec(dllexport) Unload(void) +{ + UnhookEvents(); + UnhookEvent(h_statusmodechange); + UnhookProtoEvents(); + DestroyServiceFunctionsEx(); + mir_free(accounts); + +#ifdef _DEBUG + log2file("### Session ended ###"); +#endif + + return 0; +} diff --git a/plugins/SimpleStatusMsg/src/msgbox.cpp b/plugins/SimpleStatusMsg/src/msgbox.cpp new file mode 100644 index 0000000000..924307ea04 --- /dev/null +++ b/plugins/SimpleStatusMsg/src/msgbox.cpp @@ -0,0 +1,1798 @@ +/* + +Simple Status Message plugin for Miranda IM +Copyright (C) 2006-2011 Bartosz 'Dezeath' Bia³ek, (C) 2005 Harven + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License along +with this program; if not, write to the Free Software Foundation, Inc., +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +*/ +#include "commonheaders.h" +#include "simplestatusmsg.h" + +#define I_ICON_DEL 0 +#define I_ICON_HIST 1 +#define I_ICON_MSG 2 +#define I_ICON_ADD 3 +#define I_ICON_CLEAR 4 + +struct MsgBoxData +{ + char *m_szProto; + int m_iStatus; + int m_iInitialStatus; + int m_iStatusModes; + int m_iStatusMsgModes; + HWND status_cbex; + HWND recent_cbex; + HICON icon[5]; + HIMAGELIST status_icons; + HIMAGELIST other_icons; + int m_iCountdown; + int curr_sel_msg; + int m_iDlgFlags; + int max_hist_msgs; + int num_def_msgs; + BOOL m_bPredefChanged; + BOOL m_bIsMsgHistory; + BOOL m_bOnStartup; +}; + +typedef struct +{ + clock_t ctLastDblClk; + UINT uClocksPerDblClk; +} +MsgEditCtrl; + +HIMAGELIST AddOtherIconsToImageList(struct MsgBoxData *data) +{ + HIMAGELIST himlIcons = ImageList_Create(16, 16, (IsWinVerXPPlus() ? ILC_COLOR32 : ILC_COLOR16) | ILC_MASK, 4, 0); + + for (int i = 0; i < 5; ++i) + ImageList_AddIcon(himlIcons, data->icon[i]); + + return himlIcons; +} + +int statusicon_nr[9]; + +HIMAGELIST AddStatusIconsToImageList(const char *szProto, int status_flags) +{ + int num_icons = 1; + int i; + + for (i = 0; i < 9; ++i) + if (Proto_Status2Flag(ID_STATUS_ONLINE + i) & status_flags) num_icons++; + + HIMAGELIST himlIcons = ImageList_Create(16, 16, (IsWinVerXPPlus() ? ILC_COLOR32 : ILC_COLOR16) | ILC_MASK, num_icons, 0); + HICON hicon = LoadSkinnedProtoIcon(szProto, ID_STATUS_OFFLINE); + ImageList_AddIcon(himlIcons, hicon); + CallService(MS_SKIN2_RELEASEICON, (LPARAM)hicon, (WPARAM)0); + statusicon_nr[0] = 0; + + int j = 1; + for (i = 0; i < 9; ++i) + { + if (Proto_Status2Flag(ID_STATUS_ONLINE + i) & status_flags) + { + hicon = LoadSkinnedProtoIcon(szProto, ID_STATUS_ONLINE + i); + ImageList_AddIcon(himlIcons, hicon); + CallService(MS_SKIN2_RELEASEICON, (LPARAM)hicon, (WPARAM)0); + statusicon_nr[i + 1] = j; + j++; + } + else + statusicon_nr[i + 1] = 0; + } + + return himlIcons; +} + +HWND WINAPI CreateStatusComboBoxEx(HWND hwndDlg, struct MsgBoxData *data) +{ + int j = 0, cur_sel = 0; + TCHAR *status_desc; + + if (!(data->m_iDlgFlags & DLG_SHOW_STATUS)) + return NULL; + + HWND handle = CreateWindowEx(0, WC_COMBOBOXEX, NULL, + WS_TABSTOP | CBS_NOINTEGRALHEIGHT | WS_VISIBLE | WS_CHILD | CBS_DROPDOWNLIST, + 0, 0, 0, 240, hwndDlg, NULL, g_hInst, NULL); + + COMBOBOXEXITEM cbei = {0}; + if (!(data->m_iDlgFlags & DLG_SHOW_STATUS_ICONS)) + cbei.mask = CBEIF_LPARAM | CBEIF_TEXT; + else + cbei.mask = CBEIF_LPARAM | CBEIF_TEXT | CBEIF_IMAGE | CBEIF_SELECTEDIMAGE; + + if (data->m_bOnStartup) + status_desc = (TCHAR*)TranslateT(""); + else + status_desc = (TCHAR*)TranslateT(""); + cbei.iItem = j; + cbei.pszText = (LPTSTR)status_desc; + cbei.cchTextMax = sizeof(status_desc); + + if (data->m_szProto || data->m_iStatus == ID_STATUS_CURRENT) + { + if (data->m_bOnStartup) + j = GetStartupStatus(data->m_szProto) - ID_STATUS_OFFLINE; + else + j = GetCurrentStatus(data->m_szProto) - ID_STATUS_OFFLINE; + } + else + j = data->m_iStatus - ID_STATUS_OFFLINE; + + if (j < 0 || j > 9) j = 0; // valid status modes only + + if (data->m_iDlgFlags & DLG_SHOW_STATUS_ICONS) + { + cbei.iImage = statusicon_nr[j]; + cbei.iSelectedImage = statusicon_nr[j]; + } + j = 0; + cbei.lParam = (LPARAM)ID_STATUS_CURRENT; + + if (ID_STATUS_CURRENT == data->m_iInitialStatus) + cur_sel = j; + + SendMessage(handle, CBEM_INSERTITEM, 0, (LPARAM)&cbei); + j++; + + for (int i = 0; i < 10; ++i) + { + if ((Proto_Status2Flag(ID_STATUS_OFFLINE + i) & data->m_iStatusModes) || i == 0) + { + status_desc = (TCHAR*)CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, ID_STATUS_OFFLINE + i, GSMDF_TCHAR); + cbei.iItem = j; + cbei.pszText = (LPTSTR)status_desc; + cbei.cchTextMax = sizeof(status_desc); + if (data->m_iDlgFlags & DLG_SHOW_STATUS_ICONS) + { + cbei.iImage = j - 1; + cbei.iSelectedImage = j - 1; + } + cbei.lParam = (LPARAM)ID_STATUS_OFFLINE + i; + + if (ID_STATUS_OFFLINE + i == data->m_iInitialStatus) + cur_sel = j; + + if (SendMessage(handle, CBEM_INSERTITEM, 0, (LPARAM)&cbei) == -1) + break; + j++; + } + } + + if (!data->m_szProto && (data->m_iDlgFlags & DLG_SHOW_STATUS_PROFILES) && ServiceExists(MS_SS_GETPROFILECOUNT)) + { + int defaultProfile; + int profileCount = (int)CallService(MS_SS_GETPROFILECOUNT, (WPARAM)&defaultProfile, 0); + char buff1[128]; + + for (int i = 0; i < profileCount; ++i) + { + CallService(MS_SS_GETPROFILENAME, (WPARAM)i, (LPARAM)buff1); + + status_desc = mir_a2u(buff1); + + cbei.iItem = j; + cbei.pszText = (LPTSTR)status_desc; + cbei.cchTextMax = sizeof(status_desc); + if (data->m_iDlgFlags & DLG_SHOW_STATUS_ICONS) + { + int k = GetCurrentStatus(NULL) - ID_STATUS_OFFLINE; + if (k < 0 || k > 9) k = 0; // valid status modes only + cbei.iImage = statusicon_nr[k]; + cbei.iSelectedImage = statusicon_nr[k]; + } + cbei.lParam = (LPARAM)40083+i; + + mir_free(status_desc); + + if (SendMessage(handle, CBEM_INSERTITEM, 0, (LPARAM)&cbei) == -1) + break; + j++; + } + } + + if (!(data->m_iDlgFlags & DLG_SHOW_STATUS_ICONS)) + SendMessage(handle, CB_SETITEMHEIGHT, (WPARAM)0, (LPARAM)16); + else + { + SendMessage(handle, CB_SETITEMHEIGHT, (WPARAM)0, (LPARAM)18); + SendMessage(handle, CBEM_SETIMAGELIST, 0, (LPARAM)data->status_icons); + } + SetWindowPos(handle, NULL, 11, 11, 112, 20, SWP_NOACTIVATE); + SendMessage(handle, CB_SETCURSEL, (WPARAM)cur_sel, 0); + SendMessage(handle, CB_SETITEMHEIGHT, (WPARAM)-1, (LPARAM)16); + + return handle; +} + +#define HISTORY_MSG 1 +#define CLEAR_HISTORY 2 +#define PREDEFINED_MSG 3 +#define ADD_MSG 4 +#define DELETE_SELECTED 5 +#define DEFAULT_MSG 6 + +HWND WINAPI CreateRecentComboBoxEx(HWND hwndDlg, struct MsgBoxData *data) +{ + int i, j; + char buff[16]; + BOOL found = FALSE; + DBVARIANT dbv; + TCHAR text[128]; + + HWND handle = CreateWindowEx(0, WC_COMBOBOXEX, NULL, + WS_TABSTOP | CBS_NOINTEGRALHEIGHT | WS_VISIBLE | WS_CHILD | CBS_DROPDOWNLIST, + 0, 0, 0, 300, hwndDlg, NULL, g_hInst, NULL); + + COMBOBOXEXITEM cbei = {0}; + if (!(data->m_iDlgFlags & DLG_SHOW_LIST_ICONS)) + cbei.mask = CBEIF_LPARAM | CBEIF_TEXT | CBEIF_INDENT; + else + cbei.mask = CBEIF_LPARAM | CBEIF_TEXT | CBEIF_IMAGE | CBEIF_SELECTEDIMAGE; + + j = DBGetContactSettingWord(NULL, "SimpleStatusMsg", "LMMsg", 1); + + for (i = 1; i <= data->max_hist_msgs; ++i) + { + // history messages + if (j < 1) j = data->max_hist_msgs; + mir_snprintf(buff, SIZEOF(buff), "SMsg%d", j); + j--; + if (!DBGetContactSettingTString(NULL, "SimpleStatusMsg", buff, &dbv)) + { + if (dbv.ptszVal != NULL && dbv.ptszVal != '\0') + { + found = TRUE; + cbei.iItem = -1; + cbei.pszText = (LPTSTR)dbv.ptszVal; + cbei.cchTextMax = sizeof(dbv.ptszVal); + if (data->m_iDlgFlags & DLG_SHOW_LIST_ICONS) + { + cbei.iImage = I_ICON_HIST; + cbei.iSelectedImage = I_ICON_HIST; + } + else + cbei.iIndent = 0; + cbei.lParam = MAKELPARAM(HISTORY_MSG, j + 1); + + if (SendMessage(handle, CBEM_INSERTITEM, 0, (LPARAM)&cbei) == -1) + { + DBFreeVariant(&dbv); + break; + } + } + DBFreeVariant(&dbv); + } + } + + data->m_bIsMsgHistory = found; + + if ((data->m_iDlgFlags & DLG_SHOW_BUTTONS) || (data->m_iDlgFlags & DLG_SHOW_BUTTONS_FLAT)) + { + if (found) + { + if (!IsWindowEnabled(GetDlgItem(hwndDlg, IDC_BCLEAR))) + EnableWindow(GetDlgItem(hwndDlg, IDC_BCLEAR), TRUE); + } + else if (IsWindowEnabled(GetDlgItem(hwndDlg, IDC_BCLEAR))) + EnableWindow(GetDlgItem(hwndDlg, IDC_BCLEAR), FALSE); + } + else if (data->m_iDlgFlags & DLG_SHOW_BUTTONS_INLIST) + { + if (found) + { + if (data->m_iDlgFlags & DLG_SHOW_LIST_ICONS) + { + mir_sntprintf(text, SIZEOF(text), TranslateT("Clear History")); + cbei.iImage = I_ICON_CLEAR; + cbei.iSelectedImage = I_ICON_CLEAR; + } + else + { + mir_sntprintf(text, SIZEOF(text), _T("## %s ##"), TranslateT("Clear History")); + cbei.iIndent = 1; + } + cbei.iItem = -1; + cbei.pszText = (LPTSTR)text; + cbei.cchTextMax = SIZEOF(text); + cbei.lParam = MAKELPARAM(CLEAR_HISTORY, 0); + SendMessage(handle, CBEM_INSERTITEM, 0, (LPARAM)&cbei); + } + + cbei.iItem = -1; + if (data->m_iDlgFlags & DLG_SHOW_LIST_ICONS) + { + mir_sntprintf(text, SIZEOF(text), TranslateT("Add to Predefined")); + cbei.iImage = I_ICON_ADD; + cbei.iSelectedImage = I_ICON_ADD; + } + else + { + mir_sntprintf(text, SIZEOF(text), _T("## %s ##"), TranslateT("Add to Predefined")); + cbei.iIndent = 1; + } + cbei.pszText = (LPTSTR)text; + cbei.cchTextMax = SIZEOF(text); + cbei.lParam = MAKELPARAM(ADD_MSG, 0); + SendMessage(handle, CBEM_INSERTITEM, 0, (LPARAM)&cbei); + + if (data->m_iDlgFlags & DLG_SHOW_LIST_ICONS) + { + mir_sntprintf(text, SIZEOF(text), TranslateT("Delete Selected")); + cbei.iImage = I_ICON_DEL; + cbei.iSelectedImage = I_ICON_DEL; + } + else + { + cbei.iIndent = 1; + mir_sntprintf(text, SIZEOF(text), _T("## %s ##"), TranslateT("Delete Selected")); + } + cbei.iItem = -1; + cbei.pszText = (LPTSTR)text; + cbei.cchTextMax = SIZEOF(text); + cbei.lParam = MAKELPARAM(DELETE_SELECTED, 0); + SendMessage(handle, CBEM_INSERTITEM, 0, (LPARAM)&cbei); + } + + if ((data->m_iDlgFlags & DLG_SHOW_BUTTONS) || (data->m_iDlgFlags & DLG_SHOW_BUTTONS_FLAT)) + { + if (data->num_def_msgs || found) + { + if (!IsWindowEnabled(GetDlgItem(hwndDlg, IDC_BDEL))) + EnableWindow(GetDlgItem(hwndDlg, IDC_BDEL), TRUE); + } + else if (IsWindowEnabled(GetDlgItem(hwndDlg, IDC_BDEL))) + EnableWindow(GetDlgItem(hwndDlg, IDC_BDEL), FALSE); + } + + for (i = 1; i <= data->num_def_msgs; ++i) + { + // predefined messages + mir_snprintf(buff, SIZEOF(buff), "DefMsg%d", i); + if (!DBGetContactSettingTString(NULL, "SimpleStatusMsg", buff, &dbv)) + { + if (dbv.ptszVal) + { + if (!lstrlen(dbv.ptszVal)) + { + DBFreeVariant(&dbv); + continue; + } + + cbei.iItem = -1; + cbei.pszText = (LPTSTR)dbv.ptszVal; + cbei.cchTextMax = sizeof(dbv.ptszVal); + if (data->m_iDlgFlags & DLG_SHOW_LIST_ICONS) + { + cbei.iImage = I_ICON_MSG; + cbei.iSelectedImage = I_ICON_MSG; + } + else + cbei.iIndent = 0; + cbei.lParam = MAKELPARAM(PREDEFINED_MSG, i); + + if (SendMessage(handle,CBEM_INSERTITEM,0,(LPARAM)&cbei) == -1) + break; + } + DBFreeVariant(&dbv); + } + } + + if (DBGetContactSettingByte(NULL, "SimpleStatusMsg", "PutDefInList", 0)) + { + cbei.iItem = -1; + cbei.pszText = (LPTSTR)GetDefaultMessage(data->m_iStatus); + cbei.cchTextMax = sizeof(GetDefaultMessage(data->m_iStatus)); + if (data->m_iDlgFlags & DLG_SHOW_LIST_ICONS) + { + cbei.iImage = I_ICON_MSG; + cbei.iSelectedImage = I_ICON_MSG; + } + else + cbei.iIndent = 0; + cbei.lParam = MAKELPARAM(DEFAULT_MSG, 0); + + SendMessage(handle,CBEM_INSERTITEM,0,(LPARAM)&cbei); + } + + if (data->m_iDlgFlags & DLG_SHOW_LIST_ICONS) + SendMessage(handle, CBEM_SETIMAGELIST, 0, (LPARAM)data->other_icons); + if (!(data->m_iDlgFlags & DLG_SHOW_STATUS)) + { + SetWindowPos(handle, NULL, 11, 11, 290, 20, SWP_NOACTIVATE); + SendMessage(handle, CB_SETDROPPEDWIDTH, (WPARAM)290, 0); + } + else + { + SetWindowPos(handle, NULL, 127, 11, 174, 20, SWP_NOACTIVATE); + SendMessage(handle, CB_SETDROPPEDWIDTH, (WPARAM)250, 0); + } + SendMessage(handle, CB_SETITEMHEIGHT, (WPARAM)-1, (LPARAM)16); + SendMessage(handle, CB_SETITEMHEIGHT, (WPARAM)0, (LPARAM)16); + + if (((data->m_iDlgFlags & DLG_SHOW_BUTTONS) || (data->m_iDlgFlags & DLG_SHOW_BUTTONS_FLAT)) && !found && !data->num_def_msgs) + EnableWindow(handle, FALSE); + + if (((!(data->m_iDlgFlags & DLG_SHOW_BUTTONS)) && (!(data->m_iDlgFlags & DLG_SHOW_BUTTONS_FLAT)) && (!(data->m_iDlgFlags & DLG_SHOW_BUTTONS_INLIST))) && !found && !data->num_def_msgs) + EnableWindow(handle, FALSE); + + return handle; +} + +VOID APIENTRY HandlePopupMenu(HWND hwnd, POINT pt, HWND edit_control) +{ + HMENU hmenu = LoadMenu(g_hInst, MAKEINTRESOURCE(IDR_EDITMENU)); + if (hmenu == NULL) + return; + + HMENU hmenuTrackPopup = GetSubMenu(hmenu, 0); + + TranslateMenu(hmenuTrackPopup); + + ClientToScreen(hwnd, (LPPOINT) &pt); + + LPDWORD sel_s = NULL, sel_e = NULL; + SendMessage(edit_control, EM_GETSEL, (WPARAM)&sel_s, (LPARAM)&sel_e); + if (sel_s == sel_e) + { + EnableMenuItem(hmenuTrackPopup, IDM_COPY, MF_BYCOMMAND | MF_GRAYED); + EnableMenuItem(hmenuTrackPopup, IDM_CUT, MF_BYCOMMAND | MF_GRAYED); + } + if (SendMessage(edit_control, WM_GETTEXTLENGTH, 0, 0) == 0) + EnableMenuItem(hmenuTrackPopup, IDM_DELETE, MF_BYCOMMAND | MF_GRAYED); + + if (ServiceExists(MS_VARS_FORMATSTRING)) + DeleteMenu(hmenuTrackPopup, ID__VARIABLES, MF_BYCOMMAND); + else + DeleteMenu(hmenuTrackPopup, 8, MF_BYPOSITION); + + if (ServiceExists(MS_FORTUNEMSG_GETSTATUSMSG)) + DeleteMenu(hmenuTrackPopup, ID__FORTUNEAWAYMSG, MF_BYCOMMAND); + else + DeleteMenu(hmenuTrackPopup, 7, MF_BYPOSITION); + + int m_selection = TrackPopupMenu(hmenuTrackPopup, TPM_LEFTALIGN | TPM_RETURNCMD, pt.x, pt.y, 0, hwnd, NULL); + switch (m_selection) + { + case IDM_COPY: + SendMessage(edit_control, WM_COPY, 0, 0); + break; + + case IDM_CUT: + SendMessage(edit_control, WM_CUT, 0, 0); + break; + + case IDM_PASTE: + SendMessage(edit_control, WM_PASTE, 0, 0); + break; + + case IDM_SELECTALL: + SendMessage(edit_control, EM_SETSEL, 0, -1); + break; + + case IDM_DELETE: + SendMessage(edit_control, WM_SETTEXT, 0, (LPARAM)""); + SendMessage(GetParent(hwnd), WM_COMMAND, MAKEWPARAM(IDC_EDIT1, EN_CHANGE), (LPARAM)edit_control); + break; + + case ID__FORTUNEAWAYMSG: + CallService(MS_UTILS_OPENURL,1,(LPARAM)"http://nightly.miranda.im/"); + break; + + case ID__VARIABLES: + + CallService(MS_UTILS_OPENURL,1,(LPARAM)"http://nightly.miranda.im/"); + + break; + + case ID__VARIABLES_MOREVARIABLES: + { + VARHELPINFO vhi = {0}; + vhi.cbSize = sizeof(vhi); + vhi.flags = VHF_FULLDLG | VHF_SETLASTSUBJECT; + vhi.hwndCtrl = edit_control; + vhi.szSubjectDesc = NULL; + vhi.szExtraTextDesc = NULL; + CallService(MS_VARS_SHOWHELPEX, (WPARAM)hwnd, (LPARAM)&vhi); + break; + } + + default: + if (!OpenClipboard(GetParent(hwnd))) break; + if (EmptyClipboard()) + { + TCHAR item_string[128]; + int len; + + GetMenuString(hmenu, m_selection, (LPTSTR)&item_string, 128, MF_BYCOMMAND); + len = lstrlen(item_string); + if (len) + { + LPTSTR lptstrCopy; + HGLOBAL hglbCopy = GlobalAlloc(GMEM_MOVEABLE, (len + 1) * sizeof(TCHAR)); + if (hglbCopy == NULL) + { + CloseClipboard(); + break; + } + lptstrCopy = (LPTSTR)GlobalLock(hglbCopy); + memcpy(lptstrCopy, item_string, len * sizeof(TCHAR)); + lptstrCopy[len] = (TCHAR)0; + GlobalUnlock(hglbCopy); + + SetClipboardData(CF_UNICODETEXT, hglbCopy); + + } + } + CloseClipboard(); + SendMessage(edit_control, WM_PASTE, 0, 0); + break; + } + DestroyMenu(hmenu); +} + +static WNDPROC MainDlgProc; + +static LRESULT CALLBACK EditBoxSubProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) +{ + switch (uMsg) + { + case WM_CONTEXTMENU: + { + POINT pt = {(LONG)LOWORD(lParam), (LONG)HIWORD(lParam)}; + RECT rc; + GetClientRect(hwndDlg, &rc); + + if (pt.x == -1 && pt.y == -1) + { + GetCursorPos(&pt); + if (!PtInRect(&rc, pt)) + { + pt.x = rc.left + (rc.right - rc.left) / 2; + pt.y = rc.top + (rc.bottom - rc.top) / 2; + } + } + else + ScreenToClient(hwndDlg, &pt); + + if (PtInRect(&rc, pt)) + HandlePopupMenu(hwndDlg, pt, GetDlgItem(GetParent(hwndDlg), IDC_EDIT1)); + + return 0; + } + + case WM_CHAR: + if (wParam=='\n' && GetKeyState(VK_CONTROL) & 0x8000) + { + PostMessage(GetParent(hwndDlg), WM_COMMAND, IDC_OK, 0); + return 0; + } + if (wParam == 1 && GetKeyState(VK_CONTROL) & 0x8000) // Ctrl + A + { + SendMessage(hwndDlg, EM_SETSEL, 0, -1); + return 0; + } + if (wParam == 23 && GetKeyState(VK_CONTROL) & 0x8000) // Ctrl + W + { + SendMessage(GetParent(hwndDlg), WM_COMMAND, IDC_CANCEL, 0); + return 0; + } + if (wParam == 127 && GetKeyState(VK_CONTROL) & 0x8000) // Ctrl + Backspace + { + DWORD start, end; + TCHAR *text; + int textLen; + SendMessage(hwndDlg, EM_GETSEL, (WPARAM)&end, (LPARAM)(PDWORD)NULL); + SendMessage(hwndDlg, WM_KEYDOWN, VK_LEFT, 0); + SendMessage(hwndDlg, EM_GETSEL, (WPARAM)&start, (LPARAM)(PDWORD)NULL); + textLen = GetWindowTextLength(hwndDlg); + text = (TCHAR *)mir_alloc(sizeof(TCHAR) * (textLen + 1)); + GetWindowText(hwndDlg, text, textLen + 1); + MoveMemory(text + start, text + end, sizeof(TCHAR) * (textLen + 1 - end)); + SetWindowText(hwndDlg, text); + mir_free(text); + SendMessage(hwndDlg, EM_SETSEL, start, start); + SendMessage(GetParent(hwndDlg), WM_COMMAND, MAKEWPARAM(GetDlgCtrlID(hwndDlg), EN_CHANGE), (LPARAM)hwndDlg); + return 0; + } + break; + + case WM_LBUTTONDBLCLK: + { + MsgEditCtrl* mec = (MsgEditCtrl*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA); + if (mec != NULL) + { + mec->ctLastDblClk = clock(); + mec->uClocksPerDblClk = GetDoubleClickTime() * CLOCKS_PER_SEC / 1000; + SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)mec); + } + break; + } + + case WM_LBUTTONDOWN: + { + MsgEditCtrl* mec = (MsgEditCtrl*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA); + if (mec != NULL && UINT(clock() - mec->ctLastDblClk) < mec->uClocksPerDblClk) + { + SendMessage(hwndDlg, EM_SETSEL, 0, -1); + return 0; + } + break; + } + + case WM_SETFOCUS: + { + MsgEditCtrl* mec = (MsgEditCtrl*)mir_calloc(sizeof(MsgEditCtrl)); + SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)mec); + break; + } + + case WM_KILLFOCUS: + { + MsgEditCtrl* mec = (MsgEditCtrl*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA); + mir_free(mec); + mec = NULL; + SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)mec); + break; + } + } + + return CallWindowProc(MainDlgProc, hwndDlg, uMsg, wParam, lParam); +} + +int AddToPredefined(HWND hwndDlg, struct MsgBoxData *data) +{ + COMBOBOXEXITEM newitem = {0}; + int len = 0, num_items; + TCHAR msg[1024], text[1024]; + + if (IsWindowEnabled(GetDlgItem(hwndDlg, IDC_EDIT1))) + len = GetDlgItemText(hwndDlg, IDC_EDIT1, msg, SIZEOF(msg)); + + if (!len) + return -1; + + num_items = SendMessage(data->recent_cbex, CB_GETCOUNT, 0, 0) - 1; + for (int i = 1; i <= data->num_def_msgs; i++, num_items--) + { + newitem.mask = CBEIF_LPARAM | CBEIF_TEXT; + newitem.iItem = num_items; + newitem.cchTextMax = SIZEOF(text); + newitem.pszText = text; + + SendMessage(data->recent_cbex, CBEM_GETITEM, 0, (LPARAM)&newitem); + if (LOWORD(newitem.lParam) == PREDEFINED_MSG && !lstrcmp(text, msg)) + return num_items; + } + + data->num_def_msgs++; + data->m_bPredefChanged = TRUE; + + newitem.iItem = -1; + newitem.pszText = (LPTSTR)msg; + newitem.cchTextMax = SIZEOF(msg); + if (data->m_iDlgFlags & DLG_SHOW_LIST_ICONS) + { + newitem.mask = CBEIF_LPARAM | CBEIF_TEXT | CBEIF_IMAGE | CBEIF_SELECTEDIMAGE; + newitem.iImage = I_ICON_MSG; + newitem.iSelectedImage = I_ICON_MSG; + } + else + { + newitem.mask = CBEIF_LPARAM | CBEIF_TEXT | CBEIF_INDENT; + newitem.iIndent = 0; + } + newitem.lParam = MAKELPARAM(PREDEFINED_MSG, 0); + return SendMessage(data->recent_cbex, CBEM_INSERTITEM, 0, (LPARAM)&newitem); +} + +void ClearHistory(struct MsgBoxData *data, int cur_sel) +{ + COMBOBOXEXITEM histitem = {0}; + int i, num_items; + char text[16], buff2[80]; + + for (i = 1; i <= data->max_hist_msgs; i++) + { + mir_snprintf(text, SIZEOF(text), "SMsg%d", i); + DBWriteContactSettingTString(NULL, "SimpleStatusMsg", text, _T("")); + } + DBWriteContactSettingString(NULL, "SimpleStatusMsg", "LastMsg", ""); + for (i = 0; i < accounts->count; i++) + { + if (!IsAccountEnabled(accounts->pa[i])) + continue; + + if (!CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_3, 0)) + continue; + + if (!(CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_MODEMSGSEND)) + continue; + + mir_snprintf(buff2, SIZEOF(buff2), "Last%sMsg", accounts->pa[i]->szModuleName); + DBWriteContactSettingString(NULL, "SimpleStatusMsg", buff2, ""); + } + DBWriteContactSettingWord(NULL, "SimpleStatusMsg", "LMMsg", (WORD)data->max_hist_msgs); + SendMessage(data->recent_cbex, CB_SETCURSEL, -1, 0); + num_items = SendMessage(data->recent_cbex, CB_GETCOUNT, 0, 0); + if (num_items == CB_ERR) + return; + + if ((!(data->m_iDlgFlags & DLG_SHOW_BUTTONS)) && (!(data->m_iDlgFlags & DLG_SHOW_BUTTONS_FLAT))) + SendMessage(data->recent_cbex, CBEM_DELETEITEM, (WPARAM)cur_sel, 0); + + for (i = num_items; i >= 0; i--) + { + histitem.mask = CBEIF_LPARAM; + histitem.iItem = i; + SendMessage(data->recent_cbex, CBEM_GETITEM, 0, (LPARAM)&histitem); + if (LOWORD(histitem.lParam) == HISTORY_MSG) + SendMessage(data->recent_cbex, CBEM_DELETEITEM, (WPARAM)i, 0); + } +} + +void DisplayCharsCount(struct MsgBoxData *dlg_data, HWND hwndDlg) +{ + TCHAR msg[1024]; + TCHAR status_text[128]; + int len, lines = 1; + + if (dlg_data->m_iCountdown != -2) + return; + + len = GetDlgItemText(hwndDlg, IDC_EDIT1, msg, SIZEOF(msg)); + if (DBGetContactSettingByte(NULL, "SimpleStatusMsg", "RemoveCR", 0)) + { + int index, num_lines = SendMessage(GetDlgItem(hwndDlg, IDC_EDIT1), EM_GETLINECOUNT, 0, 0); + for (int i = 1; i < num_lines; ++i) + { + index = SendMessage(GetDlgItem(hwndDlg, IDC_EDIT1), EM_LINEINDEX, (WPARAM)i, 0); + if (msg[index - 1] == '\n') lines++; + } + } + mir_sntprintf(status_text, SIZEOF(status_text), TranslateT("OK (%d)"), len - (lines - 1)); + SendMessage(GetDlgItem(hwndDlg, IDC_OK), WM_SETTEXT, 0, (LPARAM)status_text); +} + +void SetEditControlText(struct MsgBoxData *data, HWND hwndDlg, int iStatus) +{ + int flags, fcursel = CB_ERR, num_start; + DBVARIANT dbv, dbv2; + char setting[80]; + + num_start = SendMessage(data->recent_cbex, CB_GETCOUNT, 0, 0); + num_start -= data->num_def_msgs + 1; + + mir_snprintf(setting, SIZEOF(setting), "%sFlags", data->m_szProto ? data->m_szProto : ""); + flags = DBGetContactSettingByte(NULL, "SimpleStatusMsg", (char *)StatusModeToDbSetting(iStatus, setting), STATUS_DEFAULT); + + if (flags & STATUS_LAST_MSG) + { + if (data->m_szProto) + mir_snprintf(setting, SIZEOF(setting), "Last%sMsg", data->m_szProto); + else + mir_snprintf(setting, SIZEOF(setting), "LastMsg"); + + if (!DBGetContactSetting(NULL, "SimpleStatusMsg", setting, &dbv)) + { + if (dbv.pszVal) + { + if (strlen(dbv.pszVal) && !DBGetContactSettingTString(NULL, "SimpleStatusMsg", dbv.pszVal, &dbv2)) + { + if (dbv2.ptszVal && lstrlen(dbv2.ptszVal)) + { + SetDlgItemText(hwndDlg, IDC_EDIT1, dbv2.ptszVal); + fcursel = SendMessage(data->recent_cbex, CB_FINDSTRINGEXACT, num_start, (LPARAM)dbv2.ptszVal); + if (fcursel != CB_ERR) + SendMessage(data->recent_cbex, CB_SETCURSEL, (WPARAM)fcursel, 0); + } + DBFreeVariant(&dbv2); + } + } + DBFreeVariant(&dbv); + } + } + else if (flags & STATUS_DEFAULT_MSG) + { + SetDlgItemText(hwndDlg, IDC_EDIT1, GetDefaultMessage(iStatus)); + + if (DBGetContactSettingByte(NULL, "SimpleStatusMsg", "PutDefInList", 0)) + { + fcursel = SendMessage(data->recent_cbex, CB_FINDSTRINGEXACT, num_start, (LPARAM)GetDefaultMessage(iStatus)); + if (fcursel != CB_ERR) + SendMessage(data->recent_cbex, CB_SETCURSEL, (WPARAM)fcursel, 0); + } + } + else if (flags & STATUS_THIS_MSG) + { + if (data->m_szProto) + mir_snprintf(setting, SIZEOF(setting), "%sDefault", data->m_szProto); + else + mir_snprintf(setting, SIZEOF(setting), "Default"); + + if (!DBGetContactSettingTString(NULL, "SRAway", StatusModeToDbSetting(iStatus, setting), &dbv)) + { + SetDlgItemText(hwndDlg, IDC_EDIT1, dbv.ptszVal); + fcursel = SendMessage(data->recent_cbex, CB_FINDSTRINGEXACT, num_start, (LPARAM)dbv.ptszVal); + if (fcursel != CB_ERR) + SendMessage(data->recent_cbex, CB_SETCURSEL, (WPARAM)fcursel, 0); + DBFreeVariant(&dbv); + } + } + else if (flags & STATUS_LAST_STATUS_MSG) + { + if (data->m_szProto) + mir_snprintf(setting, SIZEOF(setting), "%sMsg", data->m_szProto); + else + mir_snprintf(setting, SIZEOF(setting), "Msg"); + + if (!DBGetContactSettingTString(NULL, "SRAway", StatusModeToDbSetting(iStatus, setting), &dbv)) + { + SetDlgItemText(hwndDlg, IDC_EDIT1, dbv.ptszVal); + fcursel = SendMessage(data->recent_cbex, CB_FINDSTRINGEXACT, num_start, (LPARAM)dbv.ptszVal); + if (fcursel != CB_ERR) + SendMessage(data->recent_cbex, CB_SETCURSEL, (WPARAM)fcursel, 0); + DBFreeVariant(&dbv); + } + } + + if (fcursel != CB_ERR) + data->curr_sel_msg = fcursel; +} + +void ChangeDlgStatus(HWND hwndDlg, struct MsgBoxData *msgbox_data, int iStatus) +{ + TCHAR szTitle[256], szProtoName[128]; + BOOL bDisabled = msgbox_data->m_szProto && !(CallProtoService(msgbox_data->m_szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_MODEMSGSEND); + + mir_sntprintf(szProtoName, SIZEOF(szProtoName), msgbox_data->m_szProto ? ProtoGetAccount(msgbox_data->m_szProto)->tszAccountName : TranslateT("Global")); + if (iStatus == ID_STATUS_CURRENT) + { + if (msgbox_data->m_bOnStartup) + mir_sntprintf(szTitle, SIZEOF(szTitle), TranslateT("%s Message (%s)"), TranslateT(""), szProtoName); + else + mir_sntprintf(szTitle, SIZEOF(szTitle), TranslateT("%s Message (%s)"), TranslateT(""), szProtoName); + } + else if (iStatus > ID_STATUS_CURRENT) + { + TCHAR buff[128]; + + char buff1[128]; + CallService(MS_SS_GETPROFILENAME, iStatus - 40083, (LPARAM)buff1); + MultiByteToWideChar(CallService(MS_LANGPACK_GETCODEPAGE, 0, 0), 0, buff1, -1, buff, 128); + + mir_sntprintf(szTitle, SIZEOF(szTitle), TranslateT("%s Message (%s)"), (TCHAR*)buff, szProtoName); + } + else + mir_sntprintf(szTitle, SIZEOF(szTitle), TranslateT("%s Message (%s)"), (TCHAR*)CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, iStatus, GSMDF_TCHAR), szProtoName); + SetWindowText(hwndDlg, szTitle); + + if (iStatus == ID_STATUS_CURRENT) + iStatus = msgbox_data->m_bOnStartup ? GetStartupStatus(msgbox_data->m_szProto) : GetCurrentStatus(msgbox_data->m_szProto); + else if (iStatus > ID_STATUS_CURRENT) + iStatus = GetCurrentStatus(NULL); + + CallService(MS_SKIN2_RELEASEICON, (WPARAM)SendMessage(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)LoadSkinnedProtoIcon(msgbox_data->m_szProto, iStatus)), 0); + CallService(MS_SKIN2_RELEASEICON, (WPARAM)SendMessage(hwndDlg, WM_SETICON, ICON_SMALL, (LPARAM)LoadSkinnedProtoIcon(msgbox_data->m_szProto, iStatus)) , 0); + + if (!bDisabled && ((Proto_Status2Flag(iStatus) & msgbox_data->m_iStatusMsgModes) + || (iStatus == ID_STATUS_OFFLINE && (Proto_Status2Flag(ID_STATUS_INVISIBLE) & msgbox_data->m_iStatusMsgModes)))) + { + int num_items = SendMessage(msgbox_data->recent_cbex, CB_GETCOUNT, 0, 0); + int fcursel = CB_ERR, num_start = num_items - msgbox_data->num_def_msgs - 1; + TCHAR msg[1024]; + + if (!IsWindowEnabled(GetDlgItem(hwndDlg, IDC_EDIT1))) + EnableWindow(GetDlgItem(hwndDlg, IDC_EDIT1), TRUE); + + if (!IsWindowEnabled(msgbox_data->recent_cbex) && num_items) + EnableWindow(msgbox_data->recent_cbex, TRUE); + + // TODO what if num_start <= 0 ? + if (GetDlgItemText(hwndDlg, IDC_EDIT1, msg, SIZEOF(msg))) + fcursel = SendMessage(msgbox_data->recent_cbex, CB_FINDSTRINGEXACT, num_start, (LPARAM)msg); + if (fcursel != CB_ERR) + { + SendMessage(msgbox_data->recent_cbex, CB_SETCURSEL, fcursel, 0); + msgbox_data->curr_sel_msg = fcursel; + } + + if ((msgbox_data->m_iDlgFlags & DLG_SHOW_BUTTONS) || (msgbox_data->m_iDlgFlags & DLG_SHOW_BUTTONS_FLAT)) + { + if (!GetDlgItemText(hwndDlg, IDC_EDIT1, msg, SIZEOF(msg))) + { + if (IsWindowEnabled(GetDlgItem(hwndDlg, IDC_BADD))) + EnableWindow(GetDlgItem(hwndDlg, IDC_BADD), FALSE); + } + else if (!IsWindowEnabled(GetDlgItem(hwndDlg, IDC_BADD))) + EnableWindow(GetDlgItem(hwndDlg, IDC_BADD), TRUE); + if (num_items) + { + if (msgbox_data->curr_sel_msg == -1) + { + if (IsWindowEnabled(GetDlgItem(hwndDlg, IDC_BDEL))) + EnableWindow(GetDlgItem(hwndDlg, IDC_BDEL), FALSE); + } + else + { + COMBOBOXEXITEM cbitem = {0}; + cbitem.mask = CBEIF_LPARAM | CBEIF_TEXT; + cbitem.iItem = msgbox_data->curr_sel_msg; + cbitem.cchTextMax = SIZEOF(msg); + cbitem.pszText = msg; + SendMessage(msgbox_data->recent_cbex, CBEM_GETITEM, 0, (LPARAM)&cbitem); + if (LOWORD(cbitem.lParam) == PREDEFINED_MSG) + { + if (IsWindowEnabled(GetDlgItem(hwndDlg, IDC_BADD))) + EnableWindow(GetDlgItem(hwndDlg, IDC_BADD), FALSE); + } + else if (!IsWindowEnabled(GetDlgItem(hwndDlg, IDC_BADD))) + EnableWindow(GetDlgItem(hwndDlg, IDC_BADD), TRUE); + + if (!IsWindowEnabled(GetDlgItem(hwndDlg, IDC_BDEL))) + EnableWindow(GetDlgItem(hwndDlg, IDC_BDEL), TRUE); + } + + if (msgbox_data->m_bIsMsgHistory && !IsWindowEnabled(GetDlgItem(hwndDlg, IDC_BCLEAR))) + EnableWindow(GetDlgItem(hwndDlg, IDC_BCLEAR), TRUE); + } + } + } + else + { + if (IsWindowEnabled(GetDlgItem(hwndDlg, IDC_EDIT1))) + EnableWindow(GetDlgItem(hwndDlg, IDC_EDIT1), FALSE); + if (IsWindowEnabled(msgbox_data->recent_cbex)) + EnableWindow(msgbox_data->recent_cbex, FALSE); + + if ((msgbox_data->m_iDlgFlags & DLG_SHOW_BUTTONS) || (msgbox_data->m_iDlgFlags & DLG_SHOW_BUTTONS_FLAT)) + { + if (IsWindowEnabled(GetDlgItem(hwndDlg, IDC_BADD))) + EnableWindow(GetDlgItem(hwndDlg, IDC_BADD), FALSE); + if (IsWindowEnabled(GetDlgItem(hwndDlg, IDC_BCLEAR))) + EnableWindow(GetDlgItem(hwndDlg, IDC_BCLEAR), FALSE); + if (IsWindowEnabled(GetDlgItem(hwndDlg, IDC_BDEL))) + EnableWindow(GetDlgItem(hwndDlg, IDC_BDEL), FALSE); + } + } +} + +#define DM_SIMPAWAY_SHUTDOWN (WM_USER + 10) +#define DM_SIMPAWAY_CHANGEICONS (WM_USER + 11) + +INT_PTR CALLBACK AwayMsgBoxDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) +{ + struct MsgBoxData *msgbox_data = (struct MsgBoxData*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA); + + switch (uMsg) + { + case WM_INITDIALOG: + { + TCHAR szTitle[256], szFormat[256], szProtoName[128]; + struct MsgBoxInitData *init_data; + struct MsgBoxData *copy_init_data; + INITCOMMONCONTROLSEX icex = {0}; + BOOL bCurrentStatus = FALSE, bDisabled = FALSE; + + InitCommonControls(); + icex.dwSize = sizeof(INITCOMMONCONTROLSEX); + icex.dwICC = ICC_USEREX_CLASSES; + InitCommonControlsEx(&icex); + + TranslateDialogDefault(hwndDlg); + init_data = (struct MsgBoxInitData*)lParam; + GetWindowText(hwndDlg, szFormat, SIZEOF(szFormat)); + mir_sntprintf(szProtoName, SIZEOF(szProtoName), init_data->m_szProto ? ProtoGetAccount(init_data->m_szProto)->tszAccountName : TranslateT("Global")); + + if (init_data->m_iStatus == ID_STATUS_CURRENT) + { + if (init_data->m_bOnStartup) + mir_sntprintf(szTitle, SIZEOF(szTitle), szFormat, TranslateT(""), szProtoName); + else + mir_sntprintf(szTitle, SIZEOF(szTitle), szFormat, TranslateT(""), szProtoName); + } + else + mir_sntprintf(szTitle, SIZEOF(szTitle), szFormat, (TCHAR*)CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, init_data->m_iStatus, GSMDF_TCHAR), szProtoName); + SetWindowText(hwndDlg, szTitle); + + int icoStatus = ID_STATUS_OFFLINE; + if (init_data->m_iStatus == ID_STATUS_CURRENT) + icoStatus = init_data->m_bOnStartup ? GetStartupStatus(init_data->m_szProto) : GetCurrentStatus(init_data->m_szProto); + else + icoStatus = init_data->m_iStatus; + if (icoStatus < ID_STATUS_OFFLINE) + icoStatus = ID_STATUS_OFFLINE; + SendMessage(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)LoadSkinnedProtoIcon(init_data->m_szProto, icoStatus)); + SendMessage(hwndDlg, WM_SETICON, ICON_SMALL, (LPARAM)LoadSkinnedProtoIcon(init_data->m_szProto, icoStatus)); + + copy_init_data = (struct MsgBoxData *)mir_alloc(sizeof(struct MsgBoxData)); + + SendDlgItemMessage(hwndDlg, IDC_EDIT1, EM_LIMITTEXT, 1024, 0); + + HookEventMessage(ME_SYSTEM_PRESHUTDOWN, hwndDlg, DM_SIMPAWAY_SHUTDOWN); + HookEventMessage(ME_SKIN2_ICONSCHANGED, hwndDlg, DM_SIMPAWAY_CHANGEICONS); + + copy_init_data->num_def_msgs = DBGetContactSettingWord(NULL, "SimpleStatusMsg", "DefMsgCount", 0); + copy_init_data->max_hist_msgs = DBGetContactSettingByte(NULL, "SimpleStatusMsg", "MaxHist", 10); + copy_init_data->m_iDlgFlags = DBGetContactSettingByte(NULL, "SimpleStatusMsg", "DlgFlags", DLG_SHOW_DEFAULT); + copy_init_data->m_szProto = init_data->m_szProto; + copy_init_data->m_iStatus = init_data->m_iStatus; + copy_init_data->m_iStatusModes = init_data->m_iStatusModes; + copy_init_data->m_iStatusMsgModes = init_data->m_iStatusMsgModes; + copy_init_data->m_iInitialStatus = init_data->m_iStatus; + copy_init_data->m_bOnStartup = init_data->m_bOnStartup; + + //Load Icons + copy_init_data->icon[I_ICON_DEL] = LoadIconEx("cross"); + copy_init_data->icon[I_ICON_HIST] = LoadIconEx("recent"); + copy_init_data->icon[I_ICON_MSG] = LoadIconEx("predef"); + copy_init_data->icon[I_ICON_ADD] = LoadIconEx("add"); + copy_init_data->icon[I_ICON_CLEAR] = LoadIconEx("clear"); + if (copy_init_data->m_iDlgFlags & DLG_SHOW_STATUS_ICONS) + copy_init_data->status_icons = AddStatusIconsToImageList(init_data->m_szProto, copy_init_data->m_iStatusModes); + if (copy_init_data->m_iDlgFlags & DLG_SHOW_LIST_ICONS) + copy_init_data->other_icons = AddOtherIconsToImageList(copy_init_data); + + if ((copy_init_data->m_iDlgFlags & DLG_SHOW_BUTTONS) || (copy_init_data->m_iDlgFlags & DLG_SHOW_BUTTONS_FLAT)) + { + SendMessage(GetDlgItem(hwndDlg, IDC_BADD), BUTTONADDTOOLTIP, (WPARAM)Translate("Add to Predefined"), 0); + SendMessage(GetDlgItem(hwndDlg, IDC_BADD), BM_SETIMAGE, IMAGE_ICON, (LPARAM)copy_init_data->icon[I_ICON_ADD]); + EnableWindow(GetDlgItem(hwndDlg, IDC_BADD), TRUE); + ShowWindow(GetDlgItem(hwndDlg, IDC_BADD), TRUE); + + SendMessage(GetDlgItem(hwndDlg, IDC_BDEL), BUTTONADDTOOLTIP, (WPARAM)Translate("Delete Selected"), 0); + SendMessage(GetDlgItem(hwndDlg, IDC_BDEL), BM_SETIMAGE, IMAGE_ICON, (LPARAM)copy_init_data->icon[I_ICON_DEL]); + ShowWindow(GetDlgItem(hwndDlg, IDC_BDEL), TRUE); + + SendMessage(GetDlgItem(hwndDlg, IDC_BCLEAR), BUTTONADDTOOLTIP, (WPARAM)Translate("Clear History"), 0); + SendMessage(GetDlgItem(hwndDlg, IDC_BCLEAR), BM_SETIMAGE, IMAGE_ICON, (LPARAM)copy_init_data->icon[I_ICON_CLEAR]); + ShowWindow(GetDlgItem(hwndDlg, IDC_BCLEAR), TRUE); + + if (copy_init_data->m_iDlgFlags & DLG_SHOW_BUTTONS_FLAT) + { + SendMessage(GetDlgItem(hwndDlg, IDC_BADD), BUTTONSETASFLATBTN, TRUE, 0); + SendMessage(GetDlgItem(hwndDlg, IDC_BDEL), BUTTONSETASFLATBTN, TRUE, 0); + SendMessage(GetDlgItem(hwndDlg, IDC_BCLEAR), BUTTONSETASFLATBTN, TRUE, 0); + } + } + else + { + SetWindowPos(GetDlgItem(hwndDlg, IDC_OK), NULL, 52, 115, 0, 0, SWP_NOSIZE|SWP_NOZORDER); + SetWindowPos(GetDlgItem(hwndDlg, IDC_CANCEL), NULL, 160, 115, 0, 0, SWP_NOSIZE|SWP_NOZORDER); + ShowWindow(GetDlgItem(hwndDlg, IDC_BADD), FALSE); + ShowWindow(GetDlgItem(hwndDlg, IDC_BDEL), FALSE); + ShowWindow(GetDlgItem(hwndDlg, IDC_BCLEAR), FALSE); + } + copy_init_data->status_cbex = CreateStatusComboBoxEx(hwndDlg, copy_init_data); + + if (copy_init_data->m_iStatus == ID_STATUS_CURRENT) + { + if (copy_init_data->m_bOnStartup) + copy_init_data->m_iStatus = GetStartupStatus(copy_init_data->m_szProto); + else + copy_init_data->m_iStatus = GetCurrentStatus(copy_init_data->m_szProto); + if (copy_init_data->m_szProto == NULL) + bCurrentStatus = TRUE; + } + + copy_init_data->recent_cbex = CreateRecentComboBoxEx(hwndDlg, copy_init_data); + copy_init_data->curr_sel_msg = -1; + copy_init_data->m_bPredefChanged = FALSE; + + SetEditControlText(copy_init_data, hwndDlg, copy_init_data->m_iStatus); + if ((copy_init_data->m_iDlgFlags & DLG_SHOW_BUTTONS) || (copy_init_data->m_iDlgFlags & DLG_SHOW_BUTTONS_FLAT)) + { + TCHAR msg[1024]; + + if (!GetDlgItemText(hwndDlg, IDC_EDIT1, msg, SIZEOF(msg))) + EnableWindow(GetDlgItem(hwndDlg, IDC_BADD), FALSE); + + if (copy_init_data->curr_sel_msg == -1) + { + if (IsWindowEnabled(GetDlgItem(hwndDlg, IDC_BDEL))) + EnableWindow(GetDlgItem(hwndDlg, IDC_BDEL), FALSE); + } + else + { + COMBOBOXEXITEM cbitem = {0}; + cbitem.mask = CBEIF_LPARAM|CBEIF_TEXT; + cbitem.iItem = copy_init_data->curr_sel_msg; + cbitem.cchTextMax = SIZEOF(msg); + cbitem.pszText = msg; + + SendMessage(copy_init_data->recent_cbex, CBEM_GETITEM, 0, (LPARAM)&cbitem); + if (LOWORD(cbitem.lParam) == PREDEFINED_MSG) + { + if (IsWindowEnabled(GetDlgItem(hwndDlg, IDC_BADD))) + EnableWindow(GetDlgItem(hwndDlg, IDC_BADD), FALSE); + } + else if (!IsWindowEnabled(GetDlgItem(hwndDlg, IDC_BADD))) + EnableWindow(GetDlgItem(hwndDlg, IDC_BADD), TRUE); + } + } + + SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)copy_init_data); + + if (copy_init_data->m_szProto && !(CallProtoService(copy_init_data->m_szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_MODEMSGSEND)) + bDisabled = TRUE; + + if (!(((Proto_Status2Flag(copy_init_data->m_iStatus) & copy_init_data->m_iStatusMsgModes) || + (copy_init_data->m_iStatus == ID_STATUS_OFFLINE && (Proto_Status2Flag(ID_STATUS_INVISIBLE) & copy_init_data->m_iStatusMsgModes))) && !bDisabled)) + { + if (IsWindowEnabled(GetDlgItem(hwndDlg, IDC_EDIT1))) + EnableWindow(GetDlgItem(hwndDlg, IDC_EDIT1), FALSE); + if (IsWindowEnabled(copy_init_data->recent_cbex)) + EnableWindow(copy_init_data->recent_cbex, FALSE); + + if ((copy_init_data->m_iDlgFlags & DLG_SHOW_BUTTONS) || (copy_init_data->m_iDlgFlags & DLG_SHOW_BUTTONS_FLAT)) + { + if (IsWindowEnabled(GetDlgItem(hwndDlg, IDC_BADD))) + EnableWindow(GetDlgItem(hwndDlg, IDC_BADD), FALSE); + if (IsWindowEnabled(GetDlgItem(hwndDlg, IDC_BCLEAR))) + EnableWindow(GetDlgItem(hwndDlg, IDC_BCLEAR), FALSE); + if (IsWindowEnabled(GetDlgItem(hwndDlg, IDC_BDEL))) + EnableWindow(GetDlgItem(hwndDlg, IDC_BDEL), FALSE); + } + } + + if (DBGetContactSettingByte(NULL, "SimpleStatusMsg", "AutoClose", 1) && init_data->m_bOnEvent) + { + copy_init_data->m_iCountdown = DBGetContactSettingByte(NULL, "SimpleStatusMsg", "DlgTime", 5); + SendMessage(hwndDlg, WM_TIMER, 0, 0); + SetTimer(hwndDlg, 1, 1000, 0); + } + else + { + copy_init_data->m_iCountdown = -2; + DisplayCharsCount(copy_init_data, hwndDlg); + } + + if (bCurrentStatus) + copy_init_data->m_iStatus = ID_STATUS_CURRENT; + + mir_free(init_data); + + MainDlgProc = (WNDPROC)SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_EDIT1), GWLP_WNDPROC, (LONG_PTR)EditBoxSubProc); + if (!init_data->m_bOnEvent && IsWindowEnabled(GetDlgItem(hwndDlg, IDC_EDIT1))) + { + SetFocus(GetDlgItem(hwndDlg, IDC_EDIT1)); + SendMessage(GetDlgItem(hwndDlg, IDC_EDIT1), EM_SETSEL, 0, -1); + } + else + SetFocus(GetDlgItem(hwndDlg, IDC_OK)); + + if (!DBGetContactSettingByte(NULL, "SimpleStatusMsg", "WinCentered", 1)) + { + WINDOWPLACEMENT wp; + int x, y; + + wp.length = sizeof(wp); + GetWindowPlacement(hwndDlg, &wp); + + x = (int)DBGetContactSettingDword(NULL, "SimpleStatusMsg", "Winx", -1); + y = (int)DBGetContactSettingDword(NULL, "SimpleStatusMsg", "Winy", -1); + + if (x !=- 1) + { + OffsetRect(&wp.rcNormalPosition, x - wp.rcNormalPosition.left, y - wp.rcNormalPosition.top); + wp.flags = 0; + SetWindowPlacement(hwndDlg, &wp); + } + } + return FALSE; + } + + case WM_TIMER: + if (msgbox_data->m_iCountdown == -1) + { + SendMessage(hwndDlg, WM_COMMAND, (WPARAM)IDC_OK, 0); + msgbox_data->m_iCountdown = -2; + DisplayCharsCount(msgbox_data, hwndDlg); + break; + } + else + { + TCHAR str[64]; + mir_sntprintf(str, SIZEOF(str), TranslateT("Closing in %d"), msgbox_data->m_iCountdown); + SetDlgItemText(hwndDlg, IDC_OK, str); + } + msgbox_data->m_iCountdown--; + break; + + case WM_COMMAND: + switch (LOWORD(wParam)) + { + case IDC_OK: + { + TCHAR tszMsg[1024]; + int iStatus, iMsgLen = 0, iProfileStatus = 0; + BOOL bCurrentStatus = FALSE; + + if (msgbox_data->m_iStatus == ID_STATUS_CURRENT) + { + msgbox_data->m_iStatus = msgbox_data->m_bOnStartup ? GetStartupStatus(msgbox_data->m_szProto) : GetCurrentStatus(msgbox_data->m_szProto); + if (msgbox_data->m_szProto == NULL) + bCurrentStatus = TRUE; + } + else if (msgbox_data->m_iStatus >= ID_STATUS_CURRENT) + { + iProfileStatus = msgbox_data->m_iStatus; + msgbox_data->m_iStatus = GetCurrentStatus(NULL); + } + + if (IsWindowEnabled(GetDlgItem(hwndDlg, IDC_EDIT1))) + iMsgLen = GetDlgItemText(hwndDlg, IDC_EDIT1, tszMsg, SIZEOF(tszMsg)); + + if (iMsgLen == 0) + { + char szSetting[80]; + if (msgbox_data->m_szProto) + { + mir_snprintf(szSetting, SIZEOF(szSetting), "Last%sMsg", msgbox_data->m_szProto); + DBWriteContactSettingString(NULL, "SimpleStatusMsg", szSetting, ""); + + mir_snprintf(szSetting, SIZEOF(szSetting), "%sMsg", msgbox_data->m_szProto); + DBWriteContactSettingTString(NULL, "SRAway", StatusModeToDbSetting(msgbox_data->m_iStatus, szSetting), _T("")); + } + else + { + DBWriteContactSettingString(NULL, "SimpleStatusMsg", "LastMsg", ""); + for (int j = 0; j < accounts->count; j++) + { + if (!IsAccountEnabled(accounts->pa[j])) + continue; + + if (!CallProtoService(accounts->pa[j]->szModuleName, PS_GETCAPS, PFLAGNUM_3, 0)) + continue; + + if (DBGetContactSettingByte(NULL, accounts->pa[j]->szModuleName, "LockMainStatus", 0)) + continue; + + if (!(CallProtoService(accounts->pa[j]->szModuleName, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_MODEMSGSEND)) + continue; + + mir_snprintf(szSetting, SIZEOF(szSetting), "Last%sMsg", accounts->pa[j]->szModuleName); + DBWriteContactSettingString(NULL, "SimpleStatusMsg", szSetting, ""); + + mir_snprintf(szSetting, SIZEOF(szSetting), "%sMsg", accounts->pa[j]->szModuleName); + iStatus = msgbox_data->m_bOnStartup ? GetStartupStatus(accounts->pa[j]->szModuleName) : GetCurrentStatus(accounts->pa[j]->szModuleName); + DBWriteContactSettingTString(NULL, "SRAway", StatusModeToDbSetting(iStatus, szSetting), _T("")); + } + + DBWriteContactSettingTString(NULL, "SRAway", StatusModeToDbSetting(msgbox_data->m_iStatus, "Msg"), _T("")); // for compatibility with some plugins + } + + if (bCurrentStatus) + SetStatusMessage(msgbox_data->m_szProto, msgbox_data->m_iInitialStatus, ID_STATUS_CURRENT, 0, msgbox_data->m_bOnStartup); + else if (iProfileStatus != 0) + SetStatusMessage(msgbox_data->m_szProto, msgbox_data->m_iInitialStatus, iProfileStatus, 0, FALSE); + else + SetStatusMessage(msgbox_data->m_szProto, msgbox_data->m_iInitialStatus, msgbox_data->m_iStatus, 0, msgbox_data->m_bOnStartup); + } + else + { + char buff[64], buff2[80]; + DBVARIANT dbv; + BOOL found = FALSE; + + for (int i = 1; i <= msgbox_data->max_hist_msgs; i++) + { + mir_snprintf(buff, SIZEOF(buff), "SMsg%d", i); + if (!DBGetContactSettingTString(NULL, "SimpleStatusMsg", buff, &dbv)) + { + if (!lstrcmp(dbv.ptszVal, tszMsg)) + { + found = TRUE; + if (msgbox_data->m_szProto) + { + mir_snprintf(buff2, SIZEOF(buff2), "Last%sMsg", msgbox_data->m_szProto); + DBWriteContactSettingString(NULL, "SimpleStatusMsg", buff2, buff); + + mir_snprintf(buff2, SIZEOF(buff2), "%sMsg", msgbox_data->m_szProto); + DBWriteContactSettingTString(NULL, "SRAway", StatusModeToDbSetting(msgbox_data->m_iStatus, buff2), tszMsg); + } + else + { + DBWriteContactSettingString(NULL, "SimpleStatusMsg", "LastMsg", buff); + for (int j = 0; j < accounts->count; j++) + { + if (!IsAccountEnabled(accounts->pa[j])) + continue; + + if (!CallProtoService(accounts->pa[j]->szModuleName, PS_GETCAPS, PFLAGNUM_3, 0)) + continue; + + if (DBGetContactSettingByte(NULL, accounts->pa[j]->szModuleName, "LockMainStatus", 0)) + continue; + + if (!(CallProtoService(accounts->pa[j]->szModuleName, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_MODEMSGSEND)) + continue; + + mir_snprintf(buff2, SIZEOF(buff2), "Last%sMsg", accounts->pa[j]->szModuleName); + DBWriteContactSettingString(NULL, "SimpleStatusMsg", buff2, buff); + + mir_snprintf(buff2, SIZEOF(buff2), "%sMsg", accounts->pa[j]->szModuleName); + iStatus = msgbox_data->m_bOnStartup ? GetStartupStatus(accounts->pa[j]->szModuleName) : GetCurrentStatus(accounts->pa[j]->szModuleName); + DBWriteContactSettingTString(NULL, "SRAway", StatusModeToDbSetting(iStatus, buff2), tszMsg); + } + } + DBFreeVariant(&dbv); + break; + } + } + } + + if (!found) + { + int last_modified_msg = DBGetContactSettingWord(NULL, "SimpleStatusMsg", "LMMsg", msgbox_data->max_hist_msgs); + + if (last_modified_msg == msgbox_data->max_hist_msgs) + last_modified_msg = 1; + else + last_modified_msg++; + + mir_snprintf(buff, SIZEOF(buff), "SMsg%d", last_modified_msg); + DBWriteContactSettingTString(NULL, "SimpleStatusMsg", buff, tszMsg); + + if (msgbox_data->m_szProto) + { + mir_snprintf(buff2, SIZEOF(buff2), "Last%sMsg", msgbox_data->m_szProto); + DBWriteContactSettingString(NULL, "SimpleStatusMsg", buff2, buff); + + mir_snprintf(buff2, SIZEOF(buff2), "%sMsg", msgbox_data->m_szProto); + DBWriteContactSettingTString(NULL, "SRAway", StatusModeToDbSetting(msgbox_data->m_iStatus, buff2), tszMsg); + } + else + { + DBWriteContactSettingString(NULL, "SimpleStatusMsg", "LastMsg", buff); + for (int j = 0; j < accounts->count; j++) + { + if (!IsAccountEnabled(accounts->pa[j])) + continue; + + if (!CallProtoService(accounts->pa[j]->szModuleName, PS_GETCAPS, PFLAGNUM_3, 0)) + continue; + + if (DBGetContactSettingByte(NULL, accounts->pa[j]->szModuleName, "LockMainStatus", 0)) + continue; + + if (!(CallProtoService(accounts->pa[j]->szModuleName, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_MODEMSGSEND)) + continue; + + mir_snprintf(buff2, SIZEOF(buff2), "Last%sMsg", accounts->pa[j]->szModuleName); + DBWriteContactSettingString(NULL, "SimpleStatusMsg", buff2, buff); + + mir_snprintf(buff2, SIZEOF(buff2), "%sMsg", accounts->pa[j]->szModuleName); + iStatus = msgbox_data->m_bOnStartup ? GetStartupStatus(accounts->pa[j]->szModuleName) : GetCurrentStatus(accounts->pa[j]->szModuleName); + DBWriteContactSettingTString(NULL, "SRAway", StatusModeToDbSetting(iStatus, buff2), tszMsg); + } + } + DBWriteContactSettingWord(NULL, "SimpleStatusMsg", "LMMsg", (WORD)last_modified_msg); + } + + if (!msgbox_data->m_szProto) + DBWriteContactSettingTString(NULL, "SRAway", StatusModeToDbSetting(msgbox_data->m_iStatus, "Msg"), tszMsg); // for compatibility with some plugins + + if (bCurrentStatus) + SetStatusMessage(msgbox_data->m_szProto, msgbox_data->m_iInitialStatus, ID_STATUS_CURRENT, tszMsg, msgbox_data->m_bOnStartup); + else if (iProfileStatus != 0) + SetStatusMessage(msgbox_data->m_szProto, msgbox_data->m_iInitialStatus, iProfileStatus, tszMsg, FALSE); + else + SetStatusMessage(msgbox_data->m_szProto, msgbox_data->m_iInitialStatus, msgbox_data->m_iStatus, tszMsg, msgbox_data->m_bOnStartup); + } + } + + case IDCANCEL: + case IDC_CANCEL: + DestroyWindow(hwndDlg); + return TRUE; + + case IDC_EDIT1: // Notification from the edit control + if (msgbox_data->m_iCountdown > -2) + { + KillTimer(hwndDlg, 1); + msgbox_data->m_iCountdown = -2; + DisplayCharsCount(msgbox_data, hwndDlg); + } + switch (HIWORD(wParam)) + { + case EN_CHANGE: + DisplayCharsCount(msgbox_data, hwndDlg); + SendMessage(msgbox_data->recent_cbex, CB_SETCURSEL, -1, 0); + if ((msgbox_data->m_iDlgFlags & DLG_SHOW_BUTTONS) || (msgbox_data->m_iDlgFlags & DLG_SHOW_BUTTONS_FLAT)) + { + TCHAR msg[1024]; + + if (IsWindowEnabled(GetDlgItem(hwndDlg, IDC_BDEL))) + EnableWindow(GetDlgItem(hwndDlg, IDC_BDEL), FALSE); + + if (!GetDlgItemText(hwndDlg, IDC_EDIT1, msg, SIZEOF(msg))) + { + if (IsWindowEnabled(GetDlgItem(hwndDlg, IDC_BADD))) + EnableWindow(GetDlgItem(hwndDlg, IDC_BADD), FALSE); + } + else if (!IsWindowEnabled(GetDlgItem(hwndDlg, IDC_BADD))) + EnableWindow(GetDlgItem(hwndDlg, IDC_BADD), TRUE); + } + break; + } + break; + } + + if ((HWND)lParam == msgbox_data->status_cbex) + { + if (msgbox_data->m_iCountdown > -2) + { + KillTimer(hwndDlg, 1); + msgbox_data->m_iCountdown = -2; + DisplayCharsCount(msgbox_data, hwndDlg); + } + switch (HIWORD(wParam)) + { + case CBN_SELENDOK: + case CBN_SELCHANGE: + { + COMBOBOXEXITEM cbitem = {0}; + + cbitem.mask = CBEIF_LPARAM; + cbitem.iItem = SendMessage(msgbox_data->status_cbex, CB_GETCURSEL, 0, 0); + SendMessage(msgbox_data->status_cbex, CBEM_GETITEM, 0, (LPARAM)&cbitem); + + msgbox_data->m_iStatus = cbitem.lParam; + ChangeDlgStatus(hwndDlg, msgbox_data, (int)cbitem.lParam); + + if (HIWORD(wParam) == CBN_SELENDOK && IsWindowEnabled(GetDlgItem(hwndDlg, IDC_EDIT1))) + SetFocus(GetDlgItem(hwndDlg, IDC_EDIT1)); + break; + } + } + } + + if ((HWND)lParam == msgbox_data->recent_cbex) + { + if (msgbox_data->m_iCountdown > -2) + { + KillTimer(hwndDlg, 1); + msgbox_data->m_iCountdown = -2; + DisplayCharsCount(msgbox_data, hwndDlg); + } + switch (HIWORD(wParam)) + { + case CBN_SELENDOK: + { + TCHAR text[1024]; + int cur_sel = SendMessage(msgbox_data->recent_cbex, CB_GETCURSEL, 0, 0); + COMBOBOXEXITEM cbitem = {0}; + + cbitem.mask = CBEIF_LPARAM | CBEIF_TEXT; + cbitem.iItem = cur_sel; + cbitem.cchTextMax = SIZEOF(text); + cbitem.pszText = text; + + SendMessage(msgbox_data->recent_cbex, CBEM_GETITEM, 0, (LPARAM)&cbitem); + if (LOWORD(cbitem.lParam) == HISTORY_MSG || LOWORD(cbitem.lParam) == PREDEFINED_MSG || LOWORD(cbitem.lParam) == DEFAULT_MSG) + { + SetDlgItemText(hwndDlg, IDC_EDIT1, text); + DisplayCharsCount(msgbox_data, hwndDlg); + if ((msgbox_data->m_iDlgFlags & DLG_SHOW_BUTTONS) || (msgbox_data->m_iDlgFlags & DLG_SHOW_BUTTONS_FLAT)) + { + if (!IsWindowEnabled(GetDlgItem(hwndDlg, IDC_BDEL))) + EnableWindow(GetDlgItem(hwndDlg, IDC_BDEL), TRUE); + if (LOWORD(cbitem.lParam) == PREDEFINED_MSG) + { + if (IsWindowEnabled(GetDlgItem(hwndDlg, IDC_BADD))) + EnableWindow(GetDlgItem(hwndDlg, IDC_BADD), FALSE); + } + else if (!IsWindowEnabled(GetDlgItem(hwndDlg, IDC_BADD))) + EnableWindow(GetDlgItem(hwndDlg, IDC_BADD), TRUE); + } + } + else if (LOWORD(cbitem.lParam) == CLEAR_HISTORY) + { + if (MessageBox(NULL, TranslateT("Are you sure you want to clear status message history?"), TranslateT("Confirm clearing history"), MB_ICONQUESTION | MB_YESNO) == IDYES) + { + ClearHistory(msgbox_data, cur_sel); + } + else if (IsWindowEnabled(GetDlgItem(hwndDlg, IDC_EDIT1))) + { + TCHAR msg[1024]; + int fcursel = CB_ERR, num_start; + num_start = SendMessage(msgbox_data->recent_cbex, CB_GETCOUNT, 0, 0); + num_start -= msgbox_data->num_def_msgs + 1; + GetDlgItemText(hwndDlg, IDC_EDIT1, msg, SIZEOF(msg)); + fcursel = SendMessage(msgbox_data->recent_cbex, CB_FINDSTRINGEXACT, num_start, (LPARAM)msg); + SendMessage(msgbox_data->recent_cbex, CB_SETCURSEL, fcursel, 0); + } + } + else if (LOWORD(cbitem.lParam) == DELETE_SELECTED) + { + COMBOBOXEXITEM histitem = {0}; + BOOL scursel = FALSE; + + histitem.mask = CBEIF_LPARAM; + histitem.iItem = msgbox_data->curr_sel_msg; + SendMessage(msgbox_data->recent_cbex, CBEM_GETITEM, 0, (LPARAM)&histitem); + + if (LOWORD(histitem.lParam) == HISTORY_MSG) + { + char szSetting[16]; + mir_snprintf(szSetting, SIZEOF(szSetting), "SMsg%d", (int)HIWORD(histitem.lParam)); + DBWriteContactSettingTString(NULL, "SimpleStatusMsg", szSetting, _T("")); + SendMessage(msgbox_data->recent_cbex, CBEM_DELETEITEM, (WPARAM)msgbox_data->curr_sel_msg, 0); + } + if (LOWORD(histitem.lParam) == PREDEFINED_MSG) + { + msgbox_data->m_bPredefChanged = TRUE; + SendMessage(msgbox_data->recent_cbex, CBEM_DELETEITEM, (WPARAM)msgbox_data->curr_sel_msg, 0); + } + + cur_sel = msgbox_data->curr_sel_msg; + while (!scursel) + { + if (cur_sel - 1 >= 0) + cur_sel--; + else + { + scursel = TRUE; + break; + } + histitem.mask = CBEIF_LPARAM; + histitem.iItem = cur_sel; + SendMessage(msgbox_data->recent_cbex, CBEM_GETITEM, 0, (LPARAM)&histitem); + + if ((LOWORD(histitem.lParam) != CLEAR_HISTORY) && (LOWORD(histitem.lParam) != DELETE_SELECTED) && (LOWORD(histitem.lParam) != ADD_MSG)) + scursel = TRUE; + } + msgbox_data->curr_sel_msg = cur_sel; + SendMessage(msgbox_data->recent_cbex, CB_SETCURSEL, (WPARAM)cur_sel, 0); + + histitem.mask = CBEIF_LPARAM | CBEIF_TEXT; + histitem.iItem = cur_sel; + histitem.cchTextMax = SIZEOF(text); + histitem.pszText = text; + + SendMessage(msgbox_data->recent_cbex, CBEM_GETITEM, 0, (LPARAM)&histitem); + if (LOWORD(histitem.lParam) == HISTORY_MSG || LOWORD(histitem.lParam) == PREDEFINED_MSG || LOWORD(histitem.lParam) == DEFAULT_MSG) + { + SetDlgItemText(hwndDlg, IDC_EDIT1, text); + DisplayCharsCount(msgbox_data, hwndDlg); + } + } + else if (LOWORD(cbitem.lParam) == ADD_MSG) + { + int sel = AddToPredefined(hwndDlg, msgbox_data); + if (sel != -1) + { + SendMessage(msgbox_data->recent_cbex, CB_SETCURSEL, (WPARAM)sel, 0); + msgbox_data->curr_sel_msg = sel; + } + else + SendMessage(msgbox_data->recent_cbex, CB_SETCURSEL, (WPARAM)msgbox_data->curr_sel_msg, 0); + break; + } + msgbox_data->curr_sel_msg = cur_sel; + + if (IsWindowEnabled(GetDlgItem(hwndDlg, IDC_EDIT1))) + { + SetFocus(GetDlgItem(hwndDlg, IDC_EDIT1)); + SendMessage(GetDlgItem(hwndDlg, IDC_EDIT1), EM_SETSEL, 0, -1); + } + break; + } + } + } + + if ((HWND)lParam == GetDlgItem(hwndDlg, IDC_BADD)) + { + switch (HIWORD(wParam)) + { + case BN_CLICKED: + { + int sel = AddToPredefined(hwndDlg, msgbox_data); + if (sel != -1) + { + if (!IsWindowEnabled(msgbox_data->recent_cbex)) + EnableWindow(msgbox_data->recent_cbex, TRUE); + if (!IsWindowEnabled(GetDlgItem(hwndDlg, IDC_BDEL))) + EnableWindow(GetDlgItem(hwndDlg, IDC_BDEL), TRUE); + if (IsWindowEnabled(GetDlgItem(hwndDlg, IDC_BADD))) + EnableWindow(GetDlgItem(hwndDlg, IDC_BADD), FALSE); + + SendMessage(msgbox_data->recent_cbex, CB_SETCURSEL, (WPARAM)sel, 0); + msgbox_data->curr_sel_msg = sel; + } + break; + } + } + } + + if ((HWND)lParam == GetDlgItem(hwndDlg, IDC_BCLEAR)) + { + switch (HIWORD(wParam)) + { + case BN_CLICKED: + if (MessageBox(NULL, TranslateT("Are you sure you want to clear status message history?"), TranslateT("Confirm clearing history"), MB_ICONQUESTION | MB_YESNO) == IDYES) + { + ClearHistory(msgbox_data, 0); + + int num_items = SendMessage(msgbox_data->recent_cbex, CB_GETCOUNT, 0, 0); + if (!num_items) + { + if (IsWindowEnabled(msgbox_data->recent_cbex)) + { + EnableWindow(GetDlgItem(hwndDlg, IDC_BDEL), FALSE); + EnableWindow(msgbox_data->recent_cbex, FALSE); + } + } + EnableWindow(GetDlgItem(hwndDlg, IDC_BCLEAR), FALSE); + } + break; + } + } + + if ((HWND)lParam == GetDlgItem(hwndDlg, IDC_BDEL)) + { + switch (HIWORD(wParam)) + { + case BN_CLICKED: + { + int cur_sel; + char buff[16]; + int left_items = 0; + COMBOBOXEXITEM histitem = {0}; + + cur_sel = SendMessage(msgbox_data->recent_cbex, CB_GETCURSEL, 0, 0); + + histitem.mask = CBEIF_LPARAM; + histitem.iItem = msgbox_data->curr_sel_msg; + + SendMessage(msgbox_data->recent_cbex, CBEM_GETITEM, 0, (LPARAM)&histitem); + + if (LOWORD(histitem.lParam) == HISTORY_MSG) + { + mir_snprintf(buff, SIZEOF(buff), "SMsg%d", (int)HIWORD(histitem.lParam)); + DBWriteContactSettingTString(NULL, "SimpleStatusMsg", buff, _T("")); + } + else if (LOWORD(histitem.lParam) == PREDEFINED_MSG) + { + msgbox_data->m_bPredefChanged = TRUE; + } + left_items = SendMessage(msgbox_data->recent_cbex, CBEM_DELETEITEM, (WPARAM)msgbox_data->curr_sel_msg, 0); + + if (!left_items) + { + if (IsWindowEnabled(msgbox_data->recent_cbex)) + EnableWindow(msgbox_data->recent_cbex, FALSE); + if (IsWindowEnabled(GetDlgItem(hwndDlg, IDC_BCLEAR))) + EnableWindow(GetDlgItem(hwndDlg, IDC_BCLEAR), FALSE); + EnableWindow(GetDlgItem(hwndDlg, IDC_BDEL), FALSE); + } + else + { + TCHAR text[1024]; + + if (cur_sel - 1 >= 0) + cur_sel--; + msgbox_data->curr_sel_msg = cur_sel; + SendMessage(msgbox_data->recent_cbex, CB_SETCURSEL, (WPARAM)cur_sel, 0); + + histitem.mask = CBEIF_LPARAM | CBEIF_TEXT; + histitem.iItem = cur_sel; + histitem.cchTextMax = SIZEOF(text); + histitem.pszText = text; + + SendMessage(msgbox_data->recent_cbex, CBEM_GETITEM, 0, (LPARAM)&histitem); + if (LOWORD(histitem.lParam) == HISTORY_MSG || LOWORD(histitem.lParam) == PREDEFINED_MSG || LOWORD(histitem.lParam) == DEFAULT_MSG) + { + SetDlgItemText(hwndDlg, IDC_EDIT1, text); + DisplayCharsCount(msgbox_data, hwndDlg); + EnableWindow(GetDlgItem(hwndDlg, IDC_BADD), LOWORD(histitem.lParam) == PREDEFINED_MSG ? FALSE : TRUE); + } + } + break; + } + } + } + break; + + case DM_SIMPAWAY_SHUTDOWN: + DestroyWindow(hwndDlg); + break; + + case DM_SIMPAWAY_CHANGEICONS: + ReleaseIconEx("cross"); + ReleaseIconEx("recent"); + ReleaseIconEx("predef"); + ReleaseIconEx("add"); + ReleaseIconEx("clear"); + msgbox_data->icon[I_ICON_DEL] = LoadIconEx("cross"); + msgbox_data->icon[I_ICON_HIST] = LoadIconEx("recent"); + msgbox_data->icon[I_ICON_MSG] = LoadIconEx("predef"); + msgbox_data->icon[I_ICON_ADD] = LoadIconEx("add"); + msgbox_data->icon[I_ICON_CLEAR] = LoadIconEx("clear"); + if (msgbox_data->m_iDlgFlags & DLG_SHOW_LIST_ICONS) + { + for (int i = 0; i < 5; ++i) + ImageList_ReplaceIcon(msgbox_data->other_icons, i, msgbox_data->icon[i]); + } + if ((msgbox_data->m_iDlgFlags & DLG_SHOW_BUTTONS) || (msgbox_data->m_iDlgFlags & DLG_SHOW_BUTTONS_FLAT)) + { + SendMessage(GetDlgItem(hwndDlg, IDC_BADD), BM_SETIMAGE, IMAGE_ICON, (LPARAM)msgbox_data->icon[I_ICON_ADD]); + SendMessage(GetDlgItem(hwndDlg, IDC_BCLEAR), BM_SETIMAGE, IMAGE_ICON, (LPARAM)msgbox_data->icon[I_ICON_CLEAR]); + SendMessage(GetDlgItem(hwndDlg, IDC_BDEL), BM_SETIMAGE, IMAGE_ICON, (LPARAM)msgbox_data->icon[I_ICON_DEL]); + } + break; + + case WM_DESTROY: + { + WINDOWPLACEMENT wp; + wp.length = sizeof(wp); + GetWindowPlacement(hwndDlg, &wp); + DBWriteContactSettingDword(NULL, "SimpleStatusMsg", "Winx", wp.rcNormalPosition.left); + DBWriteContactSettingDword(NULL, "SimpleStatusMsg", "Winy", wp.rcNormalPosition.top); + + if (msgbox_data->m_bPredefChanged) + { + int i, num_items, new_num_def_msgs = 0; + COMBOBOXEXITEM cbitem = {0}; + TCHAR text[1024]; + char buff[64]; + + num_items = SendMessage(msgbox_data->recent_cbex, CB_GETCOUNT, 0, 0); + num_items--; + for (i = 1; i <= msgbox_data->num_def_msgs; i++) + { + cbitem.mask = CBEIF_LPARAM|CBEIF_TEXT; + cbitem.iItem = num_items; + cbitem.cchTextMax = SIZEOF(text); + cbitem.pszText = text; + + SendMessage(msgbox_data->recent_cbex, CBEM_GETITEM, 0, (LPARAM)&cbitem); + mir_snprintf(buff, SIZEOF(buff), "DefMsg%d", i); + if (LOWORD(cbitem.lParam) == PREDEFINED_MSG) + { + new_num_def_msgs++; + DBWriteContactSettingTString(NULL, "SimpleStatusMsg", buff, text); + } + else + DBDeleteContactSetting(NULL, "SimpleStatusMsg", buff); + num_items--; + } + DBWriteContactSettingWord(NULL, "SimpleStatusMsg", "DefMsgCount", (WORD)new_num_def_msgs); + } + + ImageList_Destroy(msgbox_data->status_icons); + ImageList_Destroy(msgbox_data->other_icons); + ReleaseIconEx("cross"); + ReleaseIconEx("recent"); + ReleaseIconEx("predef"); + ReleaseIconEx("add"); + ReleaseIconEx("clear"); + CallService(MS_SKIN2_RELEASEICON, (WPARAM)SendMessage(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)NULL), 0); + CallService(MS_SKIN2_RELEASEICON, (WPARAM)SendMessage(hwndDlg, WM_SETICON, ICON_SMALL, (LPARAM)NULL), 0); + + SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_EDIT1), GWLP_WNDPROC, (LONG_PTR)MainDlgProc); + if (msgbox_data) + mir_free(msgbox_data); + hwndSAMsgDialog = NULL; + break; + } + } + return FALSE; +} diff --git a/plugins/SimpleStatusMsg/src/options.cpp b/plugins/SimpleStatusMsg/src/options.cpp new file mode 100644 index 0000000000..cc450c12e4 --- /dev/null +++ b/plugins/SimpleStatusMsg/src/options.cpp @@ -0,0 +1,1750 @@ +/* + +Simple Status Message plugin for Miranda IM +Copyright (C) 2006-2011 Bartosz 'Dezeath' Bia³ek, (C) 2005 Harven + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License along +with this program; if not, write to the Free Software Foundation, Inc., +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +*/ +#include "commonheaders.h" +#include "simplestatusmsg.h" + +extern UINT_PTR g_uUpdateMsgTimer; +extern VOID CALLBACK UpdateMsgTimerProc(HWND, UINT, UINT_PTR, DWORD); +extern VOID APIENTRY HandlePopupMenu(HWND hwnd, POINT pt, HWND edit_control); + +static WNDPROC OldDlgProc; + +static void RebuildStatusMenu(void) +{ + CLIST_INTERFACE* pcli = (CLIST_INTERFACE*)CallService(MS_CLIST_RETRIEVE_INTERFACE, 0, 0); + if (pcli && pcli->version > 4) + pcli->pfnReloadProtoMenus(); +} + +static LRESULT CALLBACK OptEditBoxSubProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) +{ + switch (uMsg) + { + case WM_CONTEXTMENU: + { + POINT pt = {(LONG)LOWORD(lParam), (LONG)HIWORD(lParam)}; + RECT rc; + GetClientRect(hwndDlg, &rc); + + if (pt.x == -1 && pt.y == -1) + { + GetCursorPos(&pt); + if (!PtInRect(&rc, pt)) + { + pt.x = rc.left + (rc.right - rc.left) / 2; + pt.y = rc.top + (rc.bottom - rc.top) / 2; + } + } + else + ScreenToClient(hwndDlg, &pt); + + if (PtInRect(&rc, pt)) + HandlePopupMenu(hwndDlg, pt, GetDlgItem(GetParent(hwndDlg), IDC_OPTEDIT1)); + + return 0; + } + + case WM_CHAR: + if (wParam == 1 && GetKeyState(VK_CONTROL) & 0x8000) // Ctrl + A + { + SendMessage(hwndDlg, EM_SETSEL, 0, -1); + return 0; + } + if (wParam == 127 && GetKeyState(VK_CONTROL) & 0x8000) // Ctrl + Backspace + { + DWORD start, end; + TCHAR *text; + int textLen; + SendMessage(hwndDlg, EM_GETSEL, (WPARAM)&end, (LPARAM)(PDWORD)NULL); + SendMessage(hwndDlg, WM_KEYDOWN, VK_LEFT, 0); + SendMessage(hwndDlg, EM_GETSEL, (WPARAM)&start, (LPARAM)(PDWORD)NULL); + textLen = GetWindowTextLength(hwndDlg); + text = (TCHAR *)mir_alloc(sizeof(TCHAR) * (textLen + 1)); + GetWindowText(hwndDlg, text, textLen + 1); + MoveMemory(text + start, text + end, sizeof(TCHAR) * (textLen + 1 - end)); + SetWindowText(hwndDlg, text); + mir_free(text); + SendMessage(hwndDlg, EM_SETSEL, start, start); + SendMessage(GetParent(hwndDlg), WM_COMMAND, MAKEWPARAM(GetDlgCtrlID(hwndDlg), EN_CHANGE), (LPARAM)hwndDlg); + return 0; + } + break; + } + + return CallWindowProc(OldDlgProc, hwndDlg, uMsg, wParam, lParam); +} + +struct SingleProtoMsg +{ + int flags; + TCHAR *msg; + int max_length; +}; + +struct SingleStatusMsg +{ + int flags[9]; + TCHAR msg[9][1024]; +}; + +struct OptDlgData +{ + BOOL proto_ok; + struct SingleProtoMsg *proto_msg; + struct SingleStatusMsg *status_msg; +}; + +static INT_PTR CALLBACK DlgOptionsProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) +{ + struct OptDlgData *data = (struct OptDlgData *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA); + + switch (uMsg) + { + case WM_INITDIALOG: + { + int val, i, index; + DBVARIANT dbv; + + TranslateDialogDefault(hwndDlg); + + data = (struct OptDlgData *)mir_alloc(sizeof(struct OptDlgData)); + SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)data); + + SendDlgItemMessage(hwndDlg, IDC_OPTEDIT1, EM_LIMITTEXT, 1024, 0); + SendMessage(GetDlgItem(hwndDlg, IDC_SMAXLENGTH), UDM_SETBUDDY, (WPARAM)GetDlgItem(hwndDlg, IDC_EMAXLENGTH), 0); + SendMessage(GetDlgItem(hwndDlg, IDC_SMAXLENGTH), UDM_SETRANGE32, 1, 1024); + SendMessage(GetDlgItem(hwndDlg, IDC_EMAXLENGTH), EM_LIMITTEXT, 4, 0); + + data->status_msg = (struct SingleStatusMsg *)mir_alloc(sizeof(struct SingleStatusMsg)*(accounts->count + 1)); + + for (i = ID_STATUS_ONLINE; i <= ID_STATUS_OUTTOLUNCH; i++) + { + if (accounts->statusMsgFlags & Proto_Status2Flag(i)) + { + index = SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTSTATUS), CB_INSERTSTRING, -1, (LPARAM)CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, i, GSMDF_TCHAR)); + if (index != CB_ERR && index != CB_ERRSPACE) + { + int j; + char setting[80]; + + SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTSTATUS), CB_SETITEMDATA, (WPARAM)index, (LPARAM)i - ID_STATUS_ONLINE); + + val = DBGetContactSettingByte(NULL, "SimpleStatusMsg", (char *)StatusModeToDbSetting(i, "Flags"), STATUS_DEFAULT); + data->status_msg[0].flags[i - ID_STATUS_ONLINE] = val; + if (DBGetContactSettingTString(NULL, "SRAway", StatusModeToDbSetting(i, "Default"), &dbv)) + dbv.ptszVal = mir_tstrdup(GetDefaultMessage(i)); + lstrcpy(data->status_msg[0].msg[i - ID_STATUS_ONLINE], dbv.ptszVal); + mir_free(dbv.ptszVal); + DBFreeVariant(&dbv); + + for (j = 0; j < accounts->count; j++) + { + if (!IsAccountEnabled(accounts->pa[j]) || !CallProtoService(accounts->pa[j]->szModuleName, PS_GETCAPS, PFLAGNUM_3, 0) || !(CallProtoService(accounts->pa[j]->szModuleName, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_MODEMSGSEND)) + continue; + + mir_snprintf(setting, SIZEOF(setting), "%sFlags", accounts->pa[j]->szModuleName); + val = DBGetContactSettingByte(NULL, "SimpleStatusMsg", (char *)StatusModeToDbSetting(i, setting), STATUS_DEFAULT); + data->status_msg[j+1].flags[i-ID_STATUS_ONLINE] = val; + mir_snprintf(setting, SIZEOF(setting), "%sDefault", accounts->pa[j]->szModuleName); + if (DBGetContactSettingTString(NULL, "SRAway", StatusModeToDbSetting(i, setting), &dbv)) + dbv.ptszVal = mir_tstrdup(GetDefaultMessage(i)); + lstrcpy(data->status_msg[j + 1].msg[i - ID_STATUS_ONLINE], dbv.ptszVal); + mir_free(dbv.ptszVal); + DBFreeVariant(&dbv); + } + } + } + } + SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTSTATUS), CB_SETCURSEL, 0, 0); + + data->proto_msg = (struct SingleProtoMsg *)mir_alloc(sizeof(struct SingleProtoMsg)*(accounts->count + 1)); + if (!data->proto_msg) + { + // TODO not really needed? + EnableWindow(GetDlgItem(hwndDlg, IDC_CBOPTPROTO), FALSE); + EnableWindow(GetDlgItem(hwndDlg, IDC_BOPTPROTO), FALSE); + EnableWindow(GetDlgItem(hwndDlg, IDC_ROPTPROTO1), FALSE); + EnableWindow(GetDlgItem(hwndDlg, IDC_ROPTPROTO2), FALSE); + EnableWindow(GetDlgItem(hwndDlg, IDC_ROPTPROTO3), FALSE); + EnableWindow(GetDlgItem(hwndDlg, IDC_ROPTPROTO4), FALSE); + data->proto_ok = FALSE; + } + else + { + char setting[64]; + + data->proto_ok = TRUE; + + index = SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTPROTO), CB_ADDSTRING, 0, (LPARAM)TranslateT("Global status change")); +// SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTPROTO), CB_SETITEMDATA, index, 0); + if (index != CB_ERR && index != CB_ERRSPACE) + { + data->proto_msg[0].msg = NULL; + + val = DBGetContactSettingByte(NULL, "SimpleStatusMsg", "ProtoFlags", PROTO_DEFAULT); + data->proto_msg[0].flags = val; + data->proto_msg[0].max_length = 0; + SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTPROTO), CB_SETITEMDATA, (WPARAM)index, 0); + } + + for (i = 0; i < accounts->count; ++i) + { + if (!IsAccountEnabled(accounts->pa[i]) + || !CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_3, 0) + || !(CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_MODEMSGSEND)) + { + data->proto_msg[i+1].msg = NULL; + continue; + } + + index = SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTPROTO), CB_ADDSTRING, 0, (LPARAM)accounts->pa[i]->tszAccountName); +// SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTPROTO), CB_SETITEMDATA, index, (LPARAM)i + 1); + if (index != CB_ERR && index != CB_ERRSPACE) + { + mir_snprintf(setting, SIZEOF(setting), "Proto%sDefault", accounts->pa[i]->szModuleName); + if (!DBGetContactSettingTString(NULL, "SimpleStatusMsg", setting, &dbv)) + { + data->proto_msg[i+1].msg = mir_tstrdup(dbv.ptszVal); + DBFreeVariant(&dbv); + } + else + data->proto_msg[i+1].msg = NULL; + + mir_snprintf(setting, SIZEOF(setting), "Proto%sFlags", accounts->pa[i]->szModuleName); + val = DBGetContactSettingByte(NULL, "SimpleStatusMsg", setting, PROTO_DEFAULT); + data->proto_msg[i+1].flags = val; + mir_snprintf(setting, SIZEOF(setting), "Proto%sMaxLen", accounts->pa[i]->szModuleName); + val = DBGetContactSettingWord(NULL, "SimpleStatusMsg", setting, 1024); + data->proto_msg[i+1].max_length = val; + SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTPROTO), CB_SETITEMDATA, (WPARAM)index, (LPARAM)i + 1); + } + } + + if (accounts->statusMsgCount == 1) + { +// ShowWindow(GetDlgItem(hwndDlg, IDC_BOPTPROTO), SW_HIDE); + EnableWindow(GetDlgItem(hwndDlg, IDC_BOPTPROTO), FALSE); + EnableWindow(GetDlgItem(hwndDlg, IDC_CBOPTPROTO), FALSE); + SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTPROTO), CB_SETCURSEL, 1, 0); + } + else + SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTPROTO), CB_SETCURSEL, 0, 0); + + SendMessage(hwndDlg, WM_COMMAND, MAKEWPARAM(IDC_CBOPTPROTO, CBN_SELCHANGE), (LPARAM)GetDlgItem(hwndDlg, IDC_CBOPTPROTO)); + } + + if (DBGetContactSettingByte(NULL, "SimpleStatusMsg", "PutDefInList", 0)) + CheckDlgButton(hwndDlg, IDC_COPTMSG2, BST_CHECKED); + + if (ServiceExists(MS_VARS_FORMATSTRING)) + { + HICON hIcon=NULL; + char *szTipInfo=NULL; + + if (ServiceExists(MS_VARS_GETSKINITEM)) + { + hIcon = (HICON)CallService(MS_VARS_GETSKINITEM, 0, VSI_HELPICON); + szTipInfo = (char *)CallService(MS_VARS_GETSKINITEM, 0, VSI_HELPTIPTEXT); + } + + if (hIcon != NULL) + SendMessage(GetDlgItem(hwndDlg, IDC_VARSHELP), BM_SETIMAGE, IMAGE_ICON, (LPARAM)hIcon); + else + SetDlgItemText(hwndDlg, IDC_VARSHELP, _T("V")); + + if (szTipInfo == NULL) + SendMessage(GetDlgItem(hwndDlg, IDC_VARSHELP), BUTTONADDTOOLTIP, (WPARAM)TranslateT("Open String Formatting Help"), 0); + else + SendMessage(GetDlgItem(hwndDlg, IDC_VARSHELP), BUTTONADDTOOLTIP, (WPARAM)szTipInfo, 0); + + SendDlgItemMessage(hwndDlg, IDC_VARSHELP, BUTTONSETASFLATBTN, TRUE, 0); + } + ShowWindow(GetDlgItem(hwndDlg, IDC_VARSHELP), ServiceExists(MS_VARS_FORMATSTRING)); + + OldDlgProc = (WNDPROC)SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_OPTEDIT1), GWLP_WNDPROC, (LONG_PTR)OptEditBoxSubProc); + + return TRUE; + } + + case WM_COMMAND: + if ( ( (HIWORD(wParam) == BN_CLICKED) || /*(HIWORD(wParam) == EN_KILLFOCUS) ||*/ (HIWORD(wParam) == EN_CHANGE) + || ( (HIWORD(wParam) == CBN_SELCHANGE) && (LOWORD(wParam) != IDC_CBOPTPROTO) && (LOWORD(wParam) != IDC_CBOPTSTATUS)) + ) && (HWND)lParam == GetFocus()) + SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0); + switch (LOWORD(wParam)) + { + case IDC_EMAXLENGTH: + switch (HIWORD(wParam)) + { + case EN_KILLFOCUS: + { + BOOL translated; + int val, i; + + val = GetDlgItemInt(hwndDlg, IDC_EMAXLENGTH, &translated, FALSE); + if (translated && val > 1024) + SetDlgItemInt(hwndDlg, IDC_EMAXLENGTH, 1024, FALSE); + if (translated && val < 1) + SetDlgItemInt(hwndDlg, IDC_EMAXLENGTH, 1, FALSE); + val = GetDlgItemInt(hwndDlg, IDC_EMAXLENGTH, &translated, FALSE); + + i = SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTPROTO), CB_GETITEMDATA, (WPARAM)SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTPROTO), CB_GETCURSEL, 0, 0), 0); + data->proto_msg[i].max_length = val; + break; + } + } + break; + + case IDC_CBOPTPROTO: + switch (HIWORD(wParam)) + { + case CBN_SELCHANGE: + case CBN_SELENDOK: + { + int i, j, l, k, status_modes = 0, newindex = 0; + + i = SendMessage((HWND)lParam, CB_GETITEMDATA, (WPARAM)SendMessage((HWND)lParam, CB_GETCURSEL, 0, 0), 0); + + if (i == 0) + { + EnableWindow(GetDlgItem(hwndDlg, IDC_MAXLENGTH), FALSE); + EnableWindow(GetDlgItem(hwndDlg, IDC_EMAXLENGTH), FALSE); + EnableWindow(GetDlgItem(hwndDlg, IDC_SMAXLENGTH), FALSE); + EnableWindow(GetDlgItem(hwndDlg, IDC_ROPTPROTO3), FALSE); + EnableWindow(GetDlgItem(hwndDlg, IDC_ROPTPROTO4), FALSE); + SetDlgItemInt(hwndDlg, IDC_EMAXLENGTH, 1024, FALSE); + + if (data->proto_msg[i].flags & PROTO_POPUPDLG) + CheckRadioButton(hwndDlg, IDC_ROPTPROTO1, IDC_ROPTPROTO4, IDC_ROPTPROTO1); + else if (data->proto_msg[i].flags & PROTO_NOCHANGE) + CheckRadioButton(hwndDlg, IDC_ROPTPROTO1, IDC_ROPTPROTO4, IDC_ROPTPROTO2); + } + else + { + EnableWindow(GetDlgItem(hwndDlg, IDC_MAXLENGTH), TRUE); + EnableWindow(GetDlgItem(hwndDlg, IDC_EMAXLENGTH), TRUE); + EnableWindow(GetDlgItem(hwndDlg, IDC_SMAXLENGTH), TRUE); + EnableWindow(GetDlgItem(hwndDlg, IDC_ROPTPROTO3), TRUE); + EnableWindow(GetDlgItem(hwndDlg, IDC_ROPTPROTO4), TRUE); + SetDlgItemInt(hwndDlg, IDC_EMAXLENGTH, data->proto_msg[i].max_length, FALSE); + + if (data->proto_msg[i].flags & PROTO_POPUPDLG) + CheckRadioButton(hwndDlg, IDC_ROPTPROTO1, IDC_ROPTPROTO4, IDC_ROPTPROTO1); + else if (data->proto_msg[i].flags & PROTO_NOCHANGE) + CheckRadioButton(hwndDlg, IDC_ROPTPROTO1, IDC_ROPTPROTO4, IDC_ROPTPROTO2); + else if (data->proto_msg[i].flags & PROTO_THIS_MSG) + CheckRadioButton(hwndDlg, IDC_ROPTPROTO1, IDC_ROPTPROTO4, IDC_ROPTPROTO3); + else if (data->proto_msg[i].flags & PROTO_NO_MSG) + CheckRadioButton(hwndDlg, IDC_ROPTPROTO1, IDC_ROPTPROTO4, IDC_ROPTPROTO4); + } + + if (data->proto_msg[i].flags & PROTO_NO_MSG || data->proto_msg[i].flags & PROTO_THIS_MSG + || data->proto_msg[i].flags & PROTO_NOCHANGE) + { + EnableWindow(GetDlgItem(hwndDlg, IDC_CBOPTSTATUS), FALSE); + EnableWindow(GetDlgItem(hwndDlg, IDC_BOPTSTATUS), FALSE); + EnableWindow(GetDlgItem(hwndDlg, IDC_COPTMSG1), FALSE); + + EnableWindow(GetDlgItem(hwndDlg, IDC_ROPTMSG1), FALSE); + EnableWindow(GetDlgItem(hwndDlg, IDC_ROPTMSG2), FALSE); + EnableWindow(GetDlgItem(hwndDlg, IDC_ROPTMSG3), FALSE); + EnableWindow(GetDlgItem(hwndDlg, IDC_ROPTMSG5), FALSE); + + if (data->proto_msg[i].flags & PROTO_NO_MSG || data->proto_msg[i].flags & PROTO_NOCHANGE) + { + EnableWindow(GetDlgItem(hwndDlg, IDC_ROPTMSG4), FALSE); + EnableWindow(GetDlgItem(hwndDlg, IDC_OPTEDIT1), FALSE); + EnableWindow(GetDlgItem(hwndDlg, IDC_VARSHELP), FALSE); + } + else + { + EnableWindow(GetDlgItem(hwndDlg, IDC_ROPTMSG4), TRUE); + EnableWindow(GetDlgItem(hwndDlg, IDC_OPTEDIT1), TRUE); + EnableWindow(GetDlgItem(hwndDlg, IDC_VARSHELP), TRUE); + } + + EnableWindow(GetDlgItem(hwndDlg, IDC_COPTMSG2), FALSE); + } + else + { + EnableWindow(GetDlgItem(hwndDlg, IDC_CBOPTSTATUS), TRUE); + EnableWindow(GetDlgItem(hwndDlg, IDC_BOPTSTATUS), TRUE); + EnableWindow(GetDlgItem(hwndDlg, IDC_COPTMSG1), TRUE); + + EnableWindow(GetDlgItem(hwndDlg, IDC_ROPTMSG1), TRUE); + EnableWindow(GetDlgItem(hwndDlg, IDC_ROPTMSG2), TRUE); + EnableWindow(GetDlgItem(hwndDlg, IDC_ROPTMSG3), TRUE); + EnableWindow(GetDlgItem(hwndDlg, IDC_ROPTMSG4), TRUE); + EnableWindow(GetDlgItem(hwndDlg, IDC_ROPTMSG5), TRUE); + + EnableWindow(GetDlgItem(hwndDlg, IDC_OPTEDIT1), FALSE); + EnableWindow(GetDlgItem(hwndDlg, IDC_VARSHELP), FALSE); + + EnableWindow(GetDlgItem(hwndDlg, IDC_COPTMSG2), TRUE); + } + + if (i) + { + k = i - 1; + status_modes = CallProtoService(accounts->pa[k]->szModuleName, PS_GETCAPS, PFLAGNUM_3, 0); + } + else + status_modes = accounts->statusMsgFlags; + + j = SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTSTATUS), CB_GETITEMDATA, (WPARAM)SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTSTATUS), CB_GETCURSEL, 0, 0), 0); + SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTSTATUS), CB_RESETCONTENT, 0, 0); + + for (l=ID_STATUS_ONLINE; l<=ID_STATUS_OUTTOLUNCH; l++) + { + int index; + if (status_modes & Proto_Status2Flag(l)) + { + index = SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTSTATUS), CB_INSERTSTRING, -1, (LPARAM)CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, l, GSMDF_TCHAR)); + + if (index != CB_ERR && index != CB_ERRSPACE) + { + SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTSTATUS), CB_SETITEMDATA, (WPARAM)index, (LPARAM)l - ID_STATUS_ONLINE); + if (j == l-ID_STATUS_ONLINE) + newindex=index; + } + } + } + + if (!newindex) + { + SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTSTATUS), CB_SETCURSEL, 0, 0); + j = SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTSTATUS), CB_GETITEMDATA, (WPARAM)SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTSTATUS), CB_GETCURSEL, 0, 0), 0); + } + else + SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTSTATUS), CB_SETCURSEL, (WPARAM)newindex, 0); + + if (data->status_msg[i].flags[j] & STATUS_SHOW_DLG) + CheckDlgButton(hwndDlg, IDC_COPTMSG1, BST_CHECKED); + else + CheckDlgButton(hwndDlg, IDC_COPTMSG1, BST_UNCHECKED); + + if (data->proto_msg[i].flags & PROTO_THIS_MSG) + { + CheckRadioButton(hwndDlg, IDC_ROPTMSG1, IDC_ROPTMSG5, IDC_ROPTMSG4); + if (data->proto_msg[i].msg) + SetDlgItemText(hwndDlg, IDC_OPTEDIT1, data->proto_msg[i].msg); + else + SetDlgItemText(hwndDlg, IDC_OPTEDIT1, _T("")); + } + else + { + if (data->status_msg[i].flags[j] & STATUS_EMPTY_MSG) + { + SetDlgItemText(hwndDlg, IDC_OPTEDIT1, _T("")); + EnableWindow(GetDlgItem(hwndDlg, IDC_OPTEDIT1), FALSE); + EnableWindow(GetDlgItem(hwndDlg, IDC_VARSHELP), FALSE); + CheckRadioButton(hwndDlg, IDC_ROPTMSG1, IDC_ROPTMSG5, IDC_ROPTMSG1); + } + else if (data->status_msg[i].flags[j] & STATUS_DEFAULT_MSG) + { + SetDlgItemText(hwndDlg, IDC_OPTEDIT1, GetDefaultMessage(j+ID_STATUS_ONLINE)); + EnableWindow(GetDlgItem(hwndDlg, IDC_OPTEDIT1), FALSE); + EnableWindow(GetDlgItem(hwndDlg, IDC_VARSHELP), FALSE); + CheckRadioButton(hwndDlg, IDC_ROPTMSG1, IDC_ROPTMSG5, IDC_ROPTMSG2); + } + else if (data->status_msg[i].flags[j] & STATUS_LAST_MSG) + { + char setting[80]; + DBVARIANT dbv, dbv2; + + if (i) + mir_snprintf(setting, SIZEOF(setting), "Last%sMsg", accounts->pa[k]->szModuleName); + else + mir_snprintf(setting, SIZEOF(setting), "LastMsg"); + + SetDlgItemText(hwndDlg, IDC_OPTEDIT1, _T("")); + if (!DBGetContactSetting(NULL, "SimpleStatusMsg", setting, &dbv)) + { + if (dbv.pszVal) + { + if (!DBGetContactSettingTString(NULL, "SimpleStatusMsg", dbv.pszVal, &dbv2) && strlen(dbv.pszVal)) + { + if ((dbv2.ptszVal) && (lstrlen(dbv2.ptszVal))) + SetDlgItemText(hwndDlg, IDC_OPTEDIT1, dbv2.ptszVal); + + DBFreeVariant(&dbv2); + } + } + DBFreeVariant(&dbv); + } + EnableWindow(GetDlgItem(hwndDlg, IDC_OPTEDIT1), FALSE); + EnableWindow(GetDlgItem(hwndDlg, IDC_VARSHELP), FALSE); + CheckRadioButton(hwndDlg, IDC_ROPTMSG1, IDC_ROPTMSG5, IDC_ROPTMSG3); + } + else if (data->status_msg[i].flags[j] & STATUS_THIS_MSG) + { + if (data->proto_msg[i].flags & PROTO_NO_MSG || data->proto_msg[i].flags & PROTO_NOCHANGE) + { + EnableWindow(GetDlgItem(hwndDlg, IDC_OPTEDIT1), FALSE); + EnableWindow(GetDlgItem(hwndDlg, IDC_VARSHELP), FALSE); + } + else + { + EnableWindow(GetDlgItem(hwndDlg, IDC_OPTEDIT1), TRUE); + EnableWindow(GetDlgItem(hwndDlg, IDC_VARSHELP), TRUE); + } + CheckRadioButton(hwndDlg, IDC_ROPTMSG1, IDC_ROPTMSG5, IDC_ROPTMSG4); + SetDlgItemText(hwndDlg, IDC_OPTEDIT1, data->status_msg[i].msg[j]); + } + else if (data->status_msg[i].flags[j] & STATUS_LAST_STATUS_MSG) + { + char setting[80]; + DBVARIANT dbv; + + if (i) + mir_snprintf(setting, SIZEOF(setting), "%sMsg", accounts->pa[k]->szModuleName); + else + mir_snprintf(setting, SIZEOF(setting), "Msg"); + + if (!DBGetContactSettingTString(NULL, "SRAway", StatusModeToDbSetting(j + ID_STATUS_ONLINE, setting), &dbv)) + { + SetDlgItemText(hwndDlg, IDC_OPTEDIT1, dbv.ptszVal); + DBFreeVariant(&dbv); + } + else + SetDlgItemText(hwndDlg, IDC_OPTEDIT1, _T("")); + + EnableWindow(GetDlgItem(hwndDlg, IDC_OPTEDIT1), FALSE); + EnableWindow(GetDlgItem(hwndDlg, IDC_VARSHELP), FALSE); + CheckRadioButton(hwndDlg, IDC_ROPTMSG1, IDC_ROPTMSG5, IDC_ROPTMSG5); + } + } + break; + } + } + break; + + case IDC_ROPTPROTO1: + case IDC_ROPTPROTO2: + case IDC_ROPTPROTO3: + case IDC_ROPTPROTO4: + switch (HIWORD(wParam)) + { + case BN_CLICKED: + { + int i, j; + + i = SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTPROTO), CB_GETITEMDATA, (WPARAM)SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTPROTO), CB_GETCURSEL, 0, 0), 0); + j = SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTSTATUS), CB_GETITEMDATA, (WPARAM)SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTSTATUS), CB_GETCURSEL, 0, 0), 0); + + data->proto_msg[i].flags = 0; + + if ((LOWORD(wParam) == IDC_ROPTPROTO2) || (LOWORD(wParam) == IDC_ROPTPROTO4)) + { + data->proto_msg[i].flags |= (LOWORD(wParam) == IDC_ROPTPROTO4) ? PROTO_NO_MSG : PROTO_NOCHANGE; + EnableWindow(GetDlgItem(hwndDlg, IDC_CBOPTSTATUS), FALSE); + EnableWindow(GetDlgItem(hwndDlg, IDC_BOPTSTATUS), FALSE); + EnableWindow(GetDlgItem(hwndDlg, IDC_COPTMSG1), FALSE); + + EnableWindow(GetDlgItem(hwndDlg, IDC_ROPTMSG1), FALSE); + EnableWindow(GetDlgItem(hwndDlg, IDC_ROPTMSG2), FALSE); + EnableWindow(GetDlgItem(hwndDlg, IDC_ROPTMSG3), FALSE); + EnableWindow(GetDlgItem(hwndDlg, IDC_ROPTMSG4), FALSE); + EnableWindow(GetDlgItem(hwndDlg, IDC_ROPTMSG5), FALSE); + + EnableWindow(GetDlgItem(hwndDlg, IDC_COPTMSG2), FALSE); + } + else if (LOWORD(wParam) == IDC_ROPTPROTO3) + { + data->proto_msg[i].flags |= PROTO_THIS_MSG; + EnableWindow(GetDlgItem(hwndDlg, IDC_OPTEDIT1), TRUE); + EnableWindow(GetDlgItem(hwndDlg, IDC_VARSHELP), TRUE); + if (data->proto_msg[i].msg) + SetDlgItemText(hwndDlg, IDC_OPTEDIT1, data->proto_msg[i].msg); + else + SetDlgItemText(hwndDlg, IDC_OPTEDIT1, _T("")); + EnableWindow(GetDlgItem(hwndDlg, IDC_CBOPTSTATUS), FALSE); + EnableWindow(GetDlgItem(hwndDlg, IDC_BOPTSTATUS), FALSE); + EnableWindow(GetDlgItem(hwndDlg, IDC_COPTMSG1), FALSE); + + EnableWindow(GetDlgItem(hwndDlg, IDC_ROPTMSG1), FALSE); + EnableWindow(GetDlgItem(hwndDlg, IDC_ROPTMSG2), FALSE); + EnableWindow(GetDlgItem(hwndDlg, IDC_ROPTMSG3), FALSE); + EnableWindow(GetDlgItem(hwndDlg, IDC_ROPTMSG4), TRUE); + EnableWindow(GetDlgItem(hwndDlg, IDC_ROPTMSG5), FALSE); + CheckRadioButton(hwndDlg, IDC_ROPTMSG1, IDC_ROPTMSG5, IDC_ROPTMSG4); + + EnableWindow(GetDlgItem(hwndDlg, IDC_COPTMSG2), FALSE); + } + else if (LOWORD(wParam) == IDC_ROPTPROTO1) + { + data->proto_msg[i].flags |= PROTO_POPUPDLG; + EnableWindow(GetDlgItem(hwndDlg, IDC_CBOPTSTATUS), TRUE); + EnableWindow(GetDlgItem(hwndDlg, IDC_BOPTSTATUS), TRUE); + EnableWindow(GetDlgItem(hwndDlg, IDC_COPTMSG1), TRUE); + + EnableWindow(GetDlgItem(hwndDlg, IDC_ROPTMSG1), TRUE); + EnableWindow(GetDlgItem(hwndDlg, IDC_ROPTMSG2), TRUE); + EnableWindow(GetDlgItem(hwndDlg, IDC_ROPTMSG3), TRUE); + EnableWindow(GetDlgItem(hwndDlg, IDC_ROPTMSG4), TRUE); + EnableWindow(GetDlgItem(hwndDlg, IDC_ROPTMSG5), TRUE); + + EnableWindow(GetDlgItem(hwndDlg, IDC_COPTMSG2), TRUE); + } + + if (LOWORD(wParam) != IDC_ROPTPROTO3) + { + if (data->status_msg[i].flags[j] & STATUS_EMPTY_MSG) + { + SetDlgItemText(hwndDlg, IDC_OPTEDIT1, _T("")); + EnableWindow(GetDlgItem(hwndDlg, IDC_OPTEDIT1), FALSE); + EnableWindow(GetDlgItem(hwndDlg, IDC_VARSHELP), FALSE); + CheckRadioButton(hwndDlg, IDC_ROPTMSG1, IDC_ROPTMSG5, IDC_ROPTMSG1); + } + else if (data->status_msg[i].flags[j] & STATUS_DEFAULT_MSG) + { + SetDlgItemText(hwndDlg, IDC_OPTEDIT1, GetDefaultMessage(j+ID_STATUS_ONLINE)); + EnableWindow(GetDlgItem(hwndDlg, IDC_OPTEDIT1), FALSE); + EnableWindow(GetDlgItem(hwndDlg, IDC_VARSHELP), FALSE); + CheckRadioButton(hwndDlg, IDC_ROPTMSG1, IDC_ROPTMSG5, IDC_ROPTMSG2); + } + else if (data->status_msg[i].flags[j] & STATUS_LAST_MSG) + { + char setting[80]; + DBVARIANT dbv, dbv2; + + if (i) + mir_snprintf(setting, SIZEOF(setting), "Last%sMsg", accounts->pa[i-1]->szModuleName); + else + mir_snprintf(setting, SIZEOF(setting), "LastMsg"); + + SetDlgItemText(hwndDlg, IDC_OPTEDIT1, _T("")); + if (!DBGetContactSetting(NULL, "SimpleStatusMsg", setting, &dbv)) + { + if (dbv.pszVal) + { + if (!DBGetContactSettingTString(NULL, "SimpleStatusMsg", dbv.pszVal, &dbv2) && strlen(dbv.pszVal)) + { + if (dbv2.ptszVal && lstrlen(dbv2.ptszVal)) + SetDlgItemText(hwndDlg, IDC_OPTEDIT1, dbv2.ptszVal); + DBFreeVariant(&dbv2); + } + } + DBFreeVariant(&dbv); + } + EnableWindow(GetDlgItem(hwndDlg, IDC_OPTEDIT1), FALSE); + EnableWindow(GetDlgItem(hwndDlg, IDC_VARSHELP), FALSE); + CheckRadioButton(hwndDlg, IDC_ROPTMSG1, IDC_ROPTMSG5, IDC_ROPTMSG3); + } + else if (data->status_msg[i].flags[j] & STATUS_THIS_MSG) + { + if ((LOWORD(wParam) == IDC_ROPTPROTO2) || (LOWORD(wParam) == IDC_ROPTPROTO4)) + { + EnableWindow(GetDlgItem(hwndDlg, IDC_OPTEDIT1), FALSE); + EnableWindow(GetDlgItem(hwndDlg, IDC_VARSHELP), FALSE); + } + else + { + EnableWindow(GetDlgItem(hwndDlg, IDC_OPTEDIT1), TRUE); + EnableWindow(GetDlgItem(hwndDlg, IDC_VARSHELP), TRUE); + } + CheckRadioButton(hwndDlg, IDC_ROPTMSG1, IDC_ROPTMSG5, IDC_ROPTMSG4); + SetDlgItemText(hwndDlg, IDC_OPTEDIT1, data->status_msg[i].msg[j]); + } + else if (data->status_msg[i].flags[j] & STATUS_LAST_STATUS_MSG) + { + char setting[80]; + DBVARIANT dbv; + + if (i) + mir_snprintf(setting, SIZEOF(setting), "%sMsg", accounts->pa[i-1]->szModuleName); + else + mir_snprintf(setting, SIZEOF(setting), "Msg"); + + if (!DBGetContactSettingTString(NULL, "SRAway", StatusModeToDbSetting(j + ID_STATUS_ONLINE, setting), &dbv)) + { + SetDlgItemText(hwndDlg, IDC_OPTEDIT1, dbv.ptszVal); + DBFreeVariant(&dbv); + } + else + SetDlgItemText(hwndDlg, IDC_OPTEDIT1, _T("")); + + EnableWindow(GetDlgItem(hwndDlg, IDC_OPTEDIT1), FALSE); + EnableWindow(GetDlgItem(hwndDlg, IDC_VARSHELP), FALSE); + CheckRadioButton(hwndDlg, IDC_ROPTMSG1, IDC_ROPTMSG5, IDC_ROPTMSG5); + } + } + break; + } + } + break; + + case IDC_CBOPTSTATUS: + switch (HIWORD(wParam)) + { + case CBN_SELCHANGE: + case CBN_SELENDOK: + { + int i, j; + + i = SendMessage((HWND)lParam, CB_GETITEMDATA, (WPARAM)SendMessage((HWND)lParam, CB_GETCURSEL, 0, 0), 0); + j = SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTPROTO), CB_GETITEMDATA, (WPARAM)SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTPROTO), CB_GETCURSEL, 0, 0), 0); + + if (data->status_msg[j].flags[i] & STATUS_SHOW_DLG) + CheckDlgButton(hwndDlg, IDC_COPTMSG1, BST_CHECKED); + else + CheckDlgButton(hwndDlg, IDC_COPTMSG1, BST_UNCHECKED); + + if (data->status_msg[j].flags[i] & STATUS_EMPTY_MSG) + { + SetDlgItemText(hwndDlg, IDC_OPTEDIT1, _T("")); + EnableWindow(GetDlgItem(hwndDlg, IDC_OPTEDIT1), FALSE); + EnableWindow(GetDlgItem(hwndDlg, IDC_VARSHELP), FALSE); + CheckRadioButton(hwndDlg, IDC_ROPTMSG1, IDC_ROPTMSG5, IDC_ROPTMSG1); + } + else if (data->status_msg[j].flags[i] & STATUS_DEFAULT_MSG) + { + SetDlgItemText(hwndDlg, IDC_OPTEDIT1, GetDefaultMessage(i+ID_STATUS_ONLINE)); + EnableWindow(GetDlgItem(hwndDlg, IDC_OPTEDIT1), FALSE); + EnableWindow(GetDlgItem(hwndDlg, IDC_VARSHELP), FALSE); + CheckRadioButton(hwndDlg, IDC_ROPTMSG1, IDC_ROPTMSG5, IDC_ROPTMSG2); + } + else if (data->status_msg[j].flags[i] & STATUS_LAST_MSG) + { + char setting[80]; + DBVARIANT dbv,dbv2; + + if (j) + mir_snprintf(setting, SIZEOF(setting), "Last%sMsg", accounts->pa[j-1]->szModuleName); + else + mir_snprintf(setting, SIZEOF(setting), "LastMsg"); + + SetDlgItemText(hwndDlg, IDC_OPTEDIT1, _T("")); + if (!DBGetContactSetting(NULL, "SimpleStatusMsg", setting, &dbv)) + { + if (dbv.pszVal) + { + if (!DBGetContactSettingTString(NULL, "SimpleStatusMsg", dbv.pszVal, &dbv2) && strlen(dbv.pszVal)) + { + if (dbv2.ptszVal && lstrlen(dbv2.ptszVal)) + SetDlgItemText(hwndDlg, IDC_OPTEDIT1, dbv2.ptszVal); + DBFreeVariant(&dbv2); + } + } + DBFreeVariant(&dbv); + } + EnableWindow(GetDlgItem(hwndDlg, IDC_OPTEDIT1), FALSE); + EnableWindow(GetDlgItem(hwndDlg, IDC_VARSHELP), FALSE); + CheckRadioButton(hwndDlg, IDC_ROPTMSG1, IDC_ROPTMSG5, IDC_ROPTMSG3); + } + else if (data->status_msg[j].flags[i] & STATUS_THIS_MSG) + { + EnableWindow(GetDlgItem(hwndDlg, IDC_OPTEDIT1), TRUE); + EnableWindow(GetDlgItem(hwndDlg, IDC_VARSHELP), TRUE); + CheckRadioButton(hwndDlg, IDC_ROPTMSG1, IDC_ROPTMSG5, IDC_ROPTMSG4); + SetDlgItemText(hwndDlg, IDC_OPTEDIT1, data->status_msg[j].msg[i]); + } + else if (data->status_msg[j].flags[i] & STATUS_LAST_STATUS_MSG) + { + char setting[80]; + DBVARIANT dbv; + + if (j) + mir_snprintf(setting, SIZEOF(setting), "%sMsg", accounts->pa[j-1]->szModuleName); + else + mir_snprintf(setting, SIZEOF(setting), "Msg"); + + if (!DBGetContactSettingTString(NULL, "SRAway", StatusModeToDbSetting(i + ID_STATUS_ONLINE, setting), &dbv)) + { + SetDlgItemText(hwndDlg, IDC_OPTEDIT1, dbv.ptszVal); + DBFreeVariant(&dbv); + } + else + SetDlgItemText(hwndDlg, IDC_OPTEDIT1, _T("")); + + EnableWindow(GetDlgItem(hwndDlg, IDC_OPTEDIT1), FALSE); + EnableWindow(GetDlgItem(hwndDlg, IDC_VARSHELP), FALSE); + CheckRadioButton(hwndDlg, IDC_ROPTMSG1, IDC_ROPTMSG5, IDC_ROPTMSG5); + } + break; + } + } + break; + + case IDC_COPTMSG1: + switch (HIWORD(wParam)) + { + case BN_CLICKED: + { + int i, j; + + i = SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTSTATUS), CB_GETITEMDATA, (WPARAM)SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTSTATUS), CB_GETCURSEL, 0, 0), 0); + j = SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTPROTO), CB_GETITEMDATA, (WPARAM)SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTPROTO), CB_GETCURSEL, 0, 0), 0); + if (IsDlgButtonChecked(hwndDlg, IDC_COPTMSG1) == BST_CHECKED) + data->status_msg[j].flags[i] |= STATUS_SHOW_DLG; + else + data->status_msg[j].flags[i] &= ~STATUS_SHOW_DLG; + break; + } + } + break; + + case IDC_ROPTMSG1: + case IDC_ROPTMSG2: + case IDC_ROPTMSG3: + case IDC_ROPTMSG4: + case IDC_ROPTMSG5: + switch (HIWORD(wParam)) + { + case BN_CLICKED: + { + int i, j; + + i = SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTSTATUS), CB_GETITEMDATA, (WPARAM)SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTSTATUS), CB_GETCURSEL, 0, 0), 0); + j = SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTPROTO), CB_GETITEMDATA, (WPARAM)SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTPROTO), CB_GETCURSEL, 0, 0), 0); + + if (LOWORD(wParam) == IDC_ROPTMSG4 && data->proto_msg[j].flags & PROTO_THIS_MSG) + break; + + data->status_msg[j].flags[i] = 0; + + if (IsDlgButtonChecked(hwndDlg, IDC_COPTMSG1) == BST_CHECKED) + data->status_msg[j].flags[i] |= STATUS_SHOW_DLG; + + if (LOWORD(wParam) == IDC_ROPTMSG1) + { + SetDlgItemText(hwndDlg, IDC_OPTEDIT1, _T("")); + EnableWindow(GetDlgItem(hwndDlg, IDC_OPTEDIT1), FALSE); + EnableWindow(GetDlgItem(hwndDlg, IDC_VARSHELP), FALSE); + data->status_msg[j].flags[i] |= STATUS_EMPTY_MSG; + } + else if (LOWORD(wParam) == IDC_ROPTMSG2) + { + SetDlgItemText(hwndDlg, IDC_OPTEDIT1, GetDefaultMessage(i+ID_STATUS_ONLINE)); + EnableWindow(GetDlgItem(hwndDlg, IDC_OPTEDIT1), FALSE); + EnableWindow(GetDlgItem(hwndDlg, IDC_VARSHELP), FALSE); + data->status_msg[j].flags[i] |= STATUS_DEFAULT_MSG; + } + else if (LOWORD(wParam) == IDC_ROPTMSG3) + { + char setting[80]; + DBVARIANT dbv, dbv2; + + if (j) + mir_snprintf(setting, SIZEOF(setting), "Last%sMsg", accounts->pa[j-1]->szModuleName); + else + mir_snprintf(setting, SIZEOF(setting), "LastMsg"); + + SetDlgItemText(hwndDlg, IDC_OPTEDIT1, _T("")); + if (!DBGetContactSetting(NULL, "SimpleStatusMsg", setting, &dbv)) + { + if (dbv.pszVal) + { + if (!DBGetContactSettingTString(NULL, "SimpleStatusMsg", dbv.pszVal, &dbv2) && strlen(dbv.pszVal)) + { + if (dbv2.ptszVal && lstrlen(dbv2.ptszVal)) + SetDlgItemText(hwndDlg, IDC_OPTEDIT1, dbv2.ptszVal); + DBFreeVariant(&dbv2); + } + } + DBFreeVariant(&dbv); + } + EnableWindow(GetDlgItem(hwndDlg, IDC_OPTEDIT1), FALSE); + EnableWindow(GetDlgItem(hwndDlg, IDC_VARSHELP), FALSE); + data->status_msg[j].flags[i] |= STATUS_LAST_MSG; + } + else if (LOWORD(wParam) == IDC_ROPTMSG4) + { + data->status_msg[j].flags[i] |= STATUS_THIS_MSG; + EnableWindow(GetDlgItem(hwndDlg, IDC_OPTEDIT1), TRUE); + EnableWindow(GetDlgItem(hwndDlg, IDC_VARSHELP), TRUE); + SetDlgItemText(hwndDlg, IDC_OPTEDIT1, data->status_msg[j].msg[i]); + } + else if (LOWORD(wParam) == IDC_ROPTMSG5) + { + char setting[80]; + DBVARIANT dbv; + + if (j) + mir_snprintf(setting, SIZEOF(setting), "%sMsg", accounts->pa[j-1]->szModuleName); + else + mir_snprintf(setting, SIZEOF(setting), "Msg"); + + if (!DBGetContactSettingTString(NULL, "SRAway", StatusModeToDbSetting(i+ID_STATUS_ONLINE, setting), &dbv)) + { + SetDlgItemText(hwndDlg, IDC_OPTEDIT1, dbv.ptszVal); + DBFreeVariant(&dbv); + } + else + SetDlgItemText(hwndDlg, IDC_OPTEDIT1, _T("")); + + EnableWindow(GetDlgItem(hwndDlg, IDC_OPTEDIT1), FALSE); + EnableWindow(GetDlgItem(hwndDlg, IDC_VARSHELP), FALSE); + data->status_msg[j].flags[i] |= STATUS_LAST_STATUS_MSG; + } + break; + } + } + break; + + case IDC_OPTEDIT1: + { + int i = SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTSTATUS), CB_GETITEMDATA, (WPARAM)SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTSTATUS), CB_GETCURSEL, 0, 0), 0); + int j = SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTPROTO), CB_GETITEMDATA, (WPARAM)SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTPROTO), CB_GETCURSEL, 0, 0), 0); + + if (HIWORD(wParam) == EN_KILLFOCUS) + { + TCHAR msg[1024]; + + if (data->proto_msg[j].flags & PROTO_THIS_MSG) + { + int len = GetDlgItemText(hwndDlg, IDC_OPTEDIT1, msg, SIZEOF(msg)); + if (len > 0) + { + if (data->proto_msg[j].msg == NULL) + data->proto_msg[j].msg = mir_tstrdup(msg); + else + { + mir_free(data->proto_msg[j].msg); + data->proto_msg[j].msg = mir_tstrdup(msg); + } + } + else + { + if (data->proto_msg[j].msg != NULL) + { + mir_free(data->proto_msg[j].msg); + data->proto_msg[j].msg = NULL; + } + } + } + else + { + GetDlgItemText(hwndDlg, IDC_OPTEDIT1, msg, SIZEOF(msg)); + lstrcpy(data->status_msg[j].msg[i], msg); + } + } + break; + } + + case IDC_VARSHELP: + variables_showhelp(hwndDlg, IDC_OPTEDIT1, VHF_FULLDLG|VHF_SETLASTSUBJECT, NULL, NULL); + break; + + case IDC_BOPTPROTO: + { + int i, j, k; + j = SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTPROTO), CB_GETITEMDATA, (WPARAM)SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTPROTO), CB_GETCURSEL, 0, 0), 0); + + if (j) + { + for (i = ID_STATUS_ONLINE; i <= ID_STATUS_OUTTOLUNCH; i++) + { + if (accounts->statusMsgFlags & Proto_Status2Flag(i)) + { + data->status_msg[0].flags[i-ID_STATUS_ONLINE] = data->status_msg[j].flags[i-ID_STATUS_ONLINE]; + if (data->status_msg[j].flags[i-ID_STATUS_ONLINE] & STATUS_THIS_MSG) + lstrcpy(data->status_msg[0].msg[i-ID_STATUS_ONLINE], data->status_msg[j].msg[i-ID_STATUS_ONLINE]); + } + } + } + + for (k = 0; k < accounts->count; k++) + { + if (!IsAccountEnabled(accounts->pa[k]) || !CallProtoService(accounts->pa[k]->szModuleName, PS_GETCAPS, PFLAGNUM_3, 0) || !(CallProtoService(accounts->pa[k]->szModuleName, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_MODEMSGSEND)) + continue; + + if (k != j - 1) + { + data->proto_msg[k+1].flags = data->proto_msg[j].flags; + if (j) + data->proto_msg[k+1].max_length = data->proto_msg[j].max_length; + + if (data->proto_msg[j].flags & PROTO_THIS_MSG) + { + int len = lstrlen(data->proto_msg[j].msg); + if (len > 0) + { + if (data->proto_msg[k+1].msg == NULL) + data->proto_msg[k+1].msg = mir_tstrdup(data->proto_msg[j].msg); + else + { + mir_free(data->proto_msg[k+1].msg); + data->proto_msg[k+1].msg = mir_tstrdup(data->proto_msg[j].msg); + } + } + else + { + if (data->proto_msg[k+1].msg != NULL) + { + mir_free(data->proto_msg[k+1].msg); + data->proto_msg[k+1].msg = NULL; + } + } + } + else if (data->proto_msg[j].flags & PROTO_POPUPDLG) + { + for (i = ID_STATUS_ONLINE; i <= ID_STATUS_OUTTOLUNCH; i++) + { + if (CallProtoService(accounts->pa[k]->szModuleName, PS_GETCAPS, PFLAGNUM_3, 0) & Proto_Status2Flag(i)) + { + data->status_msg[k + 1].flags[i - ID_STATUS_ONLINE] = data->status_msg[j].flags[i - ID_STATUS_ONLINE]; + if (data->status_msg[j].flags[i - ID_STATUS_ONLINE] & STATUS_THIS_MSG) + lstrcpy(data->status_msg[k + 1].msg[i - ID_STATUS_ONLINE], data->status_msg[j].msg[i - ID_STATUS_ONLINE]); + } + } + } + } + } + break; + } // case IDC_BOPTPROTO + + case IDC_BOPTSTATUS: + { + int status_modes, i, j, k; + + i = SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTSTATUS), CB_GETITEMDATA, (WPARAM)SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTSTATUS), CB_GETCURSEL, 0, 0), 0); + j = SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTPROTO), CB_GETITEMDATA, (WPARAM)SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTPROTO), CB_GETCURSEL, 0, 0), 0); + + if (j) + status_modes = CallProtoService(accounts->pa[j-1]->szModuleName, PS_GETCAPS, PFLAGNUM_3, 0); + else + status_modes = accounts->statusMsgFlags; + + for (k = ID_STATUS_ONLINE; k <= ID_STATUS_OUTTOLUNCH; k++) + { + if (k - ID_STATUS_ONLINE != i && status_modes & Proto_Status2Flag(k)) + { + data->status_msg[j].flags[k - ID_STATUS_ONLINE] = data->status_msg[j].flags[i]; + if (data->status_msg[j].flags[i] & STATUS_THIS_MSG) + lstrcpy(data->status_msg[j].msg[k - ID_STATUS_ONLINE], data->status_msg[j].msg[i]); + } + } + break; + } //case IDC_BOPTSTATUS + } + break; + + case WM_NOTIFY: + if (((LPNMHDR)lParam)->idFrom == 0 && ((LPNMHDR)lParam)->code == PSN_APPLY) + { + char szSetting[80]; + int i; + + for (i = ID_STATUS_ONLINE; i <= ID_STATUS_OUTTOLUNCH; i++) + { + if (accounts->statusMsgFlags & Proto_Status2Flag(i)) + { + DBWriteContactSettingTString(NULL, "SRAway", StatusModeToDbSetting(i, "Default"), data->status_msg[0].msg[i - ID_STATUS_ONLINE]); + DBWriteContactSettingByte(NULL, "SimpleStatusMsg", StatusModeToDbSetting(i, "Flags"), (BYTE)data->status_msg[0].flags[i - ID_STATUS_ONLINE]); + + for (int j = 0; j < accounts->count; j++) + { + if (!IsAccountEnabled(accounts->pa[j])) + continue; + + if (!(CallProtoService(accounts->pa[j]->szModuleName, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_MODEMSGSEND)) + continue; + + if (CallProtoService(accounts->pa[j]->szModuleName, PS_GETCAPS, PFLAGNUM_3, 0) & Proto_Status2Flag(i)) + { + mir_snprintf(szSetting, SIZEOF(szSetting), "%sDefault", accounts->pa[j]->szModuleName); + DBWriteContactSettingTString(NULL, "SRAway", StatusModeToDbSetting(i, szSetting), data->status_msg[j + 1].msg[i - ID_STATUS_ONLINE]); + + mir_snprintf(szSetting, SIZEOF(szSetting), "%sFlags", accounts->pa[j]->szModuleName); + DBWriteContactSettingByte(NULL, "SimpleStatusMsg", StatusModeToDbSetting(i, szSetting), (BYTE)data->status_msg[j + 1].flags[i - ID_STATUS_ONLINE]); + } + } + } + } + + DBWriteContactSettingByte(NULL, "SimpleStatusMsg", "PutDefInList", (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_COPTMSG2) == BST_CHECKED)); + + if (data->proto_ok) + { + DBWriteContactSettingByte(NULL, "SimpleStatusMsg", "ProtoFlags", (BYTE)data->proto_msg[0].flags); + + for (i = 0; i < accounts->count; i++) + { + if (!IsAccountEnabled(accounts->pa[i])) + continue; + + if (!CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_3, 0)) + continue; + + if (!(CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_MODEMSGSEND)) + continue; + + mir_snprintf(szSetting, SIZEOF(szSetting), "Proto%sDefault", accounts->pa[i]->szModuleName); + if (data->proto_msg[i+1].msg && (data->proto_msg[i+1].flags & PROTO_THIS_MSG)) + DBWriteContactSettingTString(NULL, "SimpleStatusMsg", szSetting, data->proto_msg[i+1].msg); +// else +// DBDeleteContactSetting(NULL, "SimpleStatusMsg", szSetting); + + mir_snprintf(szSetting, SIZEOF(szSetting), "Proto%sMaxLen", accounts->pa[i]->szModuleName); + DBWriteContactSettingWord(NULL, "SimpleStatusMsg", szSetting, (WORD)data->proto_msg[i+1].max_length); + + mir_snprintf(szSetting, SIZEOF(szSetting), "Proto%sFlags", accounts->pa[i]->szModuleName); + DBWriteContactSettingByte(NULL, "SimpleStatusMsg", szSetting, (BYTE)data->proto_msg[i+1].flags); + } + } + RebuildStatusMenu(); + return TRUE; + } + break; + + case WM_DESTROY: + SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_OPTEDIT1), GWLP_WNDPROC, (LONG_PTR)OldDlgProc); + if (data->proto_ok) + { + for (int i = 0; i < accounts->count + 1; ++i) + { + if (data->proto_msg[i].msg) // they want to be free, do they? + mir_free(data->proto_msg[i].msg); + } + mir_free(data->proto_msg); + } + mir_free(data->status_msg); + mir_free(data); + break; + } + return FALSE; +} + +static INT_PTR CALLBACK DlgVariablesOptionsProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) +{ + switch (uMsg) + { + case WM_INITDIALOG: + { + TranslateDialogDefault(hwndDlg); + + SendDlgItemMessage(hwndDlg, IDC_SSECUPDTMSG, UDM_SETBUDDY, (WPARAM)GetDlgItem(hwndDlg, IDC_ESECUPDTMSG), 0); + SendDlgItemMessage(hwndDlg, IDC_SSECUPDTMSG, UDM_SETRANGE32, 1, 999); + SendDlgItemMessage(hwndDlg, IDC_SSECUPDTMSG, UDM_SETPOS, 0, MAKELONG((short)DBGetContactSettingWord(NULL, "SimpleStatusMsg", "UpdateMsgInt", 10), 0)); + SendDlgItemMessage(hwndDlg, IDC_ESECUPDTMSG, EM_LIMITTEXT, 3, 0); + + CheckDlgButton(hwndDlg, IDC_CUPDATEMSG, DBGetContactSettingByte(NULL, "SimpleStatusMsg", "UpdateMsgOn", 1) ? BST_CHECKED : BST_UNCHECKED); + CheckDlgButton(hwndDlg, IDC_CNOIDLE, DBGetContactSettingByte(NULL, "SimpleStatusMsg", "NoUpdateOnIdle", 1) ? BST_CHECKED : BST_UNCHECKED); + CheckDlgButton(hwndDlg, IDC_CNOICQREQ, DBGetContactSettingByte(NULL, "SimpleStatusMsg", "NoUpdateOnICQReq", 1) ? BST_CHECKED : BST_UNCHECKED); + CheckDlgButton(hwndDlg, IDC_CLEAVEWINAMP, DBGetContactSettingByte(NULL, "SimpleStatusMsg", "AmpLeaveTitle", 1) ? BST_CHECKED : BST_UNCHECKED); + if (ServiceExists(MS_VARS_FORMATSTRING)) + { + CheckDlgButton(hwndDlg, IDC_CVARIABLES, DBGetContactSettingByte(NULL, "SimpleStatusMsg", "EnableVariables", 1) ? BST_CHECKED : BST_UNCHECKED); + CheckDlgButton(hwndDlg, IDC_CDATEPARSING, DBGetContactSettingByte(NULL, "SimpleStatusMsg", "ExclDateToken", 0) ? BST_CHECKED : BST_UNCHECKED); + } + else + { + EnableWindow(GetDlgItem(hwndDlg, IDC_CVARIABLES), FALSE); + } + EnableWindow(GetDlgItem(hwndDlg, IDC_CDATEPARSING), IsDlgButtonChecked(hwndDlg, IDC_CVARIABLES) == BST_CHECKED); + + SendMessage(hwndDlg, WM_USER + 2, 0, 0); + return TRUE; + } + + case WM_USER + 2: + { + BOOL bChecked = IsDlgButtonChecked(hwndDlg, IDC_CUPDATEMSG) == BST_CHECKED; + EnableWindow(GetDlgItem(hwndDlg, IDC_ESECUPDTMSG), bChecked); + EnableWindow(GetDlgItem(hwndDlg, IDC_SSECUPDTMSG), bChecked); + EnableWindow(GetDlgItem(hwndDlg, IDC_CNOIDLE), bChecked); + EnableWindow(GetDlgItem(hwndDlg, IDC_CNOICQREQ), bChecked); + EnableWindow(GetDlgItem(hwndDlg, IDC_CLEAVEWINAMP), bChecked); + break; + } + + case WM_COMMAND: + switch (LOWORD(wParam)) + { + case IDC_ESECUPDTMSG: + { + if ((HWND)lParam != GetFocus() || HIWORD(wParam) != EN_CHANGE) return 0; + int val = GetDlgItemInt(hwndDlg, IDC_ESECUPDTMSG, NULL, FALSE); + if (val == 0 && GetWindowTextLength(GetDlgItem(hwndDlg, IDC_ESECUPDTMSG))) + SendDlgItemMessage(hwndDlg, IDC_SSECUPDTMSG, UDM_SETPOS, 0, MAKELONG((short)1, 0)); + break; + } + + case IDC_CUPDATEMSG: + SendMessage(hwndDlg, WM_USER + 2, 0, 0); + break; + + case IDC_CVARIABLES: + EnableWindow(GetDlgItem(hwndDlg, IDC_CDATEPARSING), IsDlgButtonChecked(hwndDlg, IDC_CVARIABLES) == BST_CHECKED); + break; + } + SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0); + break; + + case WM_NOTIFY: + if (((LPNMHDR)lParam)->idFrom == 0 && ((LPNMHDR)lParam)->code == PSN_APPLY) + { + if (g_uUpdateMsgTimer) + KillTimer(NULL, g_uUpdateMsgTimer); + + int val = SendDlgItemMessage(hwndDlg, IDC_SSECUPDTMSG, UDM_GETPOS, 0, 0); + DBWriteContactSettingWord(NULL, "SimpleStatusMsg", "UpdateMsgInt", (WORD)val); + + if (IsDlgButtonChecked(hwndDlg, IDC_CUPDATEMSG) == BST_CHECKED && val) + { + DBWriteContactSettingByte(NULL, "SimpleStatusMsg", "UpdateMsgOn", (BYTE)1); + g_uUpdateMsgTimer = SetTimer(NULL, 0, val * 1000, (TIMERPROC)UpdateMsgTimerProc); + } + else + { + DBWriteContactSettingByte(NULL, "SimpleStatusMsg", "UpdateMsgOn", (BYTE)0); + } + + DBWriteContactSettingByte(NULL, "SimpleStatusMsg", "NoUpdateOnIdle", (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_CNOIDLE) == BST_CHECKED)); + DBWriteContactSettingByte(NULL, "SimpleStatusMsg", "NoUpdateOnICQReq", (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_CNOICQREQ) == BST_CHECKED)); + DBWriteContactSettingByte(NULL, "SimpleStatusMsg", "AmpLeaveTitle", (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_CLEAVEWINAMP) == BST_CHECKED)); + if (ServiceExists(MS_VARS_FORMATSTRING)) + { + DBWriteContactSettingByte(NULL, "SimpleStatusMsg", "EnableVariables", (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_CVARIABLES) == BST_CHECKED)); + DBWriteContactSettingByte(NULL, "SimpleStatusMsg", "ExclDateToken", (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_CDATEPARSING) == BST_CHECKED)); + } + return TRUE; + } + break; + } + return FALSE; +} + +static BOOL IsHistoryMsgsFound(HWND hwndDlg, int histMax) +{ + char szSetting[16]; + DBVARIANT dbv; + int j = DBGetContactSettingWord(NULL, "SimpleStatusMsg", "LMMsg", 1); + for (int i = 1; i <= histMax; ++i, --j) + { + if (j < 1) j = histMax; + mir_snprintf(szSetting, SIZEOF(szSetting), "SMsg%d", j); + if (!DBGetContactSettingTString(NULL, "SimpleStatusMsg", szSetting, &dbv)) + { + if (dbv.ptszVal != NULL && *dbv.ptszVal != '\0') + { + DBFreeVariant(&dbv); + return TRUE; + } + DBFreeVariant(&dbv); + } + } + return FALSE; +} + +static INT_PTR CALLBACK DlgAdvancedOptionsProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) +{ + switch (uMsg) + { + case WM_INITDIALOG: + { + int settingValue; + + TranslateDialogDefault(hwndDlg); + + // Layout + int i_btnhide = SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTBUTTONS), CB_ADDSTRING, 0, (LPARAM)TranslateT("Hide")); + int i_btndown = SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTBUTTONS), CB_ADDSTRING, 0, (LPARAM)TranslateT("Show next to cancel button")); + int i_btndownflat = SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTBUTTONS), CB_ADDSTRING, 0, (LPARAM)TranslateT("Flat, next to cancel button")); + int i_btnlist = SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTBUTTONS), CB_ADDSTRING, 0, (LPARAM)TranslateT("Show in message list")); + + SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTBUTTONS), CB_SETITEMDATA, (WPARAM)i_btnhide, 0); + SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTBUTTONS), CB_SETITEMDATA, (WPARAM)i_btndown, DLG_SHOW_BUTTONS); + SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTBUTTONS), CB_SETITEMDATA, (WPARAM)i_btndownflat, DLG_SHOW_BUTTONS_FLAT); + SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTBUTTONS), CB_SETITEMDATA, (WPARAM)i_btnlist, DLG_SHOW_BUTTONS_INLIST); + + settingValue = DBGetContactSettingByte(NULL, "SimpleStatusMsg", "DlgFlags", DLG_SHOW_DEFAULT); + CheckDlgButton(hwndDlg, IDC_CSTATUSLIST, settingValue & DLG_SHOW_STATUS ? BST_CHECKED : BST_UNCHECKED); + CheckDlgButton(hwndDlg, IDC_CPROFILES, settingValue & DLG_SHOW_STATUS_PROFILES ? BST_CHECKED : BST_UNCHECKED); + CheckDlgButton(hwndDlg, IDC_CICONS1, settingValue & DLG_SHOW_STATUS_ICONS ? BST_CHECKED : BST_UNCHECKED); + CheckDlgButton(hwndDlg, IDC_CICONS2, settingValue & DLG_SHOW_LIST_ICONS ? BST_CHECKED : BST_UNCHECKED); + + if (!(settingValue & DLG_SHOW_STATUS)) + { + EnableWindow(GetDlgItem(hwndDlg, IDC_CPROFILES), FALSE); + EnableWindow(GetDlgItem(hwndDlg, IDC_CICONS1), FALSE); + } + + if (settingValue & DLG_SHOW_BUTTONS) + SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTBUTTONS), CB_SETCURSEL, (WPARAM)i_btndown, 0); + else if (settingValue & DLG_SHOW_BUTTONS_FLAT) + SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTBUTTONS), CB_SETCURSEL, (WPARAM)i_btndownflat, 0); + else if (settingValue & DLG_SHOW_BUTTONS_INLIST) + SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTBUTTONS), CB_SETCURSEL, (WPARAM)i_btnlist, 0); + else + SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTBUTTONS), CB_SETCURSEL, (WPARAM)i_btnhide, 0); + + if (!ServiceExists(MS_SS_GETPROFILECOUNT)) + { + TCHAR szText[100]; + mir_sntprintf(szText, SIZEOF(szText), _T("%s *"), TranslateT("Show status profiles in status list")); + SetDlgItemText(hwndDlg, IDC_CPROFILES, szText); + EnableWindow(GetDlgItem(hwndDlg, IDC_CPROFILES), FALSE); + ShowWindow(GetDlgItem(hwndDlg, IDC_NOTE1), SW_SHOW); + } + + // Misc. + settingValue = DBGetContactSettingByte(NULL, "SimpleStatusMsg", "MaxHist", 10); + + SendDlgItemMessage(hwndDlg, IDC_SMAXHIST, UDM_SETBUDDY, (WPARAM)GetDlgItem(hwndDlg, IDC_EMAXHIST), 0); + SendDlgItemMessage(hwndDlg, IDC_SMAXHIST, UDM_SETRANGE32, 0, 25); + SendDlgItemMessage(hwndDlg, IDC_SMAXHIST, UDM_SETPOS, 0, MAKELONG((short)settingValue, 0)); + SendDlgItemMessage(hwndDlg, IDC_EMAXHIST, EM_LIMITTEXT, 2, 0); + + if (settingValue == 0) + EnableWindow(GetDlgItem(hwndDlg, IDC_CICONS2), FALSE); + + EnableWindow(GetDlgItem(hwndDlg, IDC_BOPTHIST), IsHistoryMsgsFound(hwndDlg, settingValue)); + EnableWindow(GetDlgItem(hwndDlg, IDC_BOPTDEF), DBGetContactSettingWord(NULL, "SimpleStatusMsg", "DefMsgCount", 0) != 0); + + SendDlgItemMessage(hwndDlg, IDC_STIMEOUT, UDM_SETBUDDY, (WPARAM)GetDlgItem(hwndDlg, IDC_ETIMEOUT), 0); + SendDlgItemMessage(hwndDlg, IDC_STIMEOUT, UDM_SETRANGE32, 1, 60); + SendDlgItemMessage(hwndDlg, IDC_STIMEOUT, UDM_SETPOS, 0, MAKELONG((short)DBGetContactSettingByte(NULL, "SimpleStatusMsg", "DlgTime", 5), 0)); + SendDlgItemMessage(hwndDlg, IDC_ETIMEOUT, EM_LIMITTEXT, 2, 0); + + CheckDlgButton(hwndDlg, IDC_CCLOSEWND, DBGetContactSettingByte(NULL, "SimpleStatusMsg", "AutoClose", 1) ? BST_CHECKED : BST_UNCHECKED); + CheckDlgButton(hwndDlg, IDC_CRPOSWND, !DBGetContactSettingByte(NULL, "SimpleStatusMsg", "WinCentered", 1) ? BST_CHECKED : BST_UNCHECKED); + CheckDlgButton(hwndDlg, IDC_CREMOVECR, DBGetContactSettingByte(NULL, "SimpleStatusMsg", "RemoveCR", 0) ? BST_CHECKED : BST_UNCHECKED); + CheckDlgButton(hwndDlg, IDC_CSHOWCOPY, DBGetContactSettingByte(NULL, "SimpleStatusMsg", "ShowCopy", 1) ? BST_CHECKED : BST_UNCHECKED); + CheckDlgButton(hwndDlg, IDC_CSHOWGURL, DBGetContactSettingByte(NULL, "SimpleStatusMsg", "ShowGoToURL", 1) ? BST_CHECKED : BST_UNCHECKED); + CheckDlgButton(hwndDlg, IDC_CSHOWSMSG, DBGetContactSettingByte(NULL, "SimpleStatusMsg", "ShowStatusMenuItem", 1) ? BST_CHECKED : BST_UNCHECKED); + + SendMessage(hwndDlg, WM_USER + 2, 0, 0); + return TRUE; + } + + case WM_USER + 2: + { + BOOL bChecked = IsDlgButtonChecked(hwndDlg, IDC_CCLOSEWND) == BST_CHECKED; + EnableWindow(GetDlgItem(hwndDlg, IDC_ETIMEOUT), bChecked); + EnableWindow(GetDlgItem(hwndDlg, IDC_STIMEOUT), bChecked); + break; + } + + case WM_COMMAND: + switch (LOWORD(wParam)) + { + case IDC_CSTATUSLIST: + { + BOOL bChecked = IsDlgButtonChecked(hwndDlg, IDC_CSTATUSLIST) == BST_CHECKED; + EnableWindow(GetDlgItem(hwndDlg, IDC_CPROFILES), bChecked && ServiceExists(MS_SS_GETPROFILECOUNT)); + EnableWindow(GetDlgItem(hwndDlg, IDC_CICONS1), bChecked); + break; + } + + case IDC_CBOPTBUTTONS: + if ((HWND)lParam != GetFocus() || HIWORD(wParam) != CBN_SELCHANGE) return 0; + break; + + case IDC_EMAXHIST: + { + if ((HWND)lParam != GetFocus() || HIWORD(wParam) != EN_CHANGE) return 0; + int val = GetDlgItemInt(hwndDlg, IDC_EMAXHIST, NULL, FALSE); + if (val > 25) + SendDlgItemMessage(hwndDlg, IDC_SMAXHIST, UDM_SETPOS, 0, MAKELONG((short)25, 0)); + EnableWindow(GetDlgItem(hwndDlg, IDC_CICONS2), val != 0); + break; + } + + case IDC_CCLOSEWND: + SendMessage(hwndDlg, WM_USER + 2, 0, 0); + break; + + case IDC_ETIMEOUT: + { + if ((HWND)lParam != GetFocus() || HIWORD(wParam) != EN_CHANGE) return 0; + int val = GetDlgItemInt(hwndDlg, IDC_ETIMEOUT, NULL, FALSE); + if (val == 0 && GetWindowTextLength(GetDlgItem(hwndDlg, IDC_ETIMEOUT))) + SendDlgItemMessage(hwndDlg, IDC_STIMEOUT, UDM_SETPOS, 0, MAKELONG((short)1, 0)); + else if (val > 60) + SendDlgItemMessage(hwndDlg, IDC_STIMEOUT, UDM_SETPOS, 0, MAKELONG((short)60, 0)); + break; + } + + case IDC_BOPTHIST: + if (MessageBox(NULL, TranslateT("Are you sure you want to clear status message history?"), TranslateT("Confirm clearing history"), MB_ICONQUESTION | MB_YESNO) == IDYES) + { + int i, max_hist_msgs; + char text[8], setting[80]; + + if (hwndSAMsgDialog) DestroyWindow(hwndSAMsgDialog); + + max_hist_msgs = DBGetContactSettingByte(NULL, "SimpleStatusMsg", "MaxHist", 10); + for (i = 1; i <= max_hist_msgs; i++) + { + mir_snprintf(text, SIZEOF(text), "SMsg%d", i); + DBWriteContactSettingTString(NULL, "SimpleStatusMsg", text, _T("")); + } + DBWriteContactSettingString(NULL, "SimpleStatusMsg", "LastMsg", ""); + for (i = 0; i < accounts->count; i++) + { + if (!IsAccountEnabled(accounts->pa[i])) + continue; + + if (!CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_3, 0)) + continue; + + if (!(CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_MODEMSGSEND)) + continue; + + mir_snprintf(setting, SIZEOF(setting), "Last%sMsg", accounts->pa[i]->szModuleName); + DBWriteContactSettingString(NULL, "SimpleStatusMsg", setting, ""); + } + DBWriteContactSettingWord(NULL, "SimpleStatusMsg", "LMMsg", (WORD)max_hist_msgs); + EnableWindow(GetDlgItem(hwndDlg, IDC_BOPTHIST), FALSE); + } + return 0; + + case IDC_BOPTDEF: + if (MessageBox(NULL, TranslateT("Are you sure you want to clear predefined status messages?"), TranslateT("Confirm clearing predefined"), MB_ICONQUESTION | MB_YESNO) == IDYES) + { + char szSetting[16]; + int nDefMSgCount; + + if (hwndSAMsgDialog) DestroyWindow(hwndSAMsgDialog); + + nDefMSgCount = DBGetContactSettingWord(NULL, "SimpleStatusMsg", "DefMsgCount", 0); + for (int i = 1; i <= nDefMSgCount; i++) + { + mir_snprintf(szSetting, SIZEOF(szSetting), "DefMsg%d", i); + DBDeleteContactSetting(NULL, "SimpleStatusMsg", szSetting); + } + DBWriteContactSettingWord(NULL, "SimpleStatusMsg", "DefMsgCount", 0); + EnableWindow(GetDlgItem(hwndDlg, IDC_BOPTDEF), FALSE); + } + return 0; + } + SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0); + break; + + case WM_NOTIFY: + if (((LPNMHDR)lParam)->idFrom == 0 && ((LPNMHDR)lParam)->code == PSN_APPLY) + { + // Layout + int flags = 0, curSel; + + if (IsDlgButtonChecked(hwndDlg, IDC_CSTATUSLIST) == BST_CHECKED) flags |= DLG_SHOW_STATUS; + if (IsDlgButtonChecked(hwndDlg, IDC_CICONS1) == BST_CHECKED) flags |= DLG_SHOW_STATUS_ICONS; + if (IsDlgButtonChecked(hwndDlg, IDC_CICONS2) == BST_CHECKED) flags |= DLG_SHOW_LIST_ICONS; + if (IsDlgButtonChecked(hwndDlg, IDC_CPROFILES) == BST_CHECKED) flags |= DLG_SHOW_STATUS_PROFILES; + + curSel = SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTBUTTONS), CB_GETCURSEL, 0, 0); + if (curSel != CB_ERR) + flags |= SendMessage(GetDlgItem(hwndDlg, IDC_CBOPTBUTTONS), CB_GETITEMDATA, (WPARAM)curSel, 0); + + DBWriteContactSettingByte(NULL, "SimpleStatusMsg", "DlgFlags", (BYTE)flags); + + // Misc. + DBWriteContactSettingByte(NULL, "SimpleStatusMsg", "MaxHist", (BYTE)GetDlgItemInt(hwndDlg, IDC_EMAXHIST, NULL, FALSE)); + DBWriteContactSettingByte(NULL, "SimpleStatusMsg", "AutoClose", (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_CCLOSEWND) == BST_CHECKED)); + DBWriteContactSettingByte(NULL, "SimpleStatusMsg", "DlgTime", (BYTE)GetDlgItemInt(hwndDlg, IDC_ETIMEOUT, NULL, FALSE)); + DBWriteContactSettingByte(NULL, "SimpleStatusMsg", "WinCentered", (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_CRPOSWND) != BST_CHECKED)); + DBWriteContactSettingByte(NULL, "SimpleStatusMsg", "RemoveCR", (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_CREMOVECR) == BST_CHECKED)); + DBWriteContactSettingByte(NULL, "SimpleStatusMsg", "ShowCopy", (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_CSHOWCOPY) == BST_CHECKED)); + DBWriteContactSettingByte(NULL, "SimpleStatusMsg", "ShowGoToURL", (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_CSHOWGURL) == BST_CHECKED)); + DBWriteContactSettingByte(NULL, "SimpleStatusMsg", "ShowStatusMenuItem", (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_CSHOWSMSG) == BST_CHECKED)); + RebuildStatusMenu(); + + return TRUE; + } + break; + } + return FALSE; +} + +struct StatusOptDlgData +{ + int *status; + int *setdelay; + int setglobaldelay; +}; + +static INT_PTR CALLBACK DlgStatusOptionsProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) +{ + struct StatusOptDlgData *data = (struct StatusOptDlgData *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA); + + switch (uMsg) + { + case WM_INITDIALOG: + { + int index, i; + + TranslateDialogDefault(hwndDlg); + + data = (struct StatusOptDlgData *)mir_alloc(sizeof(struct StatusOptDlgData)); + SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)data); + + data->status = (int *)mir_alloc(sizeof(int) * accounts->count); + data->setdelay = (int *)mir_alloc(sizeof(int) * accounts->count); + for (i = 0; i < accounts->count; ++i) + { + if (!IsAccountEnabled(accounts->pa[i]) || !(CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_2, 0) &~ CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_5, 0))) + continue; + + index = SendMessage(GetDlgItem(hwndDlg, IDC_LISTPROTO), LB_ADDSTRING, 0, (LPARAM)accounts->pa[i]->tszAccountName); + if (index != LB_ERR && index != LB_ERRSPACE) + { + char setting[80]; + mir_snprintf(setting, SIZEOF(setting), "Startup%sStatus", accounts->pa[i]->szModuleName); + data->status[i] = DBGetContactSettingWord(NULL, "SimpleStatusMsg", setting, ID_STATUS_OFFLINE); + mir_snprintf(setting, SIZEOF(setting), "Set%sStatusDelay", accounts->pa[i]->szModuleName); + data->setdelay[i] = DBGetContactSettingWord(NULL, "SimpleStatusMsg", setting, 300); + SendMessage(GetDlgItem(hwndDlg, IDC_LISTPROTO), LB_SETITEMDATA, (WPARAM)index, (LPARAM)i); + } + } + SendMessage(GetDlgItem(hwndDlg, IDC_LISTPROTO), LB_SETCURSEL, 0, 0); + SendMessage(hwndDlg, WM_COMMAND, MAKEWPARAM(IDC_LISTPROTO, LBN_SELCHANGE), (LPARAM)GetDlgItem(hwndDlg, IDC_LISTPROTO)); + + data->setglobaldelay = DBGetContactSettingWord(NULL, "SimpleStatusMsg", "SetStatusDelay", 300); + + SendMessage(GetDlgItem(hwndDlg, IDC_SSETSTATUS), UDM_SETBUDDY, (WPARAM)GetDlgItem(hwndDlg, IDC_ESETSTATUS), 0); + SendMessage(GetDlgItem(hwndDlg, IDC_SSETSTATUS), UDM_SETRANGE32, 0, 9000); + SendMessage(GetDlgItem(hwndDlg, IDC_ESETSTATUS), EM_LIMITTEXT, 4, 0); + + if (!DBGetContactSettingByte(NULL, "SimpleStatusMsg", "GlobalStatusDelay", 1)) + { + CheckDlgButton(hwndDlg, IDC_SPECSET, BST_CHECKED); + i = SendMessage(GetDlgItem(hwndDlg, IDC_LISTPROTO), LB_GETITEMDATA, (WPARAM)SendMessage(GetDlgItem(hwndDlg, IDC_LISTPROTO), LB_GETCURSEL, 0, 0), 0); + SetDlgItemInt(hwndDlg, IDC_ESETSTATUS, data->setdelay[i], FALSE); + } + else + { + CheckDlgButton(hwndDlg, IDC_SPECSET, BST_UNCHECKED); + SetDlgItemInt(hwndDlg, IDC_ESETSTATUS, data->setglobaldelay, FALSE); + } + + if (DBGetContactSettingByte(NULL, "SimpleStatusMsg", "StartupPopupDlg", 1)) + { + CheckDlgButton(hwndDlg, IDC_POPUPDLG, BST_CHECKED); + if (IsDlgButtonChecked(hwndDlg, IDC_SPECSET) == BST_CHECKED) + { + CheckDlgButton(hwndDlg, IDC_SPECSET, BST_UNCHECKED); + SetDlgItemInt(hwndDlg, IDC_ESETSTATUS, data->setglobaldelay, FALSE); + } + EnableWindow(GetDlgItem(hwndDlg, IDC_SPECSET), FALSE); + } + else + CheckDlgButton(hwndDlg, IDC_POPUPDLG, BST_UNCHECKED); + + if (accounts->statusCount == 1 && accounts->statusMsgCount == 1) + { + EnableWindow(GetDlgItem(hwndDlg, IDC_SPECSET), FALSE); + CheckDlgButton(hwndDlg, IDC_SPECSET, BST_UNCHECKED); //should work like when checked, but should not be checked + i = SendMessage(GetDlgItem(hwndDlg, IDC_LISTPROTO), LB_GETITEMDATA, (WPARAM)SendMessage(GetDlgItem(hwndDlg, IDC_LISTPROTO), LB_GETCURSEL, 0, 0), 0); + SetDlgItemInt(hwndDlg, IDC_ESETSTATUS, data->setdelay[i], FALSE); + } + + return TRUE; + } + + case WM_COMMAND: + if ( ( (HIWORD(wParam) == BN_CLICKED) || /*(HIWORD(wParam) == EN_KILLFOCUS) ||*/ (HIWORD(wParam) == EN_CHANGE) + || ( (HIWORD(wParam) == LBN_SELCHANGE) && (LOWORD(wParam) != IDC_LISTPROTO)) + ) && (HWND)lParam == GetFocus()) + SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0); + switch (LOWORD(wParam)) + { + case IDC_ESETSTATUS: + switch (HIWORD(wParam)) + { + case EN_KILLFOCUS: + { + BOOL translated; + int val = GetDlgItemInt(hwndDlg, IDC_ESETSTATUS, &translated, FALSE); + if (translated && val > 9000) + SetDlgItemInt(hwndDlg, IDC_ESETSTATUS, 9000, FALSE); + if (translated && val < 0) + SetDlgItemInt(hwndDlg, IDC_ESETSTATUS, 0, FALSE); + val = GetDlgItemInt(hwndDlg, IDC_ESETSTATUS, &translated, FALSE); + + if (IsDlgButtonChecked(hwndDlg, IDC_SPECSET) == BST_CHECKED || (accounts->statusCount == 1 && accounts->statusMsgCount == 1)) + { + int i = SendMessage(GetDlgItem(hwndDlg, IDC_LISTPROTO), LB_GETITEMDATA, (WPARAM)SendMessage(GetDlgItem(hwndDlg, IDC_LISTPROTO), LB_GETCURSEL, 0, 0), 0); + data->setdelay[i] = val; + } + else + data->setglobaldelay = val; + break; + } + } + break; + + case IDC_SPECSET: + switch (HIWORD(wParam)) + { + case BN_CLICKED: + if (SendMessage((HWND)lParam, BM_GETCHECK, 0, 0) == BST_CHECKED || (accounts->statusCount == 1 && accounts->statusMsgCount == 1)) + { + int i = SendMessage(GetDlgItem(hwndDlg, IDC_LISTPROTO), LB_GETITEMDATA, (WPARAM)SendMessage(GetDlgItem(hwndDlg, IDC_LISTPROTO), LB_GETCURSEL, 0, 0), 0); + SetDlgItemInt(hwndDlg, IDC_ESETSTATUS, data->setdelay[i], FALSE); + } + else + SetDlgItemInt(hwndDlg, IDC_ESETSTATUS, data->setglobaldelay, FALSE); + break; + } + break; + + case IDC_POPUPDLG: + switch (HIWORD(wParam)) + { + case BN_CLICKED: + if (accounts->statusCount == 1 && accounts->statusMsgCount == 1) + break; + + if (SendMessage((HWND)lParam, BM_GETCHECK, 0, 0) == BST_CHECKED) + { + if (IsDlgButtonChecked(hwndDlg, IDC_SPECSET) == BST_CHECKED) + { + CheckDlgButton(hwndDlg, IDC_SPECSET, BST_UNCHECKED); + SetDlgItemInt(hwndDlg, IDC_ESETSTATUS, data->setglobaldelay, FALSE); + } + EnableWindow(GetDlgItem(hwndDlg, IDC_SPECSET), FALSE); + } + else + EnableWindow(GetDlgItem(hwndDlg, IDC_SPECSET), TRUE); + break; + } + break; + + case IDC_LISTPROTO: + switch (HIWORD(wParam)) + { + case LBN_SELCHANGE: + { + int status_modes, i, l, index, newindex = 0; + + i = SendMessage((HWND)lParam, LB_GETITEMDATA, (WPARAM)SendMessage((HWND)lParam, LB_GETCURSEL, 0, 0), 0); + status_modes = CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_2, 0) & ~CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_5, 0); + + SendMessage(GetDlgItem(hwndDlg, IDC_LISTSTATUS), LB_RESETCONTENT, 0, 0); + for (l = ID_STATUS_OFFLINE; l <= ID_STATUS_OUTTOLUNCH; l++) + { + if (status_modes & Proto_Status2Flag(l) || l == ID_STATUS_OFFLINE) + { + index = SendMessage(GetDlgItem(hwndDlg, IDC_LISTSTATUS), LB_INSERTSTRING, -1, (LPARAM)CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, l, GSMDF_TCHAR)); + if (index != LB_ERR && index != LB_ERRSPACE) + { + SendMessage(GetDlgItem(hwndDlg, IDC_LISTSTATUS), LB_SETITEMDATA, (WPARAM)index, (LPARAM)l - ID_STATUS_OFFLINE); + if (data->status[i] == l) + newindex = index; + } + } + } + + index = SendMessage(GetDlgItem(hwndDlg, IDC_LISTSTATUS), LB_INSERTSTRING, -1, (LPARAM)TranslateT("")); + if (index != LB_ERR && index != LB_ERRSPACE) + { + SendMessage(GetDlgItem(hwndDlg, IDC_LISTSTATUS), LB_SETITEMDATA, (WPARAM)index, (LPARAM)ID_STATUS_CURRENT-ID_STATUS_OFFLINE); + if (data->status[i] == ID_STATUS_CURRENT) + newindex = index; + } + + SendMessage(GetDlgItem(hwndDlg, IDC_LISTSTATUS), LB_SETCURSEL, (WPARAM)newindex, 0); + + if (IsDlgButtonChecked(hwndDlg, IDC_SPECSET) == BST_CHECKED || (accounts->statusCount == 1 && accounts->statusMsgCount == 1)) + SetDlgItemInt(hwndDlg, IDC_ESETSTATUS, data->setdelay[i], FALSE); + break; + } + } + break; + + case IDC_LISTSTATUS: + switch (HIWORD(wParam)) + { + case LBN_SELCHANGE: + { + int i = SendMessage((HWND)lParam, LB_GETITEMDATA, (WPARAM)SendMessage((HWND)lParam, LB_GETCURSEL, 0, 0), 0); + int j = SendMessage(GetDlgItem(hwndDlg, IDC_LISTPROTO), LB_GETITEMDATA, (WPARAM)SendMessage(GetDlgItem(hwndDlg, IDC_LISTPROTO), LB_GETCURSEL, 0, 0), 0); + data->status[j] = i + ID_STATUS_OFFLINE; + break; + } + } + break; + } + break; + + case WM_NOTIFY: + if (((LPNMHDR)lParam)->idFrom == 0 && ((LPNMHDR)lParam)->code == PSN_APPLY) + { + char szSetting[80]; + for (int i = 0; i < accounts->count; i++) + { + if (!IsAccountEnabled(accounts->pa[i]) || !(CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_2, 0)&~CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_5, 0))) + continue; + + mir_snprintf(szSetting, SIZEOF(szSetting), "Startup%sStatus", accounts->pa[i]->szModuleName); + DBWriteContactSettingWord(NULL, "SimpleStatusMsg", szSetting, (WORD)data->status[i]); + + mir_snprintf(szSetting, SIZEOF(szSetting), "Set%sStatusDelay", accounts->pa[i]->szModuleName); + DBWriteContactSettingWord(NULL, "SimpleStatusMsg", szSetting, (WORD)data->setdelay[i]); + } + DBWriteContactSettingWord(NULL, "SimpleStatusMsg", "SetStatusDelay", (WORD)data->setglobaldelay); + DBWriteContactSettingByte(NULL, "SimpleStatusMsg", "GlobalStatusDelay", (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_SPECSET) != BST_CHECKED)); + DBWriteContactSettingByte(NULL, "SimpleStatusMsg", "StartupPopupDlg", (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_POPUPDLG) == BST_CHECKED)); + return TRUE; + } + break; + + case WM_DESTROY: + mir_free(data->status); + mir_free(data->setdelay); + mir_free(data); + break; + } + return FALSE; +} + +int InitOptions(WPARAM wParam, LPARAM lParam) +{ + if (accounts->statusCount == 0) + return 0; + + OPTIONSDIALOGPAGE odp = {0}; + odp.cbSize = sizeof(odp); + odp.hInstance = g_hInst; + odp.flags = ODPF_BOLDGROUPS; + + if (!ServiceExists(MS_SS_GETPROFILECOUNT)) { + odp.pszTitle = LPGEN("Status"); + odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_STATUS); + odp.pfnDlgProc = DlgStatusOptionsProc; + Options_AddPage(wParam, &odp); + } + + if (accounts->statusMsgCount == 0) + return 0; + + odp.position = 870000000; + odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_GENERAL); + odp.pszTitle = LPGEN("Status Messages"); + odp.pszGroup = LPGEN("Status"); + odp.pszTab = LPGEN("General"); + odp.pfnDlgProc = DlgOptionsProc; + Options_AddPage(wParam, &odp); + + odp.pszTab = LPGEN("Variables"); + odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_VARIABLES); + odp.pfnDlgProc = DlgVariablesOptionsProc; + Options_AddPage(wParam, &odp); + + odp.pszTab = LPGEN("Advanced"); + odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_ADVANCED); + odp.pfnDlgProc = DlgAdvancedOptionsProc; + odp.flags |= ODPF_EXPERTONLY; + Options_AddPage(wParam, &odp); + + return 0; +} diff --git a/plugins/SimpleStatusMsg/src/resource.h b/plugins/SimpleStatusMsg/src/resource.h new file mode 100644 index 0000000000..137327acac --- /dev/null +++ b/plugins/SimpleStatusMsg/src/resource.h @@ -0,0 +1,126 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by resource.rc +// +#define IDD_COPY 101 +#define IDD_AWAYMSGBOX 102 +#define IDD_OPT_GENERAL 103 +#define IDD_READAWAYMSG 104 +#define IDI_CROSS 105 +#define IDI_HISTORY 106 +#define IDI_MESSAGE 107 +#define IDI_PLUS 108 +#define IDI_CHIST 109 +#define IDI_COPY 110 +#define IDI_CSMSG 111 +#define IDR_EDITMENU 112 +#define IDD_OPT_ADVANCED 113 +#define IDD_OPT_STATUS 114 +#define IDI_GOTOURL 115 +#define IDD_OPT_VARIABLES 116 +#define IDC_BOPTDEF 1000 +#define IDC_BOPTHIST 1001 +#define IDC_OK 1002 +#define IDC_EDIT1 1003 +#define IDC_CANCEL 1004 +#define IDC_ROPTMSG1 1005 +#define IDC_ROPTMSG2 1006 +#define IDC_ROPTMSG3 1007 +#define IDC_ROPTMSG4 1008 +#define IDC_ROPTMSG5 1009 +#define IDC_SPECSET 1010 +#define IDC_MSG 1011 +#define IDC_RETRIEVING 1012 +#define IDC_CLEAVEWINAMP 1013 +#define IDC_COPY 1014 +#define IDC_CSTATUSLIST 1015 +#define IDC_CICONS2 1016 +#define IDC_CICONS1 1017 +#define IDC_CPROFILES 1018 +#define IDC_EMAXHIST 1019 +#define IDC_ETIMEOUT 1020 +#define IDC_CSHOWGURL 1021 +#define IDC_SMAXHIST 1022 +#define IDC_CCLOSEWND 1023 +#define IDC_STIMEOUT 1024 +#define IDC_CBOPTSTATUS 1025 +#define IDC_COPTMSG1 1026 +#define IDC_OPTEDIT1 1027 +#define IDC_CBOPTPROTO 1028 +#define IDC_ROPTPROTO1 1029 +#define IDC_ROPTPROTO2 1030 +#define IDC_ROPTPROTO3 1031 +#define IDC_CREMOVECR 1032 +#define IDC_CSHOWCOPY 1033 +#define IDC_EMAXLENGTH 1034 +#define IDC_SMAXLENGTH 1035 +#define IDC_COPTMSG2 1036 +#define IDC_VARSHELP 1037 +#define IDC_CBOPTBUTTONS 1038 +#define IDC_CSHOWSMSG 1039 +#define IDC_CRPOSWND 1040 +#define IDC_ESECUPDTMSG 1041 +#define IDC_CUPDATEMSG 1042 +#define IDC_SSECUPDTMSG 1043 +#define IDC_BOPTPROTO 1044 +#define IDC_BOPTSTATUS 1045 +#define IDC_LISTPROTO 1046 +#define IDC_LISTSTATUS 1047 +#define IDC_ESETSTATUS 1048 +#define IDC_SSETSTATUS 1049 +#define IDC_NOTE1 1050 +#define IDC_POPUPDLG 1051 +#define IDC_ROPTPROTO4 1052 +#define IDC_BADD 1053 +#define IDC_BDEL 1054 +#define IDC_BCLEAR 1055 +#define IDC_CNOIDLE 1056 +#define IDC_CNOICQREQ 1057 +#define IDC_CVARIABLES 1058 +#define IDC_CDATEPARSING 1059 +#define IDC_MAXLENGTH 1060 +#define IDM_VDATE 40002 +#define IDM_VWINAMPSONG 40003 +#define IDM_VRANDXY 40004 +#define IDM_VTIME 40006 +#define IDM_CUT 40007 +#define IDM_COPY 40008 +#define IDM_PASTE 40009 +#define IDM_DELETE 40010 +#define IDM_SELECTALL 40011 +#define ID__FORTUNE 40012 +#define ID__FORTUNEAWAYMSG_PROTOFORTUNEMSG 40013 +#define ID__FORTUNEAWAYMSG_STATUSFORTUNEMSG 40014 +#define ID__VARIABLES_LSSTATUSCONTACT 40015 +#define ID__VARIABLES_LSDATECONTACTFORMAT 40016 +#define ID__VARIABLES_CINFOCONTACTPROPERTY 40017 +#define ID__VARIABLES_MSTATUSPROTOCOL 40018 +#define ID__VARIABLES_LSTIMECONTACTFORMAT 40019 +#define ID__VARIABLES_DBSETTINGCONTACTMODULESETTING 40020 +#define ID__VARIABLES_TXTFILEFILELINE 40021 +#define ID__VARIABLES_IFCONDITIONTRUEFALSE 40022 +#define ID__VARIABLES_STRCMPSTRING1STRING2 40023 +#define ID__VARIABLES_STRICMPSTRING1STRING2 40024 +#define ID__VARIABLES_CDATEFORMAT 40025 +#define ID__VARIABLES_CTIMEFORMAT 40026 +#define ID__VARIABLES_REPLACESUBSTRING1STRING2 40027 +#define ID__VARIABLES_LOWERSTRING 40028 +#define ID__VARIABLES_UPPERSTRING 40029 +#define ID__VARIABLES_CONTACTSTRINGPROPERTY 40030 +#define ID__VARIABLES_SCROLLSTRINGNUMCHARSNUMCHARS 40031 +#define ID__VARIABLES_MOREVARIABLES 40032 +#define ID__VARIABLES 40033 +#define ID__FORTUNEAWAYMSG 40034 +#define IDM_VRANDMSG 40035 +#define IDM_VRANDDEFMSG 40036 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 117 +#define _APS_NEXT_COMMAND_VALUE 40037 +#define _APS_NEXT_CONTROL_VALUE 1061 +#define _APS_NEXT_SYMED_VALUE 100 +#endif +#endif diff --git a/plugins/SimpleStatusMsg/src/simplestatusmsg.h b/plugins/SimpleStatusMsg/src/simplestatusmsg.h new file mode 100644 index 0000000000..d66aba197c --- /dev/null +++ b/plugins/SimpleStatusMsg/src/simplestatusmsg.h @@ -0,0 +1,105 @@ +/* + +Simple Status Message plugin for Miranda IM +Copyright (C) 2006-2011 Bartosz 'Dezeath' Bia³ek, (C) 2005 Harven + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License along +with this program; if not, write to the Free Software Foundation, Inc., +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +*/ +#ifndef SIMPLESTATUSMSG_H__ +#define SIMPLESTATUSMSG_H__ 1 + +typedef struct tagACCOUNTS +{ + PROTOACCOUNT **pa; + int count; + int statusCount; + DWORD statusFlags; + int statusMsgCount; + DWORD statusMsgFlags; +} +PROTOACCOUNTS; + +extern PROTOACCOUNTS *accounts; + +#define DLG_SHOW_STATUS 1 +#define DLG_SHOW_STATUS_ICONS 2 +#define DLG_SHOW_LIST_ICONS 4 +#define DLG_SHOW_BUTTONS 8 +#define DLG_SHOW_BUTTONS_INLIST 16 +#define DLG_SHOW_BUTTONS_FLAT 32 +#define DLG_SHOW_STATUS_PROFILES 64 +//NOTE: MAX 128 +#define DLG_SHOW_DEFAULT DLG_SHOW_STATUS | DLG_SHOW_STATUS_ICONS | DLG_SHOW_LIST_ICONS | DLG_SHOW_BUTTONS + +#define STATUS_SHOW_DLG 1 +#define STATUS_EMPTY_MSG 2 +#define STATUS_DEFAULT_MSG 4 +#define STATUS_LAST_MSG 8 +#define STATUS_THIS_MSG 16 +#define STATUS_LAST_STATUS_MSG 32 +#define STATUS_DEFAULT STATUS_SHOW_DLG | STATUS_LAST_MSG + +#define PROTO_NO_MSG 1 +#define PROTO_THIS_MSG 2 +#define PROTO_POPUPDLG 4 +#define PROTO_NOCHANGE 8 +#define PROTO_DEFAULT PROTO_NOCHANGE + +struct MsgBoxInitData +{ + char *m_szProto; + int m_iStatus; + int m_iStatusModes; + int m_iStatusMsgModes; + BOOL m_bOnEvent; + BOOL m_bOnStartup; +}; + +extern HINSTANCE g_hInst; +extern HWND hwndSAMsgDialog; + +#define MS_SIMPLESTATUSMSG_SHOWDIALOGINT "SimpleStatusMsg/ShowDialogInternal" // internal use ONLY + +/* awaymsg.cpp */ +int LoadAwayMsgModule(void); +int AwayMsgPreShutdown(void); + +/* main.cpp */ +void SetStatusMessage(const char *szProto, int initial_status_mode, int status_mode, TCHAR *message, BOOL on_startup); + +/* msgbox.cpp */ +INT_PTR CALLBACK AwayMsgBoxDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); + +/* options.cpp */ +int InitOptions(WPARAM wParam, LPARAM lParam); + +/* utils.cpp */ +void IconsInit(void); +HICON LoadIconEx(const char* name); +HANDLE GetIconHandle(int iconId); +void ReleaseIconEx(const char* name); +HANDLE HookEventEx(const char *szEvent, MIRANDAHOOK hookProc); +void UnhookEvents(void); +HANDLE HookProtoEvent(const char *szModule, const char *szEvent, MIRANDAHOOKPARAM hookProc); +void UnhookProtoEvents(void); +HANDLE CreateServiceFunctionEx(const char *name, MIRANDASERVICE serviceProc); +void DestroyServiceFunctionsEx(void); +int GetRandom(int from, int to); +const TCHAR *GetDefaultMessage(int status); +const char *StatusModeToDbSetting(int status, const char *suffix); +int GetCurrentStatus(const char *szProto); +int GetStartupStatus(const char *szProto); + +#endif // SIMPLESTATUSMSG_H__ diff --git a/plugins/SimpleStatusMsg/src/utils.cpp b/plugins/SimpleStatusMsg/src/utils.cpp new file mode 100644 index 0000000000..549dd957bc --- /dev/null +++ b/plugins/SimpleStatusMsg/src/utils.cpp @@ -0,0 +1,226 @@ +/* + +Simple Status Message plugin for Miranda IM +Copyright (C) 2006-2011 Bartosz 'Dezeath' Bia³ek, (C) 2005 Harven + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License along +with this program; if not, write to the Free Software Foundation, Inc., +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +*/ +#include "commonheaders.h" +#include "simplestatusmsg.h" + +static HANDLE *hHookList = NULL; +static HANDLE *hProtoHookList = NULL; +static HANDLE *hServiceList = NULL; +static int HookCount = 0; +static int ProtoHookCount = 0; +static int ServiceCount = 0; + +struct tagiconList +{ + const TCHAR *szDescr; + const char *szName; + int defIconID; +} +static const iconList[] = +{ + { LPGENT("Delete Selected"), "cross", IDI_CROSS }, + { LPGENT("Recent Message"), "recent", IDI_HISTORY }, + { LPGENT("Predefined Message"), "predef", IDI_MESSAGE }, + { LPGENT("Add to Predefined"), "add", IDI_PLUS }, + { LPGENT("Clear History"), "clear", IDI_CHIST }, + { LPGENT("Copy Away Message"), "copy", IDI_COPY }, + { LPGENT("Change Status Message"), "csmsg", IDI_CSMSG, }, + { LPGENT("Go to URL in Away Message"), "gotourl", IDI_GOTOURL } +}; + +HANDLE hIconLibItem[SIZEOF(iconList)]; + +void IconsInit(void) +{ + SKINICONDESC sid = {0}; + char szFile[MAX_PATH]; + char szSettingName[100]; + + GetModuleFileNameA(g_hInst, szFile, MAX_PATH); + sid.cbSize = sizeof(SKINICONDESC); + sid.flags = SIDF_TCHAR; + sid.pszDefaultFile = szFile; + sid.ptszSection = _T("Simple Status Message"); + for (int i = 0; i < SIZEOF(iconList); i++) + { + mir_snprintf(szSettingName, SIZEOF(szSettingName), "SimpleStatusMsg_%s", iconList[i].szName); + sid.pszName = szSettingName; + sid.ptszDescription = (TCHAR*)iconList[i].szDescr; + sid.iDefaultIndex = -iconList[i].defIconID; + hIconLibItem[i] = Skin_AddIcon(&sid); + } +} + +HICON LoadIconEx(const char* name) +{ + char szSettingName[100]; + mir_snprintf(szSettingName, sizeof(szSettingName), "SimpleStatusMsg_%s", name); + return (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)szSettingName); +} + +HANDLE GetIconHandle(int iconId) +{ + for(int i = 0; i < SIZEOF(iconList); i++) + if (iconList[i].defIconID == iconId) return hIconLibItem[i]; + return NULL; +} + +void ReleaseIconEx(const char* name) +{ + char szSettingName[100]; + mir_snprintf(szSettingName, sizeof(szSettingName), "SimpleStatusMsg_%s", name); + CallService(MS_SKIN2_RELEASEICON, 0, (LPARAM)szSettingName); +} + +HANDLE HookEventEx(const char *szEvent, MIRANDAHOOK hookProc) +{ + HookCount++; + hHookList = (HANDLE *)mir_realloc(hHookList, sizeof(HANDLE) * HookCount); + return hHookList[HookCount - 1] = HookEvent(szEvent, hookProc); +} + +void UnhookEvents(void) +{ + if (hHookList == NULL) return; + for (int i = 0; i < HookCount; ++i) + if (hHookList[i] != NULL) UnhookEvent(hHookList[i]); + mir_free(hHookList); + hHookList = NULL; + HookCount = 0; +} + +HANDLE HookProtoEvent(const char *szModule, const char *szEvent, MIRANDAHOOKPARAM hookProc) +{ + char szProtoEvent[MAXMODULELABELLENGTH]; + mir_snprintf(szProtoEvent, sizeof(szProtoEvent), "%s%s", szModule, szEvent); + ProtoHookCount++; + hProtoHookList = (HANDLE *)mir_realloc(hProtoHookList, sizeof(HANDLE) * ProtoHookCount); + return hProtoHookList[ProtoHookCount - 1] = HookEventParam(szProtoEvent, hookProc, (LPARAM)szModule); +} + +void UnhookProtoEvents(void) +{ + if (hProtoHookList == NULL) return; + for (int i = 0; i < ProtoHookCount; ++i) + if (hProtoHookList[i] != NULL) UnhookEvent(hProtoHookList[i]); + mir_free(hProtoHookList); + hProtoHookList = NULL; + ProtoHookCount = 0; +} + +HANDLE CreateServiceFunctionEx(const char *name, MIRANDASERVICE serviceProc) +{ + ServiceCount++; + hServiceList = (HANDLE *)mir_realloc(hServiceList, sizeof(HANDLE) * ServiceCount); + return hServiceList[ServiceCount - 1] = CreateServiceFunction(name, serviceProc); +} + +void DestroyServiceFunctionsEx(void) +{ + for (int i = 0; i < ServiceCount; ++i) + if (hServiceList[i] != NULL) DestroyServiceFunction(hServiceList[i]); + mir_free(hServiceList); + ServiceCount = 0; +} + +// Generate random number in a specified range +int GetRandom(int from, int to) +{ + if ((to - from) < 1) return from; + unsigned randnum; + CallService(MS_UTILS_GETRANDOM, sizeof(randnum), (LPARAM)&randnum); + return ((randnum % (to - from + 1)) + from); +} + +// From SRAway module +const TCHAR *GetDefaultMessage(int status) +{ + switch (status) + { + case ID_STATUS_AWAY: return TranslateT("I've been away since %time%."); + case ID_STATUS_NA: return TranslateT("Give it up, I'm not in!"); + case ID_STATUS_OCCUPIED: return TranslateT("Not right now."); + case ID_STATUS_DND: return TranslateT("Give a guy some peace, would ya?"); + case ID_STATUS_FREECHAT: return TranslateT("I'm a chatbot!"); + case ID_STATUS_ONLINE: return TranslateT("Yep, I'm here."); + case ID_STATUS_OFFLINE: return TranslateT("Nope, not here."); + case ID_STATUS_INVISIBLE: return TranslateT("I'm hiding from the mafia."); + case ID_STATUS_ONTHEPHONE: return TranslateT("That'll be the phone."); + case ID_STATUS_OUTTOLUNCH: return TranslateT("Mmm...food."); + case ID_STATUS_IDLE: return TranslateT("idleeeeeeee"); + } + return NULL; +} + +const char *StatusModeToDbSetting(int status, const char *suffix) +{ + const char *prefix; + static char str[64]; + + switch (status) + { + case ID_STATUS_AWAY: prefix = "Away"; break; + case ID_STATUS_NA: prefix = "Na"; break; + case ID_STATUS_DND: prefix = "Dnd"; break; + case ID_STATUS_OCCUPIED: prefix = "Occupied"; break; + case ID_STATUS_FREECHAT: prefix = "FreeChat"; break; + case ID_STATUS_ONLINE: prefix = "On"; break; + case ID_STATUS_OFFLINE: prefix = "Off"; break; + case ID_STATUS_INVISIBLE: prefix = "Inv"; break; + case ID_STATUS_ONTHEPHONE: prefix = "Otp"; break; + case ID_STATUS_OUTTOLUNCH: prefix = "Otl"; break; + case ID_STATUS_IDLE: prefix = "Idl"; break; + default: return NULL; + } + mir_snprintf(str, SIZEOF(str), "%s%s", prefix, suffix); + return str; +} + +int GetCurrentStatus(const char *szProto) +{ + if (szProto) + { + char szSetting[80]; + mir_snprintf(szSetting, SIZEOF(szSetting), "Cur%sStatus", szProto); + return (int)DBGetContactSettingWord(NULL, "SimpleStatusMsg", szSetting, ID_STATUS_OFFLINE); + + } + return CallService(MS_CLIST_GETSTATUSMODE, 0, 0); +} + +int GetStartupStatus(const char *szProto) +{ + if (szProto) + { + int status_mode; + char szSetting[80]; + + mir_snprintf(szSetting, SIZEOF(szSetting), "Startup%sStatus", szProto); + status_mode = DBGetContactSettingWord(NULL, "SimpleStatusMsg", szSetting, ID_STATUS_OFFLINE); + if (status_mode == ID_STATUS_CURRENT) + { + // load status used for this proto last time + mir_snprintf(szSetting, SIZEOF(szSetting), "Last%sStatus", szProto); + status_mode = DBGetContactSettingWord(NULL, "SimpleStatusMsg", szSetting, ID_STATUS_OFFLINE); + } + return status_mode; + } + return (int)DBGetContactSettingWord(NULL, "SimpleStatusMsg", "StartupStatus", ID_STATUS_OFFLINE); +} diff --git a/plugins/SimpleStatusMsg/utils.cpp b/plugins/SimpleStatusMsg/utils.cpp deleted file mode 100644 index 549dd957bc..0000000000 --- a/plugins/SimpleStatusMsg/utils.cpp +++ /dev/null @@ -1,226 +0,0 @@ -/* - -Simple Status Message plugin for Miranda IM -Copyright (C) 2006-2011 Bartosz 'Dezeath' Bia³ek, (C) 2005 Harven - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along -with this program; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -*/ -#include "commonheaders.h" -#include "simplestatusmsg.h" - -static HANDLE *hHookList = NULL; -static HANDLE *hProtoHookList = NULL; -static HANDLE *hServiceList = NULL; -static int HookCount = 0; -static int ProtoHookCount = 0; -static int ServiceCount = 0; - -struct tagiconList -{ - const TCHAR *szDescr; - const char *szName; - int defIconID; -} -static const iconList[] = -{ - { LPGENT("Delete Selected"), "cross", IDI_CROSS }, - { LPGENT("Recent Message"), "recent", IDI_HISTORY }, - { LPGENT("Predefined Message"), "predef", IDI_MESSAGE }, - { LPGENT("Add to Predefined"), "add", IDI_PLUS }, - { LPGENT("Clear History"), "clear", IDI_CHIST }, - { LPGENT("Copy Away Message"), "copy", IDI_COPY }, - { LPGENT("Change Status Message"), "csmsg", IDI_CSMSG, }, - { LPGENT("Go to URL in Away Message"), "gotourl", IDI_GOTOURL } -}; - -HANDLE hIconLibItem[SIZEOF(iconList)]; - -void IconsInit(void) -{ - SKINICONDESC sid = {0}; - char szFile[MAX_PATH]; - char szSettingName[100]; - - GetModuleFileNameA(g_hInst, szFile, MAX_PATH); - sid.cbSize = sizeof(SKINICONDESC); - sid.flags = SIDF_TCHAR; - sid.pszDefaultFile = szFile; - sid.ptszSection = _T("Simple Status Message"); - for (int i = 0; i < SIZEOF(iconList); i++) - { - mir_snprintf(szSettingName, SIZEOF(szSettingName), "SimpleStatusMsg_%s", iconList[i].szName); - sid.pszName = szSettingName; - sid.ptszDescription = (TCHAR*)iconList[i].szDescr; - sid.iDefaultIndex = -iconList[i].defIconID; - hIconLibItem[i] = Skin_AddIcon(&sid); - } -} - -HICON LoadIconEx(const char* name) -{ - char szSettingName[100]; - mir_snprintf(szSettingName, sizeof(szSettingName), "SimpleStatusMsg_%s", name); - return (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)szSettingName); -} - -HANDLE GetIconHandle(int iconId) -{ - for(int i = 0; i < SIZEOF(iconList); i++) - if (iconList[i].defIconID == iconId) return hIconLibItem[i]; - return NULL; -} - -void ReleaseIconEx(const char* name) -{ - char szSettingName[100]; - mir_snprintf(szSettingName, sizeof(szSettingName), "SimpleStatusMsg_%s", name); - CallService(MS_SKIN2_RELEASEICON, 0, (LPARAM)szSettingName); -} - -HANDLE HookEventEx(const char *szEvent, MIRANDAHOOK hookProc) -{ - HookCount++; - hHookList = (HANDLE *)mir_realloc(hHookList, sizeof(HANDLE) * HookCount); - return hHookList[HookCount - 1] = HookEvent(szEvent, hookProc); -} - -void UnhookEvents(void) -{ - if (hHookList == NULL) return; - for (int i = 0; i < HookCount; ++i) - if (hHookList[i] != NULL) UnhookEvent(hHookList[i]); - mir_free(hHookList); - hHookList = NULL; - HookCount = 0; -} - -HANDLE HookProtoEvent(const char *szModule, const char *szEvent, MIRANDAHOOKPARAM hookProc) -{ - char szProtoEvent[MAXMODULELABELLENGTH]; - mir_snprintf(szProtoEvent, sizeof(szProtoEvent), "%s%s", szModule, szEvent); - ProtoHookCount++; - hProtoHookList = (HANDLE *)mir_realloc(hProtoHookList, sizeof(HANDLE) * ProtoHookCount); - return hProtoHookList[ProtoHookCount - 1] = HookEventParam(szProtoEvent, hookProc, (LPARAM)szModule); -} - -void UnhookProtoEvents(void) -{ - if (hProtoHookList == NULL) return; - for (int i = 0; i < ProtoHookCount; ++i) - if (hProtoHookList[i] != NULL) UnhookEvent(hProtoHookList[i]); - mir_free(hProtoHookList); - hProtoHookList = NULL; - ProtoHookCount = 0; -} - -HANDLE CreateServiceFunctionEx(const char *name, MIRANDASERVICE serviceProc) -{ - ServiceCount++; - hServiceList = (HANDLE *)mir_realloc(hServiceList, sizeof(HANDLE) * ServiceCount); - return hServiceList[ServiceCount - 1] = CreateServiceFunction(name, serviceProc); -} - -void DestroyServiceFunctionsEx(void) -{ - for (int i = 0; i < ServiceCount; ++i) - if (hServiceList[i] != NULL) DestroyServiceFunction(hServiceList[i]); - mir_free(hServiceList); - ServiceCount = 0; -} - -// Generate random number in a specified range -int GetRandom(int from, int to) -{ - if ((to - from) < 1) return from; - unsigned randnum; - CallService(MS_UTILS_GETRANDOM, sizeof(randnum), (LPARAM)&randnum); - return ((randnum % (to - from + 1)) + from); -} - -// From SRAway module -const TCHAR *GetDefaultMessage(int status) -{ - switch (status) - { - case ID_STATUS_AWAY: return TranslateT("I've been away since %time%."); - case ID_STATUS_NA: return TranslateT("Give it up, I'm not in!"); - case ID_STATUS_OCCUPIED: return TranslateT("Not right now."); - case ID_STATUS_DND: return TranslateT("Give a guy some peace, would ya?"); - case ID_STATUS_FREECHAT: return TranslateT("I'm a chatbot!"); - case ID_STATUS_ONLINE: return TranslateT("Yep, I'm here."); - case ID_STATUS_OFFLINE: return TranslateT("Nope, not here."); - case ID_STATUS_INVISIBLE: return TranslateT("I'm hiding from the mafia."); - case ID_STATUS_ONTHEPHONE: return TranslateT("That'll be the phone."); - case ID_STATUS_OUTTOLUNCH: return TranslateT("Mmm...food."); - case ID_STATUS_IDLE: return TranslateT("idleeeeeeee"); - } - return NULL; -} - -const char *StatusModeToDbSetting(int status, const char *suffix) -{ - const char *prefix; - static char str[64]; - - switch (status) - { - case ID_STATUS_AWAY: prefix = "Away"; break; - case ID_STATUS_NA: prefix = "Na"; break; - case ID_STATUS_DND: prefix = "Dnd"; break; - case ID_STATUS_OCCUPIED: prefix = "Occupied"; break; - case ID_STATUS_FREECHAT: prefix = "FreeChat"; break; - case ID_STATUS_ONLINE: prefix = "On"; break; - case ID_STATUS_OFFLINE: prefix = "Off"; break; - case ID_STATUS_INVISIBLE: prefix = "Inv"; break; - case ID_STATUS_ONTHEPHONE: prefix = "Otp"; break; - case ID_STATUS_OUTTOLUNCH: prefix = "Otl"; break; - case ID_STATUS_IDLE: prefix = "Idl"; break; - default: return NULL; - } - mir_snprintf(str, SIZEOF(str), "%s%s", prefix, suffix); - return str; -} - -int GetCurrentStatus(const char *szProto) -{ - if (szProto) - { - char szSetting[80]; - mir_snprintf(szSetting, SIZEOF(szSetting), "Cur%sStatus", szProto); - return (int)DBGetContactSettingWord(NULL, "SimpleStatusMsg", szSetting, ID_STATUS_OFFLINE); - - } - return CallService(MS_CLIST_GETSTATUSMODE, 0, 0); -} - -int GetStartupStatus(const char *szProto) -{ - if (szProto) - { - int status_mode; - char szSetting[80]; - - mir_snprintf(szSetting, SIZEOF(szSetting), "Startup%sStatus", szProto); - status_mode = DBGetContactSettingWord(NULL, "SimpleStatusMsg", szSetting, ID_STATUS_OFFLINE); - if (status_mode == ID_STATUS_CURRENT) - { - // load status used for this proto last time - mir_snprintf(szSetting, SIZEOF(szSetting), "Last%sStatus", szProto); - status_mode = DBGetContactSettingWord(NULL, "SimpleStatusMsg", szSetting, ID_STATUS_OFFLINE); - } - return status_mode; - } - return (int)DBGetContactSettingWord(NULL, "SimpleStatusMsg", "StartupStatus", ID_STATUS_OFFLINE); -} diff --git a/plugins/SmileyAdd/AniSmileyObject.cpp b/plugins/SmileyAdd/AniSmileyObject.cpp deleted file mode 100644 index 42a63d3549..0000000000 --- a/plugins/SmileyAdd/AniSmileyObject.cpp +++ /dev/null @@ -1,450 +0,0 @@ -/* -Miranda SmileyAdd Plugin -Copyright (C) 2008 - 2011 Boris Krasnovskiy All Rights Reserved - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation version 2 -of the License. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#include "general.h" -#include "SmileyBase.h" -#include "m_smileyadd.h" -#include "smileys.h" -#include "options.h" - -#include - - -class CAniSmileyObject; - -static int CompareAniSmiley(const CAniSmileyObject* p1, const CAniSmileyObject* p2) -{ - return (int)((char*)p2 - (char*)p1); -} - -static LIST regAniSmileys(10, CompareAniSmiley); - -static UINT_PTR timerId; -static void CALLBACK timerProc(HWND, UINT, UINT_PTR, DWORD); - -static void CALLBACK sttMainThreadCallback( PVOID ) -{ - if (timerId == 0xffffffff) - timerId = SetTimer(NULL, 0, 100, (TIMERPROC)timerProc); -} - - -class CAniSmileyObject : public ISmileyBase -{ -private: - typedef enum { animStdOle, animDrctRichEd, animHpp } AnimType; - - POINTL m_rectOrig; - SIZEL m_rectExt; - - COLORREF m_bkg; - - SmileyType* m_sml; - ImageBase* m_img; - unsigned m_nFramePosition; - - long m_counter; - unsigned m_richFlags; - long m_lastObjNum; - - AnimType m_animtype; - bool m_allowAni; - -public: - CAniSmileyObject(SmileyType* sml, COLORREF clr, bool ishpp) - { - m_allowAni = false; - m_animtype = ishpp ? animHpp : animStdOle; - m_bkg = clr; - - m_rectOrig.x = 0; - m_rectOrig.y = 0; - m_rectExt.cx = 0; - m_rectExt.cy = 0; - - m_richFlags = 0; - m_lastObjNum = 0; - - m_sml = sml; - m_img = NULL; - m_nFramePosition = 0; - m_counter = 0; - } - - ~CAniSmileyObject(void) - { - UnloadSmiley(); - } - - void LoadSmiley(void) - { - if (m_img != NULL) return; - - m_img = m_sml->CreateCachedImage(); - if (m_img && m_img->IsAnimated() && opt.AnimateDlg) - { - m_nFramePosition = 0; - m_img->SelectFrame(m_nFramePosition); - long frtm = m_img->GetFrameDelay(); - m_counter = frtm / 10 + ((frtm % 10) >= 5); - - regAniSmileys.insert(this); - if (timerId == 0) - { - timerId = 0xffffffff; - CallFunctionAsync(sttMainThreadCallback, NULL); - } - } - else - m_nFramePosition = m_sml->GetStaticFrame(); - } - - void UnloadSmiley(void) - { - regAniSmileys.remove(this); - - if (timerId && (timerId+1) && regAniSmileys.getCount() == 0) - { - KillTimer(NULL, timerId); - timerId = 0; - } - if (m_img) m_img->Release(); - m_img = NULL; - } - - void GetDrawingProp(void) - { - if (m_hwnd == NULL) return; - - IRichEditOle* RichEditOle; - if (SendMessage(m_hwnd, EM_GETOLEINTERFACE, 0, (LPARAM)&RichEditOle) == 0) - return; - - REOBJECT reObj = {0}; - reObj.cbStruct = sizeof(REOBJECT); - - HRESULT hr = RichEditOle->GetObject(m_lastObjNum, &reObj, REO_GETOBJ_NO_INTERFACES); - if (hr == S_OK && reObj.dwUser == (DWORD)(ISmileyBase*)this && reObj.clsid == CLSID_NULL) - { - m_richFlags = reObj.dwFlags; - } - else - { - long objectCount = RichEditOle->GetObjectCount(); - for (long i = objectCount; i--; ) - { - HRESULT hr = RichEditOle->GetObject(i, &reObj, REO_GETOBJ_NO_INTERFACES); - if (FAILED(hr)) continue; - - if (reObj.dwUser == (DWORD)(ISmileyBase*)this && reObj.clsid == CLSID_NULL) - { - m_lastObjNum = i; - m_richFlags = reObj.dwFlags; - break; - } - } - } - RichEditOle->Release(); - - if ((m_richFlags & REO_SELECTED) == 0) - { - CHARRANGE sel; - SendMessage(m_hwnd, EM_EXGETSEL, 0, (LPARAM)&sel); - if (reObj.cp >= sel.cpMin && reObj.cp < sel.cpMax) - m_richFlags |= REO_INVERTEDSELECT; - else - m_richFlags &= ~REO_INVERTEDSELECT; - } - } - - - void DoDirectDraw(HDC hdc) - { - HBITMAP hBmp = CreateCompatibleBitmap(hdc, m_rectExt.cx, m_rectExt.cy); - HDC hdcMem = CreateCompatibleDC(hdc); - HANDLE hOld = SelectObject(hdcMem, hBmp); - - RECT rc; - rc.left = m_rectExt.cx - m_sizeExtent.cx; - rc.top = m_rectExt.cy - m_sizeExtent.cy; - rc.right = rc.left + m_sizeExtent.cx; - rc.bottom = rc.top + m_sizeExtent.cy; - - HBRUSH hbr = CreateSolidBrush(m_bkg); - RECT frc = { 0, 0, m_rectExt.cx, m_rectExt.cy }; - FillRect(hdcMem, &frc, hbr); - DeleteObject(hbr); - - m_img->DrawInternal(hdcMem, rc.left, rc.top, m_sizeExtent.cx - 1, m_sizeExtent.cy - 1); - - if (m_richFlags & REO_SELECTED) - { - HBRUSH hbr = CreateSolidBrush(m_bkg ^ 0xFFFFFF); - FrameRect(hdcMem, &rc, hbr); - DeleteObject(hbr); - } - - if (m_richFlags & REO_INVERTEDSELECT) - InvertRect(hdcMem, &rc); - - BitBlt(hdc, m_rectOrig.x, m_rectOrig.y, m_rectExt.cx, m_rectExt.cy, hdcMem, 0, 0, SRCCOPY); - - SelectObject(hdcMem, hOld); - DeleteObject(hBmp); - DeleteDC(hdcMem); - } - - void DrawOnRichEdit(void) - { - HDC hdc = GetDC(m_hwnd); - if (RectVisible(hdc, &m_orect)) - { - RECT crct; - GetClientRect(m_hwnd, &crct); - - HRGN hrgnOld = CreateRectRgnIndirect(&crct); - int res = GetClipRgn(hdc, hrgnOld); - - HRGN hrgn = CreateRectRgnIndirect(&crct); - SelectClipRgn(hdc, hrgn); - DeleteObject(hrgn); - - DoDirectDraw(hdc); - - SelectClipRgn(hdc, res < 1 ? NULL : hrgnOld); - DeleteObject(hrgnOld); - } - else - { - m_visible = false; - m_allowAni = false; - UnloadSmiley(); - } - ReleaseDC(m_hwnd, hdc); - } - - void DrawOnHPP(void) - { - FVCNDATA_NMHDR nmh = {0}; - nmh.code = NM_FIREVIEWCHANGE; - nmh.hwndFrom = m_hwnd; - - nmh.cbSize = sizeof(nmh); - nmh.bEvent = FVCN_PREFIRE; - nmh.bAction = FVCA_DRAW; - nmh.rcRect = m_orect; - SendMessage(GetParent(m_hwnd), WM_NOTIFY, (WPARAM)m_hwnd, (LPARAM)&nmh); - - switch (nmh.bAction) - { - case FVCA_DRAW: - // support for pseudo-edit mode and event details - m_animtype = m_dirAniAllow ? animDrctRichEd : animStdOle; - GetDrawingProp(); - DrawOnRichEdit(); - break; - - case FVCA_CUSTOMDRAW: - m_rectExt.cy = nmh.rcRect.bottom - nmh.rcRect.top; - m_rectExt.cx = nmh.rcRect.right - nmh.rcRect.left; - m_rectOrig.x = nmh.rcRect.left; - m_rectOrig.y = nmh.rcRect.top; - - m_bkg = nmh.clrBackground; - - DoDirectDraw(nmh.hDC); - - nmh.bEvent = FVCN_POSTFIRE; - SendMessage(GetParent(m_hwnd), WM_NOTIFY, (WPARAM)m_hwnd, (LPARAM)&nmh); - break; - - case FVCA_SKIPDRAW: - break; - - case FVCA_NONE: - m_visible = false; - break; - - default: - break; - } - } - - void ProcessTimerTick(void) - { - if (m_visible && m_img && --m_counter <= 0) - { - m_nFramePosition = m_img->SelectNextFrame(m_nFramePosition); - long frtm = m_img->GetFrameDelay(); - m_counter = frtm / 10 + ((frtm % 10) >= 5); - - switch (m_animtype) - { - case animStdOle: - if (m_allowAni) SendOnViewChange(); - else - { - m_visible = false; - UnloadSmiley(); - } - m_allowAni = false; - break; - - case animDrctRichEd: - DrawOnRichEdit(); - break; - - case animHpp: - DrawOnHPP(); - break; - } - } - } - - void SetPosition(HWND hwnd, LPCRECT lpRect) - { - ISmileyBase::SetPosition(hwnd, lpRect); - - m_allowAni = m_visible; - - if (m_visible) LoadSmiley(); - else UnloadSmiley(); - - if (lpRect == NULL) return; - if (m_animtype == animStdOle) - { - m_animtype = animDrctRichEd; - GetDrawingProp(); - } - - if (lpRect->top == -1) - { - m_rectOrig.x = lpRect->left; - m_rectOrig.y = lpRect->bottom - m_sizeExtent.cy; - m_rectExt.cy = m_sizeExtent.cy; - } - else if (lpRect->bottom == -1) - { - m_rectOrig.x = lpRect->left; - m_rectOrig.y = lpRect->top; - } - else - { - m_rectOrig.x = lpRect->left; - m_rectOrig.y = lpRect->top; - m_rectExt.cy = lpRect->bottom - lpRect->top; - } - } - - STDMETHOD(Close)(DWORD dwSaveOption) - { - m_visible = false; - UnloadSmiley(); - - return ISmileyBase::Close(dwSaveOption); - } - - STDMETHOD(Draw)(DWORD dwAspect, LONG, void*, DVTARGETDEVICE*, HDC, - HDC hdc, LPCRECTL pRectBounds, LPCRECTL /* pRectWBounds */, - BOOL (__stdcall *)(ULONG_PTR), ULONG_PTR) - { - if (dwAspect != DVASPECT_CONTENT) return DV_E_DVASPECT; - if (pRectBounds == NULL) return E_INVALIDARG; - - LoadSmiley(); - - if (m_img == NULL) return E_FAIL; - - m_sizeExtent.cx = pRectBounds->right - pRectBounds->left; - m_sizeExtent.cy = pRectBounds->bottom - pRectBounds->top; - - m_rectExt = m_sizeExtent; - - switch (m_animtype) - { - case animDrctRichEd: - { - m_rectExt.cy = pRectBounds->bottom - m_rectOrig.y; - RECT frc = { 0, 0, m_sizeExtent.cx - 1, m_sizeExtent.cy - 1 }; - - HBITMAP hBmp = CreateCompatibleBitmap(hdc, frc.right, frc.bottom); - HDC hdcMem = CreateCompatibleDC(hdc); - HANDLE hOld = SelectObject(hdcMem, hBmp); - - HBRUSH hbr = CreateSolidBrush(m_bkg); - FillRect(hdcMem, &frc, hbr); - DeleteObject(hbr); - - m_img->DrawInternal(hdcMem, 0, 0, frc.right, frc.bottom); - - BitBlt(hdc, pRectBounds->left, pRectBounds->top, frc.right, frc.bottom, hdcMem, 0, 0, SRCCOPY); - - SelectObject(hdcMem, hOld); - DeleteObject(hBmp); - DeleteDC(hdcMem); - } - GetDrawingProp(); - break; - - case animHpp: - m_orect = *(LPRECT)pRectBounds; - - default: - m_img->DrawInternal(hdc, pRectBounds->left, pRectBounds->top, - m_sizeExtent.cx - 1, m_sizeExtent.cy - 1); - break; - } - - m_allowAni = true; - m_visible = true; - - return S_OK; - } - - STDMETHOD(SetExtent)(DWORD dwDrawAspect, SIZEL* psizel) - { - HRESULT hr = ISmileyBase::SetExtent(dwDrawAspect, psizel); - if (hr == S_OK) m_rectExt = m_sizeExtent; - return hr; - } -}; - -ISmileyBase* CreateAniSmileyObject(SmileyType* sml, COLORREF clr, bool ishpp) -{ - if (!sml->IsValid()) return NULL; - - CAniSmileyObject *obj = new CAniSmileyObject(sml, clr, ishpp); - return obj; -} - -static void CALLBACK timerProc(HWND, UINT, UINT_PTR, DWORD) -{ - for (int i=0; iProcessTimerTick(); -} - -void DestroyAniSmileys(void) -{ - if (timerId && (timerId+1)) - { - KillTimer(NULL, timerId); - timerId = 0; - } - regAniSmileys.destroy(); -} - diff --git a/plugins/SmileyAdd/Res/resource.rc b/plugins/SmileyAdd/Res/resource.rc new file mode 100644 index 0000000000..b055a7299b --- /dev/null +++ b/plugins/SmileyAdd/Res/resource.rc @@ -0,0 +1,214 @@ +// Microsoft Visual C++ generated resource script. +// +#include "..\src\resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include +#include "..\src\version.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// Neutral resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NEU) +#ifdef _WIN32 +LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL +#pragma code_page(1252) +#endif //_WIN32 + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_OPT_SMILEYS DIALOGEX 0, 0, 320, 256 +STYLE DS_SETFONT | DS_3DLOOK | DS_FIXEDSYS | WS_CHILD | WS_VISIBLE +EXSTYLE WS_EX_CONTROLPARENT +FONT 8, "MS Shell Dlg", 400, 0, 0x1 +BEGIN + GROUPBOX "Smiley Categories",IDC_STATIC,6,3,310,102 + CONTROL "",IDC_CATEGORYLIST,"SysTreeView32",TVS_DISABLEDRAGDROP | TVS_SHOWSELALWAYS | TVS_CHECKBOXES | WS_BORDER | WS_HSCROLL | WS_TABSTOP,14,13,104,83 + CONTROL "Specify Smiley Pack for each category",IDC_USESTDPACK, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,124,11,165,11 + EDITTEXT IDC_FILENAME,124,25,185,12,ES_AUTOHSCROLL,WS_EX_ACCEPTFILES + PUSHBUTTON "...",IDC_BROWSE,296,15,13,11 + LTEXT "Name:",IDC_STATIC,125,42,30,8 + LTEXT "",IDC_LIBNAME,159,41,150,11,SS_SUNKEN | SS_PATHELLIPSIS + LTEXT "Author:",IDC_STATIC,125,56,30,8 + LTEXT "",IDC_LIBAUTHOR,159,55,104,11,SS_SUNKEN | SS_PATHELLIPSIS + LTEXT "Version:",IDC_STATIC,125,70,30,8 + LTEXT "",IDC_LIBVERSION,159,70,104,11,SS_SUNKEN | SS_PATHELLIPSIS + PUSHBUTTON "Preview",IDC_SMLOPTBUTTON,270,55,37,25 + EDITTEXT IDC_NEWCATEGORY,126,85,129,13,ES_AUTOHSCROLL + PUSHBUTTON "+",IDC_ADDCATEGORY,263,84,17,15 + PUSHBUTTON "-",IDC_DELETECATEGORY,290,84,16,14 + GROUPBOX "Display",IDC_STATIC,6,106,310,54 + CONTROL "Replace only smileys surrounded by spaces",IDC_SPACES, + "Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,16,115,198,12,WS_EX_RTLREADING + CONTROL "Scale smiley to textheight",IDC_SCALETOTEXTHEIGHT, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,128,147,10 + CONTROL "Animate",IDC_ANIMATEDLG,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,218,116,98,10 + CONTROL "Disable custom smileys",IDC_DISABLECUSTOM,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,138,147,10 + GROUPBOX "Smiley Selector",IDC_STATIC,6,160,310,46 + CONTROL "Surround inserted smiley with spaces",IDC_APPENDSPACES, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,171,235,10 + CONTROL "Use first smiley for selection size",IDC_SCALEALLSMILEYS, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,182,209,10 + CONTROL "IEView style window",IDC_IEVIEWSTYLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,193,198,10 + CONTROL "",IDC_SELCLR,"ColourPicker",WS_TABSTOP,260,170,50,11 + CONTROL "Animate",IDC_ANIMATESEL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,218,193,98,10 + GROUPBOX "Input Area",IDC_STATIC,6,208,145,42 + CONTROL "Enable Smileys",IDC_INPUTSMILEYS,"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,15,219,130,12 + CONTROL "Don't replace at cursor",IDC_DCURSORSMILEY,"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,15,231,130,12 + GROUPBOX "Built-In Message Dialog Support",IDC_STATIC,154,208,162,42 + CONTROL "Disable",IDC_PLUGENABLED,"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,240,217,69,12 + COMBOBOX IDC_SMLBUT,159,230,55,35,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP + LTEXT "Smiley Button",IDC_STATIC,161,219,72,8 + EDITTEXT IDC_MAXCUSTSMSZ,165,128,30,15,ES_AUTOHSCROLL | ES_NUMBER | NOT WS_BORDER,WS_EX_CLIENTEDGE | WS_EX_STATICEDGE + CONTROL "",IDC_MAXCUSTSPIN,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,182,129,11,12 + LTEXT "Max ""Custom Smiley"" height",IDC_STATIC,198,132,118,8 + CONTROL "High Quality smiley scaling",IDC_HQSCALING,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,148,148,10 + EDITTEXT IDC_MINSMSZ,165,144,30,15,ES_AUTOHSCROLL | ES_NUMBER | NOT WS_BORDER,WS_EX_CLIENTEDGE | WS_EX_STATICEDGE + CONTROL "",IDC_MINSPIN,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,182,145,11,12 + LTEXT "Min smiley height",IDC_STATIC,198,148,118,8 +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO +BEGIN + IDD_OPT_SMILEYS, DIALOG + BEGIN + LEFTMARGIN, 6 + RIGHTMARGIN, 316 + TOPMARGIN, 3 + BOTTOMMARGIN, 250 + END +END +#endif // APSTUDIO_INVOKED + +#endif // Neutral resources +///////////////////////////////////////////////////////////////////////////// + + +///////////////////////////////////////////////////////////////////////////// +// English (U.S.) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) +#endif //_WIN32 + +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION __FILEVERSION_STRING + PRODUCTVERSION __FILEVERSION_STRING + FILEFLAGSMASK 0x17L +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x4L + FILETYPE 0x2L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", "Boris Krasnovskiy" + VALUE "FileDescription", "SmileyAdd Miranda Plugin" + VALUE "FileVersion", __VERSION_STRING + VALUE "InternalName", "SmileyAdd" + VALUE "LegalCopyright", "Copyright (C) 2005 - 2011 Boris Krasnovskiy All Rights Reserved" + VALUE "OriginalFilename", "SmileyAdd.dll" + VALUE "ProductName", " SmileyAdd Miranda Plugin" + VALUE "ProductVersion", __VERSION_STRING + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDI_SMILINGICON ICON "smiley.ICO" +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + +///////////////////////////////////////////////////////////////////////////// +// English (U.K.) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENG) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_UK +#pragma code_page(1252) +#endif //_WIN32 + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "..\\src\\resource.h\0" +END + +2 TEXTINCLUDE +BEGIN + "#include \r\n" + "#include ""..\\src\\version.h""\r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + +#endif // English (U.K.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/plugins/SmileyAdd/SmileyAdd_10.vcxproj b/plugins/SmileyAdd/SmileyAdd_10.vcxproj index 02e45a54e2..e2f39c008e 100644 --- a/plugins/SmileyAdd/SmileyAdd_10.vcxproj +++ b/plugins/SmileyAdd/SmileyAdd_10.vcxproj @@ -72,8 +72,8 @@ Disabled - ..\..\include;..\ExternalAPI;regexp;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;_USRDLL;_WIN32_WINDOWS=0x0410;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + ..\..\include;..\ExternalAPI;src\regexp;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) EnableFastChecks MultiThreadedDebugDLL Fast @@ -99,8 +99,8 @@ Disabled - ..\..\include;..\ExternalAPI;regexp;%(AdditionalIncludeDirectories) - WIN64;_DEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + ..\..\include;..\ExternalAPI;src\regexp;%(AdditionalIncludeDirectories) + WIN64;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) EnableFastChecks MultiThreadedDebugDLL Fast @@ -128,8 +128,8 @@ OnlyExplicitInline Size false - ..\..\include;..\ExternalAPI;regexp;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;_USRDLL;_WIN32_WINDOWS=0x0410;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + ..\..\include;..\ExternalAPI;src\regexp;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) true false false @@ -160,8 +160,8 @@ Full OnlyExplicitInline Size - ..\..\include;..\ExternalAPI;regexp;%(AdditionalIncludeDirectories) - WIN64;NDEBUG;_WINDOWS;_USRDLL;_WIN32_WINDOWS=0x0410;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + ..\..\include;..\ExternalAPI;src\regexp;%(AdditionalIncludeDirectories) + WIN64;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) true false false @@ -188,47 +188,41 @@ - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - - - - - + diff --git a/plugins/SmileyAdd/SmileyAdd_10.vcxproj.filters b/plugins/SmileyAdd/SmileyAdd_10.vcxproj.filters index a8e064601d..082e876df4 100644 --- a/plugins/SmileyAdd/SmileyAdd_10.vcxproj.filters +++ b/plugins/SmileyAdd/SmileyAdd_10.vcxproj.filters @@ -13,121 +13,104 @@ {f30ee13d-9b85-424d-bdb9-c991748ed97c} ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe - - {8efee3ee-a59a-4e9b-a0a4-b82a7481a40f} - - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Header Files - + Resource Files - - - Resource Files - - - Documents - - - Documents - - - Documents - - \ No newline at end of file diff --git a/plugins/SmileyAdd/SmileyBase.cpp b/plugins/SmileyAdd/SmileyBase.cpp deleted file mode 100644 index 28bd767153..0000000000 --- a/plugins/SmileyAdd/SmileyBase.cpp +++ /dev/null @@ -1,391 +0,0 @@ -/* -Miranda SmileyAdd Plugin -Copyright (C) 2008 - 2011 Boris Krasnovskiy All Rights Reserved - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation version 2 -of the License. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#include "general.h" -#include "SmileyBase.h" - -#include - -static void HiMetricToPixel(const SIZEL * lpSizeInHiMetric, LPSIZEL lpSizeInPix) -{ - HDC hDCScreen = GetDC(NULL); - const int nPixelsPerInchX = GetDeviceCaps(hDCScreen, LOGPIXELSX); - const int nPixelsPerInchY = GetDeviceCaps(hDCScreen, LOGPIXELSY); - ReleaseDC(NULL, hDCScreen); - - lpSizeInPix->cx = (lpSizeInHiMetric->cx * nPixelsPerInchX + (2540/2)) / 2540; - lpSizeInPix->cy = (lpSizeInHiMetric->cy * nPixelsPerInchY + (2540/2)) / 2540; -} - -static int CompareISmileyBase(const ISmileyBase* p1, const ISmileyBase* p2) -{ - return (int)((char*)p2 - (char*)p1); -} - -static LIST regSmileys(10, CompareISmileyBase); - -// {105C56DF-6455-4705-A501-51F1CCFCF688} -const GUID IID_ISmileyAddSmiley = -{ 0x105c56df, 0x6455, 0x4705, { 0xa5, 0x1, 0x51, 0xf1, 0xcc, 0xfc, 0xf6, 0x88 } }; - -// {58B32D03-1BD2-4840-992E-9AE799FD4ADE} -const GUID IID_ITooltipData = -{ 0x58b32d03, 0x1bd2, 0x4840, { 0x99, 0x2e, 0x9a, 0xe7, 0x99, 0xfd, 0x4a, 0xde } }; - -ISmileyBase::ISmileyBase(void) -{ - m_spAdviseSink = NULL; - m_spClientSite = NULL; - m_spAdviseHolder = NULL; - m_lRefCount = 1; - m_advf = 0; - m_smltxt = NULL; - m_hwnd = NULL; - m_visible = false; - m_dirAniAllow = false; - - memset(&m_sizeExtent, 0, sizeof(m_sizeExtent)); - memset(&m_sizeExtentHiM, 0, sizeof(m_sizeExtentHiM)); - memset(&m_orect, 0, sizeof(m_orect)); - - regSmileys.insert(this); -} - -ISmileyBase::~ISmileyBase(void) -{ - free(m_smltxt); - - Close(OLECLOSE_NOSAVE); - - if (m_spClientSite) - { - m_spClientSite->Release(); - m_spClientSite = NULL; - } - if (m_spAdviseHolder) - { - m_spAdviseHolder->Release(); - m_spAdviseHolder = NULL; - } -} - -void ISmileyBase::OnClose(void) -{ - if (m_spAdviseHolder) m_spAdviseHolder->SendOnClose(); -} - -void ISmileyBase::SendOnViewChange(void) -{ - if (m_spAdviseSink) m_spAdviseSink->OnViewChange(DVASPECT_CONTENT, -1); - if (m_advf & ADVF_ONLYONCE) - { - m_spAdviseSink->Release(); - m_spAdviseSink = NULL; - m_advf = 0; - } -} - -bool ISmileyBase::QueryHitPointSpecial(int x, int y, HWND hwnd, TCHAR** smltxt) -{ - bool result = m_visible && m_hwnd == hwnd; - if (result) - { - result = x >= m_orect.left && x <= m_orect.right && - y >= m_orect.top && y <= m_orect.bottom; - } - if (result) *smltxt = m_smltxt; - return result; -} - -void ISmileyBase::SetHint(TCHAR* smltxt) -{ - m_smltxt = _tcsdup(smltxt); -} - - -void ISmileyBase::SetPosition(HWND hwnd, LPCRECT lpRect) -{ - m_hwnd = hwnd; - if (lpRect == NULL || (lpRect->top == -1 && lpRect->bottom == -1)) - { - m_visible = false; - } - else - { - m_visible = true; - m_dirAniAllow = true; - m_orect.left = lpRect->left; - m_orect.right = lpRect->left + m_sizeExtent.cx; - if (lpRect->top == -1) - { - m_orect.top = lpRect->bottom - m_sizeExtent.cy; - m_orect.bottom = lpRect->bottom; - } - else if (lpRect->bottom == -1) - { - m_orect.top = lpRect->top; - m_orect.bottom = lpRect->top + m_sizeExtent.cy;; - } - else - { - m_orect.top = lpRect->bottom - m_sizeExtent.cy; - m_orect.bottom = lpRect->bottom; - } - } -} - - -// -// IUnknown members -// -ULONG ISmileyBase::AddRef(void) -{ return InterlockedIncrement(&m_lRefCount); } - -ULONG ISmileyBase::Release(void) -{ - LONG count = InterlockedDecrement(&m_lRefCount); - if(count == 0) - delete this; - return count; -} - - -HRESULT ISmileyBase::QueryInterface(REFIID iid, void ** ppvObject) -{ - // check to see what interface has been requested - if (ppvObject == NULL) return E_POINTER; - if (iid == IID_ISmileyAddSmiley) - *ppvObject = this; - else if (iid == IID_ITooltipData) - *ppvObject = static_cast(this); - else if (iid == IID_IViewObject) - *ppvObject = static_cast(this); - else if (iid == IID_IOleObject) - *ppvObject = static_cast(this); - else if (iid == IID_IUnknown) - *ppvObject = this; - else if (iid == IID_IViewObject2) - *ppvObject = static_cast(this); - else - { - *ppvObject = NULL; - return E_NOINTERFACE; - } - AddRef(); - return S_OK; -} - -// -// IOleObject members -// -HRESULT ISmileyBase::SetClientSite(IOleClientSite *pClientSite) -{ - if (m_spClientSite != NULL) m_spClientSite->Release(); - m_spClientSite = pClientSite; - if (m_spClientSite != NULL) m_spClientSite->AddRef(); - return S_OK; -} - -HRESULT ISmileyBase::GetClientSite(IOleClientSite **ppClientSite) -{ - if (ppClientSite == NULL) return E_POINTER; - *ppClientSite = m_spClientSite; - if (m_spClientSite != NULL) m_spClientSite->AddRef(); - return S_OK; -} - -HRESULT ISmileyBase::SetHostNames(LPCOLESTR /* szContainerApp */, LPCOLESTR /* szContainerObj */) -{ return S_OK; } - -HRESULT ISmileyBase::Close(DWORD /* dwSaveOption */) -{ - regSmileys.remove(this); - - if (m_spAdviseSink) m_spAdviseSink->Release(); - m_spAdviseSink = NULL; - - return S_OK; -} - -HRESULT ISmileyBase::SetMoniker(DWORD /* dwWhichMoniker */, IMoniker* /* pmk */) -{ return E_NOTIMPL; } - -HRESULT ISmileyBase::GetMoniker(DWORD /* dwAssign */, DWORD /* dwWhichMoniker */, IMoniker** /* ppmk */) -{ return E_NOTIMPL; } - -HRESULT ISmileyBase::InitFromData(IDataObject* /* pDataObject */, BOOL /* fCreation */, DWORD /* dwReserved */) -{ return E_NOTIMPL; } - -HRESULT ISmileyBase::GetClipboardData(DWORD /* dwReserved */, IDataObject** /* ppDataObject */) -{ return E_NOTIMPL; } - -HRESULT ISmileyBase::DoVerb(LONG /* iVerb */, LPMSG /* pMsg */, IOleClientSite* /* pActiveSite */, LONG /* lindex */, - HWND /* hwndParent */, LPCRECT /* lprcPosRect */) -{ - return E_NOTIMPL; -} - -HRESULT ISmileyBase::EnumVerbs(IEnumOLEVERB** /*ppEnumOleVerb*/) { return E_NOTIMPL; } -HRESULT ISmileyBase::Update(void) { return S_OK; } -HRESULT ISmileyBase::IsUpToDate(void) { return S_OK; } - -HRESULT ISmileyBase::GetUserClassID(CLSID *pClsid) -{ - if (!pClsid) return E_POINTER; - *pClsid = CLSID_NULL; - return S_OK; -} - -HRESULT ISmileyBase::GetUserType(DWORD /*dwFormOfType*/, LPOLESTR* /*pszUserType*/) -{ return E_NOTIMPL; } - -HRESULT ISmileyBase::SetExtent(DWORD dwDrawAspect, SIZEL* psizel) -{ - if (dwDrawAspect != DVASPECT_CONTENT) return E_FAIL; - if (psizel == NULL) return E_POINTER; - - HiMetricToPixel(psizel, &m_sizeExtent); - m_sizeExtentHiM = *psizel; - return S_OK; -} - -HRESULT ISmileyBase::GetExtent(DWORD dwDrawAspect, SIZEL *psizel) -{ - if (dwDrawAspect != DVASPECT_CONTENT) return E_FAIL; - if (psizel == NULL) return E_POINTER; - - *psizel = m_sizeExtentHiM; - return S_OK; -} - -HRESULT ISmileyBase::Advise(IAdviseSink *pAdvSink, DWORD *pdwConnection) -{ - HRESULT hr = S_OK; - if (m_spAdviseHolder == NULL) - hr = CreateOleAdviseHolder(&m_spAdviseHolder); - if (SUCCEEDED(hr)) - hr = m_spAdviseHolder->Advise(pAdvSink, pdwConnection); - else - m_spAdviseHolder = NULL; - return hr; -} - -HRESULT ISmileyBase::Unadvise(DWORD dwConnection) -{ - return m_spAdviseHolder ? m_spAdviseHolder->Unadvise(dwConnection) : E_FAIL; -} - -HRESULT ISmileyBase::EnumAdvise(IEnumSTATDATA **ppEnumAdvise) -{ - if (ppEnumAdvise == NULL) return E_POINTER; - return m_spAdviseHolder ? m_spAdviseHolder->EnumAdvise(ppEnumAdvise) : E_FAIL; -} - -HRESULT ISmileyBase::GetMiscStatus(DWORD dwAspect, DWORD *pdwStatus) -{ - if (pdwStatus == NULL) return E_POINTER; - if (dwAspect == DVASPECT_CONTENT) - { - *pdwStatus = OLEMISC_STATIC | OLEMISC_INVISIBLEATRUNTIME | - OLEMISC_CANTLINKINSIDE | OLEMISC_NOUIACTIVATE; - return S_OK; - } - else - { - *pdwStatus = 0; - return E_FAIL; - } -} - -HRESULT ISmileyBase::SetColorScheme(LOGPALETTE* /* pLogpal */) -{ return E_NOTIMPL; } - -// -// IViewObject members -// -HRESULT ISmileyBase::SetAdvise(DWORD aspect, DWORD advf, IAdviseSink* pAdvSink) -{ - if (aspect != DVASPECT_CONTENT) return DV_E_DVASPECT; - m_advf = advf; - if (m_spAdviseSink) m_spAdviseSink->Release(); - m_spAdviseSink = pAdvSink; - if (advf & ADVF_PRIMEFIRST) SendOnViewChange(); - return S_OK; -} -HRESULT ISmileyBase::GetAdvise(DWORD* /*pAspects*/, DWORD* /*pAdvf*/, IAdviseSink** ppAdvSink) -{ - if (!ppAdvSink) return E_POINTER; - *ppAdvSink = m_spAdviseSink; - if (m_spAdviseSink) m_spAdviseSink->AddRef(); - return S_OK; -} -HRESULT ISmileyBase::Freeze(DWORD, long, void*, DWORD*) { return E_NOTIMPL; } -HRESULT ISmileyBase::Unfreeze(DWORD) { return E_NOTIMPL; } -HRESULT ISmileyBase::GetColorSet(DWORD, long, void*, DVTARGETDEVICE*, HDC, - LOGPALETTE**) { return E_NOTIMPL; } - -// -// IViewObject2 members -// -HRESULT ISmileyBase::GetExtent(DWORD aspect, long, DVTARGETDEVICE*, SIZEL* pSize) -{ - if (pSize == NULL) return E_POINTER; - if (aspect != DVASPECT_CONTENT) return DV_E_DVASPECT; - *pSize = m_sizeExtent; - return S_OK; -} - - -// -// ITooltipData members -// -HRESULT ISmileyBase::SetTooltip(BSTR /* bstrHint */) -{ - return S_OK; -} - -HRESULT ISmileyBase::GetTooltip(BSTR *bstrHint) -{ - if (bstrHint == NULL) return E_POINTER; - *bstrHint = SysAllocString(T2W_SM(m_smltxt)); - return S_OK; -} - - -void CloseSmileys(void) -{ - for (int i=regSmileys.getCount(); i--;) - { - regSmileys[i]->OnClose(); - regSmileys[i]->Close(OLECLOSE_NOSAVE); - } -} - -int CheckForTip(int x, int y, HWND hwnd, TCHAR** smltxt) -{ - for (int i=0; iQueryHitPointSpecial(x, y, hwnd, smltxt)) return i; - - return -1; -} - -void DestroySmileyBase(void) -{ - regSmileys.destroy(); -} - diff --git a/plugins/SmileyAdd/SmileyBase.h b/plugins/SmileyAdd/SmileyBase.h deleted file mode 100644 index 3cdf244007..0000000000 --- a/plugins/SmileyAdd/SmileyBase.h +++ /dev/null @@ -1,127 +0,0 @@ -/* -Miranda SmileyAdd Plugin -Copyright (C) 2008 - 2011 Boris Krasnovskiy All Rights Reserved - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation version 2 -of the License. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#pragma once -#include -#include - -#define OLEIVERB_SETOWNER (-24) - -EXTERN_C const IID IID_ITooltipData; - -class ITooltipData : public IUnknown -{ -public: - STDMETHOD(SetTooltip) (BSTR bstrHint) PURE; - STDMETHOD(GetTooltip) (BSTR * bstrHint) PURE; -}; - - -EXTERN_C const IID IID_ISmileyAddSmiley; - -class ISmileyBase : - public IOleObject, public IViewObject2, public ITooltipData -{ -protected: - IOleAdviseHolder* m_spAdviseHolder; - IAdviseSink* m_spAdviseSink; - IOleClientSite* m_spClientSite; - DWORD m_advf; - LONG m_lRefCount; - - SIZEL m_sizeExtent; - SIZEL m_sizeExtentHiM; - RECT m_orect; - - TCHAR* m_smltxt; - HWND m_hwnd; - - bool m_visible; - bool m_dirAniAllow; - -public: - ISmileyBase(void); - virtual ~ISmileyBase(void); - - void OnClose(void); - void SendOnViewChange(void); - - bool QueryHitPointSpecial(int x, int y, HWND hwnd, TCHAR** smltxt); - void SetHint(TCHAR* smltxt); - - virtual void SetPosition(HWND hwnd, LPCRECT lpRect); - - // - // IUnknown members - // - STDMETHOD_(ULONG, AddRef)(void); - STDMETHOD_(ULONG, Release)(void); - STDMETHOD(QueryInterface)(REFIID iid, void ** ppvObject); - - // - // IOleObject members - // - STDMETHOD(SetClientSite)(IOleClientSite *pClientSite); - STDMETHOD(GetClientSite)(IOleClientSite **ppClientSite); - STDMETHOD(SetHostNames)(LPCOLESTR /* szContainerApp */, LPCOLESTR /* szContainerObj */); - STDMETHOD(Close)(DWORD /* dwSaveOption */); - STDMETHOD(SetMoniker)(DWORD /* dwWhichMoniker */, IMoniker* /* pmk */); - STDMETHOD(GetMoniker)(DWORD /* dwAssign */, DWORD /* dwWhichMoniker */, IMoniker** /* ppmk */); - STDMETHOD(InitFromData)(IDataObject* /* pDataObject */, BOOL /* fCreation */, DWORD /* dwReserved */); - STDMETHOD(GetClipboardData)(DWORD /* dwReserved */, IDataObject** /* ppDataObject */); - STDMETHOD(DoVerb)(LONG /*iVerb*/, LPMSG /* pMsg */, IOleClientSite* /* pActiveSite */, LONG /* lindex */, - HWND /*hwndParent*/, LPCRECT /*lprcPosRect*/); - STDMETHOD(EnumVerbs)(IEnumOLEVERB** /*ppEnumOleVerb*/); - STDMETHOD(Update)(void); - STDMETHOD(IsUpToDate)(void); - STDMETHOD(GetUserClassID)(CLSID *pClsid); - STDMETHOD(GetUserType)(DWORD /*dwFormOfType*/, LPOLESTR* /*pszUserType*/); - STDMETHOD(SetExtent)(DWORD /*dwDrawAspect*/, SIZEL* /*psizel*/); - STDMETHOD(GetExtent)(DWORD dwDrawAspect, SIZEL *psizel); - STDMETHOD(Advise)(IAdviseSink *pAdvSink, DWORD *pdwConnection); - STDMETHOD(Unadvise)(DWORD dwConnection); - STDMETHOD(EnumAdvise)(IEnumSTATDATA **ppEnumAdvise); - STDMETHOD(GetMiscStatus)(DWORD dwAspect, DWORD *pdwStatus); - STDMETHOD(SetColorScheme)(LOGPALETTE* /* pLogpal */); - - // - // IViewObject members - // - STDMETHOD(SetAdvise)(DWORD aspect, DWORD advf, IAdviseSink* pAdvSink); - STDMETHOD(GetAdvise)(DWORD* /*pAspects*/, DWORD* /*pAdvf*/, IAdviseSink** ppAdvSink); - STDMETHOD(Freeze)(DWORD, long, void*, DWORD*); - STDMETHOD(Unfreeze)(DWORD); - STDMETHOD(GetColorSet)(DWORD, long, void*, DVTARGETDEVICE*, HDC, - LOGPALETTE**); - - // - // IViewObject2 members - // - STDMETHOD(GetExtent)(DWORD aspect, long, DVTARGETDEVICE*, SIZEL* pSize); - - // - // ITooltipData members - // - STDMETHOD(SetTooltip)(BSTR bstrHint); - STDMETHOD(GetTooltip)(BSTR * bstrHint); - -}; - -int CheckForTip(int x, int y, HWND hwnd, TCHAR** smltxt); -void CloseSmileys(void); - diff --git a/plugins/SmileyAdd/anim.cpp b/plugins/SmileyAdd/anim.cpp deleted file mode 100644 index 5352383821..0000000000 --- a/plugins/SmileyAdd/anim.cpp +++ /dev/null @@ -1,184 +0,0 @@ -/* -Miranda SmileyAdd Plugin -Copyright (C) 2006 - 2011 Boris Krasnovskiy All Rights Reserved - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation version 2 -of the License. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#include "general.h" -#include "anim.h" - -#include - -Animate::Animate(SmileyType *sml, RECT& rect, HDC hdcMem, HBRUSH hbr, bool clip) - : m_sml(sml), m_img(NULL), - m_nFramePosition(0), m_sel(false), m_clip(clip), - m_offset(0), m_running(false), - m_hdcMem(hdcMem), m_hbr(hbr) -{ - m_cliprect = rect; -} - - -Animate::~Animate() -{ - if (m_img) m_img->Release(); -} - - -void Animate::StartAnimation(void) -{ - m_img = m_sml->CreateCachedImage(); - - if (m_img && m_img->IsAnimated()) - { - m_img->SelectFrame(m_nFramePosition); - long frtm = m_img->GetFrameDelay(); - m_counter = frtm / 10 + ((frtm % 10) >= 5); - } -} - - -void Animate::ProcessTimerTick(HWND hwnd) -{ - if (m_running && m_img->IsAnimated() && --m_counter <= 0) - { - m_nFramePosition = m_img->SelectNextFrame(m_nFramePosition); - - long frtm = m_img->GetFrameDelay(); - m_counter = frtm / 10 + ((frtm % 10) >= 5); - - HDC hdc = GetDC(hwnd); - DrawFrame(hdc); - ReleaseDC(hwnd, hdc); - } -} - - -void Animate::DrawFrame(HDC hdc) -{ - long width = m_cliprect.right - m_cliprect.left; - long height = m_cliprect.bottom - m_cliprect.top; - - RECT frc = { 0, 0, width, height }; - FillRect(m_hdcMem, &frc, m_hbr); - - m_img->Draw(m_hdcMem, frc, m_clip); - - BitBlt(hdc, m_cliprect.left, m_cliprect.top, width, height, m_hdcMem, 0, 0, SRCCOPY); - - if (m_sel) - DrawFocusRect(hdc, &m_cliprect); -} - - -void Animate::Draw(HDC hdc) -{ - if (m_running) - { - m_img->Draw(hdc, m_cliprect, m_clip); - - if (m_sel) - DrawFocusRect(hdc, &m_cliprect); - } -} - - -void Animate::SetOffset(int off, int wsize) -{ - const int dy = m_offset - off; - - m_cliprect.top += dy; - m_cliprect.bottom += dy; - - m_offset = off; - - m_running = m_cliprect.top >= 0 && m_cliprect.top < wsize; - if (m_running) - { - if (m_img == NULL) - { - StartAnimation(); - if (m_img == NULL) m_running = false; - } - } - else - { - if (m_img) m_img->Release(); - m_img = NULL; - } -} - - -void Animate::SetSel(int x, int y) -{ - m_sel = x >= m_cliprect.left && x < m_cliprect.right && - y >= m_cliprect.top && y < m_cliprect.bottom; -} - - -AnimatedPack::AnimatedPack(HWND hwnd, int wsize, SIZE& sel, COLORREF bkg) - : m_AniList(40), m_hwnd(hwnd), m_wsize(wsize) -{ - HDC hdc = GetDC(hwnd); - - m_hBmp = CreateCompatibleBitmap(hdc, sel.cx, sel.cy); - m_hdcMem = CreateCompatibleDC(hdc); - m_hOld = (HBITMAP)SelectObject(m_hdcMem, m_hBmp); - m_hbr = CreateSolidBrush(bkg); - - ReleaseDC(hwnd, hdc); -} - - -AnimatedPack::~AnimatedPack() -{ - DeleteObject(m_hbr); - SelectObject(m_hdcMem, m_hOld); - DeleteObject(m_hBmp); - DeleteDC(m_hdcMem); -} - - -void AnimatedPack::Add(SmileyType *sml, RECT rect, bool clip) -{ - m_AniList.insert(new Animate(sml, rect, m_hdcMem, m_hbr, clip)); -} - - -void AnimatedPack::Draw(HDC hdc) -{ - for (int i=0; i. -*/ - -#ifndef anim_h -#define anim_h - -#include "smileys.h" - -class Animate -{ -private: - - ImageBase *m_img; - SmileyType *m_sml; - - HDC m_hdcMem; - HBRUSH m_hbr; - - RECT m_cliprect; - - unsigned m_nFramePosition; - int m_offset; - int m_counter; - bool m_running; - bool m_sel; - bool m_clip; - - void DrawFrame(HDC hdc); - -public: - - Animate(SmileyType *sml, RECT &rect, HDC hdcMem, HBRUSH hbr, bool clip); - Animate(const Animate& an); - ~Animate(); - - void Draw(HDC hdc); - - void StartAnimation(void); - void SetOffset(int off, int wsize); - void SetSel(int x, int y); - - void ProcessTimerTick(HWND hwnd); -}; - -class AnimatedPack -{ -private: - OBJLIST m_AniList; - - HWND m_hwnd; - int m_wsize; - - HBRUSH m_hbr; - HBITMAP m_hBmp; - HDC m_hdcMem; - HBITMAP m_hOld; - - static unsigned CALLBACK AnimateThreadFunc ( void* arg ); - -public: - AnimatedPack(HWND hwnd, int wsize, SIZE& sel, COLORREF bkg); - ~AnimatedPack(); - - void Add(SmileyType *sml, RECT rect, bool clip); - void Draw(HDC hdc); - void SetOffset(int off); - void SetSel(RECT& rect); - - void ProcessTimerTick(HWND hwnd); -}; - -#endif diff --git a/plugins/SmileyAdd/bkstring.cpp b/plugins/SmileyAdd/bkstring.cpp deleted file mode 100644 index 2973783abc..0000000000 --- a/plugins/SmileyAdd/bkstring.cpp +++ /dev/null @@ -1,215 +0,0 @@ -/* -Miranda SmileyAdd Plugin -Copyright (C) 2008 - 2011 Boris Krasnovskiy All Rights Reserved - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation version 2 -of the License. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#ifndef __GNUC__ -# ifdef _DEBUG -# define _CRTDBG_MAP_ALLOC -# include -# include -# else -# include -# endif -#endif - -#include -#include - -#include "bkstring.h" - - -bkstring::~bkstring() { if (sizeAlloced) free(buf); } - -void bkstring::reserve(size_type len) -{ - if (len >= sizeAlloced || sizeAlloced == 0) - { - if (sizeAlloced == 0) buf = NULL; - buf = (value_type*)realloc(buf, (len+1) * sizeof(value_type)); - if (sizeAlloced == 0) buf[0] = 0; - sizeAlloced = len+1; - } -} - -void bkstring::appendfmt(const value_type *fmt, ...) -{ - areserve(_tcslen(fmt)*2); - - va_list vararg; - va_start(vararg, fmt); - for (;;) - { - int len = _vsntprintf(buf + lenBuf, sizeAlloced - lenBuf - 1, fmt, vararg); - if (len < 0) - reserve(sizeAlloced + 256); - else - { - lenBuf += len; - buf[lenBuf] = 0; - break; - } - } - va_end(vararg); -} - -bkstring& bkstring::append(const value_type* _Ptr) -{ - size_type len = _tcslen(_Ptr); - areserve(len); - memcpy(buf+lenBuf, _Ptr, (len+1)*sizeof(value_type)); - lenBuf += len; - return *this; -} - -bkstring& bkstring::append(const value_type* _Ptr, size_type _Count) -{ - size_type len = min(_tcslen(_Ptr), _Count); - areserve(len); - memcpy(buf+lenBuf, _Ptr, len*sizeof(value_type)); - lenBuf += len; - buf[lenBuf] = 0; - return *this; -} - -bkstring& bkstring::append(const bkstring& _Str, size_type _Off, size_type _Count) -{ - size_type len = min(_Count, _Str.size() - _Off); - areserve(len); - memcpy(buf+lenBuf, _Str.c_str()+_Off, len*sizeof(value_type)); - lenBuf += len; - buf[lenBuf] = 0; - return *this; -} - -bkstring& bkstring::append(const bkstring& _Str) -{ - size_type len = _Str.size(); - areserve(len); - memcpy(buf+lenBuf, _Str.c_str(), len*sizeof(value_type)); - lenBuf += len; - buf[lenBuf] = 0; - return *this; -} - -bkstring& bkstring::append(size_type _Count, value_type _Ch) -{ - areserve(_Count); - for(size_type i=0; i<_Count; ++i) buf[lenBuf+i] = _Ch; - lenBuf += _Count; - buf[lenBuf] = 0; - return *this; -} - - -bkstring& bkstring::assign(const value_type* _Ptr, size_type _Count) -{ - if (_Count == 0 && sizeAlloced == 0) - { - buf = (TCHAR*)_T(""); - } - else - { - reserve(_Count); - memcpy(buf, _Ptr, _Count*sizeof(value_type)); - buf[_Count] = 0; - lenBuf = _Count; - } - return *this; -} - -bkstring& bkstring::assign(const bkstring& _Str, size_type _Off, size_type _Count) -{ - size_type len = min(_Count, _Str.size() - _Off); - if (len == 0 && sizeAlloced == 0) - { - buf = (TCHAR*)_T(""); - } - else - { - reserve(len); - memcpy(buf, _Str.c_str() + _Off, len*sizeof(value_type)); - lenBuf = len; - buf[len] = 0; - } - return *this; -} - -bkstring& bkstring::assign(size_type _Count, value_type _Ch) -{ - reserve(_Count); - for(size_type i=0; i<_Count; ++i) buf[i] = _Ch; - buf[_Count] = 0; - lenBuf = _Count; - return *this; -} - -bkstring::size_type bkstring::find(value_type _Ch, size_type _Off) const -{ - for (size_type i=_Off; i<=lenBuf; ++i) - if (buf[i] == _Ch) return i; - return (size_type)npos; -} - -bkstring::size_type bkstring::find(const value_type* _Ptr, size_type _Off) const -{ - if (_Off > lenBuf) return (size_type)npos; - - value_type* pstr = _tcsstr(buf+_Off, _Ptr); - return pstr ? pstr - buf : npos; -} - -bkstring::size_type bkstring::find_last_of(value_type _Ch, size_type _Off) const -{ - for (size_type i=(_Off == npos ? lenBuf : _Off); i--;) - if (buf[i] == _Ch) return i; - return (size_type)npos; -} - -bkstring& bkstring::insert(size_type _P0, const value_type* _Ptr, size_type _Count) -{ - size_type len = _tcslen(_Ptr); - if (_Count < len) len = _Count; - areserve(len); - value_type *p = buf + _P0; - memmove(p+len, p, (lenBuf-_P0+1)*sizeof(value_type)); - memcpy(p, _Ptr, _Count*sizeof(value_type)); - lenBuf += len; - return *this; -} - -bkstring& bkstring::insert(size_type _P0, size_type _Count, value_type _Ch) -{ - areserve(_Count); - value_type *p = buf + _P0; - memmove(p+_Count, p, (lenBuf-_P0+1)*sizeof(value_type)); - for(size_type i=0; i<_Count; ++i) p[i] = _Ch; - lenBuf += _Count; - return *this; -} - -bkstring& bkstring::erase(size_type _Pos, size_type _Count) -{ - if (_Pos < lenBuf) - { - const size_type len = min(lenBuf - _Pos, _Count); - value_type *p = buf + _Pos; - lenBuf -= len; - memmove(p, p+len, (lenBuf - _Pos)*sizeof(value_type)); - buf[lenBuf] = 0; - } - return *this; -} diff --git a/plugins/SmileyAdd/bkstring.h b/plugins/SmileyAdd/bkstring.h deleted file mode 100644 index eb164f74e2..0000000000 --- a/plugins/SmileyAdd/bkstring.h +++ /dev/null @@ -1,270 +0,0 @@ -/* -Miranda SmileyAdd Plugin -Copyright (C) 2008 - 2011 Boris Krasnovskiy All Rights Reserved - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation version 2 -of the License. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#pragma once - -#include -#include - -#ifndef min -#define min(A, B) ((A) < (B) ? (A) : (B)) -#endif - -class bkstring -{ -public: - typedef size_t size_type; - typedef TCHAR value_type; - typedef value_type* iterator; - typedef const value_type* const_iterator; - -#if defined(_MSC_VER) && (_MSC_VER <= 1200) - enum { npos = -1 }; -#else - static const size_type npos = size_type(-1); -#endif - -private: - value_type* buf; - size_type sizeAlloced; - size_type lenBuf; - - void areserve(size_type len) { reserve(lenBuf + len); } - -public: - - explicit bkstring() : buf((TCHAR*)_T("")), sizeAlloced(0), lenBuf(0) - {} - - bkstring(const value_type* _Ptr, size_type _Count) : sizeAlloced(0), lenBuf(0) - { assign(_Ptr, _Count); } - - bkstring(const value_type* _Ptr) : sizeAlloced(0), lenBuf(0) - { assign(_Ptr); } - - bkstring(size_type _Count, value_type _Ch) : sizeAlloced(0), lenBuf(0) - { assign(_Count, _Ch); } - - bkstring(const bkstring& _Str) : sizeAlloced(0), lenBuf(0) - { assign(_Str); } - - bkstring(const bkstring& _Str, size_type _Off, size_type _Count) : sizeAlloced(0), lenBuf(0) - { assign(_Str, _Off, _Count); } - - ~bkstring(); - - size_type size(void) const { return lenBuf; } - const value_type* c_str(void) const { return buf; } - - void clear(void) { if (lenBuf) { lenBuf = 0; buf[0] = 0; } } - void insert(const value_type *txt); - void reserve(size_type len); - - bkstring& assign(const value_type* _Ptr) - { return assign(_Ptr, _tcslen(_Ptr)); } - - bkstring& assign(const bkstring& _Str) - { return assign(_Str, 0, (size_type)npos); } - - bkstring& assign(const value_type* _Ptr, size_type _Count); - bkstring& assign(const bkstring& _Str, size_type off, size_type _Count); - bkstring& assign(size_type _Count, value_type _Ch); - - bkstring& append(const value_type* _Ptr); - bkstring& append(const value_type* _Ptr, size_type _Count); - bkstring& append(const bkstring& _Str, size_type _Off, size_type _Count); - bkstring& append(const bkstring& _Str); - bkstring& append(size_type _Count, value_type _Ch); - - int compare(const bkstring& _Str) const - { return _tcscmp(buf, _Str.c_str()); } - - int compare(size_type _Pos1, size_type _Num1, const bkstring& _Str) const - { return _tcsncmp(&buf[_Pos1], _Str.c_str(), _Num1); } - - int compare(size_type _Pos1, size_type _Num1, const bkstring& _Str, size_type _Off, size_type _Count) const - { return _tcsncmp(&buf[_Pos1], _Str.c_str()+_Off, min(_Num1, _Count)); } - - int compare(const value_type* _Ptr) const - { return _tcscmp(buf, _Ptr); } - - int compare(size_type _Pos1, size_type _Num1, const value_type* _Ptr) const - { return _tcsncmp(&buf[_Pos1], _Ptr, _Num1); } - - int compare(size_type _Pos1, size_type _Num1, const value_type* _Ptr, size_type _Num2) const - { return _tcsncmp(&buf[_Pos1], _Ptr, min(_Num1, _Num2)); } - - int comparei(const bkstring& _Str) const - { return _tcsicmp(buf, _Str.c_str()); } - - int comparei(size_type _Pos1, size_type _Num1, const bkstring& _Str) const - { return _tcsnicmp(&buf[_Pos1], _Str.c_str(), _Num1); } - - int comparei(size_type _Pos1, size_type _Num1, const bkstring& _Str, size_type _Off, size_type _Count) const - { return _tcsnicmp(&buf[_Pos1], _Str.c_str()+_Off, min(_Num1, _Count)); } - - int comparei(const value_type* _Ptr) const - { return _tcsicmp(buf, _Ptr); } - - int comparei(size_type _Pos1, size_type _Num1, const value_type* _Ptr) const - { return _tcsnicmp(&buf[_Pos1], _Ptr, _Num1); } - - int comparei(size_type _Pos1, size_type _Num1, const value_type* _Ptr, size_type _Num2) const - { return _tcsnicmp(&buf[_Pos1], _Ptr, min(_Num1, _Num2)); } - - bool empty(void) const { return lenBuf == 0; }; - bkstring& erase(size_type _Pos = 0, size_type _Count = npos); - - size_type find(value_type _Ch, size_type _Off = 0) const; - size_type find(const value_type* _Ptr, size_type _Off = 0) const; - size_type find(bkstring& _Str, size_type _Off = 0) const - { return find(_Str.c_str(), _Off); } - - size_type find_last_of(value_type _Ch, size_type _Off = npos) const; - - bkstring& insert(size_type _P0, const value_type* _Ptr) - { return insert(_P0, _Ptr, _tcslen(_Ptr)); } - - bkstring& insert(size_type _P0, const bkstring& _Str) - { return insert(_P0, _Str.c_str(), _Str.size()); }; - - bkstring& insert(size_type _P0, const value_type* _Ptr, size_type _Count); - bkstring& insert(size_type _P0, size_type _Count, value_type _Ch); - - bkstring substr(size_type _Off = 0, size_type _Count = npos) const - { return bkstring(*this, _Off, _Count); } - - bkstring& operator = (const bkstring& _Str) - { return assign(_Str); } - - bkstring& operator =(const value_type* _Ptr) - { return assign(_Ptr); } - - bkstring& operator = (const value_type _Ch) - { return assign(1, _Ch); } - - bkstring& operator +=(const bkstring& _Str) - { return append(_Str); } - - bkstring& operator += (const value_type* _Ptr) - { return append(_Ptr); } - - bkstring& operator += (const value_type _Ch) - { return append(1, _Ch); } - - value_type& operator[] (int ind) const - { return buf[ind]; } - - friend bkstring operator+ (const bkstring& _Str1, const bkstring& _Str2) - { bkstring s(_Str1); return s.append(_Str2); } - - friend bkstring operator+ (const bkstring& _Str1, const value_type* _Ptr2) - { bkstring s(_Str1); return s.append(_Ptr2); } - - friend bkstring operator+(const value_type* _Ptr1, const bkstring& _Str2) - { bkstring s(_Ptr1); return s.append(_Str2); } - - friend bkstring operator+ (const bkstring& _Str1, const value_type _Ch) - { bkstring s(_Str1); return s.append(1, _Ch); } - - friend bool operator==(const bkstring& _Str1, const bkstring& _Str2) - { return _Str1.compare(_Str2) == 0; } - - friend bool operator==(const bkstring& _Str1, const value_type* _Ptr2) - { return _Str1.compare(_Ptr2) == 0; } - - friend bool operator==(const value_type* _Ptr1, const bkstring& _Str2) - { return _Str2.compare(_Ptr1) == 0; } - - friend bool operator!=(const bkstring& _Str1, const bkstring& _Str2) - { return _Str1.compare(_Str2) != 0; } - - friend bool operator!=(const bkstring& _Str1, const value_type* _Ptr2) - { return _Str1.compare(_Ptr2) != 0; } - - friend bool operator!=(const value_type* _Ptr1, const bkstring& _Str2) - { return _Str2.compare(_Ptr1) != 0; } - - friend bool operator<(const bkstring& _Str1, const bkstring& _Str2) - { return _Str1.compare(_Str2) < 0; } - - friend bool operator<(const bkstring& _Str1, const value_type* _Ptr2) - { return _Str1.compare(_Ptr2) < 0; } - - friend bool operator<(const value_type* _Ptr1, const bkstring& _Str2) - { return _Str2.compare(_Ptr1) > 0; } - - friend bool operator>(const bkstring& _Str1, const bkstring& _Str2) - { return _Str1.compare(_Str2) > 0; } - - friend bool operator>(const bkstring& _Str1, const value_type* _Ptr2) - { return _Str1.compare(_Ptr2) > 0; } - - friend bool operator>(const value_type* _Ptr1, const bkstring& _Str2) - { return _Str2.compare(_Ptr1) < 0; } - - friend bool operator<=(const bkstring& _Str1, const bkstring& _Str2) - { return _Str1.compare(_Str2) <= 0; } - - friend bool operator<=(const bkstring& _Str1, const value_type* _Ptr2) - { return _Str1.compare(_Ptr2) <= 0; } - - friend bool operator<=(const value_type* _Ptr1, const bkstring& _Str2) - { return _Str2.compare(_Ptr1) >= 0; } - - friend bool operator>=(const bkstring& _Str1, const bkstring& _Str2) - { return _Str1.compare(_Str2) >= 0; } - - friend bool operator>=(const bkstring& _Str1, const value_type* _Ptr2) - { return _Str1.compare(_Ptr2) >= 0; } - - friend bool operator>=(const value_type* _Ptr1, const bkstring& _Str2) - { return _Str2.compare(_Ptr1) <= 0; } - - friend bool operator==(const value_type _Ch1, const bkstring& _Str2) - { return (_Str2.size() == 1) && (_Str2[0] == _Ch1); } - - friend bool operator==(const bkstring& _Str1, const value_type _Ch2) - { return (_Str1.size() == 1) && (_Str1[0] == _Ch2); } - - friend bool operator!=(const value_type _Ch1, const bkstring& _Str2) - { return (_Str2.size() != 1) || (_Str2[0] != _Ch1); } - - friend bool operator!=(const bkstring& _Str1, const value_type _Ch2) - { return (_Str1.size() != 1) || (_Str1[0] != _Ch2); } - - iterator begin(void) - { return buf; } - - const_iterator begin(void) const - { return buf; } - - iterator end(void) - { return buf + lenBuf; } - - const_iterator end(void) const - { return buf + lenBuf; } - - // Custom extentions - - void appendfmt(const value_type *fmt, ...); - - size_type sizebytes(void) const { return lenBuf * sizeof(value_type); } -}; - -//const bkstring::size_type bkstring::npos = -1; diff --git a/plugins/SmileyAdd/customsmiley.cpp b/plugins/SmileyAdd/customsmiley.cpp deleted file mode 100644 index f125f015db..0000000000 --- a/plugins/SmileyAdd/customsmiley.cpp +++ /dev/null @@ -1,172 +0,0 @@ -/* -Miranda SmileyAdd Plugin -Copyright (C) 2008 - 2011 Boris Krasnovskiy All Rights Reserved - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation version 2 -of the License. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#include "customsmiley.h" - -SmileyPackCListType g_SmileyPackCStore; - - -bool SmileyPackCListType::AddSmileyPack(HANDLE hContact, TCHAR* dir) -{ - bool res = true; - if (GetSmileyPack(hContact) == NULL) - { - SmileyPackCType *smileyPack = new SmileyPackCType; - - res = smileyPack->LoadSmileyDir(dir); - if (res) - { - smileyPack->SetId(hContact); - m_SmileyPacks.insert(smileyPack); - } - else - delete smileyPack; - } - return res; -} - - -bool SmileyPackCListType::AddSmiley(HANDLE hContact, TCHAR* path) -{ - SmileyPackCType* smpack = GetSmileyPack(hContact); - if (smpack == NULL) - { - smpack = new SmileyPackCType; - - smpack->SetId(hContact); - m_SmileyPacks.insert(smpack); - } - return smpack->LoadSmiley(path); -} - - -SmileyPackCType* SmileyPackCListType::GetSmileyPack(HANDLE id) -{ - for (int i = 0; i < m_SmileyPacks.getCount(); i++) - { - if (m_SmileyPacks[i].GetId() == id) return &m_SmileyPacks[i]; - } - return NULL; -} - - -SmileyCType::SmileyCType(const bkstring& fullpath, const TCHAR* filepath) -{ - LoadFromResource(fullpath, 0); - CreateTriggerText(T2A_SM(filepath)); -} - -bool SmileyCType::CreateTriggerText(char* text) -{ - UrlDecode(text); - - int len = (int)strlen(text); - if (len == 0) return false; - - int reslen = Netlib_GetBase64DecodedBufferSize(len)+1; - char* res = (char*)alloca(reslen); - - NETLIBBASE64 nlb = { text, len, ( PBYTE )res, reslen }; - if (!CallService(MS_NETLIB_BASE64DECODE, 0, LPARAM( &nlb ))) return false; - res[nlb.cbDecoded] = 0; - - TCHAR *txt = mir_utf8decodeT(res); - - if (txt == NULL) return false; - - m_TriggerText = txt; - mir_free(txt); - - return true; -} - - -// -// SmileyPackCType -// - -bool SmileyPackCType::LoadSmileyDir(TCHAR* dir) -{ - bkstring dirs = dir; - dirs += _T("\\*.*"); - - _tfinddata_t c_file; - INT_PTR hFile = _tfindfirst((TCHAR*)dirs.c_str(), &c_file); - if (hFile > -1L) - { - do { - if (c_file.name[0] != '.') - { - bkstring fullpath = dir; - fullpath = fullpath + _T("\\") + c_file.name; - TCHAR* div = _tcsrchr(c_file.name, '.'); - if (div) - { - *div = 0; - SmileyCType *smlc = new SmileyCType(fullpath, c_file.name); - if (smlc->GetTriggerText().empty()) - delete smlc; - else - m_SmileyList.insert(smlc); - } - } - } while( _tfindnext( hFile, &c_file ) == 0 ); - _findclose( hFile ); - AddTriggersToSmileyLookup(); - return true; - } - return false; -} - - -bool SmileyPackCType::LoadSmiley(TCHAR* path) -{ - bkstring dirs = path; - bkstring::size_type slash = dirs.find_last_of('\\'); - bkstring::size_type dot = dirs.find_last_of('.'); - - bkstring name = dirs.substr(slash+1, dot - slash - 1); - - for (int i=0; i < m_SmileyList.getCount(); i++) - { - if (m_SmileyList[i].GetTriggerText() == name) - { - m_SmileyList[i].LoadFromResource(dirs, 0); - return true; - } - } - - m_SmileyList.insert(new SmileyCType(dirs, (TCHAR*)name.c_str())); - - bkstring empty; - m_SmileyLookup.insert(new SmileyLookup( - m_SmileyList[m_SmileyList.getCount()-1].GetTriggerText(), false, m_SmileyList.getCount()-1, empty)); - - return true; -} - - -void SmileyPackCType::AddTriggersToSmileyLookup(void) -{ - bkstring empty; - for (int dist=0; dist. -*/ - -#include "general.h" -#include "smileys.h" - -#ifndef SMILEYADD_CUSTOMSMILEY_H_ -#define SMILEYADD_CUSTOMSMILEY_H_ - -class SmileyCType : public SmileyType -{ -public: - SmileyCType(const bkstring& fullpath, const TCHAR* filepath); - - bool CreateTriggerText(char* text); -}; - -class SmileyPackCType -{ -public: - typedef SMOBJLIST SmileyVectorType; - typedef SMOBJLIST SmileyLookupType; - -private: - SmileyVectorType m_SmileyList; - SmileyLookupType m_SmileyLookup; - - HANDLE m_id; - - void InsertLookup(SmileyCType& sml, bkstring& lk, bool first); - void AddTriggersToSmileyLookup(void); - -public: - SmileyVectorType& GetSmileyList(void) { return m_SmileyList; } - SmileyLookupType& GetSmileyLookup(void) { return m_SmileyLookup; } - - int SmileyCount(void) const { return m_SmileyList.getCount(); } - - SmileyCType* GetSmiley(unsigned index) { return &m_SmileyList[index]; } - - HANDLE GetId(void) { return m_id; } - void SetId(HANDLE id) { m_id = id; } - - bool LoadSmileyDir(TCHAR* dir); - bool LoadSmiley(TCHAR* path); -}; - - -class SmileyPackCListType -{ -public: - typedef SMOBJLIST SmileyPackVectorType; - -private: - SmileyPackVectorType m_SmileyPacks; - -public: - int NumberOfSmileyPacks(void) { return m_SmileyPacks.getCount(); } - - bool AddSmileyPack(HANDLE hContact, TCHAR* dir); - bool AddSmiley(HANDLE hContact, TCHAR* path); - - void ClearAndFreeAll(void) { m_SmileyPacks.destroy(); } - - SmileyPackCType* GetSmileyPack(HANDLE id); -}; - -extern SmileyPackCListType g_SmileyPackCStore; - -#endif diff --git a/plugins/SmileyAdd/dlgboxsubclass.cpp b/plugins/SmileyAdd/dlgboxsubclass.cpp deleted file mode 100644 index 03a0a6e5fd..0000000000 --- a/plugins/SmileyAdd/dlgboxsubclass.cpp +++ /dev/null @@ -1,568 +0,0 @@ -/* -Miranda SmileyAdd Plugin -Copyright (C) 2005 - 2012 Boris Krasnovskiy All Rights Reserved -Copyright (C) 2003 - 2004 Rein-Peter de Boer - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation version 2 -of the License. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#include "general.h" -#include "smileyroutines.h" -#include "services.h" -#include "options.h" - -//***************************************************// -// DISCLAIMER!!! -// we are not supposed to use this object, so be aware -typedef struct NewMessageWindowLParam -{ - HANDLE hContact; - int isSend; - const char *szInitialText; -} -msgData; -// this is an undocumented object!!!!!!! -// subject to change in miranda versions...!!!!!! -// DISCLAIMER!!! -//***************************************************// - -extern HINSTANCE g_hInst; - -static HHOOK g_hMessageHookPre = NULL; -static HANDLE g_hMutex = NULL; -static HANDLE g_hHookMsgWnd = NULL; - -static LRESULT CALLBACK MessageDlgSubclas(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam); - - -//type definitions -class MsgWndData -{ -public: - HWND hwnd; - char ProtocolName[52]; - HWND REdit; - HWND QuoteB; - HWND MEdit; - HWND MOK; - HWND LButton; - mutable HWND hSmlButton; - mutable HBITMAP hSmlBmp; - mutable HICON hSmlIco; - int idxLastChar; - WNDPROC wpOrigWndProc; - HANDLE hContact; - bool doSmileyReplace; - bool doSmileyButton; - bool OldButtonPlace; - bool isSplit; - bool isSend; - - MsgWndData() - { - ProtocolName[0] = 0; - REdit = NULL; - QuoteB = NULL; - MEdit = NULL; - MOK = NULL; - LButton = NULL; - hSmlButton = NULL; - hSmlBmp = NULL; - hSmlIco = NULL; - idxLastChar = 0; - hContact = NULL; - doSmileyReplace = false; - doSmileyButton = false; - OldButtonPlace = false; - isSplit = false; - isSend = false; - wpOrigWndProc = NULL; - } - - MsgWndData(const MsgWndData &dsb) - { - *this = dsb; - dsb.hSmlBmp = NULL; - dsb.hSmlIco = NULL; - dsb.hSmlButton = NULL; - } - - - ~MsgWndData() - { - clear(); - } - - void clear(void) - { - if (hSmlBmp != NULL) DeleteObject(hSmlBmp); - if (hSmlIco != NULL) DestroyIcon(hSmlIco); - if (hSmlButton != NULL) DestroyWindow(hSmlButton); - hSmlBmp = NULL; - hSmlIco = NULL; - hSmlButton = NULL; - } - - RECT CalcSmileyButtonPos(void) - { - RECT rect; - POINT pt; - - if (OldButtonPlace) - { - if (isSplit && DBGetContactSettingByte(NULL, "SRMsg", "ShowQuote", FALSE)) - { - GetWindowRect(QuoteB, &rect); - pt.x = rect.right + 12; - } - else - { - GetWindowRect(MEdit, &rect); - pt.x = rect.left; - } - GetWindowRect(MOK, &rect); - pt.y = rect.top; - } - else - { - GetWindowRect(LButton, &rect); - pt.y = rect.top; - - if ((GetWindowLongPtr(LButton, GWL_STYLE) & WS_VISIBLE) != 0) - pt.x = rect.left - 28; - else - pt.x = rect.left; - } - - ScreenToClient(GetParent(LButton), &pt); - rect.bottom += pt.y - rect.top; - rect.right += pt.x - rect.left; - rect.top = pt.y; - rect.left = pt.x; - - return rect; - } - - //helper function - //identifies the message dialog - bool IsMessageSendDialog(HWND hwnd) - { - TCHAR szClassName[32] = _T(""); - - GetClassName(hwnd, szClassName, SIZEOF(szClassName)); - if (_tcscmp(szClassName, _T("#32770"))) return false; - - if ((REdit = GetDlgItem(hwnd, MI_IDC_LOG)) != NULL) - { - GetClassName(REdit, szClassName, SIZEOF(szClassName)); - if (_tcscmp(szClassName, _T("RichEdit20A")) != 0 && - _tcscmp(szClassName, _T("RichEdit20W")) != 0 && - _tcscmp(szClassName, _T("RICHEDIT50W")) != 0) return false; - } - else return false; - - if ((MEdit = GetDlgItem(hwnd, MI_IDC_MESSAGE)) != NULL) - { - GetClassName(MEdit, szClassName, SIZEOF(szClassName)); - if (_tcscmp(szClassName, _T("Edit")) != 0 && - _tcscmp(szClassName, _T("RichEdit20A")) != 0 && - _tcscmp(szClassName, _T("RichEdit20W")) != 0 && - _tcscmp(szClassName, _T("RICHEDIT50W")) != 0) return false; - } - else return false; - - QuoteB = GetDlgItem(hwnd, MI_IDC_QUOTE); - - if ((LButton = GetDlgItem(hwnd, MI_IDC_ADD)) == NULL) - return false; - - if (GetDlgItem(hwnd, MI_IDC_NAME) == NULL) - return false; - if ((MOK = GetDlgItem(hwnd, IDOK)) == NULL) - return false; - - return true; - } - - void CreateSmileyButton(void) - { - doSmileyButton = opt.ButtonStatus != 0; - OldButtonPlace = opt.ButtonStatus == 2; - - SmileyPackType* SmileyPack = GetSmileyPack(ProtocolName, hContact); - doSmileyButton &= SmileyPack != NULL && SmileyPack->VisibleSmileyCount() != 0; - - bool showButtonLine; - if (IsOldSrmm()) - { - isSplit = DBGetContactSettingByte(NULL,"SRMsg","Split", TRUE) != 0; - - doSmileyReplace = (isSplit || !isSend); - doSmileyButton &= isSplit || isSend; - showButtonLine = DBGetContactSettingByte(NULL, "SRMsg", "ShowButtonLine", TRUE) != 0; - } - else - { - doSmileyReplace = true; - OldButtonPlace = false; - showButtonLine = DBGetContactSettingByte(NULL, "SRMM", "ShowButtonLine", TRUE) != 0; - } - - doSmileyButton &= OldButtonPlace || showButtonLine; - - if (ProtocolName[0] != 0) - { - INT_PTR cap = CallProtoService(ProtocolName, PS_GETCAPS, PFLAGNUM_1, 0); - doSmileyButton &= ((cap & (PF1_IMSEND | PF1_CHAT)) != 0); - doSmileyReplace &= ((cap & (PF1_IMRECV | PF1_CHAT)) != 0); - } - - if (doSmileyButton && opt.PluginSupportEnabled) - { - //create smiley button - RECT rect = CalcSmileyButtonPos(); - - hSmlButton = CreateWindowEx( - WS_EX_LEFT | WS_EX_NOPARENTNOTIFY | WS_EX_TOPMOST, - MIRANDABUTTONCLASS, - _T("S"), - WS_CHILD|WS_VISIBLE|WS_TABSTOP, // window style - rect.left, // horizontal position of window - rect.top, // vertical position of window - rect.bottom - rect.top + 1, // window width - rect.bottom - rect.top + 1, // window height - GetParent(LButton), // handle to parent or owner window - (HMENU) IDC_SMLBUTTON, // menu handle or child identifier - NULL, // handle to application instance - NULL); // window-creation data - - // Conversion to bitmap done to prevent Miranda from scaling the image - SmileyType* sml = FindButtonSmiley(SmileyPack); - if (sml != NULL) - { - hSmlBmp = sml->GetBitmap(GetSysColor(COLOR_BTNFACE), 0, 0); - SendMessage(hSmlButton, BM_SETIMAGE, IMAGE_BITMAP, (LPARAM)hSmlBmp); - } - else - { - hSmlIco = GetDefaultIcon(); - SendMessage(hSmlButton, BM_SETIMAGE, IMAGE_ICON, (LPARAM)hSmlIco); - } - - SendMessage(hSmlButton, BUTTONADDTOOLTIP, (WPARAM)LPGEN("Show Smiley Selection Window"), 0); - SendMessage(hSmlButton, BUTTONSETASFLATBTN, TRUE, 0); - } - } -}; - -static int CompareMsgWndData(const MsgWndData* p1, const MsgWndData* p2) -{ - return (int)((INT_PTR)p1->hwnd - (INT_PTR)p2->hwnd); -} -static LIST g_MsgWndList(10, CompareMsgWndData); - - -bool IsOldSrmm(void) -{ - return ServiceExists(MS_MSG_GETWINDOWCLASS) == 0; -} - - -int UpdateSrmmDlg(WPARAM wParam, LPARAM /* lParam */) -{ - WaitForSingleObject(g_hMutex, 2000); - for (int i=0; ihContact == (HANDLE)wParam) - { - SendMessage(g_MsgWndList[i]->hwnd, WM_SETREDRAW, FALSE, 0); - SendMessage(g_MsgWndList[i]->hwnd, DM_OPTIONSAPPLIED, 0, 0); - SendMessage(g_MsgWndList[i]->hwnd, WM_SETREDRAW, TRUE, 0); - } - } - ReleaseMutex(g_hMutex); - - return 0; -} - - -//find the dialog info in the stored list -static MsgWndData* IsMsgWnd(HWND hwnd) -{ - WaitForSingleObject(g_hMutex, 2000); - MsgWndData* res = g_MsgWndList.find((MsgWndData*)&hwnd); - ReleaseMutex(g_hMutex); - - return res; -} - - -static void MsgWndDetect(HWND hwndDlg, HANDLE hContact, msgData* datm) -{ - MsgWndData dat; - - if (dat.IsMessageSendDialog(hwndDlg)) - { - dat.hwnd = hwndDlg; - if (datm != NULL) - { - dat.isSend = datm->isSend != 0; - dat.hContact = datm->hContact; - } - else - dat.hContact = hContact; - - // Get the protocol for this contact to display correct smileys. - char *protonam = (char*) CallService(MS_PROTO_GETCONTACTBASEPROTO, - (WPARAM)DecodeMetaContact(dat.hContact), 0); - - if (protonam) - { - strncpy(dat.ProtocolName, protonam, sizeof(dat.ProtocolName)); - dat.ProtocolName[sizeof(dat.ProtocolName)-1] = 0; - } - - WaitForSingleObject(g_hMutex, 2000); - - MsgWndData* msgwnd = g_MsgWndList.find((MsgWndData*)&hwndDlg); - if (msgwnd == NULL) - { - msgwnd = new MsgWndData(dat); - g_MsgWndList.insert(msgwnd); - } - else - msgwnd = NULL; - ReleaseMutex(g_hMutex); - - if (msgwnd != NULL) - { - msgwnd->wpOrigWndProc = (WNDPROC)SetWindowLongPtr(hwndDlg, GWLP_WNDPROC, (LONG_PTR)MessageDlgSubclas); - msgwnd->CreateSmileyButton(); - if (hContact == NULL) SetRichCallback(msgwnd->REdit, msgwnd->hContact, true, true); - } - } -} - - -//global subclass function for all dialogs -static LRESULT CALLBACK MessageDlgSubclas(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) -{ - MsgWndData* dat = IsMsgWnd(hwnd); - if (dat == NULL) return 0; - - switch(uMsg) - { - case DM_OPTIONSAPPLIED: - dat->clear(); - dat->CreateSmileyButton(); - break; - - case DM_APPENDTOLOG: - if (opt.PluginSupportEnabled) - { - //get length of text now before things can get added... - GETTEXTLENGTHEX gtl; - gtl.codepage = 1200; - gtl.flags = GTL_PRECISE | GTL_NUMCHARS; - dat->idxLastChar = (int)SendMessage(dat->REdit, EM_GETTEXTLENGTHEX, (WPARAM) >l, 0); - } - break; - } - - LRESULT result = CallWindowProc(dat->wpOrigWndProc, hwnd, uMsg, wParam, lParam); - - if (!opt.PluginSupportEnabled) return result; - - switch(uMsg) - { - case WM_DESTROY: - WaitForSingleObject(g_hMutex, 2000); - SetWindowLongPtr(hwnd, GWLP_WNDPROC, (LONG_PTR)dat->wpOrigWndProc); - { - int ind = g_MsgWndList.getIndex((MsgWndData*)&hwnd); - if ( ind != -1 ) - { - delete g_MsgWndList[ind]; - g_MsgWndList.remove(ind); - } - } - ReleaseMutex(g_hMutex); - break; - - case WM_SIZE: - if (dat->doSmileyButton) - { - RECT rect = dat->CalcSmileyButtonPos(); - SetWindowPos(dat->hSmlButton, NULL, rect.left, rect.top, - 0, 0, SWP_NOZORDER | SWP_NOSIZE | SWP_NOACTIVATE); - } - break; - - case DM_APPENDTOLOG: - if (dat->doSmileyReplace) - { - SmileyPackCType* smcp; - SmileyPackType* SmileyPack = GetSmileyPack(dat->ProtocolName, dat->hContact, &smcp); - if (SmileyPack != NULL) - { - const CHARRANGE sel = { dat->idxLastChar, LONG_MAX }; - ReplaceSmileys(dat->REdit, SmileyPack, smcp, sel, false, false, false); - } - } - break; - - case DM_REMAKELOG: - if (dat->doSmileyReplace) - { - SmileyPackCType* smcp; - SmileyPackType* SmileyPack = GetSmileyPack(dat->ProtocolName, dat->hContact, &smcp); - if (SmileyPack != NULL) - { - static const CHARRANGE sel = { 0, LONG_MAX }; - ReplaceSmileys(dat->REdit, SmileyPack, smcp, sel, false, false, false); - } - } - break; - - case WM_COMMAND: - if (LOWORD(wParam) == IDC_SMLBUTTON && - HIWORD(wParam) == BN_CLICKED) - { - SmileyToolWindowParam *stwp = new SmileyToolWindowParam; - stwp->pSmileyPack = GetSmileyPack(dat->ProtocolName, dat->hContact); - - stwp->hWndParent = hwnd; - stwp->hWndTarget = dat->MEdit; - stwp->targetMessage = EM_REPLACESEL; - stwp->targetWParam = TRUE; - - RECT rect; - GetWindowRect(dat->hSmlButton, &rect); - - if (dat->OldButtonPlace) - { - stwp->direction = 3; - stwp->xPosition = rect.left; - stwp->yPosition = rect.top + 4; - } - else - { - stwp->direction = 0; - stwp->xPosition = rect.left; - stwp->yPosition = rect.top + 24; - } - - mir_forkthread(SmileyToolThread, stwp); - } - - if (LOWORD(wParam) == MI_IDC_ADD && - HIWORD(wParam) == BN_CLICKED && - dat->doSmileyButton) - { - RECT rect = dat->CalcSmileyButtonPos(); - SetWindowPos(dat->hSmlButton, NULL, rect.left, rect.top, - 0, 0, SWP_NOZORDER | SWP_NOSIZE | SWP_NOACTIVATE); - } - break; - } - - return result; -} - -static int MsgDlgHook(WPARAM, LPARAM lParam) -{ - const MessageWindowEventData *wndEvtData = (MessageWindowEventData*)lParam; - switch(wndEvtData->uType) - { - case MSG_WINDOW_EVT_OPENING: - MsgWndDetect(wndEvtData->hwndWindow, wndEvtData->hContact, NULL); - if (wndEvtData->cbSize >= sizeof(MessageWindowEventData)) - { - SetRichOwnerCallback(wndEvtData->hwndWindow, wndEvtData->hwndInput, wndEvtData->hwndLog); - - if (wndEvtData->hwndLog) - SetRichCallback(wndEvtData->hwndLog, wndEvtData->hContact, false, false); - if (wndEvtData->hwndInput) - SetRichCallback(wndEvtData->hwndInput, wndEvtData->hContact, false, false); - } - break; - - case MSG_WINDOW_EVT_OPEN: - if (wndEvtData->cbSize >= sizeof(MessageWindowEventData)) - { - SetRichOwnerCallback(wndEvtData->hwndWindow, wndEvtData->hwndInput, wndEvtData->hwndLog); - if (wndEvtData->hwndLog) - SetRichCallback(wndEvtData->hwndLog, wndEvtData->hContact, true, true); - if (wndEvtData->hwndInput) - { - SetRichCallback(wndEvtData->hwndInput, wndEvtData->hContact, true, true); - SendMessage(wndEvtData->hwndInput, WM_REMAKERICH, 0, 0); - } - } - break; - - case MSG_WINDOW_EVT_CLOSE: - if (wndEvtData->cbSize >= sizeof(MessageWindowEventData) && wndEvtData->hwndLog) - { - CloseRichCallback(wndEvtData->hwndLog, true); - CloseRichOwnerCallback(wndEvtData->hwndWindow, true); - } - break; - } - return 0; -} - - -//global subclass function for all dialogs -static LRESULT CALLBACK MsgDlgHookProcPre(int code, WPARAM wParam, LPARAM lParam) -{ - const CWPSTRUCT *msg = (CWPSTRUCT*)lParam; - - if (code == HC_ACTION && msg->message == WM_INITDIALOG) - MsgWndDetect(msg->hwnd, NULL, (msgData*)msg->lParam); - - return CallNextHookEx(g_hMessageHookPre, code, wParam, lParam); -} - - -void InstallDialogBoxHook(void) -{ - g_hMutex = CreateMutex(NULL, FALSE, NULL); - - g_hHookMsgWnd = HookEvent(ME_MSG_WINDOWEVENT, MsgDlgHook); - - // Hook message API - if (g_hHookMsgWnd == NULL) - g_hMessageHookPre = SetWindowsHookEx(WH_CALLWNDPROC, MsgDlgHookProcPre, - NULL, GetCurrentThreadId()); -} - - -void RemoveDialogBoxHook(void) -{ - if (g_hHookMsgWnd) UnhookEvent(g_hHookMsgWnd); - if (g_hMessageHookPre) UnhookWindowsHookEx(g_hMessageHookPre); - - WaitForSingleObject(g_hMutex, 2000); - for (int i=0; i. -*/ - -#include "general.h" -#include "m_smileyadd.h" -#include "m_folders.h" - -extern HANDLE hEvent1; -HANDLE hNetlibUser; -static HANDLE hFolder, hFolderHook; - -struct QueueElem -{ - bkstring url; - bkstring fname; - bool needext; - - QueueElem(bkstring& purl, bkstring& pfname, bool ne) - : url(purl), fname(pfname), needext(ne) {} -}; - -static HANDLE g_hDlMutex; -static OBJLIST dlQueue(10); - -static TCHAR cachepath[MAX_PATH]; -static bool threadRunning; - -bool InternetDownloadFile(const char *szUrl, char* szDest, HANDLE &hHttpDwnl) -{ - int result = 0xBADBAD; - char* szRedirUrl = NULL; - NETLIBHTTPREQUEST nlhr = {0}; - - // initialize the netlib request - nlhr.cbSize = sizeof(nlhr); - nlhr.requestType = REQUEST_GET; - nlhr.flags = NLHRF_NODUMP; - nlhr.szUrl = (char*)szUrl; - nlhr.nlc = hHttpDwnl; - - if (CallService(MS_SYSTEM_GETVERSION, 0, 0) >= PLUGIN_MAKE_VERSION(0,9,0,5)) - nlhr.flags |= NLHRF_HTTP11 | NLHRF_PERSISTENT | NLHRF_REDIRECT; - - // change the header so the plugin is pretended to be IE 6 + WinXP - nlhr.headersCount = 2; - nlhr.headers=(NETLIBHTTPHEADER*)alloca(sizeof(NETLIBHTTPHEADER)*nlhr.headersCount); - nlhr.headers[0].szName = "User-Agent"; - nlhr.headers[0].szValue = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)"; - nlhr.headers[1].szName = "Connection"; - nlhr.headers[1].szValue = "close"; - - while (result == 0xBADBAD) - { - // download the page - NETLIBHTTPREQUEST *nlhrReply = (NETLIBHTTPREQUEST*)CallService(MS_NETLIB_HTTPTRANSACTION, - (WPARAM)hNetlibUser,(LPARAM)&nlhr); - - if (nlhrReply) - { - hHttpDwnl = nlhrReply->nlc; - // if the recieved code is 200 OK - if(nlhrReply->resultCode == 200) - { - char* delim = strrchr(szDest, '\\'); - if (delim) *delim = '\0'; - CallService(MS_UTILS_CREATEDIRTREE, 0, (LPARAM)szDest); - if (delim) *delim = '\\'; - int res = -1; - int fh = _open(szDest, _O_BINARY | _O_WRONLY | _O_CREAT, _S_IREAD | _S_IWRITE); - if (fh != -1) - { - res = _write(fh, nlhrReply->pData, nlhrReply->dataLength); - _close(fh); - } - if (res < 0) - remove(szDest); - else - result = 0; - } - // if the recieved code is 302 Moved, Found, etc - // workaround for url forwarding - else if(nlhrReply->resultCode == 302 || nlhrReply->resultCode == 301 || nlhrReply->resultCode == 307) // page moved - { - // get the url for the new location and save it to szInfo - // look for the reply header "Location" - for (int i=0; iheadersCount; i++) - { - if (!strcmp(nlhrReply->headers[i].szName, "Location")) - { - size_t rlen = 0; - if (nlhrReply->headers[i].szValue[0] == '/') - { - const char* szPath; - const char* szPref = strstr(szUrl, "://"); - szPref = szPref ? szPref + 3 : szUrl; - szPath = strchr(szPref, '/'); - rlen = szPath != NULL ? szPath - szUrl : strlen(szUrl); - } - - szRedirUrl = (char*)mir_realloc(szRedirUrl, - rlen + strlen(nlhrReply->headers[i].szValue)*3 + 1); - - strncpy(szRedirUrl, szUrl, rlen); - strcpy(szRedirUrl+rlen, nlhrReply->headers[i].szValue); - - nlhr.szUrl = szRedirUrl; - break; - } - } - } - else - result = 1; - } - else - { - hHttpDwnl = NULL; - result = 1; - } - - CallService(MS_NETLIB_FREEHTTPREQUESTSTRUCT,0,(LPARAM)nlhrReply); - } - - mir_free(szRedirUrl); - - return result == 0; -} - - -void __cdecl SmileyDownloadThread(void*) -{ - bool needext = false; - HANDLE hHttpDwnl = NULL; - WaitForSingleObject(g_hDlMutex, 3000); - while (!Miranda_Terminated() && dlQueue.getCount()) - { - ReleaseMutex(g_hDlMutex); - if (_taccess(dlQueue[0].fname.c_str(), 0) != 0) - { - InternetDownloadFile(T2A_SM(dlQueue[0].url.c_str()), T2A_SM(dlQueue[0].fname.c_str()), hHttpDwnl); - WaitForSingleObject(g_hDlMutex, 3000); - - bkstring fname(dlQueue[0].fname); - if (dlQueue[0].needext) { fname += GetImageExt(fname); needext = true; } - _trename(dlQueue[0].fname.c_str(), fname.c_str()); - } - else - WaitForSingleObject(g_hDlMutex, 3000); - - dlQueue.remove(0); - } - dlQueue.destroy(); - if (hHttpDwnl) Netlib_CloseHandle(hHttpDwnl); - threadRunning = false; - ReleaseMutex(g_hDlMutex); - - if (!Miranda_Terminated()) - { - if (needext) - CallServiceSync(MS_SMILEYADD_RELOAD, 0, 0); - else - NotifyEventHooks(hEvent1, 0, 0); - } -} - - -bool GetSmileyFile(bkstring& url, const bkstring& packstr) -{ - _TPattern * urlsplit = _TPattern::compile(_T(".*/(.*)")); - _TMatcher * m0 = urlsplit->createTMatcher(url); - - m0->findFirstMatch(); - - bkstring filename; - filename.appendfmt(_T("%s\\%s\\"), cachepath, packstr.c_str()); - size_t pathpos = filename.size(); - filename += m0->getGroup(1); - - delete m0; - delete urlsplit; - - bool needext = filename.find('.') == filename.npos; - if (needext) filename += _T(".*"); - - _tfinddata_t c_file; - INT_PTR hFile = _tfindfirst((TCHAR*)filename.c_str(), &c_file); - if (hFile > -1) - { - _findclose(hFile); - filename.erase(pathpos); - filename += c_file.name; - url = filename; - return false; - } - if (needext) filename.erase(filename.size()-1); - - WaitForSingleObject(g_hDlMutex, 3000); - dlQueue.insert(new QueueElem(url, filename, needext)); - ReleaseMutex(g_hDlMutex); - - if (!threadRunning) - { - threadRunning = true; - mir_forkthread(SmileyDownloadThread, NULL); - } - - url = filename; - return false; -} - -void GetDefaultSmileyCacheFolder(TCHAR* szPath, size_t cbLen) -{ - TCHAR *tmpPath = Utils_ReplaceVarsT(_T("%miranda_userdata%\\SmileyCache")); - if ((INT_PTR)tmpPath != CALLSERVICE_NOTFOUND) - { - mir_sntprintf(szPath, cbLen, _T("%s"), tmpPath); - mir_free(tmpPath); - } - else - { - char dbPath[MAX_PATH]; - CallService(MS_DB_GETPROFILEPATH, SIZEOF(dbPath), (LPARAM)dbPath); - mir_sntprintf(szPath, cbLen, _T("%s\\SmileyCache"), A2T_SM(dbPath)); - } -} - -int FolderChanged(WPARAM, LPARAM) -{ - FOLDERSGETDATA fgd = {0}; - fgd.cbSize = sizeof(FOLDERSGETDATA); - fgd.nMaxPathSize = SIZEOF(cachepath); - fgd.szPathT = cachepath; - if (CallService(MS_FOLDERS_GET_PATH, (WPARAM) hFolder, (LPARAM) &fgd)) - { - GetDefaultSmileyCacheFolder(cachepath, SIZEOF(cachepath)); - } - - return 0; -} - -void GetSmileyCacheFolder(void) -{ - TCHAR defaultPath[MAX_PATH]; - - GetDefaultSmileyCacheFolder(defaultPath, SIZEOF(defaultPath)); - - FOLDERSDATA fd = {0}; - fd.cbSize = sizeof(FOLDERSDATA); - strcpy(fd.szSection, "SmileyAdd"); - strcpy(fd.szName,"Smiley Cache"); - fd.szFormatT = defaultPath; - fd.flags = FF_TCHAR; - hFolder = (HANDLE)CallService(MS_FOLDERS_REGISTER_PATH, 0, (LPARAM) &fd); - - FolderChanged(0, 0); - - hFolderHook = HookEvent(ME_FOLDERS_PATH_CHANGED, FolderChanged); -} - -void DownloadInit(void) -{ - NETLIBUSER nlu = {0}; - nlu.cbSize = sizeof(nlu); - nlu.flags = NUF_OUTGOING|NUF_HTTPCONNS|NUF_NOHTTPSOPTION; - nlu.szSettingsModule = "SmileyAdd"; - nlu.szDescriptiveName = Translate("SmileyAdd HTTP connections"); - hNetlibUser = (HANDLE)CallService(MS_NETLIB_REGISTERUSER, 0, (LPARAM)&nlu); - - GetSmileyCacheFolder(); - g_hDlMutex = CreateMutex(NULL, FALSE, NULL); -} - -void DownloadClose(void) -{ - UnhookEvent(hFolderHook); - CloseHandle(g_hDlMutex); - Netlib_CloseHandle(hNetlibUser); -} diff --git a/plugins/SmileyAdd/download.h b/plugins/SmileyAdd/download.h deleted file mode 100644 index bb83926acc..0000000000 --- a/plugins/SmileyAdd/download.h +++ /dev/null @@ -1,28 +0,0 @@ -/* -Miranda SmileyAdd Plugin -Copyright (C) 2008 - 2011 Boris Krasnovskiy All Rights Reserved - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation version 2 -of the License. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#ifndef SMILEYADD_DOWNLOAD_H_ -#define SMILEYADD_DOWNLOAD_H_ - -#include "general.h" - -bool GetSmileyFile(bkstring& url, const bkstring& packstr); -void DownloadInit(void); -void DownloadClose(void); - -#endif diff --git a/plugins/SmileyAdd/general.cpp b/plugins/SmileyAdd/general.cpp deleted file mode 100644 index 9e97737f8c..0000000000 --- a/plugins/SmileyAdd/general.cpp +++ /dev/null @@ -1,299 +0,0 @@ -/* -Miranda SmileyAdd Plugin -Copyright (C) 2005 - 2012 Boris Krasnovskiy All Rights Reserved -Copyright (C) 2003 - 2004 Rein-Peter de Boer - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation version 2 -of the License. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#include "general.h" -#include "m_metacontacts.h" - -#ifdef _MSC_VER -#include -#endif - -/* -#include "m_popup.h" -*/ -static ULONG_PTR g_gdiplusToken = 0; -static bool gdiPlusFail = false; - -// -// General functions -// -int CalculateTextHeight(HDC hdc, CHARFORMAT2* chf) -{ - HDC hcdc = CreateCompatibleDC(hdc); - - int logPixelsY = GetDeviceCaps(hdc, LOGPIXELSY); - HFONT hFont = CreateFont(-(chf->yHeight * logPixelsY / 1440), 0, 0, 0, - chf->wWeight, chf->dwEffects & CFE_ITALIC ? 1 : 0, 0, 0, - chf->bCharSet, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, - DEFAULT_QUALITY, DEFAULT_PITCH | FF_DONTCARE, - chf->szFaceName); - SelectObject(hcdc, hFont); - - SIZE fontSize; - GetTextExtentPoint32(hcdc, _T(")"), 1, &fontSize); - - DeleteObject(hFont); - DeleteDC(hcdc); - - return fontSize.cy; -} - - -HICON GetDefaultIcon(bool copy) -{ - HICON resIco = (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)"SmileyAdd_ButtonSmiley"); - if ( resIco == NULL || resIco == (HICON)CALLSERVICE_NOTFOUND ) - { - resIco = (HICON)LoadImage(g_hInst, MAKEINTRESOURCE(IDI_SMILINGICON), - IMAGE_ICON, 0, 0, copy ? 0 : LR_SHARED); - } - else - { - if (copy) - { - resIco = (HICON)CopyImage(resIco, IMAGE_ICON, 0, 0, 0); - CallService(MS_SKIN2_RELEASEICON, 0, (LPARAM)"SmileyAdd_ButtonSmiley"); - } - } - - return resIco; -} - - -const TCHAR* GetImageExt(bkstring &fname) -{ - const TCHAR* ext = _T(""); - - int fileId = _topen(fname.c_str(), O_RDONLY | _O_BINARY); - if (fileId != -1) - { - BYTE buf[6]; - - int bytes = _read(fileId, buf, sizeof(buf)); - if (bytes > 4) - { - if ( *(unsigned short*)buf == 0xd8ff ) - ext = _T("jpg"); - else if ( *(unsigned short*)buf == 0x4d42 ) - ext = _T("bmp"); - else if ( *(unsigned*)buf == 0x474e5089 ) - ext = _T("png"); - else if ( *(unsigned*)buf == 0x38464947 ) - ext = _T("gif"); - } - _close(fileId); - } - return ext; -} - - - -HICON ImageList_GetIconFixed (HIMAGELIST himl, INT i, UINT fStyle) -{ - ICONINFO ii; - HICON hIcon; - HBITMAP hOldDstBitmap; - HDC hdcDst; - - int cx, cy; - ImageList_GetIconSize(himl, &cx, &cy); - - hdcDst = CreateCompatibleDC(NULL); - - ii.fIcon = TRUE; - ii.xHotspot = 0; - ii.yHotspot = 0; - - /* draw mask*/ - ii.hbmMask = CreateBitmap (cx, cy, 1, 1, NULL); - hOldDstBitmap = (HBITMAP)SelectObject (hdcDst, ii.hbmMask); - PatBlt(hdcDst, 0, 0, cx, cy, WHITENESS); - ImageList_Draw(himl, i, hdcDst, 0, 0, fStyle | ILD_MASK); - - /* draw image*/ - ii.hbmColor = CreateBitmap (cx, cy, 1, 32, NULL); - SelectObject (hdcDst, ii.hbmColor); - PatBlt (hdcDst, 0, 0, cx, cy, BLACKNESS); - ImageList_Draw(himl, i, hdcDst, 0, 0, fStyle | ILD_TRANSPARENT); - - /* - * CreateIconIndirect requires us to deselect the bitmaps from - * the DCs before calling - */ - SelectObject(hdcDst, hOldDstBitmap); - - hIcon = CreateIconIndirect (&ii); - - DeleteObject (ii.hbmMask); - DeleteObject (ii.hbmColor); - DeleteDC (hdcDst); - - return hIcon; -} - -void pathToRelative(const bkstring& pSrc, bkstring& pOut) -{ - TCHAR szOutPath[MAX_PATH]; - CallService(MS_UTILS_PATHTORELATIVET, (WPARAM)pSrc.c_str(), (LPARAM)szOutPath); - pOut = szOutPath; -} - -void pathToAbsolute(const bkstring& pSrc, bkstring& pOut) -{ - TCHAR szOutPath[MAX_PATH]; - - TCHAR* szVarPath = Utils_ReplaceVarsT(pSrc.c_str()); - if (szVarPath == (TCHAR*)CALLSERVICE_NOTFOUND || szVarPath == NULL) - { - TCHAR szExpPath[MAX_PATH]; - ExpandEnvironmentStrings(pSrc.c_str(), szExpPath, SIZEOF(szExpPath)); - CallService(MS_UTILS_PATHTOABSOLUTET, (WPARAM)szExpPath, (LPARAM)szOutPath); - } - else - { - CallService(MS_UTILS_PATHTOABSOLUTET, (WPARAM)szVarPath, (LPARAM)szOutPath); - mir_free(szVarPath); - } - pOut = szOutPath; -} - - -///////////////////////////////////////////////////////////////////////////////////////// -// UrlDecode - converts URL chars like %20 into printable characters - -static int __fastcall SingleHexToDecimal(char c) -{ - if (c >= '0' && c <= '9') return c-'0'; - if (c >= 'a' && c <= 'f') return c-'a'+10; - if (c >= 'A' && c <= 'F') return c-'A'+10; - return -1; -} - -void UrlDecode(char* str) -{ - char* s = str, *d = str; - - while(*s) - { - if (*s == '%') - { - int digit1 = SingleHexToDecimal(s[1]); - if ( digit1 != -1 ) - { - int digit2 = SingleHexToDecimal(s[2]); - if ( digit2 != -1 ) - { - s += 3; - *d++ = (char)((digit1 << 4) | digit2); - continue; - } - } - } - *d++ = *s++; - } - - *d = 0; -} - - -bool InitGdiPlus(void) -{ - Gdiplus::GdiplusStartupInput gdiplusStartupInput; - - static const TCHAR errmsg[] = _T("GDI+ not installed.\n") - _T("GDI+ can be downloaded here: http://www.microsoft.com/downloads"); - -#ifdef _MSC_VER - __try -#endif - { - if (g_gdiplusToken == 0 && !gdiPlusFail) - { - Gdiplus::GdiplusStartup(&g_gdiplusToken, &gdiplusStartupInput, NULL); - } - } -#ifdef _MSC_VER - __except ( EXCEPTION_EXECUTE_HANDLER ) - { - gdiPlusFail = true; - ReportError(errmsg); - } -#endif - - return !gdiPlusFail; -} - -void DestroyGdiPlus(void) -{ - if (g_gdiplusToken != 0) - { - Gdiplus::GdiplusShutdown(g_gdiplusToken); -#ifdef _MSC_VER -#if 1200 < _MSC_VER - __FUnloadDelayLoadedDLL2("gdiplus.dll"); -#else - __FUnloadDelayLoadedDLL("gdiplus.dll"); -#endif -#endif - g_gdiplusToken = 0; - } -} - -HANDLE DecodeMetaContact(HANDLE hContact) -{ - if (hContact == NULL) return NULL; - HANDLE hReal = (HANDLE) CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM) hContact, 0); - if (hReal == NULL || hReal == (HANDLE)CALLSERVICE_NOTFOUND) - hReal = hContact; - - return hReal; -} - -bool IsSmileyProto(char* proto) -{ - return proto && (!metaProtoName || strcmp(proto, metaProtoName)) && - (CallProtoService(proto, PS_GETCAPS, PFLAGNUM_1, 0) & (PF1_IM | PF1_CHAT)); -} - -void ReportError(const TCHAR* errmsg) -{ - static const TCHAR title[] = _T("Miranda SmileyAdd"); -/* - - POPUPDATAW pd = {0}; - - - _tcscpy(pd.lpwzContactName, title); - _tcscpy(pd.lpwzText, errmsg); - - pd.iSeconds = -1; - - - bool popupFail = PUAddPopUpW(&pd) != CALLSERVICE_NOTFOUND; - - if (popupFail) -*/ - MessageBox(NULL, errmsg, title, MB_OK | MB_ICONWARNING | MB_TOPMOST); -} - -#pragma warning( disable : 4786 ) -#undef _MT - -#include -#include diff --git a/plugins/SmileyAdd/general.h b/plugins/SmileyAdd/general.h deleted file mode 100644 index 8cc13c5619..0000000000 --- a/plugins/SmileyAdd/general.h +++ /dev/null @@ -1,232 +0,0 @@ -/* -Miranda SmileyAdd Plugin -Copyright (C) 2005 - 2011 Boris Krasnovskiy -Copyright (C) 2003 - 2004 Rein-Peter de Boer - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation version 2 -of the License. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#ifndef _GENERAL_ -#define _GENERAL_ - -#define _HAS_EXCEPTIONS 0 -#define _SECURE_SCL 0 -#define _SECURE_SCL_THROWS 0 -#define __STDC_WANT_SECURE_LIB__ 0 -#define _STRALIGN_USE_SECURE_CRT 0 -#define _NO_EXCEPTIONS - -#include - -#include -#include -#include -#include -#include -#include - -#include -#include - -#include -#include - -#include "bkstring.h" - -#undef _MT - -#pragma warning( push ) -#pragma warning( disable : 4530 ) -#pragma warning( disable : 4275 ) -#pragma warning( disable : 4390 ) - -#include -#include - -typedef WCPattern _TPattern; -typedef WCMatcher _TMatcher; -#define createTMatcher createWCMatcher - -#pragma warning( pop ) - -#define _MT - -#include "resource.h" - -#pragma warning( push ) -#pragma warning( disable : 4100 ) -#define MIRANDA_VER 0x0A00 -#define NETLIB_NOLOGGING -#define MIRANDA_CUSTOM_LP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#pragma warning( pop ) - -//globals, defined int main.cpp -extern HINSTANCE g_hInst; -extern char* metaProtoName; - -//some system and NT stuff... -#ifndef OPENFILENAME_SIZE_VERSION_400 -#define OPENFILENAME_SIZE_VERSION_400 sizeof(OPENFILENAME) -#endif - - -#define IDC_SMLBUTTON (WM_USER + 33) - -/////////////////////////////////////////////////// -// -//defines from miranda im sources (undocumented!) -// -#define MI_IDC_LOG 1001 //rich edit -#define MI_IDC_MESSAGE 1002 //edit control -#define MI_IDC_QUOTE 1034 //button control -#define MI_IDC_NAME 1009 //text control -#define MI_IDC_ADD 1070 //Add button. - -#define DM_REMAKELOG (WM_USER + 11) -#define DM_OPTIONSAPPLIED (WM_USER + 14) -#define DM_APPENDTOLOG (WM_USER + 17) - -#define WM_REMAKERICH (WM_USER + 0x3457) - -///////////////////////////////////////////////////// - -#define MAX_SMILEY_LENGTH 96 - -class A2W_SM -{ -public: - wchar_t* m_psz; - - A2W_SM(const char* psz, unsigned nCodePage = CP_ACP) - { - const int nLength = MultiByteToWideChar(nCodePage, 0, psz, -1, NULL, 0); - m_psz = new wchar_t[nLength]; - MultiByteToWideChar(nCodePage, 0, psz, -1, m_psz, nLength); - } - ~A2W_SM() { delete [] m_psz; } - operator wchar_t*() const { return m_psz; } -}; - - -class W2A_SM -{ -public: - char* m_psz; - - W2A_SM(const wchar_t* psz, unsigned nCodePage = CP_ACP) - { - const int nLength = WideCharToMultiByte(nCodePage, 0, psz, -1, NULL, 0, NULL, NULL); - m_psz = new char[nLength]; - WideCharToMultiByte(nCodePage, 0, psz, -1, m_psz, nLength, NULL, NULL); - } - ~W2A_SM() { delete [] m_psz; } - operator char*() const { return m_psz; } -}; - -#define T2A_SM (char*)W2A_SM -#define T2W_SM(p1) (wchar_t*)p1 -#define A2T_SM (wchar_t*)A2W_SM -#define W2T_SM(p1) (TCHAR*)p1 - -template struct SMOBJLIST : public OBJLIST -{ - SMOBJLIST() : OBJLIST(5) {}; - - SMOBJLIST& operator = (const SMOBJLIST& lst) - { - OBJLIST::destroy(); - return operator += (lst); - } - - SMOBJLIST& operator += (const SMOBJLIST& lst) - { - for (int i=0; i& lst) - { - for (int i=0; i::destroy(); - } -}; - -inline unsigned short GetWinVer(void) -{ - unsigned short ver = LOWORD(GetVersion()); - ver = (ver & 0xFF) << 8 | (ver >> 8); - return ver; -} - - -// init functions -void InstallDialogBoxHook(void); -void RemoveDialogBoxHook(void); -int UpdateSrmmDlg(WPARAM wParam, LPARAM lParam); -bool IsOldSrmm(void); - -//functions for general use (defined in general.cpp) -int CalculateTextHeight(HDC hdc, CHARFORMAT2* chf); -const TCHAR* GetImageExt(bkstring &fname); - -HANDLE DecodeMetaContact(HANDLE hContact); -bool IsSmileyProto(char* proto); - -HICON ImageList_GetIconFixed (HIMAGELIST himl, INT i, UINT fStyle); - -void pathToRelative(const bkstring& pSrc, bkstring& pOut); -void pathToAbsolute(const bkstring& pSrc, bkstring& pOut); - -bool InitGdiPlus(void); -void DestroyGdiPlus(void); - -void ReportError(const TCHAR* errmsg); -HICON GetDefaultIcon(bool copy = true); - -void CloseRichCallback(HWND hwnd, bool force); -void CloseRichOwnerCallback(HWND hwnd, bool force); -bool SetRichCallback(HWND hwnd, HANDLE hContact, bool subany, bool subnew); -void SetRichOwnerCallback(HWND hwnd, HWND hwndInput, HWND hwndLog); -void ProcessAllInputAreas(bool restoreText); -void RichEditData_Destroy(void); - -void CloseSmileys(void); -void DestroySmileyBase(void); -void DestroyAniSmileys(void); - -void UrlDecode(char* str); - -#endif diff --git a/plugins/SmileyAdd/imagecache.cpp b/plugins/SmileyAdd/imagecache.cpp deleted file mode 100644 index 8fdcea9003..0000000000 --- a/plugins/SmileyAdd/imagecache.cpp +++ /dev/null @@ -1,775 +0,0 @@ -/* -Miranda SmileyAdd Plugin -Copyright (C) 2008 - 2011 Boris Krasnovskiy - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation version 2 -of the License. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#include "imagecache.h" -#include "options.h" - -typedef BOOL (WINAPI *tAlphaBlend)(HDC, int, int, int, int, HDC, int, int, int, int, BLENDFUNCTION); -static tAlphaBlend pAlphaBlend; - -static FI_INTERFACE *fei; - -static HANDLE g_hMutexIm; -static OBJLIST g_imagecache(25, ImageType::CompareImg); - -static bkstring lastdllname; -static HMODULE lastmodule; -static time_t laststamp; -static UINT_PTR timerId; - -static void CALLBACK timerProc(HWND, UINT, UINT_PTR, DWORD) -{ - WaitForSingleObject(g_hMutexIm, 3000); - const time_t ts = time(NULL) - 10; - if ( lastmodule && ts > laststamp) - { - FreeLibrary(lastmodule); - lastmodule = NULL; - lastdllname.clear(); - } - - for (int i=g_imagecache.getCount(); i--; ) - g_imagecache[i].ProcessTimerTick(ts); - - if (g_imagecache.getCount() == 0) - { - g_imagecache.destroy(); - if (timerId && (timerId+1) && lastmodule == NULL) - { - KillTimer(NULL, timerId); - timerId = 0; - } - } - - ReleaseMutex(g_hMutexIm); -} - - -static void CALLBACK sttMainThreadCallback( PVOID ) -{ - if (timerId == 0xffffffff) - timerId = SetTimer(NULL, 0, 10000, (TIMERPROC)timerProc); -} - - -static HMODULE LoadDll(const bkstring& file) -{ - WaitForSingleObject(g_hMutexIm, 3000); - - if (lastdllname != file) - { - FreeLibrary(lastmodule); - lastdllname = file; - - lastmodule = LoadLibraryEx(file.c_str(), NULL, LOAD_LIBRARY_AS_DATAFILE); - - } - laststamp = time(NULL); - - ReleaseMutex(g_hMutexIm); - return lastmodule; -} - - - -ImageBase::ImageBase(unsigned id) -{ - m_id = id; - m_lRefCount = 1; - m_timestamp = 0; -} - -long ImageBase::AddRef(void) -{ - WaitForSingleObject(g_hMutexIm, 3000); - long cnt = ++m_lRefCount; - ReleaseMutex(g_hMutexIm); - return cnt; -} - -long ImageBase::Release(void) -{ - WaitForSingleObject(g_hMutexIm, 3000); - - long cnt = m_lRefCount; - if (cnt) m_lRefCount = --cnt; - if (cnt == 0) m_timestamp = time(NULL); - - ReleaseMutex(g_hMutexIm); - return cnt; -} - -void ImageBase::ProcessTimerTick(time_t ts) -{ - WaitForSingleObject(g_hMutexIm, 3000); - if (m_lRefCount == 0 && m_timestamp < ts ) - { - if (!g_imagecache.remove(this)) - delete this; - } - ReleaseMutex(g_hMutexIm); -} - -int ImageBase::CompareImg(const ImageBase* p1, const ImageBase* p2) -{ - unsigned id1 = p1->m_id; - unsigned id2 = p2->m_id; - - if (id1 == id2) return 0; - else return id1 < id2 ? -1 : 1; -} - -void ImageBase::Draw(HDC hdc, RECT& rc, bool clip) -{ - HRGN hrgn = NULL; - if (clip) - { - hrgn = CreateRectRgn(rc.left, rc.top, rc.right, rc.bottom); - SelectClipRgn(hdc, hrgn); - } - - SIZE iSize; - GetSize(iSize); - - const int sizeX = rc.right - rc.left; - const int sizeY = rc.bottom - rc.top; - - const int x = rc.left + (sizeX > iSize.cx || clip ? (sizeX - iSize.cx) / 2 : 0); - const int y = rc.top + (sizeY > iSize.cy || clip ? (sizeY - iSize.cy) / 2 : 0); - - const int scaleX = sizeX > iSize.cx || clip ? iSize.cx : sizeX; - const int scaleY = sizeY > iSize.cy || clip ? iSize.cy : sizeY; - - DrawInternal(hdc, x, y, scaleX, scaleY); - - if (clip) - { - SelectClipRgn(hdc, NULL); - DeleteObject(hrgn); - } -} - - -HBITMAP ImageBase::GetBitmap(COLORREF bkgClr, int sizeX, int sizeY) -{ - RECT rc = { 0, 0, sizeX, sizeY }; - - if (sizeX == 0 || sizeY == 0) - { - SIZE iSize; - GetSize(iSize); - - if (sizeX == 0) rc.right = iSize.cx; - if (sizeY == 0) rc.bottom = iSize.cy; - } - - HBRUSH hBkgBrush = CreateSolidBrush(bkgClr); - HDC hdc = GetDC(NULL); - HBITMAP hBmp = CreateCompatibleBitmap(hdc, rc.right, rc.bottom); - HDC hdcMem = CreateCompatibleDC(hdc); - SelectObject(hdcMem, hBmp); - - FillRect(hdcMem, &rc, hBkgBrush); - - Draw(hdcMem, rc, false); - - DeleteDC(hdcMem); - ReleaseDC(NULL, hdc); - DeleteObject(hBkgBrush); - - return hBmp; -} - -int ImageBase::SelectNextFrame(const int frame) -{ - int res = (frame + 1) % GetFrameCount(); - SelectFrame(res); - return res; -} - - - -IconType::IconType(const unsigned id, const bkstring& file, const int index, const IcoTypeEnum type) - : ImageBase(id) -{ - m_SmileyIcon = NULL; - - switch (type) - { - case icoDll: - { - const HMODULE hModule = LoadDll(file); - if (hModule != NULL) - m_SmileyIcon = (HICON) LoadImage(hModule, MAKEINTRESOURCE(-index), IMAGE_ICON, 0, 0, 0); - } - break; - - case icoFile: - m_SmileyIcon = (HICON) LoadImage(NULL, file.c_str(), IMAGE_ICON, 0, 0, LR_LOADFROMFILE); - break; - - default: - ExtractIconEx(file.c_str(), index, NULL, &m_SmileyIcon, 1); - break; - } -} - -IconType::~IconType() -{ - DestroyIcon(m_SmileyIcon); -} - -void IconType::DrawInternal(HDC hdc, int x, int y, int sizeX, int sizeY) -{ - if (m_SmileyIcon != NULL) - DrawIconEx(hdc, x, y, m_SmileyIcon, sizeX, sizeY, 0, NULL, DI_NORMAL); -} - -HICON IconType::GetIcon(void) -{ - return (HICON)CopyImage(m_SmileyIcon, IMAGE_ICON, 0, 0, 0); -} - -void IconType::GetSize(SIZE& size) -{ - if (m_SmileyIcon != NULL) - { - ICONINFO ii; - BITMAP bm; - GetIconInfo(m_SmileyIcon, &ii); - GetObject(ii.hbmColor, sizeof(bm), &bm); - size.cx = bm.bmWidth; - size.cy = bm.bmHeight; - DeleteObject(ii.hbmMask); - DeleteObject(ii.hbmColor); - } -} - - - -ImageListItemType::ImageListItemType(const unsigned id, HIMAGELIST hImList, int index) - : ImageBase(id) -{ - m_index = index; - m_hImList = hImList; -} - -void ImageListItemType::DrawInternal(HDC hdc, int x, int y, int sizeX, int sizeY) -{ - SIZE iSize; - GetSize(iSize); - - if (sizeX >= iSize.cx && sizeY >= iSize.cy) - ImageList_Draw(m_hImList, m_index, hdc, x, y, ILD_TRANSPARENT); - else - { - HICON hIcon = ImageList_GetIconFixed(m_hImList, m_index, ILD_TRANSPARENT); - DrawIconEx(hdc, x, y, hIcon, sizeX, sizeY, 0, NULL, DI_NORMAL); - DestroyIcon(hIcon); - } -} - -HICON ImageListItemType::GetIcon(void) -{ - return ImageList_GetIconFixed(m_hImList, m_index, ILD_TRANSPARENT); -} - -void ImageListItemType::GetSize(SIZE& size) -{ - ImageList_GetIconSize(m_hImList, (int*)&size.cx, (int*)&size.cy); -} - -ImageType::ImageType(const unsigned id, const bkstring& file, IStream* pStream) - : ImageBase(id) -{ - m_bmp = NULL; - m_pPropertyItem = NULL; - m_nCurrentFrame = 0; - m_nFrameCount = 0; - - if (!InitGdiPlus()) return; - - if (pStream) - m_bmp = new Gdiplus::Bitmap(pStream); - else - m_bmp = new Gdiplus::Bitmap(T2W_SM(file.c_str())); - - if (m_bmp->GetLastStatus() != Gdiplus::Ok) - { - delete m_bmp; - m_bmp = NULL; - return; - } - - GUID pageGuid = Gdiplus::FrameDimensionTime; - m_nFrameCount = m_bmp->GetFrameCount(&pageGuid); - - if (IsAnimated()) - { - int nSize = m_bmp->GetPropertyItemSize(PropertyTagFrameDelay); - m_pPropertyItem = (Gdiplus::PropertyItem*) new char[nSize]; - m_bmp->GetPropertyItem(PropertyTagFrameDelay, nSize, m_pPropertyItem); - } -} - -ImageType::ImageType(const unsigned id, const bkstring& file, const int index, const IcoTypeEnum type) - : ImageBase(id) -{ - m_bmp = NULL; - m_pPropertyItem = NULL; - m_nCurrentFrame = 0; - m_nFrameCount = 0; - - if (!InitGdiPlus()) return; - - switch (type) - { - case icoDll: - { - const HMODULE hModule = LoadDll(file); - if (hModule != NULL) - { - HICON hIcon = (HICON) LoadImage(hModule, MAKEINTRESOURCE(-index), IMAGE_ICON, 0, 0, 0); - m_bmp = new Gdiplus::Bitmap(hIcon); - DestroyIcon(hIcon); - } - } - break; - - case icoFile: - m_bmp = new Gdiplus::Bitmap(T2W_SM(file.c_str())); - break; - - default: - HICON hIcon = NULL; - ExtractIconEx(file.c_str(), index, NULL, &hIcon, 1); - m_bmp = new Gdiplus::Bitmap(hIcon); - DestroyIcon(hIcon); - break; - } - - if (m_bmp->GetLastStatus() != Gdiplus::Ok) - { - delete m_bmp; - m_bmp = NULL; - return; - } -} - - -ImageType::~ImageType(void) -{ - if (m_pPropertyItem) delete[] m_pPropertyItem; - if (m_bmp) delete m_bmp; -} - -void ImageType::SelectFrame(int frame) -{ - if ((unsigned)frame >= (unsigned)m_nFrameCount) frame = 0; - if (IsAnimated() && frame != m_nCurrentFrame) - { - m_nCurrentFrame = frame; - GUID pageGuid = Gdiplus::FrameDimensionTime; - m_bmp->SelectActiveFrame(&pageGuid, frame); - } -} - - -void ImageType::DrawInternal(HDC hdc, int x, int y, int sizeX, int sizeY) -{ - if (m_bmp == NULL) return; - - WaitForSingleObject(g_hMutexIm, 3000); - { - Gdiplus::Graphics grp(hdc); -// if (opt.HQScaling) grp.SetInterpolationMode(Gdiplus::InterpolationModeBicubic); - grp.DrawImage(m_bmp, x, y, sizeX, sizeY); - } - ReleaseMutex(g_hMutexIm); -} - -int ImageType::GetFrameDelay(void) const -{ - return ((long*) m_pPropertyItem->value)[m_nCurrentFrame]; -} - -HICON ImageType::GetIcon(void) -{ - if (m_bmp == NULL) return NULL; - - HICON hIcon = NULL; - WaitForSingleObject(g_hMutexIm, 3000); - - m_bmp->GetHICON(&hIcon); - - ReleaseMutex(g_hMutexIm); - return hIcon; -} - - -void ImageType::GetSize(SIZE& size) -{ - if (m_bmp) - { - size.cx = m_bmp->GetWidth(); - size.cy = m_bmp->GetHeight(); - } - else - { - size.cx = 0; - size.cy = 0; - } -} - - -ImageFType::ImageFType(const unsigned id) - : ImageBase(id) -{ - m_bmp = NULL; -} - -ImageFType::ImageFType(const unsigned id, const bkstring& file) - : ImageBase(id) -{ - m_bmp = NULL; - - FREE_IMAGE_FORMAT fif = fei->FI_GetFileTypeT(file.c_str(), 0); - if (fif == FIF_UNKNOWN) - fif = fei->FI_GetFIFFromFilenameT(file.c_str()); - if (fif == FIF_UNKNOWN) return; - - FIBITMAP *dib = fei->FI_LoadT(fif, file.c_str(), 0); - if (dib == NULL) return; - - bool transp = fei->FI_IsTransparent(dib) != 0; - FREE_IMAGE_TYPE imt = fei->FI_GetImageType(dib); - unsigned bpp = fei->FI_GetBPP(dib); - - if (transp && bpp != 32 || imt == FIT_RGBA16) - { - FIBITMAP *tdib = fei->FI_ConvertTo32Bits(dib); - fei->FI_Unload(dib); - dib = tdib; - } - else if (!transp && bpp > 24) - { - FIBITMAP *tdib = fei->FI_ConvertTo24Bits(dib); - fei->FI_Unload(dib); - dib = tdib; - } - - m_bmp = fei->FI_CreateHBITMAPFromDIB(dib); - fei->FI_Unload(dib); - - if (transp) - fei->FI_Premultiply(m_bmp); -} - -ImageFType::~ImageFType() -{ - DeleteObject(m_bmp); -} - -void ImageFType::DrawInternal(HDC hdc, int x, int y, int sizeX, int sizeY) -{ - if (m_bmp == NULL) return; - - HDC hdcImg = CreateCompatibleDC(hdc); - HBITMAP oldBmp = (HBITMAP) SelectObject(hdcImg, m_bmp); - - BITMAP bm; - GetObject(m_bmp, sizeof(bm), &bm); - - if (bm.bmBitsPixel == 32 && pAlphaBlend) - { - BLENDFUNCTION bf = {0}; - bf.SourceConstantAlpha = 255; - bf.AlphaFormat = AC_SRC_ALPHA; - pAlphaBlend(hdc, x, y, sizeX, sizeY, hdcImg, 0, 0, bm.bmWidth, bm.bmHeight, bf); - } - else - { - BitBlt(hdc, x, y, sizeX, sizeY, hdcImg, 0, 0, SRCCOPY); - } - - SelectObject(hdcImg, oldBmp); - DeleteDC(hdcImg); -} - -HICON ImageFType::GetIcon(void) -{ - if (m_bmp == NULL) return NULL; - - HICON hIcon; - - BITMAP bm; - GetObject(m_bmp, sizeof(bm), &bm); - - ICONINFO ii; - ii.fIcon = TRUE; - ii.xHotspot = 0; - ii.yHotspot = 0; - - if (bm.bmBitsPixel == 32 && GetWinVer() < 0x0501) - { - int slen = bm.bmWidth * 4; - int len = bm.bmHeight * slen; - - BYTE* p = (BYTE*)mir_alloc(len); - BYTE* maskBits = (BYTE*)mir_calloc(len); - BYTE* colorBits = (BYTE*)mir_calloc(len); - - GetBitmapBits(m_bmp, len, p); - - for (int y = 0; y < bm.bmHeight; ++y) - { - int shift = y * slen; - BYTE *px = p + shift; - BYTE *color = colorBits + shift; - BYTE *mask = maskBits + shift; - - for (int x = 0; x < bm.bmWidth; ++x) - { - for(int i = 0; i < 4; i++) - { - mask[i] = px[3]; - color[i] = px[i]; - } - - px += 4; - mask += 4; - color += 4; - } - } - - ii.hbmMask = CreateBitmap(bm.bmWidth, bm.bmHeight, 1, 32, maskBits); - ii.hbmColor = CreateBitmap(bm.bmWidth, bm.bmHeight, 1, 32, colorBits); - - hIcon = CreateIconIndirect(&ii); - - DeleteObject(ii.hbmMask); - DeleteObject(ii.hbmColor); - - mir_free(p); - mir_free(maskBits); - mir_free(colorBits); - } - else - { - ii.hbmMask = CreateBitmap(bm.bmWidth, bm.bmHeight, 1, 1, NULL); - ii.hbmColor = m_bmp; - hIcon = CreateIconIndirect(&ii); - DeleteObject(ii.hbmMask); - } - return hIcon; -} - -void ImageFType::GetSize(SIZE& size) -{ - if (m_bmp) - { - BITMAP bm; - GetObject(m_bmp, sizeof(bm), &bm); - size.cx = bm.bmWidth; - size.cy = bm.bmHeight; - } - else - { - size.cx = 0; - size.cy = 0; - } -} -/* -ImageFAniType::ImageFAniType(const unsigned id, const bkstring& file) -: ImageFType(id) -{ - m_fmbmp = NULL; - m_nCurrentFrame = -1; - m_FrameDelay = NULL; - - FREE_IMAGE_FORMAT fif = fei->FI_GetFileTypeT(file.c_str(), 0); - if (fif == FIF_UNKNOWN) - fif = fei->FI_GetFIFFromFilenameT(file.c_str()); - - m_fmbmp = fei->FI_OpenMultiBitmap(fif, T2A_SM(file.c_str()), FALSE, TRUE, TRUE, GIF_PLAYBACK); - if (m_fmbmp == NULL) return; - - m_nFrameCount = fei->FI_GetPageCount(m_fmbmp); - m_bmpl = (HBITMAP*)mir_calloc(m_nFrameCount*sizeof(HBITMAP)); - m_FrameDelay = (int*)mir_calloc(m_nFrameCount*sizeof(int)); - SelectFrame(0); -} - -ImageFAniType::~ImageFAniType() -{ - if (m_fmbmp) fei->FI_CloseMultiBitmap(m_fmbmp, 0); - for (int i=0; i= (unsigned)m_nFrameCount) frame = 0; - if (frame == m_nCurrentFrame) return; - m_nCurrentFrame = frame; - - if (m_bmpl[frame]) - { - m_bmp = m_bmpl[frame]; - return; - } - - FITAG *tag = NULL; - - FIBITMAP *dib = fei->FI_LockPage(m_fmbmp, frame); - if (dib == NULL) - return; - - if (fei->FI_GetMetadata(FIMD_ANIMATION, dib, "FrameTime", &tag)) - m_FrameDelay[frame] = *(LONG *)fei->FI_GetTagValue(tag) / 10; - - m_bmpl[frame] = m_bmp = fei->FI_CreateHBITMAPFromDIB(dib); - - if (fei->FI_IsTransparent(dib)) - fei->FI_Premultiply(m_bmp); - - fei->FI_UnlockPage(m_fmbmp, dib, FALSE); -} -*/ - -#pragma optimize("gt", on) - -// MurmurHash2, by Austin Appleby -unsigned int __fastcall hash( const void * key, unsigned int len ) -{ - // 'm' and 'r' are mixing constants generated offline. - // They're not really 'magic', they just happen to work well. - const unsigned int m = 0x5bd1e995; - const int r = 24; - - // Initialize the hash to a 'random' value - unsigned int h = len; - - // Mix 4 bytes at a time into the hash - const unsigned char * data = (const unsigned char *)key; - - while(len >= 4) - { - unsigned int k = *(unsigned int *)data; - - k *= m; - k ^= k >> r; - k *= m; - - h *= m; - h ^= k; - - data += 4; - len -= 4; - } - - // Handle the last few bytes of the input array - switch(len) - { - case 3: h ^= data[2] << 16; - case 2: h ^= data[1] << 8; - case 1: h ^= data[0]; - h *= m; - }; - - // Do a few final mixes of the hash to ensure the last few - // bytes are well-incorporated. - h ^= h >> 13; - h *= m; - h ^= h >> 15; - - return h; -} -#pragma optimize("", on) - - -void InitImageCache(void) -{ - g_hMutexIm = CreateMutex(NULL, FALSE, NULL); - CallService(MS_IMG_GETINTERFACE, FI_IF_VERSION, (LPARAM) &fei); - - pAlphaBlend = (tAlphaBlend) GetProcAddress(GetModuleHandleA("gdi32"), "GdiAlphaBlend"); - if (pAlphaBlend == NULL) - pAlphaBlend = (tAlphaBlend) GetProcAddress(LoadLibraryA("msimg32"), "AlphaBlend"); -} - -void DestroyImageCache(void) -{ - WaitForSingleObject(g_hMutexIm, 3000); - - if (timerId) KillTimer(NULL, timerId); - if (lastmodule) FreeLibrary(lastmodule); - - g_imagecache.destroy(); - - ReleaseMutex(g_hMutexIm); - CloseHandle(g_hMutexIm); -} - - -ImageBase* AddCacheImage(const bkstring& file, int index) -{ - bkstring tmpfile(file); tmpfile.appendfmt(_T("#%d"), index); - unsigned id = hash(tmpfile.c_str(), (unsigned int)tmpfile.size() * sizeof(TCHAR)); - - WaitForSingleObject(g_hMutexIm, 3000); - - ImageBase srch(id); - ImageBase *img = g_imagecache.find(&srch); - if (img == NULL) - { - bkstring::size_type ind = file.find_last_of('.'); - if (ind == file.npos) return NULL; - bkstring ext = file.substr(ind+1); - - if (ext.comparei(_T("dll")) == 0 || ext.comparei(_T("exe")) == 0) - img = opt.HQScaling ? (ImageBase*)new ImageType(id, file, index, icoDll) : (ImageBase*)new IconType(id, file, index, icoDll); - else if (ext.comparei(_T("ico")) == 0) - img = opt.HQScaling ? (ImageBase*)new ImageType(id, file, 0, icoFile) : (ImageBase*)new IconType(id, file, 0, icoFile); - else if (ext.comparei(_T("icl")) == 0) - img = opt.HQScaling ? (ImageBase*)new ImageType(id, file, index, icoIcl) : (ImageBase*)new IconType(id, file, index, icoIcl); - else if (ext.comparei(_T("gif")) == 0) - img = new ImageType(id, file, NULL); - else if (fei == NULL || ext.comparei(_T("tif")) == 0 || ext.comparei(_T("tiff")) == 0) - img = new ImageType(id, file, NULL); - else - img = opt.HQScaling ? (ImageBase*)new ImageType(id, file, NULL) : (ImageBase*)new ImageFType(id, file); - - g_imagecache.insert(img); - - if (timerId == 0) - { - timerId = 0xffffffff; - CallFunctionAsync(sttMainThreadCallback, NULL); - } - } - else - img->AddRef(); - - ReleaseMutex(g_hMutexIm); - - return img; -} diff --git a/plugins/SmileyAdd/imagecache.h b/plugins/SmileyAdd/imagecache.h deleted file mode 100644 index aa13e4981c..0000000000 --- a/plugins/SmileyAdd/imagecache.h +++ /dev/null @@ -1,166 +0,0 @@ -/* -Miranda SmileyAdd Plugin -Copyright (C) 2008 - 2011 Boris Krasnovskiy - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation version 2 -of the License. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ -#ifndef SMILEYADD_IMAGECACHE_H_ -#define SMILEYADD_IMAGECACHE_H_ - -#include "general.h" - - -class ImageBase -{ -protected: - unsigned m_id; - long m_lRefCount; - time_t m_timestamp; - -public: - - ImageBase(unsigned id); - virtual ~ImageBase() {} - - long AddRef(void); - long Release(void); - - void ProcessTimerTick(time_t ts); - - virtual void GetSize(SIZE& /* size */) {}; - virtual int GetFrameCount(void) const { return 0; } - virtual int GetFrameDelay(void) const { return 0; } - virtual HICON GetIcon(void) { return NULL; }; - virtual void DrawInternal(HDC /* dc */, int /* x */, int /* y */, int /* sizeX */, int /* sizeY */) {}; - virtual void SelectFrame(int /* frame */) {} - - bool IsAnimated(void) const { return GetFrameCount() > 1; } - HBITMAP GetBitmap(COLORREF bkgClr, int sizeX, int sizeY); - void Draw(HDC dc, RECT &rc, bool clip); - int SelectNextFrame(const int frame); - - static int CompareImg(const ImageBase* p1, const ImageBase* p2); -}; - - -typedef enum -{ - icoDll, - icoFile, - icoIcl -} -IcoTypeEnum; - - -class IconType : public ImageBase -{ -private: - HICON m_SmileyIcon; - -public: - IconType(const unsigned id, const bkstring& file, const int index, const IcoTypeEnum type); - ~IconType(); - - void DrawInternal(HDC dc, int x, int y, int sizeX, int sizeY); - HICON GetIcon(void); - void GetSize(SIZE& size); -}; - - -class ImageListItemType : public ImageBase -{ -private: - int m_index; - HIMAGELIST m_hImList; - -public: - ImageListItemType(const unsigned id, HIMAGELIST hImList, int index); - - void DrawInternal(HDC dc, int x, int y, int sizeX, int sizeY); - HICON GetIcon(void); - void GetSize(SIZE& size); -}; - - -class ImageType : public ImageBase -{ -private: - int m_nCurrentFrame; - int m_nFrameCount; - - Gdiplus::Bitmap* m_bmp; - Gdiplus::PropertyItem* m_pPropertyItem; - -public: - - ImageType(const unsigned id, const bkstring& file, IStream* pStream); - ImageType(const unsigned id, const bkstring& file, const int index, const IcoTypeEnum type); - ~ImageType(); - - void SelectFrame(int frame); - - void DrawInternal(HDC dc, int x, int y, int sizeX, int sizeY); - HICON GetIcon(void); - void GetSize(SIZE& size); - - int GetFrameDelay(void) const; - int GetFrameCount(void) const { return m_nFrameCount; } -}; - -class ImageFType : public ImageBase -{ -protected: - HBITMAP m_bmp; - -public: - - ImageFType(const unsigned id); - ImageFType(const unsigned id, const bkstring& file); - ~ImageFType(); - - void DrawInternal(HDC dc, int x, int y, int sizeX, int sizeY); - HICON GetIcon(void); - void GetSize(SIZE& size); -}; -/* -class ImageFAniType : public ImageFType -{ -private: - int m_nCurrentFrame; - int m_nFrameCount; - int *m_FrameDelay; - - FIMULTIBITMAP *m_fmbmp; - HBITMAP* m_bmpl; - -public: - - ImageFAniType(const unsigned id, const bkstring& file); - ~ImageFAniType(); - - void SelectFrame(int frame); - - int GetFrameDelay(void) const { return m_FrameDelay[m_nCurrentFrame]; } - int GetFrameCount(void) const { return m_nFrameCount; } -}; -*/ - - -ImageBase* AddCacheImage(const bkstring& file, int index); - -void InitImageCache(void); -void DestroyImageCache(void); - -#endif - diff --git a/plugins/SmileyAdd/main.cpp b/plugins/SmileyAdd/main.cpp deleted file mode 100644 index a2deb4399a..0000000000 --- a/plugins/SmileyAdd/main.cpp +++ /dev/null @@ -1,225 +0,0 @@ -/* -Miranda SmileyAdd Plugin -Copyright (C) 2005 - 2011 Boris Krasnovskiy All Rights Reserved -Copyright (C) 2003 - 2004 Rein-Peter de Boer - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation version 2 -of the License. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#include "smileys.h" -#include "customsmiley.h" -#include "services.h" -#include "options.h" -#include "download.h" -#include "imagecache.h" -#include "version.h" -#include "m_metacontacts.h" - -//globals -HINSTANCE g_hInst; -HANDLE hEvent1, hContactMenuItem; -extern LIST menuHandleArray; - -char* metaProtoName; - - - -//static globals -static HANDLE hHooks[7]; -static HANDLE hService[13]; -int hLangpack; - - -static const PLUGININFOEX pluginInfoEx = -{ - sizeof(PLUGININFOEX), - "SmileyAdd", - __VERSION_DWORD, - "Smiley support for Miranda Instant Messanger", - "Peacow, nightwish, bid, borkra", - "borkra@miranda-im.org", - "Copyright© 2004 - 2012 Boris Krasnovskiy, portions by Rein-Peter de Boer", - "http://nightly.miranda.im/", - // "http://nightly.miranda.im/", - UNICODE_AWARE, - // {BD542BB4-5AE4-4d0e-A435-BA8DBE39607F} - { 0xbd542bb4, 0x5ae4, 0x4d0e, { 0xa4, 0x35, 0xba, 0x8d, 0xbe, 0x39, 0x60, 0x7f } } -}; - -static SKINICONDESC skinDesc = -{ - sizeof(SKINICONDESC), "SmileyAdd", NULL, - "SmileyAdd_ButtonSmiley", NULL, -IDI_SMILINGICON -}; - - -extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD /* mirandaVersion */) -{ - return (PLUGININFOEX*)&pluginInfoEx; -} - -// MirandaInterfaces - returns the protocol interface to the core -extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = {MIID_SMILEY, MIID_LAST}; - -static int ModulesLoaded(WPARAM, LPARAM) -{ - char path[MAX_PATH]; - GetModuleFileNameA(g_hInst, path, MAX_PATH); - - skinDesc.pszDefaultFile = path; - skinDesc.pszDescription = LPGEN("Button Smiley"); - HANDLE hSkinIcon = Skin_AddIcon(&skinDesc); - - INT_PTR temp = CallService(MS_MC_GETPROTOCOLNAME, 0, 0); - metaProtoName = mir_strdup(temp == CALLSERVICE_NOTFOUND ? NULL : (char*)temp); - - CLISTMENUITEM mi = {0}; - mi.cbSize = sizeof(mi); - mi.flags = CMIF_ROOTPOPUP | CMIF_ICONFROMICOLIB; - mi.popupPosition = 2000070050; - mi.position = 2000070050; - mi.icolibItem = hSkinIcon; - mi.pszPopupName = (char*)-1; - mi.pszName = "Assign Smiley Category"; - hContactMenuItem = Menu_AddContactMenuItem(&mi); - - DownloadInit(); - - //install hooks if enabled - InstallDialogBoxHook(); - - g_SmileyCategories.AddAllProtocolsAsCategory(); - g_SmileyCategories.ClearAndLoadAll(); - - return 0; -} - -static int MirandaShutdown(WPARAM, LPARAM) -{ - CloseSmileys(); - return 0; -} - -extern "C" __declspec(dllexport) int Load(void) -{ - - mir_getLP(&pluginInfoEx); - - if (ServiceExists(MS_SMILEYADD_REPLACESMILEYS)) - { - static const TCHAR errmsg[] = _T("Only one instance of SmileyAdd could be executed.\n") - _T("Remove duplicate instances from 'Plugins' directory"); - ReportError(TranslateTS(errmsg)); - - return 1; - } - - char temp[80]; - CallService(MS_SYSTEM_GETVERSIONTEXT, (WPARAM)SIZEOF(temp), (LPARAM)temp); - - - if (strstr(temp, "Unicode") == NULL) - { - ReportError(TranslateT("Please update SmileyAdd to ANSI Version")); - return 1; - } - - - InitImageCache(); - - g_SmileyCategories.SetSmileyPackStore(&g_SmileyPacks); - - opt.Load(); - - // create smiley events - hEvent1 = CreateHookableEvent(ME_SMILEYADD_OPTIONSCHANGED); - - hHooks[0] = HookEvent(ME_SYSTEM_MODULESLOADED, ModulesLoaded); - hHooks[1] = HookEvent(ME_SYSTEM_PRESHUTDOWN, MirandaShutdown); - hHooks[2] = HookEvent(ME_OPT_INITIALISE, SmileysOptionsInitialize); - hHooks[3] = HookEvent(ME_CLIST_PREBUILDCONTACTMENU, RebuildContactMenu); - hHooks[4] = HookEvent(ME_SMILEYADD_OPTIONSCHANGED, UpdateSrmmDlg); - hHooks[5] = HookEvent(ME_PROTO_ACCLISTCHANGED, AccountListChanged); - hHooks[6] = HookEvent(ME_DB_CONTACT_SETTINGCHANGED, DbSettingChanged); - - //create the smiley services - hService[0] = CreateServiceFunction(MS_SMILEYADD_REPLACESMILEYS, ReplaceSmileysCommand); - hService[1] = CreateServiceFunction(MS_SMILEYADD_GETSMILEYICON, GetSmileyIconCommand); - hService[2] = CreateServiceFunction(MS_SMILEYADD_SHOWSELECTION, ShowSmileySelectionCommand); - hService[3] = CreateServiceFunction(MS_SMILEYADD_GETINFO, GetInfoCommand); - hService[4] = CreateServiceFunction(MS_SMILEYADD_GETINFO2, GetInfoCommand2); - hService[5] = CreateServiceFunction(MS_SMILEYADD_PARSE, ParseText); - hService[6] = CreateServiceFunction(MS_SMILEYADD_REGISTERCATEGORY, RegisterPack); - hService[7] = CreateServiceFunction(MS_SMILEYADD_BATCHPARSE, ParseTextBatch); - hService[8] = CreateServiceFunction(MS_SMILEYADD_BATCHFREE, FreeTextBatch); - hService[9] = CreateServiceFunction(MS_SMILEYADD_CUSTOMCATMENU, CustomCatMenu); - hService[10] = CreateServiceFunction(MS_SMILEYADD_RELOAD, ReloadPack); - hService[11] = CreateServiceFunction(MS_SMILEYADD_LOADCONTACTSMILEYS, LoadContactSmileys); - - - hService[12] = CreateServiceFunction(MS_SMILEYADD_PARSEW, ParseTextW); - - - return 0; -} - - -extern "C" __declspec(dllexport) int Unload(void) -{ - int i; - - RemoveDialogBoxHook(); - - for (i=0; i. -*/ - -#include "general.h" -#include "options.h" -#include "smileys.h" -#include "customsmiley.h" -#include "services.h" - -//globals, defined int main.cpp -extern HINSTANCE g_hInst; -extern HANDLE hEvent1; -extern SmileyCategoryListType g_SmileyCategories; -extern SmileyPackListType g_SmileyPacks; - -OptionsType opt; - -#define UM_CHECKSTATECHANGE (WM_USER + 100) - -class OptionsDialogType -{ -private: - HWND m_hwndDialog; - SmileyCategoryListType tmpsmcat; - SmileyPackType smPack; - - void InitDialog(void); - void DestroyDialog(void); - void AddCategory(void); - void ApplyChanges(void); - void UpdateControls(bool force = false); - void SetChanged(void); - bool BrowseForSmileyPacks(int item); - void FilenameChanged(void); - void ShowSmileyPreview(void); - void PopulateSmPackList(void); - void UserAction(HTREEITEM hItem); - long GetSelProto(HTREEITEM hItem = NULL); - -public: - OptionsDialogType(HWND hWnd) { m_hwndDialog = hWnd; } - BOOL DialogProcedure(UINT msg, WPARAM wParam, LPARAM lParam); -}; - -static INT_PTR CALLBACK DlgProcSmileysOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam); - -//Init and de-init functions, called from main -int SmileysOptionsInitialize(WPARAM addInfo, LPARAM) -{ - OPTIONSDIALOGPAGE odp = {0}; - odp.cbSize = sizeof(odp); - odp.position = 910000000; - odp.hInstance = g_hInst; - odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_SMILEYS); - odp.pszTitle = LPGEN("Smileys"); - odp.pszGroup = LPGEN("Customize"); - odp.pfnDlgProc = DlgProcSmileysOptions; - odp.flags = ODPF_BOLDGROUPS; - Options_AddPage(addInfo, &odp); - - return 0; -} - - -// -// dialog procedure for the options dialog. creates or -// retrieves the options class and calls it -// -static INT_PTR CALLBACK DlgProcSmileysOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) -{ - OptionsDialogType* pOD; - INT_PTR Result; - - pOD = (OptionsDialogType*) GetWindowLongPtr(hwndDlg, GWLP_USERDATA); - if (pOD == NULL) - { - pOD = new OptionsDialogType(hwndDlg); - SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR) pOD); - } - - Result = pOD->DialogProcedure(msg, wParam, lParam); - SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, Result); - - if (msg == WM_NCDESTROY) - { - delete pOD; - } - - return Result; -} - - -//OptionsDialog class functions -BOOL OptionsDialogType::DialogProcedure(UINT msg, WPARAM wParam, LPARAM lParam) -{ - BOOL Result = FALSE; - - switch(msg) - { - case WM_INITDIALOG: - InitDialog(); - Result = TRUE; - break; - - case WM_DESTROY: - DestroyDialog(); - break; - - case WM_COMMAND: - switch (LOWORD(wParam)) - { - case IDC_FILENAME: - switch(HIWORD(wParam)) - { - case EN_KILLFOCUS: - FilenameChanged(); - break; - - case EN_CHANGE: - if (GetFocus() == (HWND)lParam) SetChanged(); - break; - } - break; - - case IDC_BROWSE: - if (HIWORD(wParam) == BN_CLICKED) - { - if (BrowseForSmileyPacks(GetSelProto())) - { - UpdateControls(true); - SetChanged(); - } - } - break; - - case IDC_SMLOPTBUTTON: - if (HIWORD(wParam) == BN_CLICKED) ShowSmileyPreview(); - break; - - case IDC_USESTDPACK: - if (HIWORD(wParam) == BN_CLICKED) - { - PopulateSmPackList(); - SetChanged(); - } - break; - - case IDC_PLUGENABLED: - if (HIWORD(wParam) == BN_CLICKED) - { - BOOL en = IsDlgButtonChecked(m_hwndDialog, IDC_PLUGENABLED) == BST_UNCHECKED; - EnableWindow(GetDlgItem(m_hwndDialog, IDC_SMLBUT), en); - SetChanged(); - } - break; - - case IDC_ADDCATEGORY: - if (HIWORD(wParam) == BN_CLICKED) - { - AddCategory(); - } - break; - - case IDC_DELETECATEGORY: - if (HIWORD(wParam) == BN_CLICKED) - { - if (tmpsmcat.DeleteCustomCategory(GetSelProto())) - { - PopulateSmPackList(); - SetChanged(); - } - } - break; - - case IDC_SPACES: - case IDC_SCALETOTEXTHEIGHT: - case IDC_APPENDSPACES: - case IDC_SMLBUT: - case IDC_SCALEALLSMILEYS: - case IDC_IEVIEWSTYLE: - case IDC_ANIMATESEL: - case IDC_ANIMATEDLG: - case IDC_INPUTSMILEYS: - case IDC_DCURSORSMILEY: - case IDC_DISABLECUSTOM: - case IDC_HQSCALING: - if (HIWORD(wParam) == BN_CLICKED) SetChanged(); - break; - - case IDC_SELCLR: - if (HIWORD(wParam) == CPN_COLOURCHANGED) SetChanged(); - break; - - case IDC_MAXCUSTSMSZ: - case IDC_MINSMSZ: - if (HIWORD(wParam) == EN_CHANGE && GetFocus() == (HWND)lParam) SetChanged(); - break; - } - break; - - case UM_CHECKSTATECHANGE: - UserAction((HTREEITEM)lParam); - break; - - case WM_NOTIFY: - switch(((LPNMHDR)lParam)->idFrom) - { - case 0: - switch (((LPNMHDR)lParam)->code) - { - case PSN_APPLY: - ApplyChanges(); - break; - } - break; - - case IDC_CATEGORYLIST: - switch (((LPNMHDR)lParam)->code) - { - case NM_CLICK: - { - TVHITTESTINFO ht = {0}; - - DWORD dwpos = GetMessagePos(); - POINTSTOPOINT(ht.pt, MAKEPOINTS(dwpos)); - MapWindowPoints(HWND_DESKTOP, ((LPNMHDR)lParam)->hwndFrom, &ht.pt, 1); - - TreeView_HitTest(((LPNMHDR)lParam)->hwndFrom, &ht); - if (TVHT_ONITEM & ht.flags) - FilenameChanged(); - if (TVHT_ONITEMSTATEICON & ht.flags) - PostMessage(m_hwndDialog, UM_CHECKSTATECHANGE, 0, (LPARAM)ht.hItem); - } - - case TVN_KEYDOWN: - if (((LPNMTVKEYDOWN) lParam)->wVKey == VK_SPACE) - PostMessage(m_hwndDialog, UM_CHECKSTATECHANGE, 0, - (LPARAM)TreeView_GetSelection(((LPNMHDR)lParam)->hwndFrom)); - break; - - case TVN_SELCHANGEDA: - case TVN_SELCHANGEDW: - { - LPNMTREEVIEW pnmtv = (LPNMTREEVIEW) lParam; - if (pnmtv->itemNew.state & TVIS_SELECTED) - UpdateControls(); - } - break; - } - break; - } - break; - } - - return Result; -} - - -void OptionsDialogType::AddCategory(void) -{ - TCHAR cat[30]; - - GetDlgItemText(m_hwndDialog, IDC_NEWCATEGORY, cat, SIZEOF(cat)); - bkstring catd = cat; - - if (!catd.empty()) - { - tmpsmcat.AddCategory(cat, catd, smcCustom); - - PopulateSmPackList(); - SetChanged(); - } -} - - -void OptionsDialogType::UserAction(HTREEITEM hItem) -{ - HWND hLstView = GetDlgItem(m_hwndDialog, IDC_CATEGORYLIST); - - if (TreeView_GetCheckState(hLstView, hItem)) - { - if (!BrowseForSmileyPacks(GetSelProto(hItem))) - { - TreeView_SetCheckState(hLstView, hItem, TRUE) - } - } - else - { - tmpsmcat.GetSmileyCategory(GetSelProto(hItem))->ClearFilename(); - } - - if (hItem == TreeView_GetSelection(hLstView)) - UpdateControls(); - else - TreeView_SelectItem(hLstView, hItem); - - SetChanged(); -} - - -void OptionsDialogType::SetChanged(void) -{ - SendMessage(GetParent(m_hwndDialog), PSM_CHANGED, 0, 0); -} - - -void OptionsDialogType::UpdateControls(bool force) -{ - const SmileyCategoryType* smc = tmpsmcat.GetSmileyCategory(GetSelProto()); - if (smc == NULL) return; - - const bkstring& smf = smc->GetFilename(); - - SetDlgItemText(m_hwndDialog, IDC_FILENAME, smf.c_str()); - - if (smPack.GetFilename() != smf || force) - { - smPack.LoadSmileyFile(smf, false, true); - } - - HWND hLstView = GetDlgItem(m_hwndDialog, IDC_CATEGORYLIST); - TreeView_SetCheckState(hLstView, TreeView_GetSelection(hLstView), smPack.SmileyCount() != 0); - - SetDlgItemText(m_hwndDialog, IDC_LIBAUTHOR, smPack.GetAuthor().c_str()); - SetDlgItemText(m_hwndDialog, IDC_LIBVERSION, smPack.GetVersion().c_str()); - SetDlgItemText(m_hwndDialog, IDC_LIBNAME, TranslateTS(smPack.GetName().c_str())); -} - - -long OptionsDialogType::GetSelProto(HTREEITEM hItem) -{ - HWND hLstView = GetDlgItem(m_hwndDialog, IDC_CATEGORYLIST); - TVITEM tvi = {0}; - - tvi.mask = TVIF_PARAM; - tvi.hItem = hItem == NULL ? TreeView_GetSelection(hLstView) : hItem; - - TreeView_GetItem(hLstView, &tvi); - - return (long)tvi.lParam; -} - - -void OptionsDialogType::PopulateSmPackList(void) -{ - bool useOne = IsDlgButtonChecked(m_hwndDialog, IDC_USESTDPACK) == BST_UNCHECKED; - - HWND hLstView = GetDlgItem(m_hwndDialog, IDC_CATEGORYLIST); - - TreeView_SelectItem(hLstView, NULL); - TreeView_DeleteAllItems(hLstView); - - TVINSERTSTRUCT tvi = {0}; - tvi.hParent = TVI_ROOT; - tvi.hInsertAfter = TVI_LAST; - tvi.item.mask = TVIF_TEXT | TVIF_IMAGE | TVIF_STATE | TVIF_SELECTEDIMAGE | TVIF_PARAM; - tvi.item.stateMask = TVIS_STATEIMAGEMASK | TVIS_SELECTED; - - SmileyCategoryListType::SmileyCategoryVectorType& smc = *tmpsmcat.GetSmileyCategoryList(); - for (int i = 0; i < smc.getCount(); i++) - { - if (!useOne || !smc[i].IsProto()) - { - tvi.item.pszText = (TCHAR*)smc[i].GetDisplayName().c_str(); - if (!smc[i].IsProto()) - { - tvi.item.iImage = 0; - tvi.item.iSelectedImage = 0; - } - else - { - tvi.item.iImage = i; - tvi.item.iSelectedImage = i; - } - tvi.item.lParam = i; - tvi.item.state = - INDEXTOSTATEIMAGEMASK(smPack.LoadSmileyFile(smc[i].GetFilename(), true, true) ? 2 : 1); - - TreeView_InsertItem(hLstView, &tvi); - - smPack.Clear(); - } - } - TreeView_SelectItem(hLstView, TreeView_GetRoot(hLstView)); -} - -void OptionsDialogType::InitDialog(void) -{ - TranslateDialogDefault(m_hwndDialog); - - CheckDlgButton(m_hwndDialog, IDC_PLUGENABLED, opt.PluginSupportEnabled ? BST_UNCHECKED : BST_CHECKED); - CheckDlgButton(m_hwndDialog, IDC_SPACES, opt.EnforceSpaces ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(m_hwndDialog, IDC_SCALETOTEXTHEIGHT, opt.ScaleToTextheight ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(m_hwndDialog, IDC_USESTDPACK, opt.UseOneForAll ? BST_UNCHECKED : BST_CHECKED); - CheckDlgButton(m_hwndDialog, IDC_APPENDSPACES, opt.SurroundSmileyWithSpaces ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(m_hwndDialog, IDC_SCALEALLSMILEYS, opt.ScaleAllSmileys ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(m_hwndDialog, IDC_IEVIEWSTYLE, opt.IEViewStyle ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(m_hwndDialog, IDC_ANIMATESEL, opt.AnimateSel ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(m_hwndDialog, IDC_ANIMATEDLG, opt.AnimateDlg ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(m_hwndDialog, IDC_INPUTSMILEYS, opt.InputSmileys ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(m_hwndDialog, IDC_DCURSORSMILEY, opt.DCursorSmiley ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(m_hwndDialog, IDC_DISABLECUSTOM, opt.DisableCustom ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(m_hwndDialog, IDC_HQSCALING, opt.HQScaling ? BST_CHECKED : BST_UNCHECKED); - - SendDlgItemMessage(m_hwndDialog, IDC_SMLBUT, CB_ADDSTRING, 0, (LPARAM) TranslateT("Off")); - SendDlgItemMessage(m_hwndDialog, IDC_SMLBUT, CB_ADDSTRING, 0, (LPARAM) TranslateT("Top")); - - if (IsOldSrmm()) - SendDlgItemMessage(m_hwndDialog, IDC_SMLBUT, CB_ADDSTRING, 0, (LPARAM) TranslateT("Bottom")); - - SendDlgItemMessage(m_hwndDialog, IDC_SMLBUT, CB_SETCURSEL, opt.ButtonStatus, 0); - EnableWindow(GetDlgItem(m_hwndDialog, IDC_SMLBUT), opt.PluginSupportEnabled); - - SendDlgItemMessage(m_hwndDialog, IDC_MAXCUSTSPIN, UDM_SETRANGE32, 0, 99); - SendDlgItemMessage(m_hwndDialog, IDC_MAXCUSTSPIN, UDM_SETPOS, 0, opt.MaxCustomSmileySize); - SendDlgItemMessage(m_hwndDialog, IDC_MAXCUSTSMSZ, EM_LIMITTEXT, 2, 0); - - SendDlgItemMessage(m_hwndDialog, IDC_MINSPIN, UDM_SETRANGE32, 0, 99); - SendDlgItemMessage(m_hwndDialog, IDC_MINSPIN, UDM_SETPOS, 0, opt.MinSmileySize); - SendDlgItemMessage(m_hwndDialog, IDC_MINSMSZ, EM_LIMITTEXT, 2, 0); - - SendDlgItemMessage(m_hwndDialog, IDC_SELCLR, CPM_SETCOLOUR, 0, opt.SelWndBkgClr); - SendDlgItemMessage(m_hwndDialog, IDC_SELCLR, CPM_SETDEFAULTCOLOUR, 0, GetSysColor(COLOR_WINDOW)); - - // Create and populate image list - HIMAGELIST hImList = ImageList_Create(GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), - ILC_MASK | ILC_COLOR32, g_SmileyCategories.NumberOfSmileyCategories(), 0); - - tmpsmcat = g_SmileyCategories; - - SmileyCategoryListType::SmileyCategoryVectorType& smc = *g_SmileyCategories.GetSmileyCategoryList(); - for (int i = 0; i < smc.getCount(); i++) - { - HICON hIcon = NULL; - if (smc[i].IsProto()) - { - hIcon=(HICON)CallProtoService(T2A_SM(smc[i].GetName().c_str()), PS_LOADICON, - PLI_PROTOCOL | PLIF_SMALL, 0); - if (hIcon == NULL || (INT_PTR)hIcon == CALLSERVICE_NOTFOUND) - { - hIcon=(HICON)CallProtoService(T2A_SM(smc[i].GetName().c_str()), PS_LOADICON, PLI_PROTOCOL, 0); - } - } - if (hIcon == NULL || hIcon == (HICON)CALLSERVICE_NOTFOUND) - hIcon = GetDefaultIcon(); - - ImageList_AddIcon(hImList, hIcon); - DestroyIcon(hIcon); - } - - HWND hLstView = GetDlgItem(m_hwndDialog, IDC_CATEGORYLIST); - TreeView_SetImageList(hLstView, hImList, TVSIL_NORMAL); - - PopulateSmPackList(); -} - -void OptionsDialogType::DestroyDialog(void) -{ - HWND hLstView = GetDlgItem(m_hwndDialog, IDC_CATEGORYLIST); - HIMAGELIST hImList = TreeView_SetImageList(hLstView, NULL, TVSIL_NORMAL); - ImageList_Destroy(hImList); -} - - -void OptionsDialogType::ApplyChanges(void) -{ - ProcessAllInputAreas(true); - CloseSmileys(); - - opt.PluginSupportEnabled = IsDlgButtonChecked(m_hwndDialog, IDC_PLUGENABLED) == BST_UNCHECKED; - opt.EnforceSpaces = IsDlgButtonChecked(m_hwndDialog, IDC_SPACES) == BST_CHECKED; - opt.ScaleToTextheight = IsDlgButtonChecked(m_hwndDialog, IDC_SCALETOTEXTHEIGHT) == BST_CHECKED; - opt.UseOneForAll = IsDlgButtonChecked(m_hwndDialog, IDC_USESTDPACK) == BST_UNCHECKED; - opt.SurroundSmileyWithSpaces = IsDlgButtonChecked(m_hwndDialog, IDC_APPENDSPACES) == BST_CHECKED; - opt.ScaleAllSmileys = IsDlgButtonChecked(m_hwndDialog, IDC_SCALEALLSMILEYS) == BST_CHECKED; - opt.IEViewStyle = IsDlgButtonChecked(m_hwndDialog, IDC_IEVIEWSTYLE) == BST_CHECKED; - opt.AnimateSel = IsDlgButtonChecked(m_hwndDialog, IDC_ANIMATESEL) == BST_CHECKED; - opt.AnimateDlg = IsDlgButtonChecked(m_hwndDialog, IDC_ANIMATEDLG) == BST_CHECKED; - opt.InputSmileys = IsDlgButtonChecked(m_hwndDialog, IDC_INPUTSMILEYS) == BST_CHECKED; - opt.DCursorSmiley = IsDlgButtonChecked(m_hwndDialog, IDC_DCURSORSMILEY) == BST_CHECKED; - opt.DisableCustom = IsDlgButtonChecked(m_hwndDialog, IDC_DISABLECUSTOM) == BST_CHECKED; - opt.HQScaling = IsDlgButtonChecked(m_hwndDialog, IDC_HQSCALING) == BST_CHECKED; - - opt.ButtonStatus = (unsigned)SendDlgItemMessage(m_hwndDialog, IDC_SMLBUT, CB_GETCURSEL, 0, 0); - opt.SelWndBkgClr = (unsigned)SendDlgItemMessage(m_hwndDialog, IDC_SELCLR, CPM_GETCOLOUR, 0, 0); - opt.MaxCustomSmileySize = GetDlgItemInt(m_hwndDialog, IDC_MAXCUSTSMSZ, NULL, FALSE); - opt.MinSmileySize = GetDlgItemInt(m_hwndDialog, IDC_MINSMSZ, NULL, FALSE); - - opt.Save(); - - // Cleanup database - SmileyCategoryListType::SmileyCategoryVectorType& smc = *g_SmileyCategories.GetSmileyCategoryList(); - for (int i = 0; i < smc.getCount(); i++) - { - if (tmpsmcat.GetSmileyCategory(smc[i].GetName()) == NULL) - { - bkstring empty; - opt.WritePackFileName(empty, smc[i].GetName()); - } - } - - g_SmileyCategories = tmpsmcat; - g_SmileyCategories.SaveSettings(); - g_SmileyCategories.ClearAndLoadAll(); - - smPack.LoadSmileyFile(tmpsmcat.GetSmileyCategory(GetSelProto())->GetFilename(), false); - - NotifyEventHooks(hEvent1, 0, 0); - ProcessAllInputAreas(false); -} - -bool OptionsDialogType::BrowseForSmileyPacks(int item) -{ - OPENFILENAME ofn = {0}; - - TCHAR filename[MAX_PATH] = _T(""); - ofn.lpstrFile = filename; - ofn.nMaxFile = SIZEOF(filename); - - bkstring inidir; - SmileyCategoryType* smc = tmpsmcat.GetSmileyCategory(item); - if (smc->GetFilename().empty()) - { - pathToAbsolute(_T("Smileys"), inidir); - } - else - { - pathToAbsolute(smc->GetFilename(), inidir); - inidir.erase(inidir.find_last_of('\\')); - } - - ofn.lpstrInitialDir = inidir.c_str(); - ofn.lStructSize = OPENFILENAME_SIZE_VERSION_400; - ofn.hwndOwner = m_hwndDialog; - - TCHAR filter[512], *pfilter; - _tcscpy(filter, TranslateT("Smiley Packs")); - lstrcat(filter, _T(" (*.msl;*.asl;*.xep)")); - pfilter = filter + _tcslen(filter) + 1; - _tcscpy(pfilter, _T("*.msl;*.asl;*.xep")); - pfilter = pfilter + _tcslen(pfilter) + 1; - _tcscpy(pfilter, TranslateT("All Files")); - lstrcat(pfilter, _T(" (*.*)")); - pfilter = pfilter + _tcslen(pfilter) + 1; - _tcscpy(pfilter, _T("*.*")); - pfilter = pfilter + _tcslen(pfilter) + 1; - *pfilter = '\0'; - ofn.lpstrFilter = filter; - - ofn.Flags = OFN_PATHMUSTEXIST | OFN_FILEMUSTEXIST | OFN_HIDEREADONLY | OFN_READONLY | - OFN_EXPLORER | OFN_LONGNAMES | OFN_NOCHANGEDIR; - ofn.lpstrDefExt = _T("msl"); - - if (GetOpenFileName(&ofn)) - { - bkstring relpath; - pathToRelative(filename, relpath); - smc->SetFilename(relpath); - - return true; - } - - return false; -} - -void OptionsDialogType::FilenameChanged(void) -{ - TCHAR str[MAX_PATH]; - GetDlgItemText(m_hwndDialog, IDC_FILENAME, str, SIZEOF(str)); - - SmileyCategoryType* smc = tmpsmcat.GetSmileyCategory(GetSelProto()); - if (smc->GetFilename() != str) - { - bkstring temp(str); - smc->SetFilename(temp); - UpdateControls(); - } -} - -void OptionsDialogType::ShowSmileyPreview(void) -{ - RECT rect; - GetWindowRect(GetDlgItem(m_hwndDialog, IDC_SMLOPTBUTTON), &rect); - - SmileyToolWindowParam *stwp = new SmileyToolWindowParam; - stwp->pSmileyPack = &smPack; - stwp->hWndParent = m_hwndDialog; - stwp->hWndTarget = NULL; - stwp->targetMessage = 0; - stwp->targetWParam = 0; - stwp->xPosition = rect.left; - stwp->yPosition = rect.bottom + 4; - stwp->direction = 1; - stwp->hContact = NULL; - - mir_forkthread(SmileyToolThread, stwp); -} - - -void OptionsType::Save(void) -{ - DBWriteContactSettingByte(NULL, "SmileyAdd", "PluginSupportEnabled", PluginSupportEnabled); - DBWriteContactSettingByte(NULL, "SmileyAdd", "EnforceSpaces", EnforceSpaces); - DBWriteContactSettingByte(NULL, "SmileyAdd", "ScaleToTextheight", ScaleToTextheight); - DBWriteContactSettingByte(NULL, "SmileyAdd", "UseOneForAll", UseOneForAll); - DBWriteContactSettingByte(NULL, "SmileyAdd", "SurroundSmileyWithSpaces", SurroundSmileyWithSpaces); - DBWriteContactSettingByte(NULL, "SmileyAdd", "ScaleAllSmileys", ScaleAllSmileys); - DBWriteContactSettingByte(NULL, "SmileyAdd", "IEViewStyle", IEViewStyle); - DBWriteContactSettingByte(NULL, "SmileyAdd", "AnimateSel", AnimateSel); - DBWriteContactSettingByte(NULL, "SmileyAdd", "AnimateDlg", AnimateDlg); - DBWriteContactSettingByte(NULL, "SmileyAdd", "InputSmileys", InputSmileys); - DBWriteContactSettingByte(NULL, "SmileyAdd", "DCursorSmiley", DCursorSmiley); - DBWriteContactSettingByte(NULL, "SmileyAdd", "DisableCustom", DisableCustom); - DBWriteContactSettingByte(NULL, "SmileyAdd", "HQScaling", HQScaling); - DBWriteContactSettingByte(NULL, "SmileyAdd", "ButtonStatus", (BYTE)ButtonStatus); - DBWriteContactSettingDword(NULL, "SmileyAdd", "SelWndBkgClr", SelWndBkgClr); - DBWriteContactSettingDword(NULL, "SmileyAdd", "MaxCustomSmileySize", MaxCustomSmileySize); - DBWriteContactSettingDword(NULL, "SmileyAdd", "MinSmileySize", MinSmileySize); -} - - -void OptionsType::Load(void) -{ - PluginSupportEnabled = DBGetContactSettingByte(NULL, "SmileyAdd", "PluginSupportEnabled", TRUE) != 0; - EnforceSpaces = DBGetContactSettingByte(NULL, "SmileyAdd", "EnforceSpaces", FALSE) != 0; - ScaleToTextheight = DBGetContactSettingByte(NULL, "SmileyAdd", "ScaleToTextheight", FALSE) != 0; - UseOneForAll = DBGetContactSettingByte(NULL, "SmileyAdd", "UseOneForAll", TRUE) != 0; - SurroundSmileyWithSpaces = - DBGetContactSettingByte(NULL, "SmileyAdd", "SurroundSmileyWithSpaces", FALSE) != 0; - ScaleAllSmileys = DBGetContactSettingByte(NULL, "SmileyAdd", "ScaleAllSmileys", FALSE) != 0; - IEViewStyle = DBGetContactSettingByte(NULL, "SmileyAdd", "IEViewStyle", FALSE) != 0; - AnimateSel = DBGetContactSettingByte(NULL, "SmileyAdd", "AnimateSel", TRUE) != 0; - AnimateDlg = DBGetContactSettingByte(NULL, "SmileyAdd", "AnimateDlg", TRUE) != 0; - InputSmileys = DBGetContactSettingByte(NULL, "SmileyAdd", "InputSmileys", TRUE) != 0; - DCursorSmiley = DBGetContactSettingByte(NULL, "SmileyAdd", "DCursorSmiley", FALSE) != 0; - DisableCustom = DBGetContactSettingByte(NULL, "SmileyAdd", "DisableCustom", FALSE) != 0; - HQScaling = DBGetContactSettingByte(NULL, "SmileyAdd", "HQScaling", FALSE) != 0; - - ButtonStatus = DBGetContactSettingByte(NULL, "SmileyAdd", "ButtonStatus", 1); - SelWndBkgClr = DBGetContactSettingDword(NULL, "SmileyAdd", "SelWndBkgClr", GetSysColor(COLOR_WINDOW)); - MaxCustomSmileySize = DBGetContactSettingDword(NULL, "SmileyAdd", "MaxCustomSmileySize", 0); - MinSmileySize = DBGetContactSettingDword(NULL, "SmileyAdd", "MinSmileySize", 0); -} - - -void OptionsType::ReadPackFileName(bkstring& filename, const bkstring& name, - const bkstring& defaultFilename) -{ - DBVARIANT dbv; - bkstring settingKey = name + _T("-filename"); - - INT_PTR res = DBGetContactSettingTString(NULL, "SmileyAdd", T2A_SM(settingKey.c_str()), &dbv); - if (res == 0) - { - filename = dbv.ptszVal; - DBFreeVariant(&dbv); - } - else - filename = defaultFilename; -} - - -void OptionsType::WritePackFileName(const bkstring& filename, const bkstring& name) -{ - bkstring settingKey = name + _T("-filename"); - DBWriteContactSettingTString(NULL, "SmileyAdd", T2A_SM(settingKey.c_str()), - filename.c_str()); -} - - -void OptionsType::ReadCustomCategories(bkstring& cats) -{ - DBVARIANT dbv; - - INT_PTR res = DBGetContactSettingTString(NULL, "SmileyAdd", "CustomCategories", &dbv); - if (res == 0) - { - cats = dbv.ptszVal; - DBFreeVariant(&dbv); - } -} - - -void OptionsType::WriteCustomCategories(const bkstring& cats) -{ - if (cats.empty()) - DBDeleteContactSetting(NULL, "SmileyAdd", "CustomCategories"); - else - DBWriteContactSettingTString(NULL, "SmileyAdd", "CustomCategories", cats.c_str()); -} - - -void OptionsType::ReadContactCategory(HANDLE hContact, bkstring& cats) -{ - DBVARIANT dbv; - - INT_PTR res = DBGetContactSettingTString(hContact, "SmileyAdd", "CustomCategory", &dbv); - if (res == 0) - { - cats = dbv.ptszVal; - DBFreeVariant(&dbv); - } -} - - -void OptionsType::WriteContactCategory(HANDLE hContact, const bkstring& cats) -{ - if (cats.empty()) - DBDeleteContactSetting(hContact, "SmileyAdd", "CustomCategory"); - else - DBWriteContactSettingTString(hContact, "SmileyAdd", "CustomCategory", cats.c_str()); -} diff --git a/plugins/SmileyAdd/options.h b/plugins/SmileyAdd/options.h deleted file mode 100644 index 3b83b0dc8f..0000000000 --- a/plugins/SmileyAdd/options.h +++ /dev/null @@ -1,60 +0,0 @@ -/* -Miranda SmileyAdd Plugin -Copyright (C) 2005 - 2011 Boris Krasnovskiy -Copyright (C) 2003 - 2004 Rein-Peter de Boer - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation version 2 -of the License. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#ifndef SMILEYADD_OPTIONS_H_ -#define SMILEYADD_OPTIONS_H_ - -int SmileysOptionsInitialize(WPARAM wParam, LPARAM lParam); - -class OptionsType -{ -public: - bool PluginSupportEnabled; - bool EnforceSpaces; - bool ScaleToTextheight; - bool UseOneForAll; - bool SurroundSmileyWithSpaces; - bool ScaleAllSmileys; - bool IEViewStyle; - bool AnimateSel; - bool AnimateDlg; - bool InputSmileys; - bool DCursorSmiley; - bool DisableCustom; - bool HQScaling; - unsigned ButtonStatus; - unsigned SelWndBkgClr; - unsigned MaxCustomSmileySize; - unsigned MinSmileySize; - - void Load(void); - void Save(void); - static void ReadPackFileName(bkstring& filename, const bkstring& name, - const bkstring& defaultFilename); - static void ReadCustomCategories(bkstring& cats); - static void ReadContactCategory(HANDLE hContact, bkstring& cats); - static void WritePackFileName(const bkstring& filename, const bkstring& name); - static void WriteCustomCategories(const bkstring& cats); - static void WriteContactCategory(HANDLE hContact, const bkstring& cats); -}; - -extern OptionsType opt; - -#endif // SMILEYADD_OPTIONS_H_ - diff --git a/plugins/SmileyAdd/regexp/Matcher.cpp b/plugins/SmileyAdd/regexp/Matcher.cpp deleted file mode 100644 index ebd1f57850..0000000000 --- a/plugins/SmileyAdd/regexp/Matcher.cpp +++ /dev/null @@ -1,178 +0,0 @@ -#include -#include - -const int Matcher::MATCH_ENTIRE_STRING = 0x01; - -/* - Detailed documentation is provided in this class' header file - - @author Jeffery Stuart - @since November 2004 - @version 1.07.00 -*/ - -Matcher::Matcher(Pattern * pattern, const bkstring & text) -{ - pat = pattern; - str = &text; - gc = pattern->groupCount; - ncgc = -pattern->nonCapGroupCount; - flags = 0; - matchedSomething = false; - starts = new int[gc + ncgc]; - ends = new int[gc + ncgc]; - groups = new int[gc + ncgc]; - groupPos = new int[gc + ncgc]; - groupIndeces = new int[gc + ncgc]; - starts = starts + ncgc; - ends = ends + ncgc; - groups = groups + ncgc; - groupPos = groupPos + ncgc; - groupIndeces = groupIndeces + ncgc; - for (int i = 0; i < gc; ++i) starts[i] = ends[i] = 0; -} -Matcher::~Matcher() -{ - delete [] (starts - ncgc); - delete [] (ends - ncgc); - delete [] (groups - ncgc); - delete [] (groupIndeces - ncgc); - delete [] (groupPos - ncgc); -} -void Matcher::clearGroups() -{ - int i; - lm = 0; - for (i = 0; i < gc; ++i) groups[i] = starts[i] = ends[i] = -1; - for (i = 1; i <= ncgc; ++i) groups[0 - i] = -1; -} -bkstring Matcher::replaceWithGroups(const bkstring & str) -{ - bkstring ret = ""; - - bkstring t = str; - while (t.size() > 0) - { - if (t[0] == '\\') - { - t.erase(0, 1); - if (t.size() == 0) - { - ret += "\\"; - } - else if (t[0] < '0' || t[0] > '9') - { - ret += t[0]; - t.erase(0, 1); - } - else - { - int gn = 0; - while (t.size() > 0 && t[0] >= '0' && t[0] <= '9') - { - gn = gn * 10 + (t[0] - '0'); - t.erase(0, 1); - } - ret += getGroup(gn); - } - } - else - { - ret += t[0]; - t.erase(0, 1); - } - } - - return ret; -} -unsigned long Matcher::getFlags() const -{ - return flags; -} -const bkstring& Matcher::getText() const -{ - return *str; -} - -bool Matcher::matches() -{ - flags = MATCH_ENTIRE_STRING; - matchedSomething = false; - clearGroups(); - lm = 0; - return pat->head->match(*str, this, 0) == (int)str->size(); -} -bool Matcher::findFirstMatch() -{ - starts[0] = 0; - flags = 0; - clearGroups(); - start = 0; - lm = 0; - ends[0] = pat->head->match(*str, this, 0); - if (ends[0] >= 0) - { - matchedSomething = true; - return 1; - } - return 0; -} -bool Matcher::findNextMatch() -{ - int s = starts[0], e = ends[0]; - - if (!matchedSomething) return findFirstMatch(); - if (s == e) ++e; - flags = 0; - clearGroups(); - - starts[0] = e; - if (e >= (int)str->size()) return 0; - start = e; - lm = e; - ends[0] = pat->head->match(*str, this, e); - return ends[0] >= 0; -} -std::vector Matcher::findAll() -{ - std::vector ret; - reset(); - while (findNextMatch()) - { - ret.push_back(getGroup()); - } - return ret; -} - -void Matcher::reset() -{ - lm = 0; - clearGroups(); - matchedSomething = false; -} - -int Matcher::getStartingIndex(const int groupNum) const -{ - if (groupNum < 0 || groupNum >= gc) return -1; - return starts[groupNum]; -} -int Matcher::getEndingIndex(const int groupNum) const -{ - if (groupNum < 0 || groupNum >= gc) return -1; - return ends[groupNum]; -} -bkstring Matcher::getGroup(const int groupNum) const -{ - if (groupNum < 0 || groupNum >= gc) return ""; - if (starts[groupNum] < 0 || ends[groupNum] < 0) return ""; - return str->substr(starts[groupNum], ends[groupNum] - starts[groupNum]); -} -std::vector Matcher::getGroups(const bool includeGroupZero) const -{ - int i, start = (includeGroupZero ? 0 : 1); - std::vector ret; - - for (i = start; i < gc; ++i) ret.push_back(getGroup(i)); - return ret; -} - diff --git a/plugins/SmileyAdd/regexp/Matcher.h b/plugins/SmileyAdd/regexp/Matcher.h deleted file mode 100644 index 621184d8c2..0000000000 --- a/plugins/SmileyAdd/regexp/Matcher.h +++ /dev/null @@ -1,248 +0,0 @@ -#ifndef __MATCHER_H__ -#define __MATCHER_H__ - -#include "bkstring.h" -#include - -class Vector; -class NFANode; -class NFAStartNode; -class NFAEndNode; -class NFAGroupHeadNode; -class NFAGroupLoopNode; -class NFAGroupLoopPrologueNode; -class NFAGroupTailNode; -class NFALookBehindNode; -class NFAStartOfLineNode; -class NFAEndOfLineNode; -class NFAEndOfMatchNode; -class NFAReferenceNode; -class Pattern; - -/** - A matcher is a non thread-safe object used to scan strings using a given - {@link Pattern Pattern} object. Using a Matcher is the preferred - method for scanning strings. Matchers are not thread-safe. Matchers require - very little dynamic memory, hence one is encouraged to create several - instances of a matcher when necessary as opposed to sharing a single instance - of a matcher. -

- The most common methods needed by the matcher are matches, - findNextMatch, and getGroup. matches - and findNextMatch both return success or failure, and further - details can be gathered from their documentation. -

- Unlike Java's Matcher, this class allows you to change the string - you are matching against. This provides a small optimization, since you no - longer need multiple matchers for a single pattern in a single thread. -

- This class also provides an extremely handy method for replacing text with - captured data via the replaceWithGroups method. A typical - invocation looks like: -

-  char buf[10000];
-  bkstring str = "\\5 (user name \\1) uses \\7 for his/her shell and \\6 is their home directory";
-  FILE * fp = fopen("/etc/passwd", "r");
-  Pattern::registerPattern("entry", "[^:]+");
-  Pattern * p = Pattern::compile("^({entry}):({entry}):({entry}):({entry}):({entry}):({entry}):({entry})$",
-                                 Pattern::MULTILINE_MATCHING | Pattern::UNIX_LINE_MODE);
-  Matcher * m = p->createMatcher("");
-  while (fgets(buf, 9999, fp))
-  {
-    m->setString(buf);
-    if (m->matches())
-    {
-      printf("%s\n", m->replaceWithGroups(str).c_str());
-    }
-  }
-  fclose(fp);
-
-  
- Calling any of the following functions before first calling - matches, findFirstMatch, or - findNextMatch results in undefined behavior and may cause your - program to crash. - -
    -
  • replaceWithGroups -
  • getStartingIndex
  • -
  • getEndingIndex
  • -
  • getGroup
  • -
  • getGroups
  • -
- -

- The function findFirstMatch will attempt to find the first match - in the input string. The same results can be obtained by first calling - reset followed by findNextMatch. -

- To eliminate the necessity of looping through a string to find all the - matching substrings, findAll was created. The function will find - all matching substrings and return them in a vector. If you need - to examine specific capture groups within the substrings, then this method - should not be used. - - @author Jeffery Stuart - @since March 2003, Stable Since November 2004 - @version 1.07.00 - @memo Mutable object used on instances of a Pattern class - */ -class Matcher -{ - friend class NFANode; - friend class NFAStartNode; - friend class NFAEndNode; - friend class NFAGroupHeadNode; - friend class NFAGroupLoopNode; - friend class NFAGroupLoopPrologueNode; - friend class NFAGroupTailNode; - friend class NFALookBehindNode; - friend class NFAStartOfLineNode; - friend class NFAEndOfLineNode; - friend class NFAEndOfMatchNode; - friend class NFAReferenceNode; - friend class Pattern; - private: - /** - Creates a new matcher object against text using - pattern. - - @param pattern The pattern with which to search - @param text The text in which to search - */ - Matcher(Pattern * pattern, const bkstring & text); - protected: - /// The pattern we use to match - Pattern * pat; - /// The string in which we are matching - const bkstring* str; - /// The starting point of our match - int start; - /// An array of the starting positions for each group - int * starts; - /// An array of the ending positions for each group - int * ends; - /// An array of private data used by NFANodes during matching - int * groups; - /// An array of private data used by NFANodes during matching - int * groupIndeces; - /// An array of private data used by NFANodes during matching - int * groupPos; - /// The ending index of the last match - int lm; - /// The number of capturing groups we have - int gc; - /// The number of non-capturing groups we havew - int ncgc; - /// Whether or not we have matched something (used only by findFirstMatch and findNextMatch) - int matchedSomething; - /// The flags with which we were made - unsigned long flags; - /// Called by reset to clear the group arrays - void clearGroups(); - public: - /// Used internally by match to signify we want the entire string matched - const static int MATCH_ENTIRE_STRING; - public: - /// Cleans up the dynamic memory used by this matcher - ~Matcher(); - /** - Replaces the contents of str with the appropriate captured - text. str should have at least one back reference, otherwise - this function does nothing. - @param str The string in which to replace text - @return A string with all backreferences appropriately replaced - */ - bkstring replaceWithGroups(const bkstring & str); - /** - The flags currently being used by the matcher. - @return Zero - */ - unsigned long getFlags() const; - /** - The text being searched by the matcher. - @return the text being searched by the matcher. - */ - const bkstring& getText() const; - - /** - Scans the string from start to finish for a match. The entire string must - match for this function to return success. Group variables are - appropriately set and can be queried after this function returns. - - @return Success if and only if the entire string matches the pattern - */ - bool matches(); - /** - Scans the string for the first substring matching the pattern. The entire - string does not necessarily have to match for this function to return - success. Group variables are appropriately set and can be queried after - this function returns. - - @return Success if any substring matches the specified pattern - */ - bool findFirstMatch(); - /** - Scans the string for the next substring matching the pattern. If no calls - have been made to findFirstMatch of findNextMatch since the last call to - reset, matches, or setString, then this function's behavior results to - that of findFirstMatch. - - @return Success if another substring can be found that matches the pattern - */ - bool findNextMatch(); - /** - Returns a vector of every substring in order which matches the given - pattern. - - @return Every substring in order which matches the given pattern - */ - std::vector findAll(); - /** - Resets the internal state of the matcher - */ - void reset(); - /** - Same as getText. Left n for backwards compatibilty with old source code - @return Returns the string that is currently being used for matching - */ - inline const bkstring& getString() const { return *str; } - /** - Sets the string to scan - @param newStr The string to scan for subsequent matches - */ - inline void setString(const bkstring & newStr) { str = &newStr; reset(); } - - /** - Returns the starting index of the specified group. - @param groupNum The group to query - @return The starting index of the group if it was matched, -1 for an - invalid group or if the group was not matched - */ - int getStartingIndex(const int groupNum = 0) const; - /** - Returns the ending index of the specified group. - @param groupNum The group to query - @return The ending index of the group if it was matched, -1 for an - invalid group or if the group was not matched - */ - int getEndingIndex(const int groupNum = 0) const; - /** - Returns the specified group. An empty string ("") does not necessarily - mean the group was not matched. A group such as (a*b?) could be matched by - a zero length. If an empty string is returned, getStartingIndex can be - called to determine if the group was actually matched. - @param groupNum The group to query - @return The text of the group - */ - bkstring getGroup(const int groupNum = 0) const; - /** - Returns every capture group in a vector - - @param includeGroupZero Whether or not include capture group zero - @return Every capture group - */ - std::vector getGroups(const bool includeGroupZero = 0) const; -}; - -#endif diff --git a/plugins/SmileyAdd/regexp/Pattern.cpp b/plugins/SmileyAdd/regexp/Pattern.cpp deleted file mode 100644 index 4487dddd4b..0000000000 --- a/plugins/SmileyAdd/regexp/Pattern.cpp +++ /dev/null @@ -1,1709 +0,0 @@ -/** - From the author (Jeff Stuart) - " - Let me start by saying this file is pretty big. If you feel up to it, you can - try making changes yourself, but you would be better off to just email me at - stuart@cs.ucdavis.edu if you think there is a bug, or have something useful you - would like added. This project is very "near and dear" to me, so I am fairly - quick to make bug fixes. The header files for Pattern and Matcher are fairly - well documented and the function names are pretty self-explanatory, but if you - are having any trouble, feel free to email me at stuart@cs.ucdavis.edu. - - If you email me, make sure you put something like C++RE in the subject because - I tend to delete email if I don't recognize the name and the subject is - something like "I Need Your Help" or "Got A Second" or "I Found It". - " - */ - -/* - Detailed documentation is provided in this class' header file - - @author Jeffery Stuart - @since November 2004 - @version 1.07.00 -*/ - -#define to_lower(a) (char)(unsigned)CharLowerA((LPSTR)static_cast(a)) -#define is_alpha IsCharAlphaA - -#ifdef _WIN32 - #pragma warning(push) - #pragma warning(disable:4996) - #define str_icmp lstrcmpiA -#else - #define str_icmp strcasecmp -#endif - -#include -#include -#include -#include - -std::map Pattern::compiledPatterns; -std::map > Pattern::registeredPatterns; - -const int Pattern::MIN_QMATCH = 0x00000000; -const int Pattern::MAX_QMATCH = 0x7FFFFFFF; - -const unsigned long Pattern::CASE_INSENSITIVE = 0x01; -const unsigned long Pattern::LITERAL = 0x02; -const unsigned long Pattern::DOT_MATCHES_ALL = 0x04; -const unsigned long Pattern::MULTILINE_MATCHING = 0x08; -const unsigned long Pattern::UNIX_LINE_MODE = 0x10; - -Pattern::Pattern(const bkstring & rhs) -{ - matcher = NULL; - pattern = rhs; - curInd = 0; - groupCount = 0; - nonCapGroupCount = 0; - error = 0; - head = NULL; -} -// convenience function in case we want to add any extra debugging output -void Pattern::raiseError() -{ -/* switch (pattern[curInd - 1]) - { - case '*': - case ')': - case '+': - case '?': - case ']': - case '}': - fprintf(stderr, "%s\n%*c^\n", pattern.c_str(), curInd - 1, ' '); - fprintf(stderr, "Syntax Error near here. Possible unescaped meta character.\n"); - break; - default: - fprintf(stderr, "%s\n%*c^\n", pattern.c_str(), curInd - 1, ' '); - fprintf(stderr, "Syntax Error near here. \n"); - break; - }*/ - error = 1; -} -NFANode * Pattern::registerNode(NFANode * node) -{ - nodes[node] = 1; - return node; -} - -bkstring Pattern::classUnion (bkstring s1, bkstring s2) const -{ - char out[300]; - std::sort(s1.begin(), s1.end()); - std::sort(s2.begin(), s2.end()); - *std::set_union(s1.begin(), s1.end(), s2.begin(), s2.end(), out) = 0; - return out; -} -bkstring Pattern::classIntersect (bkstring s1, bkstring s2) const -{ - char out[300]; - std::sort(s1.begin(), s1.end()); - std::sort(s2.begin(), s2.end()); - *std::set_intersection(s1.begin(), s1.end(), s2.begin(), s2.end(), out) = 0; - return out; -} -bkstring Pattern::classNegate (bkstring s1) const -{ - char out[300]; - int i, ind = 0; - std::map m; - - for (i = 0; i < (int)s1.size(); ++i) m[s1[i]] = 1; - for (i = 0xFF; i >= 0; --i) if (m.find((char)i) == m.end()) out[ind++] = (char)i; - out[ind] = 0; - return bkstring(out, ind); -} -bkstring Pattern::classCreateRange(char low, char hi) const -{ - char out[300]; - int ind = 0; - while (low != hi) out[ind++] = low++; - out[ind++] = low; - return bkstring(out, ind); -} - -int Pattern::getInt(int start, int end) -{ - int ret = 0; - for (; start <= end; ++start) ret = ret * 10 + (pattern[start] - '0'); - return ret; -} -bool Pattern::quantifyCurly(int & sNum, int & eNum) -{ - bool good = 1; - int i, ci = curInd + 1; - int commaInd = ci, endInd = ci, len = (int)pattern.size(); - sNum = eNum = 0; - - while (endInd < len && pattern[endInd ] != '}') ++endInd; - while (commaInd < endInd && pattern[commaInd] != ',') ++commaInd; - if (endInd >= len) { raiseError(); return 0; } - for (i = ci; good && i < endInd; ++i) if (i != commaInd && !isdigit(pattern[i])) good = 0; - if (!good && commaInd < endInd) { raiseError(); return 0; } - if (!good) return 0; - /* so now everything in here is either a comma (and there is at most one comma) or a digit */ - if (commaInd == ci) // {,*} - { - if (endInd == commaInd + 1) { sNum = MIN_QMATCH; eNum = MAX_QMATCH; } // {,} = * - else { sNum = MIN_QMATCH; eNum = getInt(commaInd + 1, endInd - 1); } // {,+} - } - else if (commaInd == endInd - 1) { sNum = getInt(ci, commaInd - 1); eNum = MAX_QMATCH; } // {+,} - else if (commaInd == endInd) { sNum = getInt(ci, endInd - 1); eNum = sNum; } // {+} - else { sNum = getInt(ci, commaInd - 1); eNum = getInt(commaInd + 1, endInd - 1); } // {+,+} - curInd = endInd + 1; - return 1; -} -NFANode * Pattern::quantifyGroup(NFANode * start, NFANode * stop, const int gn) -{ - NFANode * newNode = NULL; - int type = 0; - - if (curInd < (int)pattern.size()) - { - char ch = (curInd + 1 >= (int)pattern.size()) ? -1 : pattern[curInd + 1]; - switch (pattern[curInd]) - { - case '*': - ++curInd; - switch (ch) - { - case '?': ++curInd; type = 1; break; - case '+': ++curInd; type = 2; break; - } - newNode = registerNode(new NFAGroupLoopPrologueNode(gn)); - newNode->next = registerNode(new NFAGroupLoopNode(start, MIN_QMATCH, MAX_QMATCH, gn, type)); - stop->next = newNode->next; - return newNode; - case '?': - ++curInd; - switch (ch) - { - case '?': ++curInd; type = 1; break; - case '+': ++curInd; type = 2; break; - } - newNode = registerNode(new NFAGroupLoopPrologueNode(gn)); - newNode->next = registerNode(new NFAGroupLoopNode(start, MIN_QMATCH, 1, gn, type)); - stop->next = newNode->next; - return newNode; - case '+': - ++curInd; - switch (ch) - { - case '?': ++curInd; type = 1; break; - case '+': ++curInd; type = 2; break; - } - newNode = registerNode(new NFAGroupLoopPrologueNode(gn)); - newNode->next = registerNode(new NFAGroupLoopNode(start, 1, MAX_QMATCH, gn, type)); - stop->next = newNode->next; - return newNode; - case '{': - { - int s, e; - if (quantifyCurly(s, e)) - { - ch = (curInd < (int)pattern.size()) ? pattern[curInd] : -1; - switch (ch) - { - case '?': ++curInd; type = 1; break; - case '+': ++curInd; type = 2; break; - } - newNode = registerNode(new NFAGroupLoopPrologueNode(gn)); - newNode->next = registerNode(new NFAGroupLoopNode(start, s, e, gn, type)); - stop->next = newNode->next; - return newNode; - } - } - default: - break; - } - } - return NULL; -} - -NFANode * Pattern::quantify(NFANode * newNode) -{ - if (curInd < (int)pattern.size()) - { - char ch = (curInd + 1 >= (int)pattern.size()) ? -1 : pattern[curInd + 1]; - switch (pattern[curInd]) - { - case '*': - ++curInd; - switch (ch) - { - case '?': ++curInd; newNode = registerNode(new NFALazyQuantifierNode (this, newNode, MIN_QMATCH, MAX_QMATCH)); break; - case '+': ++curInd; newNode = registerNode(new NFAPossessiveQuantifierNode(this, newNode, MIN_QMATCH, MAX_QMATCH)); break; - default: newNode = registerNode(new NFAGreedyQuantifierNode (this, newNode, MIN_QMATCH, MAX_QMATCH)); break; - } - break; - case '?': - ++curInd; - switch (ch) - { - case '?': ++curInd; newNode = registerNode(new NFALazyQuantifierNode (this, newNode, MIN_QMATCH, 1)); break; - case '+': ++curInd; newNode = registerNode(new NFAPossessiveQuantifierNode(this, newNode, MIN_QMATCH, 1)); break; - default: newNode = registerNode(new NFAGreedyQuantifierNode (this, newNode, MIN_QMATCH, 1)); break; - } - break; - case '+': - ++curInd; - switch (ch) - { - case '?': ++curInd; newNode = registerNode(new NFALazyQuantifierNode (this, newNode, 1, MAX_QMATCH)); break; - case '+': ++curInd; newNode = registerNode(new NFAPossessiveQuantifierNode(this, newNode, 1, MAX_QMATCH)); break; - default: newNode = registerNode(new NFAGreedyQuantifierNode (this, newNode, 1, MAX_QMATCH)); break; - } - break; - case '{': - { - int s, e; - if (quantifyCurly(s, e)) - { - ch = (curInd < (int)pattern.size()) ? pattern[curInd] : -1; - switch (ch) - { - case '?': ++curInd; newNode = registerNode(new NFALazyQuantifierNode (this, newNode, s, e)); break; - case '+': ++curInd; newNode = registerNode(new NFAPossessiveQuantifierNode(this, newNode, s, e)); break; - default: newNode = registerNode(new NFAGreedyQuantifierNode (this, newNode, s, e)); break; - } - } - } - break; - default: - break; - } - } - return newNode; -} -bkstring Pattern::parseClass() -{ - bkstring t, ret = ""; - char ch, c1, c2; - bool inv = 0, neg = 0, quo = 0; - - if (curInd < (int)pattern.size() && pattern[curInd] == '^') - { - ++curInd; - neg = 1; - } - while (curInd < (int)pattern.size() && pattern[curInd] != ']') - { - ch = pattern[curInd++]; - if (ch == '[') - { - t = parseClass(); - ret = classUnion(ret, t); - } - /*else if (ch == '-') - { - raiseError(); - curInd = pattern.size(); - }*/ - else if (ch == '&' && curInd < (int)pattern.size() && pattern[curInd] == '&') - { - if (pattern[++curInd] != '[') - { - raiseError(); - curInd = (int)pattern.size(); - } - else - { - ++curInd; - t = parseClass(); - ret = classIntersect(ret, t); - } - } - else if (ch == '\\') - { - t = parseEscape(inv, quo); - if (quo) - { - raiseError(); - curInd = (int)pattern.size(); - } - else if (inv || t.size() > 1) // cant be part of a range (a-z) - { - if (inv) t = classNegate(t); - ret = classUnion(ret, t); - } - else if (curInd < (int)pattern.size() && pattern[curInd] == '-') // part of a range (a-z) - { - c1 = t[0]; - ++curInd; - if (curInd >= (int)pattern.size()) raiseError(); - else - { - c2 = pattern[curInd++]; - if (c2 == '\\') - { - t = parseEscape(inv, quo); - if (quo) - { - raiseError(); - curInd = (int)pattern.size(); - } - else if (inv || t.size() > 1) raiseError(); - else ret = classUnion(ret, classCreateRange(c1, c2)); - } - else if (c2 == '[' || c2 == ']' || c2 == '-' || c2 == '&') - { - raiseError(); - curInd = (int)pattern.size(); - } - else ret = classUnion(ret, classCreateRange(c1, c2)); - } - } - else - { - ret = classUnion(ret, t); - } - } - else if (curInd < (int)pattern.size() && pattern[curInd] == '-') - { - c1 = ch; - ++curInd; - if (curInd >= (int)pattern.size()) raiseError(); - else - { - c2 = pattern[curInd++]; - if (c2 == '\\') - { - t = parseEscape(inv, quo); - if (quo) - { - raiseError(); - curInd = (int)pattern.size(); - } - else if (inv || t.size() > 1) raiseError(); - else ret = classUnion(ret, classCreateRange(c1, c2)); - } - else if (c2 == '[' || c2 == ']' || c2 == '-' || c2 == '&') - { - raiseError(); - curInd = (int)pattern.size(); - } - else - { - ret = classUnion(ret, classCreateRange(c1, c2)); - } - } - } - else - { - ret += " "; - ret[ret.size() - 1] = ch; - } - } - if (curInd >= (int)pattern.size() || pattern[curInd] != ']') - { - raiseError(); - ret = ""; - } - else - { - ++curInd; - if (neg) ret = classNegate(ret); - } - return ret; -} -bkstring Pattern::parsePosix() -{ - bkstring s7 = pattern.substr(curInd, 7); - if (s7 == "{Lower}") { curInd += 7; return "abcdefghijklmnopqrstuvwxyz"; } - if (s7 == "{Upper}") { curInd += 7; return "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; } - if (s7 == "{Alpha}") { curInd += 7; return "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; } - if (s7 == "{Digit}") { curInd += 7; return "0123456789"; } - if (s7 == "{Alnum}") { curInd += 7; return "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; } - if (s7 == "{Punct}") { curInd += 7; return "!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~"; } - if (s7 == "{Graph}") { curInd += 7; return "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~"; } - if (s7 == "{Print}") { curInd += 7; return "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~"; } - if (s7 == "{Blank}") { curInd += 7; return " \t"; } - if (s7 == "{Space}") { curInd += 7; return " \t\n\x0B\f\r"; } - if (s7 == "{Cntrl}") - { - bkstring::value_type i; - bkstring s = " "; - - for (i = 0; i < 5; ++i) s += s; - s += " "; - for (i = 0; i <= 0x1F; ++i) s[i] = i; - s[0x20] = 0x7F; - curInd += 7; - return s; - } - if (s7 == "{ASCII}") - { - bkstring s(0x80, ' '); - for (int i = 0; i <= 0x7f; ++i) s[i] = (bkstring::value_type)i; - curInd += 7; - return s; - } - if (pattern.substr(curInd, 8) == "{XDigit}") { curInd += 8; return "abcdefABCDEF0123456789"; } - raiseError(); - return ""; -} -NFANode * Pattern::parseBackref() -{ - #define is_dig(x) ((x) >= '0' && (x) <= '9') - #define to_int(x) ((x) - '0') - int ci = curInd; - int oldRef = 0, ref = 0; - - while (ci < (int)pattern.size() && is_dig(pattern[ci]) && (ref < 10 || ref < groupCount)) - { - oldRef = ref; - ref = ref * 10 + to_int(pattern[ci++]); - } - if (ci == (int)pattern.size()) - { - oldRef = ref; - ++ci; - } - if (oldRef < 0 || ci <= curInd) - { - raiseError(); - return registerNode(new NFAReferenceNode(-1)); - } - curInd = ci; - return registerNode(new NFAReferenceNode(ref)); - - #undef is_dig - #undef to_int -} -bkstring Pattern::parseOctal() -{ - #define islowoc(x) ((x) >= '0' && (x) <= '3') - #define isoc(x) ((x) >= '0' && (x) <= '7') - #define fromoc(x) ((x) - '0') - int ci = curInd; - char ch1 = (ci + 0 < (int)pattern.size()) ? pattern[ci + 0] : -1; - char ch2 = (ci + 1 < (int)pattern.size()) ? pattern[ci + 1] : -1; - char ch3 = (ci + 2 < (int)pattern.size()) ? pattern[ci + 2] : -1; - bkstring s = " "; - - if (islowoc(ch1) && isoc(ch2)) - { - curInd += 2; - s[0] = fromoc(ch1) * 8 + fromoc(ch2); - if (isoc(ch3)) - { - ++curInd; - s[0] = s[0] * 8 + fromoc(ch3); - } - } - else if (isoc(ch1) && isoc(ch2)) - { - curInd += 2; - s[0] = fromoc(ch1) * 8 + fromoc(ch2); - } - else raiseError(); - - return s; - #undef islowoc - #undef isoc - #undef fromoc -} -bkstring Pattern::parseHex() -{ - #define to_low(x) (((x) >= 'A' && (x) <= 'Z') ? ((x) - 'A' + 'a') : (x)) - #define is_dig(x) ((x) >= '0' && (x) <= '9') - #define is_hex(x) (is_dig(x) || (to_low(x) >= 'a' && to_low(x) <= 'f')) - #define to_int(x) ((is_dig(x)) ? ((x) - '0') : (to_low(x) - 'a' + 10)) - - int ci = curInd; - char ch1 = (ci + 0 < (int)pattern.size()) ? pattern[ci + 0] : -1; - char ch2 = (ci + 1 < (int)pattern.size()) ? pattern[ci + 1] : -1; - bkstring s = " "; - - if (is_hex(ch1) && is_hex(ch2)) - { - curInd += 2; - s[0] = (to_int(ch1) << 4 & 0xF0) | (to_int(ch2) & 0x0F); - } - - return s; - #undef to_low - #undef is_dig - #undef is_hex - #undef to_int -} -bkstring Pattern::parseEscape(bool & inv, bool & quo) -{ - char ch = pattern[curInd++]; - bkstring classes = ""; - - if (curInd > (int)pattern.size()) - { - raiseError(); - return NULL; - } - - quo = 0; - inv = 0; - switch (ch) - { - case 'p': classes = parsePosix(); break; - case 'P': classes = "!!"; classes += parsePosix(); break; - case 'd': classes = "0123456789"; break; - case 'D': classes = "!!0123456789"; break; - case 's': classes = " \t\r\n\f"; break; - case 'S': classes = "!! \t\r\n\f"; break; - case 'w': classes = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_"; break; - case 'W': classes = "!!abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_"; break; - case '0': classes = parseOctal(); break; - case 'x': classes = parseHex(); break; - - case 'Q': quo = 1; break; - case 't': classes = "\t"; break; - case 'r': classes = "\r"; break; - case 'n': classes = "\n"; break; - case 'f': classes = "\f"; break; - case 'a': classes = "\a"; break; - case 'e': classes = "\r"; break; - default: classes = " "; classes[0] = ch; break; - } - if (classes.substr(0, 2) == "!!") - { - classes = classes.substr(2); - inv = 1; - } - return classes; -} -NFANode * Pattern::parseRegisteredPattern(NFANode ** end) -{ - int i, j; - bkstring s; - NFANode * ret = NULL; - for (i = curInd; i < (int)pattern.size() && pattern[i] != '}'; ++i) { } - if (pattern[i] != '}') { raiseError(); return NULL; } - if (i == curInd + 1) { raiseError(); return NULL; } // {} - if ( - !( - (pattern[curInd] >= 'a' && pattern[curInd] <= 'z') || - (pattern[curInd] >= 'A' && pattern[curInd] <= 'Z') || - (pattern[curInd] == '_') - ) - ) - { - raiseError(); - return NULL; - } - for (j = curInd; !error && j < i; ++j) - { - if ( - !( - (pattern[j] >= 'a' && pattern[j] <= 'z') || - (pattern[j] >= 'A' && pattern[j] <= 'Z') || - (pattern[j] >= '0' && pattern[j] <= '9') || - (pattern[j] == '_') - ) - ) - { - raiseError(); - return NULL; - } - } - s = pattern.substr(curInd, i - curInd); - if (registeredPatterns.find(s) == registeredPatterns.end()) raiseError(); - else - { - unsigned long oflags = flags; - bkstring op = pattern; - int ci = i + 1; - - pattern = registeredPatterns[s].first; - curInd = 0; - flags = registeredPatterns[s].second; - - --groupCount; - ret = parse(0, 0, end); - - pattern = op; - curInd = ci; - flags = oflags; - } - if (error) { *end = ret = NULL; } - return ret; -} - -// look behind should interpret everything as a literal (except \\) since the -// pattern must have a concrete length -NFANode * Pattern::parseBehind(const bool pos, NFANode ** end) -{ - bkstring t = ""; - while (curInd < (int)pattern.size() && pattern[curInd] != ')') - { - char ch = pattern[curInd++]; - t += " "; - if (ch == '\\') - { - if (curInd + 1 >= (int)pattern.size()) - { - raiseError(); - return *end = registerNode(new NFACharNode(' ')); - } - ch = pattern[curInd++]; - } - t[t.size() - 1] = ch; - } - if (curInd >= (int)pattern.size() || pattern[curInd] != ')') raiseError(); - else ++curInd; - return *end = registerNode(new NFALookBehindNode(t, pos)); -} -NFANode * Pattern::parseQuote() -{ - bool done = 0; - bkstring s = ""; - - while (!done) - { - if (curInd >= (int)pattern.size()) - { - raiseError(); - done = 1; - } - else if (pattern.substr(curInd, 2) == "\\E") - { - curInd += 2; - done = 1; - } - else if (pattern[curInd] == '\\') - { - s += " "; - s[s.size() - 1] = pattern[++curInd]; - ++curInd; - } - else - { - s += " "; - s[s.size() - 1] = pattern[curInd++]; - } - } - if ((flags & Pattern::CASE_INSENSITIVE) != 0) return registerNode(new NFACIQuoteNode(s)); - return registerNode(new NFAQuoteNode(s)); -} -NFANode * Pattern::parse(const bool inParen, const bool inOr, NFANode ** end) -{ - NFANode * start, * cur, * next = NULL; - bkstring t; - int grc = groupCount++; - bool inv, quo; - bool ahead = 0, pos = 0, noncap = 0, indep = 0; - unsigned long oldFlags = flags; - - if (inParen) - { - if (pattern[curInd] == '?') - { - ++curInd; - --groupCount; - if (pattern[curInd] == ':') { noncap = 1; ++curInd; grc = --nonCapGroupCount; } - else if (pattern[curInd] == '=') { ++curInd; ahead = 1; pos = 1; } - else if (pattern[curInd] == '!') { ++curInd; ahead = 1; pos = 0; } - else if (pattern.substr(curInd, 2) == "<=") { curInd += 2; return parseBehind(1, end); } - else if (pattern.substr(curInd, 2) == "') { ++curInd; indep = 1; } - else - { - bool negate = false, done = false; - while (!done) - { - if (curInd >= (int)pattern.size()) - { - raiseError(); - return NULL; - } - else if (negate) - { - switch (pattern[curInd]) - { - case 'i': flags &= ~Pattern::CASE_INSENSITIVE; break; - case 'd': flags &= ~Pattern::UNIX_LINE_MODE; break; - case 'm': flags &= ~Pattern::MULTILINE_MATCHING; break; - case 's': flags &= ~Pattern::DOT_MATCHES_ALL; break; - case ':': done = true; break; - case ')': - ++curInd; - *end = registerNode(new NFALookBehindNode("", true)); - return *end; - case '-': - default: raiseError(); return NULL; - } - } - else - { - switch (pattern[curInd]) - { - case 'i': flags |= Pattern::CASE_INSENSITIVE; break; - case 'd': flags |= Pattern::UNIX_LINE_MODE; break; - case 'm': flags |= Pattern::MULTILINE_MATCHING; break; - case 's': flags |= Pattern::DOT_MATCHES_ALL; break; - case ':': done = true; break; - case '-': negate = true; break; - case ')': - ++curInd; - *end = registerNode(new NFALookBehindNode("", true)); - return *end; - default: raiseError(); return NULL; - } - } - ++curInd; - } - noncap = 1; - grc = --nonCapGroupCount; - } - if (noncap) cur = start = registerNode(new NFAGroupHeadNode(grc)); - else cur = start = registerNode(new NFASubStartNode); - } - else cur = start = registerNode(new NFAGroupHeadNode(grc)); - } - else cur = start = registerNode(new NFASubStartNode); - while (curInd < (int)pattern.size()) - { - char ch = pattern[curInd++]; - - next = NULL; - if (error) return NULL; - switch (ch) - { - case '^': - if ((flags & Pattern::MULTILINE_MATCHING) != 0) next = registerNode(new NFAStartOfLineNode); - else next = registerNode(new NFAStartOfInputNode); - break; - case '$': - if ((flags & Pattern::MULTILINE_MATCHING) != 0) next = registerNode(new NFAEndOfLineNode); - else next = registerNode(new NFAEndOfInputNode(0)); - break; - case '|': - --groupCount; - cur->next = registerNode(new NFAAcceptNode); - cur = start = registerNode(new NFAOrNode(start, parse(inParen, 1))); - break; - case '\\': - if (curInd < (int)pattern.size()) - { - bool eoi = 0; - switch (pattern[curInd]) - { - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': next = parseBackref(); break; - case 'A': ++curInd; next = registerNode(new NFAStartOfInputNode); break; - case 'B': ++curInd; next = registerNode(new NFAWordBoundaryNode(0)); break; - case 'b': ++curInd; next = registerNode(new NFAWordBoundaryNode(1)); break; - case 'G': ++curInd; next = registerNode(new NFAEndOfMatchNode); break; - case 'Z': eoi = 1; - case 'z': ++curInd; next = registerNode(new NFAEndOfInputNode(eoi)); break; - default: - t = parseEscape(inv, quo); - if (!quo) - { - if (t.size() > 1 || inv) - { - if ((flags & Pattern::CASE_INSENSITIVE) != 0) next = registerNode(new NFACIClassNode(t, inv)); - else next = registerNode(new NFAClassNode(t, inv)); - } - else - { - next = registerNode(new NFACharNode(t[0])); - } - } - else - { - next = parseQuote(); - } - } - } - else raiseError(); - break; - case '[': - if ((flags & Pattern::CASE_INSENSITIVE) == 0) - { - NFAClassNode * clazz = new NFAClassNode(); - bkstring s = parseClass(); - for (int i = 0; i < (int)s.size(); ++i) clazz->vals[s[i]] = 1; - next = registerNode(clazz); - } - else - { - NFACIClassNode * clazz = new NFACIClassNode(); - bkstring s = parseClass(); - for (int i = 0; i < (int)s.size(); ++i) clazz->vals[to_lower(s[i])] = 1; - next = registerNode(clazz); - } - break; - case '.': - { - bool useN = 1, useR = 1; - NFAClassNode * clazz = new NFAClassNode(1); - if ((flags & Pattern::UNIX_LINE_MODE) != 0) useR = 0; - if ((flags & Pattern::DOT_MATCHES_ALL) != 0) useN = useR = 0; - if (useN) clazz->vals['\n'] = 1; - if (useR) clazz->vals['\r'] = 1; - next = registerNode(clazz); - } - break; - case '(': - { - NFANode * end, * t1, * t2; - t1 = parse(1, 0, &end); - if (!t1) raiseError(); - else if (t1->isGroupHeadNode() && (t2 = quantifyGroup(t1, end, grc)) != NULL) - { - cur->next = t2; - cur = t2->next; - } - else - { - cur->next = t1; - cur = end; - } - } - break; - case ')': - if (!inParen) raiseError(); - else if (inOr) - { - --curInd; - cur = cur->next = registerNode(new NFAAcceptNode); - flags = oldFlags; - return start; - } - else - { - if (ahead) - { - cur = cur->next = registerNode(new NFAAcceptNode); - flags = oldFlags; - return *end = registerNode(new NFALookAheadNode(start, pos)); - } - else if (indep) - { - cur = cur->next = registerNode(new NFAAcceptNode); - flags = oldFlags; - return *end = registerNode(new NFAPossessiveQuantifierNode(this, start, 1, 1)); - } - else // capping or noncapping, it doesnt matter - { - *end = cur = cur->next = registerNode(new NFAGroupTailNode(grc)); - next = quantifyGroup(start, *end, grc); - if (next) - { - start = next; - *end = next->next; - } - flags = oldFlags; - return start; - } - } - break; - case '{': // registered pattern - cur->next = parseRegisteredPattern(&next); - if (cur->next) cur = next; - break; - case '*': - case '+': - case '?': -// case '}': -// case ']': - raiseError(); - break; - default: - if ((flags & Pattern::CASE_INSENSITIVE) != 0) next = registerNode(new NFACICharNode(ch)); - else next = registerNode(new NFACharNode(ch)); - break; - } - if (next) - { - cur = cur->next = quantify(next); - } - } - if (inParen) raiseError(); - else - { - if (inOr) cur = cur->next = registerNode(new NFAAcceptNode); - if (end) *end = cur; - } - - flags = oldFlags; - if (error) return NULL; - - return start; -} - -Pattern * Pattern::compile(const bkstring & pattern, const unsigned long mode) -{ - Pattern * p = new Pattern(pattern); - NFANode * end; - - p->flags = mode; - if ((mode & Pattern::LITERAL) != 0) - { - p->head = p->registerNode(new NFAStartNode); - if ((mode & Pattern::CASE_INSENSITIVE) != 0) p->head->next = p->registerNode(new NFACIQuoteNode(pattern)); - else p->head->next = p->registerNode(new NFAQuoteNode(pattern)); - p->head->next->next = p->registerNode(new NFAEndNode); - } - else - { - p->head = p->parse(0, 0, &end); - if (!p->head) - { - delete p; - p = NULL; - } - else - { - if (!(p->head && p->head->isStartOfInputNode())) - { - NFANode * n = p->registerNode(new NFAStartNode); - n->next = p->head; - p->head = n; - } - end->next = p->registerNode(new NFAEndNode); - } - } - if (p != NULL) - { - p->matcher = new Matcher(p, ""); - } - - return p; -} - -Pattern * Pattern::compileAndKeep(const bkstring & pattern, const unsigned long mode) -{ - Pattern * ret = NULL; - std::map::iterator it = compiledPatterns.find(pattern); - - if (it != compiledPatterns.end()) - { - ret = it->second; - } - else - { - ret = compile(pattern, mode); - compiledPatterns[pattern] = ret; - } - - return ret; -} -bkstring Pattern::replace(const bkstring & pattern, const bkstring & str, - const bkstring & replacementText, const unsigned long mode) -{ - bkstring ret; - Pattern * p = Pattern::compile(pattern, mode); - if (p) - { - ret = p->replace(str, replacementText); - delete p; - } - return ret; -} - -std::vector Pattern::split(const bkstring & pattern, const bkstring & str, const bool keepEmptys, - const unsigned long limit, const unsigned long mode) -{ - std::vector ret; - Pattern * p = Pattern::compile(pattern, mode); - if (p) - { - ret = p->split(str, keepEmptys, limit); - delete p; - } - return ret; -} - -std::vector Pattern::findAll(const bkstring & pattern, const bkstring & str, const unsigned long mode) -{ - std::vector ret; - Pattern * p = Pattern::compile(pattern, mode); - if (p) - { - ret = p->findAll(str); - delete p; - } - return ret; -} - -bool Pattern::matches(const bkstring & pattern, const bkstring & str, const unsigned long mode) -{ - bool ret = 0; - Pattern * p = compile(pattern, mode); - - if (p) - { - ret = p->matches(str); - delete p; - } - - return ret; -} - -bool Pattern::registerPattern(const bkstring & name, const bkstring & pattern, const unsigned long mode) -{ - Pattern * p = Pattern::compile(pattern, mode); - if (!p) return 0; - Pattern::registeredPatterns[name] = std::make_pair(pattern, mode); - delete p; - return 1; -} - -void Pattern::unregisterPatterns() -{ - registeredPatterns.clear(); -} -void Pattern::clearPatternCache() -{ - std::map::iterator it; - for (it = compiledPatterns.begin(); it != compiledPatterns.end(); ++it) - { - delete it->second; - } - compiledPatterns.clear(); -} - -std::pair Pattern::findNthMatch(const bkstring & pattern, const bkstring & str, - const int matchNum, const unsigned long mode) -{ - std::pair ret; - Pattern * p = Pattern::compile(pattern, mode); - - ret.second = -1; - if (p) - { - int i = -1; - p->matcher->setString(str); - while (i < matchNum && p->matcher->findNextMatch()) { ++i; } - if (i == matchNum && p->matcher->getStartingIndex() >= 0) - { - ret.first = p->matcher->getGroup(0); - ret.second = p->matcher->getStartingIndex(); - } - delete p; - } - - return ret; -} - -Pattern::~Pattern() -{ - if (matcher) delete matcher; - for (std::map::iterator it = nodes.begin(); it != nodes.end(); ++it) - { - delete it->first; - } -} -bkstring Pattern::replace(const bkstring & str, const bkstring & replacementText) -{ - int li = 0; - bkstring ret = ""; - - matcher->setString(str); - while (matcher->findNextMatch()) - { - ret += str.substr(li, matcher->getStartingIndex() - li); - ret += matcher->replaceWithGroups(replacementText); - li = matcher->getEndingIndex(); - } - ret += str.substr(li); - - return ret; -} -std::vector Pattern::split(const bkstring & str, const bool keepEmptys, const unsigned long limit) -{ - unsigned long lim = (limit == 0 ? MAX_QMATCH : limit); - int li = 0; - std::vector ret; - - matcher->setString(str); - - while (matcher->findNextMatch() && ret.size() < lim) - { - if (matcher->getStartingIndex() == 0 && keepEmptys) ret.push_back(""); - if ((matcher->getStartingIndex() != matcher->getEndingIndex()) || keepEmptys) - { - if (li != matcher->getStartingIndex() || keepEmptys) - { - ret.push_back(str.substr(li, matcher->getStartingIndex() - li)); - } - li = matcher->getEndingIndex(); - } - } - if (li < (int)str.size()) ret.push_back(str.substr(li)); - - return ret; -} -std::vector Pattern::findAll(const bkstring & str) -{ - matcher->setString(str); - return matcher->findAll(); -} -bool Pattern::matches(const bkstring & str) -{ - matcher->setString(str); - return matcher->matches(); -} -unsigned long Pattern::getFlags() const -{ - return flags; -} -bkstring Pattern::getPattern() const -{ - return pattern; -} -Matcher * Pattern::createMatcher(const bkstring & str) -{ - return new Matcher(this, str); -} - -// NFANode - -NFANode::NFANode() { next = NULL; } -NFANode::~NFANode() { } -void NFANode::findAllNodes(std::map & soFar) -{ - if (soFar.find(this) == soFar.end()) return; - soFar[this] = 1; - if (next) next->findAllNodes(soFar); -} - -// NFACharNode - -NFACharNode::NFACharNode(const char c) { ch = c; } -int NFACharNode::match(const bkstring & str, Matcher * matcher, const int curInd) const -{ - if (curInd < (int)str.size() && str[curInd] == ch) return next->match(str, matcher, curInd + 1); - return -1; -} - -// NFACICharNode - -NFACICharNode::NFACICharNode(const char c) { ch = to_lower(c); } -int NFACICharNode::match(const bkstring & str, Matcher * matcher, const int curInd) const -{ - if (curInd < (int)str.size() && to_lower(str[curInd]) == ch) return next->match(str, matcher, curInd + 1); - return -1; -} - -// NFAStartNode - -NFAStartNode::NFAStartNode() { } -int NFAStartNode::match(const bkstring & str, Matcher * matcher, const int curInd) const -{ - int ret = -1, ci = curInd; - - matcher->starts[0] = curInd; - if ((matcher->getFlags() & Matcher::MATCH_ENTIRE_STRING) == (unsigned int)Matcher::MATCH_ENTIRE_STRING) - { - if (curInd != 0) - { - matcher->starts[0] = -1; - return -1; - } - return next->match(str, matcher, 0); - } - while ((ret = next->match(str, matcher, ci)) == -1 && ci < (int)str.size()) - { - matcher->clearGroups(); - matcher->starts[0] = ++ci; - } - if (ret < 0) matcher->starts[0] = -1; - return ret; -} - -// NFAEndNode - -NFAEndNode::NFAEndNode() { } -int NFAEndNode::match(const bkstring & str, Matcher * matcher, const int curInd) const -{ - matcher->ends[0] = curInd; - if ((matcher->getFlags() & Matcher::MATCH_ENTIRE_STRING) != 0) - { - if (curInd == (int)str.size()) return curInd; - matcher->ends[0] = -1; - return -1; - } - return curInd; -} - -// NFAQuantifierNode - -void NFAQuantifierNode::findAllNodes(std::map & soFar) -{ - inner->findAllNodes(soFar); - NFANode::findAllNodes(soFar); -} -NFAQuantifierNode::NFAQuantifierNode(Pattern * pat, NFANode * internal, const int minMatch, const int maxMatch) -{ - inner = internal; - inner->next = pat->registerNode(new NFAAcceptNode); - min = (minMatch < Pattern::MIN_QMATCH) ? Pattern::MIN_QMATCH : minMatch; - max = (maxMatch > Pattern::MAX_QMATCH) ? Pattern::MAX_QMATCH : maxMatch; -} - -int NFAQuantifierNode::match(const bkstring & str, Matcher * matcher, const int curInd) const -{ - int i0, i1, i2 = 0; - - i0 = i1 = curInd; - while (i2 < min) - { - - ++i2; - i1 = inner->match(str, matcher, i0); - if (i1 <= i0) return i1; // i1 < i0 means i1 is -1 - i0 = i1; - } - - return i1; -} -// NFAGreedyQuantifierNode - -NFAGreedyQuantifierNode::NFAGreedyQuantifierNode(Pattern * pat, NFANode * internal, const int minMatch, const int maxMatch) - : NFAQuantifierNode(pat, internal, minMatch, maxMatch) { } -int NFAGreedyQuantifierNode::match(const bkstring & str, Matcher * matcher, const int curInd) const -{ - int t = NFAQuantifierNode::match(str, matcher, curInd); - if (t != -1) return matchInternal(str, matcher, t, min); - return t; -} -int NFAGreedyQuantifierNode::matchInternal(const bkstring & str, Matcher * matcher, const int curInd, const int soFar) const -{ - if (soFar >= max) return next->match(str, matcher, curInd); - - int i, j; - - i = inner->match(str, matcher, curInd); - if (i != -1) - { - j = matchInternal(str, matcher, i, soFar + 1); - if (j != -1) return j; - } - return next->match(str, matcher, curInd); -} - -// NFALazyQuantifierNode - -NFALazyQuantifierNode::NFALazyQuantifierNode(Pattern * pat, NFANode * internal, const int minMatch, const int maxMatch) - : NFAQuantifierNode(pat, internal, minMatch, maxMatch) { } -int NFALazyQuantifierNode::match(const bkstring & str, Matcher * matcher, const int curInd) const -{ - int i, j, m = NFAQuantifierNode::match(str, matcher, curInd); - - if (m == -1) return -1; - - for (i = min; i < max; ++i) - { - j = next->match(str, matcher, m); - if (j == -1) - { - j = inner->match(str, matcher, m); - // if j < m, then j is -1, so we bail. - // if j == m, then we would just go and call next->match on the same index, - // but it already failed trying to match right there, so we know we can - // just bail - if (j <= m) return -1; - m = j; - } - else return j; - } - return next->match(str, matcher, m); -} - -// NFAPossessiveQuantifierNode - -NFAPossessiveQuantifierNode::NFAPossessiveQuantifierNode(Pattern * pat, NFANode * internal, const int minMatch, const int maxMatch) - : NFAQuantifierNode(pat, internal, minMatch, maxMatch) { } -int NFAPossessiveQuantifierNode::match(const bkstring & str, Matcher * matcher, const int curInd) const -{ - int i, j, m = NFAQuantifierNode::match(str, matcher, curInd); - - if (m == -1) return -1; - for (i = min; i < max; ++i) - { - j = inner->match(str, matcher, m); - if (j <= m) return next->match(str, matcher, m); - m = j; - } - return next->match(str, matcher, m); -} - -// NFAAcceptNode - -NFAAcceptNode::NFAAcceptNode() { } -int NFAAcceptNode::match(const bkstring & str, Matcher * matcher, const int curInd) const -{ - if (!next) return curInd; - else return next->match(str, matcher, curInd); -} - -// NFAClassNode - -NFAClassNode::NFAClassNode(const bool invert) -{ - inv = invert; -} -NFAClassNode::NFAClassNode(const bkstring & clazz, const bool invert) -{ - inv = invert; - for (int i = 0; i < (int)clazz.size(); ++i) vals[clazz[i]] = 1; -} -int NFAClassNode::match(const bkstring & str, Matcher * matcher, const int curInd) const -{ - if (curInd < (int)str.size() && ((vals.find(str[curInd]) != vals.end()) ^ inv)) - { - return next->match(str, matcher, curInd + 1); - } - return -1; -} - -// NFACIClassNode - -NFACIClassNode::NFACIClassNode(const bool invert) -{ - inv = invert; -} -NFACIClassNode::NFACIClassNode(const bkstring & clazz, const bool invert) -{ - inv = invert; - for (int i = 0; i < (int)clazz.size(); ++i) vals[to_lower(clazz[i])] = 1; -} -int NFACIClassNode::match(const bkstring & str, Matcher * matcher, const int curInd) const -{ - if (curInd < (int)str.size() && ((vals.find(to_lower(str[curInd])) != vals.end()) ^ inv)) - { - return next->match(str, matcher, curInd + 1); - } - return -1; -} - -// NFASubStartNode - -NFASubStartNode::NFASubStartNode() { } -int NFASubStartNode::match(const bkstring & str, Matcher * matcher, const int curInd) const -{ - return next->match(str, matcher, curInd); -} - -// NFAOrNode - -NFAOrNode::NFAOrNode(NFANode * first, NFANode * second) : one(first), two(second) { } -void NFAOrNode::findAllNodes(std::map & soFar) -{ - if (one) one->findAllNodes(soFar); - if (two) two->findAllNodes(soFar); - NFANode::findAllNodes(soFar); -} -int NFAOrNode::match(const bkstring & str, Matcher * matcher, const int curInd) const -{ - int ci = one->match(str, matcher, curInd); - - if (ci != -1) ci = next->match(str, matcher, ci); - if (ci != -1) return ci; - if (ci == -1) ci = two->match(str, matcher, curInd); - if (ci != -1) ci = next->match(str, matcher, ci); - return ci; -} - -// NFAQuoteNode - -NFAQuoteNode::NFAQuoteNode(const bkstring & quoted) : qStr(quoted) { } -int NFAQuoteNode::match(const bkstring & str, Matcher * matcher, const int curInd) const -{ - if (curInd + qStr.size() > str.size()) return -1; - if (str.substr(curInd, qStr.size()) != qStr) return -1; - return next->match(str, matcher, curInd + qStr.size()); -} - -// NFACIQuoteNode - -NFACIQuoteNode::NFACIQuoteNode(const bkstring & quoted) : qStr(quoted) { } -int NFACIQuoteNode::match(const bkstring & str, Matcher * matcher, const int curInd) const -{ - if (curInd + qStr.size() > str.size()) return -1; - if (str_icmp(str.substr(curInd, qStr.size()).c_str(), qStr.c_str())) return -1; - return next->match(str, matcher, qStr.size()); -} - -// NFALookAheadNode - -NFALookAheadNode::NFALookAheadNode(NFANode * internal, const bool positive) : NFANode(), pos(positive), inner(internal) { } -void NFALookAheadNode::findAllNodes(std::map & soFar) -{ - if (inner) inner->findAllNodes(soFar); - NFANode::findAllNodes(soFar); -} -int NFALookAheadNode::match(const bkstring & str, Matcher * matcher, const int curInd) const -{ - return ((inner->match(str, matcher, curInd) == -1) ^ pos) ? next->match(str, matcher, curInd) : -1; -} - -// NFALookBehindNode - -NFALookBehindNode::NFALookBehindNode(const bkstring & str, const bool positive) : pos(positive), mStr(str) { } -int NFALookBehindNode::match(const bkstring & str, Matcher * matcher, const int curInd) const -{ - if (pos) - { - if (curInd < (int)mStr.size()) return -1; - if (str.substr(curInd - mStr.size(), mStr.size()) == mStr) return next->match(str, matcher, curInd); - } - else - { - if (curInd < (int)mStr.size()) return next->match(str, matcher, curInd); - if (str.substr(curInd - mStr.size(), mStr.size()) == mStr) return -1; - return next->match(str, matcher, curInd); - } - return -1; -} - -// NFAStartOfLineNode - -NFAStartOfLineNode::NFAStartOfLineNode() { } -int NFAStartOfLineNode::match(const bkstring & str, Matcher * matcher, const int curInd) const -{ - if (curInd == 0 || str[curInd - 1] == '\n' || str[curInd - 1] == '\r') - { - return next->match(str, matcher, curInd); - } - return -1; -} - -// NFAEndOfLineNode - -NFAEndOfLineNode::NFAEndOfLineNode() { } -int NFAEndOfLineNode::match(const bkstring & str, Matcher * matcher, const int curInd) const -{ - if (curInd >= (int)str.size() || str[curInd] == '\n' || str[curInd] == '\r') - { - return next->match(str, matcher, curInd); - } - return -1; -} - -// NFAReferenceNode - -NFAReferenceNode::NFAReferenceNode(const int groupIndex) : gi(groupIndex) { } -int NFAReferenceNode::match(const bkstring & str, Matcher * matcher, const int curInd) const -{ - int len = matcher->ends[gi] - matcher->starts[gi]; - int ni = -1; - if (gi < 1 || matcher->ends[gi] < matcher->starts[gi] || len == 0) ni = curInd; - else if (curInd + len > (int)str.size()) return -1; - else if (str.substr(curInd, len) != str.substr(matcher->starts[gi], len)) return -1; - else ni = curInd + len; - - return next->match(str, matcher, ni); -} - -// NFAStartOfInputNode - -NFAStartOfInputNode::NFAStartOfInputNode() { } -int NFAStartOfInputNode::match(const bkstring & str, Matcher * matcher, const int curInd) const -{ - if (curInd == 0) return next->match(str, matcher, curInd); - return -1; -} - -// NFAEndOfInputNode - -NFAEndOfInputNode::NFAEndOfInputNode(const bool lookForTerm) : term(lookForTerm) { } -int NFAEndOfInputNode::match(const bkstring & str, Matcher * matcher, const int curInd) const -{ - int len = (int)str.size(); - if (curInd == len) return next->match(str, matcher, curInd); - else if (term) - { - if (curInd == len - 1 && (str[curInd] == '\r' || str[curInd] == '\n')) - { - return next->match(str, matcher, curInd); - } - else if (curInd == len - 2 && str.substr(curInd, 2) == "\r\n") - { - return next->match(str, matcher, curInd); - } - } - return -1; -} - -// NFAWordBoundaryNode - -NFAWordBoundaryNode::NFAWordBoundaryNode(const bool positive) : pos(positive) { } -int NFAWordBoundaryNode::match(const bkstring & str, Matcher * matcher, const int curInd) const -{ - int len = (int)str.size(); - - char c1 = (curInd - 1 < len && curInd > 0) ? str[curInd - 1] : '\n'; - char c2 = (curInd < len) ? str[curInd ] : '\n'; - - if (curInd == len) return next->match(str, matcher, curInd); - bool ok = is_alpha(c1) != is_alpha(c2); - if (ok && pos) return next->match(str, matcher, curInd); - return -1; -} - -// NFAEndOfMatchNode - -NFAEndOfMatchNode::NFAEndOfMatchNode() { } -int NFAEndOfMatchNode::match(const bkstring & str, Matcher * matcher, const int curInd) const -{ - if (curInd == matcher->lm) return next->match(str, matcher, curInd); - return -1; -} - -// NFAGroupHeadNode - -NFAGroupHeadNode::NFAGroupHeadNode(const int groupIndex) : gi(groupIndex) { } -int NFAGroupHeadNode::match(const bkstring & str, Matcher * matcher, const int curInd) const -{ - int ret, o = matcher->starts[gi]; - - matcher->starts[gi] = curInd; - ret = next->match(str, matcher, curInd); - if (ret < 0) matcher->starts[gi] = o; - - return ret; -} - -// NFAGroupTailNode - -NFAGroupTailNode::NFAGroupTailNode(const int groupIndex) : gi(groupIndex) { } -int NFAGroupTailNode::match(const bkstring & str, Matcher * matcher, const int curInd) const -{ - int ret, o = matcher->ends[gi]; - - matcher->ends[gi] = curInd; - ret = next->match(str, matcher, curInd); - if (ret < 0) matcher->ends[gi] = o; - - return ret; -} - -// NFAGroupLoopPrologueNode - -NFAGroupLoopPrologueNode::NFAGroupLoopPrologueNode(const int groupIndex) : gi(groupIndex) { } -int NFAGroupLoopPrologueNode::match(const bkstring & str, Matcher * matcher, const int curInd) const -{ - int ret, o1 = matcher->groups[gi], o2 = matcher->groupPos[gi], o3 = matcher->groupIndeces[gi]; - - matcher->groups[gi] = 0; - matcher->groupPos[gi] = 0; - matcher->groupIndeces[gi] = -1; - ret = next->match(str, matcher, curInd); - if (ret < 0) - { - matcher->groups[gi] = o1; - matcher->groupPos[gi] = o2; - matcher->groupIndeces[gi] = o3; - } - - return ret; -} - -// NFAGroupLoopNode - -NFAGroupLoopNode::NFAGroupLoopNode(NFANode * internal, const int minMatch, const int maxMatch, - const int groupIndex, const int matchType) -{ - inner = internal; - min = minMatch; - max = maxMatch; - gi = groupIndex; - type = matchType; -} -void NFAGroupLoopNode::findAllNodes(std::map & soFar) -{ - if (inner) inner->findAllNodes(soFar); - NFANode::findAllNodes(soFar); -} -int NFAGroupLoopNode::match(const bkstring & str, Matcher * matcher, const int curInd) const -{ - bool b = (curInd > matcher->groupIndeces[gi]); - - if (b && matcher->groups[gi] < min) - { - ++matcher->groups[gi]; - int o = matcher->groupIndeces[gi]; - matcher->groupIndeces[gi] = curInd; - int ret = inner->match(str, matcher, curInd); - if (ret < 0) - { - matcher->groupIndeces[gi] = o; - --matcher->groups[gi]; - } - return ret; - } - else if (!b || matcher->groups[gi] >= max) - { - return next->match(str, matcher, curInd); - } - else - { - switch (type) - { - case 0: return matchGreedy(str, matcher, curInd); - case 1: return matchLazy(str, matcher, curInd); - case 2: return matchPossessive(str, matcher, curInd); - } - } - return -1; -} -int NFAGroupLoopNode::matchGreedy(const bkstring & str, Matcher * matcher, const int curInd) const -{ - int o = matcher->groupIndeces[gi]; // save our info for backtracking - matcher->groupIndeces[gi] = curInd; // move along - ++matcher->groups[gi]; - int ret = inner->match(str, matcher, curInd); // match internally - if (ret < 0) - { // if we failed, then restore info and match next - --matcher->groups[gi]; - matcher->groupIndeces[gi] = o; - ret = next->match(str, matcher, curInd); - } - return ret; -} -int NFAGroupLoopNode::matchLazy(const bkstring & str, Matcher * matcher, const int curInd) const -{ - int ret = next->match(str, matcher, curInd); // be lazy, just go on - if (ret < 0) - { - int o = matcher->groupIndeces[gi]; // save info for backtracking - matcher->groupIndeces[gi] = curInd; // advance our position - ++matcher->groups[gi]; - ret = inner->match(str, matcher, curInd); // match our internal stuff - if (ret < 0) // if we failed, then restore the info - { - --matcher->groups[gi]; - matcher->groupIndeces[gi] = o; - } - } - return ret; -} -int NFAGroupLoopNode::matchPossessive(const bkstring & str, Matcher * matcher, const int curInd) const -{ - int o = matcher->groupIndeces[gi]; // save info for backtracking - matcher->groupPos[gi] = matcher->groups[gi]; // set a flag stating we have matcher at least this much - matcher->groupIndeces[gi] = curInd; // move along - ++matcher->groups[gi]; - int ret = inner->match(str, matcher, curInd); // try and match again - if (ret < 0) - { // if we fail, back off, but to an extent - --matcher->groups[gi]; - matcher->groupIndeces[gi] = o; - if (matcher->groups[gi] == matcher->groupPos[gi]) ret = next->match(str, matcher, curInd); - } - return ret; -} - -#ifdef _WIN32 - #pragma warning(pop) -#endif diff --git a/plugins/SmileyAdd/regexp/Pattern.h b/plugins/SmileyAdd/regexp/Pattern.h deleted file mode 100644 index bb16ad90fa..0000000000 --- a/plugins/SmileyAdd/regexp/Pattern.h +++ /dev/null @@ -1,1663 +0,0 @@ -#ifndef __PATTERN_H__ -#define __PATTERN_H__ - -#ifdef _WIN32 - #pragma warning(disable:4786) -#endif - -#include -#include - -#include "bkstring.h" - -class Matcher; -class NFANode; -class NFAQuantifierNode; - -/** - This pattern class is very similar in functionality to Java's - java.util.regex.Pattern class. The pattern class represents an immutable - regular expression object. Instead of having a single object contain both the - regular expression object and the matching object, instead the two objects are - split apart. The {@link Matcher Matcher} class represents the maching - object. - - The Pattern class works primarily off of "compiled" patterns. A typical - instantiation of a regular expression looks like: - -

-  Pattern * p = Pattern::compile("a*b");
-  Matcher * m = p->createMatcher("aaaaaab");
-  if (m->matches()) ...
-  
- - However, if you do not need to use a pattern more than once, it is often times - okay to use the Pattern's static methods insteads. An example looks like this: - -
-  if (Pattern::matches("a*b", "aaaab")) { ... }
-  
- - This class does not currently support unicode. The unicode update for this - class is coming soon. - - This class is partially immutable. It is completely safe to call createMatcher - concurrently in different threads, but the other functions (e.g. split) should - not be called concurrently on the same Pattern. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- Construct - - Matches - -
-   -
- Characters -
- x - - The character x -
- \\ - - The character \ -
- \0nn - - The character with octal ASCII value nn -
- \0nnn - - The character with octal ASCII value nnn -
- \xhh - - The character with hexadecimal ASCII value hh -
- \t - - A tab character -
- \r - - A carriage return character -
- \n - - A new-line character -
-   -
- Character Classes -
- [abc] - - Either a, b, or c -
- [^abc] - - Any character but a, b, or c -
- [a-zA-Z] - - Any character ranging from a thru z, or - A thru Z -
- [^a-zA-Z] - - Any character except those ranging from a thru - z, or A thru Z -
- [a\-z] - - Either a, -, or z -
- [a-z[A-Z]] - - Same as [a-zA-Z] -
- [a-z&&[g-i]] - - Any character in the intersection of a-z and - g-i -
- [a-z&&[^g-i]] - - Any character in a-z and not in g-i -
-   -
- Prefefined character classes -
- . - - Any character. Multiline matching must be compiled into the pattern for - . to match a \r or a \n. - Even if multiline matching is enabled, . will not - match a \r\n, only a \r or a \n. -
- \d - - [0-9] -
- \D - - [^\d] -
- \s - - [ \t\r\n\x0B] -
- \S - - [^\s] -
- \w - - [a-zA-Z0-9_] -
- \W - - [^\w] -
-   -
- POSIX character classes -
- \p{Lower} - - [a-z] -
- \p{Upper} - - [A-Z] -
- \p{ASCII} - - [\x00-\x7F] -
- \p{Alpha} - - [a-zA-Z] -
- \p{Digit} - - [0-9] -
- \p{Alnum} - - [\w&&[^_]] -
- \p{Punct} - - [!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~] -
- \p{XDigit} - - [a-fA-F0-9] -
-   -
- Boundary Matches -
- ^ - - The beginning of a line. Also matches the beginning of input. -
- $ - - The end of a line. Also matches the end of input. -
- \b - - A word boundary -
- \B - - A non word boundary -
- \A - - The beginning of input -
- \G - - The end of the previous match. Ensures that a "next" match will only - happen if it begins with the character immediately following the end of - the "current" match. -
- \Z - - The end of input. Will also match if there is a single trailing - \r\n, a single trailing \r, or a single - trailing \n. -
- \z - - The end of input -
-   -
- Greedy Quantifiers -
- x? - - x, either zero times or one time -
- x* - - x, zero or more times -
- x+ - - x, one or more times -
- x{n} - - x, exactly n times -
- x{n,} - - x, at least n times -
- x{,m} - - x, at most m times -
- x{n,m} - - x, at least n times and at most - m times -
-   -
- Possessive Quantifiers -
- x?+ - - x, either zero times or one time -
- x*+ - - x, zero or more times -
- x++ - - x, one or more times -
- x{n}+ - - x, exactly n times -
- x{n,}+ - - x, at least n times -
- x{,m}+ - - x, at most m times -
- x{n,m}+ - - x, at least n times and at most - m times -
-   -
- Reluctant Quantifiers -
- x?? - - x, either zero times or one time -
- x*? - - x, zero or more times -
- x+? - - x, one or more times -
- x{n}? - - x, exactly n times -
- x{n,}? - - x, at least n times -
- x{,m}? - - x, at most m times -
- x{n,m}? - - x, at least n times and at most - m times -
-   -
- Operators -
- xy - - x then y -
- x|y - - x or y -
- (x) - - x as a capturing group -
-   -
- Quoting -
- \Q - - Nothing, but treat every character (including \s) literally until a - matching \E -
- \E - - Nothing, but ends its matching \Q -
-   -
- Special Constructs -
- (?:x) - - x, but not as a capturing group -
- (?=x) - - x, via positive lookahead. This means that the - expression will match only if it is trailed by x. - It will not "eat" any of the characters matched by - x. -
- (?!x) - - x, via negative lookahead. This means that the - expression will match only if it is not trailed by - x. It will not "eat" any of the characters - matched by x. -
- (?<=x) - - x, via positive lookbehind. x - cannot contain any quantifiers. -
- (?x) - - x, via negative lookbehind. x - cannot contain any quantifiers. -
- (?>x) - - x{1}+ -
-   -
- Registered Expression Matching -
- {x} - - The registered pattern x -
- -
- - Begin Text Extracted And Modified From java.util.regex.Pattern documentation - -

Backslashes, escapes, and quoting

- -

The backslash character ('\') serves to introduce escaped - constructs, as defined in the table above, as well as to quote characters - that otherwise would be interpreted as unescaped constructs. Thus the - expression \\ matches a single backslash and \{ matches a - left brace. - -

It is an error to use a backslash prior to any alphabetic character that - does not denote an escaped construct; these are reserved for future - extensions to the regular-expression language. A backslash may be used - prior to a non-alphabetic character regardless of whether that character is - part of an unescaped construct. - -

It is necessary to double backslashes in string literals that represent - regular expressions to protect them from interpretation by a compiler. The - string literal "\b", for example, matches a single backspace - character when interpreted as a regular expression, while - "\\b" matches a word boundary. The string litera - "\(hello\)" is illegal and leads to a compile-time error; - in order to match the string (hello) the string literal - "\\(hello\\)" must be used. - -

Character Classes

- -

Character classes may appear within other character classes, and - may be composed by the union operator (implicit) and the intersection - operator (&&). - The union operator denotes a class that contains every character that is - in at least one of its operand classes. The intersection operator - denotes a class that contains every character that is in both of its - operand classes. - -

The precedence of character-class operators is as follows, from - highest to lowest: - -

- - - - - - - - - - - - - - - - -
1    Literal escape    \x
2    Rangea-z
3    Grouping[...]
4    Intersection[a-z&&[aeiou]]
5    Union[a-e][i-u]
- -

Note that a different set of metacharacters are in effect inside - a character class than outside a character class. For instance, the - regular expression . loses its special meaning inside a - character class, while the expression - becomes a range - forming metacharacter. - - - - -

Groups and capturing

- -

Capturing groups are numbered by counting their opening parentheses from - left to right. In the expression ((A)(B(C))), for example, there - are four such groups:

- -
- - - - - - - - - - -
1    ((A)(B(C)))
2    (A)
3    (B(C))
4    (C)
- -

Group zero always stands for the entire expression. - -

Capturing groups are so named because, during a match, each subsequence - of the input sequence that matches such a group is saved. The captured - subsequence may be used later in the expression, via a back reference, and - may also be retrieved from the matcher once the match operation is complete. - -

The captured input associated with a group is always the subsequence - that the group most recently matched. If a group is evaluated a second time - because of quantification then its previously-captured value, if any, will - be retained if the second evaluation fails. Matching the string - "aba" against the expression (a(b)?)+, for example, leaves - group two set to "b". All captured input is discarded at the - beginning of each match. - -

Groups beginning with (? are pure, non-capturing groups - that do not capture text and do not count towards the group total. - - -

Unicode support

- -

Coming Soon. - -

Comparison to Perl 5

- -

The Pattern engine performs traditional NFA-based matching - with ordered alternation as occurs in Perl 5. - -

Perl constructs not supported by this class:

- -
    - -
  • The conditional constructs (?{X}) and - (?(condition)X|Y), -

  • - -
  • The embedded code constructs (?{code}) - and (??{code}),

  • - -
  • The embedded comment syntax (?#comment), and

  • - -
  • The preprocessing operations \l \u, - \L, and \U.

  • - -
  • Embedded flags

  • - -
- -

Constructs supported by this class but not by Perl:

- -
    - -
  • Possessive quantifiers, which greedily match as much as they can - and do not back off, even when doing so would allow the overall match to - succeed.

  • - -
  • Character-class union and intersection as described - above.

  • - -
- -

Notable differences from Perl:

- -
    - -
  • In Perl, \1 through \9 are always interpreted - as back references; a backslash-escaped number greater than 9 is - treated as a back reference if at least that many subexpressions exist, - otherwise it is interpreted, if possible, as an octal escape. In this - class octal escapes must always begin with a zero. In this class, - \1 through \9 are always interpreted as back - references, and a larger number is accepted as a back reference if at - least that many subexpressions exist at that point in the regular - expression, otherwise the parser will drop digits until the number is - smaller or equal to the existing number of groups or it is one digit. -

  • - -
  • Perl uses the g flag to request a match that resumes - where the last match left off. This functionality is provided implicitly - by the Matcher class: Repeated invocations of the - find method will resume where the last match left off, - unless the matcher is reset.

  • - -
  • Perl is forgiving about malformed matching constructs, as in the - expression *a, as well as dangling brackets, as in the - expression abc], and treats them as literals. This - class also strict and will not compile a pattern when dangling characters - are encountered.

  • - -
- - -

For a more precise description of the behavior of regular expression - constructs, please see - Mastering Regular Expressions, 2nd Edition, Jeffrey E. F. Friedl, - O'Reilly and Associates, 2002. -

-

- - End Text Extracted And Modified From java.util.regex.Pattern documentation - -


- - @author Jeffery Stuart - @since March 2003, Stable Since November 2004 - @version 1.07.00 - @memo A class used to represent "PERL 5"-ish regular expressions - */ -class Pattern -{ - friend class Matcher; - friend class NFANode; - friend class NFAQuantifierNode; - private: - /** - This constructor should not be called directly. Those wishing to use the - Pattern class should instead use the {@link compile compile} method. - - @param rhs The pattern to compile - @memo Creates a new pattern from the regular expression in rhs. - */ - Pattern(const bkstring & rhs); - protected: - /** - This currently is not used, so don't try to do anything with it. - @memo Holds all the compiled patterns for quick access. - */ - static std::map compiledPatterns; - /** - Holds all of the registered patterns as strings. Due to certain problems - with compilation of patterns, especially with capturing groups, this seemed - to be the best way to do it. - */ - static std::map > registeredPatterns; - protected: - /** - Holds all the NFA nodes used. This makes deletion of a pattern, as well as - clean-up from an unsuccessful compile much easier and faster. - */ - std::map nodes; - /** - Used when methods like split are called. The matcher class uses a lot of - dynamic memeory, so having an instance increases speedup of certain - operations. - */ - Matcher * matcher; - /** - The front node of the NFA. - */ - NFANode * head; - /** - The actual regular expression we rerpesent - */ - bkstring pattern; - /** - Flag used during compilation. Once the pattern is successfully compiled, - error is no longer used. - */ - bool error; - /** - Used during compilation to keep track of the current index into - {@link pattern pattern}. Once the pattern is successfully - compiled, error is no longer used. - */ - int curInd; - /** - The number of capture groups this contains. - */ - int groupCount; - /** - The number of non-capture groups this contains. - */ - int nonCapGroupCount; - /** - The flags specified when this was compiled. - */ - unsigned long flags; - protected: - /** - Raises an error during compilation. Compilation will cease at that point - and compile will return NULL. - */ - void raiseError(); - /** - Convenience function for registering a node in nodes. - @param node The node to register - @return The registered node - */ - NFANode * registerNode(NFANode * node); - - /** - Calculates the union of two strings. This function will first sort the - strings and then use a simple selection algorithm to find the union. - @param s1 The first "class" to union - @param s2 The second "class" to union - @return A new string containing all unique characters. Each character - must have appeared in one or both of s1 and - s2. - */ - bkstring classUnion (bkstring s1, bkstring s2) const; - /** - Calculates the intersection of two strings. This function will first sort - the strings and then use a simple selection algorithm to find the - intersection. - @param s1 The first "class" to intersect - @param s2 The second "class" to intersect - @return A new string containing all unique characters. Each character - must have appeared both s1 and s2. - */ - bkstring classIntersect (bkstring s1, bkstring s2) const; - /** - Calculates the negation of a string. The negation is the set of all - characters between \x00 and \xFF not - contained in s1. - @param s1 The "class" to be negated. - @param s2 The second "class" to intersect - @return A new string containing all unique characters. Each character - must have appeared both s1 and s2. - */ - bkstring classNegate (bkstring s1) const; - /** - Creates a new "class" representing the range from low thru - hi. This function will wrap if low > - hi. This is a feature, not a buf. Sometimes it is useful - to be able to say [\x70-\x10] instead of [\x70-\x7F\x00-\x10]. - @param low The beginning character - @param hi The ending character - @return A new string containing all the characters from low thru hi. - */ - bkstring classCreateRange(char low, char hi) const; - - /** - Extracts a decimal number from the substring of member-variable - {@link pattern pattern} starting at start and - ending at end. - @param start The starting index in {@link pattern pattern} - @param end The last index in {@link pattern pattern} - @return The decimal number in {@link pattern pattern} - */ - int getInt(int start, int end); - /** - Parses a {n,m} string out of the member-variable - {@link pattern pattern} stores the result in sNum - and eNum. - @param sNum Output parameter. The minimum number of matches required - by the curly quantifier are stored here. - @param eNum Output parameter. The maximum number of matches allowed - by the curly quantifier are stored here. - @return Success/Failure. Fails when the curly does not have the proper - syntax - */ - bool quantifyCurly(int & sNum, int & eNum); - /** - Tries to quantify the currently parsed group. If the group being parsed - is indeed quantified in the member-variable - {@link pattern pattern}, then the NFA is modified accordingly. - @param start The starting node of the current group being parsed - @param stop The ending node of the current group being parsed - @param gn The group number of the current group being parsed - @return The node representing the starting node of the group. If the - group becomes quantified, then this node is not necessarily - a GroupHead node. - */ - NFANode * quantifyGroup(NFANode * start, NFANode * stop, const int gn); - - /** - Tries to quantify the last parsed expression. If the character was indeed - quantified, then the NFA is modified accordingly. - @param newNode The recently created expression node - @return The node representing the last parsed expression. If the - expression was quantified, return value != newNode - */ - NFANode * quantify(NFANode * newNode); - /** - Parses the current class being examined in - {@link pattern pattern}. - @return A string of unique characters contained in the current class being - parsed - */ - bkstring parseClass(); - /** - Parses the current POSIX class being examined in - {@link pattern pattern}. - @return A string of unique characters representing the POSIX class being - parsed - */ - bkstring parsePosix(); - /** - Returns a string containing the octal character being parsed - @return The string contained the octal value being parsed - */ - bkstring parseOctal(); - /** - Returns a string containing the hex character being parsed - @return The string contained the hex value being parsed - */ - bkstring parseHex(); - /** - Returns a new node representing the back reference being parsed - @return The new node representing the back reference being parsed - */ - NFANode * parseBackref(); - /** - Parses the escape sequence currently being examined. Determines if the - escape sequence is a class, a single character, or the beginning of a - quotation sequence. - @param inv Output parameter. Whether or not to invert the returned class - @param quo Output parameter. Whether or not this sequence starts a - quotation. - @return The characters represented by the class - */ - bkstring parseEscape(bool & inv, bool & quo); - /** - Parses a supposed registered pattern currently under compilation. If the - sequence of characters does point to a registered pattern, then the - registered pattern is appended to *end. The registered pattern - is parsed with the current compilation flags. - @param end The ending node of the thus-far compiled pattern - @return The new end node of the current pattern - */ - NFANode * parseRegisteredPattern(NFANode ** end); - /** - Parses a lookbehind expression. Appends the necessary nodes - *end. - @param pos Positive or negative look behind - @param end The ending node of the current pattern - @return The new end node of the current pattern - */ - NFANode * parseBehind(const bool pos, NFANode ** end); - /** - Parses the current expression and tacks on nodes until a \E is found. - @return The end of the current pattern - */ - NFANode * parseQuote(); - /** - Parses {@link pattern pattern}. This function is called - recursively when an or (|) or a group is encountered. - @param inParen Are we currently parsing inside a group - @param inOr Are we currently parsing one side of an or (|) - @param end The end of the current expression - @return The starting node of the NFA constructed from this parse - */ - NFANode * parse(const bool inParen = 0, const bool inOr = 0, NFANode ** end = NULL); - public: - /// We should match regardless of case - const static unsigned long CASE_INSENSITIVE; - /// We are implicitly quoted - const static unsigned long LITERAL; - /// @memo We should treat a . as [\x00-\x7F] - const static unsigned long DOT_MATCHES_ALL; - /** ^ and $ should anchor to the beginning and - ending of lines, not all input - */ - const static unsigned long MULTILINE_MATCHING; - /** When enabled, only instances of \n are recognized as - line terminators - */ - const static unsigned long UNIX_LINE_MODE; - /// The absolute minimum number of matches a quantifier can match (0) - const static int MIN_QMATCH; - /// The absolute maximum number of matches a quantifier can match (0x7FFFFFFF) - const static int MAX_QMATCH; - public: - /** - Call this function to compile a regular expression into a - Pattern object. Special values can be assigned to - mode when certain non-standard behaviors are expected from - the Pattern object. - @param pattern The regular expression to compile - @param mode A bitwise or of flags signalling what special behaviors are - wanted from this Pattern object - @return If successful, compile returns a Pattern - pointer. Upon failure, compile returns - NULL - */ - static Pattern * compile (const bkstring & pattern, - const unsigned long mode = 0); - /** - Dont use this function. This function will compile a pattern, and cache - the result. This will eventually be used as an optimization when people - just want to call static methods using the same pattern over and over - instead of first compiling the pattern and then using the compiled - instance for matching. - @param pattern The regular expression to compile - @param mode A bitwise or of flags signalling what special behaviors are - wanted from this Pattern object - @return If successful, compileAndKeep returns a - Pattern pointer. Upon failure, compile - returns NULL. - */ - static Pattern * compileAndKeep (const bkstring & pattern, - const unsigned long mode = 0); - - /** - Searches through replace and replaces all substrings matched - by pattern with str. str may - contain backreferences (e.g. \1) to capture groups. A typical - invocation looks like: -

- - Pattern::replace("(a+)b(c+)", "abcccbbabcbabc", "\\2b\\1"); - -

- which would replace abcccbbabcbabc with - cccbabbcbabcba. - @param pattern The regular expression - @param str The replacement text - @param replacementText The string in which to perform replacements - @param mode The special mode requested of the Pattern - during the replacement process - @return The text with the replacement string substituted where necessary - */ - static bkstring replace (const bkstring & pattern, - const bkstring & str, - const bkstring & replacementText, - const unsigned long mode = 0); - - /** - Splits the specified string over occurrences of the specified pattern. - Empty strings can be optionally ignored. The number of strings returned is - configurable. A typical invocation looks like: -

- - bkstring str(strSize, '\0');
- FILE * fp = fopen(fileName, "r");
- fread((char*)str.data(), strSize, 1, fp);
- fclose(fp);
-
- std::vector<bkstring> lines = Pattern::split("[\r\n]+", str, true);
-
-
- - @param pattern The regular expression - @param replace The string to split - @param keepEmptys Whether or not to keep empty strings - @param limit The maximum number of splits to make - @param mode The special mode requested of the Pattern - during the split process - @return All substrings of str split across pattern. - */ - static std::vector split (const bkstring & pattern, - const bkstring & str, - const bool keepEmptys = 0, - const unsigned long limit = 0, - const unsigned long mode = 0); - - /** - Finds all the instances of the specified pattern within the string. You - should be careful to only pass patterns with a minimum length of one. For - example, the pattern a* can be matched by an empty string, so - instead you should pass a+ since at least one character must - be matched. A typical invocation of findAll looks like: -

- - std::vector<td::string> numbers = Pattern::findAll("\\d+", string); - -

- - @param pattern The pattern for which to search - @param str The string to search - @param mode The special mode requested of the Pattern - during the find process - @return All instances of pattern in str - */ - static std::vector findAll (const bkstring & pattern, - const bkstring & str, - const unsigned long mode = 0); - - /** - Determines if an entire string matches the specified pattern - - @param pattern The pattern for to match - @param str The string to match - @param mode The special mode requested of the Pattern - during the replacement process - @return True if str is recognized by pattern - */ - static bool matches (const bkstring & pattern, - const bkstring & str, - const unsigned long mode = 0); - - /** - Registers a pattern under a specific name for use in later compilations. - A typical invocation and later use looks like: -

- - Pattern::registerPattern("ip", "(?:\\d{1,3}\\.){3}\\d{1,3}");
- Pattern * p1 = Pattern::compile("{ip}:\\d+");
- Pattern * p2 = Pattern::compile("Connection from ({ip}) on port \\d+");
-
-

- Multiple calls to registerPattern with the same - name will result in the pattern getting overwritten. - - @param name The name to give to the pattern - @param pattern The pattern to register - @param mode Any special flags to use when compiling pattern - @return Success/Failure. Fails only if pattern has invalid - syntax - */ - static bool registerPattern(const bkstring & name, - const bkstring & pattern, - const unsigned long mode = 0); - - /** - Clears the pattern registry - */ - static void unregisterPatterns(); - /** - Don't use - */ - static void clearPatternCache(); - - /** - Searches through a string for the nth match of the - given pattern in the string. Match indeces start at zero, not one. - A typical invocation looks like this: -

- - std::pair<bkstring, int> match = Pattern::findNthMatch("\\d{1,3}", "192.168.1.101:22", 1);
- printf("%s %i\n", match.first.c_str(), match.second);
-
- Output: 168 4
-
- - @param pattern The pattern for which to search - @param str The string to search - @param matchNum Which match to find - @param mode Any special flags to use during the matching process - @return A string and an integer. The string is the string matched. The - integer is the starting location of the matched string in - str. You can check for success/failure by making sure - that the integer returned is greater than or equal to zero. - */ - static std::pair findNthMatch (const bkstring & pattern, - const bkstring & str, - const int matchNum, - const unsigned long mode = 0); - public: - /** - Deletes all NFA nodes allocated during compilation - */ - ~Pattern(); - - bkstring replace (const bkstring & str, - const bkstring & replacementText); - std::vector split (const bkstring & str, const bool keepEmptys = 0, - const unsigned long limit = 0); - std::vector findAll (const bkstring & str); - bool matches (const bkstring & str); - /** - Returns the flags used during compilation of this pattern - @return The flags used during compilation of this pattern - */ - unsigned long getFlags () const; - /** - Returns the regular expression this pattern represents - @return The regular expression this pattern represents - */ - bkstring getPattern () const; - /** - Creates a matcher object using the specified string and this pattern. - @param str The string to match against - @return A new matcher using object using this pattern and the specified - string - */ - Matcher * createMatcher (const bkstring & str); -}; - -class NFANode -{ - friend class Matcher; - public: - NFANode * next; - NFANode(); - virtual ~NFANode(); - virtual void findAllNodes(std::map & soFar); - virtual int match(const bkstring & str, Matcher * matcher, const int curInd = 0) const = 0; - inline virtual bool isGroupHeadNode() const { return false; } - inline virtual bool isStartOfInputNode() const { return false; } -}; -class NFACharNode : public NFANode -{ - protected: - char ch; - public: - NFACharNode(const char c); - virtual int match(const bkstring & str, Matcher * matcher, const int curInd = 0) const; -}; -class NFACICharNode : public NFANode -{ - protected: - char ch; - public: - NFACICharNode(const char c); - virtual int match(const bkstring & str, Matcher * matcher, const int curInd = 0) const; -}; -class NFAStartNode : public NFANode -{ - public: - NFAStartNode(); - virtual int match(const bkstring & str, Matcher * matcher, const int curInd = 0) const; -}; -class NFAEndNode : public NFANode -{ - public: - NFAEndNode(); - virtual int match(const bkstring & str, Matcher * matcher, const int curInd = 0) const; -}; -class NFAQuantifierNode : public NFANode -{ - public: - int min, max; - NFANode * inner; - virtual void findAllNodes(std::map & soFar); - NFAQuantifierNode(Pattern * pat, NFANode * internal, - const int minMatch = Pattern::MIN_QMATCH, - const int maxMatch = Pattern::MAX_QMATCH); - virtual int match(const bkstring & str, Matcher * matcher, const int curInd = 0) const; -}; -class NFAGreedyQuantifierNode : public NFAQuantifierNode -{ - public: - NFAGreedyQuantifierNode(Pattern * pat, NFANode * internal, - const int minMatch = Pattern::MIN_QMATCH, - const int maxMatch = Pattern::MAX_QMATCH); - virtual int match(const bkstring & str, Matcher * matcher, const int curInd = 0) const; - virtual int matchInternal(const bkstring & str, Matcher * matcher, const int curInd, const int soFar) const; -}; -class NFALazyQuantifierNode : public NFAQuantifierNode -{ - public: - NFALazyQuantifierNode(Pattern * pat, NFANode * internal, - const int minMatch = Pattern::MIN_QMATCH, - const int maxMatch = Pattern::MAX_QMATCH); - virtual int match(const bkstring & str, Matcher * matcher, const int curInd = 0) const; -}; -class NFAPossessiveQuantifierNode : public NFAQuantifierNode -{ - public: - NFAPossessiveQuantifierNode(Pattern * pat, NFANode * internal, - const int minMatch = Pattern::MIN_QMATCH, - const int maxMatch = Pattern::MAX_QMATCH); - virtual int match(const bkstring & str, Matcher * matcher, const int curInd = 0) const; -}; -class NFAAcceptNode : public NFANode -{ - public: - NFAAcceptNode(); - virtual int match(const bkstring & str, Matcher * matcher, const int curInd = 0) const; -}; -class NFAClassNode : public NFANode -{ - public: - bool inv; - std::map vals; - NFAClassNode(const bool invert = 0); - NFAClassNode(const bkstring & clazz, const bool invert); - virtual int match(const bkstring & str, Matcher * matcher, const int curInd = 0) const; -}; -class NFACIClassNode : public NFANode -{ - public: - bool inv; - std::map vals; - NFACIClassNode(const bool invert = 0); - NFACIClassNode(const bkstring & clazz, const bool invert); - virtual int match(const bkstring & str, Matcher * matcher, const int curInd = 0) const; -}; -class NFASubStartNode : public NFANode -{ - public: - NFASubStartNode(); - virtual int match(const bkstring & str, Matcher * matcher, const int curInd = 0) const; -}; -class NFAOrNode : public NFANode -{ - public: - NFANode * one; - NFANode * two; - NFAOrNode(NFANode * first, NFANode * second); - virtual void findAllNodes(std::map & soFar); - virtual int match(const bkstring & str, Matcher * matcher, const int curInd = 0) const; -}; -class NFAQuoteNode : public NFANode -{ - public: - bkstring qStr; - NFAQuoteNode(const bkstring & quoted); - virtual int match(const bkstring & str, Matcher * matcher, const int curInd = 0) const; -}; -class NFACIQuoteNode : public NFANode -{ - public: - bkstring qStr; - NFACIQuoteNode(const bkstring & quoted); - virtual int match(const bkstring & str, Matcher * matcher, const int curInd = 0) const; -}; -class NFALookAheadNode : public NFANode -{ - public: - bool pos; - NFANode * inner; - NFALookAheadNode(NFANode * internal, const bool positive); - virtual void findAllNodes(std::map & soFar); - virtual int match(const bkstring & str, Matcher * matcher, const int curInd = 0) const; -}; -class NFALookBehindNode : public NFANode -{ - public: - bool pos; - bkstring mStr; - NFALookBehindNode(const bkstring & str, const bool positive); - virtual int match(const bkstring & str, Matcher * matcher, const int curInd = 0) const; -}; -class NFAStartOfLineNode : public NFANode -{ - public: - NFAStartOfLineNode(); - virtual int match(const bkstring & str, Matcher * matcher, const int curInd = 0) const; -}; -class NFAEndOfLineNode : public NFANode -{ - public: - NFAEndOfLineNode(); - virtual int match(const bkstring & str, Matcher * matcher, const int curInd = 0) const; -}; -class NFAReferenceNode : public NFANode -{ - public: - int gi; - NFAReferenceNode(const int groupIndex); - virtual int match(const bkstring & str, Matcher * matcher, const int curInd = 0) const; -}; -class NFAStartOfInputNode : public NFANode -{ - public: - NFAStartOfInputNode(); - virtual int match(const bkstring & str, Matcher * matcher, const int curInd = 0) const; - inline virtual bool isStartOfInputNode() const { return true; } -}; -class NFAEndOfInputNode : public NFANode -{ - public: - bool term; - NFAEndOfInputNode(const bool lookForTerm); - virtual int match(const bkstring & str, Matcher * matcher, const int curInd = 0) const; -}; -class NFAWordBoundaryNode : public NFANode -{ - public: - bool pos; - NFAWordBoundaryNode(const bool positive); - virtual int match(const bkstring & str, Matcher * matcher, const int curInd = 0) const; -}; -class NFAEndOfMatchNode : public NFANode -{ - public: - NFAEndOfMatchNode(); - virtual int match(const bkstring & str, Matcher * matcher, const int curInd = 0) const; -}; -class NFAGroupHeadNode : public NFANode -{ - public: - int gi; - NFAGroupHeadNode(const int groupIndex); - virtual int match(const bkstring & str, Matcher * matcher, const int curInd = 0) const; - inline virtual bool isGroupHeadNode() const { return true; } -}; -class NFAGroupTailNode : public NFANode -{ - public: - int gi; - NFAGroupTailNode(const int groupIndex); - virtual int match(const bkstring & str, Matcher * matcher, const int curInd = 0) const; -}; -class NFAGroupLoopPrologueNode : public NFANode -{ - public: - int gi; - NFAGroupLoopPrologueNode(const int groupIndex); - virtual int match(const bkstring & str, Matcher * matcher, const int curInd = 0) const; -}; -class NFAGroupLoopNode : public NFANode -{ - public: - int gi, min, max, type; - NFANode * inner; - NFAGroupLoopNode(NFANode * internal, const int minMatch, - const int maxMatch, const int groupIndex, const int matchType); - virtual void findAllNodes(std::map & soFar); - virtual int match(const bkstring & str, Matcher * matcher, const int curInd = 0) const; - int matchGreedy(const bkstring & str, Matcher * matcher, const int curInd = 0) const; - int matchLazy(const bkstring & str, Matcher * matcher, const int curInd = 0) const; - int matchPossessive(const bkstring & str, Matcher * matcher, const int curInd = 0) const; -}; - -#endif - diff --git a/plugins/SmileyAdd/regexp/WCMatcher.cpp b/plugins/SmileyAdd/regexp/WCMatcher.cpp deleted file mode 100644 index bed5a1944b..0000000000 --- a/plugins/SmileyAdd/regexp/WCMatcher.cpp +++ /dev/null @@ -1,181 +0,0 @@ -#include "WCMatcher.h" -#include "WCPattern.h" - -const int WCMatcher::MATCH_ENTIRE_STRING = 0x01; - -/* - Detailed documentation is provided in this class' header file - - @author Jeffery Stuart - @since November 2004 - @version 1.07.00 -*/ - -WCMatcher::WCMatcher(WCPattern * pattern, const bkstring & text) -{ - pat = pattern; - str = &text; - gc = pattern->groupCount; - ncgc = -pattern->nonCapGroupCount; - flags = 0; - matchedSomething = false; - starts = new int[gc + ncgc]; - ends = new int[gc + ncgc]; - groups = new int[gc + ncgc]; - groupPos = new int[gc + ncgc]; - groupIndeces = new int[gc + ncgc]; - starts = starts + ncgc; - ends = ends + ncgc; - groups = groups + ncgc; - groupPos = groupPos + ncgc; - groupIndeces = groupIndeces + ncgc; - for (int i = 0; i < gc; ++i) starts[i] = ends[i] = 0; -} -WCMatcher::~WCMatcher() -{ - delete [] (starts - ncgc); - delete [] (ends - ncgc); - delete [] (groups - ncgc); - delete [] (groupIndeces - ncgc); - delete [] (groupPos - ncgc); -} -void WCMatcher::clearGroups() -{ - int i; - lm = 0; - for (i = 0; i < gc; ++i) groups[i] = starts[i] = ends[i] = -1; - for (i = 1; i <= ncgc; ++i) groups[0 - i] = starts[0 - i] = ends[0 - i] = -1; -} -bkstring WCMatcher::replaceWithGroups(const bkstring & str) -{ - bkstring ret = L""; - - bkstring t = str; - while (t.size() > 0) - { - if (t[0] == (wchar_t)'\\') - { - t.erase(0, 1); - if (t.size() == 0) - { - ret += L"\\"; - } - else if (t[0] < (wchar_t)'0' || t[0] > (wchar_t)'9') - { - ret += t[0]; - t.erase(0, 1); - } - else - { - int gn = 0; - while (t.size() > 0 && t[0] >= (wchar_t)'0' && t[0] <= (wchar_t)'9') - { - gn = gn * 10 + (t[0] - (wchar_t)'0'); - t.erase(0, 1); - } - ret += getGroup(gn); - } - } - else - { - ret += t[0]; - t.erase(0, 1); - } - } - - return ret; -} -unsigned long WCMatcher::getFlags() const -{ - return flags; -} -const bkstring& WCMatcher::getText() const -{ - return *str; -} - -bool WCMatcher::matches() -{ - flags = MATCH_ENTIRE_STRING; - matchedSomething = false; - clearGroups(); - lm = 0; - return pat->head->match(*str, this, 0) == (int)str->size(); -} -bool WCMatcher::findFirstMatch() -{ - starts[0] = 0; - flags = 0; - clearGroups(); - start = 0; - lm = 0; - ends[0] = pat->head->match(*str, this, 0); - if (ends[0] >= 0) - { - matchedSomething = true; - return 1; - } - return 0; -} -bool WCMatcher::findNextMatch() -{ - int s = starts[0], e = ends[0]; - - if (!matchedSomething) return findFirstMatch(); - if (s == e) ++e; - flags = 0; - clearGroups(); - - starts[0] = e; - if (e >= (int)str->size()) return 0; - start = e; - lm = e; - ends[0] = pat->head->match(*str, this, e); - return ends[0] >= 0; -} -std::vector WCMatcher::findAll() -{ - std::vector ret; - reset(); - while (findNextMatch()) - { - ret.push_back(getGroup()); - } - return ret; -} - -void WCMatcher::reset() -{ - lm = 0; - clearGroups(); - matchedSomething = false; -} - -int WCMatcher::getStartingIndex(const int groupNum) const -{ - if (groupNum < 0 || groupNum >= gc) return -1; - return starts[groupNum]; -} -int WCMatcher::getEndingIndex(const int groupNum) const -{ - if (groupNum < 0 || groupNum >= gc) return -1; - return ends[groupNum]; -} -bkstring WCMatcher::getGroup(const int groupNum) const -{ - if (groupNum < 0 || groupNum >= gc) return L""; - if (starts[groupNum] < 0 || ends[groupNum] < 0) return L""; - return str->substr(starts[groupNum], ends[groupNum] - starts[groupNum]); -} -std::vector WCMatcher::getGroups(const bool includeGroupZero) const -{ - int i, start = (includeGroupZero ? 0 : 1); - std::vector ret; - - for (i = start; i < gc; ++i) - { - ret.push_back(getGroup(i)); - } - return ret; -} - diff --git a/plugins/SmileyAdd/regexp/WCMatcher.h b/plugins/SmileyAdd/regexp/WCMatcher.h deleted file mode 100644 index 23cc49e41f..0000000000 --- a/plugins/SmileyAdd/regexp/WCMatcher.h +++ /dev/null @@ -1,234 +0,0 @@ -#ifndef __WCMATCHER_H__ -#define __WCMATCHER_H__ - -#include "bkstring.h" -#include -#include - -/** - A matcher is a non thread-safe object used to scan strings using a given - {@link WCPattern WCPattern} object. Using a WCMatcher is the preferred - method for scanning strings. WCMatchers are not thread-safe. WCMatchers require - very little dynamic memory, hence one is encouraged to create several - instances of a matcher when necessary as opposed to sharing a single instance - of a matcher. -

- The most common methods needed by the matcher are matches, - findNextMatch, and getGroup. matches - and findNextMatch both return success or failure, and further - details can be gathered from their documentation. -

- Unlike Java's WCMatcher, this class allows you to change the string - you are matching against. This provides a small optimization, since you no - longer need multiple matchers for a single pattern in a single thread. -

- This class also provides an extremely handy method for replacing text with - captured data via the replaceWithGroups method. A typical - invocation looks like: -

-  wchar_t buf[10000];
-  bkstring str = "\\5 (user name \\1) uses \\7 for his/her shell and \\6 is their home directory";
-  FILE * fp = fopen("/etc/passwd", "r");
-  WCPattern::registerWCPattern("entry", "[^:]+");
-  WCPattern * p = WCPattern::compile("^({entry}):({entry}):({entry}):({entry}):({entry}):({entry}):({entry})$",
-                                 WCPattern::MULTILINE_MATCHING | WCPattern::UNIX_LINE_MODE);
-  WCMatcher * m = p->createWCMatcher("");
-  while (fgets(buf, 9999, fp))
-  {
-    m->setString(buf);
-    if (m->matches())
-    {
-      printf("%s\n", m->replaceWithGroups(str).c_str());
-    }
-  }
-  fclose(fp);
-
-  
- Calling any of the following functions before first calling - matches, findFirstMatch, or - findNextMatch results in undefined behavior and may cause your - program to crash. - -
    -
  • replaceWithGroups -
  • getStartingIndex
  • -
  • getEndingIndex
  • -
  • getGroup
  • -
  • getGroups
  • -
-
-

- The function findFirstMatch will attempt to find the first match - in the input string. The same results can be obtained by first calling - reset followed by findNextMatch. -

- To eliminate the necessity of looping through a string to find all the - matching substrings, findAll was created. The function will find - all matching substrings and return them in a vector. If you need - to examine specific capture groups within the substrings, then this method - should not be used. - - @author Jeffery Stuart - @since March 2003, Stable Since November 2004 - @version 1.05.00 - @memo Mutable object used on instances of a WCPattern class - */ -class WCMatcher -{ - friend class NFAUNode; - friend class NFAStartUNode; - friend class NFAEndUNode; - friend class NFAGroupHeadUNode; - friend class NFAGroupLoopUNode; - friend class NFAGroupLoopPrologueUNode; - friend class NFAGroupTailUNode; - friend class NFALookBehindUNode; - friend class NFAStartOfLineUNode; - friend class NFAEndOfLineUNode; - friend class NFAEndOfMatchUNode; - friend class NFAReferenceUNode; - friend class WCPattern; - private: - /** - Creates a new matcher object against text using - pattern. - - @param pattern The pattern with which to search - @param text The text in which to search - */ - WCMatcher(WCPattern * pattern, const bkstring & text); - protected: - /// The pattern we use to match - WCPattern * pat; - /// The string in which we are matching - const bkstring * str; - /// The starting point of our match - int start; - /// An array of the starting positions for each group - int * starts; - /// An array of the ending positions for each group - int * ends; - /// An array of private data used by NFAUNodes during matching - int * groups; - /// An array of private data used by NFAUNodes during matching - int * groupIndeces; - /// An array of private data used by NFAUNodes during matching - int * groupPos; - /// The ending index of the last match - int lm; - /// The number of capturing groups we have - int gc; - /// The number of non-capturing groups we havew - int ncgc; - /// Whether or not we have matched something (used only by findFirstMatch and findNextMatch) - int matchedSomething; - /// The flags with which we were made - unsigned long flags; - /// Called by reset to clear the group arrays - void clearGroups(); - public: - /// Used internally by match to signify we want the entire string matched - const static int MATCH_ENTIRE_STRING; - public: - /// Cleans up the dynamic memory used by this matcher - ~WCMatcher(); - /** - Replaces the contents of str with the appropriate captured - text. str should have at least one back reference, otherwise - this function does nothing. - @param str The string in which to replace text - @return A string with all backreferences appropriately replaced - */ - bkstring replaceWithGroups(const bkstring & str); - /** - The flags currently being used by the matcher. - @return Zero - */ - unsigned long getFlags() const; - /** - The text being searched by the matcher. - @return the text being searched by the matcher. - */ - const bkstring& getText() const; - - /** - Scans the string from start to finish for a match. The entire string must - match for this function to return success. Group variables are - appropriately set and can be queried after this function returns. - - @return Success if and only if the entire string matches the pattern - */ - bool matches(); - /** - Scans the string for the first substring matching the pattern. The entire - string does not necessarily have to match for this function to return - success. Group variables are appropriately set and can be queried after - this function returns. - - @return Success if any substring matches the specified pattern - */ - bool findFirstMatch(); - /** - Scans the string for the next substring matching the pattern. If no calls - have been made to findFirstMatch of findNextMatch since the last call to - reset, matches, or setString, then this function's behavior results to - that of findFirstMatch. - - @return Success if another substring can be found that matches the pattern - */ - bool findNextMatch(); - /** - Returns a vector of every substring in order which matches the given - pattern. - - @return Every substring in order which matches the given pattern - */ - std::vector findAll(); - /** - Resets the internal state of the matcher - */ - void reset(); - /** - Same as getText. Left n for backwards compatibilty with old source code - @return Returns the string that is currently being used for matching - */ - inline const bkstring& getString() const { return *str; } - /** - Sets the string to scan - @param newStr The string to scan for subsequent matches - */ - inline void setString(const bkstring & newStr) { str = &newStr; reset(); } - - /** - Returns the starting index of the specified group. - @param groupNum The group to query - @return The starting index of the group if it was matched, -1 for an - invalid group or if the group was not matched - */ - int getStartingIndex(const int groupNum = 0) const; - /** - Returns the ending index of the specified group. - @param groupNum The group to query - @return The ending index of the group if it was matched, -1 for an - invalid group or if the group was not matched - */ - int getEndingIndex(const int groupNum = 0) const; - /** - Returns the specified group. An empty string ("") does not necessarily - mean the group was not matched. A group such as (a*b?) could be matched by - a zero length. If an empty string is returned, getStartingIndex can be - called to determine if the group was actually matched. - @param groupNum The group to query - @return The text of the group - */ - bkstring getGroup(const int groupNum = 0) const; - /** - Returns every capture group in a vector - - @param includeGroupZero Whether or not include capture group zero - @return Every capture group - */ - std::vector getGroups(const bool includeGroupZero = 0) const; -}; - -#endif diff --git a/plugins/SmileyAdd/regexp/WCPattern.cpp b/plugins/SmileyAdd/regexp/WCPattern.cpp deleted file mode 100644 index 25f379f5e4..0000000000 --- a/plugins/SmileyAdd/regexp/WCPattern.cpp +++ /dev/null @@ -1,1747 +0,0 @@ -/** - From the author (Jeff Stuart) - " - Let me start by saying this file is pretty big. If you feel up to it, you can - try making changes yourself, but you would be better off to just email me at - stuart@cs.ucdavis.edu if you think there is a bug, or have something useful you - would like added. This project is very "near and dear" to me, so I am fairly quick - to make bug fixes. The header files for WCPattern and WCMatcher are fairly well - documented and the function names are pretty self-explanatory, but if you are having - any trouble, feel free to email me at stuart@cs.ucdavis.edu. - - If you email me, make sure you put something like C++RE in the subject because - I tend to delete email if I don't recognize the name and the subject is - something like "I Need Your Help" or "Got A Second" or "I Found It". - " - */ - -/* - Detailed documentation is provided in this class' header file - - @author Jeffery Stuart - @since November 2004 - @version 1.07.00 -*/ - -#ifdef _WIN32 - #pragma warning(push) - #pragma warning(disable:4996) -#endif - -#include -#include -#include -#include -#ifndef _WIN32 - #include -#endif - -std::map WCPattern::compiledWCPatterns; -std::map > WCPattern::registeredWCPatterns; - -const int WCPattern::MIN_QMATCH = 0x00000000; -const int WCPattern::MAX_QMATCH = 0x7FFFFFFF; - -const unsigned long WCPattern::CASE_INSENSITIVE = 0x01; -const unsigned long WCPattern::LITERAL = 0x02; -const unsigned long WCPattern::DOT_MATCHES_ALL = 0x04; -const unsigned long WCPattern::MULTILINE_MATCHING = 0x08; -const unsigned long WCPattern::UNIX_LINE_MODE = 0x10; - -#define to_lower(a) (wchar_t)(UINT_PTR)CharLowerW((LPWSTR)(unsigned)a) -#define is_alpha IsCharAlphaW - -#if defined(_WIN32) - #define str_icmp lstrcmpiW -#elif defined(__CYGWIN__) || defined(__APPLE__) - #include - static inline int str_icmp(const wchar_t * a, const wchar_t * b) - { - while (*a && *b) - { - const int t = (int)towlower(*a) - (int)tolower(*b); - if (t) return t; - ++a; ++b; - } - if (*a) - { - if (*b) return (int)towlower(*a) - (int)tolower(*b); - return 1; - } - else if (*b) return 1; - return 0; - } -#else - #define str_icmp wcscasecmp -#endif - -WCPattern::WCPattern(const bkstring & rhs) -{ - matcher = NULL; - pattern = rhs; - curInd = 0; - groupCount = 0; - nonCapGroupCount = 0; - error = 0; - head = NULL; -} -// convenience function in case we want to add any extra debugging output -void WCPattern::raiseError() -{ -/* switch (pattern[curInd - 1]) - { - case '*': - case ')': - case '+': - case '?': - case ']': - case '}': - fwprintf(stderr, L"%s\n%*c^\n", pattern.c_str(), curInd - 1, ' '); - fwprintf(stderr, L"Syntax Error near here. Possible unescaped meta character.\n"); - break; - default: - fwprintf(stderr, L"%s\n%*c^\n", pattern.c_str(), curInd - 1, ' '); - fwprintf(stderr, L"Syntax Error near here. \n"); - break; - }*/ - error = 1; -} -NFAUNode * WCPattern::registerNode(NFAUNode * node) -{ - nodes[node] = 1; - return node; -} - -bkstring WCPattern::classUnion (bkstring s1, bkstring s2) const -{ - wchar_t * out = new wchar_t[66000]; - std::sort(s1.begin(), s1.end()); - std::sort(s2.begin(), s2.end()); - wchar_t* p = std::set_union(s1.begin(), s1.end(), s2.begin(), s2.end(), out); *p = 0; - bkstring ret = out; - delete [] out; - return ret; -} -bkstring WCPattern::classIntersect (bkstring s1, bkstring s2) const -{ - wchar_t * out = new wchar_t[66000]; - std::sort(s1.begin(), s1.end()); - std::sort(s2.begin(), s2.end()); - *std::set_intersection(s1.begin(), s1.end(), s2.begin(), s2.end(), out) = 0; - bkstring ret = out; - delete [] out; - return ret; -} -bkstring WCPattern::classNegate (bkstring s1) const -{ - wchar_t * out = new wchar_t[66000]; - int i, ind = 0; - std::map m; - - for (i = 0; i < (int)s1.size(); ++i) m[s1[i]] = 1; - for (i = 0xFF; i >= 0; --i) if (m.find((wchar_t)i) == m.end()) out[ind++] = (wchar_t)i; - out[ind] = 0; - bkstring ret(out, ind); - delete [] out; - return ret; -} -bkstring WCPattern::classCreateRange(wchar_t low, wchar_t hi) const -{ - wchar_t out[300]; - int ind = 0; - while (low != hi) out[ind++] = low++; - out[ind++] = low; - return bkstring(out, ind); -} - -int WCPattern::getInt(int start, int end) -{ - int ret = 0; - for (; start <= end; ++start) ret = ret * 10 + (pattern[start] - (wchar_t)'0'); - return ret; -} -bool WCPattern::quantifyCurly(int & sNum, int & eNum) -{ - bool good = 1; - int i, ci = curInd + 1; - int commaInd = ci, endInd = ci, len = pattern.size(); - sNum = eNum = 0; - - while (endInd < len && pattern[endInd ] != (wchar_t)'}') ++endInd; - while (commaInd < endInd && pattern[commaInd] != (wchar_t)',') ++commaInd; - if (endInd >= len) { raiseError(); return 0; } - for (i = ci; good && i < endInd; ++i) if (i != commaInd && !isdigit(pattern[i])) good = 0; - if (!good && commaInd < endInd) { raiseError(); return 0; } - if (!good) return 0; - /* so now everything in here is either a comma (and there is at most one comma) or a digit */ - if (commaInd == ci) // {,*} - { - if (endInd == commaInd + 1) { sNum = MIN_QMATCH; eNum = MAX_QMATCH; } // {,} = * - else { sNum = MIN_QMATCH; eNum = getInt(commaInd + 1, endInd - 1); } // {,+} - } - else if (commaInd == endInd - 1) { sNum = getInt(ci, commaInd - 1); eNum = MAX_QMATCH; } // {+,} - else if (commaInd == endInd) { sNum = getInt(ci, endInd - 1); eNum = sNum; } // {+} - else { sNum = getInt(ci, commaInd - 1); eNum = getInt(commaInd + 1, endInd - 1); } // {+,+} - curInd = endInd + 1; - return 1; -} -NFAUNode * WCPattern::quantifyGroup(NFAUNode * start, NFAUNode * stop, const int gn) -{ - NFAUNode * newNode = NULL; - int type = 0; - - if (curInd < (int)pattern.size()) - { - wchar_t ch = (curInd + 1 >= (int)pattern.size()) ? USHRT_MAX : pattern[curInd + 1]; - switch (pattern[curInd]) - { - case (wchar_t)'*': - ++curInd; - switch (ch) - { - case (wchar_t)'?': ++curInd; type = 1; break; - case (wchar_t)'+': ++curInd; type = 2; break; - } - newNode = registerNode(new NFAGroupLoopPrologueUNode(gn)); - newNode->next = registerNode(new NFAGroupLoopUNode(start, MIN_QMATCH, MAX_QMATCH, gn, type)); - stop->next = newNode->next; - return newNode; - case (wchar_t)'?': - ++curInd; - switch (ch) - { - case (wchar_t)'?': ++curInd; type = 1; break; - case (wchar_t)'+': ++curInd; type = 2; break; - } - newNode = registerNode(new NFAGroupLoopPrologueUNode(gn)); - newNode->next = registerNode(new NFAGroupLoopUNode(start, MIN_QMATCH, 1, gn, type)); - stop->next = newNode->next; - return newNode; - case (wchar_t)'+': - ++curInd; - switch (ch) - { - case (wchar_t)'?': ++curInd; type = 1; break; - case (wchar_t)'+': ++curInd; type = 2; break; - } - newNode = registerNode(new NFAGroupLoopPrologueUNode(gn)); - newNode->next = registerNode(new NFAGroupLoopUNode(start, 1, MAX_QMATCH, gn, type)); - stop->next = newNode->next; - return newNode; - case (wchar_t)'{': - { - int s, e; - if (quantifyCurly(s, e)) - { - ch = (curInd < (int)pattern.size()) ? pattern[curInd] : USHRT_MAX; - switch (ch) - { - case (wchar_t)'?': ++curInd; type = 1; break; - case (wchar_t)'+': ++curInd; type = 2; break; - } - newNode = registerNode(new NFAGroupLoopPrologueUNode(gn)); - newNode->next = registerNode(new NFAGroupLoopUNode(start, s, e, gn, type)); - stop->next = newNode->next; - return newNode; - } - } - default: - break; - } - } - return NULL; -} - -NFAUNode * WCPattern::quantify(NFAUNode * newNode) -{ - if (curInd < (int)pattern.size()) - { - wchar_t ch = (curInd + 1 >= (int)pattern.size()) ? USHRT_MAX : pattern[curInd + 1]; - switch (pattern[curInd]) - { - case (wchar_t)'*': - ++curInd; - switch (ch) - { - case (wchar_t)'?': ++curInd; newNode = registerNode(new NFALazyQuantifierUNode (this, newNode, MIN_QMATCH, MAX_QMATCH)); break; - case (wchar_t)'+': ++curInd; newNode = registerNode(new NFAPossessiveQuantifierUNode(this, newNode, MIN_QMATCH, MAX_QMATCH)); break; - default: newNode = registerNode(new NFAGreedyQuantifierUNode (this, newNode, MIN_QMATCH, MAX_QMATCH)); break; - } - break; - case (wchar_t)'?': - ++curInd; - switch (ch) - { - case (wchar_t)'?': ++curInd; newNode = registerNode(new NFALazyQuantifierUNode (this, newNode, MIN_QMATCH, 1)); break; - case (wchar_t)'+': ++curInd; newNode = registerNode(new NFAPossessiveQuantifierUNode(this, newNode, MIN_QMATCH, 1)); break; - default: newNode = registerNode(new NFAGreedyQuantifierUNode (this, newNode, MIN_QMATCH, 1)); break; - } - break; - case (wchar_t)'+': - ++curInd; - switch (ch) - { - case (wchar_t)'?': ++curInd; newNode = registerNode(new NFALazyQuantifierUNode (this, newNode, 1, MAX_QMATCH)); break; - case (wchar_t)'+': ++curInd; newNode = registerNode(new NFAPossessiveQuantifierUNode(this, newNode, 1, MAX_QMATCH)); break; - default: newNode = registerNode(new NFAGreedyQuantifierUNode (this, newNode, 1, MAX_QMATCH)); break; - } - break; - case (wchar_t)'{': - { - int s, e; - if (quantifyCurly(s, e)) - { - ch = (curInd < (int)pattern.size()) ? pattern[curInd] : USHRT_MAX; - switch (ch) - { - case (wchar_t)'?': ++curInd; newNode = registerNode(new NFALazyQuantifierUNode (this, newNode, s, e)); break; - case (wchar_t)'+': ++curInd; newNode = registerNode(new NFAPossessiveQuantifierUNode(this, newNode, s, e)); break; - default: newNode = registerNode(new NFAGreedyQuantifierUNode (this, newNode, s, e)); break; - } - } - } - break; - default: - break; - } - } - return newNode; -} -bkstring WCPattern::parseClass() -{ - bkstring t, ret = L""; - wchar_t ch, c1, c2; - bool inv = 0, neg = 0, quo = 0; - - if (curInd < (int)pattern.size() && pattern[curInd] == (wchar_t)'^') - { - ++curInd; - neg = 1; - } - while (curInd < (int)pattern.size() && pattern[curInd] != (wchar_t)']') - { - ch = pattern[curInd++]; - if (ch == (wchar_t)'[') - { - t = parseClass(); - ret = classUnion(ret, t); - } - /*else if (ch == (wchar_t)'-') - { - raiseError(); - curInd = pattern.size(); - }*/ - else if (ch == (wchar_t)'&' && curInd < (int)pattern.size() && pattern[curInd] == (wchar_t)'&') - { - if (pattern[++curInd] != (wchar_t)'[') - { - raiseError(); - curInd = pattern.size(); - } - else - { - ++curInd; - t = parseClass(); - ret = classIntersect(ret, t); - } - } - else if (ch == (wchar_t)'\\') - { - t = parseEscape(inv, quo); - if (quo) - { - raiseError(); - curInd = pattern.size(); - } - else if (inv || t.size() > 1) // cant be part of a range (a-z) - { - if (inv) t = classNegate(t); - ret = classUnion(ret, t); - } - else if (curInd < (int)pattern.size() && pattern[curInd] == (wchar_t)'-') // part of a range (a-z) - { - c1 = t[0]; - ++curInd; - if (curInd >= (int)pattern.size()) raiseError(); - else - { - c2 = pattern[curInd++]; - if (c2 == (wchar_t)'\\') - { - t = parseEscape(inv, quo); - if (quo) - { - raiseError(); - curInd = pattern.size(); - } - else if (inv || t.size() > 1) raiseError(); - else ret = classUnion(ret, classCreateRange(c1, c2)); - } - else if (c2 == (wchar_t)'[' || c2 == (wchar_t)']' || c2 == (wchar_t)'-' || c2 == (wchar_t)'&') - { - raiseError(); - curInd = pattern.size(); - } - else ret = classUnion(ret, classCreateRange(c1, c2)); - } - } - else - { - ret = classUnion(ret, t); - } - } - else if (curInd < (int)pattern.size() && pattern[curInd] == (wchar_t)'-') - { - c1 = ch; - ++curInd; - if (curInd >= (int)pattern.size()) raiseError(); - else - { - c2 = pattern[curInd++]; - if (c2 == (wchar_t)'\\') - { - t = parseEscape(inv, quo); - if (quo) - { - raiseError(); - curInd = pattern.size(); - } - else if (inv || t.size() > 1) raiseError(); - else ret = classUnion(ret, classCreateRange(c1, c2)); - } - else if (c2 == (wchar_t)'[' || c2 == (wchar_t)']' || c2 == (wchar_t)'-' || c2 == (wchar_t)'&') - { - raiseError(); - curInd = pattern.size(); - } - else - { - ret = classUnion(ret, classCreateRange(c1, c2)); - } - } - } - else - { - ret += L" "; - ret[ret.size() - 1] = ch; - } - } - if (curInd >= (int)pattern.size() || pattern[curInd] != (wchar_t)']') - { - raiseError(); - ret = L""; - } - else - { - ++curInd; - if (neg) ret = classNegate(ret); - } - return ret; -} -bkstring WCPattern::parsePosix() -{ - bkstring s7 = pattern.substr(curInd, 7); - if (s7 == L"{Lower}") { curInd += 7; return L"abcdefghijklmnopqrstuvwxyz"; } - if (s7 == L"{Upper}") { curInd += 7; return L"ABCDEFGHIJKLMNOPQRSTUVWXYZ"; } - if (s7 == L"{Alpha}") { curInd += 7; return L"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; } - if (s7 == L"{Digit}") { curInd += 7; return L"0123456789"; } - if (s7 == L"{Alnum}") { curInd += 7; return L"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; } - if (s7 == L"{Punct}") { curInd += 7; return L"!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~"; } - if (s7 == L"{Graph}") { curInd += 7; return L"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~"; } - if (s7 == L"{Print}") { curInd += 7; return L"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~"; } - if (s7 == L"{Blank}") { curInd += 7; return L" \t"; } - if (s7 == L"{Space}") { curInd += 7; return L" \t\n\x0B\f\r"; } - if (s7 == L"{Cntrl}") - { - bkstring::value_type i; - bkstring s = L" "; - - for (i = 0; i < 5; ++i) s += s; - s += L" "; - for (i = 0; i <= 0x1F; ++i) s[i] = i; - s[0x20] = 0x7F; - curInd += 7; - return s; - } - if (s7 == L"{ASCII}") - { - bkstring s(0x80, (wchar_t)' '); - for (bkstring::value_type i = 0; i <= 0x7f; ++i) s[i] = i; - curInd += 7; - return s; - } - if (pattern.substr(curInd, 8) == L"{XDigit}") { curInd += 8; return L"abcdefABCDEF0123456789"; } - raiseError(); - return L""; -} -NFAUNode * WCPattern::parseBackref() -{ - #define is_dig(x) ((x) >= (wchar_t)'0' && (x) <= (wchar_t)'9') - #define to_int(x) ((x) - (wchar_t)'0') - int ci = curInd; - int oldRef = 0, ref = 0; - - while (ci < (int)pattern.size() && is_dig(pattern[ci]) && (ref < 10 || ref < groupCount)) - { - oldRef = ref; - ref = ref * 10 + to_int(pattern[ci++]); - } - if (ci == (int)pattern.size()) - { - oldRef = ref; - ++ci; - } - if (oldRef < 0 || ci <= curInd) - { - raiseError(); - return registerNode(new NFAReferenceUNode(-1)); - } - curInd = ci; - return registerNode(new NFAReferenceUNode(ref)); - - #undef is_dig - #undef to_int -} -bkstring WCPattern::parseOctal() -{ - #define islowoc(x) ((x) >= (wchar_t)'0' && (x) <= (wchar_t)'3') - #define isoc(x) ((x) >= (wchar_t)'0' && (x) <= (wchar_t)'7') - #define fromoc(x) ((x) - (wchar_t)'0') - int ci = curInd; - wchar_t ch1 = (ci + 0 < (int)pattern.size()) ? pattern[ci + 0] : USHRT_MAX; - wchar_t ch2 = (ci + 1 < (int)pattern.size()) ? pattern[ci + 1] : USHRT_MAX; - wchar_t ch3 = (ci + 2 < (int)pattern.size()) ? pattern[ci + 2] : USHRT_MAX; - bkstring s = L" "; - - if (islowoc(ch1) && isoc(ch2)) - { - curInd += 2; - s[0] = fromoc(ch1) * 8 + fromoc(ch2); - if (isoc(ch3)) - { - ++curInd; - s[0] = s[0] * 8 + fromoc(ch3); - } - } - else if (isoc(ch1) && isoc(ch2)) - { - curInd += 2; - s[0] = fromoc(ch1) * 8 + fromoc(ch2); - } - else raiseError(); - - return s; - #undef islowoc - #undef isoc - #undef fromoc -} -bkstring WCPattern::parseHex() -{ - #define to_low(x) (((x) >= (wchar_t)'A' && (x) <= (wchar_t)'Z') ? ((x) - (wchar_t)'A' + (wchar_t)'a') : (x)) - #define is_dig(x) ((x) >= (wchar_t)'0' && (x) <= (wchar_t)'9') - #define is_hex(x) (is_dig(x) || (to_low(x) >= (wchar_t)'a' && to_low(x) <= (wchar_t)'f')) - #define to_int(x) ((is_dig(x)) ? ((x) - (wchar_t)'0') : (to_low(x) - (wchar_t)'a' + 10)) - - int ci = curInd; - wchar_t ch1 = (ci + 0 < (int)pattern.size()) ? pattern[ci + 0] : USHRT_MAX; - wchar_t ch2 = (ci + 1 < (int)pattern.size()) ? pattern[ci + 1] : USHRT_MAX; - wchar_t ch3 = (ci + 2 < (int)pattern.size()) ? pattern[ci + 2] : USHRT_MAX; - wchar_t ch4 = (ci + 3 < (int)pattern.size()) ? pattern[ci + 3] : USHRT_MAX; - bkstring s = L" "; - - if (is_hex(ch1) && is_hex(ch2) && is_hex(ch3) && is_hex(ch4)) - { - curInd += 2; - s[0] = (to_int(ch1) << 12 & 0xF000) | (to_int(ch2) << 8 & 0x0F00) | - (to_int(ch3) << 4 & 0x0F00) | (to_int(ch4) & 0x000F); - } - else if (is_hex(ch1) && is_hex(ch2)) - { - curInd += 2; - s[0] = (to_int(ch1) << 4 & 0xF0) | (to_int(ch2) & 0x0F); - } - - return s; - #undef to_low - #undef is_dig - #undef is_hex - #undef to_int -} -bkstring WCPattern::parseEscape(bool & inv, bool & quo) -{ - wchar_t ch = pattern[curInd++]; - bkstring classes = L""; - - if (curInd > (int)pattern.size()) - { - raiseError(); - return NULL; - } - - quo = 0; - inv = 0; - switch (ch) - { - case (wchar_t)'p': classes = parsePosix(); break; - case (wchar_t)'P': classes = L"!!"; classes += parsePosix(); break; - case (wchar_t)'d': classes = L"0123456789"; break; - case (wchar_t)'D': classes = L"!!0123456789"; break; - case (wchar_t)'s': classes = L" \t\r\n\f"; break; - case (wchar_t)'S': classes = L"!! \t\r\n\f"; break; - case (wchar_t)'w': classes = L"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_"; break; - case (wchar_t)'W': classes = L"!!abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_"; break; - case (wchar_t)'0': classes = parseOctal(); break; - case (wchar_t)'x': classes = parseHex(); break; - - case (wchar_t)'Q': quo = 1; break; - case (wchar_t)'t': classes = L"\t"; break; - case (wchar_t)'r': classes = L"\r"; break; - case (wchar_t)'n': classes = L"\n"; break; - case (wchar_t)'f': classes = L"\f"; break; - case (wchar_t)'a': classes = L"\a"; break; - case (wchar_t)'e': classes = L"\r"; break; - default: classes = L" "; classes[0] = ch; break; - } - if (classes.substr(0, 2) == L"!!") - { - classes = classes.substr(2); - inv = 1; - } - return classes; -} -NFAUNode * WCPattern::parseRegisteredWCPattern(NFAUNode ** end) -{ - int i, j; - bkstring s; - NFAUNode * ret = NULL; - for (i = curInd; i < (int)pattern.size() && pattern[i] != (wchar_t)'}'; ++i) { } - if (pattern[i] != (wchar_t)'}') { raiseError(); return NULL; } - if (i == curInd + 1) { raiseError(); return NULL; } // {} - if ( - !( - (pattern[curInd] >= (wchar_t)'a' && pattern[curInd] <= (wchar_t)'z') || - (pattern[curInd] >= (wchar_t)'A' && pattern[curInd] <= (wchar_t)'Z') || - (pattern[curInd] == (wchar_t)'_') - ) - ) - { - raiseError(); - return NULL; - } - for (j = curInd; !error && j < i; ++j) - { - if ( - !( - (pattern[j] >= (wchar_t)'a' && pattern[j] <= (wchar_t)'z') || - (pattern[j] >= (wchar_t)'A' && pattern[j] <= (wchar_t)'Z') || - (pattern[j] >= (wchar_t)'0' && pattern[j] <= (wchar_t)'9') || - (pattern[j] == (wchar_t)'_') - ) - ) - { - raiseError(); - return NULL; - } - } - s = pattern.substr(curInd, i - curInd); - if (registeredWCPatterns.find(s) == registeredWCPatterns.end()) raiseError(); - else - { - unsigned long oflags = flags; - bkstring op = pattern; - int ci = i + 1; - - pattern = registeredWCPatterns[s].first; - curInd = 0; - flags = registeredWCPatterns[s].second; - - --groupCount; - ret = parse(0, 0, end); - - pattern = op; - curInd = ci; - flags = oflags; - } - if (error) { *end = ret = NULL; } - return ret; -} - -// look behind should interpret everything as a literal (except \\) since the -// pattern must have a concrete length -NFAUNode * WCPattern::parseBehind(const bool pos, NFAUNode ** end) -{ - bkstring t = L""; - while (curInd < (int)pattern.size() && pattern[curInd] != (wchar_t)')') - { - wchar_t ch = pattern[curInd++]; - t += L" "; - if (ch == (wchar_t)'\\') - { - if (curInd + 1 >= (int)pattern.size()) - { - raiseError(); - return *end = registerNode(new NFACharUNode((wchar_t)' ')); - } - ch = pattern[curInd++]; - } - t[t.size() - 1] = ch; - } - if (curInd >= (int)pattern.size() || pattern[curInd] != (wchar_t)')') raiseError(); - else ++curInd; - return *end = registerNode(new NFALookBehindUNode(t, pos)); -} -NFAUNode * WCPattern::parseQuote() -{ - bool done = 0; - bkstring s = L""; - - while (!done) - { - if (curInd >= (int)pattern.size()) - { - raiseError(); - done = 1; - } - else if (pattern.substr(curInd, 2) == L"\\E") - { - curInd += 2; - done = 1; - } - else if (pattern[curInd] == (wchar_t)'\\') - { - s += L" "; - s[s.size() - 1] = pattern[++curInd]; - ++curInd; - } - else - { - s += L" "; - s[s.size() - 1] = pattern[curInd++]; - } - } - if ((flags & WCPattern::CASE_INSENSITIVE) != 0) return registerNode(new NFACIQuoteUNode(s)); - return registerNode(new NFAQuoteUNode(s)); -} -NFAUNode * WCPattern::parse(const bool inParen, const bool inOr, NFAUNode ** end) -{ - NFAUNode * start, * cur, * next = NULL; - bkstring t; - int grc = groupCount++; - bool inv, quo; - bool ahead = 0, pos = 0, noncap = 0, indep = 0; - unsigned long oldFlags = flags; - - if (inParen) - { - if (pattern[curInd] == (wchar_t)'?') - { - ++curInd; - --groupCount; - if (pattern[curInd] == (wchar_t)':') { noncap = 1; ++curInd; grc = --nonCapGroupCount; } - else if (pattern[curInd] == (wchar_t)'=') { ++curInd; ahead = 1; pos = 1; } - else if (pattern[curInd] == (wchar_t)'!') { ++curInd; ahead = 1; pos = 0; } - else if (pattern.substr(curInd, 2) == L"<=") { curInd += 2; return parseBehind(1, end); } - else if (pattern.substr(curInd, 2) == L"') { ++curInd; indep = 1; } - else - { - bool negate = false, done = false; - while (!done) - { - if (curInd >= (int)pattern.size()) - { - raiseError(); - return NULL; - } - else if (negate) - { - switch (pattern[curInd]) - { - case (wchar_t)'i': flags &= ~WCPattern::CASE_INSENSITIVE; break; - case (wchar_t)'d': flags &= ~WCPattern::UNIX_LINE_MODE; break; - case (wchar_t)'m': flags &= ~WCPattern::MULTILINE_MATCHING; break; - case (wchar_t)'s': flags &= ~WCPattern::DOT_MATCHES_ALL; break; - case (wchar_t)':': done = true; break; - case (wchar_t)')': - ++curInd; - *end = registerNode(new NFALookBehindUNode(L"", true)); - return *end; - case (wchar_t)'-': - default: raiseError(); return NULL; - } - } - else - { - switch (pattern[curInd]) - { - case (wchar_t)'i': flags |= WCPattern::CASE_INSENSITIVE; break; - case (wchar_t)'d': flags |= WCPattern::UNIX_LINE_MODE; break; - case (wchar_t)'m': flags |= WCPattern::MULTILINE_MATCHING; break; - case (wchar_t)'s': flags |= WCPattern::DOT_MATCHES_ALL; break; - case (wchar_t)':': done = true; break; - case (wchar_t)'-': negate = true; break; - case (wchar_t)')': - ++curInd; - *end = registerNode(new NFALookBehindUNode(L"", true)); - return *end; - default: raiseError(); return NULL; - } - } - ++curInd; - } - noncap = 1; - grc = --nonCapGroupCount; - } - - if (noncap) cur = start = registerNode(new NFAGroupHeadUNode(grc)); - else cur = start = registerNode(new NFASubStartUNode); - } - else cur = start = registerNode(new NFAGroupHeadUNode(grc)); - } - else cur = start = registerNode(new NFASubStartUNode); - while (curInd < (int)pattern.size()) - { - wchar_t ch = pattern[curInd++]; - - next = NULL; - if (error) return NULL; - switch (ch) - { - case (wchar_t)'^': - if ((flags & WCPattern::MULTILINE_MATCHING) != 0) next = registerNode(new NFAStartOfLineUNode); - else next = registerNode(new NFAStartOfInputUNode); - break; - case (wchar_t)'$': - if ((flags & WCPattern::MULTILINE_MATCHING) != 0) next = registerNode(new NFAEndOfLineUNode); - else next = registerNode(new NFAEndOfInputUNode(0)); - break; - case (wchar_t)'|': - --groupCount; - cur->next = registerNode(new NFAAcceptUNode); - cur = start = registerNode(new NFAOrUNode(start, parse(inParen, 1))); - break; - case (wchar_t)'\\': - if (curInd < (int)pattern.size()) - { - bool eoi = 0; - switch (pattern[curInd]) - { - case (wchar_t)'1': - case (wchar_t)'2': - case (wchar_t)'3': - case (wchar_t)'4': - case (wchar_t)'5': - case (wchar_t)'6': - case (wchar_t)'7': - case (wchar_t)'8': - case (wchar_t)'9': next = parseBackref(); break; - case (wchar_t)'A': ++curInd; next = registerNode(new NFAStartOfInputUNode); break; - case (wchar_t)'B': ++curInd; next = registerNode(new NFAWordBoundaryUNode(0)); break; - case (wchar_t)'b': ++curInd; next = registerNode(new NFAWordBoundaryUNode(1)); break; - case (wchar_t)'G': ++curInd; next = registerNode(new NFAEndOfMatchUNode); break; - case (wchar_t)'Z': eoi = 1; - case (wchar_t)'z': ++curInd; next = registerNode(new NFAEndOfInputUNode(eoi)); break; - default: - t = parseEscape(inv, quo); - //printf("inv quo classes { %c %c %s }\n", inv ? (wchar_t)'t' : (wchar_t)'f', quo ? (wchar_t)'t' : (wchar_t)'f', t.c_str()); - if (!quo) - { - if (t.size() > 1 || inv) - { - if ((flags & WCPattern::CASE_INSENSITIVE) != 0) next = registerNode(new NFACIClassUNode(t, inv)); - else next = registerNode(new NFAClassUNode(t, inv)); - } - else - { - next = registerNode(new NFACharUNode(t[0])); - } - } - else - { - next = parseQuote(); - } - } - } - else raiseError(); - break; - case (wchar_t)'[': - if ((flags & WCPattern::CASE_INSENSITIVE) == 0) - { - NFAClassUNode * clazz = new NFAClassUNode(); - bkstring s = parseClass(); - for (int i = 0; i < (int)s.size(); ++i) clazz->vals[s[i]] = 1; - next = registerNode(clazz); - } - else - { - NFACIClassUNode * clazz = new NFACIClassUNode(); - bkstring s = parseClass(); - for (int i = 0; i < (int)s.size(); ++i) clazz->vals[to_lower(s[i])] = 1; - next = registerNode(clazz); - } - break; - case (wchar_t)'.': - { - bool useN = 1, useR = 1; - NFAClassUNode * clazz = new NFAClassUNode(1); - if ((flags & WCPattern::UNIX_LINE_MODE) != 0) useR = 0; - if ((flags & WCPattern::DOT_MATCHES_ALL) != 0) useN = useR = 0; - if (useN) clazz->vals[(wchar_t)'\n'] = 1; - if (useR) clazz->vals[(wchar_t)'\r'] = 1; - next = registerNode(clazz); - } - break; - case (wchar_t)'(': - { - NFAUNode * end, * t1, * t2; - t1 = parse(1, 0, &end); - if (!t1) raiseError(); - else if (t1->isGroupHeadNode() && (t2 = quantifyGroup(t1, end, grc)) != NULL) - { - cur->next = t2; - cur = t2->next; - } - else - { - cur->next = t1; - cur = end; - } - } - break; - case (wchar_t)')': - if (!inParen) raiseError(); - else if (inOr) - { - --curInd; - cur = cur->next = registerNode(new NFAAcceptUNode); - flags = oldFlags; - return start; - } - else - { - if (ahead) - { - cur = cur->next = registerNode(new NFAAcceptUNode); - flags = oldFlags; - return *end = registerNode(new NFALookAheadUNode(start, pos)); - } - else if (indep) - { - cur = cur->next = registerNode(new NFAAcceptUNode); - flags = oldFlags; - return *end = registerNode(new NFAPossessiveQuantifierUNode(this, start, 1, 1)); - } - else // capping or noncapping, it doesnt matter - { - *end = cur = cur->next = registerNode(new NFAGroupTailUNode(grc)); - next = quantifyGroup(start, *end, grc); - if (next) - { - start = next; - *end = next->next; - } - flags = oldFlags; - return start; - } - } - break; - case (wchar_t)'{': // registered pattern - cur->next = parseRegisteredWCPattern(&next); - if (cur->next) cur = next; - break; - case (wchar_t)'*': - case (wchar_t)'+': - case (wchar_t)'?': -// case (wchar_t)'}': -// case (wchar_t)']': - raiseError(); - break; - default: - if ((flags & WCPattern::CASE_INSENSITIVE) != 0) next = registerNode(new NFACICharUNode(ch)); - else next = registerNode(new NFACharUNode(ch)); - break; - } - if (next) cur = cur->next = quantify(next); - } - if (inParen) raiseError(); - else - { - if (inOr) cur = cur->next = registerNode(new NFAAcceptUNode); - if (end) *end = cur; - } - - flags = oldFlags; - if (error) return NULL; - - return start; -} - -WCPattern * WCPattern::compile(const bkstring & pattern, const unsigned long mode) -{ - WCPattern * p = new WCPattern(pattern); - NFAUNode * end; - - p->flags = mode; - if ((mode & WCPattern::LITERAL) != 0) - { - p->head = p->registerNode(new NFAStartUNode); - if ((mode & WCPattern::CASE_INSENSITIVE) != 0) p->head->next = p->registerNode(new NFACIQuoteUNode(pattern)); - else p->head->next = p->registerNode(new NFAQuoteUNode(pattern)); - p->head->next->next = p->registerNode(new NFAEndUNode); - } - else - { - p->head = p->parse(0, 0, &end); - if (!p->head) - { - delete p; - p = NULL; - } - else - { - if (!(p->head && p->head->isStartOfInputNode())) - { - NFAUNode * n = p->registerNode(new NFAStartUNode); - n->next = p->head; - p->head = n; - } - end->next = p->registerNode(new NFAEndUNode); - } - } - if (p != NULL) - { - p->matcher = new WCMatcher(p, L""); - } - - return p; -} - -WCPattern * WCPattern::compileAndKeep(const bkstring & pattern, const unsigned long mode) -{ - WCPattern * ret = NULL; - std::map::iterator it = compiledWCPatterns.find(pattern); - - if (it != compiledWCPatterns.end()) - { - ret = it->second; - } - else - { - ret = compile(pattern, mode); - compiledWCPatterns[pattern] = ret; - } - - return ret; -} -bkstring WCPattern::replace(const bkstring & pattern, const bkstring & str, - const bkstring & replacementText, const unsigned long mode) -{ - bkstring ret; - WCPattern * p = WCPattern::compile(pattern, mode); - if (p) - { - ret = p->replace(str, replacementText); - delete p; - } - return ret; -} - -std::vector WCPattern::split(const bkstring & pattern, const bkstring & str, const bool keepEmptys, - const unsigned long limit, const unsigned long mode) -{ - std::vector ret; - WCPattern * p = WCPattern::compile(pattern, mode); - if (p) - { - ret = p->split(str, keepEmptys, limit); - delete p; - } - return ret; -} - -std::vector WCPattern::findAll(const bkstring & pattern, const bkstring & str, const unsigned long mode) -{ - std::vector ret; - WCPattern * p = WCPattern::compile(pattern, mode); - if (p) - { - ret = p->findAll(str); - delete p; - } - return ret; -} - -bool WCPattern::matches(const bkstring & pattern, const bkstring & str, const unsigned long mode) -{ - bool ret = 0; - WCPattern * p = compile(pattern, mode); - - if (p) - { - ret = p->matches(str); - delete p; - } - - return ret; -} - -bool WCPattern::registerWCPattern(const bkstring & name, const bkstring & pattern, const unsigned long mode) -{ - WCPattern * p = WCPattern::compile(pattern, mode); - if (!p) return 0; - WCPattern::registeredWCPatterns[name] = std::make_pair(pattern, mode); - delete p; - return 1; -} - -void WCPattern::unregisterWCPatterns() -{ - registeredWCPatterns.clear(); -} -void WCPattern::clearWCPatternCache() -{ - std::map::iterator it; - for (it = compiledWCPatterns.begin(); it != compiledWCPatterns.end(); ++it) - { - delete it->second; - } - compiledWCPatterns.clear(); -} - -std::pair WCPattern::findNthMatch(const bkstring & pattern, const bkstring & str, - const int matchNum, const unsigned long mode) -{ - std::pair ret; - WCPattern * p = WCPattern::compile(pattern, mode); - - ret.second = -1; - if (p) - { - int i = -1; - p->matcher->setString(str); - while (i < matchNum && p->matcher->findNextMatch()) { ++i; } - if (i == matchNum && p->matcher->getStartingIndex() >= 0) - { - ret.first = p->matcher->getGroup(0); - ret.second = p->matcher->getStartingIndex(); - } - delete p; - } - - return ret; -} - -WCPattern::~WCPattern() -{ - /* - nodes.clear(); - if (head) head->findAllNodes(nodes); - */ - if (matcher) delete matcher; - for (std::map::iterator it = nodes.begin(); it != nodes.end(); ++it) delete it->first; -} -bkstring WCPattern::replace(const bkstring & str, const bkstring & replacementText) -{ - int li = 0; - bkstring ret = L""; - - matcher->setString(str); - while (matcher->findNextMatch()) - { - ret += str.substr(li, matcher->getStartingIndex() - li); - ret += matcher->replaceWithGroups(replacementText); - li = matcher->getEndingIndex(); - } - ret += str.substr(li); - - return ret; -} -std::vector WCPattern::split(const bkstring & str, const bool keepEmptys, const unsigned long limit) -{ - unsigned long lim = (limit == 0 ? MAX_QMATCH : limit); - int li = 0; - std::vector ret; - - matcher->setString(str); - - while (matcher->findNextMatch() && ret.size() < lim) - { - if (matcher->getStartingIndex() == 0 && keepEmptys) ret.push_back(L""); - if ((matcher->getStartingIndex() != matcher->getEndingIndex()) || keepEmptys) - { - if (li != matcher->getStartingIndex() || keepEmptys) - { - ret.push_back(str.substr(li, matcher->getStartingIndex() - li)); - } - li = matcher->getEndingIndex(); - } - } - if (li < (int)str.size()) ret.push_back(str.substr(li)); - - return ret; -} -std::vector WCPattern::findAll(const bkstring & str) -{ - matcher->setString(str); - return matcher->findAll(); -} -bool WCPattern::matches(const bkstring & str) -{ - matcher->setString(str); - return matcher->matches(); -} -unsigned long WCPattern::getFlags() const -{ - return flags; -} -bkstring WCPattern::getWCPattern() const -{ - return pattern; -} -WCMatcher * WCPattern::createWCMatcher(const bkstring & str) -{ - return new WCMatcher(this, str); -} - -// NFAUNode - -NFAUNode::NFAUNode() { next = NULL; } -NFAUNode::~NFAUNode() { } -void NFAUNode::findAllNodes(std::map & soFar) -{ - if (soFar.find(this) == soFar.end()) return; - soFar[this] = 1; - if (next) next->findAllNodes(soFar); -} - -// NFACharUNode - -NFACharUNode::NFACharUNode(const wchar_t c) { ch = c; } -int NFACharUNode::match(const bkstring & str, WCMatcher * matcher, const int curInd) const -{ - if (curInd < (int)str.size() && str[curInd] == ch) return next->match(str, matcher, curInd + 1); - return -1; -} - -// NFACICharUNode - -NFACICharUNode::NFACICharUNode(const wchar_t c) { ch = to_lower(c); } -int NFACICharUNode::match(const bkstring & str, WCMatcher * matcher, const int curInd) const -{ - if (curInd < (int)str.size() && to_lower(str[curInd]) == ch) return next->match(str, matcher, curInd + 1); - return -1; -} - -// NFAStartUNode - -NFAStartUNode::NFAStartUNode() { } -int NFAStartUNode::match(const bkstring & str, WCMatcher * matcher, const int curInd) const -{ - int ret = -1, ci = curInd; - - matcher->starts[0] = curInd; - if ((matcher->getFlags() & WCMatcher::MATCH_ENTIRE_STRING) == (unsigned int)WCMatcher::MATCH_ENTIRE_STRING) - { - if (curInd != 0) - { - matcher->starts[0] = -1; - return -1; - } - return next->match(str, matcher, 0); - } - while ((ret = next->match(str, matcher, ci)) == -1 && ci < (int)str.size()) - { - matcher->clearGroups(); - matcher->starts[0] = ++ci; - } - if (ret < 0) matcher->starts[0] = -1; - return ret; -} - -// NFAEndUNode - -NFAEndUNode::NFAEndUNode() { } -int NFAEndUNode::match(const bkstring & str, WCMatcher * matcher, const int curInd) const -{ - matcher->ends[0] = curInd; - if ((matcher->getFlags() & WCMatcher::MATCH_ENTIRE_STRING) != 0) - { - if (curInd == (int)str.size()) return curInd; - matcher->ends[0] = -1; - return -1; - } - return curInd; -} - -// NFAQuantifierUNode - -void NFAQuantifierUNode::findAllNodes(std::map & soFar) -{ - inner->findAllNodes(soFar); - NFAUNode::findAllNodes(soFar); -} -NFAQuantifierUNode::NFAQuantifierUNode(WCPattern * pat, NFAUNode * internal, const int minMatch, const int maxMatch) -{ - inner = internal; - inner->next = pat->registerNode(new NFAAcceptUNode); - min = (minMatch < WCPattern::MIN_QMATCH) ? WCPattern::MIN_QMATCH : minMatch; - max = (maxMatch > WCPattern::MAX_QMATCH) ? WCPattern::MAX_QMATCH : maxMatch; -} - -int NFAQuantifierUNode::match(const bkstring & str, WCMatcher * matcher, const int curInd) const -{ - int i0, i1, i2 = 0; - - i0 = i1 = curInd; - while (i2 < min) - { - - ++i2; - i1 = inner->match(str, matcher, i0); - if (i1 <= i0) return i1; // i1 < i0 means i1 is -1 - i0 = i1; - } - - return i1; -} -// NFAGreedyQuantifierUNode - -NFAGreedyQuantifierUNode::NFAGreedyQuantifierUNode(WCPattern * pat, NFAUNode * internal, const int minMatch, const int maxMatch) - : NFAQuantifierUNode(pat, internal, minMatch, maxMatch) { } -int NFAGreedyQuantifierUNode::match(const bkstring & str, WCMatcher * matcher, const int curInd) const -{ - int t = NFAQuantifierUNode::match(str, matcher, curInd); - if (t != -1) return matchInternal(str, matcher, t, min); - return t; -} -int NFAGreedyQuantifierUNode::matchInternal(const bkstring & str, WCMatcher * matcher, const int curInd, const int soFar) const -{ - if (soFar >= max) return next->match(str, matcher, curInd); - - int i, j; - - i = inner->match(str, matcher, curInd); - if (i != -1) - { - j = matchInternal(str, matcher, i, soFar + 1); - if (j != -1) return j; - } - return next->match(str, matcher, curInd); -} - -// NFALazyQuantifierUNode - -NFALazyQuantifierUNode::NFALazyQuantifierUNode(WCPattern * pat, NFAUNode * internal, const int minMatch, const int maxMatch) - : NFAQuantifierUNode(pat, internal, minMatch, maxMatch) { } -int NFALazyQuantifierUNode::match(const bkstring & str, WCMatcher * matcher, const int curInd) const -{ - int i, j, m = NFAQuantifierUNode::match(str, matcher, curInd); - - if (m == -1) return -1; - - for (i = min; i < max; ++i) - { - j = next->match(str, matcher, m); - if (j == -1) - { - j = inner->match(str, matcher, m); - // if j < m, then j is -1, so we bail. - // if j == m, then we would just go and call next->match on the same index, - // but it already failed trying to match right there, so we know we can - // just bail - if (j <= m) return -1; - m = j; - } - else return j; - } - return next->match(str, matcher, m); -} - -// NFAPossessiveQuantifierUNode - -NFAPossessiveQuantifierUNode::NFAPossessiveQuantifierUNode(WCPattern * pat, NFAUNode * internal, const int minMatch, const int maxMatch) - : NFAQuantifierUNode(pat, internal, minMatch, maxMatch) { } -int NFAPossessiveQuantifierUNode::match(const bkstring & str, WCMatcher * matcher, const int curInd) const -{ - int i, j, m = NFAQuantifierUNode::match(str, matcher, curInd); - - if (m == -1) return -1; - for (i = min; i < max; ++i) - { - j = inner->match(str, matcher, m); - if (j <= m) return next->match(str, matcher, m); - m = j; - } - return next->match(str, matcher, m); -} - -// NFAAcceptUNode - -NFAAcceptUNode::NFAAcceptUNode() { } -int NFAAcceptUNode::match(const bkstring & str, WCMatcher * matcher, const int curInd) const -{ - if (!next) return curInd; - else return next->match(str, matcher, curInd); -} - -// NFAClassUNode - -NFAClassUNode::NFAClassUNode(const bool invert) -{ - inv = invert; -} -NFAClassUNode::NFAClassUNode(const bkstring & clazz, const bool invert) -{ - inv = invert; - for (int i = 0; i < (int)clazz.size(); ++i) vals[clazz[i]] = 1; -} -int NFAClassUNode::match(const bkstring & str, WCMatcher * matcher, const int curInd) const -{ - if (curInd < (int)str.size() && ((vals.find(str[curInd]) != vals.end()) ^ inv)) - { - return next->match(str, matcher, curInd + 1); - } - return -1; -} - -// NFACIClassUNode - -NFACIClassUNode::NFACIClassUNode(const bool invert) -{ - inv = invert; -} -NFACIClassUNode::NFACIClassUNode(const bkstring & clazz, const bool invert) -{ - inv = invert; - for (int i = 0; i < (int)clazz.size(); ++i) vals[to_lower(clazz[i])] = 1; -} -int NFACIClassUNode::match(const bkstring & str, WCMatcher * matcher, const int curInd) const -{ - if (curInd < (int)str.size() && ((vals.find(to_lower(str[curInd])) != vals.end()) ^ inv)) - { - return next->match(str, matcher, curInd + 1); - } - return -1; -} - -// NFASubStartUNode - -NFASubStartUNode::NFASubStartUNode() { } -int NFASubStartUNode::match(const bkstring & str, WCMatcher * matcher, const int curInd) const -{ - return next->match(str, matcher, curInd); -} - -// NFAOrUNode - -NFAOrUNode::NFAOrUNode(NFAUNode * first, NFAUNode * second) : one(first), two(second) { } -void NFAOrUNode::findAllNodes(std::map & soFar) -{ - if (one) one->findAllNodes(soFar); - if (two) two->findAllNodes(soFar); - NFAUNode::findAllNodes(soFar); -} -int NFAOrUNode::match(const bkstring & str, WCMatcher * matcher, const int curInd) const -{ - int ci = one->match(str, matcher, curInd); - - if (ci != -1) ci = next->match(str, matcher, ci); - if (ci != -1) return ci; - if (ci == -1) ci = two->match(str, matcher, curInd); - if (ci != -1) ci = next->match(str, matcher, ci); - return ci; -} - -// NFAQuoteUNode - -NFAQuoteUNode::NFAQuoteUNode(const bkstring & quoted) : qStr(quoted) { } -int NFAQuoteUNode::match(const bkstring & str, WCMatcher * matcher, const int curInd) const -{ - if (curInd + qStr.size() > str.size()) return -1; - if (str.substr(curInd, qStr.size()) != qStr) return -1; - return next->match(str, matcher, curInd + (int)qStr.size()); -} - -// NFACIQuoteUNode - -NFACIQuoteUNode::NFACIQuoteUNode(const bkstring & quoted) : qStr(quoted) { } -int NFACIQuoteUNode::match(const bkstring & str, WCMatcher * matcher, const int curInd) const -{ - if (curInd + qStr.size() > str.size()) return -1; - if (str_icmp(str.substr(curInd, qStr.size()).c_str(), qStr.c_str())) return -1; - return next->match(str, matcher, (int)qStr.size()); -} - -// NFALookAheadUNode - -NFALookAheadUNode::NFALookAheadUNode(NFAUNode * internal, const bool positive) : NFAUNode(), pos(positive), inner(internal) { } -void NFALookAheadUNode::findAllNodes(std::map & soFar) -{ - if (inner) inner->findAllNodes(soFar); - NFAUNode::findAllNodes(soFar); -} -int NFALookAheadUNode::match(const bkstring & str, WCMatcher * matcher, const int curInd) const -{ - return ((inner->match(str, matcher, curInd) == -1) ^ pos) ? next->match(str, matcher, curInd) : -1; -} - -// NFALookBehindUNode - -NFALookBehindUNode::NFALookBehindUNode(const bkstring & str, const bool positive) : pos(positive), mStr(str) { } -int NFALookBehindUNode::match(const bkstring & str, WCMatcher * matcher, const int curInd) const -{ - if (pos) - { - if (curInd < (int)mStr.size()) return -1; - if (str.substr(curInd - mStr.size(), mStr.size()) == mStr) return next->match(str, matcher, curInd); - } - else - { - if (curInd < (int)mStr.size()) return next->match(str, matcher, curInd); - if (str.substr(curInd - mStr.size(), mStr.size()) == mStr) return -1; - return next->match(str, matcher, curInd); - } - return -1; -} - -// NFAStartOfLineUNode - -NFAStartOfLineUNode::NFAStartOfLineUNode() { } -int NFAStartOfLineUNode::match(const bkstring & str, WCMatcher * matcher, const int curInd) const -{ - if (curInd == 0 || str[curInd - 1] == (wchar_t)'\n' || str[curInd - 1] == (wchar_t)'\r') - { - return next->match(str, matcher, curInd); - } - return -1; -} - -// NFAEndOfLineUNode - -NFAEndOfLineUNode::NFAEndOfLineUNode() { } -int NFAEndOfLineUNode::match(const bkstring & str, WCMatcher * matcher, const int curInd) const -{ - if (curInd >= (int)str.size() || str[curInd] == (wchar_t)'\n' || str[curInd] == (wchar_t)'\r') - { - return next->match(str, matcher, curInd); - } - return -1; -} - -// NFAReferenceUNode - -NFAReferenceUNode::NFAReferenceUNode(const int groupIndex) : gi(groupIndex) { } -int NFAReferenceUNode::match(const bkstring & str, WCMatcher * matcher, const int curInd) const -{ - int len = matcher->ends[gi] - matcher->starts[gi]; - int ni = -1; - if (gi < 1 || matcher->ends[gi] < matcher->starts[gi] || len == 0) ni = curInd; - else if (curInd + len > (int)str.size()) return -1; - else if (str.substr(curInd, len) != str.substr(matcher->starts[gi], len)) return -1; - else ni = curInd + len; - - return next->match(str, matcher, ni); -} - -// NFAStartOfInputUNode - -NFAStartOfInputUNode::NFAStartOfInputUNode() { } -int NFAStartOfInputUNode::match(const bkstring & str, WCMatcher * matcher, const int curInd) const -{ - if (curInd == 0) return next->match(str, matcher, curInd); - return -1; -} - -// NFAEndOfInputUNode - -NFAEndOfInputUNode::NFAEndOfInputUNode(const bool lookForTerm) : term(lookForTerm) { } -int NFAEndOfInputUNode::match(const bkstring & str, WCMatcher * matcher, const int curInd) const -{ - int len = (int)str.size(); - if (curInd == len) return next->match(str, matcher, curInd); - else if (term) - { - if (curInd == len - 1 && (str[curInd] == (wchar_t)'\r' || str[curInd] == (wchar_t)'\n')) - { - return next->match(str, matcher, curInd); - } - else if (curInd == len - 2 && str.substr(curInd, 2) == L"\r\n") - { - return next->match(str, matcher, curInd); - } - } - return -1; -} - -// NFAWordBoundaryUNode - -NFAWordBoundaryUNode::NFAWordBoundaryUNode(const bool positive) : pos(positive) { } -int NFAWordBoundaryUNode::match(const bkstring & str, WCMatcher * matcher, const int curInd) const -{ - int len = (int)str.size(); - - wchar_t c1 = (curInd - 1 < len && curInd > 0) ? str[curInd - 1] : '\n'; - wchar_t c2 = (curInd < len) ? str[curInd ] : '\n'; - - if (curInd == len) return next->match(str, matcher, curInd); - bool ok = is_alpha(c1) != is_alpha(c2); - if (ok && pos) return next->match(str, matcher, curInd); - return -1; -} - -// NFAEndOfMatchUNode - -NFAEndOfMatchUNode::NFAEndOfMatchUNode() { } -int NFAEndOfMatchUNode::match(const bkstring & str, WCMatcher * matcher, const int curInd) const -{ - if (curInd == matcher->lm) return next->match(str, matcher, curInd); - return -1; -} - -// NFAGroupHeadUNode - -NFAGroupHeadUNode::NFAGroupHeadUNode(const int groupIndex) : gi(groupIndex) { } -int NFAGroupHeadUNode::match(const bkstring & str, WCMatcher * matcher, const int curInd) const -{ - int ret, o = matcher->starts[gi]; - - matcher->starts[gi] = curInd; - ret = next->match(str, matcher, curInd); - if (ret < 0) matcher->starts[gi] = o; - - return ret; -} - -// NFAGroupTailUNode - -NFAGroupTailUNode::NFAGroupTailUNode(const int groupIndex) : gi(groupIndex) { } -int NFAGroupTailUNode::match(const bkstring & str, WCMatcher * matcher, const int curInd) const -{ - int ret, o = matcher->ends[gi]; - - matcher->ends[gi] = curInd; - ret = next->match(str, matcher, curInd); - if (ret < 0) matcher->ends[gi] = o; - - return ret; -} - -// NFAGroupLoopPrologueUNode - -NFAGroupLoopPrologueUNode::NFAGroupLoopPrologueUNode(const int groupIndex) : gi(groupIndex) { } -int NFAGroupLoopPrologueUNode::match(const bkstring & str, WCMatcher * matcher, const int curInd) const -{ - int ret, o1 = matcher->groups[gi], o2 = matcher->groupPos[gi], o3 = matcher->groupIndeces[gi]; - - matcher->groups[gi] = 0; - matcher->groupPos[gi] = 0; - matcher->groupIndeces[gi] = -1; - ret = next->match(str, matcher, curInd); - if (ret < 0) - { - matcher->groups[gi] = o1; - matcher->groupPos[gi] = o2; - matcher->groupIndeces[gi] = o3; - } - - return ret; -} - -// NFAGroupLoopUNode - -NFAGroupLoopUNode::NFAGroupLoopUNode(NFAUNode * internal, const int minMatch, const int maxMatch, - const int groupIndex, const int matchType) -{ - inner = internal; - min = minMatch; - max = maxMatch; - gi = groupIndex; - type = matchType; -} -void NFAGroupLoopUNode::findAllNodes(std::map & soFar) -{ - if (inner) inner->findAllNodes(soFar); - NFAUNode::findAllNodes(soFar); -} -int NFAGroupLoopUNode::match(const bkstring & str, WCMatcher * matcher, const int curInd) const -{ - bool b = (curInd > matcher->groupIndeces[gi]); - - if (b && matcher->groups[gi] < min) - { - ++matcher->groups[gi]; - int o = matcher->groupIndeces[gi]; - matcher->groupIndeces[gi] = curInd; - int ret = inner->match(str, matcher, curInd); - if (ret < 0) - { - matcher->groupIndeces[gi] = o; - --matcher->groups[gi]; - } - return ret; - } - else if (!b || matcher->groups[gi] >= max) - { - return next->match(str, matcher, curInd); - } - else - { - switch (type) - { - case 0: return matchGreedy(str, matcher, curInd); - case 1: return matchLazy(str, matcher, curInd); - case 2: return matchPossessive(str, matcher, curInd); - } - } - return -1; -} -int NFAGroupLoopUNode::matchGreedy(const bkstring & str, WCMatcher * matcher, const int curInd) const -{ - int o = matcher->groupIndeces[gi]; // save our info for backtracking - matcher->groupIndeces[gi] = curInd; // move along - ++matcher->groups[gi]; - int ret = inner->match(str, matcher, curInd); // match internally - if (ret < 0) - { // if we failed, then restore info and match next - --matcher->groups[gi]; - matcher->groupIndeces[gi] = o; - ret = next->match(str, matcher, curInd); - } - return ret; -} -int NFAGroupLoopUNode::matchLazy(const bkstring & str, WCMatcher * matcher, const int curInd) const -{ - int ret = next->match(str, matcher, curInd); // be lazy, just go on - if (ret < 0) - { - int o = matcher->groupIndeces[gi]; // save info for backtracking - matcher->groupIndeces[gi] = curInd; // advance our position - ++matcher->groups[gi]; - ret = inner->match(str, matcher, curInd); // match our internal stuff - if (ret < 0) // if we failed, then restore the info - { - --matcher->groups[gi]; - matcher->groupIndeces[gi] = o; - } - } - return ret; -} -int NFAGroupLoopUNode::matchPossessive(const bkstring & str, WCMatcher * matcher, const int curInd) const -{ - int o = matcher->groupIndeces[gi]; // save info for backtracking - matcher->groupPos[gi] = matcher->groups[gi]; // set a flag stating we have matcher at least this much - matcher->groupIndeces[gi] = curInd; // move along - ++matcher->groups[gi]; - int ret = inner->match(str, matcher, curInd); // try and match again - if (ret < 0) - { // if we fail, back off, but to an extent - --matcher->groups[gi]; - matcher->groupIndeces[gi] = o; - if (matcher->groups[gi] == matcher->groupPos[gi]) ret = next->match(str, matcher, curInd); - } - return ret; -} - -#ifdef _WIN32 - #pragma warning(pop) -#endif diff --git a/plugins/SmileyAdd/regexp/WCPattern.h b/plugins/SmileyAdd/regexp/WCPattern.h deleted file mode 100644 index 3d52a7fd2e..0000000000 --- a/plugins/SmileyAdd/regexp/WCPattern.h +++ /dev/null @@ -1,1663 +0,0 @@ -#ifndef __WCPATTERN_H__ -#define __WCPATTERN_H__ - -#ifdef _WIN32 - #pragma warning(disable:4786) -#endif - -#include "bkstring.h" - -#include -#include - -class WCMatcher; -class NFAUNode; -class NFAQuantifierUNode; - -/** - This pattern class is very similar in functionality to Java's - java.util.regex.WCPattern class. The pattern class represents an immutable - regular expression object. Instead of having a single object contain both the - regular expression object and the matching object, instead the two objects are - split apart. The {@link WCMatcher WCMatcher} class represents the maching - object. - - The WCPattern class works primarily off of "compiled" patterns. A typical - instantiation of a regular expression looks like: - -

-  WCPattern * p = WCPattern::compile(L"a*b");
-  WCMatcher * m = p->createWCMatcher(L"aaaaaab");
-  if (m->matches()) ...
-  
- - However, if you do not need to use a pattern more than once, it is often times - okay to use the WCPattern's static methods insteads. An example looks like this: - -
-  if (WCPattern::matches(L"a*b", L"aaaab")) { ... }
-  
- - This class does not currently support unicode. The unicode update for this - class is coming soon. - - This class is partially immutable. It is completely safe to call createWCMatcher - concurrently in different threads, but the other functions (e.g. split) should - not be called concurrently on the same WCPattern. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- Construct - - Matches - -
-   -
- Characters -
- x - - The character x -
- \\ - - The character \ -
- \0nn - - The character with octal ASCII value nn -
- \0nnn - - The character with octal ASCII value nnn -
- \xhh - - The character with hexadecimal ASCII value hh -
- \t - - A tab character -
- \r - - A carriage return character -
- \n - - A new-line character -
-   -
- Character Classes -
- [abc] - - Either a, b, or c -
- [^abc] - - Any character but a, b, or c -
- [a-zA-Z] - - Any character ranging from a thru z, or - A thru Z -
- [^a-zA-Z] - - Any character except those ranging from a thru - z, or A thru Z -
- [a\-z] - - Either a, -, or z -
- [a-z[A-Z]] - - Same as [a-zA-Z] -
- [a-z&&[g-i]] - - Any character in the intersection of a-z and - g-i -
- [a-z&&[^g-i]] - - Any character in a-z and not in g-i -
-   -
- Prefefined character classes -
- . - - Any character. Multiline matching must be compiled into the pattern for - . to match a \r or a \n. - Even if multiline matching is enabled, . will not - match a \r\n, only a \r or a \n. -
- \d - - [0-9] -
- \D - - [^\d] -
- \s - - [ \t\r\n\x0B] -
- \S - - [^\s] -
- \w - - [a-zA-Z0-9_] -
- \W - - [^\w] -
-   -
- POSIX character classes -
- \p{Lower} - - [a-z] -
- \p{Upper} - - [A-Z] -
- \p{ASCII} - - [\x00-\x7F] -
- \p{Alpha} - - [a-zA-Z] -
- \p{Digit} - - [0-9] -
- \p{Alnum} - - [\w&&[^_]] -
- \p{Punct} - - [!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~] -
- \p{XDigit} - - [a-fA-F0-9] -
-   -
- Boundary Matches -
- ^ - - The beginning of a line. Also matches the beginning of input. -
- $ - - The end of a line. Also matches the end of input. -
- \b - - A word boundary -
- \B - - A non word boundary -
- \A - - The beginning of input -
- \G - - The end of the previous match. Ensures that a "next" match will only - happen if it begins with the character immediately following the end of - the "current" match. -
- \Z - - The end of input. Will also match if there is a single trailing - \r\n, a single trailing \r, or a single - trailing \n. -
- \z - - The end of input -
-   -
- Greedy Quantifiers -
- x? - - x, either zero times or one time -
- x* - - x, zero or more times -
- x+ - - x, one or more times -
- x{n} - - x, exactly n times -
- x{n,} - - x, at least n times -
- x{,m} - - x, at most m times -
- x{n,m} - - x, at least n times and at most - m times -
-   -
- Possessive Quantifiers -
- x?+ - - x, either zero times or one time -
- x*+ - - x, zero or more times -
- x++ - - x, one or more times -
- x{n}+ - - x, exactly n times -
- x{n,}+ - - x, at least n times -
- x{,m}+ - - x, at most m times -
- x{n,m}+ - - x, at least n times and at most - m times -
-   -
- Reluctant Quantifiers -
- x?? - - x, either zero times or one time -
- x*? - - x, zero or more times -
- x+? - - x, one or more times -
- x{n}? - - x, exactly n times -
- x{n,}? - - x, at least n times -
- x{,m}? - - x, at most m times -
- x{n,m}? - - x, at least n times and at most - m times -
-   -
- Operators -
- xy - - x then y -
- x|y - - x or y -
- (x) - - x as a capturing group -
-   -
- Quoting -
- \Q - - Nothing, but treat every character (including \s) literally until a - matching \E -
- \E - - Nothing, but ends its matching \Q -
-   -
- Special Constructs -
- (?:x) - - x, but not as a capturing group -
- (?=x) - - x, via positive lookahead. This means that the - expression will match only if it is trailed by x. - It will not "eat" any of the characters matched by - x. -
- (?!x) - - x, via negative lookahead. This means that the - expression will match only if it is not trailed by - x. It will not "eat" any of the characters - matched by x. -
- (?<=x) - - x, via positive lookbehind. x - cannot contain any quantifiers. -
- (?x) - - x, via negative lookbehind. x - cannot contain any quantifiers. -
- (?>x) - - x{1}+ -
-   -
- Registered Expression Matching -
- {x} - - The registered pattern x -
- -
- - Begin Text Extracted And Modified From java.util.regex.WCPattern documentation - -

Backslashes, escapes, and quoting

- -

The backslash character ((wchar_t)'\') serves to introduce escaped - constructs, as defined in the table above, as well as to quote characters - that otherwise would be interpreted as unescaped constructs. Thus the - expression \\ matches a single backslash and \{ matches a - left brace. - -

It is an error to use a backslash prior to any alphabetic character that - does not denote an escaped construct; these are reserved for future - extensions to the regular-expression language. A backslash may be used - prior to a non-alphabetic character regardless of whether that character is - part of an unescaped construct. - -

It is necessary to double backslashes in string literals that represent - regular expressions to protect them from interpretation by a compiler. The - string literal "\b", for example, matches a single backspace - character when interpreted as a regular expression, while - "\\b" matches a word boundary. The string litera - "\(hello\)" is illegal and leads to a compile-time error; - in order to match the string (hello) the string literal - "\\(hello\\)" must be used. - -

Character Classes

- -

Character classes may appear within other character classes, and - may be composed by the union operator (implicit) and the intersection - operator (&&). - The union operator denotes a class that contains every character that is - in at least one of its operand classes. The intersection operator - denotes a class that contains every character that is in both of its - operand classes. - -

The precedence of character-class operators is as follows, from - highest to lowest: - -

- - - - - - - - - - - - - - - - -
1    Literal escape    \x
2    Rangea-z
3    Grouping[...]
4    Intersection[a-z&&[aeiou]]
5    Union[a-e][i-u]
- -

Note that a different set of metacharacters are in effect inside - a character class than outside a character class. For instance, the - regular expression . loses its special meaning inside a - character class, while the expression - becomes a range - forming metacharacter. - - - - -

Groups and capturing

- -

Capturing groups are numbered by counting their opening parentheses from - left to right. In the expression ((A)(B(C))), for example, there - are four such groups:

- -
- - - - - - - - - - -
1    ((A)(B(C)))
2    (A)
3    (B(C))
4    (C)
- -

Group zero always stands for the entire expression. - -

Capturing groups are so named because, during a match, each subsequence - of the input sequence that matches such a group is saved. The captured - subsequence may be used later in the expression, via a back reference, and - may also be retrieved from the matcher once the match operation is complete. - -

The captured input associated with a group is always the subsequence - that the group most recently matched. If a group is evaluated a second time - because of quantification then its previously-captured value, if any, will - be retained if the second evaluation fails. Matching the string - L"aba" against the expression (a(b)?)+, for example, leaves - group two set to L"b". All captured input is discarded at the - beginning of each match. - -

Groups beginning with (? are pure, non-capturing groups - that do not capture text and do not count towards the group total. - - -

WC support

- -

Coming Soon. - -

Comparison to Perl 5

- -

The WCPattern engine performs traditional NFA-based matching - with ordered alternation as occurs in Perl 5. - -

Perl constructs not supported by this class:

- -
    - -
  • The conditional constructs (?{X}) and - (?(condition)X|Y), -

  • - -
  • The embedded code constructs (?{code}) - and (??{code}),

  • - -
  • The embedded comment syntax (?#comment), and

  • - -
  • The preprocessing operations \l \u, - \L, and \U.

  • - -
  • Embedded flags

  • - -
- -

Constructs supported by this class but not by Perl:

- -
    - -
  • Possessive quantifiers, which greedily match as much as they can - and do not back off, even when doing so would allow the overall match to - succeed.

  • - -
  • Character-class union and intersection as described - above.

  • - -
- -

Notable differences from Perl:

- -
    - -
  • In Perl, \1 through \9 are always interpreted - as back references; a backslash-escaped number greater than 9 is - treated as a back reference if at least that many subexpressions exist, - otherwise it is interpreted, if possible, as an octal escape. In this - class octal escapes must always begin with a zero. In this class, - \1 through \9 are always interpreted as back - references, and a larger number is accepted as a back reference if at - least that many subexpressions exist at that point in the regular - expression, otherwise the parser will drop digits until the number is - smaller or equal to the existing number of groups or it is one digit. -

  • - -
  • Perl uses the g flag to request a match that resumes - where the last match left off. This functionality is provided implicitly - by the WCMatcher class: Repeated invocations of the - find method will resume where the last match left off, - unless the matcher is reset.

  • - -
  • Perl is forgiving about malformed matching constructs, as in the - expression *a, as well as dangling brackets, as in the - expression abc], and treats them as literals. This - class also strict and will not compile a pattern when dangling characters - are encountered.

  • - -
- - -

For a more precise description of the behavior of regular expression - constructs, please see - Mastering Regular Expressions, 2nd Edition, Jeffrey E. F. Friedl, - O'Reilly and Associates, 2002. -

-

- - End Text Extracted And Modified From java.util.regex.WCPattern documentation - -


- - @author Jeffery Stuart - @since March 2003, Stable Since November 2004 - @version 1.07.00 - @memo A class used to represent "PERL 5"-ish regular expressions - */ -class WCPattern -{ - friend class WCMatcher; - friend class NFAUNode; - friend class NFAQuantifierUNode; - private: - /** - This constructor should not be called directly. Those wishing to use the - WCPattern class should instead use the {@link compile compile} method. - - @param rhs The pattern to compile - @memo Creates a new pattern from the regular expression in rhs. - */ - WCPattern(const bkstring & rhs); - protected: - /** - This currently is not used, so don't try to do anything with it. - @memo Holds all the compiled patterns for quick access. - */ - static std::map compiledWCPatterns; - /** - Holds all of the registered patterns as strings. Due to certain problems - with compilation of patterns, especially with capturing groups, this seemed - to be the best way to do it. - */ - static std::map > registeredWCPatterns; - protected: - /** - Holds all the NFA nodes used. This makes deletion of a pattern, as well as - clean-up from an unsuccessful compile much easier and faster. - */ - std::map nodes; - /** - Used when methods like split are called. The matcher class uses a lot of - dynamic memeory, so having an instance increases speedup of certain - operations. - */ - WCMatcher * matcher; - /** - The front node of the NFA. - */ - NFAUNode * head; - /** - The actual regular expression we rerpesent - */ - bkstring pattern; - /** - Flag used during compilation. Once the pattern is successfully compiled, - error is no longer used. - */ - bool error; - /** - Used during compilation to keep track of the current index into - {@link pattern pattern}. Once the pattern is successfully - compiled, error is no longer used. - */ - int curInd; - /** - The number of capture groups this contains. - */ - int groupCount; - /** - The number of non-capture groups this contains. - */ - int nonCapGroupCount; - /** - The flags specified when this was compiled. - */ - unsigned long flags; - protected: - /** - Raises an error during compilation. Compilation will cease at that point - and compile will return NULL. - */ - void raiseError(); - /** - Convenience function for registering a node in nodes. - @param node The node to register - @return The registered node - */ - NFAUNode * registerNode(NFAUNode * node); - - /** - Calculates the union of two strings. This function will first sort the - strings and then use a simple selection algorithm to find the union. - @param s1 The first "class" to union - @param s2 The second "class" to union - @return A new string containing all unique characters. Each character - must have appeared in one or both of s1 and - s2. - */ - bkstring classUnion (bkstring s1, bkstring s2) const; - /** - Calculates the intersection of two strings. This function will first sort - the strings and then use a simple selection algorithm to find the - intersection. - @param s1 The first "class" to intersect - @param s2 The second "class" to intersect - @return A new string containing all unique characters. Each character - must have appeared both s1 and s2. - */ - bkstring classIntersect (bkstring s1, bkstring s2) const; - /** - Calculates the negation of a string. The negation is the set of all - characters between \x00 and \xFF not - contained in s1. - @param s1 The "class" to be negated. - @param s2 The second "class" to intersect - @return A new string containing all unique characters. Each character - must have appeared both s1 and s2. - */ - bkstring classNegate (bkstring s1) const; - /** - Creates a new "class" representing the range from low thru - hi. This function will wrap if low > - hi. This is a feature, not a buf. Sometimes it is useful - to be able to say [\x70-\x10] instead of [\x70-\x7F\x00-\x10]. - @param low The beginning character - @param hi The ending character - @return A new string containing all the characters from low thru hi. - */ - bkstring classCreateRange(wchar_t low, wchar_t hi) const; - - /** - Extracts a decimal number from the substring of member-variable - {@link pattern pattern} starting at start and - ending at end. - @param start The starting index in {@link pattern pattern} - @param end The last index in {@link pattern pattern} - @return The decimal number in {@link pattern pattern} - */ - int getInt(int start, int end); - /** - Parses a {n,m} string out of the member-variable - {@link pattern pattern} stores the result in sNum - and eNum. - @param sNum Output parameter. The minimum number of matches required - by the curly quantifier are stored here. - @param eNum Output parameter. The maximum number of matches allowed - by the curly quantifier are stored here. - @return Success/Failure. Fails when the curly does not have the proper - syntax - */ - bool quantifyCurly(int & sNum, int & eNum); - /** - Tries to quantify the currently parsed group. If the group being parsed - is indeed quantified in the member-variable - {@link pattern pattern}, then the NFA is modified accordingly. - @param start The starting node of the current group being parsed - @param stop The ending node of the current group being parsed - @param gn The group number of the current group being parsed - @return The node representing the starting node of the group. If the - group becomes quantified, then this node is not necessarily - a GroupHead node. - */ - NFAUNode * quantifyGroup(NFAUNode * start, NFAUNode * stop, const int gn); - - /** - Tries to quantify the last parsed expression. If the character was indeed - quantified, then the NFA is modified accordingly. - @param newNode The recently created expression node - @return The node representing the last parsed expression. If the - expression was quantified, return value != newNode - */ - NFAUNode * quantify(NFAUNode * newNode); - /** - Parses the current class being examined in - {@link pattern pattern}. - @return A string of unique characters contained in the current class being - parsed - */ - bkstring parseClass(); - /** - Parses the current POSIX class being examined in - {@link pattern pattern}. - @return A string of unique characters representing the POSIX class being - parsed - */ - bkstring parsePosix(); - /** - Returns a string containing the octal character being parsed - @return The string contained the octal value being parsed - */ - bkstring parseOctal(); - /** - Returns a string containing the hex character being parsed - @return The string contained the hex value being parsed - */ - bkstring parseHex(); - /** - Returns a new node representing the back reference being parsed - @return The new node representing the back reference being parsed - */ - NFAUNode * parseBackref(); - /** - Parses the escape sequence currently being examined. Determines if the - escape sequence is a class, a single character, or the beginning of a - quotation sequence. - @param inv Output parameter. Whether or not to invert the returned class - @param quo Output parameter. Whether or not this sequence starts a - quotation. - @return The characters represented by the class - */ - bkstring parseEscape(bool & inv, bool & quo); - /** - Parses a supposed registered pattern currently under compilation. If the - sequence of characters does point to a registered pattern, then the - registered pattern is appended to *end. The registered pattern - is parsed with the current compilation flags. - @param end The ending node of the thus-far compiled pattern - @return The new end node of the current pattern - */ - NFAUNode * parseRegisteredWCPattern(NFAUNode ** end); - /** - Parses a lookbehind expression. Appends the necessary nodes - *end. - @param pos Positive or negative look behind - @param end The ending node of the current pattern - @return The new end node of the current pattern - */ - NFAUNode * parseBehind(const bool pos, NFAUNode ** end); - /** - Parses the current expression and tacks on nodes until a \E is found. - @return The end of the current pattern - */ - NFAUNode * parseQuote(); - /** - Parses {@link pattern pattern}. This function is called - recursively when an or (|) or a group is encountered. - @param inParen Are we currently parsing inside a group - @param inOr Are we currently parsing one side of an or (|) - @param end The end of the current expression - @return The starting node of the NFA constructed from this parse - */ - NFAUNode * parse(const bool inParen = 0, const bool inOr = 0, NFAUNode ** end = NULL); - public: - /// We should match regardless of case - const static unsigned long CASE_INSENSITIVE; - /// We are implicitly quoted - const static unsigned long LITERAL; - /// @memo We should treat a . as [\x00-\x7F] - const static unsigned long DOT_MATCHES_ALL; - /** ^ and $ should anchor to the beginning and - ending of lines, not all input - */ - const static unsigned long MULTILINE_MATCHING; - /** When enabled, only instances of \n are recognized as - line terminators - */ - const static unsigned long UNIX_LINE_MODE; - /// The absolute minimum number of matches a quantifier can match (0) - const static int MIN_QMATCH; - /// The absolute maximum number of matches a quantifier can match (0x7FFFFFFF) - const static int MAX_QMATCH; - public: - /** - Call this function to compile a regular expression into a - WCPattern object. Special values can be assigned to - mode when certain non-standard behaviors are expected from - the WCPattern object. - @param pattern The regular expression to compile - @param mode A bitwise or of flags signalling what special behaviors are - wanted from this WCPattern object - @return If successful, compile returns a WCPattern - pointer. Upon failure, compile returns - NULL - */ - static WCPattern * compile (const bkstring & pattern, - const unsigned long mode = 0); - /** - Dont use this function. This function will compile a pattern, and cache - the result. This will eventually be used as an optimization when people - just want to call static methods using the same pattern over and over - instead of first compiling the pattern and then using the compiled - instance for matching. - @param pattern The regular expression to compile - @param mode A bitwise or of flags signalling what special behaviors are - wanted from this WCPattern object - @return If successful, compileAndKeep returns a - WCPattern pointer. Upon failure, compile - returns NULL. - */ - static WCPattern * compileAndKeep (const bkstring & pattern, - const unsigned long mode = 0); - - /** - Searches through replace and replaces all substrings matched - by pattern with str. str may - contain backreferences (e.g. \1) to capture groups. A typical - invocation looks like: -

- - WCPattern::replace(L"(a+)b(c+)", L"abcccbbabcbabc", L"\\2b\\1"); - -

- which would replace abcccbbabcbabc with - cccbabbcbabcba. - @param pattern The regular expression - @param str The replacement text - @param replacementText The string in which to perform replacements - @param mode The special mode requested of the WCPattern - during the replacement process - @return The text with the replacement string substituted where necessary - */ - static bkstring replace (const bkstring & pattern, - const bkstring & str, - const bkstring & replacementText, - const unsigned long mode = 0); - - /** - Splits the specified string over occurrences of the specified pattern. - Empty strings can be optionally ignored. The number of strings returned is - configurable. A typical invocation looks like: -

- - bkstring str(strSize, 0);
- FILE * fp = fopen(fileName, "r");
- fread((char*)str.data(), strSize * 2, 1, fp);
- fclose(fp);
-
- std::vector<bkstring> lines = WCPattern::split(L"[\r\n]+", str, true);
-
-
- - @param pattern The regular expression - @param replace The string to split - @param keepEmptys Whether or not to keep empty strings - @param limit The maximum number of splits to make - @param mode The special mode requested of the WCPattern - during the split process - @return All substrings of str split across pattern. - */ - static std::vector split (const bkstring & pattern, - const bkstring & str, - const bool keepEmptys = 0, - const unsigned long limit = 0, - const unsigned long mode = 0); - - /** - Finds all the instances of the specified pattern within the string. You - should be careful to only pass patterns with a minimum length of one. For - example, the pattern a* can be matched by an empty string, so - instead you should pass a+ since at least one character must - be matched. A typical invocation of findAll looks like: -

- - std::vector<td::string> numbers = WCPattern::findAll(L"\\d+", string); - -

- - @param pattern The pattern for which to search - @param str The string to search - @param mode The special mode requested of the WCPattern - during the find process - @return All instances of pattern in str - */ - static std::vector findAll (const bkstring & pattern, - const bkstring & str, - const unsigned long mode = 0); - - /** - Determines if an entire string matches the specified pattern - - @param pattern The pattern for to match - @param str The string to match - @param mode The special mode requested of the WCPattern - during the replacement process - @return True if str is recognized by pattern - */ - static bool matches (const bkstring & pattern, - const bkstring & str, - const unsigned long mode = 0); - - /** - Registers a pattern under a specific name for use in later compilations. - A typical invocation and later use looks like: -

- - WCPattern::registerWCPattern(L"ip", L"(?:\\d{1,3}\\.){3}\\d{1,3}");
- WCPattern * p1 = WCPattern::compile(L"{ip}:\\d+");
- WCPattern * p2 = WCPattern::compile(L"Connection from ({ip}) on port \\d+");
-
-

- Multiple calls to registerWCPattern with the same - name will result in the pattern getting overwritten. - - @param name The name to give to the pattern - @param pattern The pattern to register - @param mode Any special flags to use when compiling pattern - @return Success/Failure. Fails only if pattern has invalid - syntax - */ - static bool registerWCPattern(const bkstring & name, - const bkstring & pattern, - const unsigned long mode = 0); - - /** - Clears the pattern registry - */ - static void unregisterWCPatterns(); - /** - Don't use - */ - static void clearWCPatternCache(); - - /** - Searches through a string for the nth match of the - given pattern in the string. Match indeces start at zero, not one. - A typical invocation looks like this: -

- - std::pair<bkstring, int> match = WCPattern::findNthMatch(L"\\d{1,3}", L"192.168.1.101:22", 1);
- wprintf(L"%s %i\n", match.first.c_str(), match.second);
-
- Output: 168 4
-
- - @param pattern The pattern for which to search - @param str The string to search - @param matchNum Which match to find - @param mode Any special flags to use during the matching process - @return A string and an integer. The string is the string matched. The - integer is the starting location of the matched string in - str. You can check for success/failure by making sure - that the integer returned is greater than or equal to zero. - */ - static std::pair findNthMatch (const bkstring & pattern, - const bkstring & str, - const int matchNum, - const unsigned long mode = 0); - public: - /** - Deletes all NFA nodes allocated during compilation - */ - ~WCPattern(); - - bkstring replace (const bkstring & str, - const bkstring & replacementText); - std::vector split (const bkstring & str, const bool keepEmptys = 0, - const unsigned long limit = 0); - std::vector findAll (const bkstring & str); - bool matches (const bkstring & str); - /** - Returns the flags used during compilation of this pattern - @return The flags used during compilation of this pattern - */ - unsigned long getFlags () const; - /** - Returns the regular expression this pattern represents - @return The regular expression this pattern represents - */ - bkstring getWCPattern () const; - /** - Creates a matcher object using the specified string and this pattern. - @param str The string to match against - @return A new matcher using object using this pattern and the specified - string - */ - WCMatcher * createWCMatcher (const bkstring & str); -}; - -class NFAUNode -{ - friend class WCMatcher; - public: - NFAUNode * next; - NFAUNode(); - virtual ~NFAUNode(); - virtual void findAllNodes(std::map & soFar); - virtual int match(const bkstring & str, WCMatcher * matcher, const int curInd = 0) const = 0; - inline virtual bool isGroupHeadNode() const { return false; } - inline virtual bool isStartOfInputNode() const { return false; } -}; -class NFACharUNode : public NFAUNode -{ - protected: - wchar_t ch; - public: - NFACharUNode(const wchar_t c); - virtual int match(const bkstring & str, WCMatcher * matcher, const int curInd = 0) const; -}; -class NFACICharUNode : public NFAUNode -{ - protected: - wchar_t ch; - public: - NFACICharUNode(const wchar_t c); - virtual int match(const bkstring & str, WCMatcher * matcher, const int curInd = 0) const; -}; -class NFAStartUNode : public NFAUNode -{ - public: - NFAStartUNode(); - virtual int match(const bkstring & str, WCMatcher * matcher, const int curInd = 0) const; -}; -class NFAEndUNode : public NFAUNode -{ - public: - NFAEndUNode(); - virtual int match(const bkstring & str, WCMatcher * matcher, const int curInd = 0) const; -}; -class NFAQuantifierUNode : public NFAUNode -{ - public: - int min, max; - NFAUNode * inner; - virtual void findAllNodes(std::map & soFar); - NFAQuantifierUNode(WCPattern * pat, NFAUNode * internal, - const int minMatch = WCPattern::MIN_QMATCH, - const int maxMatch = WCPattern::MAX_QMATCH); - virtual int match(const bkstring & str, WCMatcher * matcher, const int curInd = 0) const; -}; -class NFAGreedyQuantifierUNode : public NFAQuantifierUNode -{ - public: - NFAGreedyQuantifierUNode(WCPattern * pat, NFAUNode * internal, - const int minMatch = WCPattern::MIN_QMATCH, - const int maxMatch = WCPattern::MAX_QMATCH); - virtual int match(const bkstring & str, WCMatcher * matcher, const int curInd = 0) const; - virtual int matchInternal(const bkstring & str, WCMatcher * matcher, const int curInd, const int soFar) const; -}; -class NFALazyQuantifierUNode : public NFAQuantifierUNode -{ - public: - NFALazyQuantifierUNode(WCPattern * pat, NFAUNode * internal, - const int minMatch = WCPattern::MIN_QMATCH, - const int maxMatch = WCPattern::MAX_QMATCH); - virtual int match(const bkstring & str, WCMatcher * matcher, const int curInd = 0) const; -}; -class NFAPossessiveQuantifierUNode : public NFAQuantifierUNode -{ - public: - NFAPossessiveQuantifierUNode(WCPattern * pat, NFAUNode * internal, - const int minMatch = WCPattern::MIN_QMATCH, - const int maxMatch = WCPattern::MAX_QMATCH); - virtual int match(const bkstring & str, WCMatcher * matcher, const int curInd = 0) const; -}; -class NFAAcceptUNode : public NFAUNode -{ - public: - NFAAcceptUNode(); - virtual int match(const bkstring & str, WCMatcher * matcher, const int curInd = 0) const; -}; -class NFAClassUNode : public NFAUNode -{ - public: - bool inv; - std::map vals; - NFAClassUNode(const bool invert = 0); - NFAClassUNode(const bkstring & clazz, const bool invert); - virtual int match(const bkstring & str, WCMatcher * matcher, const int curInd = 0) const; -}; -class NFACIClassUNode : public NFAUNode -{ - public: - bool inv; - std::map vals; - NFACIClassUNode(const bool invert = 0); - NFACIClassUNode(const bkstring & clazz, const bool invert); - virtual int match(const bkstring & str, WCMatcher * matcher, const int curInd = 0) const; -}; -class NFASubStartUNode : public NFAUNode -{ - public: - NFASubStartUNode(); - virtual int match(const bkstring & str, WCMatcher * matcher, const int curInd = 0) const; -}; -class NFAOrUNode : public NFAUNode -{ - public: - NFAUNode * one; - NFAUNode * two; - NFAOrUNode(NFAUNode * first, NFAUNode * second); - virtual void findAllNodes(std::map & soFar); - virtual int match(const bkstring & str, WCMatcher * matcher, const int curInd = 0) const; -}; -class NFAQuoteUNode : public NFAUNode -{ - public: - bkstring qStr; - NFAQuoteUNode(const bkstring & quoted); - virtual int match(const bkstring & str, WCMatcher * matcher, const int curInd = 0) const; -}; -class NFACIQuoteUNode : public NFAUNode -{ - public: - bkstring qStr; - NFACIQuoteUNode(const bkstring & quoted); - virtual int match(const bkstring & str, WCMatcher * matcher, const int curInd = 0) const; -}; -class NFALookAheadUNode : public NFAUNode -{ - public: - bool pos; - NFAUNode * inner; - NFALookAheadUNode(NFAUNode * internal, const bool positive); - virtual void findAllNodes(std::map & soFar); - virtual int match(const bkstring & str, WCMatcher * matcher, const int curInd = 0) const; -}; -class NFALookBehindUNode : public NFAUNode -{ - public: - bool pos; - bkstring mStr; - NFALookBehindUNode(const bkstring & str, const bool positive); - virtual int match(const bkstring & str, WCMatcher * matcher, const int curInd = 0) const; -}; -class NFAStartOfLineUNode : public NFAUNode -{ - public: - NFAStartOfLineUNode(); - virtual int match(const bkstring & str, WCMatcher * matcher, const int curInd = 0) const; -}; -class NFAEndOfLineUNode : public NFAUNode -{ - public: - NFAEndOfLineUNode(); - virtual int match(const bkstring & str, WCMatcher * matcher, const int curInd = 0) const; -}; -class NFAReferenceUNode : public NFAUNode -{ - public: - int gi; - NFAReferenceUNode(const int groupIndex); - virtual int match(const bkstring & str, WCMatcher * matcher, const int curInd = 0) const; -}; -class NFAStartOfInputUNode : public NFAUNode -{ - public: - NFAStartOfInputUNode(); - virtual int match(const bkstring & str, WCMatcher * matcher, const int curInd = 0) const; - inline virtual bool isStartOfInputNode() const { return false; } -}; -class NFAEndOfInputUNode : public NFAUNode -{ - public: - bool term; - NFAEndOfInputUNode(const bool lookForTerm); - virtual int match(const bkstring & str, WCMatcher * matcher, const int curInd = 0) const; -}; -class NFAWordBoundaryUNode : public NFAUNode -{ - public: - bool pos; - NFAWordBoundaryUNode(const bool positive); - virtual int match(const bkstring & str, WCMatcher * matcher, const int curInd = 0) const; -}; -class NFAEndOfMatchUNode : public NFAUNode -{ - public: - NFAEndOfMatchUNode(); - virtual int match(const bkstring & str, WCMatcher * matcher, const int curInd = 0) const; -}; -class NFAGroupHeadUNode : public NFAUNode -{ - public: - int gi; - NFAGroupHeadUNode(const int groupIndex); - virtual int match(const bkstring & str, WCMatcher * matcher, const int curInd = 0) const; - inline virtual bool isGroupHeadNode() const { return false; } -}; -class NFAGroupTailUNode : public NFAUNode -{ - public: - int gi; - NFAGroupTailUNode(const int groupIndex); - virtual int match(const bkstring & str, WCMatcher * matcher, const int curInd = 0) const; -}; -class NFAGroupLoopPrologueUNode : public NFAUNode -{ - public: - int gi; - NFAGroupLoopPrologueUNode(const int groupIndex); - virtual int match(const bkstring & str, WCMatcher * matcher, const int curInd = 0) const; -}; -class NFAGroupLoopUNode : public NFAUNode -{ - public: - int gi, min, max, type; - NFAUNode * inner; - NFAGroupLoopUNode(NFAUNode * internal, const int minMatch, - const int maxMatch, const int groupIndex, const int matchType); - virtual void findAllNodes(std::map & soFar); - virtual int match(const bkstring & str, WCMatcher * matcher, const int curInd = 0) const; - int matchGreedy(const bkstring & str, WCMatcher * matcher, const int curInd = 0) const; - int matchLazy(const bkstring & str, WCMatcher * matcher, const int curInd = 0) const; - int matchPossessive(const bkstring & str, WCMatcher * matcher, const int curInd = 0) const; -}; - -#endif - diff --git a/plugins/SmileyAdd/regexp/test.cpp b/plugins/SmileyAdd/regexp/test.cpp deleted file mode 100644 index bb41566f96..0000000000 --- a/plugins/SmileyAdd/regexp/test.cpp +++ /dev/null @@ -1,38 +0,0 @@ -#include -#include -#include -#include - -int main() -{ - { - Pattern * p = Pattern::compile("^([^:]*)://([^/:]*)((?::[0-9]+)?)/?(([^?]*)((?:\\?.*)?))$"); - Matcher * m0 = p->createMatcher("http://www.example.com:80/test.php?a=1&a=1&a=1"); - - if (m0->matches()) - { - std::vector groups = m0->getGroups(true); - for (int i = 0; i < (int)groups.size(); ++i) - { - printf("m->group(%d): %s\n", i, groups[i].c_str()); - } - } - } - { - std::wstring pat = L"^([^:]*)://([^/:]*)((?::[0-9]+)?)/?(([^?]*)((?:\\?.*)?))$"; - std::wstring mat = L"http://www.example.com:80/test.php?a=1&a=1&a=1"; - UnicodePattern * p = UnicodePattern::compile(pat); - UnicodeMatcher * m0 = p->createUnicodeMatcher(mat); - - if (m0->matches()) - { - std::vector groups = m0->getGroups(true); - for (int i = 0; i < (int)groups.size(); ++i) - { - wprintf(L"m->group(%d): %s\n", i, groups[i].c_str()); - } - } - } - - return 0; -} diff --git a/plugins/SmileyAdd/resource.h b/plugins/SmileyAdd/resource.h deleted file mode 100644 index bdf799fe2c..0000000000 --- a/plugins/SmileyAdd/resource.h +++ /dev/null @@ -1,49 +0,0 @@ -//{{NO_DEPENDENCIES}} -// Microsoft Visual C++ generated include file. -// Used by resource.rc -// -#define IDI_SMILINGICON 124 -#define IDD_OPT_SMILEYS 245 -#define IDC_CATEGORYLIST 1017 -#define IDC_PLUGENABLED 1019 -#define IDC_INPUTSMILEYS 1020 -#define IDC_DCURSORSMILEY 1021 -#define IDC_LIBNAME 1023 -#define IDC_SPACES 1024 -#define IDC_LIBAUTHOR 1026 -#define IDC_LIBVERSION 1027 -#define IDC_SCALETOTEXTHEIGHT 1037 -#define IDC_APPENDSPACES 1040 -#define IDC_SMLOPTBUTTON 1045 -#define IDC_SCALEALLSMILEYS 1046 -#define IDC_IEVIEWSTYLE 1047 -#define IDC_ANIMATESEL 1048 -#define IDC_USESTDPACK 1049 -#define IDC_ANIMATEDLG 1051 -#define IDC_DISABLECUSTOM 1052 -#define IDC_DISABLECUSTOM2 1053 -#define IDC_HQSCALING 1053 -#define IDC_SELCLR 1055 -#define IDC_NEWCATEGORY 1058 -#define IDC_ADDCATEGORY 1059 -#define IDC_DELETECATEGORY 1060 -#define IDC_SMLBUT 1061 -#define IDC_MAXCUSTSMSZ 1062 -#define IDC_MAXCUSTSPIN 1063 -#define IDC_MINSMSZ 1064 -#define IDC_MINSPIN 1065 -#define IDC_BROWSE 1184 -#define IDC_FILENAME 1271 -#define IDC_STATIC -1 - -// Next default values for new objects -// -#ifdef APSTUDIO_INVOKED -#ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_NO_MFC 1 -#define _APS_NEXT_RESOURCE_VALUE 127 -#define _APS_NEXT_COMMAND_VALUE 40001 -#define _APS_NEXT_CONTROL_VALUE 1064 -#define _APS_NEXT_SYMED_VALUE 101 -#endif -#endif diff --git a/plugins/SmileyAdd/resource.rc b/plugins/SmileyAdd/resource.rc deleted file mode 100644 index 8c53c504bf..0000000000 --- a/plugins/SmileyAdd/resource.rc +++ /dev/null @@ -1,214 +0,0 @@ -// Microsoft Visual C++ generated resource script. -// -#include "resource.h" - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -#include -#include "version.h" - -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// Neutral resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NEU) -#ifdef _WIN32 -LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL -#pragma code_page(1252) -#endif //_WIN32 - -///////////////////////////////////////////////////////////////////////////// -// -// Dialog -// - -IDD_OPT_SMILEYS DIALOGEX 0, 0, 320, 256 -STYLE DS_SETFONT | DS_3DLOOK | DS_FIXEDSYS | WS_CHILD | WS_VISIBLE -EXSTYLE WS_EX_CONTROLPARENT -FONT 8, "MS Shell Dlg", 400, 0, 0x1 -BEGIN - GROUPBOX "Smiley Categories",IDC_STATIC,6,3,310,102 - CONTROL "",IDC_CATEGORYLIST,"SysTreeView32",TVS_DISABLEDRAGDROP | TVS_SHOWSELALWAYS | TVS_CHECKBOXES | WS_BORDER | WS_HSCROLL | WS_TABSTOP,14,13,104,83 - CONTROL "Specify Smiley Pack for each category",IDC_USESTDPACK, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,124,11,165,11 - EDITTEXT IDC_FILENAME,124,25,185,12,ES_AUTOHSCROLL,WS_EX_ACCEPTFILES - PUSHBUTTON "...",IDC_BROWSE,296,15,13,11 - LTEXT "Name:",IDC_STATIC,125,42,30,8 - LTEXT "",IDC_LIBNAME,159,41,150,11,SS_SUNKEN | SS_PATHELLIPSIS - LTEXT "Author:",IDC_STATIC,125,56,30,8 - LTEXT "",IDC_LIBAUTHOR,159,55,104,11,SS_SUNKEN | SS_PATHELLIPSIS - LTEXT "Version:",IDC_STATIC,125,70,30,8 - LTEXT "",IDC_LIBVERSION,159,70,104,11,SS_SUNKEN | SS_PATHELLIPSIS - PUSHBUTTON "Preview",IDC_SMLOPTBUTTON,270,55,37,25 - EDITTEXT IDC_NEWCATEGORY,126,85,129,13,ES_AUTOHSCROLL - PUSHBUTTON "+",IDC_ADDCATEGORY,263,84,17,15 - PUSHBUTTON "-",IDC_DELETECATEGORY,290,84,16,14 - GROUPBOX "Display",IDC_STATIC,6,106,310,54 - CONTROL "Replace only smileys surrounded by spaces",IDC_SPACES, - "Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,16,115,198,12,WS_EX_RTLREADING - CONTROL "Scale smiley to textheight",IDC_SCALETOTEXTHEIGHT, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,128,147,10 - CONTROL "Animate",IDC_ANIMATEDLG,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,218,116,98,10 - CONTROL "Disable custom smileys",IDC_DISABLECUSTOM,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,138,147,10 - GROUPBOX "Smiley Selector",IDC_STATIC,6,160,310,46 - CONTROL "Surround inserted smiley with spaces",IDC_APPENDSPACES, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,171,235,10 - CONTROL "Use first smiley for selection size",IDC_SCALEALLSMILEYS, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,182,209,10 - CONTROL "IEView style window",IDC_IEVIEWSTYLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,193,198,10 - CONTROL "",IDC_SELCLR,"ColourPicker",WS_TABSTOP,260,170,50,11 - CONTROL "Animate",IDC_ANIMATESEL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,218,193,98,10 - GROUPBOX "Input Area",IDC_STATIC,6,208,145,42 - CONTROL "Enable Smileys",IDC_INPUTSMILEYS,"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,15,219,130,12 - CONTROL "Don't replace at cursor",IDC_DCURSORSMILEY,"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,15,231,130,12 - GROUPBOX "Built-In Message Dialog Support",IDC_STATIC,154,208,162,42 - CONTROL "Disable",IDC_PLUGENABLED,"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,240,217,69,12 - COMBOBOX IDC_SMLBUT,159,230,55,35,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP - LTEXT "Smiley Button",IDC_STATIC,161,219,72,8 - EDITTEXT IDC_MAXCUSTSMSZ,165,128,30,15,ES_AUTOHSCROLL | ES_NUMBER | NOT WS_BORDER,WS_EX_CLIENTEDGE | WS_EX_STATICEDGE - CONTROL "",IDC_MAXCUSTSPIN,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,182,129,11,12 - LTEXT "Max ""Custom Smiley"" height",IDC_STATIC,198,132,118,8 - CONTROL "High Quality smiley scaling",IDC_HQSCALING,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,148,148,10 - EDITTEXT IDC_MINSMSZ,165,144,30,15,ES_AUTOHSCROLL | ES_NUMBER | NOT WS_BORDER,WS_EX_CLIENTEDGE | WS_EX_STATICEDGE - CONTROL "",IDC_MINSPIN,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,182,145,11,12 - LTEXT "Min smiley height",IDC_STATIC,198,148,118,8 -END - - -///////////////////////////////////////////////////////////////////////////// -// -// DESIGNINFO -// - -#ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO -BEGIN - IDD_OPT_SMILEYS, DIALOG - BEGIN - LEFTMARGIN, 6 - RIGHTMARGIN, 316 - TOPMARGIN, 3 - BOTTOMMARGIN, 250 - END -END -#endif // APSTUDIO_INVOKED - -#endif // Neutral resources -///////////////////////////////////////////////////////////////////////////// - - -///////////////////////////////////////////////////////////////////////////// -// English (U.S.) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -#ifdef _WIN32 -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -#pragma code_page(1252) -#endif //_WIN32 - -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -VS_VERSION_INFO VERSIONINFO - FILEVERSION __FILEVERSION_STRING - PRODUCTVERSION __FILEVERSION_STRING - FILEFLAGSMASK 0x17L -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x4L - FILETYPE 0x2L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904b0" - BEGIN - VALUE "CompanyName", "Boris Krasnovskiy" - VALUE "FileDescription", "SmileyAdd Miranda Plugin" - VALUE "FileVersion", __VERSION_STRING - VALUE "InternalName", "SmileyAdd" - VALUE "LegalCopyright", "Copyright (C) 2005 - 2011 Boris Krasnovskiy All Rights Reserved" - VALUE "OriginalFilename", "SmileyAdd.dll" - VALUE "ProductName", " SmileyAdd Miranda Plugin" - VALUE "ProductVersion", __VERSION_STRING - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1200 - END -END - - -///////////////////////////////////////////////////////////////////////////// -// -// Icon -// - -// Icon with lowest ID value placed first to ensure application icon -// remains consistent on all systems. -IDI_SMILINGICON ICON "RES\\smiley.ICO" -#endif // English (U.S.) resources -///////////////////////////////////////////////////////////////////////////// - - -///////////////////////////////////////////////////////////////////////////// -// English (U.K.) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENG) -#ifdef _WIN32 -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_UK -#pragma code_page(1252) -#endif //_WIN32 - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE -BEGIN - "resource.h\0" -END - -2 TEXTINCLUDE -BEGIN - "#include \r\n" - "#include ""version.h""\r\n" - "\0" -END - -3 TEXTINCLUDE -BEGIN - "\r\n" - "\0" -END - -#endif // APSTUDIO_INVOKED - -#endif // English (U.K.) resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// - - -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED - diff --git a/plugins/SmileyAdd/richcall.cpp b/plugins/SmileyAdd/richcall.cpp deleted file mode 100644 index d9b9123c48..0000000000 --- a/plugins/SmileyAdd/richcall.cpp +++ /dev/null @@ -1,554 +0,0 @@ -/* -Miranda SmileyAdd Plugin -Copyright (C) 2008 - 2011 Boris Krasnovskiy All Rights Reserved - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation version 2 -of the License. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#include "general.h" -#include "smileys.h" -#include "smileyroutines.h" -#include "services.h" -#include "options.h" -#include "SmileyBase.h" - -#include -#include - -typedef struct -{ - HWND hwnd; - HANDLE hContact; - WNDPROC wpOrigWndProc; - HWND hToolTip; - int tipActive; - bool inputarea; - bool dontReplace; -} RichEditData; - -typedef struct -{ - HWND hwnd; - WNDPROC wpOrigWndProc; - HWND hwndInput; - HWND hwndLog; -} RichEditOwnerData; - -static int CompareRichEditData(const RichEditData* p1, const RichEditData* p2) -{ - return (int)((INT_PTR)p1->hwnd - (INT_PTR)p2->hwnd); -} -static LIST g_RichEditList(10, CompareRichEditData); - - -static int CompareRichEditData(const RichEditOwnerData* p1, const RichEditOwnerData* p2) -{ - return (int)((INT_PTR)p1->hwnd - (INT_PTR)p2->hwnd); -} -static LIST g_RichEditOwnerList(5, CompareRichEditData); - - -static void SetPosition(HWND hwnd) -{ - IRichEditOle* RichEditOle; - if (SendMessage(hwnd, EM_GETOLEINTERFACE, 0, (LPARAM)&RichEditOle) == 0) - return; - - ITextDocument* TextDocument; - if (RichEditOle->QueryInterface(IID_ITextDocument, (void**)&TextDocument) != S_OK) - { - RichEditOle->Release(); - return; - } - - // retrieve text range - ITextRange* TextRange; - if (TextDocument->Range(0, 0, &TextRange) != S_OK) - { - TextDocument->Release(); - RichEditOle->Release(); - return; - } - TextDocument->Release(); - - int objectCount = RichEditOle->GetObjectCount(); - for (int i = objectCount - 1; i >= 0; i--) - { - REOBJECT reObj = {0}; - reObj.cbStruct = sizeof(REOBJECT); - - HRESULT hr = RichEditOle->GetObject(i, &reObj, REO_GETOBJ_POLEOBJ); - if (FAILED(hr)) continue; - - ISmileyBase *igsc = NULL; - if (reObj.clsid == CLSID_NULL) - reObj.poleobj->QueryInterface(IID_ISmileyAddSmiley, (void**) &igsc); - - reObj.poleobj->Release(); - if (igsc == NULL) continue; - - TextRange->SetRange(reObj.cp, reObj.cp); - - BOOL res; - POINT pt; - RECT rect; - hr = TextRange->GetPoint(tomStart | TA_BOTTOM | TA_LEFT, &pt.x, &pt.y); - if (hr == S_OK) - { - res = ScreenToClient(hwnd, &pt); - rect.bottom = pt.y; - rect.left = pt.x; - } - else - rect.bottom = -1; - - hr = TextRange->GetPoint(tomStart | TA_TOP | TA_LEFT, &pt.x, &pt.y); - if (hr == S_OK) - { - res = ScreenToClient(hwnd, &pt); - rect.top = pt.y; - rect.left = pt.x; - } - else - rect.top = -1; - - igsc->SetPosition(hwnd, &rect); - igsc->Release(); - } - TextRange->Release(); - RichEditOle->Release(); -} - -static void SetTooltip(long x, long y, HWND hwnd, RichEditData* rdt) -{ - TCHAR* smltxt; - int needtip = CheckForTip(x, y, hwnd, &smltxt); - if (needtip != rdt->tipActive) - { - TOOLINFO ti = {0}; - ti.cbSize = sizeof(ti); - ti.uFlags = TTF_IDISHWND | TTF_SUBCLASS; - ti.hwnd = hwnd; - ti.uId = (UINT_PTR)ti.hwnd; - - if (needtip != -1) - { - if (rdt->tipActive == -1) - { - rdt->hToolTip = CreateWindowEx(WS_EX_TOPMOST, TOOLTIPS_CLASS, _T(""), - TTS_NOPREFIX | WS_POPUP, - CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, - hwnd, NULL, g_hInst, NULL); - - SendMessage(rdt->hToolTip, TTM_ADDTOOL, 0, (LPARAM)&ti); - } - - ti.lpszText = smltxt; - SendMessage(rdt->hToolTip, TTM_UPDATETIPTEXT, 0, (LPARAM)&ti); - SendMessage(rdt->hToolTip, TTM_ACTIVATE, TRUE, 0); - } - else - { - if (rdt->tipActive != -1) - { - SendMessage(rdt->hToolTip, TTM_ACTIVATE, FALSE, 0); - DestroyWindow(rdt->hToolTip); - rdt->hToolTip = NULL; - } - } - rdt->tipActive = needtip; - } -} - -static const CHARRANGE allsel = { 0, LONG_MAX }; - - -static void ReplaceContactSmileys(RichEditData *rdt, const CHARRANGE &sel, bool ignoreLast, bool unFreeze) -{ - if ((rdt->inputarea && !opt.InputSmileys) || rdt->dontReplace) return; - SmileyPackCType *smcp = NULL; - SmileyPackType* SmileyPack = GetSmileyPack(NULL, rdt->hContact, rdt->inputarea ? NULL : &smcp); - ReplaceSmileys(rdt->hwnd, SmileyPack, smcp, sel, false, ignoreLast, unFreeze); -} - -static void ReplaceContactSmileysWithText(RichEditData *rdt, CHARRANGE &sel, bool freeze) -{ - if ((rdt->inputarea && !opt.InputSmileys) || rdt->dontReplace) return; - ReplaceSmileysWithText(rdt->hwnd, sel, freeze); -} - -static void SmileyToTextCutPrep(RichEditData* rdt) -{ - if ((rdt->inputarea && !opt.InputSmileys) || rdt->dontReplace) return; - - SendMessage(rdt->hwnd, WM_SETREDRAW, FALSE, 0); - CHARRANGE sel; - SendMessage(rdt->hwnd, EM_EXGETSEL, 0, (LPARAM)&sel); - ReplaceContactSmileysWithText(rdt, sel, true); -} - -static void SmileyToTextCutRest(RichEditData* rdt) -{ - if ((rdt->inputarea && !opt.InputSmileys) || rdt->dontReplace) return; - - CHARRANGE sel; - SendMessage(rdt->hwnd, EM_EXGETSEL, 0, (LPARAM)&sel); - ReplaceContactSmileys(rdt, sel, false, true); - SendMessage(rdt->hwnd, WM_SETREDRAW, TRUE, 0); - RedrawWindow(rdt->hwnd, NULL, NULL, RDW_INVALIDATE | RDW_UPDATENOW); -} - - -static LRESULT CALLBACK RichEditSubclass(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) -{ - RichEditData* rdt = g_RichEditList.find((RichEditData*)&hwnd); - if (rdt == NULL) return 0; - - CHARRANGE sel; - - WNDPROC wpOrigWndProc = rdt->wpOrigWndProc; - - switch(uMsg) - { - case WM_DESTROY: - CloseRichCallback(hwnd, false); - break; - - case WM_COPY: - case WM_CUT: - SmileyToTextCutPrep(rdt); - break; - - case WM_PAINT: - SetPosition(hwnd); - break; - - case EM_STREAMOUT: - if (wParam & SFF_SELECTION) - SmileyToTextCutPrep(rdt); - else - { - sel = allsel; - ReplaceContactSmileysWithText(rdt, sel, true); - } - break; - - case WM_KEYDOWN: - if ((wParam == 'C' || wParam == VK_INSERT) && (GetKeyState(VK_CONTROL) & 0x8000)) - { - SmileyToTextCutPrep(rdt); - } - else if ((wParam == 'X' && (GetKeyState(VK_CONTROL) & 0x8000)) || - (wParam == VK_DELETE && (GetKeyState(VK_SHIFT) & 0x8000))) - { - SmileyToTextCutPrep(rdt); - } - else if (wParam == VK_TAB && ((GetKeyState(VK_CONTROL) | GetKeyState(VK_SHIFT)) & 0x8000) == 0) - { - SendMessage(hwnd, EM_EXGETSEL, 0, (LPARAM)&sel); - sel.cpMin = max(sel.cpMin - 20, 0); - - ReplaceContactSmileysWithText(rdt, sel, true); - } - break; - } - - LRESULT result = CallWindowProc(wpOrigWndProc, hwnd, uMsg, wParam, lParam); - - switch(uMsg) - { - case WM_DESTROY: - CloseRichCallback(hwnd, true); - break; - - case WM_MOUSEMOVE: - SetTooltip(LOWORD(lParam), HIWORD(lParam), hwnd, rdt); - break; - - case WM_PAINT: - case WM_HSCROLL: - case WM_VSCROLL: - SetPosition(hwnd); - break; - - case WM_COPY: - case WM_CUT: - SmileyToTextCutRest(rdt); - break; - - case EM_STREAMOUT: - if (wParam & SFF_SELECTION) - SmileyToTextCutRest(rdt); - else - ReplaceContactSmileys(rdt, allsel, false, true); - break; - - case WM_KEYDOWN: - if ((wParam == 'C' || wParam == VK_INSERT) && (GetKeyState(VK_CONTROL) & 0x8000)) - { - SmileyToTextCutRest(rdt); - } - else if ((wParam == 'X' && (GetKeyState(VK_CONTROL) & 0x8000)) || - (wParam == VK_DELETE && (GetKeyState(VK_SHIFT) & 0x8000))) - { - SmileyToTextCutRest(rdt); - } - else if (wParam == VK_TAB && ((GetKeyState(VK_CONTROL) | GetKeyState(VK_SHIFT)) & 0x8000) == 0) - { - sel.cpMax = LONG_MAX; - bool hascont = rdt->hContact != NULL; - ReplaceContactSmileys(rdt, sel, false, hascont); - } - break; - - case WM_CHAR: - if (!rdt->inputarea || (rdt->inputarea && !opt.InputSmileys)) - break; - - if (lParam & (1 << 28)) // ALT key - break; - - if ((lParam & 0xFF) > 2) // Repeat rate - break; - - if (wParam > ' ' && opt.EnforceSpaces) - break; - - if (wParam == 0x16) - { - ReplaceContactSmileys(rdt, allsel, false, false); - break; - } - - if (opt.DCursorSmiley) - { - ReplaceContactSmileys(rdt, allsel, true, true); - } - else - { - if (wParam >= ' ' || wParam == '\n' || wParam == '\r') - { - SendMessage(hwnd, EM_EXGETSEL, 0, (LPARAM)&sel); - sel.cpMin = max(sel.cpMin - 20, 0); - sel.cpMax += 20; - - ReplaceContactSmileysWithText(rdt, sel, true); - ReplaceContactSmileys(rdt, sel, false, true); - } - } - break; - - case EM_PASTESPECIAL: - case WM_PASTE: - case EM_REPLACESEL: - case WM_SETTEXT: - case EM_SETTEXTEX: - if (rdt->inputarea) - ReplaceContactSmileys(rdt, allsel, false, false); - break; - - case WM_REMAKERICH: - ReplaceContactSmileys(rdt, allsel, false, false); - break; - } - - return result; -} - -void CloseRichCallback(HWND hwnd, bool force) -{ - int ind = g_RichEditList.getIndex((RichEditData*)&hwnd); - if ( ind != -1 ) - { - RichEditData* rdt = g_RichEditList[ind]; - bool richsub = GetWindowLongPtr(hwnd, GWLP_WNDPROC) == (LONG_PTR)RichEditSubclass; - if (richsub) SetWindowLongPtr(hwnd, GWLP_WNDPROC, (LONG_PTR)rdt->wpOrigWndProc); - if (richsub || force) - { - if (rdt->hToolTip) DestroyWindow(rdt->hToolTip); - delete rdt; - g_RichEditList.remove(ind); - } - } -} - -bool SetRichCallback(HWND hwnd, HANDLE hContact, bool subany, bool subnew) -{ - RichEditData* rdt = g_RichEditList.find((RichEditData*)&hwnd); - if (rdt == NULL) - { - IRichEditOle* RichEditOle; - if (SendMessage(hwnd, EM_GETOLEINTERFACE, 0, (LPARAM)&RichEditOle) == 0) - return false; - RichEditOle->Release(); - - rdt = new RichEditData; - - rdt->hwnd = hwnd; - rdt->hContact = hContact; - rdt->inputarea = (GetWindowLongPtr(hwnd, GWL_STYLE) & ES_READONLY) == 0; - rdt->dontReplace = false; - rdt->tipActive = -1; - rdt->wpOrigWndProc = NULL; - rdt->hToolTip = NULL; - g_RichEditList.insert(rdt); - - if (subnew) - rdt->wpOrigWndProc = (WNDPROC)SetWindowLongPtr(hwnd, GWLP_WNDPROC, (LONG_PTR)RichEditSubclass); - } - else - { - if (hContact && !rdt->hContact) rdt->hContact = hContact; - if (subany && rdt->wpOrigWndProc == NULL) - rdt->wpOrigWndProc = (WNDPROC)SetWindowLongPtr(hwnd, GWLP_WNDPROC, (LONG_PTR)RichEditSubclass); - } - return true; -} - -static LRESULT CALLBACK RichEditOwnerSubclass(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) -{ - RichEditOwnerData* rdto = g_RichEditOwnerList.find((RichEditOwnerData*)&hwnd); - if (rdto == NULL) return 0; - - WNDPROC wpOrigWndProc = rdto->wpOrigWndProc; - - switch(uMsg) - { - case WM_DESTROY: - { - RichEditData* rdt = g_RichEditList.find((RichEditData*)&rdto->hwndInput); - if (rdt && (!rdt->inputarea || opt.InputSmileys)) - { - CHARRANGE sel = allsel; - rdt->dontReplace = true; - ReplaceSmileysWithText(rdt->hwnd, sel, false); - } - } - CloseRichOwnerCallback(hwnd, false); - break; - - - case WM_COMMAND: - if (LOWORD(wParam) == IDOK || LOWORD(wParam) == 1624) - { - RichEditData* rdt = g_RichEditList.find((RichEditData*)&rdto->hwndInput); - if (rdt && (!rdt->inputarea || opt.InputSmileys)) - { - rdt->dontReplace = true; - CHARRANGE sel = allsel; - ReplaceSmileysWithText(rdt->hwnd, sel, false); - } - } - break; - } - - LRESULT result = CallWindowProc(wpOrigWndProc, hwnd, uMsg, wParam, lParam); - - switch(uMsg) - { - case WM_DESTROY: - CloseRichOwnerCallback(hwnd, true); - break; - - case WM_COMMAND: - if (LOWORD(wParam) == IDOK || LOWORD(wParam) == 1624) // && lParam == 0) - { - RichEditData* rdt = g_RichEditList.find((RichEditData*)&rdto->hwndInput); - if (rdt) - { - CHARRANGE sel = allsel; - if (!result) ReplaceContactSmileys(rdt, sel, false, false); - rdt->dontReplace = false; - } - } - break; - } - return result; -} - -void CloseRichOwnerCallback(HWND hwnd, bool force) -{ - int ind = g_RichEditOwnerList.getIndex((RichEditOwnerData*)&hwnd); - if ( ind != -1 ) - { - RichEditOwnerData* rdto = g_RichEditOwnerList[ind]; - bool richsub = GetWindowLongPtr(hwnd, GWLP_WNDPROC) == (LONG_PTR)RichEditOwnerSubclass; - if (richsub) - { - SetWindowLongPtr(hwnd, GWLP_WNDPROC, (LONG_PTR)rdto->wpOrigWndProc); - rdto->wpOrigWndProc = NULL; - } - if (force) - { - CloseRichCallback(rdto->hwndInput, true); - CloseRichCallback(rdto->hwndLog, true); - - delete rdto; - g_RichEditOwnerList.remove(ind); - } - } -} - -void SetRichOwnerCallback(HWND hwnd, HWND hwndInput, HWND hwndLog) -{ - RichEditOwnerData* rdto = g_RichEditOwnerList.find((RichEditOwnerData*)&hwnd); - if (rdto == NULL) - { - rdto = new RichEditOwnerData; - - rdto->hwnd = hwnd; - rdto->hwndInput = hwndInput; - rdto->hwndLog = hwndLog; - rdto->wpOrigWndProc = (WNDPROC)SetWindowLongPtr(hwnd, GWLP_WNDPROC, (LONG_PTR)RichEditOwnerSubclass); - g_RichEditOwnerList.insert(rdto); - } - else - { - if (rdto->hwndInput == NULL) rdto->hwndInput = hwndInput; - if (rdto->hwndLog == NULL) rdto->hwndLog = hwndLog; - } -} - -void ProcessAllInputAreas(bool restoreText) -{ - for (int i=g_RichEditList.getCount(); i--; ) - { - RichEditData* rdt = g_RichEditList[i]; - if (rdt->inputarea) - { - if (restoreText) - { - CHARRANGE sel = allsel; - ReplaceContactSmileysWithText(rdt, sel, false); - } - else - { - ReplaceContactSmileys(rdt, allsel, false, false); - } - } - } -} - - -void RichEditData_Destroy(void) -{ - int i; - for (i=g_RichEditList.getCount(); i--; ) - CloseRichCallback(g_RichEditList[i]->hwnd, true); - g_RichEditList.destroy(); - - for (i=g_RichEditOwnerList.getCount(); i--; ) - CloseRichOwnerCallback(g_RichEditOwnerList[i]->hwnd, true); - g_RichEditOwnerList.destroy(); -} diff --git a/plugins/SmileyAdd/services.cpp b/plugins/SmileyAdd/services.cpp deleted file mode 100644 index fed1b4c7ad..0000000000 --- a/plugins/SmileyAdd/services.cpp +++ /dev/null @@ -1,590 +0,0 @@ -/* -Miranda SmileyAdd Plugin -Copyright (C) 2005 - 2011 Boris Krasnovskiy All Rights Reserved -Copyright (C) 2003 - 2004 Rein-Peter de Boer - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation version 2 -of the License. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#include "general.h" -#include "smltool.h" -#include "smileyroutines.h" -#include "services.h" -#include "options.h" - - -//globals, defined int main.cpp -extern HANDLE hEvent1, hContactMenuItem; - -LIST menuHandleArray(5); - -//implementation of service functions - -SmileyPackType* GetSmileyPack(const char* proto, HANDLE hContact, SmileyPackCType** smlc) -{ - bkstring categoryName; - - hContact = DecodeMetaContact(hContact); - if (smlc) *smlc = opt.DisableCustom ? NULL : g_SmileyPackCStore.GetSmileyPack(hContact); - - if (proto != NULL && IsBadStringPtrA(proto, 10)) return NULL; - - if (hContact != NULL) - { - opt.ReadContactCategory(hContact, categoryName); - if (categoryName == _T("")) return NULL; - if (!categoryName.empty() && - g_SmileyCategories.GetSmileyCategory(categoryName) == NULL) - { - categoryName.clear(); - opt.WriteContactCategory(hContact, categoryName); - } - - if (categoryName.empty() && !opt.UseOneForAll) - { - char *protonam = (char*) CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0); - if (protonam != NULL) - { - DBVARIANT dbv; - if (DBGetContactSettingTString(hContact, protonam, "Transport", &dbv) == 0) - { - categoryName = dbv.ptszVal; - DBFreeVariant(&dbv); - } - else - categoryName = A2T_SM(protonam); - } - } - } - - if (categoryName.empty()) - { - if (proto == NULL || proto[0] == 0) - { - categoryName = _T("Standard"); - } - else - { - categoryName = A2T_SM(proto); - if (opt.UseOneForAll) - { - SmileyCategoryType *smc = g_SmileyCategories.GetSmileyCategory(categoryName); - if (smc == NULL || smc->IsProto()) categoryName = _T("Standard"); - } - } - } - - return g_SmileyCategories.GetSmileyPack(categoryName); -} - - -INT_PTR ReplaceSmileysCommand(WPARAM, LPARAM lParam) -{ - SMADD_RICHEDIT3* smre = (SMADD_RICHEDIT3*) lParam; - if (smre == NULL || smre->cbSize < SMADD_RICHEDIT_SIZE_V1) return FALSE; - - SMADD_RICHEDIT3 smrec = {0}; - memcpy(&smrec, smre, min(smre->cbSize, sizeof(smrec))); - - static const CHARRANGE selection = { 0, LONG_MAX }; - if (smre->rangeToReplace == NULL) smrec.rangeToReplace = (CHARRANGE*)&selection; - else if (smrec.rangeToReplace->cpMax < 0) smrec.rangeToReplace->cpMax = LONG_MAX; - - SmileyPackCType* smcp = NULL; - SmileyPackType* SmileyPack = GetSmileyPack(smrec.Protocolname, smrec.hContact, - (smrec.flags & (SAFLRE_OUTGOING | SAFLRE_NOCUSTOM)) ? NULL : &smcp); - - ReplaceSmileys(smre->hwndRichEditControl, SmileyPack, smcp, *smrec.rangeToReplace, - smrec.hContact == NULL, false, false); - - return TRUE; -} - - -INT_PTR ShowSmileySelectionCommand(WPARAM, LPARAM lParam) -{ - SMADD_SHOWSEL3* smaddInfo = (SMADD_SHOWSEL3*) lParam; - - if (smaddInfo == NULL || smaddInfo->cbSize < SMADD_SHOWSEL_SIZE_V1) return FALSE; - HWND parent = smaddInfo->cbSize > SMADD_SHOWSEL_SIZE_V1 ? smaddInfo->hwndParent : NULL; - HANDLE hContact = smaddInfo->cbSize > SMADD_SHOWSEL_SIZE_V2 ? smaddInfo->hContact : NULL; - - SmileyToolWindowParam *stwp = new SmileyToolWindowParam; - stwp->pSmileyPack = GetSmileyPack(smaddInfo->Protocolname, hContact); - stwp->hContact = hContact; - - stwp->hWndParent = parent; - stwp->hWndTarget = smaddInfo->hwndTarget; - stwp->targetMessage = smaddInfo->targetMessage; - stwp->targetWParam = smaddInfo->targetWParam; - stwp->xPosition = smaddInfo->xPosition; - stwp->yPosition = smaddInfo->yPosition; - stwp->direction = smaddInfo->Direction; - - mir_forkthread(SmileyToolThread, stwp); - - return TRUE; -} - -INT_PTR GetSmileyIconCommand(WPARAM, LPARAM lParam) -{ - SMADD_GETICON* smre = (SMADD_GETICON*) lParam; - - if (smre == NULL || smre->cbSize < sizeof(SMADD_GETICON)) return FALSE; - - SmileyPackType* SmileyPack = GetSmileyPack(smre->Protocolname); - - if (SmileyPack == NULL || IsBadStringPtrA(smre->SmileySequence, MAX_SMILEY_LENGTH)) - { - smre->SmileyIcon = NULL; - smre->Smileylength = 0; - return FALSE; - } - - unsigned start, size; - SmileyType* sml; - FindSmileyInText(SmileyPack, A2T_SM(smre->SmileySequence), start, size, &sml); - - if (size == 0 || start != 0) - { - smre->SmileyIcon = NULL; - smre->Smileylength = 0; - } - else - { - smre->SmileyIcon = sml->GetIcon(); - smre->Smileylength = size; - } - - return TRUE; -} - - -static int GetInfoCommandE(SMADD_INFO2* smre, bool retDup) -{ - if (smre == NULL || smre->cbSize < SMADD_INFO_SIZE_V1) return FALSE; - HANDLE hContact = smre->cbSize > SMADD_INFO_SIZE_V1 ? smre->hContact : NULL; - - SmileyPackType* SmileyPack = GetSmileyPack(smre->Protocolname, hContact); - - if (SmileyPack == NULL || SmileyPack->SmileyCount() == 0) - { - smre->ButtonIcon = NULL; - smre->NumberOfSmileys = 0; - smre->NumberOfVisibleSmileys = 0; - return FALSE; - } - - SmileyType* sml = FindButtonSmiley(SmileyPack); - - if (sml != NULL) - smre->ButtonIcon = retDup ? sml->GetIconDup() : sml->GetIcon(); - else - smre->ButtonIcon = GetDefaultIcon(retDup); - - smre->NumberOfSmileys = SmileyPack->SmileyCount(); - smre->NumberOfVisibleSmileys = SmileyPack->VisibleSmileyCount(); - - return TRUE; -} - - -INT_PTR GetInfoCommand(WPARAM, LPARAM lParam) -{ - return GetInfoCommandE((SMADD_INFO2*) lParam, false); -} - - -INT_PTR GetInfoCommand2(WPARAM, LPARAM lParam) -{ - return GetInfoCommandE((SMADD_INFO2*) lParam, true); -} - - -INT_PTR ParseText(WPARAM, LPARAM lParam) -{ - SMADD_PARSE* smre = (SMADD_PARSE*) lParam; - - if (smre == NULL || smre->cbSize < sizeof(SMADD_PARSE)) return FALSE; - - SmileyPackType* SmileyPack = GetSmileyPack(smre->Protocolname); - - if (SmileyPack == NULL) - { - smre->SmileyIcon = NULL; - smre->size = 0; - return FALSE; - } - - unsigned strtChrOff = smre->startChar + smre->size; - char* workstr = smre->str + strtChrOff; - - if (strtChrOff > 1024 || IsBadStringPtrA(workstr, 10)) - { - smre->SmileyIcon = NULL; - smre->size = 0; - return FALSE; - } - - SmileyType* sml; - FindSmileyInText(SmileyPack, A2T_SM(workstr), smre->startChar, smre->size, &sml); - - if (smre->size == 0) - { - smre->SmileyIcon = NULL; - } - else - { - smre->SmileyIcon = sml->GetIconDup(); - smre->startChar += strtChrOff; - } - - return TRUE; -} - - -INT_PTR ParseTextW(WPARAM, LPARAM lParam) -{ - SMADD_PARSEW* smre = (SMADD_PARSEW*) lParam; - - if (smre == NULL || smre->cbSize < sizeof(SMADD_PARSEW)) return FALSE; - - SmileyPackType* SmileyPack = GetSmileyPack(smre->Protocolname); - - if (SmileyPack == NULL) - { - smre->SmileyIcon = NULL; - smre->size = 0; - return FALSE; - } - - unsigned strtChrOff = smre->startChar + smre->size; - wchar_t* workstr = smre->str + strtChrOff; - - if (strtChrOff > 1024 || IsBadStringPtrW(workstr, 10)) - { - smre->SmileyIcon = NULL; - smre->size = 0; - return FALSE; - } - - SmileyType* sml; - FindSmileyInText(SmileyPack, workstr, smre->startChar, smre->size, &sml); - - if (smre->size == 0) - { - smre->SmileyIcon = NULL; - } - else - { - smre->SmileyIcon = sml->GetIconDup(); - smre->startChar += strtChrOff; - } - - return TRUE; -} - - -INT_PTR ParseTextBatch(WPARAM, LPARAM lParam) -{ - SMADD_BATCHPARSE2* smre = (SMADD_BATCHPARSE2*) lParam; - - if (smre == NULL || smre->cbSize < SMADD_BATCHPARSE_SIZE_V1) return FALSE; - HANDLE hContact = smre->cbSize > SMADD_BATCHPARSE_SIZE_V1 ? smre->hContact : NULL; - - SmileyPackCType* smcp = NULL; - SmileyPackType* SmileyPack = GetSmileyPack(smre->Protocolname, hContact, - (smre->flag & (SAFL_OUTGOING | SAFL_NOCUSTOM)) ? NULL : &smcp); - - SmileysQueueType smllist; - - if (smre->flag & SAFL_UNICODE) - LookupAllSmileys(SmileyPack, smcp, W2T_SM(smre->wstr), smllist, false); - else - LookupAllSmileys(SmileyPack, smcp, A2T_SM(smre->astr), smllist, false); - - if (smllist.getCount() == 0) return 0; - - SMADD_BATCHPARSERES *res = new SMADD_BATCHPARSERES[smllist.getCount()]; - SMADD_BATCHPARSERES* cres = res; - for (int j = 0; j < smllist.getCount(); j++) - { - cres->startChar = smllist[j].loc.cpMin; - cres->size = smllist[j].loc.cpMax - smllist[j].loc.cpMin; - if (smllist[j].sml) - { - if (smre->flag & SAFL_PATH) - cres->filepath = smllist[j].sml->GetFilePath().c_str(); - else - cres->hIcon = smllist[j].sml->GetIconDup(); - } - else - { - if (smre->flag & SAFL_PATH) - cres->filepath = smllist[j].smlc->GetFilePath().c_str(); - else - cres->hIcon = smllist[j].smlc->GetIcon(); - } - - cres++; - } - - smre->numSmileys = smllist.getCount(); - - smre->oflag = smre->flag | SAFL_UNICODE; - - return (INT_PTR)res; -} - -INT_PTR FreeTextBatch(WPARAM, LPARAM lParam) -{ - delete[] (SMADD_BATCHPARSERES*)lParam; - return TRUE; -} - -INT_PTR RegisterPack(WPARAM, LPARAM lParam) -{ - SMADD_REGCAT* smre = (SMADD_REGCAT*) lParam; - - if (smre == NULL || smre->cbSize < sizeof(SMADD_REGCAT)) return FALSE; - if (IsBadStringPtrA(smre->name, 50) || IsBadStringPtrA(smre->dispname, 50)) return FALSE; - - - unsigned lpcp = (unsigned)CallService(MS_LANGPACK_GETCODEPAGE, 0, 0); - if (lpcp == CALLSERVICE_NOTFOUND) lpcp = CP_ACP; - - - - bkstring nmd(A2W_SM(smre->dispname, lpcp)); - - - bkstring nm(A2T_SM(smre->name)); - g_SmileyCategories.AddAndLoad(nm, nmd); - - return TRUE; -} - -INT_PTR CustomCatMenu(WPARAM wParam, LPARAM lParam) -{ - const HANDLE hContact = (HANDLE)wParam; - if (lParam != 0) - { - SmileyCategoryType* smct = g_SmileyCategories.GetSmileyCategory((unsigned)lParam - 3); - if (smct != NULL) - opt.WriteContactCategory(hContact, smct->GetName()); - else - { - bkstring empty; - if (lParam == 1) empty = _T(""); - opt.WriteContactCategory(hContact, empty); - } - NotifyEventHooks(hEvent1, (WPARAM)hContact, 0); - } - - for (int i = 0; i < menuHandleArray.getCount(); i++) - CallService(MS_CLIST_REMOVECONTACTMENUITEM, (WPARAM)menuHandleArray[i], 0); - menuHandleArray.destroy(); - - return TRUE; -} - - -int RebuildContactMenu(WPARAM wParam, LPARAM) -{ - int i; - CLISTMENUITEM mi = {0}; - - mi.cbSize = sizeof(mi); - mi.flags = CMIM_FLAGS | CMIF_ROOTPOPUP | CMIF_ICONFROMICOLIB; - - SmileyCategoryListType::SmileyCategoryVectorType& smc = *g_SmileyCategories.GetSmileyCategoryList(); - - char* protnam = (char*) CallService(MS_PROTO_GETCONTACTBASEPROTO, wParam, 0); - bool haveMenu = IsSmileyProto(protnam); - if (haveMenu && opt.UseOneForAll) - { - unsigned cnt = 0; - for (i = 0; i < smc.getCount(); ++i) - cnt += smc[i].IsCustom(); - haveMenu = cnt != 0; - } - - if (!haveMenu) mi.flags |= CMIF_HIDDEN; - - CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hContactMenuItem, (LPARAM)&mi); - - for (i = 0; i < menuHandleArray.getCount(); ++i) - CallService(MS_CLIST_REMOVECONTACTMENUITEM, (WPARAM)menuHandleArray[i], 0); - menuHandleArray.destroy(); - - if (haveMenu) - { - bkstring cat; - opt.ReadContactCategory((HANDLE)wParam, cat); - - mi.pszPopupName = (char*)hContactMenuItem; - mi.flags = CMIF_CHILDPOPUP | CMIM_FLAGS | CMIF_TCHAR; - mi.pszService = MS_SMILEYADD_CUSTOMCATMENU; - - bool nonecheck = true; - HGENMENU hMenu; - - for (i = 0; i < smc.getCount(); i++) - { - if (smc[i].IsExt() || (smc[i].IsProto() && opt.UseOneForAll)) continue; - - const int ind = i + 3; - - mi.position = ind; - mi.popupPosition = ind; - mi.ptszName = (TCHAR*)smc[i].GetDisplayName().c_str(); - - if (cat == smc[i].GetName()) - { - mi.flags |= CMIF_CHECKED; - nonecheck = false; - } - - hMenu = Menu_AddContactMenuItem(&mi); - menuHandleArray.insert(hMenu); - mi.flags &= ~CMIF_CHECKED; - } - - mi.position = 1; - mi.popupPosition = 1; - mi.ptszName = _T(""); - if (cat == _T("")) { - mi.flags |= CMIF_CHECKED; - nonecheck = false; - } - - hMenu = Menu_AddContactMenuItem(&mi); - menuHandleArray.insert(hMenu); - - mi.position = 2; - mi.popupPosition = 2; - mi.ptszName = _T("Protocol specific"); - if (nonecheck) mi.flags |= CMIF_CHECKED; else mi.flags &= ~CMIF_CHECKED; - - hMenu = Menu_AddContactMenuItem(&mi); - menuHandleArray.insert(hMenu); - } - - return 0; -} - -INT_PTR ReloadPack(WPARAM, LPARAM lParam) -{ - if (lParam) - { - bkstring categoryName = A2T_SM((char*)lParam); - SmileyCategoryType *smc = g_SmileyCategories.GetSmileyCategory(categoryName); - if (smc != NULL) smc->Load(); - } - else - g_SmileyCategories.ClearAndLoadAll(); - - NotifyEventHooks(hEvent1, 0, 0); - return 0; -} - -INT_PTR LoadContactSmileys(WPARAM, LPARAM lParam) -{ - if (opt.DisableCustom) return 0; - - SMADD_CONT* cont = (SMADD_CONT*)lParam; - - switch (cont->type) - { - case 0: - g_SmileyPackCStore.AddSmileyPack(cont->hContact, cont->path); - NotifyEventHooks(hEvent1, (WPARAM)cont->hContact, 0); - break; - - case 1: - g_SmileyPackCStore.AddSmiley(cont->hContact, cont->path); - NotifyEventHooks(hEvent1, (WPARAM)cont->hContact, 0); - break; - } - return 0; -} - -int AccountListChanged(WPARAM wParam, LPARAM lParam) -{ - PROTOACCOUNT* acc = (PROTOACCOUNT*)lParam; - - switch (wParam) - { - case PRAC_ADDED: - if (acc != NULL) - { - bkstring catname(_T("Standard")); - const bkstring& defaultFile = g_SmileyCategories.GetSmileyCategory(catname)->GetFilename(); - g_SmileyCategories.AddAccountAsCategory(acc, defaultFile); - } - break; - - case PRAC_CHANGED: - if (acc != NULL && acc->szModuleName != NULL) - { - bkstring name(A2T_SM(acc->szModuleName)); - SmileyCategoryType* smc = g_SmileyCategories.GetSmileyCategory(name); - if (smc != NULL) - { - if (acc->tszAccountName) name = acc->tszAccountName; - smc->SetDisplayName(name); - } - } - break; - - case PRAC_REMOVED: - g_SmileyCategories.DeleteAccountAsCategory(acc); - break; - - case PRAC_CHECKED: - if (acc != NULL) - { - if (acc->bIsEnabled) - { - bkstring catname(_T("Standard")); - const bkstring& defaultFile = g_SmileyCategories.GetSmileyCategory(catname)->GetFilename(); - g_SmileyCategories.AddAccountAsCategory(acc, defaultFile); - } - else - { - g_SmileyCategories.DeleteAccountAsCategory(acc); - } - } - break; - } - return 0; -} - -int DbSettingChanged(WPARAM wParam, LPARAM lParam) -{ - HANDLE hContact = (HANDLE)wParam; - DBCONTACTWRITESETTING* cws = (DBCONTACTWRITESETTING*)lParam; - - if (hContact == NULL) return 0; - if (cws->value.type == DBVT_DELETED) return 0; - - if (strcmp(cws->szSetting, "Transport") == 0) - { - bkstring catname(_T("Standard")); - SmileyCategoryType *smc = g_SmileyCategories.GetSmileyCategory(catname); - if (smc != NULL) - g_SmileyCategories.AddContactTransportAsCategory(hContact, smc->GetFilename()); - } - return 0; -} diff --git a/plugins/SmileyAdd/services.h b/plugins/SmileyAdd/services.h deleted file mode 100644 index 9311e3637d..0000000000 --- a/plugins/SmileyAdd/services.h +++ /dev/null @@ -1,48 +0,0 @@ -/* -Miranda SmileyAdd Plugin -Copyright (C) 2005 - 2011 Boris Krasnovskiy -Copyright (C) 2003 - 2004 Rein-Peter de Boer - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation version 2 -of the License. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#ifndef SMILEYADD_SERVICES_H_ -#define SMILEYADD_SERVICES_H_ - -#include "m_smileyadd.h" -#include "m_smileyadd_deprecated.h" - -// service commands -INT_PTR ReplaceSmileysCommand(WPARAM wParam, LPARAM lParam); -INT_PTR GetSmileyIconCommand(WPARAM wParam, LPARAM lParam); -INT_PTR ShowSmileySelectionCommand(WPARAM wParam, LPARAM lParam); -INT_PTR GetInfoCommand(WPARAM wParam, LPARAM); -INT_PTR GetInfoCommand2(WPARAM wParam, LPARAM); -INT_PTR ParseText(WPARAM wParam, LPARAM lParam); -INT_PTR ParseTextW(WPARAM wParam, LPARAM lParam); -INT_PTR RegisterPack(WPARAM wParam, LPARAM lParam); -INT_PTR ParseTextBatch(WPARAM wParam, LPARAM lParam); -INT_PTR FreeTextBatch(WPARAM wParam, LPARAM lParam); -INT_PTR CustomCatMenu(WPARAM, LPARAM lParam); -int RebuildContactMenu(WPARAM wParam, LPARAM); -INT_PTR ReloadPack(WPARAM, LPARAM lParam); -INT_PTR LoadContactSmileys(WPARAM, LPARAM lParam); -int AccountListChanged(WPARAM wParam, LPARAM lParam); -int DbSettingChanged(WPARAM wParam, LPARAM lParam); - -SmileyPackType* GetSmileyPack(const char* proto, HANDLE hContact = NULL, SmileyPackCType** smlc = NULL); - - -#endif // SMILEYADD_SERVICES_H_ - diff --git a/plugins/SmileyAdd/smileyadd-translation.txt b/plugins/SmileyAdd/smileyadd-translation.txt deleted file mode 100644 index d6120c560e..0000000000 --- a/plugins/SmileyAdd/smileyadd-translation.txt +++ /dev/null @@ -1,54 +0,0 @@ -; Common strings that belong to many files -;[] - -; ../../plugins/SmileyAdd/dlgboxsubclass.cpp -;[Show Smiley Selection Window] - -; ../../plugins/SmileyAdd/download.cpp -;[SmileyAdd HTTP connections] - -; ../../plugins/SmileyAdd/main.cpp -;[Button Smiley] -;[Please update SmileyAdd to ANSI Version] - -; ../../plugins/SmileyAdd/options.cpp -;[All Files] -;[Bottom] -;[Customize] -;[Off] -;[Smiley Packs] -;[Smileys] -;[Top] - -; ../../plugins/SmileyAdd/resource.rc -;[Animate] -;[Author:] -;[Built-In Message Dialog Support] -;[Disable] -;[Disable custom smileys] -;[Display] -;[Don't replace at cursor] -;[Enable Smileys] -;[High Quality smiley scaling] -;[IEView style window] -;[Input Area] -;[Max \"Custom Smiley\" height] -;[Min smiley height] -;[Name:] -;[Preview] -;[Replace only smileys surrounded by spaces] -;[Scale smiley to textheight] -;[Smiley Button] -;[Smiley Categories] -;[Smiley Selector] -;[Specify Smiley Pack for each category] -;[Surround inserted smiley with spaces] -;[Use first smiley for selection size] -;[Version:] - -; ../../plugins/SmileyAdd/smileys.cpp -;[Standard] -;[There were problems loading smiley pack (it should be corrected).\nSee Network Log for details.] - -; ../../plugins/SmileyAdd/smltool.cpp -;[d'Oh!] diff --git a/plugins/SmileyAdd/smileyroutines.cpp b/plugins/SmileyAdd/smileyroutines.cpp deleted file mode 100644 index ba136d7ed5..0000000000 --- a/plugins/SmileyAdd/smileyroutines.cpp +++ /dev/null @@ -1,610 +0,0 @@ -/* -Miranda SmileyAdd Plugin -Copyright (C) 2005 - 2011 Boris Krasnovskiy -Copyright (C) 2003 - 2004 Rein-Peter de Boer - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation version 2 -of the License. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#include "general.h" -#include "smileyroutines.h" -#include "SmileyBase.h" -#include "options.h" - -#include -#include - -ISmileyBase* CreateSmileyObject(SmileyType* sml); -ISmileyBase* CreateAniSmileyObject(SmileyType* sml, COLORREF clr, bool ishpp); - - - -bool g_HiddenTextSupported = true; - - -// {8CC497C0-A1DF-11CE-8098-00AA0047BE5D} -const GUID IID_ITextDocument = -{ 0x8CC497C0, 0xA1DF, 0x11CE, { 0x80,0x98,0x00,0xAA,0x00,0x47,0xBE,0x5D } }; - -void LookupAllSmileys(SmileyPackType* smileyPack, SmileyPackCType* smileyCPack, const TCHAR* lpstrText, - SmileysQueueType& smllist, const bool firstOnly) -{ - if (lpstrText == NULL || *lpstrText == 0) return; - - SmileyPackType::SmileyLookupType* sml = smileyPack ? smileyPack->GetSmileyLookup() : NULL; - SmileyPackCType::SmileyLookupType* smlc = smileyCPack ? &smileyCPack->GetSmileyLookup() : NULL; - - // Precompute number of smileys - int smlszo = sml ? sml->getCount() : 0; - int smlszc = smlc ? smlc->getCount() : 0; - int smlsz = smlszo + smlszc; - - if (smlsz == 0) return; - - // All possible smileys - SmileyLookup::SmileyLocVecType* smileys = new SmileyLookup::SmileyLocVecType [smlsz]; - - // Find all possible smileys - bkstring tmpstr(lpstrText); - int i = 0; - - if (sml) - { - for (int j=0; jgetCount(); j++) - { - (*sml)[j].find(tmpstr, smileys[i], false); - i++; - } - } - - if (smlc) - { - for (int j=0; jgetCount(); j++) - { - (*smlc)[j].find(tmpstr, smileys[i], false); - i++; - } - } - - int* csmlit = (int*)alloca(smlsz * sizeof(int)); - if (csmlit == NULL) return; - memset(csmlit, 0, smlsz * sizeof(int)); - - long numCharsSoFar = 0; - bkstring::size_type smloff = 0; - - for (;;) - { - int firstSml = -1; - int firstSmlRef = -1; - SmileyLookup::SmileyLocVecType* smlf = NULL; - - for (int csml=0; csml= smloff) - { - if (firstSmlRef == -1 || smlv[tsml].pos < (*smlf)[firstSmlRef].pos || - (smlv[tsml].pos == (*smlf)[firstSmlRef].pos && smlv[tsml].len > (*smlf)[firstSmlRef].len)) - { - firstSmlRef = tsml; - firstSml = csml; - smlf = &smileys[csml]; - } - break; - } - } - csmlit[csml] = tsml; - } - - // Check if smiley found - if (firstSml != -1) - { - ReplaceSmileyType *dat = new ReplaceSmileyType; - - const TCHAR* textToSearch = lpstrText + smloff; - const TCHAR* textSmlStart = lpstrText + (*smlf)[firstSmlRef].pos; - const TCHAR* textSmlEnd = textSmlStart + (*smlf)[firstSmlRef].len; - - // check if leading space exist - const TCHAR* prech = _tcsdec(textToSearch, textSmlStart); - dat->ldspace = prech != NULL ? _istspace(*prech) != 0 : smloff == 0; - - // check if trailing space exist - dat->trspace = *textSmlEnd == 0 || _istspace(*textSmlEnd); - - // compute text location in RichEdit - dat->loc.cpMin = (long)_tcsnccnt(textToSearch, (*smlf)[firstSmlRef].pos - smloff) + numCharsSoFar; - dat->loc.cpMax = numCharsSoFar = (long)_tcsnccnt(textSmlStart, (*smlf)[firstSmlRef].len) + dat->loc.cpMin; - - if (!opt.EnforceSpaces || (dat->ldspace && dat->trspace)) - { - dat->ldspace |= !opt.SurroundSmileyWithSpaces; - dat->trspace |= !opt.SurroundSmileyWithSpaces; - - if (firstSml < smlszo) - { - dat->sml = smileyPack->GetSmiley((*sml)[firstSml].GetIndex()); - dat->smlc = NULL; - } - else - { - dat->smlc = smileyCPack->GetSmiley((*smlc)[firstSml-smlszo].GetIndex()); - dat->sml = NULL; - } - - if (dat->sml != NULL || dat->smlc != NULL) - { - // First smiley found record it - smllist.insert(dat); - if (firstOnly) break; - } - else - delete dat; - } - else - delete dat; - - // Advance string pointer to search for the next smiley - smloff = (*smlf)[firstSmlRef].pos + (*smlf)[firstSmlRef].len; - csmlit[firstSml]++; - } - else - // Nothing to parse exit - break; - } - delete[] smileys; -} - - -void FindSmileyInText(SmileyPackType* smp, const TCHAR* str, - unsigned& first, unsigned& size, SmileyType** sml) -{ - SmileysQueueType smllist; - LookupAllSmileys(smp, NULL, str, smllist, true); - if (smllist.getCount() == 0) - { - size = 0; - *sml = NULL; - } - else - { - first = smllist[0].loc.cpMin; - size = smllist[0].loc.cpMax - smllist[0].loc.cpMin; - *sml = smllist[0].sml; - } -} - - -SmileyType* FindButtonSmiley(SmileyPackType* smp) -{ - unsigned start, size; - SmileyType* sml; - - FindSmileyInText(smp, smp->GetButtonSmiley(), start, size, &sml); - - return sml; -} - -void UpdateSelection(CHARRANGE& sel, int pos, int dif) -{ - if (sel.cpMax == sel.cpMin) - { - if (sel.cpMax < LONG_MAX && sel.cpMax > pos) - { - sel.cpMax += dif; - sel.cpMin += dif; - } - } - else - { - if (sel.cpMax >= pos && sel.cpMax < LONG_MAX) sel.cpMax += dif; - if (sel.cpMin > pos) sel.cpMin += dif; - } -} - -void ReplaceSmileys(HWND hwnd, SmileyPackType* smp, SmileyPackCType* smcp, const CHARRANGE& sel, - bool useHidden, bool ignoreLast, bool unFreeze) -{ -/* - LARGE_INTEGER freq, strt, end; - QueryPerformanceFrequency(&freq); - QueryPerformanceCounter(&strt); -*/ - IRichEditOle* RichEditOle; - if (SendMessage(hwnd, EM_GETOLEINTERFACE, 0, (LPARAM)&RichEditOle) == 0) - return; - - ITextDocument* TextDocument; - if (RichEditOle->QueryInterface(IID_ITextDocument, (void**)&TextDocument) != S_OK) - { - RichEditOle->Release(); - return; - } - - long cnt; - if (smp == NULL && smcp == NULL) - { - if (unFreeze) TextDocument->Unfreeze(&cnt); - TextDocument->Release(); - RichEditOle->Release(); - return; - } - - // retrieve text range - ITextRange* TextRange; - if (TextDocument->Range(sel.cpMin, sel.cpMax, &TextRange) != S_OK) - { - TextDocument->Release(); - RichEditOle->Release(); - return; - } - - // retrieve text to parse for smileys - BSTR btxt = 0; - if (TextRange->GetText(&btxt) != S_OK) - { - TextRange->Release(); - TextDocument->Release(); - RichEditOle->Release(); - return; - } - - TextRange->Release(); - - SmileysQueueType smllist; - - - LookupAllSmileys(smp, smcp, W2T_SM(btxt), smllist, false); - - SysFreeString(btxt); - - if (smllist.getCount() != 0) - { - // disable screen updates - TextDocument->Freeze(&cnt); - - TCHAR classname[20]; - GetClassName(hwnd, classname, SIZEOF(classname)); - bool ishpp = (_tcsncmp(classname, _T("THppRichEdit"), 12) == 0); - - SetRichCallback(hwnd, NULL, false, true); - - bool rdo = (GetWindowLongPtr(hwnd, GWL_STYLE) & ES_READONLY) != 0; - if (rdo) SendMessage(hwnd, EM_SETREADONLY, FALSE, 0); - - ITextSelection* TextSelection; - TextDocument->GetSelection(&TextSelection); - - ITextFont *TextFont; - TextSelection->GetFont(&TextFont); - - //save selection - CHARRANGE oldSel; - TextSelection->GetStart(&oldSel.cpMin); - TextSelection->GetEnd(&oldSel.cpMax); - - CHARFORMAT2 chf; - - chf.cbSize = sizeof(chf); - chf.dwMask = CFM_ALL2; - - // Determine background color - // This logic trying to minimize number of background color changes - static COLORREF bkgColor = GetSysColor(COLOR_WINDOW); -// if (!insemf) -// { - COLORREF bkgColorPv = (COLORREF)SendMessage(hwnd, EM_SETBKGNDCOLOR, 0, bkgColor); - if (bkgColorPv != bkgColor) - { - bkgColor = bkgColorPv; - SendMessage(hwnd, EM_SETBKGNDCOLOR, 0, bkgColor); - } -// } - - HDC hdc = GetDC(hwnd); - int sclX = GetDeviceCaps(hdc, LOGPIXELSX); - int sclY = GetDeviceCaps(hdc, LOGPIXELSY); - - unsigned numBTBSm = 0; - - BSTR spaceb = SysAllocString(L" "); - - // Replace smileys specified in the list in RichEdit - for (int j = smllist.getCount(); j--; ) - { - CHARRANGE& smlpos = smllist[j].loc; - if (ignoreLast && oldSel.cpMax == smlpos.cpMax) continue; - - smlpos.cpMin += sel.cpMin; - smlpos.cpMax += sel.cpMin; - - // Find all back to back smileys and for propper hidden text detection - if ( numBTBSm == 0 ) - { - CHARRANGE lastPos = smlpos; - for (int jn = j; jn--; ) - { - if (jn != j && smllist[jn].loc.cpMax != lastPos.cpMin) - break; - - ++numBTBSm; - lastPos.cpMin = smllist[jn].loc.cpMin; - } - TextSelection->SetRange(lastPos.cpMin, lastPos.cpMax); - long hid; - TextFont->GetHidden(&hid); - if (hid == tomFalse) numBTBSm = 0; - } - if ( numBTBSm != 0 ) - { - --numBTBSm; - continue; - } - - SmileyType* sml = smllist[j].sml; - SmileyCType* smlc = smllist[j].smlc; - if (sml == NULL && smlc == NULL) continue; - - // Select text analyze - TextSelection->SetRange(smlpos.cpMin, smlpos.cpMax); - - BSTR btxt = NULL; - - if (smlc == NULL && sml->IsText()) - { - btxt = SysAllocString(T2W_SM(sml->GetToolText().c_str())); - TextSelection->SetText(btxt); - } - else - { - TextSelection->GetText(&btxt); - - // Get font properties - SendMessage(hwnd, EM_GETCHARFORMAT, SCF_SELECTION, (LPARAM)&chf); - - //do not look for smileys in hyperlinks - if ((chf.dwEffects & (CFE_LINK | CFE_HIDDEN)) != 0) continue; - - SIZE osize; - if (sml) - sml->GetSize(osize); - else - smlc->GetSize(osize); - - if (osize.cx == 0 || osize.cy == 0) continue; - - int sizeX, sizeY; - if (opt.ScaleToTextheight) - { - sizeY = CalculateTextHeight(hdc, &chf); - sizeX = osize.cx * sizeY / osize.cy; - - int dx = osize.cx - sizeX; - sizeX += dx & 1; - - int dy = osize.cy - sizeY; - sizeY += dy & 1; - } - else - { - sizeX = osize.cx; - sizeY = osize.cy; - } - - if (smlc != NULL && opt.MaxCustomSmileySize && (unsigned)sizeY > opt.MaxCustomSmileySize) - { - sizeY = opt.MaxCustomSmileySize; - sizeX = osize.cx * sizeY / osize.cy; - - int dx = osize.cx - sizeX; - sizeX += dx & 1; - - int dy = osize.cy - opt.MaxCustomSmileySize; - sizeY += dy & 1; - } - - if (opt.MinSmileySize && (unsigned)sizeY < opt.MinSmileySize) - { - sizeY = opt.MinSmileySize; - sizeX = osize.cx * sizeY / osize.cy; - - int dx = osize.cx - sizeX; - sizeX += dx & 1; - - int dy = osize.cy - opt.MinSmileySize; - sizeY += dy & 1; - } - - // Convert pixel to HIMETRIC - SIZEL sizehm; - sizehm.cx = (2540 * (sizeX+1) + (sclX >> 1)) / sclX; - sizehm.cy = (2540 * (sizeY+1) + (sclY >> 1)) / sclY; - - // If font does not have designated background use control background - if (chf.dwEffects & CFE_AUTOBACKCOLOR) chf.crBackColor = bkgColor; - - // insert space after - if (!smllist[j].trspace && useHidden) - { - TextSelection->SetStart(smlpos.cpMax); - TextSelection->TypeText(spaceb); - UpdateSelection(oldSel, smlpos.cpMax , 1); - - // Restore selection - TextSelection->SetRange(smlpos.cpMin, smlpos.cpMax); - } - - if (g_HiddenTextSupported && useHidden) - { - TextFont->SetHidden(tomTrue); - TextSelection->SetEnd(smlpos.cpMin); - UpdateSelection(oldSel, smlpos.cpMin , 1); - } - else - { - UpdateSelection(oldSel, smlpos.cpMin, -(int)SysStringLen(btxt)+1); - } - - ISmileyBase* smileyBase = CreateAniSmileyObject(smlc ? smlc : sml, chf.crBackColor, ishpp); - if (smileyBase == NULL) continue; - - smileyBase->SetExtent(DVASPECT_CONTENT, &sizehm); - smileyBase->SetHint(W2T_SM(btxt)); - - smileyBase->SetPosition(hwnd, NULL); - - // Get the RichEdit container site - IOleClientSite *pOleClientSite; - RichEditOle->GetClientSite(&pOleClientSite); - - // Now Add the object to the RichEdit - REOBJECT reobject = { 0 }; - - reobject.cbStruct = sizeof(REOBJECT); - reobject.cp = REO_CP_SELECTION; - reobject.dvaspect = DVASPECT_CONTENT; - reobject.poleobj = smileyBase; - reobject.polesite = pOleClientSite; - reobject.dwFlags = REO_BELOWBASELINE | REO_BLANK; - reobject.dwUser = (DWORD)smileyBase; - - // Insert the bitmap at the current location in the richedit control - RichEditOle->InsertObject(&reobject); - - smileyBase->Release(); - - // insert space before - if (!smllist[j].ldspace && useHidden) - { - TextSelection->SetRange(smlpos.cpMin, smlpos.cpMin); - TextSelection->TypeText(spaceb); - UpdateSelection(oldSel, smlpos.cpMin , 1); - } - } - SysFreeString(btxt); - } - SysFreeString(spaceb); - - TextSelection->SetRange(oldSel.cpMin, oldSel.cpMax); - if (rdo) SendMessage(hwnd, EM_SETREADONLY, TRUE, 0); - - TextFont->Release(); - TextSelection->Release(); - - ReleaseDC(hwnd, hdc); - - TextDocument->Unfreeze(&cnt); - if (cnt == 0) UpdateWindow(hwnd); - } - - if (unFreeze) - { - TextDocument->Unfreeze(&cnt); - if (cnt == 0) UpdateWindow(hwnd); - } - - TextDocument->Release(); - RichEditOle->Release(); - -/* - QueryPerformanceCounter(&end); - unsigned dif = (end.QuadPart - strt.QuadPart)/(freq.QuadPart/1000); - TCHAR mess[300]; - wsprintf(mess, _T("Time elapsed: %u"), dif); - MessageBox(NULL, mess, _T(""), MB_OK); -*/ -} - - -void ReplaceSmileysWithText(HWND hwnd, CHARRANGE& sel, bool keepFrozen) -{ - IRichEditOle* RichEditOle; - if (SendMessage(hwnd, EM_GETOLEINTERFACE, 0, (LPARAM)&RichEditOle) == 0) - return; - - ITextDocument* TextDocument; - if (RichEditOle->QueryInterface(IID_ITextDocument, (void**)&TextDocument) != S_OK) - { - RichEditOle->Release(); - return; - } - - // retrieve text range - ITextRange* TextRange; - if (TextDocument->Range(0, 0, &TextRange) != S_OK) - { - TextDocument->Release(); - RichEditOle->Release(); - return; - } - - long cnt; - TextDocument->Freeze(&cnt); - - bool rdo = (GetWindowLongPtr(hwnd, GWL_STYLE) & ES_READONLY) != 0; - if (rdo) SendMessage(hwnd, EM_SETREADONLY, FALSE, 0); - - CHARRANGE oldSel; - SendMessage(hwnd, EM_EXGETSEL, 0, (LPARAM)&oldSel); - - int objectCount = RichEditOle->GetObjectCount(); - for (int i = objectCount - 1; i >= 0; i--) - { - REOBJECT reObj = {0}; - reObj.cbStruct = sizeof(REOBJECT); - - HRESULT hr = RichEditOle->GetObject(i, &reObj, REO_GETOBJ_POLEOBJ); - if (FAILED(hr)) continue; - - if (reObj.cp < sel.cpMin) - { - reObj.poleobj->Release(); - break; - } - - ISmileyBase *igsc = NULL; - if (reObj.cp < sel.cpMax && reObj.clsid == CLSID_NULL) - reObj.poleobj->QueryInterface(IID_ISmileyAddSmiley, (void**) &igsc); - - reObj.poleobj->Release(); - if (igsc == NULL) continue; - - TextRange->SetRange(reObj.cp, reObj.cp + 1); - - BSTR bstr = NULL; - igsc->GetTooltip(&bstr); - TextRange->SetText(bstr); - - unsigned int len = SysStringLen(bstr); - UpdateSelection(oldSel, reObj.cp, len-1); - UpdateSelection(sel, reObj.cp, len-1); - - SysFreeString(bstr); - - igsc->Release(); - } - - SendMessage(hwnd, EM_EXSETSEL, 0, (LPARAM)&oldSel); - if (rdo) SendMessage(hwnd, EM_SETREADONLY, TRUE, 0); - if (!keepFrozen) TextDocument->Unfreeze(&cnt); - - TextRange->Release(); - TextDocument->Release(); - RichEditOle->Release(); -} diff --git a/plugins/SmileyAdd/smileyroutines.h b/plugins/SmileyAdd/smileyroutines.h deleted file mode 100644 index 6b12ee6ead..0000000000 --- a/plugins/SmileyAdd/smileyroutines.h +++ /dev/null @@ -1,49 +0,0 @@ -/* -Miranda SmileyAdd Plugin -Copyright (C) 2005 - 2011 Boris Krasnovskiy -Copyright (C) 2003 - 2004 Rein-Peter de Boer - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation version 2 -of the License. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#ifndef _SMILEYROUTINES_ -#define _SMILEYROUTINES_ - -#include "smileys.h" -#include "customsmiley.h" - -typedef struct ReplaceSmileyType_tag -{ - CHARRANGE loc; - SmileyType* sml; - SmileyCType* smlc; - bool ldspace; - bool trspace; -} ReplaceSmileyType; - -// Queue to store smileys found -typedef SMOBJLIST SmileysQueueType; - - - -void LookupAllSmileys(SmileyPackType* smileyPack, SmileyPackCType* smileyCPack, const TCHAR* lpstrText, - SmileysQueueType& smllist, const bool firstOnly); -void ReplaceSmileys(HWND hwnd, SmileyPackType* smp, SmileyPackCType* smcp, const CHARRANGE& sel, - bool useHidden, bool ignoreLast, bool unFreeze); -void ReplaceSmileysWithText(HWND hwnd, CHARRANGE& sel, bool keepFrozen); -void FindSmileyInText(SmileyPackType* smp, const TCHAR* str, - unsigned& first, unsigned& size, SmileyType** index); -SmileyType* FindButtonSmiley(SmileyPackType* smp); - -#endif diff --git a/plugins/SmileyAdd/smileys.cpp b/plugins/SmileyAdd/smileys.cpp deleted file mode 100644 index 2f16cee51e..0000000000 --- a/plugins/SmileyAdd/smileys.cpp +++ /dev/null @@ -1,1146 +0,0 @@ -/* -Miranda SmileyAdd Plugin -Copyright (C) 2005 - 2011 Boris Krasnovskiy All Rights Reserved -Copyright (C) 2003 - 2004 Rein-Peter de Boer - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation version 2 -of the License. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - - -#include "smileys.h" -#include "smileyroutines.h" -#include "options.h" -#include "download.h" - -SmileyPackListType g_SmileyPacks; -SmileyCategoryListType g_SmileyCategories; - -extern HANDLE hNetlibUser; - -// -// SmileyType -// - - -SmileyType::SmileyType(void) -{ - m_SmileyIcon = NULL; - m_xepimg = NULL; - m_flags = 0; - m_index = 0; - m_size.cx = 0; - m_size.cy = 0; -} - -SmileyType::~SmileyType() -{ - if (m_xepimg) m_xepimg->Release(); - m_xepimg = NULL; - - if (m_SmileyIcon != NULL) DestroyIcon(m_SmileyIcon); - m_SmileyIcon = NULL; -} - - -HICON SmileyType::GetIcon(void) -{ - if (m_SmileyIcon == NULL) - { - ImageBase* img = CreateCachedImage(); - if (!img) return NULL; - img->SelectFrame(m_index); - m_SmileyIcon = img->GetIcon(); - img->Release(); - } - return m_SmileyIcon; -} - - -HICON SmileyType::GetIconDup(void) -{ - ImageBase* img = CreateCachedImage(); - img->SelectFrame(m_index); - HICON hIcon = img->GetIcon(); - img->Release(); - return hIcon; -} - - -bool SmileyType::LoadFromImage(IStream* pStream) -{ - if (m_xepimg) m_xepimg->Release(); - - bkstring name; - m_xepimg = new ImageType(0, name, pStream); - - return true; -} - - -bool SmileyType::LoadFromResource(const bkstring& file, const int index) -{ - m_index = index; - m_filepath = file; - - return true; -} - - -void SmileyType::GetSize(SIZE& size) -{ - if (m_size.cy == 0) - { - ImageBase* img = CreateCachedImage(); - if (img) - { - img->GetSize(m_size); - img->Release(); - } - } - size = m_size; -} - - -ImageBase* SmileyType::CreateCachedImage(void) -{ - if (m_xepimg) - { - m_xepimg->AddRef(); - return m_xepimg; - } - return AddCacheImage(m_filepath, m_index); -} - - -void SmileyType::SetImList(HIMAGELIST hImLst, long i) -{ - if (m_xepimg) m_xepimg->Release(); - m_xepimg = new ImageListItemType(0, hImLst, i); -} - - -HBITMAP SmileyType::GetBitmap(COLORREF bkgClr, int sizeX, int sizeY) -{ - ImageBase* img = CreateCachedImage(); - if (!img) return NULL; - img->SelectFrame(m_index); - HBITMAP hBmp = img->GetBitmap(bkgClr, sizeX, sizeY); - img->Release(); - - return hBmp; -} - - -// -// SmileyPackType -// - -SmileyPackType::SmileyPackType() -{ - m_hSmList = NULL; - errorFound = false; -} - -SmileyType* SmileyPackType::GetSmiley(unsigned index) -{ - return (index < (unsigned)m_SmileyList.getCount()) ? &m_SmileyList[index] : NULL; -} - - -static DWORD_PTR ConvertServiceParam(HANDLE hContact, const TCHAR *param) -{ - DWORD_PTR ret; - if (param == NULL) - ret = 0; - else if (_tcsicmp(_T("hContact"), param) == 0) - ret = (DWORD_PTR)hContact; - else if (_istdigit(*param)) - ret = _ttoi(param); - else - ret = (DWORD_PTR)param; - - return ret; -} - - -void SmileyType::CallSmileyService(HANDLE hContact) -{ - _TPattern * srvsplit = _TPattern::compile(_T("(.*)\\|(.*)\\|(.*)")); - _TMatcher * m0 = srvsplit->createTMatcher(GetTriggerText()); - m0->findFirstMatch(); - - bkstring name = m0->getGroup(1); - bkstring par1 = m0->getGroup(2); - bkstring par2 = m0->getGroup(3); - - delete m0; - delete srvsplit; - - char str[MAXMODULELABELLENGTH]; - const char *proto = ""; - - if (name[0] == '/') - { - proto = (const char*) CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0); - if (proto == NULL) return; - } - mir_snprintf(str, sizeof(str), "%s%s", proto, T2A_SM(name.c_str())); - CallService(str, - ConvertServiceParam(hContact, par1.c_str()), - ConvertServiceParam(hContact, par2.c_str())); -} - - - -SmileyPackType::~SmileyPackType() -{ - if (m_hSmList != NULL) ImageList_Destroy(m_hSmList); -} - -static const TCHAR urlRegEx[] = - _T("(?:ftp|https|http|file|aim|webcal|irc|msnim|xmpp|gopher|mailto|news|nntp|telnet|wais|prospero)://?[\\w.?%:/$+;]*"); -static const TCHAR pathRegEx[] = _T("[\\s\"][a-zA-Z]:[\\\\/][\\w.\\-\\\\/]*"); -static const TCHAR timeRegEx[] = _T("\\d{1,2}:\\d{2}:\\d{2}|\\d{1,2}:\\d{2}"); - -void SmileyPackType::AddTriggersToSmileyLookup(void) -{ - _TPattern * p = _TPattern::compile(_T("\\s+")); - - { - bkstring emptystr; - m_SmileyLookup.insert(new SmileyLookup(urlRegEx, true, -1, emptystr)); - m_SmileyLookup.insert(new SmileyLookup(pathRegEx, true, -1, emptystr)); - m_SmileyLookup.insert(new SmileyLookup(timeRegEx, true, -1, emptystr)); - } - - for (int dist = 0; dist < m_SmileyList.getCount(); dist++) - { - if (m_SmileyList[dist].IsRegEx()) - { - SmileyLookup* dats = new SmileyLookup(m_SmileyList[dist].GetTriggerText(), true, dist, GetFilename()); - if (dats->IsValid()) - m_SmileyLookup.insert(dats); - else - errorFound = true; - if (m_SmileyList[dist].m_InsertText.empty()) m_SmileyList[dist].m_InsertText = m_SmileyList[dist].m_ToolText; - } - else if (!m_SmileyList[dist].IsService()) - { - bool first = true; - int li = 0; - _TMatcher * m0 = p->createTMatcher(m_SmileyList[dist].GetTriggerText()); - while (m0->findNextMatch()) - { - int stind = m0->getStartingIndex(); - if (li != stind) - { - bkstring out; - ReplaceAllSpecials(m0->getString().substr(li, stind - li), out); - SmileyLookup *dats = new SmileyLookup(out, false, dist, GetFilename()); - if (dats->IsValid()) - { - m_SmileyLookup.insert(dats); - if (first) - { - m_SmileyList[dist].m_InsertText = out; - first = false; - } - } - } - li = m0->getEndingIndex(); - } - - int stind = (int)m0->getString().size(); - if (li < stind) - { - bkstring out; - ReplaceAllSpecials(m0->getString().substr(li, stind - li), out); - SmileyLookup *dats = new SmileyLookup(out, false, dist, GetFilename()); - if (dats->IsValid()) - { - m_SmileyLookup.insert(dats); - if (first) - { - m_SmileyList[dist].m_InsertText = out; - first = false; - } - } - } - delete m0; - } - } - delete p; -} - - -void SmileyPackType::ReplaceAllSpecials(const bkstring& Input, bkstring& Output) -{ - Output = _TPattern::replace(_T("%%_{1,2}%%"), Input, _T(" ")); - Output = _TPattern::replace(_T("%%''%%"), Output, _T("\"")); -} - - -void SmileyPackType::Clear(void) -{ - m_SmileyList.destroy(); - m_SmileyLookup.destroy(); - if (m_hSmList != NULL) { ImageList_Destroy(m_hSmList); m_hSmList = NULL; } - m_Filename.clear(); - m_Name.clear(); - m_Date.clear(); - m_Version.clear(); - m_Author.clear(); - m_VisibleCount = 0; - m_ButtonSmiley.clear(); - errorFound = false; -} - -bool SmileyPackType::LoadSmileyFile(const bkstring& filename, bool onlyInfo, bool noerr) -{ - Clear(); - - if (filename.empty()) - { - m_Name = _T("Nothing loaded"); - return false; - } - - bkstring modpath; - pathToAbsolute(filename, modpath); - - // Load xep file - int fh = _topen(modpath.c_str(), _O_BINARY | _O_RDONLY); - if (fh == -1) - { - if (!noerr) - { - static const TCHAR errmsg[] = _T("Smiley Pack %s not found.\n") - _T("Select correct Smiley Pack in the Miranda Options | Customize | Smileys."); - TCHAR msgtxt[1024]; - mir_sntprintf(msgtxt, SIZEOF(msgtxt), TranslateTS(errmsg), modpath.c_str()); - ReportError(msgtxt); - } - - m_Name = _T("Nothing loaded"); - return false; - } - - m_Filename = filename; - - // Find file size - const long flen = _filelength(fh); - - // Allocate file buffer - char* buf = new char[flen + sizeof(wchar_t)]; - - // Read xep file in - int len = _read(fh, buf, flen); - *(wchar_t*)(buf+len) = 0; - - // Close file - _close(fh); - - bkstring tbuf; - - if (len>2 && *(wchar_t*)buf == 0xfeff) - { - tbuf = W2T_SM((wchar_t*)buf+1); - } - else if (len>3 && buf[0]=='\xef' && buf[1]=='\xbb' && buf[2]=='\xbf') - { - tbuf = W2T_SM(A2W_SM(buf+3, CP_UTF8)); - } - else - { - tbuf = A2T_SM(buf); - } - - delete[] buf; - - bool res; - if (filename.find(_T(".xep")) == filename.npos) - res = LoadSmileyFileMSL(tbuf, onlyInfo, modpath); - else - res = LoadSmileyFileXEP(tbuf, onlyInfo, modpath); - - if (errorFound) ReportError(TranslateT("There were problems loading smiley pack (it should be corrected).\nSee Network Log for details.")); - - return res; -} - -bool SmileyPackType::LoadSmileyFileMSL(bkstring& tbuf, bool onlyInfo, bkstring& modpath) -{ - _TPattern * pathsplit = _TPattern::compile(_T("(.*\\\\)(.*)\\.|$")); - _TMatcher * m0 = pathsplit->createTMatcher(modpath); - - m0->findFirstMatch(); - const bkstring pathstr = m0->getGroup(1); - const bkstring packstr = m0->getGroup(2); - - delete m0; - delete pathsplit; - - _TPattern * otherf = _TPattern::compile( - _T("^\\s*(Name|Author|Date|Version|ButtonSmiley)\\s*=\\s*\"(.*)\""), - _TPattern::MULTILINE_MATCHING); - - m0 = otherf->createTMatcher(tbuf); - - while (m0->findNextMatch()) - { - if (m0->getGroup(1) == _T("Name")) m_Name = m0->getGroup(2); - if (m0->getGroup(1) == _T("Author")) m_Author = m0->getGroup(2); - if (m0->getGroup(1) == _T("Date")) m_Date = m0->getGroup(2); - if (m0->getGroup(1) == _T("Version")) m_Version = m0->getGroup(2); - if (m0->getGroup(1) == _T("ButtonSmiley")) m_ButtonSmiley = m0->getGroup(2); - } - delete m0; - delete otherf; - - if (!onlyInfo) - { - selec.x = 0; - selec.y = 0; - win.x = 0; - win.y = 0; - { - _TPattern * pat = _TPattern::compile( - _T("^\\s*(Selection|Window)Size\\s*=\\s*(\\d+)\\s*,\\s*(\\d+)"), - _TPattern::MULTILINE_MATCHING); - _TMatcher * m0 = pat->createTMatcher(tbuf); - while (m0->findNextMatch()) - { - POINT tpt; - tpt.x = _ttol(m0->getGroup(2).c_str()); - tpt.y = _ttol(m0->getGroup(3).c_str()); - - if (m0->getGroup(1) == _T("Selection")) - selec = tpt; - else if (m0->getGroup(1) == _T("Window")) - win = tpt; - } - delete m0; - delete pat; - } - - _TPattern * smiley = _TPattern::compile( - _T("^\\s*Smiley(\\*)?\\s*=") // Is Hidden - _T("(?:\\s*\"(.*)\")") // Smiley file name - _T("(?:[\\s,]+(\\-?\\d+))") // Icon resource id - _T("(?:[\\s,]+(R|S)?\"(.*?)\")") // Trigger text - _T("(?:[\\s,]+\"(.*?)\")?") // Tooltip or insert text - _T("(?:[\\s,]+\"(.*?)\")?"), // Tooltip text - _TPattern::MULTILINE_MATCHING); - - _TMatcher * m0 = smiley->createTMatcher(tbuf); - - SmileyVectorType hiddenSmileys; - - unsigned smnum = 0; - while (m0->findNextMatch()) - { - bkstring resname = m0->getGroup(2); - if (resname.find(_T("http://")) != resname.npos) - { - if (GetSmileyFile(resname, packstr)) continue; - } - else - { - if (!resname.empty()) resname.insert(0, pathstr); - } - - SmileyType *dat = new SmileyType; - - const int iconIndex = _ttol(m0->getGroup(3).c_str()); - - dat->SetHidden(m0->getStartingIndex(1) >= 0); - if (m0->getStartingIndex(4) >= 0) - { - dat->SetRegEx(m0->getGroup(4) == _T("R")); - dat->SetService(m0->getGroup(4) == _T("S")); - } - dat->m_TriggerText = m0->getGroup(5); - if (dat->IsRegEx()) - { - if (m0->getStartingIndex(6) >= 0) - ReplaceAllSpecials(m0->getGroup(6), dat->m_InsertText); - - if (m0->getStartingIndex(7) >= 0) - ReplaceAllSpecials(m0->getGroup(7), dat->m_ToolText); - else - dat->m_ToolText = dat->m_InsertText; - } - else - { - if (m0->getStartingIndex(6) >= 0) - ReplaceAllSpecials(m0->getGroup(6), dat->m_ToolText); - else - ReplaceAllSpecials(dat->m_TriggerText, dat->m_ToolText); - } - - bool noerr; - if (resname.empty()) - { - dat->SetHidden(true); - dat->SetText(true); - noerr = true; - } - else - noerr = dat->LoadFromResource(resname, iconIndex); - - if (dat->IsHidden()) - hiddenSmileys.insert(dat); - else - m_SmileyList.insert(dat); - - if (!noerr) - { - static const TCHAR errmsg[] = _T("Smiley #%u in file %s for Smiley Pack %s not found."); - TCHAR msgtxt[1024]; - mir_sntprintf(msgtxt, SIZEOF(msgtxt), TranslateTS(errmsg), smnum, resname.c_str(), modpath.c_str()); - CallService(MS_NETLIB_LOG,(WPARAM) hNetlibUser, (LPARAM)(char*)T2A_SM(msgtxt)); - errorFound = true; - } - smnum++; - } - delete m0; - delete smiley; - - m_VisibleCount = m_SmileyList.getCount(); - - m_SmileyList.splice(hiddenSmileys); - - AddTriggersToSmileyLookup(); - } - - return true; -} - - -static void DecodeHTML(bkstring& str) -{ - if (str.find('&') != str.npos) - { - str = _TPattern::replace(bkstring(_T("<")), str, bkstring(_T("<"))); - str = _TPattern::replace(bkstring(_T(">")), str, bkstring(_T(">"))); - } -} - - -static IStream* DecodeBase64Data(const char* data) -{ - NETLIBBASE64 nlb64; - nlb64.pszEncoded = (char*)data; - nlb64.cchEncoded = (int)strlen(data); - nlb64.cbDecoded = Netlib_GetBase64DecodedBufferSize(nlb64.cchEncoded); - - IStream* pStream = NULL; - - // Read image list - HGLOBAL hBuffer = GlobalAlloc(GMEM_MOVEABLE, nlb64.cbDecoded); - if (hBuffer) - { - nlb64.pbDecoded = (PBYTE)GlobalLock(hBuffer); - CallService(MS_NETLIB_BASE64DECODE, 0, (LPARAM)&nlb64); - GlobalUnlock(hBuffer); - - CreateStreamOnHGlobal(hBuffer, TRUE, &pStream); - } - - return pStream; -} - - -bool SmileyPackType::LoadSmileyFileXEP(bkstring& tbuf, bool onlyInfo, bkstring& ) -{ - _TMatcher *m0, *m1, *m2; - - _TPattern * dbname_re = _TPattern::compile(_T("\\s*\"(.*?)\"\\s*"), - _TPattern::MULTILINE_MATCHING); - _TPattern * author_re = _TPattern::compile(_T("\\s*\"(.*?)\"\\s*"), - _TPattern::MULTILINE_MATCHING); - _TPattern * settings_re = _TPattern::compile(_T("(.*?)"), - _TPattern::MULTILINE_MATCHING | _TPattern::DOT_MATCHES_ALL); - - m0 = settings_re->createTMatcher(tbuf); - if (m0->findFirstMatch()) - { - bkstring settings = m0->getGroup(1); - - m1 = author_re->createTMatcher(settings); - if (m1->findFirstMatch()) - { - m_Author = m1->getGroup(1); - DecodeHTML(m_Author); - } - delete m1; - - m1 = dbname_re->createTMatcher(settings); - if (m1->findFirstMatch()) - { - m_Name = m1->getGroup(1); - DecodeHTML(m_Name); - } - delete m1; - } - delete m0; - - delete dbname_re; - delete author_re; - delete settings_re; - - if (!onlyInfo) - { - _TPattern * record_re = _TPattern::compile(_T("(?:\\s*\"(.*?)\")?(.*?)"), - _TPattern::MULTILINE_MATCHING | _TPattern::DOT_MATCHES_ALL); - _TPattern * expression_re = _TPattern::compile(_T("\\s*\"(.*?)\"\\s*"), - _TPattern::MULTILINE_MATCHING); - _TPattern * pastetext_re = _TPattern::compile(_T("\\s*\"(.*?)\"\\s*"), - _TPattern::MULTILINE_MATCHING); - _TPattern * images_re = _TPattern::compile(_T("(.*?)"), - _TPattern::MULTILINE_MATCHING | _TPattern::DOT_MATCHES_ALL); - _TPattern * image_re = _TPattern::compile(_T("(.*?)"), - _TPattern::MULTILINE_MATCHING | _TPattern::DOT_MATCHES_ALL); - _TPattern * imagedt_re = _TPattern::compile(_T(""), - _TPattern::MULTILINE_MATCHING ); - - m0 = images_re->createTMatcher(tbuf); - if (m0->findFirstMatch()) - { - bkstring images = m0->getGroup(1); - - m1 = imagedt_re->createTMatcher(images); - if (m1->findFirstMatch()) - { - IStream* pStream = DecodeBase64Data(T2A_SM(m1->getGroup(1).c_str())); - if (pStream != NULL) - { - if (m_hSmList != NULL) ImageList_Destroy(m_hSmList); - m_hSmList = ImageList_Read(pStream); - pStream->Release(); - } - } - delete m1; - } - delete m0; - - m0 = record_re->createTMatcher(tbuf); - while (m0->findNextMatch()) - { - SmileyType *dat = new SmileyType; - - dat->SetRegEx(true); - dat->SetImList(m_hSmList, _ttol(m0->getGroup(1).c_str())); - dat->m_ToolText = m0->getGroup(2); - DecodeHTML(dat->m_ToolText); - - bkstring rec = m0->getGroup(3); - - m1 = expression_re->createTMatcher(rec); - if (m1->findFirstMatch()) - { - dat->m_TriggerText = m1->getGroup(1); - DecodeHTML(dat->m_TriggerText); - } - delete m1; - - m1 = pastetext_re->createTMatcher(rec); - if (m1->findFirstMatch()) - { - dat->m_InsertText = m1->getGroup(1); - DecodeHTML(dat->m_InsertText); - } - delete m1; - dat->SetHidden(dat->m_InsertText.empty()); - - m1 = image_re->createTMatcher(rec); - if (m1->findFirstMatch()) - { - bkstring images = m1->getGroup(1); - - m2 = imagedt_re->createTMatcher(images); - if (m2->findFirstMatch()) - { - IStream* pStream = DecodeBase64Data(T2A_SM(m2->getGroup(1).c_str())); - if (pStream != NULL) - { - dat->LoadFromImage(pStream); - pStream->Release(); - } - } - delete m2; - } - delete m1; - - m_SmileyList.insert(dat); - } - delete m0; - - delete record_re; - delete expression_re; - delete pastetext_re; - delete images_re; - delete image_re; - delete imagedt_re; - } - - m_VisibleCount = m_SmileyList.getCount(); - - AddTriggersToSmileyLookup(); - - selec.x = 0; - selec.y = 0; - win.x = 0; - win.y = 0; - - return true; -} - - -// -// SmileyPackListType -// - - -bool SmileyPackListType::AddSmileyPack(bkstring& filename) -{ - bool res = true; - if (GetSmileyPack(filename) == NULL) - { //not exist yet, so add - SmileyPackType *smileyPack = new SmileyPackType; - - res = smileyPack->LoadSmileyFile(filename, FALSE); - if (res) - m_SmileyPacks.insert(smileyPack); - else - delete smileyPack; - } - return res; -} - - -SmileyPackType* SmileyPackListType::GetSmileyPack(bkstring& filename) -{ - bkstring modpath; - pathToAbsolute(filename, modpath); - - for (int i = 0; i < m_SmileyPacks.getCount(); i++) - { - bkstring modpath1; - pathToAbsolute(m_SmileyPacks[i].GetFilename(), modpath1); - if (lstrcmpi(modpath.c_str(), modpath1.c_str()) == 0) return &m_SmileyPacks[i]; - } - return NULL; -} - -void SmileyPackListType::ClearAndFreeAll() -{ - m_SmileyPacks.destroy(); -} - - -// -// SmileyCategoryType -// - - -SmileyCategoryType::SmileyCategoryType(SmileyPackListType* pSPS, const bkstring& name, - const bkstring& displayName, - const bkstring& defaultFilename, SmcType typ) -{ - m_pSmileyPackStore = pSPS; - type = typ; - m_Name = name; - m_DisplayName = displayName; - - opt.ReadPackFileName(m_Filename, m_Name, defaultFilename); -} - - -void SmileyCategoryType::Load(void) -{ - if (!opt.UseOneForAll || type != smcProto) - m_pSmileyPackStore->AddSmileyPack(m_Filename); -} - - -SmileyPackType* SmileyCategoryType::GetSmileyPack(void) -{ - return m_pSmileyPackStore->GetSmileyPack(m_Filename); -} - - -void SmileyCategoryType::SaveSettings(void) -{ - opt.WritePackFileName(m_Filename, m_Name); -} - -// -// SmileyCategoryListType -// - -void SmileyCategoryListType::ClearAndLoadAll(void) -{ - m_pSmileyPackStore->ClearAndFreeAll(); - - for (int i = 0; i < m_SmileyCategories.getCount(); i++) - m_SmileyCategories[i].Load(); -} - - -SmileyCategoryType* SmileyCategoryListType::GetSmileyCategory(const bkstring& name) -{ - for (int i = 0; i < m_SmileyCategories.getCount(); i++) - { - if (name.comparei(m_SmileyCategories[i].GetName()) == 0) return &m_SmileyCategories[i]; - } - return NULL; -} - - -SmileyCategoryType* SmileyCategoryListType::GetSmileyCategory(unsigned index) -{ - return index < (unsigned)m_SmileyCategories.getCount() ? &m_SmileyCategories[index] : NULL; -} - - -SmileyPackType* SmileyCategoryListType::GetSmileyPack(bkstring& categoryname) -{ - SmileyCategoryType* smc = GetSmileyCategory(categoryname); - return smc != NULL ? smc->GetSmileyPack() : NULL; -} - - -void SmileyCategoryListType::SaveSettings(void) -{ - bkstring catstr; - for (int i = 0; i < m_SmileyCategories.getCount(); i++) - { - m_SmileyCategories[i].SaveSettings(); - if (m_SmileyCategories[i].IsCustom()) - { - if (!catstr.empty()) catstr += '#'; - catstr += m_SmileyCategories[i].GetName(); - } - } - opt.WriteCustomCategories(catstr); -} - - -void SmileyCategoryListType::AddAndLoad(const bkstring& name, const bkstring& displayName) -{ - if (GetSmileyCategory(name) != NULL) return; - - AddCategory(name, displayName, smcExt); - // Load only if other smileys have been loaded already - if (m_SmileyCategories.getCount() > 1) - m_SmileyCategories[m_SmileyCategories.getCount()-1].Load(); -} - - -void SmileyCategoryListType::AddCategory(const bkstring& name, const bkstring& displayName, - SmcType typ, const bkstring& defaultFilename) -{ - if (GetSmileyCategory(name) == NULL) - m_SmileyCategories.insert(new SmileyCategoryType(m_pSmileyPackStore, name, - displayName, defaultFilename, typ)); -} - - -bool SmileyCategoryListType::DeleteCustomCategory(int index) -{ - if (index < m_SmileyCategories.getCount()) - { - if (m_SmileyCategories[index].IsCustom()) - { - m_SmileyCategories.remove(index); - return true; - } - - } - return false; -} - -void SmileyCategoryListType::AddAccountAsCategory(PROTOACCOUNT *acc, const bkstring& defaultFile) -{ - if (IsAccountEnabled(acc) && acc->szProtoName && IsSmileyProto(acc->szModuleName)) - { - bkstring displayName(acc->tszAccountName ? acc->tszAccountName : A2T_SM(acc->szModuleName)); - - const char* packnam = acc->szProtoName; - if (strcmp(packnam, "JABBER") == 0) - packnam = "JGMail"; - else if (strstr(packnam, "SIP") != NULL) - packnam = "MSN"; - - char path[MAX_PATH]; - mir_snprintf(path, sizeof(path), "Smileys\\nova\\%s.msl", packnam); - - bkstring paths = A2T_SM(path), patha; - pathToAbsolute(paths, patha); - - if (_taccess(patha.c_str(), 0) != 0) - paths = defaultFile; - - bkstring tname(A2T_SM(acc->szModuleName)); - AddCategory(tname, displayName, smcProto, paths); - } -} - -void SmileyCategoryListType::DeleteAccountAsCategory(PROTOACCOUNT *acc) -{ - bkstring tname(A2T_SM(acc->szModuleName)); - - HANDLE hContact = (HANDLE)CallService( MS_DB_CONTACT_FINDFIRST, 0, 0); - while (hContact != NULL) - { - char* proto = (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0); - if (proto) - { - DBVARIANT dbv; - if (DBGetContactSettingTString(hContact, proto, "Transport", &dbv) == 0) - { - bool found = (tname.comparei(dbv.ptszVal) == 0); - DBFreeVariant(&dbv); - if (found) return; - } - } - hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM)hContact, 0); - } - - for (int i = 0; i < m_SmileyCategories.getCount(); i++) - { - if (tname.comparei(m_SmileyCategories[i].GetName()) == 0) - { - m_SmileyCategories.remove(i); - break; - } - } -} - -void SmileyCategoryListType::AddContactTransportAsCategory(HANDLE hContact, const bkstring& defaultFile) -{ - char* proto = (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0); - if (proto == NULL) return; - - DBVARIANT dbv; - if (DBGetContactSettingTString(hContact, proto, "Transport", &dbv) == 0) - { - if (dbv.ptszVal[0] == '\0') - { - DBFreeVariant(&dbv); - return; - } - char* trsp = mir_strdup(T2A_SM(dbv.ptszVal)); - _strlwr(trsp); - - const char *packname = NULL; - if (strstr(trsp, "msn") != NULL) - packname = "msn"; - else if (strstr(trsp, "icq") != NULL) - packname = "icq"; - else if (strstr(trsp, "yahoo") != NULL) - packname = "yahoo"; - else if (strstr(trsp, "aim") != NULL) - packname = "aim"; - else if (strstr(trsp, "lcs") != NULL) - packname = "msn"; - - mir_free(trsp); - - bkstring displayName = dbv.ptszVal; - if (packname != NULL) - { - char path[MAX_PATH]; - mir_snprintf(path, sizeof(path), "Smileys\\nova\\%s.msl", packname); - - bkstring paths = A2T_SM(path), patha; - pathToAbsolute(paths, patha); - - if (_taccess(patha.c_str(), 0) != 0) - paths = defaultFile; - - AddCategory(displayName, displayName, smcProto, paths); - } - else - AddCategory(displayName, displayName, smcProto, defaultFile); - - DBFreeVariant(&dbv); - } -} - - -void SmileyCategoryListType::AddAllProtocolsAsCategory(void) -{ - bkstring displayName = TranslateT("Standard"); - bkstring tname = _T("Standard"); - AddCategory(tname, displayName, smcStd); - - const bkstring& defaultFile = GetSmileyCategory(tname)->GetFilename(); - - - unsigned lpcp = (unsigned)CallService(MS_LANGPACK_GETCODEPAGE, 0, 0); - if (lpcp == CALLSERVICE_NOTFOUND) lpcp = CP_ACP; - - - PROTOCOLDESCRIPTOR **protoList; - PROTOACCOUNT **accList; - int protoCount; - - if (ProtoEnumAccounts(&protoCount, &accList) == CALLSERVICE_NOTFOUND || (protoCount > 0 && accList[0]->cbSize == 0)) - { - CallService(MS_PROTO_ENUMPROTOCOLS, (WPARAM)&protoCount, (LPARAM)&protoList); - for (int i = 0; i < protoCount; i++) - { - if (protoList[i]->type != PROTOTYPE_PROTOCOL) continue; - - if (IsSmileyProto(protoList[i]->szName)) - { - const char* packnam = protoList[i]->szName; - if (strcmp(packnam, "JABBER") == 0) - packnam = "JGMail"; - else if (strstr(packnam, "SIP") != NULL) - packnam = "MSN"; - - char path[MAX_PATH]; - mir_snprintf(path, sizeof(path), "Smileys\\nova\\%s.msl", packnam); - - bkstring paths = A2T_SM(path), patha; - pathToAbsolute(paths, patha); - - if (_taccess(patha.c_str(), 0) != 0) - paths = defaultFile; - - char protoName[128]; - CallProtoService(protoList[i]->szName, PS_GETNAME, sizeof(protoName), (LPARAM)protoName); - - - displayName = A2W_SM(protoName, lpcp); - - tname = A2T_SM(protoList[i]->szName); - AddCategory(tname, displayName, smcProto, paths); - } - } - } - else - { - for (int i = 0; i < protoCount; i++) - AddAccountAsCategory(accList[i], defaultFile); - } - - HANDLE hContact = (HANDLE)CallService( MS_DB_CONTACT_FINDFIRST, 0, 0); - while (hContact != NULL) - { - AddContactTransportAsCategory(hContact, defaultFile); - hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM)hContact, 0); - } - - bkstring cats; - opt.ReadCustomCategories(cats); - - bkstring::size_type cppv = 0; - for (;;) - { - bkstring::size_type cp = cats.find('#', cppv); - if (cp != cats.npos) - { - displayName = cats.substr(cppv, cp - cppv); - AddCategory(displayName, displayName, smcCustom, defaultFile); - cppv = cp + 1; - } - else break; - } - if (cppv != cats.size()) - { - displayName = cats.substr(cppv, cats.size() - cppv); - AddCategory(displayName, displayName, smcCustom, defaultFile); - } -} - - -SmileyLookup::SmileyLookup(const bkstring& str, const bool regexs, const int ind, const bkstring& smpt) -{ - TCHAR msgtxt[1024]; - - m_ind = ind; - if (regexs) - { - static const bkstring testString(_T("Test String")); - m_pattern = _TPattern::compile(str); - m_valid = m_pattern != NULL; - if (m_valid) - { - _TMatcher* matcher = m_pattern->createTMatcher(testString); - m_valid &= (!matcher->findFirstMatch() || - matcher->getStartingIndex() != matcher->getEndingIndex()); - if (!m_valid) - { - static const TCHAR errmsg[] = _T("Regular Expression \"%s\" in smiley pack \"%s\" could produce \"empty matches\"."); - mir_sntprintf(msgtxt, SIZEOF(msgtxt), TranslateTS(errmsg), str.c_str(), smpt.c_str()); - } - delete matcher; - } - else - { - static const TCHAR errmsg[] = _T("Regular Expression \"%s\" in smiley pack \"%s\" malformed.") ; - mir_sntprintf(msgtxt, SIZEOF(msgtxt), TranslateTS(errmsg), str.c_str(), smpt.c_str()); - } - - if (!m_valid) CallService(MS_NETLIB_LOG, (WPARAM) hNetlibUser, (LPARAM)(char*)T2A_SM(msgtxt)); - } - else - { - m_text = str; - m_pattern = NULL; - m_valid = !str.empty(); - } -} - - -SmileyLookup::~SmileyLookup() -{ - if (m_pattern) delete m_pattern; -} - - -void SmileyLookup::find(const bkstring& str, SmileyLocVecType& smlcur, bool firstOnly) const -{ - if (!m_valid) return; - - if (m_text.empty()) - { - _TMatcher* matcher = m_pattern->createTMatcher(str); - while( matcher->findNextMatch()) - { - bkstring::size_type st = matcher->getStartingIndex(); - bkstring::size_type sz = matcher->getEndingIndex() - st; - if (sz != 0) - { - smlcur.insert(new SmileyLocType(st, sz)); - if (firstOnly && m_ind != -1) return; - } - } - delete matcher; - } - else - { - const TCHAR* pos = str.c_str(); - while( (pos = _tcsstr(pos, m_text.c_str())) != NULL ) - { - smlcur.insert(new SmileyLocType(pos - str.c_str(), m_text.size())); - pos += m_text.size(); - if (firstOnly && m_ind != -1) return; - } - } -} diff --git a/plugins/SmileyAdd/smileys.h b/plugins/SmileyAdd/smileys.h deleted file mode 100644 index 2b127eb225..0000000000 --- a/plugins/SmileyAdd/smileys.h +++ /dev/null @@ -1,287 +0,0 @@ -/* -Miranda SmileyAdd Plugin -Copyright (C) 2005 - 2011 Boris Krasnovskiy -Copyright (C) 2003 - 2004 Rein-Peter de Boer - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation version 2 -of the License. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#ifndef SMILEYADD_SMILEYS_H_ -#define SMILEYADD_SMILEYS_H_ - -#include "general.h" -#include "smltool.h" -#include "imagecache.h" - -#define MS_SMILEYADD_CUSTOMCATMENU "SmileyAdd/CustomCatMenu" - -const unsigned HiddenSmiley = 1; -const unsigned RegExSmiley = 2; -const unsigned ServiceSmiley = 4; -const unsigned TextSmiley = 8; -const unsigned SoundSmiley = 16; - -class SmileyType -{ -protected: - unsigned m_flags; - int m_index; - - SIZE m_size; - - HICON m_SmileyIcon; - ImageBase* m_xepimg; - - bkstring m_filepath; - - void SetFlagsBit(unsigned flag, bool set) - { if (set) m_flags |= flag; else m_flags &= ~flag; } - -public: - - bkstring m_TriggerText; - bkstring m_ToolText; - bkstring m_InsertText; - - SmileyType(void); - ~SmileyType(); - - const bkstring& GetTriggerText(void) const { return m_TriggerText; } - const bkstring& GetToolText(void) const { return m_ToolText; } - const bkstring& GetInsertText(void) const { return m_InsertText; } - const bkstring& GetFilePath(void) const { return m_filepath; } - - bool IsHidden(void) const { return (m_flags & HiddenSmiley) != 0; } - bool IsRegEx(void) const { return (m_flags & RegExSmiley) != 0; } - bool IsService(void) const { return (m_flags & ServiceSmiley) != 0; } - bool IsSound(void) const { return (m_flags & SoundSmiley) != 0; } - bool IsText(void) const { return (m_flags & TextSmiley) != 0; } - - bool IsFileFound(void) { return _taccess(m_filepath.c_str(), 0) == 0; } - bool IsValid(void) { return m_size.cx != 0; } - - ImageBase* CreateCachedImage(void); - - void GetSize(SIZE& size); - int GetStaticFrame(void) const { return m_index; } - - HICON GetIcon(void); - HICON GetIconDup(void); - HBITMAP GetBitmap(COLORREF bkgClr, int sizeX, int sizeY); - - void CallSmileyService(HANDLE hContact); - - void SetHidden(bool hid) { SetFlagsBit(HiddenSmiley, hid); } - void SetRegEx(bool regex) { SetFlagsBit(RegExSmiley, regex); } - void SetService(bool service) { SetFlagsBit(ServiceSmiley, service); } - void SetSound(bool sound) { SetFlagsBit(SoundSmiley, sound); } - void SetText(bool text) { SetFlagsBit(TextSmiley, text); } - - void SetImList(HIMAGELIST hImLst, long i); - - bool LoadFromResource(const bkstring& file, const int index); - bool LoadFromImage(IStream* pStream); -}; - - -class SmileyLookup -{ -private: - _TPattern* m_pattern; - - int m_ind; - bkstring m_text; - bool m_valid; - -public: - struct SmileyLocType - { - size_t pos, len; - SmileyLocType(size_t p, size_t l) : pos(p), len(l) {} - SmileyLocType() {} - }; - typedef SMOBJLIST SmileyLocVecType; - - SmileyLookup() { m_ind = 0; m_valid = false; m_pattern = NULL; }; - SmileyLookup(const bkstring& str, const bool regexs, const int ind, const bkstring& smpt); - ~SmileyLookup(); - - void find(const bkstring& str, SmileyLocVecType& smlcur, bool firstOnly) const; - int GetIndex(void) const { return m_ind; } - bool IsValid(void) const { return m_valid; } -}; - - -class SmileyPackType -{ -public: - typedef SMOBJLIST SmileyVectorType; - typedef SMOBJLIST SmileyLookupType; - - POINT selec, win; - -private: - bkstring m_Filename; //used as identification - bkstring m_Name; - bkstring m_Author; - bkstring m_Date; - bkstring m_Version; - bkstring m_ButtonSmiley; - - HIMAGELIST m_hSmList; - - int m_VisibleCount; - - SmileyVectorType m_SmileyList; - SmileyLookupType m_SmileyLookup; - - bool errorFound; - - void InsertLookup(SmileyType& sml, bkstring& lk, bool first); - void AddTriggersToSmileyLookup(void); - void ReplaceAllSpecials(const bkstring& Input, bkstring& Output); - bool LoadSmileyFileMSL(bkstring& tbuf, bool onlyInfo, bkstring& modpath); - bool LoadSmileyFileXEP(bkstring& tbuf, bool onlyInfo, bkstring& modpath); - -public: - SmileyPackType(); - ~SmileyPackType(); - - SmileyVectorType& GetSmileyList(void) { return m_SmileyList; } - SmileyLookupType* GetSmileyLookup(void) { return &m_SmileyLookup; } - - const bkstring& GetFilename(void) const { return m_Filename; } - const bkstring& GetName(void) const { return m_Name; } - const bkstring& GetAuthor(void) const { return m_Author; } - const bkstring& GetDate(void) const { return m_Date; } - const bkstring& GetVersion(void) const { return m_Version; } - - int SmileyCount(void) const { return m_SmileyList.getCount(); } - int VisibleSmileyCount(void) const { return m_VisibleCount; } - - SmileyType* GetSmiley(unsigned index); - - const TCHAR* GetButtonSmiley(void) const { return m_ButtonSmiley.c_str(); } - - bool LoadSmileyFile(const bkstring& filename, bool onlyInfo, bool noerr = false); - - void Clear(void); -}; - - -class SmileyPackListType -{ -public: - typedef SMOBJLIST SmileyPackVectorType; - -private: - SmileyPackVectorType m_SmileyPacks; - -public: - int NumberOfSmileyPacks(void) { return m_SmileyPacks.getCount(); } - - bool AddSmileyPack(bkstring& filename); - void ClearAndFreeAll(void); - SmileyPackType* GetSmileyPack(bkstring& filename); -}; - - -typedef enum -{ - smcNone, - smcStd, - smcProto, - smcCustom, - smcExt -} SmcType; - - -class SmileyCategoryType -{ -private: - bkstring m_Name; - bkstring m_DisplayName; - bkstring m_Filename; //functions as identification - - SmcType type; - - SmileyPackListType* m_pSmileyPackStore; - -public: - SmileyCategoryType() { type = smcNone; m_pSmileyPackStore = NULL; }; - SmileyCategoryType(SmileyPackListType* pSPS, const bkstring& name, - const bkstring& displayName, const bkstring& defaultFilename, SmcType typ); - - const bkstring& GetDisplayName(void) const { return m_DisplayName; } - const bkstring& GetName(void) const { return m_Name; } - const bkstring& GetFilename(void) const { return m_Filename; } - - bool IsCustom(void) { return type == smcCustom; } - bool IsProto(void) { return type == smcProto; } - bool IsExt(void) { return type == smcExt; } - - SmcType GetType(void) { return type; } - - SmileyPackType* GetSmileyPack(void); - - void SetFilename(bkstring& name) { m_Filename = name; } - void SetDisplayName(bkstring& name) { m_DisplayName = name; } - - void ClearFilename(void) { m_Filename.clear(); } - void SaveSettings(void); - - void Load(void); -}; - - -class SmileyCategoryListType -{ -public: - typedef SMOBJLIST SmileyCategoryVectorType; - -private: - SmileyCategoryVectorType m_SmileyCategories; - SmileyPackListType* m_pSmileyPackStore; - -public: - void SetSmileyPackStore(SmileyPackListType* pSPS) { m_pSmileyPackStore = pSPS; } - - SmileyCategoryType* GetSmileyCategory(const bkstring& name); - SmileyCategoryType* GetSmileyCategory(unsigned index); - SmileyPackType* GetSmileyPack(bkstring& name); - SmileyCategoryVectorType* GetSmileyCategoryList(void) { return &m_SmileyCategories; }; - - int NumberOfSmileyCategories(void) { return m_SmileyCategories.getCount(); } - - void AddCategory(const bkstring& name, const bkstring& displayName, SmcType typ, - const bkstring& defaultFilename = bkstring(_T("Smileys\\nova\\default.msl"))); - void AddAndLoad(const bkstring& name, const bkstring& displayName); - void AddAllProtocolsAsCategory(void); - void AddAccountAsCategory(PROTOACCOUNT *acc, const bkstring& defaultFile); - void AddContactTransportAsCategory(HANDLE hContact, const bkstring& defaultFile); - - void ClearAndLoadAll(void); - void ClearAll(void) - { m_pSmileyPackStore->ClearAndFreeAll(); m_SmileyCategories.destroy(); } - - bool DeleteCustomCategory(int index); - void DeleteAccountAsCategory(PROTOACCOUNT *acc); - - void SaveSettings(void); -}; - -extern SmileyPackListType g_SmileyPacks; -extern SmileyCategoryListType g_SmileyCategories; - -#endif //SMILEYADD_SMILEYS_H_ diff --git a/plugins/SmileyAdd/smltool.cpp b/plugins/SmileyAdd/smltool.cpp deleted file mode 100644 index 31695a516a..0000000000 --- a/plugins/SmileyAdd/smltool.cpp +++ /dev/null @@ -1,785 +0,0 @@ -/* -Miranda SmileyAdd Plugin -Copyright (C) 2005 - 2011 Boris Krasnovskiy All Rights Reserved -Copyright (C) 2003 - 2004 Rein-Peter de Boer - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation version 2 -of the License. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#include "general.h" -#include "options.h" -#include "smileys.h" -#include "smltool.h" -#include "anim.h" - -#define SB_MYMOVE 20 - -// -// SmileyToolwindowType -// -class SmileyToolWindowType -{ -private: - unsigned m_NumberOfVerticalButtons; - unsigned m_NumberOfHorizontalButtons; - SIZE m_BitmapWidth; - SIZE m_ButtonSize; - unsigned m_ButtonSpace; - unsigned m_NumberOfButtons; - int m_WindowSizeY; - - HWND m_hwndDialog; - HWND m_hToolTip; - HWND m_hWndTarget; - SmileyPackType* m_pSmileyPack; - int m_CurrentHotTrack; - int m_XPosition; - int m_YPosition; - int m_Direction; - UINT m_TargetMessage; - WPARAM m_TargetWParam; - HANDLE m_hContact; - int rowSel; - bool m_Choosing; - - AnimatedPack* m_AniPack; - - void InitDialog(LPARAM lParam); - void PaintWindow(void); - void InsertSmiley(void); - void MouseMove(int x, int y); - void KeyUp(WPARAM wParam, LPARAM lParam); - void SmileySel(int but); - void ScrollV(int action, int dist = 0); - - int GetRowSize(void) const { return m_ButtonSize.cy + m_ButtonSpace; } - - void CreateSmileyBitmap(HDC hdc); - void CreateSmileyWinDim(void); - RECT CalculateButtonToCoordinates(int buttonPosition, int scroll); - int CalculateCoordinatesToButton(POINT pt, int scroll); - -public: - SmileyToolWindowType(HWND hWnd); - LRESULT DialogProcedure(UINT msg, WPARAM wParam, LPARAM lParam); -}; - - -LRESULT CALLBACK DlgProcSmileyToolWindow(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) -{ - SmileyToolWindowType* pOD; - LRESULT Result; - - pOD = (SmileyToolWindowType*) GetWindowLongPtr(hwndDlg, GWLP_USERDATA); - if (pOD == NULL) { - pOD = new SmileyToolWindowType(hwndDlg); - SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR) pOD); - } - - Result = pOD->DialogProcedure(msg, wParam, lParam); - // SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, Result); - - if (msg == WM_NCDESTROY) - { - delete pOD; - Result = FALSE; - } - - return Result; -} - - -SmileyToolWindowType::SmileyToolWindowType(HWND hWnd) -{ - m_hwndDialog = hWnd; - rowSel = -1; - m_AniPack = NULL; - - m_NumberOfVerticalButtons = 0; - m_NumberOfHorizontalButtons = 0; - m_BitmapWidth.cx = 0; - m_BitmapWidth.cy = 0; - m_ButtonSize.cx = 0; - m_ButtonSize.cy = 0; - m_ButtonSpace = 1; - m_NumberOfButtons = 0; -} - - -LRESULT SmileyToolWindowType::DialogProcedure(UINT msg, WPARAM wParam, LPARAM lParam) -{ - LRESULT Result = FALSE; - - switch (msg) - { - case WM_ACTIVATE: - if (wParam == WA_INACTIVE) - DestroyWindow(m_hwndDialog); - break; - - case WM_PAINT: - PaintWindow(); - break; - - case WM_TIMER: - if (m_AniPack) m_AniPack->ProcessTimerTick(m_hwndDialog); - break; - - case WM_DESTROY: - KillTimer(m_hwndDialog, 1); - if (m_AniPack) delete m_AniPack; - m_AniPack = NULL; - DestroyWindow(m_hToolTip); - PostQuitMessage(0); - if (m_Choosing) - SetFocus(m_hWndTarget); - break; - - case WM_KEYUP: - KeyUp(wParam, lParam); - break; - - case WM_CREATE: - InitDialog(lParam); - break; - - case WM_VSCROLL: - ScrollV(LOWORD(wParam)); - break; - - case WM_MOUSEMOVE: - MouseMove(LOWORD(lParam), HIWORD(lParam)); - break; - - case WM_LBUTTONUP: - InsertSmiley(); - break; - - case WM_MOUSEWHEEL: - ScrollV(SB_MYMOVE, ((short)HIWORD(wParam))/-120); - MouseMove(LOWORD(lParam), HIWORD(lParam)); - break; - - default: - Result = DefWindowProc(m_hwndDialog, msg, wParam, lParam); - break; - } - - return Result; -} - -struct smlsrvstruct -{ - smlsrvstruct(SmileyType *tsml, HANDLE thContact) - : sml(tsml), hContact(thContact) {} - SmileyType *sml; - HANDLE hContact; -}; - -void CALLBACK smileyServiceCallback(void* arg) -{ - smlsrvstruct* p = (smlsrvstruct*)arg; - p->sml->CallSmileyService(p->hContact); - delete p; -} - -void SmileyToolWindowType::InsertSmiley(void) -{ - if (m_CurrentHotTrack >= 0 && m_hWndTarget != NULL) - { - SmileyType *sml = m_pSmileyPack->GetSmiley(m_CurrentHotTrack); - - if (sml->IsService()) - { - smlsrvstruct* p = new smlsrvstruct(sml, m_hContact); - CallFunctionAsync(smileyServiceCallback, p); - } - else - { - bkstring insertText; - - if (opt.SurroundSmileyWithSpaces) insertText = ' '; - insertText += sml->GetInsertText(); - if (opt.SurroundSmileyWithSpaces) insertText += ' '; - - SendMessage(m_hWndTarget, m_TargetMessage, m_TargetWParam, (LPARAM) insertText.c_str()); - } - m_Choosing = true; - DestroyWindow(m_hwndDialog); - } - else if (m_hWndTarget == NULL) - DestroyWindow(m_hwndDialog); -} - -void SmileyToolWindowType::SmileySel(int but) -{ - if (but != m_CurrentHotTrack) - { - SCROLLINFO si; - si.cbSize = sizeof (si); - si.fMask = SIF_POS; - si.nPos = 0; - GetScrollInfo (m_hwndDialog, SB_VERT, &si); - - HDC hdc = GetDC(m_hwndDialog); - if (m_CurrentHotTrack >= 0) - { - RECT rect = CalculateButtonToCoordinates(m_CurrentHotTrack, si.nPos); - DrawFocusRect(hdc, &rect); - m_CurrentHotTrack = -1; - SendMessage(m_hToolTip, TTM_ACTIVATE, FALSE, 0); - } - m_CurrentHotTrack = but; - if (m_CurrentHotTrack >= 0) - { - TOOLINFO ti = {0}; - ti.cbSize = sizeof(ti); - ti.uFlags = TTF_IDISHWND | TTF_SUBCLASS; - ti.hwnd = m_hwndDialog; - ti.uId = (UINT_PTR)m_hwndDialog; - - const bkstring& toolText = m_pSmileyPack->GetSmiley(m_CurrentHotTrack)->GetToolText(); - ti.lpszText = const_cast(toolText.c_str()); - SendMessage(m_hToolTip, TTM_UPDATETIPTEXT, 0, (LPARAM)&ti); - SendMessage(m_hToolTip, TTM_ACTIVATE, TRUE, 0); - - RECT rect = CalculateButtonToCoordinates(m_CurrentHotTrack, si.nPos); - DrawFocusRect(hdc, &rect); - if (m_AniPack) m_AniPack->SetSel(rect); - } - ReleaseDC(m_hwndDialog, hdc); - } -} - - -void SmileyToolWindowType::ScrollV(int action, int dist) -{ - SCROLLINFO si; - si.cbSize = sizeof (si); - si.fMask = SIF_ALL; - GetScrollInfo (m_hwndDialog, SB_VERT, &si); - - // Save the position for comparison later on - int yPos = si.nPos; - switch (action) - { - // user clicked the HOME keyboard key - case SB_TOP: - si.nPos = si.nMin; - break; - - // user clicked the END keyboard key - case SB_BOTTOM: - si.nPos = si.nMax; - break; - - // user clicked the top arrow - case SB_LINEUP: - si.nPos -= 1; - break; - - // user clicked the bottom arrow - case SB_LINEDOWN: - si.nPos += 1; - break; - - // user clicked the scroll bar shaft above the scroll box - case SB_PAGEUP: - si.nPos -= si.nPage; - break; - - // user clicked the scroll bar shaft below the scroll box - case SB_PAGEDOWN: - si.nPos += si.nPage; - break; - - // user dragged the scroll box - case SB_THUMBTRACK: - si.nPos = si.nTrackPos; - break; - - // user dragged the scroll box - case SB_MYMOVE: - si.nPos += dist; - break; - } - // Set the position and then retrieve it. Due to adjustments - // by Windows it may not be the same as the value set. - si.fMask = SIF_POS; - SetScrollInfo (m_hwndDialog, SB_VERT, &si, TRUE); - GetScrollInfo (m_hwndDialog, SB_VERT, &si); - // If the position has changed, scroll window and update it - if (si.nPos != yPos) - { - if (m_AniPack) m_AniPack->SetOffset(si.nPos*GetRowSize()); - - ScrollWindowEx(m_hwndDialog, 0, (yPos - si.nPos) * GetRowSize(), - NULL, NULL, NULL, NULL, SW_INVALIDATE); - - UpdateWindow (m_hwndDialog); - } -} - - -void SmileyToolWindowType::MouseMove(int xposition, int yposition) -{ - if (m_CurrentHotTrack == -2) return; //prevent focussing when not drawn yet! - // SetFocus(m_hwndDialog); - - - SCROLLINFO si; - si.cbSize = sizeof (si); - si.fMask = SIF_POS; - si.nPos = 0; - GetScrollInfo (m_hwndDialog, SB_VERT, &si); - - POINT pt = { xposition, yposition }; - int but = CalculateCoordinatesToButton(pt, si.nPos); - SmileySel(but); -} - - - -void SmileyToolWindowType::KeyUp(WPARAM wParam, LPARAM lParam) -{ - int colSel = -1, numKey = -1; - int but = m_CurrentHotTrack; - - switch(wParam) - { - case VK_END: - but = m_NumberOfButtons-1; - break; - - case VK_HOME: - but = 0; - break; - - case VK_LEFT: - but -= (opt.IEViewStyle ? 1 : m_NumberOfVerticalButtons) * LOWORD(lParam); - break; - - case VK_UP: - but -= (opt.IEViewStyle ? m_NumberOfHorizontalButtons : 1) * LOWORD(lParam); - break; - - case VK_RIGHT: - but += (opt.IEViewStyle ? 1 : m_NumberOfVerticalButtons) * LOWORD(lParam); - break; - - case VK_DOWN: - but += (opt.IEViewStyle ? m_NumberOfHorizontalButtons : 1) * LOWORD(lParam); - break; - - case VK_SPACE: - case VK_RETURN: - if (but != -1) InsertSmiley(); - return; - - case VK_ESCAPE: - DestroyWindow(m_hwndDialog); - return; - - case VK_NUMPAD1: - case VK_NUMPAD2: - case VK_NUMPAD3: - case VK_NUMPAD4: - case VK_NUMPAD5: - case VK_NUMPAD6: - case VK_NUMPAD7: - case VK_NUMPAD8: - case VK_NUMPAD9: - if ((GetKeyState(VK_NUMLOCK) & 1) != 0) - numKey = (int)wParam - VK_NUMPAD1; - else - { - rowSel = -1; - return; - } - break; - - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - numKey = (int)wParam - '1'; - break; - - default: - rowSel = -1; - return; - } - - if (numKey != -1) - { - if (rowSel == -1) - { - rowSel = numKey; - but = (opt.IEViewStyle ? m_NumberOfHorizontalButtons : 1) * rowSel; - } - else - { - colSel = numKey; - if (opt.IEViewStyle) - but = colSel + m_NumberOfHorizontalButtons * rowSel; - else - but = rowSel + m_NumberOfVerticalButtons * colSel; - } - } - - if (but < 0) but = 0; - if (but >= (int)m_NumberOfButtons) but = m_NumberOfButtons-1; - - SmileySel(but); - if (colSel != -1) InsertSmiley(); -} - - -void SmileyToolWindowType::InitDialog(LPARAM lParam) -{ - LPCREATESTRUCT createStruct = (LPCREATESTRUCT)lParam; - SmileyToolWindowParam* stwp = (SmileyToolWindowParam*) createStruct->lpCreateParams; - - m_pSmileyPack = stwp->pSmileyPack; - m_XPosition = stwp->xPosition; - m_YPosition = stwp->yPosition; - m_hWndTarget = stwp->hWndTarget; - m_TargetMessage = stwp->targetMessage; - m_TargetWParam = stwp->targetWParam; - m_Direction = stwp->direction; - m_hContact = stwp->hContact; - - m_CurrentHotTrack = -2; - m_Choosing = false; - - CreateSmileyWinDim(); - - int width = m_BitmapWidth.cx; - int height = m_BitmapWidth.cy; - - const int colsz = GetRowSize(); - const int heightn = m_WindowSizeY; - - SCROLLINFO si; - - si.cbSize = sizeof(si); - si.fMask = SIF_RANGE | SIF_PAGE | SIF_POS; - si.nMin = 0; - si.nMax = height / colsz - 1; - si.nPage = heightn / colsz; - si.nPos = 0; - SetScrollInfo(m_hwndDialog, SB_VERT, &si, TRUE); - - if (GetWindowLongPtr(m_hwndDialog, GWL_STYLE) & WS_VSCROLL) - width += GetSystemMetrics(SM_CXVSCROLL); - - RECT rc = { 0, 0, width, heightn }; - AdjustWindowRectEx(&rc, GetWindowLongPtr(m_hwndDialog, GWL_STYLE), - FALSE, GetWindowLongPtr(m_hwndDialog, GWL_EXSTYLE)); - - width = rc.right - rc.left; - height = rc.bottom - rc.top; - - switch (m_Direction) - { - case 1: - m_XPosition-=width; - break; - case 2: - m_XPosition-=width; - m_YPosition-=height; - break; - case 3: - m_YPosition-=height; - break; - } - - // Get screen dimentions - int xoScreen = GetSystemMetrics(SM_XVIRTUALSCREEN); - int yoScreen = GetSystemMetrics(SM_YVIRTUALSCREEN); - - int xScreen = GetSystemMetrics(SM_CXVIRTUALSCREEN); - int yScreen = GetSystemMetrics(SM_CYVIRTUALSCREEN); - - if (xScreen == 0) xScreen = GetSystemMetrics(SM_CXSCREEN); - if (yScreen == 0) yScreen = GetSystemMetrics(SM_CYSCREEN); - - xScreen += xoScreen; - yScreen += yoScreen; - - // Prevent window from opening off-screen - if (m_YPosition + height > yScreen) m_YPosition = yScreen - height; - if (m_XPosition + width > xScreen) m_XPosition = xScreen - width; - if (m_YPosition < yoScreen) m_YPosition = yoScreen; - if (m_XPosition < xoScreen) m_XPosition = xoScreen; - - // Move window to desired location - SetWindowPos(m_hwndDialog, NULL, m_XPosition, m_YPosition, - width, height, SWP_NOZORDER); - - m_AniPack = new AnimatedPack(m_hwndDialog, height, m_ButtonSize, opt.SelWndBkgClr); - - SmileyPackType::SmileyVectorType &sml = m_pSmileyPack->GetSmileyList(); - for (unsigned i=0; iAdd(&sml[i], CalculateButtonToCoordinates(i, 0), opt.IEViewStyle); - } - } - m_AniPack->SetOffset(0); - - if (opt.AnimateSel) SetTimer(m_hwndDialog, 1, 100, NULL); - - //add tooltips - m_hToolTip = CreateWindowEx(WS_EX_TOPMOST, TOOLTIPS_CLASS, _T(""), - TTS_NOPREFIX | WS_POPUP, 0, 0, 0, 0, m_hwndDialog, NULL, g_hInst, NULL); - TOOLINFO ti = {0}; - ti.cbSize = sizeof(ti); - ti.uFlags = TTF_IDISHWND | TTF_SUBCLASS; - ti.hwnd = m_hwndDialog; - ti.uId = (UINT_PTR)m_hwndDialog; - ti.lpszText = TranslateT("d'Oh!"); - SendMessage(m_hToolTip, TTM_ADDTOOL, 0, (LPARAM)&ti); -} - - -void SmileyToolWindowType::PaintWindow(void) -{ - SCROLLINFO si; - si.cbSize = sizeof(si); - si.fMask = SIF_POS; - si.nPos = 0; - GetScrollInfo(m_hwndDialog, SB_VERT, &si); - - PAINTSTRUCT ps; - HDC hdc = BeginPaint(m_hwndDialog, &ps); - - HBITMAP hBmp = CreateCompatibleBitmap(hdc, m_BitmapWidth.cx, m_BitmapWidth.cy); - HDC hdcMem = CreateCompatibleDC(hdc); - HANDLE hOld = SelectObject(hdcMem, hBmp); - - CreateSmileyBitmap(hdcMem); - - if (m_AniPack) m_AniPack->Draw(hdcMem); - - BitBlt(hdc, 0, 0, m_BitmapWidth.cx, m_WindowSizeY, hdcMem, 0, 0, SRCCOPY); - - SelectObject(hdcMem, hOld); - DeleteObject(hBmp); - DeleteDC(hdcMem); - - if (m_CurrentHotTrack == -2) m_CurrentHotTrack = -1; - - EndPaint(m_hwndDialog, &ps); -} - - -void SmileyToolWindowType::CreateSmileyWinDim(void) -{ - m_NumberOfButtons = m_pSmileyPack->VisibleSmileyCount(); - - if (m_NumberOfButtons == 0) return; - - // Find largest smiley - if (m_pSmileyPack->selec.x == 0 || m_pSmileyPack->selec.y == 0) - { - if (opt.ScaleAllSmileys) - { - m_pSmileyPack->GetSmiley(0)->GetSize(m_ButtonSize); - ++m_ButtonSize.cx; ++m_ButtonSize.cy; - } - else - { - m_ButtonSize.cx = 0; - m_ButtonSize.cy = 0; - SmileyPackType::SmileyVectorType &sml = m_pSmileyPack->GetSmileyList(); - for (unsigned i=0; iselec; - } - - if (m_pSmileyPack->win.x == 0 || m_pSmileyPack->win.y == 0) - { - if (opt.IEViewStyle) - { - // All integer square root - unsigned i; - for (i=1; i*iwin.x; - m_NumberOfVerticalButtons = m_NumberOfButtons / m_NumberOfHorizontalButtons + - (m_NumberOfButtons % m_NumberOfHorizontalButtons != 0); - } - - m_BitmapWidth.cx = m_NumberOfHorizontalButtons * (m_ButtonSize.cx + m_ButtonSpace) + m_ButtonSpace; - m_BitmapWidth.cy = m_NumberOfVerticalButtons * (m_ButtonSize.cy + m_ButtonSpace) + m_ButtonSpace; - - const int colsz = m_ButtonSize.cy + m_ButtonSpace; - int wndsz = min((int)m_BitmapWidth.cy, GetSystemMetrics(SM_CYSCREEN) / 2); - if (opt.IEViewStyle) wndsz = min(wndsz, 250); - - if (m_pSmileyPack->win.x != 0 && m_pSmileyPack->win.y != 0) - wndsz = min(wndsz, m_pSmileyPack->win.y * (m_ButtonSize.cy + (int)m_ButtonSpace) + (int)m_ButtonSpace); - - m_WindowSizeY = wndsz - (wndsz % colsz) + m_ButtonSpace; -} - - -void SmileyToolWindowType::CreateSmileyBitmap(HDC hdc) -{ - const RECT rc = { 0, 0, m_BitmapWidth.cx, m_WindowSizeY }; - - SetBkColor(hdc, opt.SelWndBkgClr); - const HBRUSH hBkgBrush = CreateSolidBrush(opt.SelWndBkgClr); - FillRect(hdc, &rc, hBkgBrush); - DeleteObject(hBkgBrush); - - if (opt.IEViewStyle) - { - HPEN hpen = CreatePen(PS_DOT, 1, 0); - HGDIOBJ hOldPen = SelectObject(hdc, hpen); - - POINT pts[2] = { {0, 0}, {m_BitmapWidth.cx, 0} }; - - for (unsigned i=0; i<=m_NumberOfVerticalButtons; i++) - { - pts[0].y = pts[1].y = i * (m_ButtonSize.cy + m_ButtonSpace); - if (pts[0].y > m_WindowSizeY) break; - Polyline(hdc, pts, 2); - } - - pts[0].y = 0; pts[1].y = m_BitmapWidth.cy; - for (unsigned j=0; j<=m_NumberOfHorizontalButtons; j++) - { - pts[0].x = pts[1].x = j * (m_ButtonSize.cx + m_ButtonSpace); - Polyline(hdc, pts, 2); - } - - SelectObject(hdc, hOldPen); - DeleteObject(hpen); - } -} - - -RECT SmileyToolWindowType::CalculateButtonToCoordinates(int buttonPosition, int scroll) -{ - int row, rowpos; - - if (opt.IEViewStyle) - { - row = buttonPosition / m_NumberOfHorizontalButtons; - rowpos = buttonPosition % m_NumberOfHorizontalButtons; - } - else - { - row = buttonPosition % m_NumberOfVerticalButtons; - rowpos = buttonPosition / m_NumberOfVerticalButtons; - } - - RECT pt; - pt.left = rowpos * (m_ButtonSize.cx + m_ButtonSpace) + m_ButtonSpace; - pt.top = (row - scroll) * (m_ButtonSize.cy + m_ButtonSpace) + m_ButtonSpace; - pt.right = pt.left + m_ButtonSize.cx; - pt.bottom = pt.top + m_ButtonSize.cy; - - return pt; -} - - -int SmileyToolWindowType::CalculateCoordinatesToButton(POINT pt, int scroll) -{ - const int rowpos = (pt.x - m_ButtonSpace) / (m_ButtonSize.cx + m_ButtonSpace); - const int row = (pt.y - m_ButtonSpace) / (m_ButtonSize.cy + m_ButtonSpace) + scroll; - - int pos; - if (opt.IEViewStyle) - pos = m_NumberOfHorizontalButtons * row + rowpos; - else - pos = m_NumberOfVerticalButtons * rowpos + row; - - if (pos >= (int)m_NumberOfButtons) pos = -1; - - return pos; -} - -void __cdecl SmileyToolThread(void *arg) -{ - SmileyToolWindowParam* stwp = (SmileyToolWindowParam*)arg; - if (stwp->pSmileyPack && stwp->pSmileyPack->VisibleSmileyCount()) - { - WNDCLASSEX wndclass; - wndclass.cbSize = sizeof(wndclass); - wndclass.style = CS_SAVEBITS; - wndclass.lpfnWndProc = DlgProcSmileyToolWindow; - wndclass.cbClsExtra = 0; - wndclass.cbWndExtra = 4; - wndclass.hInstance = g_hInst; - wndclass.hIcon = NULL; - wndclass.hCursor = LoadCursor (NULL, IDC_ARROW); - wndclass.hbrBackground = CreateSolidBrush(opt.SelWndBkgClr); - wndclass.lpszMenuName = NULL; - wndclass.lpszClassName = _T("SmileyTool"); - wndclass.hIconSm = NULL; - RegisterClassEx(&wndclass); - - CreateWindowEx(WS_EX_TOPMOST | WS_EX_NOPARENTNOTIFY, _T("SmileyTool"), NULL, - WS_BORDER | WS_POPUP | WS_VISIBLE, - CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, - ((SmileyToolWindowParam*)arg)->hWndParent, NULL, g_hInst, arg); - - SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_BELOW_NORMAL); - - MSG msg; - while (GetMessage(&msg, NULL, 0, 0)) - { - TranslateMessage(&msg); - DispatchMessage(&msg); - } - UnregisterClass(_T("SmileyTool"), g_hInst); - } - delete stwp; -} diff --git a/plugins/SmileyAdd/smltool.h b/plugins/SmileyAdd/smltool.h deleted file mode 100644 index 89fb786862..0000000000 --- a/plugins/SmileyAdd/smltool.h +++ /dev/null @@ -1,45 +0,0 @@ -/* -Miranda SmileyAdd Plugin -Copyright (C) 2005 - 2011 Boris Krasnovskiy -Copyright (C) 2003 - 2004 Rein-Peter de Boer - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation version 2 -of the License. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#ifndef SMILEYADD_SMLTOOL_H_ -#define SMILEYADD_SMLTOOL_H_ - -class SmileyPackType; - -struct SmileyToolWindowParam -{ - SmileyPackType* pSmileyPack; - int xPosition; - int yPosition; - int direction; - HWND hWndTarget; - HWND hWndParent; - UINT targetMessage; - WPARAM targetWParam; - HANDLE hContact; -}; - - -void __cdecl SmileyToolThread(void *arg); - -#ifndef min -#define min(A, B) ((A) < (B) ? (A) : (B)) -#endif - -#endif // SMILEYADD_SMLTOOL_H_ diff --git a/plugins/SmileyAdd/src/AniSmileyObject.cpp b/plugins/SmileyAdd/src/AniSmileyObject.cpp new file mode 100644 index 0000000000..42a63d3549 --- /dev/null +++ b/plugins/SmileyAdd/src/AniSmileyObject.cpp @@ -0,0 +1,450 @@ +/* +Miranda SmileyAdd Plugin +Copyright (C) 2008 - 2011 Boris Krasnovskiy All Rights Reserved + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation version 2 +of the License. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include "general.h" +#include "SmileyBase.h" +#include "m_smileyadd.h" +#include "smileys.h" +#include "options.h" + +#include + + +class CAniSmileyObject; + +static int CompareAniSmiley(const CAniSmileyObject* p1, const CAniSmileyObject* p2) +{ + return (int)((char*)p2 - (char*)p1); +} + +static LIST regAniSmileys(10, CompareAniSmiley); + +static UINT_PTR timerId; +static void CALLBACK timerProc(HWND, UINT, UINT_PTR, DWORD); + +static void CALLBACK sttMainThreadCallback( PVOID ) +{ + if (timerId == 0xffffffff) + timerId = SetTimer(NULL, 0, 100, (TIMERPROC)timerProc); +} + + +class CAniSmileyObject : public ISmileyBase +{ +private: + typedef enum { animStdOle, animDrctRichEd, animHpp } AnimType; + + POINTL m_rectOrig; + SIZEL m_rectExt; + + COLORREF m_bkg; + + SmileyType* m_sml; + ImageBase* m_img; + unsigned m_nFramePosition; + + long m_counter; + unsigned m_richFlags; + long m_lastObjNum; + + AnimType m_animtype; + bool m_allowAni; + +public: + CAniSmileyObject(SmileyType* sml, COLORREF clr, bool ishpp) + { + m_allowAni = false; + m_animtype = ishpp ? animHpp : animStdOle; + m_bkg = clr; + + m_rectOrig.x = 0; + m_rectOrig.y = 0; + m_rectExt.cx = 0; + m_rectExt.cy = 0; + + m_richFlags = 0; + m_lastObjNum = 0; + + m_sml = sml; + m_img = NULL; + m_nFramePosition = 0; + m_counter = 0; + } + + ~CAniSmileyObject(void) + { + UnloadSmiley(); + } + + void LoadSmiley(void) + { + if (m_img != NULL) return; + + m_img = m_sml->CreateCachedImage(); + if (m_img && m_img->IsAnimated() && opt.AnimateDlg) + { + m_nFramePosition = 0; + m_img->SelectFrame(m_nFramePosition); + long frtm = m_img->GetFrameDelay(); + m_counter = frtm / 10 + ((frtm % 10) >= 5); + + regAniSmileys.insert(this); + if (timerId == 0) + { + timerId = 0xffffffff; + CallFunctionAsync(sttMainThreadCallback, NULL); + } + } + else + m_nFramePosition = m_sml->GetStaticFrame(); + } + + void UnloadSmiley(void) + { + regAniSmileys.remove(this); + + if (timerId && (timerId+1) && regAniSmileys.getCount() == 0) + { + KillTimer(NULL, timerId); + timerId = 0; + } + if (m_img) m_img->Release(); + m_img = NULL; + } + + void GetDrawingProp(void) + { + if (m_hwnd == NULL) return; + + IRichEditOle* RichEditOle; + if (SendMessage(m_hwnd, EM_GETOLEINTERFACE, 0, (LPARAM)&RichEditOle) == 0) + return; + + REOBJECT reObj = {0}; + reObj.cbStruct = sizeof(REOBJECT); + + HRESULT hr = RichEditOle->GetObject(m_lastObjNum, &reObj, REO_GETOBJ_NO_INTERFACES); + if (hr == S_OK && reObj.dwUser == (DWORD)(ISmileyBase*)this && reObj.clsid == CLSID_NULL) + { + m_richFlags = reObj.dwFlags; + } + else + { + long objectCount = RichEditOle->GetObjectCount(); + for (long i = objectCount; i--; ) + { + HRESULT hr = RichEditOle->GetObject(i, &reObj, REO_GETOBJ_NO_INTERFACES); + if (FAILED(hr)) continue; + + if (reObj.dwUser == (DWORD)(ISmileyBase*)this && reObj.clsid == CLSID_NULL) + { + m_lastObjNum = i; + m_richFlags = reObj.dwFlags; + break; + } + } + } + RichEditOle->Release(); + + if ((m_richFlags & REO_SELECTED) == 0) + { + CHARRANGE sel; + SendMessage(m_hwnd, EM_EXGETSEL, 0, (LPARAM)&sel); + if (reObj.cp >= sel.cpMin && reObj.cp < sel.cpMax) + m_richFlags |= REO_INVERTEDSELECT; + else + m_richFlags &= ~REO_INVERTEDSELECT; + } + } + + + void DoDirectDraw(HDC hdc) + { + HBITMAP hBmp = CreateCompatibleBitmap(hdc, m_rectExt.cx, m_rectExt.cy); + HDC hdcMem = CreateCompatibleDC(hdc); + HANDLE hOld = SelectObject(hdcMem, hBmp); + + RECT rc; + rc.left = m_rectExt.cx - m_sizeExtent.cx; + rc.top = m_rectExt.cy - m_sizeExtent.cy; + rc.right = rc.left + m_sizeExtent.cx; + rc.bottom = rc.top + m_sizeExtent.cy; + + HBRUSH hbr = CreateSolidBrush(m_bkg); + RECT frc = { 0, 0, m_rectExt.cx, m_rectExt.cy }; + FillRect(hdcMem, &frc, hbr); + DeleteObject(hbr); + + m_img->DrawInternal(hdcMem, rc.left, rc.top, m_sizeExtent.cx - 1, m_sizeExtent.cy - 1); + + if (m_richFlags & REO_SELECTED) + { + HBRUSH hbr = CreateSolidBrush(m_bkg ^ 0xFFFFFF); + FrameRect(hdcMem, &rc, hbr); + DeleteObject(hbr); + } + + if (m_richFlags & REO_INVERTEDSELECT) + InvertRect(hdcMem, &rc); + + BitBlt(hdc, m_rectOrig.x, m_rectOrig.y, m_rectExt.cx, m_rectExt.cy, hdcMem, 0, 0, SRCCOPY); + + SelectObject(hdcMem, hOld); + DeleteObject(hBmp); + DeleteDC(hdcMem); + } + + void DrawOnRichEdit(void) + { + HDC hdc = GetDC(m_hwnd); + if (RectVisible(hdc, &m_orect)) + { + RECT crct; + GetClientRect(m_hwnd, &crct); + + HRGN hrgnOld = CreateRectRgnIndirect(&crct); + int res = GetClipRgn(hdc, hrgnOld); + + HRGN hrgn = CreateRectRgnIndirect(&crct); + SelectClipRgn(hdc, hrgn); + DeleteObject(hrgn); + + DoDirectDraw(hdc); + + SelectClipRgn(hdc, res < 1 ? NULL : hrgnOld); + DeleteObject(hrgnOld); + } + else + { + m_visible = false; + m_allowAni = false; + UnloadSmiley(); + } + ReleaseDC(m_hwnd, hdc); + } + + void DrawOnHPP(void) + { + FVCNDATA_NMHDR nmh = {0}; + nmh.code = NM_FIREVIEWCHANGE; + nmh.hwndFrom = m_hwnd; + + nmh.cbSize = sizeof(nmh); + nmh.bEvent = FVCN_PREFIRE; + nmh.bAction = FVCA_DRAW; + nmh.rcRect = m_orect; + SendMessage(GetParent(m_hwnd), WM_NOTIFY, (WPARAM)m_hwnd, (LPARAM)&nmh); + + switch (nmh.bAction) + { + case FVCA_DRAW: + // support for pseudo-edit mode and event details + m_animtype = m_dirAniAllow ? animDrctRichEd : animStdOle; + GetDrawingProp(); + DrawOnRichEdit(); + break; + + case FVCA_CUSTOMDRAW: + m_rectExt.cy = nmh.rcRect.bottom - nmh.rcRect.top; + m_rectExt.cx = nmh.rcRect.right - nmh.rcRect.left; + m_rectOrig.x = nmh.rcRect.left; + m_rectOrig.y = nmh.rcRect.top; + + m_bkg = nmh.clrBackground; + + DoDirectDraw(nmh.hDC); + + nmh.bEvent = FVCN_POSTFIRE; + SendMessage(GetParent(m_hwnd), WM_NOTIFY, (WPARAM)m_hwnd, (LPARAM)&nmh); + break; + + case FVCA_SKIPDRAW: + break; + + case FVCA_NONE: + m_visible = false; + break; + + default: + break; + } + } + + void ProcessTimerTick(void) + { + if (m_visible && m_img && --m_counter <= 0) + { + m_nFramePosition = m_img->SelectNextFrame(m_nFramePosition); + long frtm = m_img->GetFrameDelay(); + m_counter = frtm / 10 + ((frtm % 10) >= 5); + + switch (m_animtype) + { + case animStdOle: + if (m_allowAni) SendOnViewChange(); + else + { + m_visible = false; + UnloadSmiley(); + } + m_allowAni = false; + break; + + case animDrctRichEd: + DrawOnRichEdit(); + break; + + case animHpp: + DrawOnHPP(); + break; + } + } + } + + void SetPosition(HWND hwnd, LPCRECT lpRect) + { + ISmileyBase::SetPosition(hwnd, lpRect); + + m_allowAni = m_visible; + + if (m_visible) LoadSmiley(); + else UnloadSmiley(); + + if (lpRect == NULL) return; + if (m_animtype == animStdOle) + { + m_animtype = animDrctRichEd; + GetDrawingProp(); + } + + if (lpRect->top == -1) + { + m_rectOrig.x = lpRect->left; + m_rectOrig.y = lpRect->bottom - m_sizeExtent.cy; + m_rectExt.cy = m_sizeExtent.cy; + } + else if (lpRect->bottom == -1) + { + m_rectOrig.x = lpRect->left; + m_rectOrig.y = lpRect->top; + } + else + { + m_rectOrig.x = lpRect->left; + m_rectOrig.y = lpRect->top; + m_rectExt.cy = lpRect->bottom - lpRect->top; + } + } + + STDMETHOD(Close)(DWORD dwSaveOption) + { + m_visible = false; + UnloadSmiley(); + + return ISmileyBase::Close(dwSaveOption); + } + + STDMETHOD(Draw)(DWORD dwAspect, LONG, void*, DVTARGETDEVICE*, HDC, + HDC hdc, LPCRECTL pRectBounds, LPCRECTL /* pRectWBounds */, + BOOL (__stdcall *)(ULONG_PTR), ULONG_PTR) + { + if (dwAspect != DVASPECT_CONTENT) return DV_E_DVASPECT; + if (pRectBounds == NULL) return E_INVALIDARG; + + LoadSmiley(); + + if (m_img == NULL) return E_FAIL; + + m_sizeExtent.cx = pRectBounds->right - pRectBounds->left; + m_sizeExtent.cy = pRectBounds->bottom - pRectBounds->top; + + m_rectExt = m_sizeExtent; + + switch (m_animtype) + { + case animDrctRichEd: + { + m_rectExt.cy = pRectBounds->bottom - m_rectOrig.y; + RECT frc = { 0, 0, m_sizeExtent.cx - 1, m_sizeExtent.cy - 1 }; + + HBITMAP hBmp = CreateCompatibleBitmap(hdc, frc.right, frc.bottom); + HDC hdcMem = CreateCompatibleDC(hdc); + HANDLE hOld = SelectObject(hdcMem, hBmp); + + HBRUSH hbr = CreateSolidBrush(m_bkg); + FillRect(hdcMem, &frc, hbr); + DeleteObject(hbr); + + m_img->DrawInternal(hdcMem, 0, 0, frc.right, frc.bottom); + + BitBlt(hdc, pRectBounds->left, pRectBounds->top, frc.right, frc.bottom, hdcMem, 0, 0, SRCCOPY); + + SelectObject(hdcMem, hOld); + DeleteObject(hBmp); + DeleteDC(hdcMem); + } + GetDrawingProp(); + break; + + case animHpp: + m_orect = *(LPRECT)pRectBounds; + + default: + m_img->DrawInternal(hdc, pRectBounds->left, pRectBounds->top, + m_sizeExtent.cx - 1, m_sizeExtent.cy - 1); + break; + } + + m_allowAni = true; + m_visible = true; + + return S_OK; + } + + STDMETHOD(SetExtent)(DWORD dwDrawAspect, SIZEL* psizel) + { + HRESULT hr = ISmileyBase::SetExtent(dwDrawAspect, psizel); + if (hr == S_OK) m_rectExt = m_sizeExtent; + return hr; + } +}; + +ISmileyBase* CreateAniSmileyObject(SmileyType* sml, COLORREF clr, bool ishpp) +{ + if (!sml->IsValid()) return NULL; + + CAniSmileyObject *obj = new CAniSmileyObject(sml, clr, ishpp); + return obj; +} + +static void CALLBACK timerProc(HWND, UINT, UINT_PTR, DWORD) +{ + for (int i=0; iProcessTimerTick(); +} + +void DestroyAniSmileys(void) +{ + if (timerId && (timerId+1)) + { + KillTimer(NULL, timerId); + timerId = 0; + } + regAniSmileys.destroy(); +} + diff --git a/plugins/SmileyAdd/src/SmileyBase.cpp b/plugins/SmileyAdd/src/SmileyBase.cpp new file mode 100644 index 0000000000..28bd767153 --- /dev/null +++ b/plugins/SmileyAdd/src/SmileyBase.cpp @@ -0,0 +1,391 @@ +/* +Miranda SmileyAdd Plugin +Copyright (C) 2008 - 2011 Boris Krasnovskiy All Rights Reserved + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation version 2 +of the License. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include "general.h" +#include "SmileyBase.h" + +#include + +static void HiMetricToPixel(const SIZEL * lpSizeInHiMetric, LPSIZEL lpSizeInPix) +{ + HDC hDCScreen = GetDC(NULL); + const int nPixelsPerInchX = GetDeviceCaps(hDCScreen, LOGPIXELSX); + const int nPixelsPerInchY = GetDeviceCaps(hDCScreen, LOGPIXELSY); + ReleaseDC(NULL, hDCScreen); + + lpSizeInPix->cx = (lpSizeInHiMetric->cx * nPixelsPerInchX + (2540/2)) / 2540; + lpSizeInPix->cy = (lpSizeInHiMetric->cy * nPixelsPerInchY + (2540/2)) / 2540; +} + +static int CompareISmileyBase(const ISmileyBase* p1, const ISmileyBase* p2) +{ + return (int)((char*)p2 - (char*)p1); +} + +static LIST regSmileys(10, CompareISmileyBase); + +// {105C56DF-6455-4705-A501-51F1CCFCF688} +const GUID IID_ISmileyAddSmiley = +{ 0x105c56df, 0x6455, 0x4705, { 0xa5, 0x1, 0x51, 0xf1, 0xcc, 0xfc, 0xf6, 0x88 } }; + +// {58B32D03-1BD2-4840-992E-9AE799FD4ADE} +const GUID IID_ITooltipData = +{ 0x58b32d03, 0x1bd2, 0x4840, { 0x99, 0x2e, 0x9a, 0xe7, 0x99, 0xfd, 0x4a, 0xde } }; + +ISmileyBase::ISmileyBase(void) +{ + m_spAdviseSink = NULL; + m_spClientSite = NULL; + m_spAdviseHolder = NULL; + m_lRefCount = 1; + m_advf = 0; + m_smltxt = NULL; + m_hwnd = NULL; + m_visible = false; + m_dirAniAllow = false; + + memset(&m_sizeExtent, 0, sizeof(m_sizeExtent)); + memset(&m_sizeExtentHiM, 0, sizeof(m_sizeExtentHiM)); + memset(&m_orect, 0, sizeof(m_orect)); + + regSmileys.insert(this); +} + +ISmileyBase::~ISmileyBase(void) +{ + free(m_smltxt); + + Close(OLECLOSE_NOSAVE); + + if (m_spClientSite) + { + m_spClientSite->Release(); + m_spClientSite = NULL; + } + if (m_spAdviseHolder) + { + m_spAdviseHolder->Release(); + m_spAdviseHolder = NULL; + } +} + +void ISmileyBase::OnClose(void) +{ + if (m_spAdviseHolder) m_spAdviseHolder->SendOnClose(); +} + +void ISmileyBase::SendOnViewChange(void) +{ + if (m_spAdviseSink) m_spAdviseSink->OnViewChange(DVASPECT_CONTENT, -1); + if (m_advf & ADVF_ONLYONCE) + { + m_spAdviseSink->Release(); + m_spAdviseSink = NULL; + m_advf = 0; + } +} + +bool ISmileyBase::QueryHitPointSpecial(int x, int y, HWND hwnd, TCHAR** smltxt) +{ + bool result = m_visible && m_hwnd == hwnd; + if (result) + { + result = x >= m_orect.left && x <= m_orect.right && + y >= m_orect.top && y <= m_orect.bottom; + } + if (result) *smltxt = m_smltxt; + return result; +} + +void ISmileyBase::SetHint(TCHAR* smltxt) +{ + m_smltxt = _tcsdup(smltxt); +} + + +void ISmileyBase::SetPosition(HWND hwnd, LPCRECT lpRect) +{ + m_hwnd = hwnd; + if (lpRect == NULL || (lpRect->top == -1 && lpRect->bottom == -1)) + { + m_visible = false; + } + else + { + m_visible = true; + m_dirAniAllow = true; + m_orect.left = lpRect->left; + m_orect.right = lpRect->left + m_sizeExtent.cx; + if (lpRect->top == -1) + { + m_orect.top = lpRect->bottom - m_sizeExtent.cy; + m_orect.bottom = lpRect->bottom; + } + else if (lpRect->bottom == -1) + { + m_orect.top = lpRect->top; + m_orect.bottom = lpRect->top + m_sizeExtent.cy;; + } + else + { + m_orect.top = lpRect->bottom - m_sizeExtent.cy; + m_orect.bottom = lpRect->bottom; + } + } +} + + +// +// IUnknown members +// +ULONG ISmileyBase::AddRef(void) +{ return InterlockedIncrement(&m_lRefCount); } + +ULONG ISmileyBase::Release(void) +{ + LONG count = InterlockedDecrement(&m_lRefCount); + if(count == 0) + delete this; + return count; +} + + +HRESULT ISmileyBase::QueryInterface(REFIID iid, void ** ppvObject) +{ + // check to see what interface has been requested + if (ppvObject == NULL) return E_POINTER; + if (iid == IID_ISmileyAddSmiley) + *ppvObject = this; + else if (iid == IID_ITooltipData) + *ppvObject = static_cast(this); + else if (iid == IID_IViewObject) + *ppvObject = static_cast(this); + else if (iid == IID_IOleObject) + *ppvObject = static_cast(this); + else if (iid == IID_IUnknown) + *ppvObject = this; + else if (iid == IID_IViewObject2) + *ppvObject = static_cast(this); + else + { + *ppvObject = NULL; + return E_NOINTERFACE; + } + AddRef(); + return S_OK; +} + +// +// IOleObject members +// +HRESULT ISmileyBase::SetClientSite(IOleClientSite *pClientSite) +{ + if (m_spClientSite != NULL) m_spClientSite->Release(); + m_spClientSite = pClientSite; + if (m_spClientSite != NULL) m_spClientSite->AddRef(); + return S_OK; +} + +HRESULT ISmileyBase::GetClientSite(IOleClientSite **ppClientSite) +{ + if (ppClientSite == NULL) return E_POINTER; + *ppClientSite = m_spClientSite; + if (m_spClientSite != NULL) m_spClientSite->AddRef(); + return S_OK; +} + +HRESULT ISmileyBase::SetHostNames(LPCOLESTR /* szContainerApp */, LPCOLESTR /* szContainerObj */) +{ return S_OK; } + +HRESULT ISmileyBase::Close(DWORD /* dwSaveOption */) +{ + regSmileys.remove(this); + + if (m_spAdviseSink) m_spAdviseSink->Release(); + m_spAdviseSink = NULL; + + return S_OK; +} + +HRESULT ISmileyBase::SetMoniker(DWORD /* dwWhichMoniker */, IMoniker* /* pmk */) +{ return E_NOTIMPL; } + +HRESULT ISmileyBase::GetMoniker(DWORD /* dwAssign */, DWORD /* dwWhichMoniker */, IMoniker** /* ppmk */) +{ return E_NOTIMPL; } + +HRESULT ISmileyBase::InitFromData(IDataObject* /* pDataObject */, BOOL /* fCreation */, DWORD /* dwReserved */) +{ return E_NOTIMPL; } + +HRESULT ISmileyBase::GetClipboardData(DWORD /* dwReserved */, IDataObject** /* ppDataObject */) +{ return E_NOTIMPL; } + +HRESULT ISmileyBase::DoVerb(LONG /* iVerb */, LPMSG /* pMsg */, IOleClientSite* /* pActiveSite */, LONG /* lindex */, + HWND /* hwndParent */, LPCRECT /* lprcPosRect */) +{ + return E_NOTIMPL; +} + +HRESULT ISmileyBase::EnumVerbs(IEnumOLEVERB** /*ppEnumOleVerb*/) { return E_NOTIMPL; } +HRESULT ISmileyBase::Update(void) { return S_OK; } +HRESULT ISmileyBase::IsUpToDate(void) { return S_OK; } + +HRESULT ISmileyBase::GetUserClassID(CLSID *pClsid) +{ + if (!pClsid) return E_POINTER; + *pClsid = CLSID_NULL; + return S_OK; +} + +HRESULT ISmileyBase::GetUserType(DWORD /*dwFormOfType*/, LPOLESTR* /*pszUserType*/) +{ return E_NOTIMPL; } + +HRESULT ISmileyBase::SetExtent(DWORD dwDrawAspect, SIZEL* psizel) +{ + if (dwDrawAspect != DVASPECT_CONTENT) return E_FAIL; + if (psizel == NULL) return E_POINTER; + + HiMetricToPixel(psizel, &m_sizeExtent); + m_sizeExtentHiM = *psizel; + return S_OK; +} + +HRESULT ISmileyBase::GetExtent(DWORD dwDrawAspect, SIZEL *psizel) +{ + if (dwDrawAspect != DVASPECT_CONTENT) return E_FAIL; + if (psizel == NULL) return E_POINTER; + + *psizel = m_sizeExtentHiM; + return S_OK; +} + +HRESULT ISmileyBase::Advise(IAdviseSink *pAdvSink, DWORD *pdwConnection) +{ + HRESULT hr = S_OK; + if (m_spAdviseHolder == NULL) + hr = CreateOleAdviseHolder(&m_spAdviseHolder); + if (SUCCEEDED(hr)) + hr = m_spAdviseHolder->Advise(pAdvSink, pdwConnection); + else + m_spAdviseHolder = NULL; + return hr; +} + +HRESULT ISmileyBase::Unadvise(DWORD dwConnection) +{ + return m_spAdviseHolder ? m_spAdviseHolder->Unadvise(dwConnection) : E_FAIL; +} + +HRESULT ISmileyBase::EnumAdvise(IEnumSTATDATA **ppEnumAdvise) +{ + if (ppEnumAdvise == NULL) return E_POINTER; + return m_spAdviseHolder ? m_spAdviseHolder->EnumAdvise(ppEnumAdvise) : E_FAIL; +} + +HRESULT ISmileyBase::GetMiscStatus(DWORD dwAspect, DWORD *pdwStatus) +{ + if (pdwStatus == NULL) return E_POINTER; + if (dwAspect == DVASPECT_CONTENT) + { + *pdwStatus = OLEMISC_STATIC | OLEMISC_INVISIBLEATRUNTIME | + OLEMISC_CANTLINKINSIDE | OLEMISC_NOUIACTIVATE; + return S_OK; + } + else + { + *pdwStatus = 0; + return E_FAIL; + } +} + +HRESULT ISmileyBase::SetColorScheme(LOGPALETTE* /* pLogpal */) +{ return E_NOTIMPL; } + +// +// IViewObject members +// +HRESULT ISmileyBase::SetAdvise(DWORD aspect, DWORD advf, IAdviseSink* pAdvSink) +{ + if (aspect != DVASPECT_CONTENT) return DV_E_DVASPECT; + m_advf = advf; + if (m_spAdviseSink) m_spAdviseSink->Release(); + m_spAdviseSink = pAdvSink; + if (advf & ADVF_PRIMEFIRST) SendOnViewChange(); + return S_OK; +} +HRESULT ISmileyBase::GetAdvise(DWORD* /*pAspects*/, DWORD* /*pAdvf*/, IAdviseSink** ppAdvSink) +{ + if (!ppAdvSink) return E_POINTER; + *ppAdvSink = m_spAdviseSink; + if (m_spAdviseSink) m_spAdviseSink->AddRef(); + return S_OK; +} +HRESULT ISmileyBase::Freeze(DWORD, long, void*, DWORD*) { return E_NOTIMPL; } +HRESULT ISmileyBase::Unfreeze(DWORD) { return E_NOTIMPL; } +HRESULT ISmileyBase::GetColorSet(DWORD, long, void*, DVTARGETDEVICE*, HDC, + LOGPALETTE**) { return E_NOTIMPL; } + +// +// IViewObject2 members +// +HRESULT ISmileyBase::GetExtent(DWORD aspect, long, DVTARGETDEVICE*, SIZEL* pSize) +{ + if (pSize == NULL) return E_POINTER; + if (aspect != DVASPECT_CONTENT) return DV_E_DVASPECT; + *pSize = m_sizeExtent; + return S_OK; +} + + +// +// ITooltipData members +// +HRESULT ISmileyBase::SetTooltip(BSTR /* bstrHint */) +{ + return S_OK; +} + +HRESULT ISmileyBase::GetTooltip(BSTR *bstrHint) +{ + if (bstrHint == NULL) return E_POINTER; + *bstrHint = SysAllocString(T2W_SM(m_smltxt)); + return S_OK; +} + + +void CloseSmileys(void) +{ + for (int i=regSmileys.getCount(); i--;) + { + regSmileys[i]->OnClose(); + regSmileys[i]->Close(OLECLOSE_NOSAVE); + } +} + +int CheckForTip(int x, int y, HWND hwnd, TCHAR** smltxt) +{ + for (int i=0; iQueryHitPointSpecial(x, y, hwnd, smltxt)) return i; + + return -1; +} + +void DestroySmileyBase(void) +{ + regSmileys.destroy(); +} + diff --git a/plugins/SmileyAdd/src/SmileyBase.h b/plugins/SmileyAdd/src/SmileyBase.h new file mode 100644 index 0000000000..3cdf244007 --- /dev/null +++ b/plugins/SmileyAdd/src/SmileyBase.h @@ -0,0 +1,127 @@ +/* +Miranda SmileyAdd Plugin +Copyright (C) 2008 - 2011 Boris Krasnovskiy All Rights Reserved + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation version 2 +of the License. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once +#include +#include + +#define OLEIVERB_SETOWNER (-24) + +EXTERN_C const IID IID_ITooltipData; + +class ITooltipData : public IUnknown +{ +public: + STDMETHOD(SetTooltip) (BSTR bstrHint) PURE; + STDMETHOD(GetTooltip) (BSTR * bstrHint) PURE; +}; + + +EXTERN_C const IID IID_ISmileyAddSmiley; + +class ISmileyBase : + public IOleObject, public IViewObject2, public ITooltipData +{ +protected: + IOleAdviseHolder* m_spAdviseHolder; + IAdviseSink* m_spAdviseSink; + IOleClientSite* m_spClientSite; + DWORD m_advf; + LONG m_lRefCount; + + SIZEL m_sizeExtent; + SIZEL m_sizeExtentHiM; + RECT m_orect; + + TCHAR* m_smltxt; + HWND m_hwnd; + + bool m_visible; + bool m_dirAniAllow; + +public: + ISmileyBase(void); + virtual ~ISmileyBase(void); + + void OnClose(void); + void SendOnViewChange(void); + + bool QueryHitPointSpecial(int x, int y, HWND hwnd, TCHAR** smltxt); + void SetHint(TCHAR* smltxt); + + virtual void SetPosition(HWND hwnd, LPCRECT lpRect); + + // + // IUnknown members + // + STDMETHOD_(ULONG, AddRef)(void); + STDMETHOD_(ULONG, Release)(void); + STDMETHOD(QueryInterface)(REFIID iid, void ** ppvObject); + + // + // IOleObject members + // + STDMETHOD(SetClientSite)(IOleClientSite *pClientSite); + STDMETHOD(GetClientSite)(IOleClientSite **ppClientSite); + STDMETHOD(SetHostNames)(LPCOLESTR /* szContainerApp */, LPCOLESTR /* szContainerObj */); + STDMETHOD(Close)(DWORD /* dwSaveOption */); + STDMETHOD(SetMoniker)(DWORD /* dwWhichMoniker */, IMoniker* /* pmk */); + STDMETHOD(GetMoniker)(DWORD /* dwAssign */, DWORD /* dwWhichMoniker */, IMoniker** /* ppmk */); + STDMETHOD(InitFromData)(IDataObject* /* pDataObject */, BOOL /* fCreation */, DWORD /* dwReserved */); + STDMETHOD(GetClipboardData)(DWORD /* dwReserved */, IDataObject** /* ppDataObject */); + STDMETHOD(DoVerb)(LONG /*iVerb*/, LPMSG /* pMsg */, IOleClientSite* /* pActiveSite */, LONG /* lindex */, + HWND /*hwndParent*/, LPCRECT /*lprcPosRect*/); + STDMETHOD(EnumVerbs)(IEnumOLEVERB** /*ppEnumOleVerb*/); + STDMETHOD(Update)(void); + STDMETHOD(IsUpToDate)(void); + STDMETHOD(GetUserClassID)(CLSID *pClsid); + STDMETHOD(GetUserType)(DWORD /*dwFormOfType*/, LPOLESTR* /*pszUserType*/); + STDMETHOD(SetExtent)(DWORD /*dwDrawAspect*/, SIZEL* /*psizel*/); + STDMETHOD(GetExtent)(DWORD dwDrawAspect, SIZEL *psizel); + STDMETHOD(Advise)(IAdviseSink *pAdvSink, DWORD *pdwConnection); + STDMETHOD(Unadvise)(DWORD dwConnection); + STDMETHOD(EnumAdvise)(IEnumSTATDATA **ppEnumAdvise); + STDMETHOD(GetMiscStatus)(DWORD dwAspect, DWORD *pdwStatus); + STDMETHOD(SetColorScheme)(LOGPALETTE* /* pLogpal */); + + // + // IViewObject members + // + STDMETHOD(SetAdvise)(DWORD aspect, DWORD advf, IAdviseSink* pAdvSink); + STDMETHOD(GetAdvise)(DWORD* /*pAspects*/, DWORD* /*pAdvf*/, IAdviseSink** ppAdvSink); + STDMETHOD(Freeze)(DWORD, long, void*, DWORD*); + STDMETHOD(Unfreeze)(DWORD); + STDMETHOD(GetColorSet)(DWORD, long, void*, DVTARGETDEVICE*, HDC, + LOGPALETTE**); + + // + // IViewObject2 members + // + STDMETHOD(GetExtent)(DWORD aspect, long, DVTARGETDEVICE*, SIZEL* pSize); + + // + // ITooltipData members + // + STDMETHOD(SetTooltip)(BSTR bstrHint); + STDMETHOD(GetTooltip)(BSTR * bstrHint); + +}; + +int CheckForTip(int x, int y, HWND hwnd, TCHAR** smltxt); +void CloseSmileys(void); + diff --git a/plugins/SmileyAdd/src/anim.cpp b/plugins/SmileyAdd/src/anim.cpp new file mode 100644 index 0000000000..5352383821 --- /dev/null +++ b/plugins/SmileyAdd/src/anim.cpp @@ -0,0 +1,184 @@ +/* +Miranda SmileyAdd Plugin +Copyright (C) 2006 - 2011 Boris Krasnovskiy All Rights Reserved + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation version 2 +of the License. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include "general.h" +#include "anim.h" + +#include + +Animate::Animate(SmileyType *sml, RECT& rect, HDC hdcMem, HBRUSH hbr, bool clip) + : m_sml(sml), m_img(NULL), + m_nFramePosition(0), m_sel(false), m_clip(clip), + m_offset(0), m_running(false), + m_hdcMem(hdcMem), m_hbr(hbr) +{ + m_cliprect = rect; +} + + +Animate::~Animate() +{ + if (m_img) m_img->Release(); +} + + +void Animate::StartAnimation(void) +{ + m_img = m_sml->CreateCachedImage(); + + if (m_img && m_img->IsAnimated()) + { + m_img->SelectFrame(m_nFramePosition); + long frtm = m_img->GetFrameDelay(); + m_counter = frtm / 10 + ((frtm % 10) >= 5); + } +} + + +void Animate::ProcessTimerTick(HWND hwnd) +{ + if (m_running && m_img->IsAnimated() && --m_counter <= 0) + { + m_nFramePosition = m_img->SelectNextFrame(m_nFramePosition); + + long frtm = m_img->GetFrameDelay(); + m_counter = frtm / 10 + ((frtm % 10) >= 5); + + HDC hdc = GetDC(hwnd); + DrawFrame(hdc); + ReleaseDC(hwnd, hdc); + } +} + + +void Animate::DrawFrame(HDC hdc) +{ + long width = m_cliprect.right - m_cliprect.left; + long height = m_cliprect.bottom - m_cliprect.top; + + RECT frc = { 0, 0, width, height }; + FillRect(m_hdcMem, &frc, m_hbr); + + m_img->Draw(m_hdcMem, frc, m_clip); + + BitBlt(hdc, m_cliprect.left, m_cliprect.top, width, height, m_hdcMem, 0, 0, SRCCOPY); + + if (m_sel) + DrawFocusRect(hdc, &m_cliprect); +} + + +void Animate::Draw(HDC hdc) +{ + if (m_running) + { + m_img->Draw(hdc, m_cliprect, m_clip); + + if (m_sel) + DrawFocusRect(hdc, &m_cliprect); + } +} + + +void Animate::SetOffset(int off, int wsize) +{ + const int dy = m_offset - off; + + m_cliprect.top += dy; + m_cliprect.bottom += dy; + + m_offset = off; + + m_running = m_cliprect.top >= 0 && m_cliprect.top < wsize; + if (m_running) + { + if (m_img == NULL) + { + StartAnimation(); + if (m_img == NULL) m_running = false; + } + } + else + { + if (m_img) m_img->Release(); + m_img = NULL; + } +} + + +void Animate::SetSel(int x, int y) +{ + m_sel = x >= m_cliprect.left && x < m_cliprect.right && + y >= m_cliprect.top && y < m_cliprect.bottom; +} + + +AnimatedPack::AnimatedPack(HWND hwnd, int wsize, SIZE& sel, COLORREF bkg) + : m_AniList(40), m_hwnd(hwnd), m_wsize(wsize) +{ + HDC hdc = GetDC(hwnd); + + m_hBmp = CreateCompatibleBitmap(hdc, sel.cx, sel.cy); + m_hdcMem = CreateCompatibleDC(hdc); + m_hOld = (HBITMAP)SelectObject(m_hdcMem, m_hBmp); + m_hbr = CreateSolidBrush(bkg); + + ReleaseDC(hwnd, hdc); +} + + +AnimatedPack::~AnimatedPack() +{ + DeleteObject(m_hbr); + SelectObject(m_hdcMem, m_hOld); + DeleteObject(m_hBmp); + DeleteDC(m_hdcMem); +} + + +void AnimatedPack::Add(SmileyType *sml, RECT rect, bool clip) +{ + m_AniList.insert(new Animate(sml, rect, m_hdcMem, m_hbr, clip)); +} + + +void AnimatedPack::Draw(HDC hdc) +{ + for (int i=0; i. +*/ + +#ifndef anim_h +#define anim_h + +#include "smileys.h" + +class Animate +{ +private: + + ImageBase *m_img; + SmileyType *m_sml; + + HDC m_hdcMem; + HBRUSH m_hbr; + + RECT m_cliprect; + + unsigned m_nFramePosition; + int m_offset; + int m_counter; + bool m_running; + bool m_sel; + bool m_clip; + + void DrawFrame(HDC hdc); + +public: + + Animate(SmileyType *sml, RECT &rect, HDC hdcMem, HBRUSH hbr, bool clip); + Animate(const Animate& an); + ~Animate(); + + void Draw(HDC hdc); + + void StartAnimation(void); + void SetOffset(int off, int wsize); + void SetSel(int x, int y); + + void ProcessTimerTick(HWND hwnd); +}; + +class AnimatedPack +{ +private: + OBJLIST m_AniList; + + HWND m_hwnd; + int m_wsize; + + HBRUSH m_hbr; + HBITMAP m_hBmp; + HDC m_hdcMem; + HBITMAP m_hOld; + + static unsigned CALLBACK AnimateThreadFunc ( void* arg ); + +public: + AnimatedPack(HWND hwnd, int wsize, SIZE& sel, COLORREF bkg); + ~AnimatedPack(); + + void Add(SmileyType *sml, RECT rect, bool clip); + void Draw(HDC hdc); + void SetOffset(int off); + void SetSel(RECT& rect); + + void ProcessTimerTick(HWND hwnd); +}; + +#endif diff --git a/plugins/SmileyAdd/src/bkstring.cpp b/plugins/SmileyAdd/src/bkstring.cpp new file mode 100644 index 0000000000..2973783abc --- /dev/null +++ b/plugins/SmileyAdd/src/bkstring.cpp @@ -0,0 +1,215 @@ +/* +Miranda SmileyAdd Plugin +Copyright (C) 2008 - 2011 Boris Krasnovskiy All Rights Reserved + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation version 2 +of the License. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef __GNUC__ +# ifdef _DEBUG +# define _CRTDBG_MAP_ALLOC +# include +# include +# else +# include +# endif +#endif + +#include +#include + +#include "bkstring.h" + + +bkstring::~bkstring() { if (sizeAlloced) free(buf); } + +void bkstring::reserve(size_type len) +{ + if (len >= sizeAlloced || sizeAlloced == 0) + { + if (sizeAlloced == 0) buf = NULL; + buf = (value_type*)realloc(buf, (len+1) * sizeof(value_type)); + if (sizeAlloced == 0) buf[0] = 0; + sizeAlloced = len+1; + } +} + +void bkstring::appendfmt(const value_type *fmt, ...) +{ + areserve(_tcslen(fmt)*2); + + va_list vararg; + va_start(vararg, fmt); + for (;;) + { + int len = _vsntprintf(buf + lenBuf, sizeAlloced - lenBuf - 1, fmt, vararg); + if (len < 0) + reserve(sizeAlloced + 256); + else + { + lenBuf += len; + buf[lenBuf] = 0; + break; + } + } + va_end(vararg); +} + +bkstring& bkstring::append(const value_type* _Ptr) +{ + size_type len = _tcslen(_Ptr); + areserve(len); + memcpy(buf+lenBuf, _Ptr, (len+1)*sizeof(value_type)); + lenBuf += len; + return *this; +} + +bkstring& bkstring::append(const value_type* _Ptr, size_type _Count) +{ + size_type len = min(_tcslen(_Ptr), _Count); + areserve(len); + memcpy(buf+lenBuf, _Ptr, len*sizeof(value_type)); + lenBuf += len; + buf[lenBuf] = 0; + return *this; +} + +bkstring& bkstring::append(const bkstring& _Str, size_type _Off, size_type _Count) +{ + size_type len = min(_Count, _Str.size() - _Off); + areserve(len); + memcpy(buf+lenBuf, _Str.c_str()+_Off, len*sizeof(value_type)); + lenBuf += len; + buf[lenBuf] = 0; + return *this; +} + +bkstring& bkstring::append(const bkstring& _Str) +{ + size_type len = _Str.size(); + areserve(len); + memcpy(buf+lenBuf, _Str.c_str(), len*sizeof(value_type)); + lenBuf += len; + buf[lenBuf] = 0; + return *this; +} + +bkstring& bkstring::append(size_type _Count, value_type _Ch) +{ + areserve(_Count); + for(size_type i=0; i<_Count; ++i) buf[lenBuf+i] = _Ch; + lenBuf += _Count; + buf[lenBuf] = 0; + return *this; +} + + +bkstring& bkstring::assign(const value_type* _Ptr, size_type _Count) +{ + if (_Count == 0 && sizeAlloced == 0) + { + buf = (TCHAR*)_T(""); + } + else + { + reserve(_Count); + memcpy(buf, _Ptr, _Count*sizeof(value_type)); + buf[_Count] = 0; + lenBuf = _Count; + } + return *this; +} + +bkstring& bkstring::assign(const bkstring& _Str, size_type _Off, size_type _Count) +{ + size_type len = min(_Count, _Str.size() - _Off); + if (len == 0 && sizeAlloced == 0) + { + buf = (TCHAR*)_T(""); + } + else + { + reserve(len); + memcpy(buf, _Str.c_str() + _Off, len*sizeof(value_type)); + lenBuf = len; + buf[len] = 0; + } + return *this; +} + +bkstring& bkstring::assign(size_type _Count, value_type _Ch) +{ + reserve(_Count); + for(size_type i=0; i<_Count; ++i) buf[i] = _Ch; + buf[_Count] = 0; + lenBuf = _Count; + return *this; +} + +bkstring::size_type bkstring::find(value_type _Ch, size_type _Off) const +{ + for (size_type i=_Off; i<=lenBuf; ++i) + if (buf[i] == _Ch) return i; + return (size_type)npos; +} + +bkstring::size_type bkstring::find(const value_type* _Ptr, size_type _Off) const +{ + if (_Off > lenBuf) return (size_type)npos; + + value_type* pstr = _tcsstr(buf+_Off, _Ptr); + return pstr ? pstr - buf : npos; +} + +bkstring::size_type bkstring::find_last_of(value_type _Ch, size_type _Off) const +{ + for (size_type i=(_Off == npos ? lenBuf : _Off); i--;) + if (buf[i] == _Ch) return i; + return (size_type)npos; +} + +bkstring& bkstring::insert(size_type _P0, const value_type* _Ptr, size_type _Count) +{ + size_type len = _tcslen(_Ptr); + if (_Count < len) len = _Count; + areserve(len); + value_type *p = buf + _P0; + memmove(p+len, p, (lenBuf-_P0+1)*sizeof(value_type)); + memcpy(p, _Ptr, _Count*sizeof(value_type)); + lenBuf += len; + return *this; +} + +bkstring& bkstring::insert(size_type _P0, size_type _Count, value_type _Ch) +{ + areserve(_Count); + value_type *p = buf + _P0; + memmove(p+_Count, p, (lenBuf-_P0+1)*sizeof(value_type)); + for(size_type i=0; i<_Count; ++i) p[i] = _Ch; + lenBuf += _Count; + return *this; +} + +bkstring& bkstring::erase(size_type _Pos, size_type _Count) +{ + if (_Pos < lenBuf) + { + const size_type len = min(lenBuf - _Pos, _Count); + value_type *p = buf + _Pos; + lenBuf -= len; + memmove(p, p+len, (lenBuf - _Pos)*sizeof(value_type)); + buf[lenBuf] = 0; + } + return *this; +} diff --git a/plugins/SmileyAdd/src/bkstring.h b/plugins/SmileyAdd/src/bkstring.h new file mode 100644 index 0000000000..eb164f74e2 --- /dev/null +++ b/plugins/SmileyAdd/src/bkstring.h @@ -0,0 +1,270 @@ +/* +Miranda SmileyAdd Plugin +Copyright (C) 2008 - 2011 Boris Krasnovskiy All Rights Reserved + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation version 2 +of the License. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#include +#include + +#ifndef min +#define min(A, B) ((A) < (B) ? (A) : (B)) +#endif + +class bkstring +{ +public: + typedef size_t size_type; + typedef TCHAR value_type; + typedef value_type* iterator; + typedef const value_type* const_iterator; + +#if defined(_MSC_VER) && (_MSC_VER <= 1200) + enum { npos = -1 }; +#else + static const size_type npos = size_type(-1); +#endif + +private: + value_type* buf; + size_type sizeAlloced; + size_type lenBuf; + + void areserve(size_type len) { reserve(lenBuf + len); } + +public: + + explicit bkstring() : buf((TCHAR*)_T("")), sizeAlloced(0), lenBuf(0) + {} + + bkstring(const value_type* _Ptr, size_type _Count) : sizeAlloced(0), lenBuf(0) + { assign(_Ptr, _Count); } + + bkstring(const value_type* _Ptr) : sizeAlloced(0), lenBuf(0) + { assign(_Ptr); } + + bkstring(size_type _Count, value_type _Ch) : sizeAlloced(0), lenBuf(0) + { assign(_Count, _Ch); } + + bkstring(const bkstring& _Str) : sizeAlloced(0), lenBuf(0) + { assign(_Str); } + + bkstring(const bkstring& _Str, size_type _Off, size_type _Count) : sizeAlloced(0), lenBuf(0) + { assign(_Str, _Off, _Count); } + + ~bkstring(); + + size_type size(void) const { return lenBuf; } + const value_type* c_str(void) const { return buf; } + + void clear(void) { if (lenBuf) { lenBuf = 0; buf[0] = 0; } } + void insert(const value_type *txt); + void reserve(size_type len); + + bkstring& assign(const value_type* _Ptr) + { return assign(_Ptr, _tcslen(_Ptr)); } + + bkstring& assign(const bkstring& _Str) + { return assign(_Str, 0, (size_type)npos); } + + bkstring& assign(const value_type* _Ptr, size_type _Count); + bkstring& assign(const bkstring& _Str, size_type off, size_type _Count); + bkstring& assign(size_type _Count, value_type _Ch); + + bkstring& append(const value_type* _Ptr); + bkstring& append(const value_type* _Ptr, size_type _Count); + bkstring& append(const bkstring& _Str, size_type _Off, size_type _Count); + bkstring& append(const bkstring& _Str); + bkstring& append(size_type _Count, value_type _Ch); + + int compare(const bkstring& _Str) const + { return _tcscmp(buf, _Str.c_str()); } + + int compare(size_type _Pos1, size_type _Num1, const bkstring& _Str) const + { return _tcsncmp(&buf[_Pos1], _Str.c_str(), _Num1); } + + int compare(size_type _Pos1, size_type _Num1, const bkstring& _Str, size_type _Off, size_type _Count) const + { return _tcsncmp(&buf[_Pos1], _Str.c_str()+_Off, min(_Num1, _Count)); } + + int compare(const value_type* _Ptr) const + { return _tcscmp(buf, _Ptr); } + + int compare(size_type _Pos1, size_type _Num1, const value_type* _Ptr) const + { return _tcsncmp(&buf[_Pos1], _Ptr, _Num1); } + + int compare(size_type _Pos1, size_type _Num1, const value_type* _Ptr, size_type _Num2) const + { return _tcsncmp(&buf[_Pos1], _Ptr, min(_Num1, _Num2)); } + + int comparei(const bkstring& _Str) const + { return _tcsicmp(buf, _Str.c_str()); } + + int comparei(size_type _Pos1, size_type _Num1, const bkstring& _Str) const + { return _tcsnicmp(&buf[_Pos1], _Str.c_str(), _Num1); } + + int comparei(size_type _Pos1, size_type _Num1, const bkstring& _Str, size_type _Off, size_type _Count) const + { return _tcsnicmp(&buf[_Pos1], _Str.c_str()+_Off, min(_Num1, _Count)); } + + int comparei(const value_type* _Ptr) const + { return _tcsicmp(buf, _Ptr); } + + int comparei(size_type _Pos1, size_type _Num1, const value_type* _Ptr) const + { return _tcsnicmp(&buf[_Pos1], _Ptr, _Num1); } + + int comparei(size_type _Pos1, size_type _Num1, const value_type* _Ptr, size_type _Num2) const + { return _tcsnicmp(&buf[_Pos1], _Ptr, min(_Num1, _Num2)); } + + bool empty(void) const { return lenBuf == 0; }; + bkstring& erase(size_type _Pos = 0, size_type _Count = npos); + + size_type find(value_type _Ch, size_type _Off = 0) const; + size_type find(const value_type* _Ptr, size_type _Off = 0) const; + size_type find(bkstring& _Str, size_type _Off = 0) const + { return find(_Str.c_str(), _Off); } + + size_type find_last_of(value_type _Ch, size_type _Off = npos) const; + + bkstring& insert(size_type _P0, const value_type* _Ptr) + { return insert(_P0, _Ptr, _tcslen(_Ptr)); } + + bkstring& insert(size_type _P0, const bkstring& _Str) + { return insert(_P0, _Str.c_str(), _Str.size()); }; + + bkstring& insert(size_type _P0, const value_type* _Ptr, size_type _Count); + bkstring& insert(size_type _P0, size_type _Count, value_type _Ch); + + bkstring substr(size_type _Off = 0, size_type _Count = npos) const + { return bkstring(*this, _Off, _Count); } + + bkstring& operator = (const bkstring& _Str) + { return assign(_Str); } + + bkstring& operator =(const value_type* _Ptr) + { return assign(_Ptr); } + + bkstring& operator = (const value_type _Ch) + { return assign(1, _Ch); } + + bkstring& operator +=(const bkstring& _Str) + { return append(_Str); } + + bkstring& operator += (const value_type* _Ptr) + { return append(_Ptr); } + + bkstring& operator += (const value_type _Ch) + { return append(1, _Ch); } + + value_type& operator[] (int ind) const + { return buf[ind]; } + + friend bkstring operator+ (const bkstring& _Str1, const bkstring& _Str2) + { bkstring s(_Str1); return s.append(_Str2); } + + friend bkstring operator+ (const bkstring& _Str1, const value_type* _Ptr2) + { bkstring s(_Str1); return s.append(_Ptr2); } + + friend bkstring operator+(const value_type* _Ptr1, const bkstring& _Str2) + { bkstring s(_Ptr1); return s.append(_Str2); } + + friend bkstring operator+ (const bkstring& _Str1, const value_type _Ch) + { bkstring s(_Str1); return s.append(1, _Ch); } + + friend bool operator==(const bkstring& _Str1, const bkstring& _Str2) + { return _Str1.compare(_Str2) == 0; } + + friend bool operator==(const bkstring& _Str1, const value_type* _Ptr2) + { return _Str1.compare(_Ptr2) == 0; } + + friend bool operator==(const value_type* _Ptr1, const bkstring& _Str2) + { return _Str2.compare(_Ptr1) == 0; } + + friend bool operator!=(const bkstring& _Str1, const bkstring& _Str2) + { return _Str1.compare(_Str2) != 0; } + + friend bool operator!=(const bkstring& _Str1, const value_type* _Ptr2) + { return _Str1.compare(_Ptr2) != 0; } + + friend bool operator!=(const value_type* _Ptr1, const bkstring& _Str2) + { return _Str2.compare(_Ptr1) != 0; } + + friend bool operator<(const bkstring& _Str1, const bkstring& _Str2) + { return _Str1.compare(_Str2) < 0; } + + friend bool operator<(const bkstring& _Str1, const value_type* _Ptr2) + { return _Str1.compare(_Ptr2) < 0; } + + friend bool operator<(const value_type* _Ptr1, const bkstring& _Str2) + { return _Str2.compare(_Ptr1) > 0; } + + friend bool operator>(const bkstring& _Str1, const bkstring& _Str2) + { return _Str1.compare(_Str2) > 0; } + + friend bool operator>(const bkstring& _Str1, const value_type* _Ptr2) + { return _Str1.compare(_Ptr2) > 0; } + + friend bool operator>(const value_type* _Ptr1, const bkstring& _Str2) + { return _Str2.compare(_Ptr1) < 0; } + + friend bool operator<=(const bkstring& _Str1, const bkstring& _Str2) + { return _Str1.compare(_Str2) <= 0; } + + friend bool operator<=(const bkstring& _Str1, const value_type* _Ptr2) + { return _Str1.compare(_Ptr2) <= 0; } + + friend bool operator<=(const value_type* _Ptr1, const bkstring& _Str2) + { return _Str2.compare(_Ptr1) >= 0; } + + friend bool operator>=(const bkstring& _Str1, const bkstring& _Str2) + { return _Str1.compare(_Str2) >= 0; } + + friend bool operator>=(const bkstring& _Str1, const value_type* _Ptr2) + { return _Str1.compare(_Ptr2) >= 0; } + + friend bool operator>=(const value_type* _Ptr1, const bkstring& _Str2) + { return _Str2.compare(_Ptr1) <= 0; } + + friend bool operator==(const value_type _Ch1, const bkstring& _Str2) + { return (_Str2.size() == 1) && (_Str2[0] == _Ch1); } + + friend bool operator==(const bkstring& _Str1, const value_type _Ch2) + { return (_Str1.size() == 1) && (_Str1[0] == _Ch2); } + + friend bool operator!=(const value_type _Ch1, const bkstring& _Str2) + { return (_Str2.size() != 1) || (_Str2[0] != _Ch1); } + + friend bool operator!=(const bkstring& _Str1, const value_type _Ch2) + { return (_Str1.size() != 1) || (_Str1[0] != _Ch2); } + + iterator begin(void) + { return buf; } + + const_iterator begin(void) const + { return buf; } + + iterator end(void) + { return buf + lenBuf; } + + const_iterator end(void) const + { return buf + lenBuf; } + + // Custom extentions + + void appendfmt(const value_type *fmt, ...); + + size_type sizebytes(void) const { return lenBuf * sizeof(value_type); } +}; + +//const bkstring::size_type bkstring::npos = -1; diff --git a/plugins/SmileyAdd/src/customsmiley.cpp b/plugins/SmileyAdd/src/customsmiley.cpp new file mode 100644 index 0000000000..f125f015db --- /dev/null +++ b/plugins/SmileyAdd/src/customsmiley.cpp @@ -0,0 +1,172 @@ +/* +Miranda SmileyAdd Plugin +Copyright (C) 2008 - 2011 Boris Krasnovskiy All Rights Reserved + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation version 2 +of the License. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include "customsmiley.h" + +SmileyPackCListType g_SmileyPackCStore; + + +bool SmileyPackCListType::AddSmileyPack(HANDLE hContact, TCHAR* dir) +{ + bool res = true; + if (GetSmileyPack(hContact) == NULL) + { + SmileyPackCType *smileyPack = new SmileyPackCType; + + res = smileyPack->LoadSmileyDir(dir); + if (res) + { + smileyPack->SetId(hContact); + m_SmileyPacks.insert(smileyPack); + } + else + delete smileyPack; + } + return res; +} + + +bool SmileyPackCListType::AddSmiley(HANDLE hContact, TCHAR* path) +{ + SmileyPackCType* smpack = GetSmileyPack(hContact); + if (smpack == NULL) + { + smpack = new SmileyPackCType; + + smpack->SetId(hContact); + m_SmileyPacks.insert(smpack); + } + return smpack->LoadSmiley(path); +} + + +SmileyPackCType* SmileyPackCListType::GetSmileyPack(HANDLE id) +{ + for (int i = 0; i < m_SmileyPacks.getCount(); i++) + { + if (m_SmileyPacks[i].GetId() == id) return &m_SmileyPacks[i]; + } + return NULL; +} + + +SmileyCType::SmileyCType(const bkstring& fullpath, const TCHAR* filepath) +{ + LoadFromResource(fullpath, 0); + CreateTriggerText(T2A_SM(filepath)); +} + +bool SmileyCType::CreateTriggerText(char* text) +{ + UrlDecode(text); + + int len = (int)strlen(text); + if (len == 0) return false; + + int reslen = Netlib_GetBase64DecodedBufferSize(len)+1; + char* res = (char*)alloca(reslen); + + NETLIBBASE64 nlb = { text, len, ( PBYTE )res, reslen }; + if (!CallService(MS_NETLIB_BASE64DECODE, 0, LPARAM( &nlb ))) return false; + res[nlb.cbDecoded] = 0; + + TCHAR *txt = mir_utf8decodeT(res); + + if (txt == NULL) return false; + + m_TriggerText = txt; + mir_free(txt); + + return true; +} + + +// +// SmileyPackCType +// + +bool SmileyPackCType::LoadSmileyDir(TCHAR* dir) +{ + bkstring dirs = dir; + dirs += _T("\\*.*"); + + _tfinddata_t c_file; + INT_PTR hFile = _tfindfirst((TCHAR*)dirs.c_str(), &c_file); + if (hFile > -1L) + { + do { + if (c_file.name[0] != '.') + { + bkstring fullpath = dir; + fullpath = fullpath + _T("\\") + c_file.name; + TCHAR* div = _tcsrchr(c_file.name, '.'); + if (div) + { + *div = 0; + SmileyCType *smlc = new SmileyCType(fullpath, c_file.name); + if (smlc->GetTriggerText().empty()) + delete smlc; + else + m_SmileyList.insert(smlc); + } + } + } while( _tfindnext( hFile, &c_file ) == 0 ); + _findclose( hFile ); + AddTriggersToSmileyLookup(); + return true; + } + return false; +} + + +bool SmileyPackCType::LoadSmiley(TCHAR* path) +{ + bkstring dirs = path; + bkstring::size_type slash = dirs.find_last_of('\\'); + bkstring::size_type dot = dirs.find_last_of('.'); + + bkstring name = dirs.substr(slash+1, dot - slash - 1); + + for (int i=0; i < m_SmileyList.getCount(); i++) + { + if (m_SmileyList[i].GetTriggerText() == name) + { + m_SmileyList[i].LoadFromResource(dirs, 0); + return true; + } + } + + m_SmileyList.insert(new SmileyCType(dirs, (TCHAR*)name.c_str())); + + bkstring empty; + m_SmileyLookup.insert(new SmileyLookup( + m_SmileyList[m_SmileyList.getCount()-1].GetTriggerText(), false, m_SmileyList.getCount()-1, empty)); + + return true; +} + + +void SmileyPackCType::AddTriggersToSmileyLookup(void) +{ + bkstring empty; + for (int dist=0; dist. +*/ + +#include "general.h" +#include "smileys.h" + +#ifndef SMILEYADD_CUSTOMSMILEY_H_ +#define SMILEYADD_CUSTOMSMILEY_H_ + +class SmileyCType : public SmileyType +{ +public: + SmileyCType(const bkstring& fullpath, const TCHAR* filepath); + + bool CreateTriggerText(char* text); +}; + +class SmileyPackCType +{ +public: + typedef SMOBJLIST SmileyVectorType; + typedef SMOBJLIST SmileyLookupType; + +private: + SmileyVectorType m_SmileyList; + SmileyLookupType m_SmileyLookup; + + HANDLE m_id; + + void InsertLookup(SmileyCType& sml, bkstring& lk, bool first); + void AddTriggersToSmileyLookup(void); + +public: + SmileyVectorType& GetSmileyList(void) { return m_SmileyList; } + SmileyLookupType& GetSmileyLookup(void) { return m_SmileyLookup; } + + int SmileyCount(void) const { return m_SmileyList.getCount(); } + + SmileyCType* GetSmiley(unsigned index) { return &m_SmileyList[index]; } + + HANDLE GetId(void) { return m_id; } + void SetId(HANDLE id) { m_id = id; } + + bool LoadSmileyDir(TCHAR* dir); + bool LoadSmiley(TCHAR* path); +}; + + +class SmileyPackCListType +{ +public: + typedef SMOBJLIST SmileyPackVectorType; + +private: + SmileyPackVectorType m_SmileyPacks; + +public: + int NumberOfSmileyPacks(void) { return m_SmileyPacks.getCount(); } + + bool AddSmileyPack(HANDLE hContact, TCHAR* dir); + bool AddSmiley(HANDLE hContact, TCHAR* path); + + void ClearAndFreeAll(void) { m_SmileyPacks.destroy(); } + + SmileyPackCType* GetSmileyPack(HANDLE id); +}; + +extern SmileyPackCListType g_SmileyPackCStore; + +#endif diff --git a/plugins/SmileyAdd/src/dlgboxsubclass.cpp b/plugins/SmileyAdd/src/dlgboxsubclass.cpp new file mode 100644 index 0000000000..03a0a6e5fd --- /dev/null +++ b/plugins/SmileyAdd/src/dlgboxsubclass.cpp @@ -0,0 +1,568 @@ +/* +Miranda SmileyAdd Plugin +Copyright (C) 2005 - 2012 Boris Krasnovskiy All Rights Reserved +Copyright (C) 2003 - 2004 Rein-Peter de Boer + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation version 2 +of the License. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include "general.h" +#include "smileyroutines.h" +#include "services.h" +#include "options.h" + +//***************************************************// +// DISCLAIMER!!! +// we are not supposed to use this object, so be aware +typedef struct NewMessageWindowLParam +{ + HANDLE hContact; + int isSend; + const char *szInitialText; +} +msgData; +// this is an undocumented object!!!!!!! +// subject to change in miranda versions...!!!!!! +// DISCLAIMER!!! +//***************************************************// + +extern HINSTANCE g_hInst; + +static HHOOK g_hMessageHookPre = NULL; +static HANDLE g_hMutex = NULL; +static HANDLE g_hHookMsgWnd = NULL; + +static LRESULT CALLBACK MessageDlgSubclas(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam); + + +//type definitions +class MsgWndData +{ +public: + HWND hwnd; + char ProtocolName[52]; + HWND REdit; + HWND QuoteB; + HWND MEdit; + HWND MOK; + HWND LButton; + mutable HWND hSmlButton; + mutable HBITMAP hSmlBmp; + mutable HICON hSmlIco; + int idxLastChar; + WNDPROC wpOrigWndProc; + HANDLE hContact; + bool doSmileyReplace; + bool doSmileyButton; + bool OldButtonPlace; + bool isSplit; + bool isSend; + + MsgWndData() + { + ProtocolName[0] = 0; + REdit = NULL; + QuoteB = NULL; + MEdit = NULL; + MOK = NULL; + LButton = NULL; + hSmlButton = NULL; + hSmlBmp = NULL; + hSmlIco = NULL; + idxLastChar = 0; + hContact = NULL; + doSmileyReplace = false; + doSmileyButton = false; + OldButtonPlace = false; + isSplit = false; + isSend = false; + wpOrigWndProc = NULL; + } + + MsgWndData(const MsgWndData &dsb) + { + *this = dsb; + dsb.hSmlBmp = NULL; + dsb.hSmlIco = NULL; + dsb.hSmlButton = NULL; + } + + + ~MsgWndData() + { + clear(); + } + + void clear(void) + { + if (hSmlBmp != NULL) DeleteObject(hSmlBmp); + if (hSmlIco != NULL) DestroyIcon(hSmlIco); + if (hSmlButton != NULL) DestroyWindow(hSmlButton); + hSmlBmp = NULL; + hSmlIco = NULL; + hSmlButton = NULL; + } + + RECT CalcSmileyButtonPos(void) + { + RECT rect; + POINT pt; + + if (OldButtonPlace) + { + if (isSplit && DBGetContactSettingByte(NULL, "SRMsg", "ShowQuote", FALSE)) + { + GetWindowRect(QuoteB, &rect); + pt.x = rect.right + 12; + } + else + { + GetWindowRect(MEdit, &rect); + pt.x = rect.left; + } + GetWindowRect(MOK, &rect); + pt.y = rect.top; + } + else + { + GetWindowRect(LButton, &rect); + pt.y = rect.top; + + if ((GetWindowLongPtr(LButton, GWL_STYLE) & WS_VISIBLE) != 0) + pt.x = rect.left - 28; + else + pt.x = rect.left; + } + + ScreenToClient(GetParent(LButton), &pt); + rect.bottom += pt.y - rect.top; + rect.right += pt.x - rect.left; + rect.top = pt.y; + rect.left = pt.x; + + return rect; + } + + //helper function + //identifies the message dialog + bool IsMessageSendDialog(HWND hwnd) + { + TCHAR szClassName[32] = _T(""); + + GetClassName(hwnd, szClassName, SIZEOF(szClassName)); + if (_tcscmp(szClassName, _T("#32770"))) return false; + + if ((REdit = GetDlgItem(hwnd, MI_IDC_LOG)) != NULL) + { + GetClassName(REdit, szClassName, SIZEOF(szClassName)); + if (_tcscmp(szClassName, _T("RichEdit20A")) != 0 && + _tcscmp(szClassName, _T("RichEdit20W")) != 0 && + _tcscmp(szClassName, _T("RICHEDIT50W")) != 0) return false; + } + else return false; + + if ((MEdit = GetDlgItem(hwnd, MI_IDC_MESSAGE)) != NULL) + { + GetClassName(MEdit, szClassName, SIZEOF(szClassName)); + if (_tcscmp(szClassName, _T("Edit")) != 0 && + _tcscmp(szClassName, _T("RichEdit20A")) != 0 && + _tcscmp(szClassName, _T("RichEdit20W")) != 0 && + _tcscmp(szClassName, _T("RICHEDIT50W")) != 0) return false; + } + else return false; + + QuoteB = GetDlgItem(hwnd, MI_IDC_QUOTE); + + if ((LButton = GetDlgItem(hwnd, MI_IDC_ADD)) == NULL) + return false; + + if (GetDlgItem(hwnd, MI_IDC_NAME) == NULL) + return false; + if ((MOK = GetDlgItem(hwnd, IDOK)) == NULL) + return false; + + return true; + } + + void CreateSmileyButton(void) + { + doSmileyButton = opt.ButtonStatus != 0; + OldButtonPlace = opt.ButtonStatus == 2; + + SmileyPackType* SmileyPack = GetSmileyPack(ProtocolName, hContact); + doSmileyButton &= SmileyPack != NULL && SmileyPack->VisibleSmileyCount() != 0; + + bool showButtonLine; + if (IsOldSrmm()) + { + isSplit = DBGetContactSettingByte(NULL,"SRMsg","Split", TRUE) != 0; + + doSmileyReplace = (isSplit || !isSend); + doSmileyButton &= isSplit || isSend; + showButtonLine = DBGetContactSettingByte(NULL, "SRMsg", "ShowButtonLine", TRUE) != 0; + } + else + { + doSmileyReplace = true; + OldButtonPlace = false; + showButtonLine = DBGetContactSettingByte(NULL, "SRMM", "ShowButtonLine", TRUE) != 0; + } + + doSmileyButton &= OldButtonPlace || showButtonLine; + + if (ProtocolName[0] != 0) + { + INT_PTR cap = CallProtoService(ProtocolName, PS_GETCAPS, PFLAGNUM_1, 0); + doSmileyButton &= ((cap & (PF1_IMSEND | PF1_CHAT)) != 0); + doSmileyReplace &= ((cap & (PF1_IMRECV | PF1_CHAT)) != 0); + } + + if (doSmileyButton && opt.PluginSupportEnabled) + { + //create smiley button + RECT rect = CalcSmileyButtonPos(); + + hSmlButton = CreateWindowEx( + WS_EX_LEFT | WS_EX_NOPARENTNOTIFY | WS_EX_TOPMOST, + MIRANDABUTTONCLASS, + _T("S"), + WS_CHILD|WS_VISIBLE|WS_TABSTOP, // window style + rect.left, // horizontal position of window + rect.top, // vertical position of window + rect.bottom - rect.top + 1, // window width + rect.bottom - rect.top + 1, // window height + GetParent(LButton), // handle to parent or owner window + (HMENU) IDC_SMLBUTTON, // menu handle or child identifier + NULL, // handle to application instance + NULL); // window-creation data + + // Conversion to bitmap done to prevent Miranda from scaling the image + SmileyType* sml = FindButtonSmiley(SmileyPack); + if (sml != NULL) + { + hSmlBmp = sml->GetBitmap(GetSysColor(COLOR_BTNFACE), 0, 0); + SendMessage(hSmlButton, BM_SETIMAGE, IMAGE_BITMAP, (LPARAM)hSmlBmp); + } + else + { + hSmlIco = GetDefaultIcon(); + SendMessage(hSmlButton, BM_SETIMAGE, IMAGE_ICON, (LPARAM)hSmlIco); + } + + SendMessage(hSmlButton, BUTTONADDTOOLTIP, (WPARAM)LPGEN("Show Smiley Selection Window"), 0); + SendMessage(hSmlButton, BUTTONSETASFLATBTN, TRUE, 0); + } + } +}; + +static int CompareMsgWndData(const MsgWndData* p1, const MsgWndData* p2) +{ + return (int)((INT_PTR)p1->hwnd - (INT_PTR)p2->hwnd); +} +static LIST g_MsgWndList(10, CompareMsgWndData); + + +bool IsOldSrmm(void) +{ + return ServiceExists(MS_MSG_GETWINDOWCLASS) == 0; +} + + +int UpdateSrmmDlg(WPARAM wParam, LPARAM /* lParam */) +{ + WaitForSingleObject(g_hMutex, 2000); + for (int i=0; ihContact == (HANDLE)wParam) + { + SendMessage(g_MsgWndList[i]->hwnd, WM_SETREDRAW, FALSE, 0); + SendMessage(g_MsgWndList[i]->hwnd, DM_OPTIONSAPPLIED, 0, 0); + SendMessage(g_MsgWndList[i]->hwnd, WM_SETREDRAW, TRUE, 0); + } + } + ReleaseMutex(g_hMutex); + + return 0; +} + + +//find the dialog info in the stored list +static MsgWndData* IsMsgWnd(HWND hwnd) +{ + WaitForSingleObject(g_hMutex, 2000); + MsgWndData* res = g_MsgWndList.find((MsgWndData*)&hwnd); + ReleaseMutex(g_hMutex); + + return res; +} + + +static void MsgWndDetect(HWND hwndDlg, HANDLE hContact, msgData* datm) +{ + MsgWndData dat; + + if (dat.IsMessageSendDialog(hwndDlg)) + { + dat.hwnd = hwndDlg; + if (datm != NULL) + { + dat.isSend = datm->isSend != 0; + dat.hContact = datm->hContact; + } + else + dat.hContact = hContact; + + // Get the protocol for this contact to display correct smileys. + char *protonam = (char*) CallService(MS_PROTO_GETCONTACTBASEPROTO, + (WPARAM)DecodeMetaContact(dat.hContact), 0); + + if (protonam) + { + strncpy(dat.ProtocolName, protonam, sizeof(dat.ProtocolName)); + dat.ProtocolName[sizeof(dat.ProtocolName)-1] = 0; + } + + WaitForSingleObject(g_hMutex, 2000); + + MsgWndData* msgwnd = g_MsgWndList.find((MsgWndData*)&hwndDlg); + if (msgwnd == NULL) + { + msgwnd = new MsgWndData(dat); + g_MsgWndList.insert(msgwnd); + } + else + msgwnd = NULL; + ReleaseMutex(g_hMutex); + + if (msgwnd != NULL) + { + msgwnd->wpOrigWndProc = (WNDPROC)SetWindowLongPtr(hwndDlg, GWLP_WNDPROC, (LONG_PTR)MessageDlgSubclas); + msgwnd->CreateSmileyButton(); + if (hContact == NULL) SetRichCallback(msgwnd->REdit, msgwnd->hContact, true, true); + } + } +} + + +//global subclass function for all dialogs +static LRESULT CALLBACK MessageDlgSubclas(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) +{ + MsgWndData* dat = IsMsgWnd(hwnd); + if (dat == NULL) return 0; + + switch(uMsg) + { + case DM_OPTIONSAPPLIED: + dat->clear(); + dat->CreateSmileyButton(); + break; + + case DM_APPENDTOLOG: + if (opt.PluginSupportEnabled) + { + //get length of text now before things can get added... + GETTEXTLENGTHEX gtl; + gtl.codepage = 1200; + gtl.flags = GTL_PRECISE | GTL_NUMCHARS; + dat->idxLastChar = (int)SendMessage(dat->REdit, EM_GETTEXTLENGTHEX, (WPARAM) >l, 0); + } + break; + } + + LRESULT result = CallWindowProc(dat->wpOrigWndProc, hwnd, uMsg, wParam, lParam); + + if (!opt.PluginSupportEnabled) return result; + + switch(uMsg) + { + case WM_DESTROY: + WaitForSingleObject(g_hMutex, 2000); + SetWindowLongPtr(hwnd, GWLP_WNDPROC, (LONG_PTR)dat->wpOrigWndProc); + { + int ind = g_MsgWndList.getIndex((MsgWndData*)&hwnd); + if ( ind != -1 ) + { + delete g_MsgWndList[ind]; + g_MsgWndList.remove(ind); + } + } + ReleaseMutex(g_hMutex); + break; + + case WM_SIZE: + if (dat->doSmileyButton) + { + RECT rect = dat->CalcSmileyButtonPos(); + SetWindowPos(dat->hSmlButton, NULL, rect.left, rect.top, + 0, 0, SWP_NOZORDER | SWP_NOSIZE | SWP_NOACTIVATE); + } + break; + + case DM_APPENDTOLOG: + if (dat->doSmileyReplace) + { + SmileyPackCType* smcp; + SmileyPackType* SmileyPack = GetSmileyPack(dat->ProtocolName, dat->hContact, &smcp); + if (SmileyPack != NULL) + { + const CHARRANGE sel = { dat->idxLastChar, LONG_MAX }; + ReplaceSmileys(dat->REdit, SmileyPack, smcp, sel, false, false, false); + } + } + break; + + case DM_REMAKELOG: + if (dat->doSmileyReplace) + { + SmileyPackCType* smcp; + SmileyPackType* SmileyPack = GetSmileyPack(dat->ProtocolName, dat->hContact, &smcp); + if (SmileyPack != NULL) + { + static const CHARRANGE sel = { 0, LONG_MAX }; + ReplaceSmileys(dat->REdit, SmileyPack, smcp, sel, false, false, false); + } + } + break; + + case WM_COMMAND: + if (LOWORD(wParam) == IDC_SMLBUTTON && + HIWORD(wParam) == BN_CLICKED) + { + SmileyToolWindowParam *stwp = new SmileyToolWindowParam; + stwp->pSmileyPack = GetSmileyPack(dat->ProtocolName, dat->hContact); + + stwp->hWndParent = hwnd; + stwp->hWndTarget = dat->MEdit; + stwp->targetMessage = EM_REPLACESEL; + stwp->targetWParam = TRUE; + + RECT rect; + GetWindowRect(dat->hSmlButton, &rect); + + if (dat->OldButtonPlace) + { + stwp->direction = 3; + stwp->xPosition = rect.left; + stwp->yPosition = rect.top + 4; + } + else + { + stwp->direction = 0; + stwp->xPosition = rect.left; + stwp->yPosition = rect.top + 24; + } + + mir_forkthread(SmileyToolThread, stwp); + } + + if (LOWORD(wParam) == MI_IDC_ADD && + HIWORD(wParam) == BN_CLICKED && + dat->doSmileyButton) + { + RECT rect = dat->CalcSmileyButtonPos(); + SetWindowPos(dat->hSmlButton, NULL, rect.left, rect.top, + 0, 0, SWP_NOZORDER | SWP_NOSIZE | SWP_NOACTIVATE); + } + break; + } + + return result; +} + +static int MsgDlgHook(WPARAM, LPARAM lParam) +{ + const MessageWindowEventData *wndEvtData = (MessageWindowEventData*)lParam; + switch(wndEvtData->uType) + { + case MSG_WINDOW_EVT_OPENING: + MsgWndDetect(wndEvtData->hwndWindow, wndEvtData->hContact, NULL); + if (wndEvtData->cbSize >= sizeof(MessageWindowEventData)) + { + SetRichOwnerCallback(wndEvtData->hwndWindow, wndEvtData->hwndInput, wndEvtData->hwndLog); + + if (wndEvtData->hwndLog) + SetRichCallback(wndEvtData->hwndLog, wndEvtData->hContact, false, false); + if (wndEvtData->hwndInput) + SetRichCallback(wndEvtData->hwndInput, wndEvtData->hContact, false, false); + } + break; + + case MSG_WINDOW_EVT_OPEN: + if (wndEvtData->cbSize >= sizeof(MessageWindowEventData)) + { + SetRichOwnerCallback(wndEvtData->hwndWindow, wndEvtData->hwndInput, wndEvtData->hwndLog); + if (wndEvtData->hwndLog) + SetRichCallback(wndEvtData->hwndLog, wndEvtData->hContact, true, true); + if (wndEvtData->hwndInput) + { + SetRichCallback(wndEvtData->hwndInput, wndEvtData->hContact, true, true); + SendMessage(wndEvtData->hwndInput, WM_REMAKERICH, 0, 0); + } + } + break; + + case MSG_WINDOW_EVT_CLOSE: + if (wndEvtData->cbSize >= sizeof(MessageWindowEventData) && wndEvtData->hwndLog) + { + CloseRichCallback(wndEvtData->hwndLog, true); + CloseRichOwnerCallback(wndEvtData->hwndWindow, true); + } + break; + } + return 0; +} + + +//global subclass function for all dialogs +static LRESULT CALLBACK MsgDlgHookProcPre(int code, WPARAM wParam, LPARAM lParam) +{ + const CWPSTRUCT *msg = (CWPSTRUCT*)lParam; + + if (code == HC_ACTION && msg->message == WM_INITDIALOG) + MsgWndDetect(msg->hwnd, NULL, (msgData*)msg->lParam); + + return CallNextHookEx(g_hMessageHookPre, code, wParam, lParam); +} + + +void InstallDialogBoxHook(void) +{ + g_hMutex = CreateMutex(NULL, FALSE, NULL); + + g_hHookMsgWnd = HookEvent(ME_MSG_WINDOWEVENT, MsgDlgHook); + + // Hook message API + if (g_hHookMsgWnd == NULL) + g_hMessageHookPre = SetWindowsHookEx(WH_CALLWNDPROC, MsgDlgHookProcPre, + NULL, GetCurrentThreadId()); +} + + +void RemoveDialogBoxHook(void) +{ + if (g_hHookMsgWnd) UnhookEvent(g_hHookMsgWnd); + if (g_hMessageHookPre) UnhookWindowsHookEx(g_hMessageHookPre); + + WaitForSingleObject(g_hMutex, 2000); + for (int i=0; i. +*/ + +#include "general.h" +#include "m_smileyadd.h" +#include "m_folders.h" + +extern HANDLE hEvent1; +HANDLE hNetlibUser; +static HANDLE hFolder, hFolderHook; + +struct QueueElem +{ + bkstring url; + bkstring fname; + bool needext; + + QueueElem(bkstring& purl, bkstring& pfname, bool ne) + : url(purl), fname(pfname), needext(ne) {} +}; + +static HANDLE g_hDlMutex; +static OBJLIST dlQueue(10); + +static TCHAR cachepath[MAX_PATH]; +static bool threadRunning; + +bool InternetDownloadFile(const char *szUrl, char* szDest, HANDLE &hHttpDwnl) +{ + int result = 0xBADBAD; + char* szRedirUrl = NULL; + NETLIBHTTPREQUEST nlhr = {0}; + + // initialize the netlib request + nlhr.cbSize = sizeof(nlhr); + nlhr.requestType = REQUEST_GET; + nlhr.flags = NLHRF_NODUMP; + nlhr.szUrl = (char*)szUrl; + nlhr.nlc = hHttpDwnl; + + if (CallService(MS_SYSTEM_GETVERSION, 0, 0) >= PLUGIN_MAKE_VERSION(0,9,0,5)) + nlhr.flags |= NLHRF_HTTP11 | NLHRF_PERSISTENT | NLHRF_REDIRECT; + + // change the header so the plugin is pretended to be IE 6 + WinXP + nlhr.headersCount = 2; + nlhr.headers=(NETLIBHTTPHEADER*)alloca(sizeof(NETLIBHTTPHEADER)*nlhr.headersCount); + nlhr.headers[0].szName = "User-Agent"; + nlhr.headers[0].szValue = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)"; + nlhr.headers[1].szName = "Connection"; + nlhr.headers[1].szValue = "close"; + + while (result == 0xBADBAD) + { + // download the page + NETLIBHTTPREQUEST *nlhrReply = (NETLIBHTTPREQUEST*)CallService(MS_NETLIB_HTTPTRANSACTION, + (WPARAM)hNetlibUser,(LPARAM)&nlhr); + + if (nlhrReply) + { + hHttpDwnl = nlhrReply->nlc; + // if the recieved code is 200 OK + if(nlhrReply->resultCode == 200) + { + char* delim = strrchr(szDest, '\\'); + if (delim) *delim = '\0'; + CallService(MS_UTILS_CREATEDIRTREE, 0, (LPARAM)szDest); + if (delim) *delim = '\\'; + int res = -1; + int fh = _open(szDest, _O_BINARY | _O_WRONLY | _O_CREAT, _S_IREAD | _S_IWRITE); + if (fh != -1) + { + res = _write(fh, nlhrReply->pData, nlhrReply->dataLength); + _close(fh); + } + if (res < 0) + remove(szDest); + else + result = 0; + } + // if the recieved code is 302 Moved, Found, etc + // workaround for url forwarding + else if(nlhrReply->resultCode == 302 || nlhrReply->resultCode == 301 || nlhrReply->resultCode == 307) // page moved + { + // get the url for the new location and save it to szInfo + // look for the reply header "Location" + for (int i=0; iheadersCount; i++) + { + if (!strcmp(nlhrReply->headers[i].szName, "Location")) + { + size_t rlen = 0; + if (nlhrReply->headers[i].szValue[0] == '/') + { + const char* szPath; + const char* szPref = strstr(szUrl, "://"); + szPref = szPref ? szPref + 3 : szUrl; + szPath = strchr(szPref, '/'); + rlen = szPath != NULL ? szPath - szUrl : strlen(szUrl); + } + + szRedirUrl = (char*)mir_realloc(szRedirUrl, + rlen + strlen(nlhrReply->headers[i].szValue)*3 + 1); + + strncpy(szRedirUrl, szUrl, rlen); + strcpy(szRedirUrl+rlen, nlhrReply->headers[i].szValue); + + nlhr.szUrl = szRedirUrl; + break; + } + } + } + else + result = 1; + } + else + { + hHttpDwnl = NULL; + result = 1; + } + + CallService(MS_NETLIB_FREEHTTPREQUESTSTRUCT,0,(LPARAM)nlhrReply); + } + + mir_free(szRedirUrl); + + return result == 0; +} + + +void __cdecl SmileyDownloadThread(void*) +{ + bool needext = false; + HANDLE hHttpDwnl = NULL; + WaitForSingleObject(g_hDlMutex, 3000); + while (!Miranda_Terminated() && dlQueue.getCount()) + { + ReleaseMutex(g_hDlMutex); + if (_taccess(dlQueue[0].fname.c_str(), 0) != 0) + { + InternetDownloadFile(T2A_SM(dlQueue[0].url.c_str()), T2A_SM(dlQueue[0].fname.c_str()), hHttpDwnl); + WaitForSingleObject(g_hDlMutex, 3000); + + bkstring fname(dlQueue[0].fname); + if (dlQueue[0].needext) { fname += GetImageExt(fname); needext = true; } + _trename(dlQueue[0].fname.c_str(), fname.c_str()); + } + else + WaitForSingleObject(g_hDlMutex, 3000); + + dlQueue.remove(0); + } + dlQueue.destroy(); + if (hHttpDwnl) Netlib_CloseHandle(hHttpDwnl); + threadRunning = false; + ReleaseMutex(g_hDlMutex); + + if (!Miranda_Terminated()) + { + if (needext) + CallServiceSync(MS_SMILEYADD_RELOAD, 0, 0); + else + NotifyEventHooks(hEvent1, 0, 0); + } +} + + +bool GetSmileyFile(bkstring& url, const bkstring& packstr) +{ + _TPattern * urlsplit = _TPattern::compile(_T(".*/(.*)")); + _TMatcher * m0 = urlsplit->createTMatcher(url); + + m0->findFirstMatch(); + + bkstring filename; + filename.appendfmt(_T("%s\\%s\\"), cachepath, packstr.c_str()); + size_t pathpos = filename.size(); + filename += m0->getGroup(1); + + delete m0; + delete urlsplit; + + bool needext = filename.find('.') == filename.npos; + if (needext) filename += _T(".*"); + + _tfinddata_t c_file; + INT_PTR hFile = _tfindfirst((TCHAR*)filename.c_str(), &c_file); + if (hFile > -1) + { + _findclose(hFile); + filename.erase(pathpos); + filename += c_file.name; + url = filename; + return false; + } + if (needext) filename.erase(filename.size()-1); + + WaitForSingleObject(g_hDlMutex, 3000); + dlQueue.insert(new QueueElem(url, filename, needext)); + ReleaseMutex(g_hDlMutex); + + if (!threadRunning) + { + threadRunning = true; + mir_forkthread(SmileyDownloadThread, NULL); + } + + url = filename; + return false; +} + +void GetDefaultSmileyCacheFolder(TCHAR* szPath, size_t cbLen) +{ + TCHAR *tmpPath = Utils_ReplaceVarsT(_T("%miranda_userdata%\\SmileyCache")); + if ((INT_PTR)tmpPath != CALLSERVICE_NOTFOUND) + { + mir_sntprintf(szPath, cbLen, _T("%s"), tmpPath); + mir_free(tmpPath); + } + else + { + char dbPath[MAX_PATH]; + CallService(MS_DB_GETPROFILEPATH, SIZEOF(dbPath), (LPARAM)dbPath); + mir_sntprintf(szPath, cbLen, _T("%s\\SmileyCache"), A2T_SM(dbPath)); + } +} + +int FolderChanged(WPARAM, LPARAM) +{ + FOLDERSGETDATA fgd = {0}; + fgd.cbSize = sizeof(FOLDERSGETDATA); + fgd.nMaxPathSize = SIZEOF(cachepath); + fgd.szPathT = cachepath; + if (CallService(MS_FOLDERS_GET_PATH, (WPARAM) hFolder, (LPARAM) &fgd)) + { + GetDefaultSmileyCacheFolder(cachepath, SIZEOF(cachepath)); + } + + return 0; +} + +void GetSmileyCacheFolder(void) +{ + TCHAR defaultPath[MAX_PATH]; + + GetDefaultSmileyCacheFolder(defaultPath, SIZEOF(defaultPath)); + + FOLDERSDATA fd = {0}; + fd.cbSize = sizeof(FOLDERSDATA); + strcpy(fd.szSection, "SmileyAdd"); + strcpy(fd.szName,"Smiley Cache"); + fd.szFormatT = defaultPath; + fd.flags = FF_TCHAR; + hFolder = (HANDLE)CallService(MS_FOLDERS_REGISTER_PATH, 0, (LPARAM) &fd); + + FolderChanged(0, 0); + + hFolderHook = HookEvent(ME_FOLDERS_PATH_CHANGED, FolderChanged); +} + +void DownloadInit(void) +{ + NETLIBUSER nlu = {0}; + nlu.cbSize = sizeof(nlu); + nlu.flags = NUF_OUTGOING|NUF_HTTPCONNS|NUF_NOHTTPSOPTION; + nlu.szSettingsModule = "SmileyAdd"; + nlu.szDescriptiveName = Translate("SmileyAdd HTTP connections"); + hNetlibUser = (HANDLE)CallService(MS_NETLIB_REGISTERUSER, 0, (LPARAM)&nlu); + + GetSmileyCacheFolder(); + g_hDlMutex = CreateMutex(NULL, FALSE, NULL); +} + +void DownloadClose(void) +{ + UnhookEvent(hFolderHook); + CloseHandle(g_hDlMutex); + Netlib_CloseHandle(hNetlibUser); +} diff --git a/plugins/SmileyAdd/src/download.h b/plugins/SmileyAdd/src/download.h new file mode 100644 index 0000000000..bb83926acc --- /dev/null +++ b/plugins/SmileyAdd/src/download.h @@ -0,0 +1,28 @@ +/* +Miranda SmileyAdd Plugin +Copyright (C) 2008 - 2011 Boris Krasnovskiy All Rights Reserved + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation version 2 +of the License. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef SMILEYADD_DOWNLOAD_H_ +#define SMILEYADD_DOWNLOAD_H_ + +#include "general.h" + +bool GetSmileyFile(bkstring& url, const bkstring& packstr); +void DownloadInit(void); +void DownloadClose(void); + +#endif diff --git a/plugins/SmileyAdd/src/general.cpp b/plugins/SmileyAdd/src/general.cpp new file mode 100644 index 0000000000..9e97737f8c --- /dev/null +++ b/plugins/SmileyAdd/src/general.cpp @@ -0,0 +1,299 @@ +/* +Miranda SmileyAdd Plugin +Copyright (C) 2005 - 2012 Boris Krasnovskiy All Rights Reserved +Copyright (C) 2003 - 2004 Rein-Peter de Boer + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation version 2 +of the License. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include "general.h" +#include "m_metacontacts.h" + +#ifdef _MSC_VER +#include +#endif + +/* +#include "m_popup.h" +*/ +static ULONG_PTR g_gdiplusToken = 0; +static bool gdiPlusFail = false; + +// +// General functions +// +int CalculateTextHeight(HDC hdc, CHARFORMAT2* chf) +{ + HDC hcdc = CreateCompatibleDC(hdc); + + int logPixelsY = GetDeviceCaps(hdc, LOGPIXELSY); + HFONT hFont = CreateFont(-(chf->yHeight * logPixelsY / 1440), 0, 0, 0, + chf->wWeight, chf->dwEffects & CFE_ITALIC ? 1 : 0, 0, 0, + chf->bCharSet, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, + DEFAULT_QUALITY, DEFAULT_PITCH | FF_DONTCARE, + chf->szFaceName); + SelectObject(hcdc, hFont); + + SIZE fontSize; + GetTextExtentPoint32(hcdc, _T(")"), 1, &fontSize); + + DeleteObject(hFont); + DeleteDC(hcdc); + + return fontSize.cy; +} + + +HICON GetDefaultIcon(bool copy) +{ + HICON resIco = (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)"SmileyAdd_ButtonSmiley"); + if ( resIco == NULL || resIco == (HICON)CALLSERVICE_NOTFOUND ) + { + resIco = (HICON)LoadImage(g_hInst, MAKEINTRESOURCE(IDI_SMILINGICON), + IMAGE_ICON, 0, 0, copy ? 0 : LR_SHARED); + } + else + { + if (copy) + { + resIco = (HICON)CopyImage(resIco, IMAGE_ICON, 0, 0, 0); + CallService(MS_SKIN2_RELEASEICON, 0, (LPARAM)"SmileyAdd_ButtonSmiley"); + } + } + + return resIco; +} + + +const TCHAR* GetImageExt(bkstring &fname) +{ + const TCHAR* ext = _T(""); + + int fileId = _topen(fname.c_str(), O_RDONLY | _O_BINARY); + if (fileId != -1) + { + BYTE buf[6]; + + int bytes = _read(fileId, buf, sizeof(buf)); + if (bytes > 4) + { + if ( *(unsigned short*)buf == 0xd8ff ) + ext = _T("jpg"); + else if ( *(unsigned short*)buf == 0x4d42 ) + ext = _T("bmp"); + else if ( *(unsigned*)buf == 0x474e5089 ) + ext = _T("png"); + else if ( *(unsigned*)buf == 0x38464947 ) + ext = _T("gif"); + } + _close(fileId); + } + return ext; +} + + + +HICON ImageList_GetIconFixed (HIMAGELIST himl, INT i, UINT fStyle) +{ + ICONINFO ii; + HICON hIcon; + HBITMAP hOldDstBitmap; + HDC hdcDst; + + int cx, cy; + ImageList_GetIconSize(himl, &cx, &cy); + + hdcDst = CreateCompatibleDC(NULL); + + ii.fIcon = TRUE; + ii.xHotspot = 0; + ii.yHotspot = 0; + + /* draw mask*/ + ii.hbmMask = CreateBitmap (cx, cy, 1, 1, NULL); + hOldDstBitmap = (HBITMAP)SelectObject (hdcDst, ii.hbmMask); + PatBlt(hdcDst, 0, 0, cx, cy, WHITENESS); + ImageList_Draw(himl, i, hdcDst, 0, 0, fStyle | ILD_MASK); + + /* draw image*/ + ii.hbmColor = CreateBitmap (cx, cy, 1, 32, NULL); + SelectObject (hdcDst, ii.hbmColor); + PatBlt (hdcDst, 0, 0, cx, cy, BLACKNESS); + ImageList_Draw(himl, i, hdcDst, 0, 0, fStyle | ILD_TRANSPARENT); + + /* + * CreateIconIndirect requires us to deselect the bitmaps from + * the DCs before calling + */ + SelectObject(hdcDst, hOldDstBitmap); + + hIcon = CreateIconIndirect (&ii); + + DeleteObject (ii.hbmMask); + DeleteObject (ii.hbmColor); + DeleteDC (hdcDst); + + return hIcon; +} + +void pathToRelative(const bkstring& pSrc, bkstring& pOut) +{ + TCHAR szOutPath[MAX_PATH]; + CallService(MS_UTILS_PATHTORELATIVET, (WPARAM)pSrc.c_str(), (LPARAM)szOutPath); + pOut = szOutPath; +} + +void pathToAbsolute(const bkstring& pSrc, bkstring& pOut) +{ + TCHAR szOutPath[MAX_PATH]; + + TCHAR* szVarPath = Utils_ReplaceVarsT(pSrc.c_str()); + if (szVarPath == (TCHAR*)CALLSERVICE_NOTFOUND || szVarPath == NULL) + { + TCHAR szExpPath[MAX_PATH]; + ExpandEnvironmentStrings(pSrc.c_str(), szExpPath, SIZEOF(szExpPath)); + CallService(MS_UTILS_PATHTOABSOLUTET, (WPARAM)szExpPath, (LPARAM)szOutPath); + } + else + { + CallService(MS_UTILS_PATHTOABSOLUTET, (WPARAM)szVarPath, (LPARAM)szOutPath); + mir_free(szVarPath); + } + pOut = szOutPath; +} + + +///////////////////////////////////////////////////////////////////////////////////////// +// UrlDecode - converts URL chars like %20 into printable characters + +static int __fastcall SingleHexToDecimal(char c) +{ + if (c >= '0' && c <= '9') return c-'0'; + if (c >= 'a' && c <= 'f') return c-'a'+10; + if (c >= 'A' && c <= 'F') return c-'A'+10; + return -1; +} + +void UrlDecode(char* str) +{ + char* s = str, *d = str; + + while(*s) + { + if (*s == '%') + { + int digit1 = SingleHexToDecimal(s[1]); + if ( digit1 != -1 ) + { + int digit2 = SingleHexToDecimal(s[2]); + if ( digit2 != -1 ) + { + s += 3; + *d++ = (char)((digit1 << 4) | digit2); + continue; + } + } + } + *d++ = *s++; + } + + *d = 0; +} + + +bool InitGdiPlus(void) +{ + Gdiplus::GdiplusStartupInput gdiplusStartupInput; + + static const TCHAR errmsg[] = _T("GDI+ not installed.\n") + _T("GDI+ can be downloaded here: http://www.microsoft.com/downloads"); + +#ifdef _MSC_VER + __try +#endif + { + if (g_gdiplusToken == 0 && !gdiPlusFail) + { + Gdiplus::GdiplusStartup(&g_gdiplusToken, &gdiplusStartupInput, NULL); + } + } +#ifdef _MSC_VER + __except ( EXCEPTION_EXECUTE_HANDLER ) + { + gdiPlusFail = true; + ReportError(errmsg); + } +#endif + + return !gdiPlusFail; +} + +void DestroyGdiPlus(void) +{ + if (g_gdiplusToken != 0) + { + Gdiplus::GdiplusShutdown(g_gdiplusToken); +#ifdef _MSC_VER +#if 1200 < _MSC_VER + __FUnloadDelayLoadedDLL2("gdiplus.dll"); +#else + __FUnloadDelayLoadedDLL("gdiplus.dll"); +#endif +#endif + g_gdiplusToken = 0; + } +} + +HANDLE DecodeMetaContact(HANDLE hContact) +{ + if (hContact == NULL) return NULL; + HANDLE hReal = (HANDLE) CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM) hContact, 0); + if (hReal == NULL || hReal == (HANDLE)CALLSERVICE_NOTFOUND) + hReal = hContact; + + return hReal; +} + +bool IsSmileyProto(char* proto) +{ + return proto && (!metaProtoName || strcmp(proto, metaProtoName)) && + (CallProtoService(proto, PS_GETCAPS, PFLAGNUM_1, 0) & (PF1_IM | PF1_CHAT)); +} + +void ReportError(const TCHAR* errmsg) +{ + static const TCHAR title[] = _T("Miranda SmileyAdd"); +/* + + POPUPDATAW pd = {0}; + + + _tcscpy(pd.lpwzContactName, title); + _tcscpy(pd.lpwzText, errmsg); + + pd.iSeconds = -1; + + + bool popupFail = PUAddPopUpW(&pd) != CALLSERVICE_NOTFOUND; + + if (popupFail) +*/ + MessageBox(NULL, errmsg, title, MB_OK | MB_ICONWARNING | MB_TOPMOST); +} + +#pragma warning( disable : 4786 ) +#undef _MT + +#include +#include diff --git a/plugins/SmileyAdd/src/general.h b/plugins/SmileyAdd/src/general.h new file mode 100644 index 0000000000..8cc13c5619 --- /dev/null +++ b/plugins/SmileyAdd/src/general.h @@ -0,0 +1,232 @@ +/* +Miranda SmileyAdd Plugin +Copyright (C) 2005 - 2011 Boris Krasnovskiy +Copyright (C) 2003 - 2004 Rein-Peter de Boer + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation version 2 +of the License. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef _GENERAL_ +#define _GENERAL_ + +#define _HAS_EXCEPTIONS 0 +#define _SECURE_SCL 0 +#define _SECURE_SCL_THROWS 0 +#define __STDC_WANT_SECURE_LIB__ 0 +#define _STRALIGN_USE_SECURE_CRT 0 +#define _NO_EXCEPTIONS + +#include + +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include + +#include "bkstring.h" + +#undef _MT + +#pragma warning( push ) +#pragma warning( disable : 4530 ) +#pragma warning( disable : 4275 ) +#pragma warning( disable : 4390 ) + +#include +#include + +typedef WCPattern _TPattern; +typedef WCMatcher _TMatcher; +#define createTMatcher createWCMatcher + +#pragma warning( pop ) + +#define _MT + +#include "resource.h" + +#pragma warning( push ) +#pragma warning( disable : 4100 ) +#define MIRANDA_VER 0x0A00 +#define NETLIB_NOLOGGING +#define MIRANDA_CUSTOM_LP + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#pragma warning( pop ) + +//globals, defined int main.cpp +extern HINSTANCE g_hInst; +extern char* metaProtoName; + +//some system and NT stuff... +#ifndef OPENFILENAME_SIZE_VERSION_400 +#define OPENFILENAME_SIZE_VERSION_400 sizeof(OPENFILENAME) +#endif + + +#define IDC_SMLBUTTON (WM_USER + 33) + +/////////////////////////////////////////////////// +// +//defines from miranda im sources (undocumented!) +// +#define MI_IDC_LOG 1001 //rich edit +#define MI_IDC_MESSAGE 1002 //edit control +#define MI_IDC_QUOTE 1034 //button control +#define MI_IDC_NAME 1009 //text control +#define MI_IDC_ADD 1070 //Add button. + +#define DM_REMAKELOG (WM_USER + 11) +#define DM_OPTIONSAPPLIED (WM_USER + 14) +#define DM_APPENDTOLOG (WM_USER + 17) + +#define WM_REMAKERICH (WM_USER + 0x3457) + +///////////////////////////////////////////////////// + +#define MAX_SMILEY_LENGTH 96 + +class A2W_SM +{ +public: + wchar_t* m_psz; + + A2W_SM(const char* psz, unsigned nCodePage = CP_ACP) + { + const int nLength = MultiByteToWideChar(nCodePage, 0, psz, -1, NULL, 0); + m_psz = new wchar_t[nLength]; + MultiByteToWideChar(nCodePage, 0, psz, -1, m_psz, nLength); + } + ~A2W_SM() { delete [] m_psz; } + operator wchar_t*() const { return m_psz; } +}; + + +class W2A_SM +{ +public: + char* m_psz; + + W2A_SM(const wchar_t* psz, unsigned nCodePage = CP_ACP) + { + const int nLength = WideCharToMultiByte(nCodePage, 0, psz, -1, NULL, 0, NULL, NULL); + m_psz = new char[nLength]; + WideCharToMultiByte(nCodePage, 0, psz, -1, m_psz, nLength, NULL, NULL); + } + ~W2A_SM() { delete [] m_psz; } + operator char*() const { return m_psz; } +}; + +#define T2A_SM (char*)W2A_SM +#define T2W_SM(p1) (wchar_t*)p1 +#define A2T_SM (wchar_t*)A2W_SM +#define W2T_SM(p1) (TCHAR*)p1 + +template struct SMOBJLIST : public OBJLIST +{ + SMOBJLIST() : OBJLIST(5) {}; + + SMOBJLIST& operator = (const SMOBJLIST& lst) + { + OBJLIST::destroy(); + return operator += (lst); + } + + SMOBJLIST& operator += (const SMOBJLIST& lst) + { + for (int i=0; i& lst) + { + for (int i=0; i::destroy(); + } +}; + +inline unsigned short GetWinVer(void) +{ + unsigned short ver = LOWORD(GetVersion()); + ver = (ver & 0xFF) << 8 | (ver >> 8); + return ver; +} + + +// init functions +void InstallDialogBoxHook(void); +void RemoveDialogBoxHook(void); +int UpdateSrmmDlg(WPARAM wParam, LPARAM lParam); +bool IsOldSrmm(void); + +//functions for general use (defined in general.cpp) +int CalculateTextHeight(HDC hdc, CHARFORMAT2* chf); +const TCHAR* GetImageExt(bkstring &fname); + +HANDLE DecodeMetaContact(HANDLE hContact); +bool IsSmileyProto(char* proto); + +HICON ImageList_GetIconFixed (HIMAGELIST himl, INT i, UINT fStyle); + +void pathToRelative(const bkstring& pSrc, bkstring& pOut); +void pathToAbsolute(const bkstring& pSrc, bkstring& pOut); + +bool InitGdiPlus(void); +void DestroyGdiPlus(void); + +void ReportError(const TCHAR* errmsg); +HICON GetDefaultIcon(bool copy = true); + +void CloseRichCallback(HWND hwnd, bool force); +void CloseRichOwnerCallback(HWND hwnd, bool force); +bool SetRichCallback(HWND hwnd, HANDLE hContact, bool subany, bool subnew); +void SetRichOwnerCallback(HWND hwnd, HWND hwndInput, HWND hwndLog); +void ProcessAllInputAreas(bool restoreText); +void RichEditData_Destroy(void); + +void CloseSmileys(void); +void DestroySmileyBase(void); +void DestroyAniSmileys(void); + +void UrlDecode(char* str); + +#endif diff --git a/plugins/SmileyAdd/src/imagecache.cpp b/plugins/SmileyAdd/src/imagecache.cpp new file mode 100644 index 0000000000..8fdcea9003 --- /dev/null +++ b/plugins/SmileyAdd/src/imagecache.cpp @@ -0,0 +1,775 @@ +/* +Miranda SmileyAdd Plugin +Copyright (C) 2008 - 2011 Boris Krasnovskiy + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation version 2 +of the License. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include "imagecache.h" +#include "options.h" + +typedef BOOL (WINAPI *tAlphaBlend)(HDC, int, int, int, int, HDC, int, int, int, int, BLENDFUNCTION); +static tAlphaBlend pAlphaBlend; + +static FI_INTERFACE *fei; + +static HANDLE g_hMutexIm; +static OBJLIST g_imagecache(25, ImageType::CompareImg); + +static bkstring lastdllname; +static HMODULE lastmodule; +static time_t laststamp; +static UINT_PTR timerId; + +static void CALLBACK timerProc(HWND, UINT, UINT_PTR, DWORD) +{ + WaitForSingleObject(g_hMutexIm, 3000); + const time_t ts = time(NULL) - 10; + if ( lastmodule && ts > laststamp) + { + FreeLibrary(lastmodule); + lastmodule = NULL; + lastdllname.clear(); + } + + for (int i=g_imagecache.getCount(); i--; ) + g_imagecache[i].ProcessTimerTick(ts); + + if (g_imagecache.getCount() == 0) + { + g_imagecache.destroy(); + if (timerId && (timerId+1) && lastmodule == NULL) + { + KillTimer(NULL, timerId); + timerId = 0; + } + } + + ReleaseMutex(g_hMutexIm); +} + + +static void CALLBACK sttMainThreadCallback( PVOID ) +{ + if (timerId == 0xffffffff) + timerId = SetTimer(NULL, 0, 10000, (TIMERPROC)timerProc); +} + + +static HMODULE LoadDll(const bkstring& file) +{ + WaitForSingleObject(g_hMutexIm, 3000); + + if (lastdllname != file) + { + FreeLibrary(lastmodule); + lastdllname = file; + + lastmodule = LoadLibraryEx(file.c_str(), NULL, LOAD_LIBRARY_AS_DATAFILE); + + } + laststamp = time(NULL); + + ReleaseMutex(g_hMutexIm); + return lastmodule; +} + + + +ImageBase::ImageBase(unsigned id) +{ + m_id = id; + m_lRefCount = 1; + m_timestamp = 0; +} + +long ImageBase::AddRef(void) +{ + WaitForSingleObject(g_hMutexIm, 3000); + long cnt = ++m_lRefCount; + ReleaseMutex(g_hMutexIm); + return cnt; +} + +long ImageBase::Release(void) +{ + WaitForSingleObject(g_hMutexIm, 3000); + + long cnt = m_lRefCount; + if (cnt) m_lRefCount = --cnt; + if (cnt == 0) m_timestamp = time(NULL); + + ReleaseMutex(g_hMutexIm); + return cnt; +} + +void ImageBase::ProcessTimerTick(time_t ts) +{ + WaitForSingleObject(g_hMutexIm, 3000); + if (m_lRefCount == 0 && m_timestamp < ts ) + { + if (!g_imagecache.remove(this)) + delete this; + } + ReleaseMutex(g_hMutexIm); +} + +int ImageBase::CompareImg(const ImageBase* p1, const ImageBase* p2) +{ + unsigned id1 = p1->m_id; + unsigned id2 = p2->m_id; + + if (id1 == id2) return 0; + else return id1 < id2 ? -1 : 1; +} + +void ImageBase::Draw(HDC hdc, RECT& rc, bool clip) +{ + HRGN hrgn = NULL; + if (clip) + { + hrgn = CreateRectRgn(rc.left, rc.top, rc.right, rc.bottom); + SelectClipRgn(hdc, hrgn); + } + + SIZE iSize; + GetSize(iSize); + + const int sizeX = rc.right - rc.left; + const int sizeY = rc.bottom - rc.top; + + const int x = rc.left + (sizeX > iSize.cx || clip ? (sizeX - iSize.cx) / 2 : 0); + const int y = rc.top + (sizeY > iSize.cy || clip ? (sizeY - iSize.cy) / 2 : 0); + + const int scaleX = sizeX > iSize.cx || clip ? iSize.cx : sizeX; + const int scaleY = sizeY > iSize.cy || clip ? iSize.cy : sizeY; + + DrawInternal(hdc, x, y, scaleX, scaleY); + + if (clip) + { + SelectClipRgn(hdc, NULL); + DeleteObject(hrgn); + } +} + + +HBITMAP ImageBase::GetBitmap(COLORREF bkgClr, int sizeX, int sizeY) +{ + RECT rc = { 0, 0, sizeX, sizeY }; + + if (sizeX == 0 || sizeY == 0) + { + SIZE iSize; + GetSize(iSize); + + if (sizeX == 0) rc.right = iSize.cx; + if (sizeY == 0) rc.bottom = iSize.cy; + } + + HBRUSH hBkgBrush = CreateSolidBrush(bkgClr); + HDC hdc = GetDC(NULL); + HBITMAP hBmp = CreateCompatibleBitmap(hdc, rc.right, rc.bottom); + HDC hdcMem = CreateCompatibleDC(hdc); + SelectObject(hdcMem, hBmp); + + FillRect(hdcMem, &rc, hBkgBrush); + + Draw(hdcMem, rc, false); + + DeleteDC(hdcMem); + ReleaseDC(NULL, hdc); + DeleteObject(hBkgBrush); + + return hBmp; +} + +int ImageBase::SelectNextFrame(const int frame) +{ + int res = (frame + 1) % GetFrameCount(); + SelectFrame(res); + return res; +} + + + +IconType::IconType(const unsigned id, const bkstring& file, const int index, const IcoTypeEnum type) + : ImageBase(id) +{ + m_SmileyIcon = NULL; + + switch (type) + { + case icoDll: + { + const HMODULE hModule = LoadDll(file); + if (hModule != NULL) + m_SmileyIcon = (HICON) LoadImage(hModule, MAKEINTRESOURCE(-index), IMAGE_ICON, 0, 0, 0); + } + break; + + case icoFile: + m_SmileyIcon = (HICON) LoadImage(NULL, file.c_str(), IMAGE_ICON, 0, 0, LR_LOADFROMFILE); + break; + + default: + ExtractIconEx(file.c_str(), index, NULL, &m_SmileyIcon, 1); + break; + } +} + +IconType::~IconType() +{ + DestroyIcon(m_SmileyIcon); +} + +void IconType::DrawInternal(HDC hdc, int x, int y, int sizeX, int sizeY) +{ + if (m_SmileyIcon != NULL) + DrawIconEx(hdc, x, y, m_SmileyIcon, sizeX, sizeY, 0, NULL, DI_NORMAL); +} + +HICON IconType::GetIcon(void) +{ + return (HICON)CopyImage(m_SmileyIcon, IMAGE_ICON, 0, 0, 0); +} + +void IconType::GetSize(SIZE& size) +{ + if (m_SmileyIcon != NULL) + { + ICONINFO ii; + BITMAP bm; + GetIconInfo(m_SmileyIcon, &ii); + GetObject(ii.hbmColor, sizeof(bm), &bm); + size.cx = bm.bmWidth; + size.cy = bm.bmHeight; + DeleteObject(ii.hbmMask); + DeleteObject(ii.hbmColor); + } +} + + + +ImageListItemType::ImageListItemType(const unsigned id, HIMAGELIST hImList, int index) + : ImageBase(id) +{ + m_index = index; + m_hImList = hImList; +} + +void ImageListItemType::DrawInternal(HDC hdc, int x, int y, int sizeX, int sizeY) +{ + SIZE iSize; + GetSize(iSize); + + if (sizeX >= iSize.cx && sizeY >= iSize.cy) + ImageList_Draw(m_hImList, m_index, hdc, x, y, ILD_TRANSPARENT); + else + { + HICON hIcon = ImageList_GetIconFixed(m_hImList, m_index, ILD_TRANSPARENT); + DrawIconEx(hdc, x, y, hIcon, sizeX, sizeY, 0, NULL, DI_NORMAL); + DestroyIcon(hIcon); + } +} + +HICON ImageListItemType::GetIcon(void) +{ + return ImageList_GetIconFixed(m_hImList, m_index, ILD_TRANSPARENT); +} + +void ImageListItemType::GetSize(SIZE& size) +{ + ImageList_GetIconSize(m_hImList, (int*)&size.cx, (int*)&size.cy); +} + +ImageType::ImageType(const unsigned id, const bkstring& file, IStream* pStream) + : ImageBase(id) +{ + m_bmp = NULL; + m_pPropertyItem = NULL; + m_nCurrentFrame = 0; + m_nFrameCount = 0; + + if (!InitGdiPlus()) return; + + if (pStream) + m_bmp = new Gdiplus::Bitmap(pStream); + else + m_bmp = new Gdiplus::Bitmap(T2W_SM(file.c_str())); + + if (m_bmp->GetLastStatus() != Gdiplus::Ok) + { + delete m_bmp; + m_bmp = NULL; + return; + } + + GUID pageGuid = Gdiplus::FrameDimensionTime; + m_nFrameCount = m_bmp->GetFrameCount(&pageGuid); + + if (IsAnimated()) + { + int nSize = m_bmp->GetPropertyItemSize(PropertyTagFrameDelay); + m_pPropertyItem = (Gdiplus::PropertyItem*) new char[nSize]; + m_bmp->GetPropertyItem(PropertyTagFrameDelay, nSize, m_pPropertyItem); + } +} + +ImageType::ImageType(const unsigned id, const bkstring& file, const int index, const IcoTypeEnum type) + : ImageBase(id) +{ + m_bmp = NULL; + m_pPropertyItem = NULL; + m_nCurrentFrame = 0; + m_nFrameCount = 0; + + if (!InitGdiPlus()) return; + + switch (type) + { + case icoDll: + { + const HMODULE hModule = LoadDll(file); + if (hModule != NULL) + { + HICON hIcon = (HICON) LoadImage(hModule, MAKEINTRESOURCE(-index), IMAGE_ICON, 0, 0, 0); + m_bmp = new Gdiplus::Bitmap(hIcon); + DestroyIcon(hIcon); + } + } + break; + + case icoFile: + m_bmp = new Gdiplus::Bitmap(T2W_SM(file.c_str())); + break; + + default: + HICON hIcon = NULL; + ExtractIconEx(file.c_str(), index, NULL, &hIcon, 1); + m_bmp = new Gdiplus::Bitmap(hIcon); + DestroyIcon(hIcon); + break; + } + + if (m_bmp->GetLastStatus() != Gdiplus::Ok) + { + delete m_bmp; + m_bmp = NULL; + return; + } +} + + +ImageType::~ImageType(void) +{ + if (m_pPropertyItem) delete[] m_pPropertyItem; + if (m_bmp) delete m_bmp; +} + +void ImageType::SelectFrame(int frame) +{ + if ((unsigned)frame >= (unsigned)m_nFrameCount) frame = 0; + if (IsAnimated() && frame != m_nCurrentFrame) + { + m_nCurrentFrame = frame; + GUID pageGuid = Gdiplus::FrameDimensionTime; + m_bmp->SelectActiveFrame(&pageGuid, frame); + } +} + + +void ImageType::DrawInternal(HDC hdc, int x, int y, int sizeX, int sizeY) +{ + if (m_bmp == NULL) return; + + WaitForSingleObject(g_hMutexIm, 3000); + { + Gdiplus::Graphics grp(hdc); +// if (opt.HQScaling) grp.SetInterpolationMode(Gdiplus::InterpolationModeBicubic); + grp.DrawImage(m_bmp, x, y, sizeX, sizeY); + } + ReleaseMutex(g_hMutexIm); +} + +int ImageType::GetFrameDelay(void) const +{ + return ((long*) m_pPropertyItem->value)[m_nCurrentFrame]; +} + +HICON ImageType::GetIcon(void) +{ + if (m_bmp == NULL) return NULL; + + HICON hIcon = NULL; + WaitForSingleObject(g_hMutexIm, 3000); + + m_bmp->GetHICON(&hIcon); + + ReleaseMutex(g_hMutexIm); + return hIcon; +} + + +void ImageType::GetSize(SIZE& size) +{ + if (m_bmp) + { + size.cx = m_bmp->GetWidth(); + size.cy = m_bmp->GetHeight(); + } + else + { + size.cx = 0; + size.cy = 0; + } +} + + +ImageFType::ImageFType(const unsigned id) + : ImageBase(id) +{ + m_bmp = NULL; +} + +ImageFType::ImageFType(const unsigned id, const bkstring& file) + : ImageBase(id) +{ + m_bmp = NULL; + + FREE_IMAGE_FORMAT fif = fei->FI_GetFileTypeT(file.c_str(), 0); + if (fif == FIF_UNKNOWN) + fif = fei->FI_GetFIFFromFilenameT(file.c_str()); + if (fif == FIF_UNKNOWN) return; + + FIBITMAP *dib = fei->FI_LoadT(fif, file.c_str(), 0); + if (dib == NULL) return; + + bool transp = fei->FI_IsTransparent(dib) != 0; + FREE_IMAGE_TYPE imt = fei->FI_GetImageType(dib); + unsigned bpp = fei->FI_GetBPP(dib); + + if (transp && bpp != 32 || imt == FIT_RGBA16) + { + FIBITMAP *tdib = fei->FI_ConvertTo32Bits(dib); + fei->FI_Unload(dib); + dib = tdib; + } + else if (!transp && bpp > 24) + { + FIBITMAP *tdib = fei->FI_ConvertTo24Bits(dib); + fei->FI_Unload(dib); + dib = tdib; + } + + m_bmp = fei->FI_CreateHBITMAPFromDIB(dib); + fei->FI_Unload(dib); + + if (transp) + fei->FI_Premultiply(m_bmp); +} + +ImageFType::~ImageFType() +{ + DeleteObject(m_bmp); +} + +void ImageFType::DrawInternal(HDC hdc, int x, int y, int sizeX, int sizeY) +{ + if (m_bmp == NULL) return; + + HDC hdcImg = CreateCompatibleDC(hdc); + HBITMAP oldBmp = (HBITMAP) SelectObject(hdcImg, m_bmp); + + BITMAP bm; + GetObject(m_bmp, sizeof(bm), &bm); + + if (bm.bmBitsPixel == 32 && pAlphaBlend) + { + BLENDFUNCTION bf = {0}; + bf.SourceConstantAlpha = 255; + bf.AlphaFormat = AC_SRC_ALPHA; + pAlphaBlend(hdc, x, y, sizeX, sizeY, hdcImg, 0, 0, bm.bmWidth, bm.bmHeight, bf); + } + else + { + BitBlt(hdc, x, y, sizeX, sizeY, hdcImg, 0, 0, SRCCOPY); + } + + SelectObject(hdcImg, oldBmp); + DeleteDC(hdcImg); +} + +HICON ImageFType::GetIcon(void) +{ + if (m_bmp == NULL) return NULL; + + HICON hIcon; + + BITMAP bm; + GetObject(m_bmp, sizeof(bm), &bm); + + ICONINFO ii; + ii.fIcon = TRUE; + ii.xHotspot = 0; + ii.yHotspot = 0; + + if (bm.bmBitsPixel == 32 && GetWinVer() < 0x0501) + { + int slen = bm.bmWidth * 4; + int len = bm.bmHeight * slen; + + BYTE* p = (BYTE*)mir_alloc(len); + BYTE* maskBits = (BYTE*)mir_calloc(len); + BYTE* colorBits = (BYTE*)mir_calloc(len); + + GetBitmapBits(m_bmp, len, p); + + for (int y = 0; y < bm.bmHeight; ++y) + { + int shift = y * slen; + BYTE *px = p + shift; + BYTE *color = colorBits + shift; + BYTE *mask = maskBits + shift; + + for (int x = 0; x < bm.bmWidth; ++x) + { + for(int i = 0; i < 4; i++) + { + mask[i] = px[3]; + color[i] = px[i]; + } + + px += 4; + mask += 4; + color += 4; + } + } + + ii.hbmMask = CreateBitmap(bm.bmWidth, bm.bmHeight, 1, 32, maskBits); + ii.hbmColor = CreateBitmap(bm.bmWidth, bm.bmHeight, 1, 32, colorBits); + + hIcon = CreateIconIndirect(&ii); + + DeleteObject(ii.hbmMask); + DeleteObject(ii.hbmColor); + + mir_free(p); + mir_free(maskBits); + mir_free(colorBits); + } + else + { + ii.hbmMask = CreateBitmap(bm.bmWidth, bm.bmHeight, 1, 1, NULL); + ii.hbmColor = m_bmp; + hIcon = CreateIconIndirect(&ii); + DeleteObject(ii.hbmMask); + } + return hIcon; +} + +void ImageFType::GetSize(SIZE& size) +{ + if (m_bmp) + { + BITMAP bm; + GetObject(m_bmp, sizeof(bm), &bm); + size.cx = bm.bmWidth; + size.cy = bm.bmHeight; + } + else + { + size.cx = 0; + size.cy = 0; + } +} +/* +ImageFAniType::ImageFAniType(const unsigned id, const bkstring& file) +: ImageFType(id) +{ + m_fmbmp = NULL; + m_nCurrentFrame = -1; + m_FrameDelay = NULL; + + FREE_IMAGE_FORMAT fif = fei->FI_GetFileTypeT(file.c_str(), 0); + if (fif == FIF_UNKNOWN) + fif = fei->FI_GetFIFFromFilenameT(file.c_str()); + + m_fmbmp = fei->FI_OpenMultiBitmap(fif, T2A_SM(file.c_str()), FALSE, TRUE, TRUE, GIF_PLAYBACK); + if (m_fmbmp == NULL) return; + + m_nFrameCount = fei->FI_GetPageCount(m_fmbmp); + m_bmpl = (HBITMAP*)mir_calloc(m_nFrameCount*sizeof(HBITMAP)); + m_FrameDelay = (int*)mir_calloc(m_nFrameCount*sizeof(int)); + SelectFrame(0); +} + +ImageFAniType::~ImageFAniType() +{ + if (m_fmbmp) fei->FI_CloseMultiBitmap(m_fmbmp, 0); + for (int i=0; i= (unsigned)m_nFrameCount) frame = 0; + if (frame == m_nCurrentFrame) return; + m_nCurrentFrame = frame; + + if (m_bmpl[frame]) + { + m_bmp = m_bmpl[frame]; + return; + } + + FITAG *tag = NULL; + + FIBITMAP *dib = fei->FI_LockPage(m_fmbmp, frame); + if (dib == NULL) + return; + + if (fei->FI_GetMetadata(FIMD_ANIMATION, dib, "FrameTime", &tag)) + m_FrameDelay[frame] = *(LONG *)fei->FI_GetTagValue(tag) / 10; + + m_bmpl[frame] = m_bmp = fei->FI_CreateHBITMAPFromDIB(dib); + + if (fei->FI_IsTransparent(dib)) + fei->FI_Premultiply(m_bmp); + + fei->FI_UnlockPage(m_fmbmp, dib, FALSE); +} +*/ + +#pragma optimize("gt", on) + +// MurmurHash2, by Austin Appleby +unsigned int __fastcall hash( const void * key, unsigned int len ) +{ + // 'm' and 'r' are mixing constants generated offline. + // They're not really 'magic', they just happen to work well. + const unsigned int m = 0x5bd1e995; + const int r = 24; + + // Initialize the hash to a 'random' value + unsigned int h = len; + + // Mix 4 bytes at a time into the hash + const unsigned char * data = (const unsigned char *)key; + + while(len >= 4) + { + unsigned int k = *(unsigned int *)data; + + k *= m; + k ^= k >> r; + k *= m; + + h *= m; + h ^= k; + + data += 4; + len -= 4; + } + + // Handle the last few bytes of the input array + switch(len) + { + case 3: h ^= data[2] << 16; + case 2: h ^= data[1] << 8; + case 1: h ^= data[0]; + h *= m; + }; + + // Do a few final mixes of the hash to ensure the last few + // bytes are well-incorporated. + h ^= h >> 13; + h *= m; + h ^= h >> 15; + + return h; +} +#pragma optimize("", on) + + +void InitImageCache(void) +{ + g_hMutexIm = CreateMutex(NULL, FALSE, NULL); + CallService(MS_IMG_GETINTERFACE, FI_IF_VERSION, (LPARAM) &fei); + + pAlphaBlend = (tAlphaBlend) GetProcAddress(GetModuleHandleA("gdi32"), "GdiAlphaBlend"); + if (pAlphaBlend == NULL) + pAlphaBlend = (tAlphaBlend) GetProcAddress(LoadLibraryA("msimg32"), "AlphaBlend"); +} + +void DestroyImageCache(void) +{ + WaitForSingleObject(g_hMutexIm, 3000); + + if (timerId) KillTimer(NULL, timerId); + if (lastmodule) FreeLibrary(lastmodule); + + g_imagecache.destroy(); + + ReleaseMutex(g_hMutexIm); + CloseHandle(g_hMutexIm); +} + + +ImageBase* AddCacheImage(const bkstring& file, int index) +{ + bkstring tmpfile(file); tmpfile.appendfmt(_T("#%d"), index); + unsigned id = hash(tmpfile.c_str(), (unsigned int)tmpfile.size() * sizeof(TCHAR)); + + WaitForSingleObject(g_hMutexIm, 3000); + + ImageBase srch(id); + ImageBase *img = g_imagecache.find(&srch); + if (img == NULL) + { + bkstring::size_type ind = file.find_last_of('.'); + if (ind == file.npos) return NULL; + bkstring ext = file.substr(ind+1); + + if (ext.comparei(_T("dll")) == 0 || ext.comparei(_T("exe")) == 0) + img = opt.HQScaling ? (ImageBase*)new ImageType(id, file, index, icoDll) : (ImageBase*)new IconType(id, file, index, icoDll); + else if (ext.comparei(_T("ico")) == 0) + img = opt.HQScaling ? (ImageBase*)new ImageType(id, file, 0, icoFile) : (ImageBase*)new IconType(id, file, 0, icoFile); + else if (ext.comparei(_T("icl")) == 0) + img = opt.HQScaling ? (ImageBase*)new ImageType(id, file, index, icoIcl) : (ImageBase*)new IconType(id, file, index, icoIcl); + else if (ext.comparei(_T("gif")) == 0) + img = new ImageType(id, file, NULL); + else if (fei == NULL || ext.comparei(_T("tif")) == 0 || ext.comparei(_T("tiff")) == 0) + img = new ImageType(id, file, NULL); + else + img = opt.HQScaling ? (ImageBase*)new ImageType(id, file, NULL) : (ImageBase*)new ImageFType(id, file); + + g_imagecache.insert(img); + + if (timerId == 0) + { + timerId = 0xffffffff; + CallFunctionAsync(sttMainThreadCallback, NULL); + } + } + else + img->AddRef(); + + ReleaseMutex(g_hMutexIm); + + return img; +} diff --git a/plugins/SmileyAdd/src/imagecache.h b/plugins/SmileyAdd/src/imagecache.h new file mode 100644 index 0000000000..aa13e4981c --- /dev/null +++ b/plugins/SmileyAdd/src/imagecache.h @@ -0,0 +1,166 @@ +/* +Miranda SmileyAdd Plugin +Copyright (C) 2008 - 2011 Boris Krasnovskiy + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation version 2 +of the License. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#ifndef SMILEYADD_IMAGECACHE_H_ +#define SMILEYADD_IMAGECACHE_H_ + +#include "general.h" + + +class ImageBase +{ +protected: + unsigned m_id; + long m_lRefCount; + time_t m_timestamp; + +public: + + ImageBase(unsigned id); + virtual ~ImageBase() {} + + long AddRef(void); + long Release(void); + + void ProcessTimerTick(time_t ts); + + virtual void GetSize(SIZE& /* size */) {}; + virtual int GetFrameCount(void) const { return 0; } + virtual int GetFrameDelay(void) const { return 0; } + virtual HICON GetIcon(void) { return NULL; }; + virtual void DrawInternal(HDC /* dc */, int /* x */, int /* y */, int /* sizeX */, int /* sizeY */) {}; + virtual void SelectFrame(int /* frame */) {} + + bool IsAnimated(void) const { return GetFrameCount() > 1; } + HBITMAP GetBitmap(COLORREF bkgClr, int sizeX, int sizeY); + void Draw(HDC dc, RECT &rc, bool clip); + int SelectNextFrame(const int frame); + + static int CompareImg(const ImageBase* p1, const ImageBase* p2); +}; + + +typedef enum +{ + icoDll, + icoFile, + icoIcl +} +IcoTypeEnum; + + +class IconType : public ImageBase +{ +private: + HICON m_SmileyIcon; + +public: + IconType(const unsigned id, const bkstring& file, const int index, const IcoTypeEnum type); + ~IconType(); + + void DrawInternal(HDC dc, int x, int y, int sizeX, int sizeY); + HICON GetIcon(void); + void GetSize(SIZE& size); +}; + + +class ImageListItemType : public ImageBase +{ +private: + int m_index; + HIMAGELIST m_hImList; + +public: + ImageListItemType(const unsigned id, HIMAGELIST hImList, int index); + + void DrawInternal(HDC dc, int x, int y, int sizeX, int sizeY); + HICON GetIcon(void); + void GetSize(SIZE& size); +}; + + +class ImageType : public ImageBase +{ +private: + int m_nCurrentFrame; + int m_nFrameCount; + + Gdiplus::Bitmap* m_bmp; + Gdiplus::PropertyItem* m_pPropertyItem; + +public: + + ImageType(const unsigned id, const bkstring& file, IStream* pStream); + ImageType(const unsigned id, const bkstring& file, const int index, const IcoTypeEnum type); + ~ImageType(); + + void SelectFrame(int frame); + + void DrawInternal(HDC dc, int x, int y, int sizeX, int sizeY); + HICON GetIcon(void); + void GetSize(SIZE& size); + + int GetFrameDelay(void) const; + int GetFrameCount(void) const { return m_nFrameCount; } +}; + +class ImageFType : public ImageBase +{ +protected: + HBITMAP m_bmp; + +public: + + ImageFType(const unsigned id); + ImageFType(const unsigned id, const bkstring& file); + ~ImageFType(); + + void DrawInternal(HDC dc, int x, int y, int sizeX, int sizeY); + HICON GetIcon(void); + void GetSize(SIZE& size); +}; +/* +class ImageFAniType : public ImageFType +{ +private: + int m_nCurrentFrame; + int m_nFrameCount; + int *m_FrameDelay; + + FIMULTIBITMAP *m_fmbmp; + HBITMAP* m_bmpl; + +public: + + ImageFAniType(const unsigned id, const bkstring& file); + ~ImageFAniType(); + + void SelectFrame(int frame); + + int GetFrameDelay(void) const { return m_FrameDelay[m_nCurrentFrame]; } + int GetFrameCount(void) const { return m_nFrameCount; } +}; +*/ + + +ImageBase* AddCacheImage(const bkstring& file, int index); + +void InitImageCache(void); +void DestroyImageCache(void); + +#endif + diff --git a/plugins/SmileyAdd/src/main.cpp b/plugins/SmileyAdd/src/main.cpp new file mode 100644 index 0000000000..a2deb4399a --- /dev/null +++ b/plugins/SmileyAdd/src/main.cpp @@ -0,0 +1,225 @@ +/* +Miranda SmileyAdd Plugin +Copyright (C) 2005 - 2011 Boris Krasnovskiy All Rights Reserved +Copyright (C) 2003 - 2004 Rein-Peter de Boer + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation version 2 +of the License. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include "smileys.h" +#include "customsmiley.h" +#include "services.h" +#include "options.h" +#include "download.h" +#include "imagecache.h" +#include "version.h" +#include "m_metacontacts.h" + +//globals +HINSTANCE g_hInst; +HANDLE hEvent1, hContactMenuItem; +extern LIST menuHandleArray; + +char* metaProtoName; + + + +//static globals +static HANDLE hHooks[7]; +static HANDLE hService[13]; +int hLangpack; + + +static const PLUGININFOEX pluginInfoEx = +{ + sizeof(PLUGININFOEX), + "SmileyAdd", + __VERSION_DWORD, + "Smiley support for Miranda Instant Messanger", + "Peacow, nightwish, bid, borkra", + "borkra@miranda-im.org", + "Copyright© 2004 - 2012 Boris Krasnovskiy, portions by Rein-Peter de Boer", + "http://nightly.miranda.im/", + // "http://nightly.miranda.im/", + UNICODE_AWARE, + // {BD542BB4-5AE4-4d0e-A435-BA8DBE39607F} + { 0xbd542bb4, 0x5ae4, 0x4d0e, { 0xa4, 0x35, 0xba, 0x8d, 0xbe, 0x39, 0x60, 0x7f } } +}; + +static SKINICONDESC skinDesc = +{ + sizeof(SKINICONDESC), "SmileyAdd", NULL, + "SmileyAdd_ButtonSmiley", NULL, -IDI_SMILINGICON +}; + + +extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD /* mirandaVersion */) +{ + return (PLUGININFOEX*)&pluginInfoEx; +} + +// MirandaInterfaces - returns the protocol interface to the core +extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = {MIID_SMILEY, MIID_LAST}; + +static int ModulesLoaded(WPARAM, LPARAM) +{ + char path[MAX_PATH]; + GetModuleFileNameA(g_hInst, path, MAX_PATH); + + skinDesc.pszDefaultFile = path; + skinDesc.pszDescription = LPGEN("Button Smiley"); + HANDLE hSkinIcon = Skin_AddIcon(&skinDesc); + + INT_PTR temp = CallService(MS_MC_GETPROTOCOLNAME, 0, 0); + metaProtoName = mir_strdup(temp == CALLSERVICE_NOTFOUND ? NULL : (char*)temp); + + CLISTMENUITEM mi = {0}; + mi.cbSize = sizeof(mi); + mi.flags = CMIF_ROOTPOPUP | CMIF_ICONFROMICOLIB; + mi.popupPosition = 2000070050; + mi.position = 2000070050; + mi.icolibItem = hSkinIcon; + mi.pszPopupName = (char*)-1; + mi.pszName = "Assign Smiley Category"; + hContactMenuItem = Menu_AddContactMenuItem(&mi); + + DownloadInit(); + + //install hooks if enabled + InstallDialogBoxHook(); + + g_SmileyCategories.AddAllProtocolsAsCategory(); + g_SmileyCategories.ClearAndLoadAll(); + + return 0; +} + +static int MirandaShutdown(WPARAM, LPARAM) +{ + CloseSmileys(); + return 0; +} + +extern "C" __declspec(dllexport) int Load(void) +{ + + mir_getLP(&pluginInfoEx); + + if (ServiceExists(MS_SMILEYADD_REPLACESMILEYS)) + { + static const TCHAR errmsg[] = _T("Only one instance of SmileyAdd could be executed.\n") + _T("Remove duplicate instances from 'Plugins' directory"); + ReportError(TranslateTS(errmsg)); + + return 1; + } + + char temp[80]; + CallService(MS_SYSTEM_GETVERSIONTEXT, (WPARAM)SIZEOF(temp), (LPARAM)temp); + + + if (strstr(temp, "Unicode") == NULL) + { + ReportError(TranslateT("Please update SmileyAdd to ANSI Version")); + return 1; + } + + + InitImageCache(); + + g_SmileyCategories.SetSmileyPackStore(&g_SmileyPacks); + + opt.Load(); + + // create smiley events + hEvent1 = CreateHookableEvent(ME_SMILEYADD_OPTIONSCHANGED); + + hHooks[0] = HookEvent(ME_SYSTEM_MODULESLOADED, ModulesLoaded); + hHooks[1] = HookEvent(ME_SYSTEM_PRESHUTDOWN, MirandaShutdown); + hHooks[2] = HookEvent(ME_OPT_INITIALISE, SmileysOptionsInitialize); + hHooks[3] = HookEvent(ME_CLIST_PREBUILDCONTACTMENU, RebuildContactMenu); + hHooks[4] = HookEvent(ME_SMILEYADD_OPTIONSCHANGED, UpdateSrmmDlg); + hHooks[5] = HookEvent(ME_PROTO_ACCLISTCHANGED, AccountListChanged); + hHooks[6] = HookEvent(ME_DB_CONTACT_SETTINGCHANGED, DbSettingChanged); + + //create the smiley services + hService[0] = CreateServiceFunction(MS_SMILEYADD_REPLACESMILEYS, ReplaceSmileysCommand); + hService[1] = CreateServiceFunction(MS_SMILEYADD_GETSMILEYICON, GetSmileyIconCommand); + hService[2] = CreateServiceFunction(MS_SMILEYADD_SHOWSELECTION, ShowSmileySelectionCommand); + hService[3] = CreateServiceFunction(MS_SMILEYADD_GETINFO, GetInfoCommand); + hService[4] = CreateServiceFunction(MS_SMILEYADD_GETINFO2, GetInfoCommand2); + hService[5] = CreateServiceFunction(MS_SMILEYADD_PARSE, ParseText); + hService[6] = CreateServiceFunction(MS_SMILEYADD_REGISTERCATEGORY, RegisterPack); + hService[7] = CreateServiceFunction(MS_SMILEYADD_BATCHPARSE, ParseTextBatch); + hService[8] = CreateServiceFunction(MS_SMILEYADD_BATCHFREE, FreeTextBatch); + hService[9] = CreateServiceFunction(MS_SMILEYADD_CUSTOMCATMENU, CustomCatMenu); + hService[10] = CreateServiceFunction(MS_SMILEYADD_RELOAD, ReloadPack); + hService[11] = CreateServiceFunction(MS_SMILEYADD_LOADCONTACTSMILEYS, LoadContactSmileys); + + + hService[12] = CreateServiceFunction(MS_SMILEYADD_PARSEW, ParseTextW); + + + return 0; +} + + +extern "C" __declspec(dllexport) int Unload(void) +{ + int i; + + RemoveDialogBoxHook(); + + for (i=0; i. +*/ + +#include "general.h" +#include "options.h" +#include "smileys.h" +#include "customsmiley.h" +#include "services.h" + +//globals, defined int main.cpp +extern HINSTANCE g_hInst; +extern HANDLE hEvent1; +extern SmileyCategoryListType g_SmileyCategories; +extern SmileyPackListType g_SmileyPacks; + +OptionsType opt; + +#define UM_CHECKSTATECHANGE (WM_USER + 100) + +class OptionsDialogType +{ +private: + HWND m_hwndDialog; + SmileyCategoryListType tmpsmcat; + SmileyPackType smPack; + + void InitDialog(void); + void DestroyDialog(void); + void AddCategory(void); + void ApplyChanges(void); + void UpdateControls(bool force = false); + void SetChanged(void); + bool BrowseForSmileyPacks(int item); + void FilenameChanged(void); + void ShowSmileyPreview(void); + void PopulateSmPackList(void); + void UserAction(HTREEITEM hItem); + long GetSelProto(HTREEITEM hItem = NULL); + +public: + OptionsDialogType(HWND hWnd) { m_hwndDialog = hWnd; } + BOOL DialogProcedure(UINT msg, WPARAM wParam, LPARAM lParam); +}; + +static INT_PTR CALLBACK DlgProcSmileysOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam); + +//Init and de-init functions, called from main +int SmileysOptionsInitialize(WPARAM addInfo, LPARAM) +{ + OPTIONSDIALOGPAGE odp = {0}; + odp.cbSize = sizeof(odp); + odp.position = 910000000; + odp.hInstance = g_hInst; + odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_SMILEYS); + odp.pszTitle = LPGEN("Smileys"); + odp.pszGroup = LPGEN("Customize"); + odp.pfnDlgProc = DlgProcSmileysOptions; + odp.flags = ODPF_BOLDGROUPS; + Options_AddPage(addInfo, &odp); + + return 0; +} + + +// +// dialog procedure for the options dialog. creates or +// retrieves the options class and calls it +// +static INT_PTR CALLBACK DlgProcSmileysOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) +{ + OptionsDialogType* pOD; + INT_PTR Result; + + pOD = (OptionsDialogType*) GetWindowLongPtr(hwndDlg, GWLP_USERDATA); + if (pOD == NULL) + { + pOD = new OptionsDialogType(hwndDlg); + SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR) pOD); + } + + Result = pOD->DialogProcedure(msg, wParam, lParam); + SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, Result); + + if (msg == WM_NCDESTROY) + { + delete pOD; + } + + return Result; +} + + +//OptionsDialog class functions +BOOL OptionsDialogType::DialogProcedure(UINT msg, WPARAM wParam, LPARAM lParam) +{ + BOOL Result = FALSE; + + switch(msg) + { + case WM_INITDIALOG: + InitDialog(); + Result = TRUE; + break; + + case WM_DESTROY: + DestroyDialog(); + break; + + case WM_COMMAND: + switch (LOWORD(wParam)) + { + case IDC_FILENAME: + switch(HIWORD(wParam)) + { + case EN_KILLFOCUS: + FilenameChanged(); + break; + + case EN_CHANGE: + if (GetFocus() == (HWND)lParam) SetChanged(); + break; + } + break; + + case IDC_BROWSE: + if (HIWORD(wParam) == BN_CLICKED) + { + if (BrowseForSmileyPacks(GetSelProto())) + { + UpdateControls(true); + SetChanged(); + } + } + break; + + case IDC_SMLOPTBUTTON: + if (HIWORD(wParam) == BN_CLICKED) ShowSmileyPreview(); + break; + + case IDC_USESTDPACK: + if (HIWORD(wParam) == BN_CLICKED) + { + PopulateSmPackList(); + SetChanged(); + } + break; + + case IDC_PLUGENABLED: + if (HIWORD(wParam) == BN_CLICKED) + { + BOOL en = IsDlgButtonChecked(m_hwndDialog, IDC_PLUGENABLED) == BST_UNCHECKED; + EnableWindow(GetDlgItem(m_hwndDialog, IDC_SMLBUT), en); + SetChanged(); + } + break; + + case IDC_ADDCATEGORY: + if (HIWORD(wParam) == BN_CLICKED) + { + AddCategory(); + } + break; + + case IDC_DELETECATEGORY: + if (HIWORD(wParam) == BN_CLICKED) + { + if (tmpsmcat.DeleteCustomCategory(GetSelProto())) + { + PopulateSmPackList(); + SetChanged(); + } + } + break; + + case IDC_SPACES: + case IDC_SCALETOTEXTHEIGHT: + case IDC_APPENDSPACES: + case IDC_SMLBUT: + case IDC_SCALEALLSMILEYS: + case IDC_IEVIEWSTYLE: + case IDC_ANIMATESEL: + case IDC_ANIMATEDLG: + case IDC_INPUTSMILEYS: + case IDC_DCURSORSMILEY: + case IDC_DISABLECUSTOM: + case IDC_HQSCALING: + if (HIWORD(wParam) == BN_CLICKED) SetChanged(); + break; + + case IDC_SELCLR: + if (HIWORD(wParam) == CPN_COLOURCHANGED) SetChanged(); + break; + + case IDC_MAXCUSTSMSZ: + case IDC_MINSMSZ: + if (HIWORD(wParam) == EN_CHANGE && GetFocus() == (HWND)lParam) SetChanged(); + break; + } + break; + + case UM_CHECKSTATECHANGE: + UserAction((HTREEITEM)lParam); + break; + + case WM_NOTIFY: + switch(((LPNMHDR)lParam)->idFrom) + { + case 0: + switch (((LPNMHDR)lParam)->code) + { + case PSN_APPLY: + ApplyChanges(); + break; + } + break; + + case IDC_CATEGORYLIST: + switch (((LPNMHDR)lParam)->code) + { + case NM_CLICK: + { + TVHITTESTINFO ht = {0}; + + DWORD dwpos = GetMessagePos(); + POINTSTOPOINT(ht.pt, MAKEPOINTS(dwpos)); + MapWindowPoints(HWND_DESKTOP, ((LPNMHDR)lParam)->hwndFrom, &ht.pt, 1); + + TreeView_HitTest(((LPNMHDR)lParam)->hwndFrom, &ht); + if (TVHT_ONITEM & ht.flags) + FilenameChanged(); + if (TVHT_ONITEMSTATEICON & ht.flags) + PostMessage(m_hwndDialog, UM_CHECKSTATECHANGE, 0, (LPARAM)ht.hItem); + } + + case TVN_KEYDOWN: + if (((LPNMTVKEYDOWN) lParam)->wVKey == VK_SPACE) + PostMessage(m_hwndDialog, UM_CHECKSTATECHANGE, 0, + (LPARAM)TreeView_GetSelection(((LPNMHDR)lParam)->hwndFrom)); + break; + + case TVN_SELCHANGEDA: + case TVN_SELCHANGEDW: + { + LPNMTREEVIEW pnmtv = (LPNMTREEVIEW) lParam; + if (pnmtv->itemNew.state & TVIS_SELECTED) + UpdateControls(); + } + break; + } + break; + } + break; + } + + return Result; +} + + +void OptionsDialogType::AddCategory(void) +{ + TCHAR cat[30]; + + GetDlgItemText(m_hwndDialog, IDC_NEWCATEGORY, cat, SIZEOF(cat)); + bkstring catd = cat; + + if (!catd.empty()) + { + tmpsmcat.AddCategory(cat, catd, smcCustom); + + PopulateSmPackList(); + SetChanged(); + } +} + + +void OptionsDialogType::UserAction(HTREEITEM hItem) +{ + HWND hLstView = GetDlgItem(m_hwndDialog, IDC_CATEGORYLIST); + + if (TreeView_GetCheckState(hLstView, hItem)) + { + if (!BrowseForSmileyPacks(GetSelProto(hItem))) + { + TreeView_SetCheckState(hLstView, hItem, TRUE) + } + } + else + { + tmpsmcat.GetSmileyCategory(GetSelProto(hItem))->ClearFilename(); + } + + if (hItem == TreeView_GetSelection(hLstView)) + UpdateControls(); + else + TreeView_SelectItem(hLstView, hItem); + + SetChanged(); +} + + +void OptionsDialogType::SetChanged(void) +{ + SendMessage(GetParent(m_hwndDialog), PSM_CHANGED, 0, 0); +} + + +void OptionsDialogType::UpdateControls(bool force) +{ + const SmileyCategoryType* smc = tmpsmcat.GetSmileyCategory(GetSelProto()); + if (smc == NULL) return; + + const bkstring& smf = smc->GetFilename(); + + SetDlgItemText(m_hwndDialog, IDC_FILENAME, smf.c_str()); + + if (smPack.GetFilename() != smf || force) + { + smPack.LoadSmileyFile(smf, false, true); + } + + HWND hLstView = GetDlgItem(m_hwndDialog, IDC_CATEGORYLIST); + TreeView_SetCheckState(hLstView, TreeView_GetSelection(hLstView), smPack.SmileyCount() != 0); + + SetDlgItemText(m_hwndDialog, IDC_LIBAUTHOR, smPack.GetAuthor().c_str()); + SetDlgItemText(m_hwndDialog, IDC_LIBVERSION, smPack.GetVersion().c_str()); + SetDlgItemText(m_hwndDialog, IDC_LIBNAME, TranslateTS(smPack.GetName().c_str())); +} + + +long OptionsDialogType::GetSelProto(HTREEITEM hItem) +{ + HWND hLstView = GetDlgItem(m_hwndDialog, IDC_CATEGORYLIST); + TVITEM tvi = {0}; + + tvi.mask = TVIF_PARAM; + tvi.hItem = hItem == NULL ? TreeView_GetSelection(hLstView) : hItem; + + TreeView_GetItem(hLstView, &tvi); + + return (long)tvi.lParam; +} + + +void OptionsDialogType::PopulateSmPackList(void) +{ + bool useOne = IsDlgButtonChecked(m_hwndDialog, IDC_USESTDPACK) == BST_UNCHECKED; + + HWND hLstView = GetDlgItem(m_hwndDialog, IDC_CATEGORYLIST); + + TreeView_SelectItem(hLstView, NULL); + TreeView_DeleteAllItems(hLstView); + + TVINSERTSTRUCT tvi = {0}; + tvi.hParent = TVI_ROOT; + tvi.hInsertAfter = TVI_LAST; + tvi.item.mask = TVIF_TEXT | TVIF_IMAGE | TVIF_STATE | TVIF_SELECTEDIMAGE | TVIF_PARAM; + tvi.item.stateMask = TVIS_STATEIMAGEMASK | TVIS_SELECTED; + + SmileyCategoryListType::SmileyCategoryVectorType& smc = *tmpsmcat.GetSmileyCategoryList(); + for (int i = 0; i < smc.getCount(); i++) + { + if (!useOne || !smc[i].IsProto()) + { + tvi.item.pszText = (TCHAR*)smc[i].GetDisplayName().c_str(); + if (!smc[i].IsProto()) + { + tvi.item.iImage = 0; + tvi.item.iSelectedImage = 0; + } + else + { + tvi.item.iImage = i; + tvi.item.iSelectedImage = i; + } + tvi.item.lParam = i; + tvi.item.state = + INDEXTOSTATEIMAGEMASK(smPack.LoadSmileyFile(smc[i].GetFilename(), true, true) ? 2 : 1); + + TreeView_InsertItem(hLstView, &tvi); + + smPack.Clear(); + } + } + TreeView_SelectItem(hLstView, TreeView_GetRoot(hLstView)); +} + +void OptionsDialogType::InitDialog(void) +{ + TranslateDialogDefault(m_hwndDialog); + + CheckDlgButton(m_hwndDialog, IDC_PLUGENABLED, opt.PluginSupportEnabled ? BST_UNCHECKED : BST_CHECKED); + CheckDlgButton(m_hwndDialog, IDC_SPACES, opt.EnforceSpaces ? BST_CHECKED : BST_UNCHECKED); + CheckDlgButton(m_hwndDialog, IDC_SCALETOTEXTHEIGHT, opt.ScaleToTextheight ? BST_CHECKED : BST_UNCHECKED); + CheckDlgButton(m_hwndDialog, IDC_USESTDPACK, opt.UseOneForAll ? BST_UNCHECKED : BST_CHECKED); + CheckDlgButton(m_hwndDialog, IDC_APPENDSPACES, opt.SurroundSmileyWithSpaces ? BST_CHECKED : BST_UNCHECKED); + CheckDlgButton(m_hwndDialog, IDC_SCALEALLSMILEYS, opt.ScaleAllSmileys ? BST_CHECKED : BST_UNCHECKED); + CheckDlgButton(m_hwndDialog, IDC_IEVIEWSTYLE, opt.IEViewStyle ? BST_CHECKED : BST_UNCHECKED); + CheckDlgButton(m_hwndDialog, IDC_ANIMATESEL, opt.AnimateSel ? BST_CHECKED : BST_UNCHECKED); + CheckDlgButton(m_hwndDialog, IDC_ANIMATEDLG, opt.AnimateDlg ? BST_CHECKED : BST_UNCHECKED); + CheckDlgButton(m_hwndDialog, IDC_INPUTSMILEYS, opt.InputSmileys ? BST_CHECKED : BST_UNCHECKED); + CheckDlgButton(m_hwndDialog, IDC_DCURSORSMILEY, opt.DCursorSmiley ? BST_CHECKED : BST_UNCHECKED); + CheckDlgButton(m_hwndDialog, IDC_DISABLECUSTOM, opt.DisableCustom ? BST_CHECKED : BST_UNCHECKED); + CheckDlgButton(m_hwndDialog, IDC_HQSCALING, opt.HQScaling ? BST_CHECKED : BST_UNCHECKED); + + SendDlgItemMessage(m_hwndDialog, IDC_SMLBUT, CB_ADDSTRING, 0, (LPARAM) TranslateT("Off")); + SendDlgItemMessage(m_hwndDialog, IDC_SMLBUT, CB_ADDSTRING, 0, (LPARAM) TranslateT("Top")); + + if (IsOldSrmm()) + SendDlgItemMessage(m_hwndDialog, IDC_SMLBUT, CB_ADDSTRING, 0, (LPARAM) TranslateT("Bottom")); + + SendDlgItemMessage(m_hwndDialog, IDC_SMLBUT, CB_SETCURSEL, opt.ButtonStatus, 0); + EnableWindow(GetDlgItem(m_hwndDialog, IDC_SMLBUT), opt.PluginSupportEnabled); + + SendDlgItemMessage(m_hwndDialog, IDC_MAXCUSTSPIN, UDM_SETRANGE32, 0, 99); + SendDlgItemMessage(m_hwndDialog, IDC_MAXCUSTSPIN, UDM_SETPOS, 0, opt.MaxCustomSmileySize); + SendDlgItemMessage(m_hwndDialog, IDC_MAXCUSTSMSZ, EM_LIMITTEXT, 2, 0); + + SendDlgItemMessage(m_hwndDialog, IDC_MINSPIN, UDM_SETRANGE32, 0, 99); + SendDlgItemMessage(m_hwndDialog, IDC_MINSPIN, UDM_SETPOS, 0, opt.MinSmileySize); + SendDlgItemMessage(m_hwndDialog, IDC_MINSMSZ, EM_LIMITTEXT, 2, 0); + + SendDlgItemMessage(m_hwndDialog, IDC_SELCLR, CPM_SETCOLOUR, 0, opt.SelWndBkgClr); + SendDlgItemMessage(m_hwndDialog, IDC_SELCLR, CPM_SETDEFAULTCOLOUR, 0, GetSysColor(COLOR_WINDOW)); + + // Create and populate image list + HIMAGELIST hImList = ImageList_Create(GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), + ILC_MASK | ILC_COLOR32, g_SmileyCategories.NumberOfSmileyCategories(), 0); + + tmpsmcat = g_SmileyCategories; + + SmileyCategoryListType::SmileyCategoryVectorType& smc = *g_SmileyCategories.GetSmileyCategoryList(); + for (int i = 0; i < smc.getCount(); i++) + { + HICON hIcon = NULL; + if (smc[i].IsProto()) + { + hIcon=(HICON)CallProtoService(T2A_SM(smc[i].GetName().c_str()), PS_LOADICON, + PLI_PROTOCOL | PLIF_SMALL, 0); + if (hIcon == NULL || (INT_PTR)hIcon == CALLSERVICE_NOTFOUND) + { + hIcon=(HICON)CallProtoService(T2A_SM(smc[i].GetName().c_str()), PS_LOADICON, PLI_PROTOCOL, 0); + } + } + if (hIcon == NULL || hIcon == (HICON)CALLSERVICE_NOTFOUND) + hIcon = GetDefaultIcon(); + + ImageList_AddIcon(hImList, hIcon); + DestroyIcon(hIcon); + } + + HWND hLstView = GetDlgItem(m_hwndDialog, IDC_CATEGORYLIST); + TreeView_SetImageList(hLstView, hImList, TVSIL_NORMAL); + + PopulateSmPackList(); +} + +void OptionsDialogType::DestroyDialog(void) +{ + HWND hLstView = GetDlgItem(m_hwndDialog, IDC_CATEGORYLIST); + HIMAGELIST hImList = TreeView_SetImageList(hLstView, NULL, TVSIL_NORMAL); + ImageList_Destroy(hImList); +} + + +void OptionsDialogType::ApplyChanges(void) +{ + ProcessAllInputAreas(true); + CloseSmileys(); + + opt.PluginSupportEnabled = IsDlgButtonChecked(m_hwndDialog, IDC_PLUGENABLED) == BST_UNCHECKED; + opt.EnforceSpaces = IsDlgButtonChecked(m_hwndDialog, IDC_SPACES) == BST_CHECKED; + opt.ScaleToTextheight = IsDlgButtonChecked(m_hwndDialog, IDC_SCALETOTEXTHEIGHT) == BST_CHECKED; + opt.UseOneForAll = IsDlgButtonChecked(m_hwndDialog, IDC_USESTDPACK) == BST_UNCHECKED; + opt.SurroundSmileyWithSpaces = IsDlgButtonChecked(m_hwndDialog, IDC_APPENDSPACES) == BST_CHECKED; + opt.ScaleAllSmileys = IsDlgButtonChecked(m_hwndDialog, IDC_SCALEALLSMILEYS) == BST_CHECKED; + opt.IEViewStyle = IsDlgButtonChecked(m_hwndDialog, IDC_IEVIEWSTYLE) == BST_CHECKED; + opt.AnimateSel = IsDlgButtonChecked(m_hwndDialog, IDC_ANIMATESEL) == BST_CHECKED; + opt.AnimateDlg = IsDlgButtonChecked(m_hwndDialog, IDC_ANIMATEDLG) == BST_CHECKED; + opt.InputSmileys = IsDlgButtonChecked(m_hwndDialog, IDC_INPUTSMILEYS) == BST_CHECKED; + opt.DCursorSmiley = IsDlgButtonChecked(m_hwndDialog, IDC_DCURSORSMILEY) == BST_CHECKED; + opt.DisableCustom = IsDlgButtonChecked(m_hwndDialog, IDC_DISABLECUSTOM) == BST_CHECKED; + opt.HQScaling = IsDlgButtonChecked(m_hwndDialog, IDC_HQSCALING) == BST_CHECKED; + + opt.ButtonStatus = (unsigned)SendDlgItemMessage(m_hwndDialog, IDC_SMLBUT, CB_GETCURSEL, 0, 0); + opt.SelWndBkgClr = (unsigned)SendDlgItemMessage(m_hwndDialog, IDC_SELCLR, CPM_GETCOLOUR, 0, 0); + opt.MaxCustomSmileySize = GetDlgItemInt(m_hwndDialog, IDC_MAXCUSTSMSZ, NULL, FALSE); + opt.MinSmileySize = GetDlgItemInt(m_hwndDialog, IDC_MINSMSZ, NULL, FALSE); + + opt.Save(); + + // Cleanup database + SmileyCategoryListType::SmileyCategoryVectorType& smc = *g_SmileyCategories.GetSmileyCategoryList(); + for (int i = 0; i < smc.getCount(); i++) + { + if (tmpsmcat.GetSmileyCategory(smc[i].GetName()) == NULL) + { + bkstring empty; + opt.WritePackFileName(empty, smc[i].GetName()); + } + } + + g_SmileyCategories = tmpsmcat; + g_SmileyCategories.SaveSettings(); + g_SmileyCategories.ClearAndLoadAll(); + + smPack.LoadSmileyFile(tmpsmcat.GetSmileyCategory(GetSelProto())->GetFilename(), false); + + NotifyEventHooks(hEvent1, 0, 0); + ProcessAllInputAreas(false); +} + +bool OptionsDialogType::BrowseForSmileyPacks(int item) +{ + OPENFILENAME ofn = {0}; + + TCHAR filename[MAX_PATH] = _T(""); + ofn.lpstrFile = filename; + ofn.nMaxFile = SIZEOF(filename); + + bkstring inidir; + SmileyCategoryType* smc = tmpsmcat.GetSmileyCategory(item); + if (smc->GetFilename().empty()) + { + pathToAbsolute(_T("Smileys"), inidir); + } + else + { + pathToAbsolute(smc->GetFilename(), inidir); + inidir.erase(inidir.find_last_of('\\')); + } + + ofn.lpstrInitialDir = inidir.c_str(); + ofn.lStructSize = OPENFILENAME_SIZE_VERSION_400; + ofn.hwndOwner = m_hwndDialog; + + TCHAR filter[512], *pfilter; + _tcscpy(filter, TranslateT("Smiley Packs")); + lstrcat(filter, _T(" (*.msl;*.asl;*.xep)")); + pfilter = filter + _tcslen(filter) + 1; + _tcscpy(pfilter, _T("*.msl;*.asl;*.xep")); + pfilter = pfilter + _tcslen(pfilter) + 1; + _tcscpy(pfilter, TranslateT("All Files")); + lstrcat(pfilter, _T(" (*.*)")); + pfilter = pfilter + _tcslen(pfilter) + 1; + _tcscpy(pfilter, _T("*.*")); + pfilter = pfilter + _tcslen(pfilter) + 1; + *pfilter = '\0'; + ofn.lpstrFilter = filter; + + ofn.Flags = OFN_PATHMUSTEXIST | OFN_FILEMUSTEXIST | OFN_HIDEREADONLY | OFN_READONLY | + OFN_EXPLORER | OFN_LONGNAMES | OFN_NOCHANGEDIR; + ofn.lpstrDefExt = _T("msl"); + + if (GetOpenFileName(&ofn)) + { + bkstring relpath; + pathToRelative(filename, relpath); + smc->SetFilename(relpath); + + return true; + } + + return false; +} + +void OptionsDialogType::FilenameChanged(void) +{ + TCHAR str[MAX_PATH]; + GetDlgItemText(m_hwndDialog, IDC_FILENAME, str, SIZEOF(str)); + + SmileyCategoryType* smc = tmpsmcat.GetSmileyCategory(GetSelProto()); + if (smc->GetFilename() != str) + { + bkstring temp(str); + smc->SetFilename(temp); + UpdateControls(); + } +} + +void OptionsDialogType::ShowSmileyPreview(void) +{ + RECT rect; + GetWindowRect(GetDlgItem(m_hwndDialog, IDC_SMLOPTBUTTON), &rect); + + SmileyToolWindowParam *stwp = new SmileyToolWindowParam; + stwp->pSmileyPack = &smPack; + stwp->hWndParent = m_hwndDialog; + stwp->hWndTarget = NULL; + stwp->targetMessage = 0; + stwp->targetWParam = 0; + stwp->xPosition = rect.left; + stwp->yPosition = rect.bottom + 4; + stwp->direction = 1; + stwp->hContact = NULL; + + mir_forkthread(SmileyToolThread, stwp); +} + + +void OptionsType::Save(void) +{ + DBWriteContactSettingByte(NULL, "SmileyAdd", "PluginSupportEnabled", PluginSupportEnabled); + DBWriteContactSettingByte(NULL, "SmileyAdd", "EnforceSpaces", EnforceSpaces); + DBWriteContactSettingByte(NULL, "SmileyAdd", "ScaleToTextheight", ScaleToTextheight); + DBWriteContactSettingByte(NULL, "SmileyAdd", "UseOneForAll", UseOneForAll); + DBWriteContactSettingByte(NULL, "SmileyAdd", "SurroundSmileyWithSpaces", SurroundSmileyWithSpaces); + DBWriteContactSettingByte(NULL, "SmileyAdd", "ScaleAllSmileys", ScaleAllSmileys); + DBWriteContactSettingByte(NULL, "SmileyAdd", "IEViewStyle", IEViewStyle); + DBWriteContactSettingByte(NULL, "SmileyAdd", "AnimateSel", AnimateSel); + DBWriteContactSettingByte(NULL, "SmileyAdd", "AnimateDlg", AnimateDlg); + DBWriteContactSettingByte(NULL, "SmileyAdd", "InputSmileys", InputSmileys); + DBWriteContactSettingByte(NULL, "SmileyAdd", "DCursorSmiley", DCursorSmiley); + DBWriteContactSettingByte(NULL, "SmileyAdd", "DisableCustom", DisableCustom); + DBWriteContactSettingByte(NULL, "SmileyAdd", "HQScaling", HQScaling); + DBWriteContactSettingByte(NULL, "SmileyAdd", "ButtonStatus", (BYTE)ButtonStatus); + DBWriteContactSettingDword(NULL, "SmileyAdd", "SelWndBkgClr", SelWndBkgClr); + DBWriteContactSettingDword(NULL, "SmileyAdd", "MaxCustomSmileySize", MaxCustomSmileySize); + DBWriteContactSettingDword(NULL, "SmileyAdd", "MinSmileySize", MinSmileySize); +} + + +void OptionsType::Load(void) +{ + PluginSupportEnabled = DBGetContactSettingByte(NULL, "SmileyAdd", "PluginSupportEnabled", TRUE) != 0; + EnforceSpaces = DBGetContactSettingByte(NULL, "SmileyAdd", "EnforceSpaces", FALSE) != 0; + ScaleToTextheight = DBGetContactSettingByte(NULL, "SmileyAdd", "ScaleToTextheight", FALSE) != 0; + UseOneForAll = DBGetContactSettingByte(NULL, "SmileyAdd", "UseOneForAll", TRUE) != 0; + SurroundSmileyWithSpaces = + DBGetContactSettingByte(NULL, "SmileyAdd", "SurroundSmileyWithSpaces", FALSE) != 0; + ScaleAllSmileys = DBGetContactSettingByte(NULL, "SmileyAdd", "ScaleAllSmileys", FALSE) != 0; + IEViewStyle = DBGetContactSettingByte(NULL, "SmileyAdd", "IEViewStyle", FALSE) != 0; + AnimateSel = DBGetContactSettingByte(NULL, "SmileyAdd", "AnimateSel", TRUE) != 0; + AnimateDlg = DBGetContactSettingByte(NULL, "SmileyAdd", "AnimateDlg", TRUE) != 0; + InputSmileys = DBGetContactSettingByte(NULL, "SmileyAdd", "InputSmileys", TRUE) != 0; + DCursorSmiley = DBGetContactSettingByte(NULL, "SmileyAdd", "DCursorSmiley", FALSE) != 0; + DisableCustom = DBGetContactSettingByte(NULL, "SmileyAdd", "DisableCustom", FALSE) != 0; + HQScaling = DBGetContactSettingByte(NULL, "SmileyAdd", "HQScaling", FALSE) != 0; + + ButtonStatus = DBGetContactSettingByte(NULL, "SmileyAdd", "ButtonStatus", 1); + SelWndBkgClr = DBGetContactSettingDword(NULL, "SmileyAdd", "SelWndBkgClr", GetSysColor(COLOR_WINDOW)); + MaxCustomSmileySize = DBGetContactSettingDword(NULL, "SmileyAdd", "MaxCustomSmileySize", 0); + MinSmileySize = DBGetContactSettingDword(NULL, "SmileyAdd", "MinSmileySize", 0); +} + + +void OptionsType::ReadPackFileName(bkstring& filename, const bkstring& name, + const bkstring& defaultFilename) +{ + DBVARIANT dbv; + bkstring settingKey = name + _T("-filename"); + + INT_PTR res = DBGetContactSettingTString(NULL, "SmileyAdd", T2A_SM(settingKey.c_str()), &dbv); + if (res == 0) + { + filename = dbv.ptszVal; + DBFreeVariant(&dbv); + } + else + filename = defaultFilename; +} + + +void OptionsType::WritePackFileName(const bkstring& filename, const bkstring& name) +{ + bkstring settingKey = name + _T("-filename"); + DBWriteContactSettingTString(NULL, "SmileyAdd", T2A_SM(settingKey.c_str()), + filename.c_str()); +} + + +void OptionsType::ReadCustomCategories(bkstring& cats) +{ + DBVARIANT dbv; + + INT_PTR res = DBGetContactSettingTString(NULL, "SmileyAdd", "CustomCategories", &dbv); + if (res == 0) + { + cats = dbv.ptszVal; + DBFreeVariant(&dbv); + } +} + + +void OptionsType::WriteCustomCategories(const bkstring& cats) +{ + if (cats.empty()) + DBDeleteContactSetting(NULL, "SmileyAdd", "CustomCategories"); + else + DBWriteContactSettingTString(NULL, "SmileyAdd", "CustomCategories", cats.c_str()); +} + + +void OptionsType::ReadContactCategory(HANDLE hContact, bkstring& cats) +{ + DBVARIANT dbv; + + INT_PTR res = DBGetContactSettingTString(hContact, "SmileyAdd", "CustomCategory", &dbv); + if (res == 0) + { + cats = dbv.ptszVal; + DBFreeVariant(&dbv); + } +} + + +void OptionsType::WriteContactCategory(HANDLE hContact, const bkstring& cats) +{ + if (cats.empty()) + DBDeleteContactSetting(hContact, "SmileyAdd", "CustomCategory"); + else + DBWriteContactSettingTString(hContact, "SmileyAdd", "CustomCategory", cats.c_str()); +} diff --git a/plugins/SmileyAdd/src/options.h b/plugins/SmileyAdd/src/options.h new file mode 100644 index 0000000000..3b83b0dc8f --- /dev/null +++ b/plugins/SmileyAdd/src/options.h @@ -0,0 +1,60 @@ +/* +Miranda SmileyAdd Plugin +Copyright (C) 2005 - 2011 Boris Krasnovskiy +Copyright (C) 2003 - 2004 Rein-Peter de Boer + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation version 2 +of the License. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef SMILEYADD_OPTIONS_H_ +#define SMILEYADD_OPTIONS_H_ + +int SmileysOptionsInitialize(WPARAM wParam, LPARAM lParam); + +class OptionsType +{ +public: + bool PluginSupportEnabled; + bool EnforceSpaces; + bool ScaleToTextheight; + bool UseOneForAll; + bool SurroundSmileyWithSpaces; + bool ScaleAllSmileys; + bool IEViewStyle; + bool AnimateSel; + bool AnimateDlg; + bool InputSmileys; + bool DCursorSmiley; + bool DisableCustom; + bool HQScaling; + unsigned ButtonStatus; + unsigned SelWndBkgClr; + unsigned MaxCustomSmileySize; + unsigned MinSmileySize; + + void Load(void); + void Save(void); + static void ReadPackFileName(bkstring& filename, const bkstring& name, + const bkstring& defaultFilename); + static void ReadCustomCategories(bkstring& cats); + static void ReadContactCategory(HANDLE hContact, bkstring& cats); + static void WritePackFileName(const bkstring& filename, const bkstring& name); + static void WriteCustomCategories(const bkstring& cats); + static void WriteContactCategory(HANDLE hContact, const bkstring& cats); +}; + +extern OptionsType opt; + +#endif // SMILEYADD_OPTIONS_H_ + diff --git a/plugins/SmileyAdd/src/regexp/Matcher.cpp b/plugins/SmileyAdd/src/regexp/Matcher.cpp new file mode 100644 index 0000000000..ebd1f57850 --- /dev/null +++ b/plugins/SmileyAdd/src/regexp/Matcher.cpp @@ -0,0 +1,178 @@ +#include +#include + +const int Matcher::MATCH_ENTIRE_STRING = 0x01; + +/* + Detailed documentation is provided in this class' header file + + @author Jeffery Stuart + @since November 2004 + @version 1.07.00 +*/ + +Matcher::Matcher(Pattern * pattern, const bkstring & text) +{ + pat = pattern; + str = &text; + gc = pattern->groupCount; + ncgc = -pattern->nonCapGroupCount; + flags = 0; + matchedSomething = false; + starts = new int[gc + ncgc]; + ends = new int[gc + ncgc]; + groups = new int[gc + ncgc]; + groupPos = new int[gc + ncgc]; + groupIndeces = new int[gc + ncgc]; + starts = starts + ncgc; + ends = ends + ncgc; + groups = groups + ncgc; + groupPos = groupPos + ncgc; + groupIndeces = groupIndeces + ncgc; + for (int i = 0; i < gc; ++i) starts[i] = ends[i] = 0; +} +Matcher::~Matcher() +{ + delete [] (starts - ncgc); + delete [] (ends - ncgc); + delete [] (groups - ncgc); + delete [] (groupIndeces - ncgc); + delete [] (groupPos - ncgc); +} +void Matcher::clearGroups() +{ + int i; + lm = 0; + for (i = 0; i < gc; ++i) groups[i] = starts[i] = ends[i] = -1; + for (i = 1; i <= ncgc; ++i) groups[0 - i] = -1; +} +bkstring Matcher::replaceWithGroups(const bkstring & str) +{ + bkstring ret = ""; + + bkstring t = str; + while (t.size() > 0) + { + if (t[0] == '\\') + { + t.erase(0, 1); + if (t.size() == 0) + { + ret += "\\"; + } + else if (t[0] < '0' || t[0] > '9') + { + ret += t[0]; + t.erase(0, 1); + } + else + { + int gn = 0; + while (t.size() > 0 && t[0] >= '0' && t[0] <= '9') + { + gn = gn * 10 + (t[0] - '0'); + t.erase(0, 1); + } + ret += getGroup(gn); + } + } + else + { + ret += t[0]; + t.erase(0, 1); + } + } + + return ret; +} +unsigned long Matcher::getFlags() const +{ + return flags; +} +const bkstring& Matcher::getText() const +{ + return *str; +} + +bool Matcher::matches() +{ + flags = MATCH_ENTIRE_STRING; + matchedSomething = false; + clearGroups(); + lm = 0; + return pat->head->match(*str, this, 0) == (int)str->size(); +} +bool Matcher::findFirstMatch() +{ + starts[0] = 0; + flags = 0; + clearGroups(); + start = 0; + lm = 0; + ends[0] = pat->head->match(*str, this, 0); + if (ends[0] >= 0) + { + matchedSomething = true; + return 1; + } + return 0; +} +bool Matcher::findNextMatch() +{ + int s = starts[0], e = ends[0]; + + if (!matchedSomething) return findFirstMatch(); + if (s == e) ++e; + flags = 0; + clearGroups(); + + starts[0] = e; + if (e >= (int)str->size()) return 0; + start = e; + lm = e; + ends[0] = pat->head->match(*str, this, e); + return ends[0] >= 0; +} +std::vector Matcher::findAll() +{ + std::vector ret; + reset(); + while (findNextMatch()) + { + ret.push_back(getGroup()); + } + return ret; +} + +void Matcher::reset() +{ + lm = 0; + clearGroups(); + matchedSomething = false; +} + +int Matcher::getStartingIndex(const int groupNum) const +{ + if (groupNum < 0 || groupNum >= gc) return -1; + return starts[groupNum]; +} +int Matcher::getEndingIndex(const int groupNum) const +{ + if (groupNum < 0 || groupNum >= gc) return -1; + return ends[groupNum]; +} +bkstring Matcher::getGroup(const int groupNum) const +{ + if (groupNum < 0 || groupNum >= gc) return ""; + if (starts[groupNum] < 0 || ends[groupNum] < 0) return ""; + return str->substr(starts[groupNum], ends[groupNum] - starts[groupNum]); +} +std::vector Matcher::getGroups(const bool includeGroupZero) const +{ + int i, start = (includeGroupZero ? 0 : 1); + std::vector ret; + + for (i = start; i < gc; ++i) ret.push_back(getGroup(i)); + return ret; +} + diff --git a/plugins/SmileyAdd/src/regexp/Matcher.h b/plugins/SmileyAdd/src/regexp/Matcher.h new file mode 100644 index 0000000000..621184d8c2 --- /dev/null +++ b/plugins/SmileyAdd/src/regexp/Matcher.h @@ -0,0 +1,248 @@ +#ifndef __MATCHER_H__ +#define __MATCHER_H__ + +#include "bkstring.h" +#include + +class Vector; +class NFANode; +class NFAStartNode; +class NFAEndNode; +class NFAGroupHeadNode; +class NFAGroupLoopNode; +class NFAGroupLoopPrologueNode; +class NFAGroupTailNode; +class NFALookBehindNode; +class NFAStartOfLineNode; +class NFAEndOfLineNode; +class NFAEndOfMatchNode; +class NFAReferenceNode; +class Pattern; + +/** + A matcher is a non thread-safe object used to scan strings using a given + {@link Pattern Pattern} object. Using a Matcher is the preferred + method for scanning strings. Matchers are not thread-safe. Matchers require + very little dynamic memory, hence one is encouraged to create several + instances of a matcher when necessary as opposed to sharing a single instance + of a matcher. +

+ The most common methods needed by the matcher are matches, + findNextMatch, and getGroup. matches + and findNextMatch both return success or failure, and further + details can be gathered from their documentation. +

+ Unlike Java's Matcher, this class allows you to change the string + you are matching against. This provides a small optimization, since you no + longer need multiple matchers for a single pattern in a single thread. +

+ This class also provides an extremely handy method for replacing text with + captured data via the replaceWithGroups method. A typical + invocation looks like: +

+  char buf[10000];
+  bkstring str = "\\5 (user name \\1) uses \\7 for his/her shell and \\6 is their home directory";
+  FILE * fp = fopen("/etc/passwd", "r");
+  Pattern::registerPattern("entry", "[^:]+");
+  Pattern * p = Pattern::compile("^({entry}):({entry}):({entry}):({entry}):({entry}):({entry}):({entry})$",
+                                 Pattern::MULTILINE_MATCHING | Pattern::UNIX_LINE_MODE);
+  Matcher * m = p->createMatcher("");
+  while (fgets(buf, 9999, fp))
+  {
+    m->setString(buf);
+    if (m->matches())
+    {
+      printf("%s\n", m->replaceWithGroups(str).c_str());
+    }
+  }
+  fclose(fp);
+
+  
+ Calling any of the following functions before first calling + matches, findFirstMatch, or + findNextMatch results in undefined behavior and may cause your + program to crash. + +
    +
  • replaceWithGroups +
  • getStartingIndex
  • +
  • getEndingIndex
  • +
  • getGroup
  • +
  • getGroups
  • +
+
+

+ The function findFirstMatch will attempt to find the first match + in the input string. The same results can be obtained by first calling + reset followed by findNextMatch. +

+ To eliminate the necessity of looping through a string to find all the + matching substrings, findAll was created. The function will find + all matching substrings and return them in a vector. If you need + to examine specific capture groups within the substrings, then this method + should not be used. + + @author Jeffery Stuart + @since March 2003, Stable Since November 2004 + @version 1.07.00 + @memo Mutable object used on instances of a Pattern class + */ +class Matcher +{ + friend class NFANode; + friend class NFAStartNode; + friend class NFAEndNode; + friend class NFAGroupHeadNode; + friend class NFAGroupLoopNode; + friend class NFAGroupLoopPrologueNode; + friend class NFAGroupTailNode; + friend class NFALookBehindNode; + friend class NFAStartOfLineNode; + friend class NFAEndOfLineNode; + friend class NFAEndOfMatchNode; + friend class NFAReferenceNode; + friend class Pattern; + private: + /** + Creates a new matcher object against text using + pattern. + + @param pattern The pattern with which to search + @param text The text in which to search + */ + Matcher(Pattern * pattern, const bkstring & text); + protected: + /// The pattern we use to match + Pattern * pat; + /// The string in which we are matching + const bkstring* str; + /// The starting point of our match + int start; + /// An array of the starting positions for each group + int * starts; + /// An array of the ending positions for each group + int * ends; + /// An array of private data used by NFANodes during matching + int * groups; + /// An array of private data used by NFANodes during matching + int * groupIndeces; + /// An array of private data used by NFANodes during matching + int * groupPos; + /// The ending index of the last match + int lm; + /// The number of capturing groups we have + int gc; + /// The number of non-capturing groups we havew + int ncgc; + /// Whether or not we have matched something (used only by findFirstMatch and findNextMatch) + int matchedSomething; + /// The flags with which we were made + unsigned long flags; + /// Called by reset to clear the group arrays + void clearGroups(); + public: + /// Used internally by match to signify we want the entire string matched + const static int MATCH_ENTIRE_STRING; + public: + /// Cleans up the dynamic memory used by this matcher + ~Matcher(); + /** + Replaces the contents of str with the appropriate captured + text. str should have at least one back reference, otherwise + this function does nothing. + @param str The string in which to replace text + @return A string with all backreferences appropriately replaced + */ + bkstring replaceWithGroups(const bkstring & str); + /** + The flags currently being used by the matcher. + @return Zero + */ + unsigned long getFlags() const; + /** + The text being searched by the matcher. + @return the text being searched by the matcher. + */ + const bkstring& getText() const; + + /** + Scans the string from start to finish for a match. The entire string must + match for this function to return success. Group variables are + appropriately set and can be queried after this function returns. + + @return Success if and only if the entire string matches the pattern + */ + bool matches(); + /** + Scans the string for the first substring matching the pattern. The entire + string does not necessarily have to match for this function to return + success. Group variables are appropriately set and can be queried after + this function returns. + + @return Success if any substring matches the specified pattern + */ + bool findFirstMatch(); + /** + Scans the string for the next substring matching the pattern. If no calls + have been made to findFirstMatch of findNextMatch since the last call to + reset, matches, or setString, then this function's behavior results to + that of findFirstMatch. + + @return Success if another substring can be found that matches the pattern + */ + bool findNextMatch(); + /** + Returns a vector of every substring in order which matches the given + pattern. + + @return Every substring in order which matches the given pattern + */ + std::vector findAll(); + /** + Resets the internal state of the matcher + */ + void reset(); + /** + Same as getText. Left n for backwards compatibilty with old source code + @return Returns the string that is currently being used for matching + */ + inline const bkstring& getString() const { return *str; } + /** + Sets the string to scan + @param newStr The string to scan for subsequent matches + */ + inline void setString(const bkstring & newStr) { str = &newStr; reset(); } + + /** + Returns the starting index of the specified group. + @param groupNum The group to query + @return The starting index of the group if it was matched, -1 for an + invalid group or if the group was not matched + */ + int getStartingIndex(const int groupNum = 0) const; + /** + Returns the ending index of the specified group. + @param groupNum The group to query + @return The ending index of the group if it was matched, -1 for an + invalid group or if the group was not matched + */ + int getEndingIndex(const int groupNum = 0) const; + /** + Returns the specified group. An empty string ("") does not necessarily + mean the group was not matched. A group such as (a*b?) could be matched by + a zero length. If an empty string is returned, getStartingIndex can be + called to determine if the group was actually matched. + @param groupNum The group to query + @return The text of the group + */ + bkstring getGroup(const int groupNum = 0) const; + /** + Returns every capture group in a vector + + @param includeGroupZero Whether or not include capture group zero + @return Every capture group + */ + std::vector getGroups(const bool includeGroupZero = 0) const; +}; + +#endif diff --git a/plugins/SmileyAdd/src/regexp/Pattern.cpp b/plugins/SmileyAdd/src/regexp/Pattern.cpp new file mode 100644 index 0000000000..4487dddd4b --- /dev/null +++ b/plugins/SmileyAdd/src/regexp/Pattern.cpp @@ -0,0 +1,1709 @@ +/** + From the author (Jeff Stuart) + " + Let me start by saying this file is pretty big. If you feel up to it, you can + try making changes yourself, but you would be better off to just email me at + stuart@cs.ucdavis.edu if you think there is a bug, or have something useful you + would like added. This project is very "near and dear" to me, so I am fairly + quick to make bug fixes. The header files for Pattern and Matcher are fairly + well documented and the function names are pretty self-explanatory, but if you + are having any trouble, feel free to email me at stuart@cs.ucdavis.edu. + + If you email me, make sure you put something like C++RE in the subject because + I tend to delete email if I don't recognize the name and the subject is + something like "I Need Your Help" or "Got A Second" or "I Found It". + " + */ + +/* + Detailed documentation is provided in this class' header file + + @author Jeffery Stuart + @since November 2004 + @version 1.07.00 +*/ + +#define to_lower(a) (char)(unsigned)CharLowerA((LPSTR)static_cast(a)) +#define is_alpha IsCharAlphaA + +#ifdef _WIN32 + #pragma warning(push) + #pragma warning(disable:4996) + #define str_icmp lstrcmpiA +#else + #define str_icmp strcasecmp +#endif + +#include +#include +#include +#include + +std::map Pattern::compiledPatterns; +std::map > Pattern::registeredPatterns; + +const int Pattern::MIN_QMATCH = 0x00000000; +const int Pattern::MAX_QMATCH = 0x7FFFFFFF; + +const unsigned long Pattern::CASE_INSENSITIVE = 0x01; +const unsigned long Pattern::LITERAL = 0x02; +const unsigned long Pattern::DOT_MATCHES_ALL = 0x04; +const unsigned long Pattern::MULTILINE_MATCHING = 0x08; +const unsigned long Pattern::UNIX_LINE_MODE = 0x10; + +Pattern::Pattern(const bkstring & rhs) +{ + matcher = NULL; + pattern = rhs; + curInd = 0; + groupCount = 0; + nonCapGroupCount = 0; + error = 0; + head = NULL; +} +// convenience function in case we want to add any extra debugging output +void Pattern::raiseError() +{ +/* switch (pattern[curInd - 1]) + { + case '*': + case ')': + case '+': + case '?': + case ']': + case '}': + fprintf(stderr, "%s\n%*c^\n", pattern.c_str(), curInd - 1, ' '); + fprintf(stderr, "Syntax Error near here. Possible unescaped meta character.\n"); + break; + default: + fprintf(stderr, "%s\n%*c^\n", pattern.c_str(), curInd - 1, ' '); + fprintf(stderr, "Syntax Error near here. \n"); + break; + }*/ + error = 1; +} +NFANode * Pattern::registerNode(NFANode * node) +{ + nodes[node] = 1; + return node; +} + +bkstring Pattern::classUnion (bkstring s1, bkstring s2) const +{ + char out[300]; + std::sort(s1.begin(), s1.end()); + std::sort(s2.begin(), s2.end()); + *std::set_union(s1.begin(), s1.end(), s2.begin(), s2.end(), out) = 0; + return out; +} +bkstring Pattern::classIntersect (bkstring s1, bkstring s2) const +{ + char out[300]; + std::sort(s1.begin(), s1.end()); + std::sort(s2.begin(), s2.end()); + *std::set_intersection(s1.begin(), s1.end(), s2.begin(), s2.end(), out) = 0; + return out; +} +bkstring Pattern::classNegate (bkstring s1) const +{ + char out[300]; + int i, ind = 0; + std::map m; + + for (i = 0; i < (int)s1.size(); ++i) m[s1[i]] = 1; + for (i = 0xFF; i >= 0; --i) if (m.find((char)i) == m.end()) out[ind++] = (char)i; + out[ind] = 0; + return bkstring(out, ind); +} +bkstring Pattern::classCreateRange(char low, char hi) const +{ + char out[300]; + int ind = 0; + while (low != hi) out[ind++] = low++; + out[ind++] = low; + return bkstring(out, ind); +} + +int Pattern::getInt(int start, int end) +{ + int ret = 0; + for (; start <= end; ++start) ret = ret * 10 + (pattern[start] - '0'); + return ret; +} +bool Pattern::quantifyCurly(int & sNum, int & eNum) +{ + bool good = 1; + int i, ci = curInd + 1; + int commaInd = ci, endInd = ci, len = (int)pattern.size(); + sNum = eNum = 0; + + while (endInd < len && pattern[endInd ] != '}') ++endInd; + while (commaInd < endInd && pattern[commaInd] != ',') ++commaInd; + if (endInd >= len) { raiseError(); return 0; } + for (i = ci; good && i < endInd; ++i) if (i != commaInd && !isdigit(pattern[i])) good = 0; + if (!good && commaInd < endInd) { raiseError(); return 0; } + if (!good) return 0; + /* so now everything in here is either a comma (and there is at most one comma) or a digit */ + if (commaInd == ci) // {,*} + { + if (endInd == commaInd + 1) { sNum = MIN_QMATCH; eNum = MAX_QMATCH; } // {,} = * + else { sNum = MIN_QMATCH; eNum = getInt(commaInd + 1, endInd - 1); } // {,+} + } + else if (commaInd == endInd - 1) { sNum = getInt(ci, commaInd - 1); eNum = MAX_QMATCH; } // {+,} + else if (commaInd == endInd) { sNum = getInt(ci, endInd - 1); eNum = sNum; } // {+} + else { sNum = getInt(ci, commaInd - 1); eNum = getInt(commaInd + 1, endInd - 1); } // {+,+} + curInd = endInd + 1; + return 1; +} +NFANode * Pattern::quantifyGroup(NFANode * start, NFANode * stop, const int gn) +{ + NFANode * newNode = NULL; + int type = 0; + + if (curInd < (int)pattern.size()) + { + char ch = (curInd + 1 >= (int)pattern.size()) ? -1 : pattern[curInd + 1]; + switch (pattern[curInd]) + { + case '*': + ++curInd; + switch (ch) + { + case '?': ++curInd; type = 1; break; + case '+': ++curInd; type = 2; break; + } + newNode = registerNode(new NFAGroupLoopPrologueNode(gn)); + newNode->next = registerNode(new NFAGroupLoopNode(start, MIN_QMATCH, MAX_QMATCH, gn, type)); + stop->next = newNode->next; + return newNode; + case '?': + ++curInd; + switch (ch) + { + case '?': ++curInd; type = 1; break; + case '+': ++curInd; type = 2; break; + } + newNode = registerNode(new NFAGroupLoopPrologueNode(gn)); + newNode->next = registerNode(new NFAGroupLoopNode(start, MIN_QMATCH, 1, gn, type)); + stop->next = newNode->next; + return newNode; + case '+': + ++curInd; + switch (ch) + { + case '?': ++curInd; type = 1; break; + case '+': ++curInd; type = 2; break; + } + newNode = registerNode(new NFAGroupLoopPrologueNode(gn)); + newNode->next = registerNode(new NFAGroupLoopNode(start, 1, MAX_QMATCH, gn, type)); + stop->next = newNode->next; + return newNode; + case '{': + { + int s, e; + if (quantifyCurly(s, e)) + { + ch = (curInd < (int)pattern.size()) ? pattern[curInd] : -1; + switch (ch) + { + case '?': ++curInd; type = 1; break; + case '+': ++curInd; type = 2; break; + } + newNode = registerNode(new NFAGroupLoopPrologueNode(gn)); + newNode->next = registerNode(new NFAGroupLoopNode(start, s, e, gn, type)); + stop->next = newNode->next; + return newNode; + } + } + default: + break; + } + } + return NULL; +} + +NFANode * Pattern::quantify(NFANode * newNode) +{ + if (curInd < (int)pattern.size()) + { + char ch = (curInd + 1 >= (int)pattern.size()) ? -1 : pattern[curInd + 1]; + switch (pattern[curInd]) + { + case '*': + ++curInd; + switch (ch) + { + case '?': ++curInd; newNode = registerNode(new NFALazyQuantifierNode (this, newNode, MIN_QMATCH, MAX_QMATCH)); break; + case '+': ++curInd; newNode = registerNode(new NFAPossessiveQuantifierNode(this, newNode, MIN_QMATCH, MAX_QMATCH)); break; + default: newNode = registerNode(new NFAGreedyQuantifierNode (this, newNode, MIN_QMATCH, MAX_QMATCH)); break; + } + break; + case '?': + ++curInd; + switch (ch) + { + case '?': ++curInd; newNode = registerNode(new NFALazyQuantifierNode (this, newNode, MIN_QMATCH, 1)); break; + case '+': ++curInd; newNode = registerNode(new NFAPossessiveQuantifierNode(this, newNode, MIN_QMATCH, 1)); break; + default: newNode = registerNode(new NFAGreedyQuantifierNode (this, newNode, MIN_QMATCH, 1)); break; + } + break; + case '+': + ++curInd; + switch (ch) + { + case '?': ++curInd; newNode = registerNode(new NFALazyQuantifierNode (this, newNode, 1, MAX_QMATCH)); break; + case '+': ++curInd; newNode = registerNode(new NFAPossessiveQuantifierNode(this, newNode, 1, MAX_QMATCH)); break; + default: newNode = registerNode(new NFAGreedyQuantifierNode (this, newNode, 1, MAX_QMATCH)); break; + } + break; + case '{': + { + int s, e; + if (quantifyCurly(s, e)) + { + ch = (curInd < (int)pattern.size()) ? pattern[curInd] : -1; + switch (ch) + { + case '?': ++curInd; newNode = registerNode(new NFALazyQuantifierNode (this, newNode, s, e)); break; + case '+': ++curInd; newNode = registerNode(new NFAPossessiveQuantifierNode(this, newNode, s, e)); break; + default: newNode = registerNode(new NFAGreedyQuantifierNode (this, newNode, s, e)); break; + } + } + } + break; + default: + break; + } + } + return newNode; +} +bkstring Pattern::parseClass() +{ + bkstring t, ret = ""; + char ch, c1, c2; + bool inv = 0, neg = 0, quo = 0; + + if (curInd < (int)pattern.size() && pattern[curInd] == '^') + { + ++curInd; + neg = 1; + } + while (curInd < (int)pattern.size() && pattern[curInd] != ']') + { + ch = pattern[curInd++]; + if (ch == '[') + { + t = parseClass(); + ret = classUnion(ret, t); + } + /*else if (ch == '-') + { + raiseError(); + curInd = pattern.size(); + }*/ + else if (ch == '&' && curInd < (int)pattern.size() && pattern[curInd] == '&') + { + if (pattern[++curInd] != '[') + { + raiseError(); + curInd = (int)pattern.size(); + } + else + { + ++curInd; + t = parseClass(); + ret = classIntersect(ret, t); + } + } + else if (ch == '\\') + { + t = parseEscape(inv, quo); + if (quo) + { + raiseError(); + curInd = (int)pattern.size(); + } + else if (inv || t.size() > 1) // cant be part of a range (a-z) + { + if (inv) t = classNegate(t); + ret = classUnion(ret, t); + } + else if (curInd < (int)pattern.size() && pattern[curInd] == '-') // part of a range (a-z) + { + c1 = t[0]; + ++curInd; + if (curInd >= (int)pattern.size()) raiseError(); + else + { + c2 = pattern[curInd++]; + if (c2 == '\\') + { + t = parseEscape(inv, quo); + if (quo) + { + raiseError(); + curInd = (int)pattern.size(); + } + else if (inv || t.size() > 1) raiseError(); + else ret = classUnion(ret, classCreateRange(c1, c2)); + } + else if (c2 == '[' || c2 == ']' || c2 == '-' || c2 == '&') + { + raiseError(); + curInd = (int)pattern.size(); + } + else ret = classUnion(ret, classCreateRange(c1, c2)); + } + } + else + { + ret = classUnion(ret, t); + } + } + else if (curInd < (int)pattern.size() && pattern[curInd] == '-') + { + c1 = ch; + ++curInd; + if (curInd >= (int)pattern.size()) raiseError(); + else + { + c2 = pattern[curInd++]; + if (c2 == '\\') + { + t = parseEscape(inv, quo); + if (quo) + { + raiseError(); + curInd = (int)pattern.size(); + } + else if (inv || t.size() > 1) raiseError(); + else ret = classUnion(ret, classCreateRange(c1, c2)); + } + else if (c2 == '[' || c2 == ']' || c2 == '-' || c2 == '&') + { + raiseError(); + curInd = (int)pattern.size(); + } + else + { + ret = classUnion(ret, classCreateRange(c1, c2)); + } + } + } + else + { + ret += " "; + ret[ret.size() - 1] = ch; + } + } + if (curInd >= (int)pattern.size() || pattern[curInd] != ']') + { + raiseError(); + ret = ""; + } + else + { + ++curInd; + if (neg) ret = classNegate(ret); + } + return ret; +} +bkstring Pattern::parsePosix() +{ + bkstring s7 = pattern.substr(curInd, 7); + if (s7 == "{Lower}") { curInd += 7; return "abcdefghijklmnopqrstuvwxyz"; } + if (s7 == "{Upper}") { curInd += 7; return "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; } + if (s7 == "{Alpha}") { curInd += 7; return "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; } + if (s7 == "{Digit}") { curInd += 7; return "0123456789"; } + if (s7 == "{Alnum}") { curInd += 7; return "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; } + if (s7 == "{Punct}") { curInd += 7; return "!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~"; } + if (s7 == "{Graph}") { curInd += 7; return "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~"; } + if (s7 == "{Print}") { curInd += 7; return "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~"; } + if (s7 == "{Blank}") { curInd += 7; return " \t"; } + if (s7 == "{Space}") { curInd += 7; return " \t\n\x0B\f\r"; } + if (s7 == "{Cntrl}") + { + bkstring::value_type i; + bkstring s = " "; + + for (i = 0; i < 5; ++i) s += s; + s += " "; + for (i = 0; i <= 0x1F; ++i) s[i] = i; + s[0x20] = 0x7F; + curInd += 7; + return s; + } + if (s7 == "{ASCII}") + { + bkstring s(0x80, ' '); + for (int i = 0; i <= 0x7f; ++i) s[i] = (bkstring::value_type)i; + curInd += 7; + return s; + } + if (pattern.substr(curInd, 8) == "{XDigit}") { curInd += 8; return "abcdefABCDEF0123456789"; } + raiseError(); + return ""; +} +NFANode * Pattern::parseBackref() +{ + #define is_dig(x) ((x) >= '0' && (x) <= '9') + #define to_int(x) ((x) - '0') + int ci = curInd; + int oldRef = 0, ref = 0; + + while (ci < (int)pattern.size() && is_dig(pattern[ci]) && (ref < 10 || ref < groupCount)) + { + oldRef = ref; + ref = ref * 10 + to_int(pattern[ci++]); + } + if (ci == (int)pattern.size()) + { + oldRef = ref; + ++ci; + } + if (oldRef < 0 || ci <= curInd) + { + raiseError(); + return registerNode(new NFAReferenceNode(-1)); + } + curInd = ci; + return registerNode(new NFAReferenceNode(ref)); + + #undef is_dig + #undef to_int +} +bkstring Pattern::parseOctal() +{ + #define islowoc(x) ((x) >= '0' && (x) <= '3') + #define isoc(x) ((x) >= '0' && (x) <= '7') + #define fromoc(x) ((x) - '0') + int ci = curInd; + char ch1 = (ci + 0 < (int)pattern.size()) ? pattern[ci + 0] : -1; + char ch2 = (ci + 1 < (int)pattern.size()) ? pattern[ci + 1] : -1; + char ch3 = (ci + 2 < (int)pattern.size()) ? pattern[ci + 2] : -1; + bkstring s = " "; + + if (islowoc(ch1) && isoc(ch2)) + { + curInd += 2; + s[0] = fromoc(ch1) * 8 + fromoc(ch2); + if (isoc(ch3)) + { + ++curInd; + s[0] = s[0] * 8 + fromoc(ch3); + } + } + else if (isoc(ch1) && isoc(ch2)) + { + curInd += 2; + s[0] = fromoc(ch1) * 8 + fromoc(ch2); + } + else raiseError(); + + return s; + #undef islowoc + #undef isoc + #undef fromoc +} +bkstring Pattern::parseHex() +{ + #define to_low(x) (((x) >= 'A' && (x) <= 'Z') ? ((x) - 'A' + 'a') : (x)) + #define is_dig(x) ((x) >= '0' && (x) <= '9') + #define is_hex(x) (is_dig(x) || (to_low(x) >= 'a' && to_low(x) <= 'f')) + #define to_int(x) ((is_dig(x)) ? ((x) - '0') : (to_low(x) - 'a' + 10)) + + int ci = curInd; + char ch1 = (ci + 0 < (int)pattern.size()) ? pattern[ci + 0] : -1; + char ch2 = (ci + 1 < (int)pattern.size()) ? pattern[ci + 1] : -1; + bkstring s = " "; + + if (is_hex(ch1) && is_hex(ch2)) + { + curInd += 2; + s[0] = (to_int(ch1) << 4 & 0xF0) | (to_int(ch2) & 0x0F); + } + + return s; + #undef to_low + #undef is_dig + #undef is_hex + #undef to_int +} +bkstring Pattern::parseEscape(bool & inv, bool & quo) +{ + char ch = pattern[curInd++]; + bkstring classes = ""; + + if (curInd > (int)pattern.size()) + { + raiseError(); + return NULL; + } + + quo = 0; + inv = 0; + switch (ch) + { + case 'p': classes = parsePosix(); break; + case 'P': classes = "!!"; classes += parsePosix(); break; + case 'd': classes = "0123456789"; break; + case 'D': classes = "!!0123456789"; break; + case 's': classes = " \t\r\n\f"; break; + case 'S': classes = "!! \t\r\n\f"; break; + case 'w': classes = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_"; break; + case 'W': classes = "!!abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_"; break; + case '0': classes = parseOctal(); break; + case 'x': classes = parseHex(); break; + + case 'Q': quo = 1; break; + case 't': classes = "\t"; break; + case 'r': classes = "\r"; break; + case 'n': classes = "\n"; break; + case 'f': classes = "\f"; break; + case 'a': classes = "\a"; break; + case 'e': classes = "\r"; break; + default: classes = " "; classes[0] = ch; break; + } + if (classes.substr(0, 2) == "!!") + { + classes = classes.substr(2); + inv = 1; + } + return classes; +} +NFANode * Pattern::parseRegisteredPattern(NFANode ** end) +{ + int i, j; + bkstring s; + NFANode * ret = NULL; + for (i = curInd; i < (int)pattern.size() && pattern[i] != '}'; ++i) { } + if (pattern[i] != '}') { raiseError(); return NULL; } + if (i == curInd + 1) { raiseError(); return NULL; } // {} + if ( + !( + (pattern[curInd] >= 'a' && pattern[curInd] <= 'z') || + (pattern[curInd] >= 'A' && pattern[curInd] <= 'Z') || + (pattern[curInd] == '_') + ) + ) + { + raiseError(); + return NULL; + } + for (j = curInd; !error && j < i; ++j) + { + if ( + !( + (pattern[j] >= 'a' && pattern[j] <= 'z') || + (pattern[j] >= 'A' && pattern[j] <= 'Z') || + (pattern[j] >= '0' && pattern[j] <= '9') || + (pattern[j] == '_') + ) + ) + { + raiseError(); + return NULL; + } + } + s = pattern.substr(curInd, i - curInd); + if (registeredPatterns.find(s) == registeredPatterns.end()) raiseError(); + else + { + unsigned long oflags = flags; + bkstring op = pattern; + int ci = i + 1; + + pattern = registeredPatterns[s].first; + curInd = 0; + flags = registeredPatterns[s].second; + + --groupCount; + ret = parse(0, 0, end); + + pattern = op; + curInd = ci; + flags = oflags; + } + if (error) { *end = ret = NULL; } + return ret; +} + +// look behind should interpret everything as a literal (except \\) since the +// pattern must have a concrete length +NFANode * Pattern::parseBehind(const bool pos, NFANode ** end) +{ + bkstring t = ""; + while (curInd < (int)pattern.size() && pattern[curInd] != ')') + { + char ch = pattern[curInd++]; + t += " "; + if (ch == '\\') + { + if (curInd + 1 >= (int)pattern.size()) + { + raiseError(); + return *end = registerNode(new NFACharNode(' ')); + } + ch = pattern[curInd++]; + } + t[t.size() - 1] = ch; + } + if (curInd >= (int)pattern.size() || pattern[curInd] != ')') raiseError(); + else ++curInd; + return *end = registerNode(new NFALookBehindNode(t, pos)); +} +NFANode * Pattern::parseQuote() +{ + bool done = 0; + bkstring s = ""; + + while (!done) + { + if (curInd >= (int)pattern.size()) + { + raiseError(); + done = 1; + } + else if (pattern.substr(curInd, 2) == "\\E") + { + curInd += 2; + done = 1; + } + else if (pattern[curInd] == '\\') + { + s += " "; + s[s.size() - 1] = pattern[++curInd]; + ++curInd; + } + else + { + s += " "; + s[s.size() - 1] = pattern[curInd++]; + } + } + if ((flags & Pattern::CASE_INSENSITIVE) != 0) return registerNode(new NFACIQuoteNode(s)); + return registerNode(new NFAQuoteNode(s)); +} +NFANode * Pattern::parse(const bool inParen, const bool inOr, NFANode ** end) +{ + NFANode * start, * cur, * next = NULL; + bkstring t; + int grc = groupCount++; + bool inv, quo; + bool ahead = 0, pos = 0, noncap = 0, indep = 0; + unsigned long oldFlags = flags; + + if (inParen) + { + if (pattern[curInd] == '?') + { + ++curInd; + --groupCount; + if (pattern[curInd] == ':') { noncap = 1; ++curInd; grc = --nonCapGroupCount; } + else if (pattern[curInd] == '=') { ++curInd; ahead = 1; pos = 1; } + else if (pattern[curInd] == '!') { ++curInd; ahead = 1; pos = 0; } + else if (pattern.substr(curInd, 2) == "<=") { curInd += 2; return parseBehind(1, end); } + else if (pattern.substr(curInd, 2) == "') { ++curInd; indep = 1; } + else + { + bool negate = false, done = false; + while (!done) + { + if (curInd >= (int)pattern.size()) + { + raiseError(); + return NULL; + } + else if (negate) + { + switch (pattern[curInd]) + { + case 'i': flags &= ~Pattern::CASE_INSENSITIVE; break; + case 'd': flags &= ~Pattern::UNIX_LINE_MODE; break; + case 'm': flags &= ~Pattern::MULTILINE_MATCHING; break; + case 's': flags &= ~Pattern::DOT_MATCHES_ALL; break; + case ':': done = true; break; + case ')': + ++curInd; + *end = registerNode(new NFALookBehindNode("", true)); + return *end; + case '-': + default: raiseError(); return NULL; + } + } + else + { + switch (pattern[curInd]) + { + case 'i': flags |= Pattern::CASE_INSENSITIVE; break; + case 'd': flags |= Pattern::UNIX_LINE_MODE; break; + case 'm': flags |= Pattern::MULTILINE_MATCHING; break; + case 's': flags |= Pattern::DOT_MATCHES_ALL; break; + case ':': done = true; break; + case '-': negate = true; break; + case ')': + ++curInd; + *end = registerNode(new NFALookBehindNode("", true)); + return *end; + default: raiseError(); return NULL; + } + } + ++curInd; + } + noncap = 1; + grc = --nonCapGroupCount; + } + if (noncap) cur = start = registerNode(new NFAGroupHeadNode(grc)); + else cur = start = registerNode(new NFASubStartNode); + } + else cur = start = registerNode(new NFAGroupHeadNode(grc)); + } + else cur = start = registerNode(new NFASubStartNode); + while (curInd < (int)pattern.size()) + { + char ch = pattern[curInd++]; + + next = NULL; + if (error) return NULL; + switch (ch) + { + case '^': + if ((flags & Pattern::MULTILINE_MATCHING) != 0) next = registerNode(new NFAStartOfLineNode); + else next = registerNode(new NFAStartOfInputNode); + break; + case '$': + if ((flags & Pattern::MULTILINE_MATCHING) != 0) next = registerNode(new NFAEndOfLineNode); + else next = registerNode(new NFAEndOfInputNode(0)); + break; + case '|': + --groupCount; + cur->next = registerNode(new NFAAcceptNode); + cur = start = registerNode(new NFAOrNode(start, parse(inParen, 1))); + break; + case '\\': + if (curInd < (int)pattern.size()) + { + bool eoi = 0; + switch (pattern[curInd]) + { + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': next = parseBackref(); break; + case 'A': ++curInd; next = registerNode(new NFAStartOfInputNode); break; + case 'B': ++curInd; next = registerNode(new NFAWordBoundaryNode(0)); break; + case 'b': ++curInd; next = registerNode(new NFAWordBoundaryNode(1)); break; + case 'G': ++curInd; next = registerNode(new NFAEndOfMatchNode); break; + case 'Z': eoi = 1; + case 'z': ++curInd; next = registerNode(new NFAEndOfInputNode(eoi)); break; + default: + t = parseEscape(inv, quo); + if (!quo) + { + if (t.size() > 1 || inv) + { + if ((flags & Pattern::CASE_INSENSITIVE) != 0) next = registerNode(new NFACIClassNode(t, inv)); + else next = registerNode(new NFAClassNode(t, inv)); + } + else + { + next = registerNode(new NFACharNode(t[0])); + } + } + else + { + next = parseQuote(); + } + } + } + else raiseError(); + break; + case '[': + if ((flags & Pattern::CASE_INSENSITIVE) == 0) + { + NFAClassNode * clazz = new NFAClassNode(); + bkstring s = parseClass(); + for (int i = 0; i < (int)s.size(); ++i) clazz->vals[s[i]] = 1; + next = registerNode(clazz); + } + else + { + NFACIClassNode * clazz = new NFACIClassNode(); + bkstring s = parseClass(); + for (int i = 0; i < (int)s.size(); ++i) clazz->vals[to_lower(s[i])] = 1; + next = registerNode(clazz); + } + break; + case '.': + { + bool useN = 1, useR = 1; + NFAClassNode * clazz = new NFAClassNode(1); + if ((flags & Pattern::UNIX_LINE_MODE) != 0) useR = 0; + if ((flags & Pattern::DOT_MATCHES_ALL) != 0) useN = useR = 0; + if (useN) clazz->vals['\n'] = 1; + if (useR) clazz->vals['\r'] = 1; + next = registerNode(clazz); + } + break; + case '(': + { + NFANode * end, * t1, * t2; + t1 = parse(1, 0, &end); + if (!t1) raiseError(); + else if (t1->isGroupHeadNode() && (t2 = quantifyGroup(t1, end, grc)) != NULL) + { + cur->next = t2; + cur = t2->next; + } + else + { + cur->next = t1; + cur = end; + } + } + break; + case ')': + if (!inParen) raiseError(); + else if (inOr) + { + --curInd; + cur = cur->next = registerNode(new NFAAcceptNode); + flags = oldFlags; + return start; + } + else + { + if (ahead) + { + cur = cur->next = registerNode(new NFAAcceptNode); + flags = oldFlags; + return *end = registerNode(new NFALookAheadNode(start, pos)); + } + else if (indep) + { + cur = cur->next = registerNode(new NFAAcceptNode); + flags = oldFlags; + return *end = registerNode(new NFAPossessiveQuantifierNode(this, start, 1, 1)); + } + else // capping or noncapping, it doesnt matter + { + *end = cur = cur->next = registerNode(new NFAGroupTailNode(grc)); + next = quantifyGroup(start, *end, grc); + if (next) + { + start = next; + *end = next->next; + } + flags = oldFlags; + return start; + } + } + break; + case '{': // registered pattern + cur->next = parseRegisteredPattern(&next); + if (cur->next) cur = next; + break; + case '*': + case '+': + case '?': +// case '}': +// case ']': + raiseError(); + break; + default: + if ((flags & Pattern::CASE_INSENSITIVE) != 0) next = registerNode(new NFACICharNode(ch)); + else next = registerNode(new NFACharNode(ch)); + break; + } + if (next) + { + cur = cur->next = quantify(next); + } + } + if (inParen) raiseError(); + else + { + if (inOr) cur = cur->next = registerNode(new NFAAcceptNode); + if (end) *end = cur; + } + + flags = oldFlags; + if (error) return NULL; + + return start; +} + +Pattern * Pattern::compile(const bkstring & pattern, const unsigned long mode) +{ + Pattern * p = new Pattern(pattern); + NFANode * end; + + p->flags = mode; + if ((mode & Pattern::LITERAL) != 0) + { + p->head = p->registerNode(new NFAStartNode); + if ((mode & Pattern::CASE_INSENSITIVE) != 0) p->head->next = p->registerNode(new NFACIQuoteNode(pattern)); + else p->head->next = p->registerNode(new NFAQuoteNode(pattern)); + p->head->next->next = p->registerNode(new NFAEndNode); + } + else + { + p->head = p->parse(0, 0, &end); + if (!p->head) + { + delete p; + p = NULL; + } + else + { + if (!(p->head && p->head->isStartOfInputNode())) + { + NFANode * n = p->registerNode(new NFAStartNode); + n->next = p->head; + p->head = n; + } + end->next = p->registerNode(new NFAEndNode); + } + } + if (p != NULL) + { + p->matcher = new Matcher(p, ""); + } + + return p; +} + +Pattern * Pattern::compileAndKeep(const bkstring & pattern, const unsigned long mode) +{ + Pattern * ret = NULL; + std::map::iterator it = compiledPatterns.find(pattern); + + if (it != compiledPatterns.end()) + { + ret = it->second; + } + else + { + ret = compile(pattern, mode); + compiledPatterns[pattern] = ret; + } + + return ret; +} +bkstring Pattern::replace(const bkstring & pattern, const bkstring & str, + const bkstring & replacementText, const unsigned long mode) +{ + bkstring ret; + Pattern * p = Pattern::compile(pattern, mode); + if (p) + { + ret = p->replace(str, replacementText); + delete p; + } + return ret; +} + +std::vector Pattern::split(const bkstring & pattern, const bkstring & str, const bool keepEmptys, + const unsigned long limit, const unsigned long mode) +{ + std::vector ret; + Pattern * p = Pattern::compile(pattern, mode); + if (p) + { + ret = p->split(str, keepEmptys, limit); + delete p; + } + return ret; +} + +std::vector Pattern::findAll(const bkstring & pattern, const bkstring & str, const unsigned long mode) +{ + std::vector ret; + Pattern * p = Pattern::compile(pattern, mode); + if (p) + { + ret = p->findAll(str); + delete p; + } + return ret; +} + +bool Pattern::matches(const bkstring & pattern, const bkstring & str, const unsigned long mode) +{ + bool ret = 0; + Pattern * p = compile(pattern, mode); + + if (p) + { + ret = p->matches(str); + delete p; + } + + return ret; +} + +bool Pattern::registerPattern(const bkstring & name, const bkstring & pattern, const unsigned long mode) +{ + Pattern * p = Pattern::compile(pattern, mode); + if (!p) return 0; + Pattern::registeredPatterns[name] = std::make_pair(pattern, mode); + delete p; + return 1; +} + +void Pattern::unregisterPatterns() +{ + registeredPatterns.clear(); +} +void Pattern::clearPatternCache() +{ + std::map::iterator it; + for (it = compiledPatterns.begin(); it != compiledPatterns.end(); ++it) + { + delete it->second; + } + compiledPatterns.clear(); +} + +std::pair Pattern::findNthMatch(const bkstring & pattern, const bkstring & str, + const int matchNum, const unsigned long mode) +{ + std::pair ret; + Pattern * p = Pattern::compile(pattern, mode); + + ret.second = -1; + if (p) + { + int i = -1; + p->matcher->setString(str); + while (i < matchNum && p->matcher->findNextMatch()) { ++i; } + if (i == matchNum && p->matcher->getStartingIndex() >= 0) + { + ret.first = p->matcher->getGroup(0); + ret.second = p->matcher->getStartingIndex(); + } + delete p; + } + + return ret; +} + +Pattern::~Pattern() +{ + if (matcher) delete matcher; + for (std::map::iterator it = nodes.begin(); it != nodes.end(); ++it) + { + delete it->first; + } +} +bkstring Pattern::replace(const bkstring & str, const bkstring & replacementText) +{ + int li = 0; + bkstring ret = ""; + + matcher->setString(str); + while (matcher->findNextMatch()) + { + ret += str.substr(li, matcher->getStartingIndex() - li); + ret += matcher->replaceWithGroups(replacementText); + li = matcher->getEndingIndex(); + } + ret += str.substr(li); + + return ret; +} +std::vector Pattern::split(const bkstring & str, const bool keepEmptys, const unsigned long limit) +{ + unsigned long lim = (limit == 0 ? MAX_QMATCH : limit); + int li = 0; + std::vector ret; + + matcher->setString(str); + + while (matcher->findNextMatch() && ret.size() < lim) + { + if (matcher->getStartingIndex() == 0 && keepEmptys) ret.push_back(""); + if ((matcher->getStartingIndex() != matcher->getEndingIndex()) || keepEmptys) + { + if (li != matcher->getStartingIndex() || keepEmptys) + { + ret.push_back(str.substr(li, matcher->getStartingIndex() - li)); + } + li = matcher->getEndingIndex(); + } + } + if (li < (int)str.size()) ret.push_back(str.substr(li)); + + return ret; +} +std::vector Pattern::findAll(const bkstring & str) +{ + matcher->setString(str); + return matcher->findAll(); +} +bool Pattern::matches(const bkstring & str) +{ + matcher->setString(str); + return matcher->matches(); +} +unsigned long Pattern::getFlags() const +{ + return flags; +} +bkstring Pattern::getPattern() const +{ + return pattern; +} +Matcher * Pattern::createMatcher(const bkstring & str) +{ + return new Matcher(this, str); +} + +// NFANode + +NFANode::NFANode() { next = NULL; } +NFANode::~NFANode() { } +void NFANode::findAllNodes(std::map & soFar) +{ + if (soFar.find(this) == soFar.end()) return; + soFar[this] = 1; + if (next) next->findAllNodes(soFar); +} + +// NFACharNode + +NFACharNode::NFACharNode(const char c) { ch = c; } +int NFACharNode::match(const bkstring & str, Matcher * matcher, const int curInd) const +{ + if (curInd < (int)str.size() && str[curInd] == ch) return next->match(str, matcher, curInd + 1); + return -1; +} + +// NFACICharNode + +NFACICharNode::NFACICharNode(const char c) { ch = to_lower(c); } +int NFACICharNode::match(const bkstring & str, Matcher * matcher, const int curInd) const +{ + if (curInd < (int)str.size() && to_lower(str[curInd]) == ch) return next->match(str, matcher, curInd + 1); + return -1; +} + +// NFAStartNode + +NFAStartNode::NFAStartNode() { } +int NFAStartNode::match(const bkstring & str, Matcher * matcher, const int curInd) const +{ + int ret = -1, ci = curInd; + + matcher->starts[0] = curInd; + if ((matcher->getFlags() & Matcher::MATCH_ENTIRE_STRING) == (unsigned int)Matcher::MATCH_ENTIRE_STRING) + { + if (curInd != 0) + { + matcher->starts[0] = -1; + return -1; + } + return next->match(str, matcher, 0); + } + while ((ret = next->match(str, matcher, ci)) == -1 && ci < (int)str.size()) + { + matcher->clearGroups(); + matcher->starts[0] = ++ci; + } + if (ret < 0) matcher->starts[0] = -1; + return ret; +} + +// NFAEndNode + +NFAEndNode::NFAEndNode() { } +int NFAEndNode::match(const bkstring & str, Matcher * matcher, const int curInd) const +{ + matcher->ends[0] = curInd; + if ((matcher->getFlags() & Matcher::MATCH_ENTIRE_STRING) != 0) + { + if (curInd == (int)str.size()) return curInd; + matcher->ends[0] = -1; + return -1; + } + return curInd; +} + +// NFAQuantifierNode + +void NFAQuantifierNode::findAllNodes(std::map & soFar) +{ + inner->findAllNodes(soFar); + NFANode::findAllNodes(soFar); +} +NFAQuantifierNode::NFAQuantifierNode(Pattern * pat, NFANode * internal, const int minMatch, const int maxMatch) +{ + inner = internal; + inner->next = pat->registerNode(new NFAAcceptNode); + min = (minMatch < Pattern::MIN_QMATCH) ? Pattern::MIN_QMATCH : minMatch; + max = (maxMatch > Pattern::MAX_QMATCH) ? Pattern::MAX_QMATCH : maxMatch; +} + +int NFAQuantifierNode::match(const bkstring & str, Matcher * matcher, const int curInd) const +{ + int i0, i1, i2 = 0; + + i0 = i1 = curInd; + while (i2 < min) + { + + ++i2; + i1 = inner->match(str, matcher, i0); + if (i1 <= i0) return i1; // i1 < i0 means i1 is -1 + i0 = i1; + } + + return i1; +} +// NFAGreedyQuantifierNode + +NFAGreedyQuantifierNode::NFAGreedyQuantifierNode(Pattern * pat, NFANode * internal, const int minMatch, const int maxMatch) + : NFAQuantifierNode(pat, internal, minMatch, maxMatch) { } +int NFAGreedyQuantifierNode::match(const bkstring & str, Matcher * matcher, const int curInd) const +{ + int t = NFAQuantifierNode::match(str, matcher, curInd); + if (t != -1) return matchInternal(str, matcher, t, min); + return t; +} +int NFAGreedyQuantifierNode::matchInternal(const bkstring & str, Matcher * matcher, const int curInd, const int soFar) const +{ + if (soFar >= max) return next->match(str, matcher, curInd); + + int i, j; + + i = inner->match(str, matcher, curInd); + if (i != -1) + { + j = matchInternal(str, matcher, i, soFar + 1); + if (j != -1) return j; + } + return next->match(str, matcher, curInd); +} + +// NFALazyQuantifierNode + +NFALazyQuantifierNode::NFALazyQuantifierNode(Pattern * pat, NFANode * internal, const int minMatch, const int maxMatch) + : NFAQuantifierNode(pat, internal, minMatch, maxMatch) { } +int NFALazyQuantifierNode::match(const bkstring & str, Matcher * matcher, const int curInd) const +{ + int i, j, m = NFAQuantifierNode::match(str, matcher, curInd); + + if (m == -1) return -1; + + for (i = min; i < max; ++i) + { + j = next->match(str, matcher, m); + if (j == -1) + { + j = inner->match(str, matcher, m); + // if j < m, then j is -1, so we bail. + // if j == m, then we would just go and call next->match on the same index, + // but it already failed trying to match right there, so we know we can + // just bail + if (j <= m) return -1; + m = j; + } + else return j; + } + return next->match(str, matcher, m); +} + +// NFAPossessiveQuantifierNode + +NFAPossessiveQuantifierNode::NFAPossessiveQuantifierNode(Pattern * pat, NFANode * internal, const int minMatch, const int maxMatch) + : NFAQuantifierNode(pat, internal, minMatch, maxMatch) { } +int NFAPossessiveQuantifierNode::match(const bkstring & str, Matcher * matcher, const int curInd) const +{ + int i, j, m = NFAQuantifierNode::match(str, matcher, curInd); + + if (m == -1) return -1; + for (i = min; i < max; ++i) + { + j = inner->match(str, matcher, m); + if (j <= m) return next->match(str, matcher, m); + m = j; + } + return next->match(str, matcher, m); +} + +// NFAAcceptNode + +NFAAcceptNode::NFAAcceptNode() { } +int NFAAcceptNode::match(const bkstring & str, Matcher * matcher, const int curInd) const +{ + if (!next) return curInd; + else return next->match(str, matcher, curInd); +} + +// NFAClassNode + +NFAClassNode::NFAClassNode(const bool invert) +{ + inv = invert; +} +NFAClassNode::NFAClassNode(const bkstring & clazz, const bool invert) +{ + inv = invert; + for (int i = 0; i < (int)clazz.size(); ++i) vals[clazz[i]] = 1; +} +int NFAClassNode::match(const bkstring & str, Matcher * matcher, const int curInd) const +{ + if (curInd < (int)str.size() && ((vals.find(str[curInd]) != vals.end()) ^ inv)) + { + return next->match(str, matcher, curInd + 1); + } + return -1; +} + +// NFACIClassNode + +NFACIClassNode::NFACIClassNode(const bool invert) +{ + inv = invert; +} +NFACIClassNode::NFACIClassNode(const bkstring & clazz, const bool invert) +{ + inv = invert; + for (int i = 0; i < (int)clazz.size(); ++i) vals[to_lower(clazz[i])] = 1; +} +int NFACIClassNode::match(const bkstring & str, Matcher * matcher, const int curInd) const +{ + if (curInd < (int)str.size() && ((vals.find(to_lower(str[curInd])) != vals.end()) ^ inv)) + { + return next->match(str, matcher, curInd + 1); + } + return -1; +} + +// NFASubStartNode + +NFASubStartNode::NFASubStartNode() { } +int NFASubStartNode::match(const bkstring & str, Matcher * matcher, const int curInd) const +{ + return next->match(str, matcher, curInd); +} + +// NFAOrNode + +NFAOrNode::NFAOrNode(NFANode * first, NFANode * second) : one(first), two(second) { } +void NFAOrNode::findAllNodes(std::map & soFar) +{ + if (one) one->findAllNodes(soFar); + if (two) two->findAllNodes(soFar); + NFANode::findAllNodes(soFar); +} +int NFAOrNode::match(const bkstring & str, Matcher * matcher, const int curInd) const +{ + int ci = one->match(str, matcher, curInd); + + if (ci != -1) ci = next->match(str, matcher, ci); + if (ci != -1) return ci; + if (ci == -1) ci = two->match(str, matcher, curInd); + if (ci != -1) ci = next->match(str, matcher, ci); + return ci; +} + +// NFAQuoteNode + +NFAQuoteNode::NFAQuoteNode(const bkstring & quoted) : qStr(quoted) { } +int NFAQuoteNode::match(const bkstring & str, Matcher * matcher, const int curInd) const +{ + if (curInd + qStr.size() > str.size()) return -1; + if (str.substr(curInd, qStr.size()) != qStr) return -1; + return next->match(str, matcher, curInd + qStr.size()); +} + +// NFACIQuoteNode + +NFACIQuoteNode::NFACIQuoteNode(const bkstring & quoted) : qStr(quoted) { } +int NFACIQuoteNode::match(const bkstring & str, Matcher * matcher, const int curInd) const +{ + if (curInd + qStr.size() > str.size()) return -1; + if (str_icmp(str.substr(curInd, qStr.size()).c_str(), qStr.c_str())) return -1; + return next->match(str, matcher, qStr.size()); +} + +// NFALookAheadNode + +NFALookAheadNode::NFALookAheadNode(NFANode * internal, const bool positive) : NFANode(), pos(positive), inner(internal) { } +void NFALookAheadNode::findAllNodes(std::map & soFar) +{ + if (inner) inner->findAllNodes(soFar); + NFANode::findAllNodes(soFar); +} +int NFALookAheadNode::match(const bkstring & str, Matcher * matcher, const int curInd) const +{ + return ((inner->match(str, matcher, curInd) == -1) ^ pos) ? next->match(str, matcher, curInd) : -1; +} + +// NFALookBehindNode + +NFALookBehindNode::NFALookBehindNode(const bkstring & str, const bool positive) : pos(positive), mStr(str) { } +int NFALookBehindNode::match(const bkstring & str, Matcher * matcher, const int curInd) const +{ + if (pos) + { + if (curInd < (int)mStr.size()) return -1; + if (str.substr(curInd - mStr.size(), mStr.size()) == mStr) return next->match(str, matcher, curInd); + } + else + { + if (curInd < (int)mStr.size()) return next->match(str, matcher, curInd); + if (str.substr(curInd - mStr.size(), mStr.size()) == mStr) return -1; + return next->match(str, matcher, curInd); + } + return -1; +} + +// NFAStartOfLineNode + +NFAStartOfLineNode::NFAStartOfLineNode() { } +int NFAStartOfLineNode::match(const bkstring & str, Matcher * matcher, const int curInd) const +{ + if (curInd == 0 || str[curInd - 1] == '\n' || str[curInd - 1] == '\r') + { + return next->match(str, matcher, curInd); + } + return -1; +} + +// NFAEndOfLineNode + +NFAEndOfLineNode::NFAEndOfLineNode() { } +int NFAEndOfLineNode::match(const bkstring & str, Matcher * matcher, const int curInd) const +{ + if (curInd >= (int)str.size() || str[curInd] == '\n' || str[curInd] == '\r') + { + return next->match(str, matcher, curInd); + } + return -1; +} + +// NFAReferenceNode + +NFAReferenceNode::NFAReferenceNode(const int groupIndex) : gi(groupIndex) { } +int NFAReferenceNode::match(const bkstring & str, Matcher * matcher, const int curInd) const +{ + int len = matcher->ends[gi] - matcher->starts[gi]; + int ni = -1; + if (gi < 1 || matcher->ends[gi] < matcher->starts[gi] || len == 0) ni = curInd; + else if (curInd + len > (int)str.size()) return -1; + else if (str.substr(curInd, len) != str.substr(matcher->starts[gi], len)) return -1; + else ni = curInd + len; + + return next->match(str, matcher, ni); +} + +// NFAStartOfInputNode + +NFAStartOfInputNode::NFAStartOfInputNode() { } +int NFAStartOfInputNode::match(const bkstring & str, Matcher * matcher, const int curInd) const +{ + if (curInd == 0) return next->match(str, matcher, curInd); + return -1; +} + +// NFAEndOfInputNode + +NFAEndOfInputNode::NFAEndOfInputNode(const bool lookForTerm) : term(lookForTerm) { } +int NFAEndOfInputNode::match(const bkstring & str, Matcher * matcher, const int curInd) const +{ + int len = (int)str.size(); + if (curInd == len) return next->match(str, matcher, curInd); + else if (term) + { + if (curInd == len - 1 && (str[curInd] == '\r' || str[curInd] == '\n')) + { + return next->match(str, matcher, curInd); + } + else if (curInd == len - 2 && str.substr(curInd, 2) == "\r\n") + { + return next->match(str, matcher, curInd); + } + } + return -1; +} + +// NFAWordBoundaryNode + +NFAWordBoundaryNode::NFAWordBoundaryNode(const bool positive) : pos(positive) { } +int NFAWordBoundaryNode::match(const bkstring & str, Matcher * matcher, const int curInd) const +{ + int len = (int)str.size(); + + char c1 = (curInd - 1 < len && curInd > 0) ? str[curInd - 1] : '\n'; + char c2 = (curInd < len) ? str[curInd ] : '\n'; + + if (curInd == len) return next->match(str, matcher, curInd); + bool ok = is_alpha(c1) != is_alpha(c2); + if (ok && pos) return next->match(str, matcher, curInd); + return -1; +} + +// NFAEndOfMatchNode + +NFAEndOfMatchNode::NFAEndOfMatchNode() { } +int NFAEndOfMatchNode::match(const bkstring & str, Matcher * matcher, const int curInd) const +{ + if (curInd == matcher->lm) return next->match(str, matcher, curInd); + return -1; +} + +// NFAGroupHeadNode + +NFAGroupHeadNode::NFAGroupHeadNode(const int groupIndex) : gi(groupIndex) { } +int NFAGroupHeadNode::match(const bkstring & str, Matcher * matcher, const int curInd) const +{ + int ret, o = matcher->starts[gi]; + + matcher->starts[gi] = curInd; + ret = next->match(str, matcher, curInd); + if (ret < 0) matcher->starts[gi] = o; + + return ret; +} + +// NFAGroupTailNode + +NFAGroupTailNode::NFAGroupTailNode(const int groupIndex) : gi(groupIndex) { } +int NFAGroupTailNode::match(const bkstring & str, Matcher * matcher, const int curInd) const +{ + int ret, o = matcher->ends[gi]; + + matcher->ends[gi] = curInd; + ret = next->match(str, matcher, curInd); + if (ret < 0) matcher->ends[gi] = o; + + return ret; +} + +// NFAGroupLoopPrologueNode + +NFAGroupLoopPrologueNode::NFAGroupLoopPrologueNode(const int groupIndex) : gi(groupIndex) { } +int NFAGroupLoopPrologueNode::match(const bkstring & str, Matcher * matcher, const int curInd) const +{ + int ret, o1 = matcher->groups[gi], o2 = matcher->groupPos[gi], o3 = matcher->groupIndeces[gi]; + + matcher->groups[gi] = 0; + matcher->groupPos[gi] = 0; + matcher->groupIndeces[gi] = -1; + ret = next->match(str, matcher, curInd); + if (ret < 0) + { + matcher->groups[gi] = o1; + matcher->groupPos[gi] = o2; + matcher->groupIndeces[gi] = o3; + } + + return ret; +} + +// NFAGroupLoopNode + +NFAGroupLoopNode::NFAGroupLoopNode(NFANode * internal, const int minMatch, const int maxMatch, + const int groupIndex, const int matchType) +{ + inner = internal; + min = minMatch; + max = maxMatch; + gi = groupIndex; + type = matchType; +} +void NFAGroupLoopNode::findAllNodes(std::map & soFar) +{ + if (inner) inner->findAllNodes(soFar); + NFANode::findAllNodes(soFar); +} +int NFAGroupLoopNode::match(const bkstring & str, Matcher * matcher, const int curInd) const +{ + bool b = (curInd > matcher->groupIndeces[gi]); + + if (b && matcher->groups[gi] < min) + { + ++matcher->groups[gi]; + int o = matcher->groupIndeces[gi]; + matcher->groupIndeces[gi] = curInd; + int ret = inner->match(str, matcher, curInd); + if (ret < 0) + { + matcher->groupIndeces[gi] = o; + --matcher->groups[gi]; + } + return ret; + } + else if (!b || matcher->groups[gi] >= max) + { + return next->match(str, matcher, curInd); + } + else + { + switch (type) + { + case 0: return matchGreedy(str, matcher, curInd); + case 1: return matchLazy(str, matcher, curInd); + case 2: return matchPossessive(str, matcher, curInd); + } + } + return -1; +} +int NFAGroupLoopNode::matchGreedy(const bkstring & str, Matcher * matcher, const int curInd) const +{ + int o = matcher->groupIndeces[gi]; // save our info for backtracking + matcher->groupIndeces[gi] = curInd; // move along + ++matcher->groups[gi]; + int ret = inner->match(str, matcher, curInd); // match internally + if (ret < 0) + { // if we failed, then restore info and match next + --matcher->groups[gi]; + matcher->groupIndeces[gi] = o; + ret = next->match(str, matcher, curInd); + } + return ret; +} +int NFAGroupLoopNode::matchLazy(const bkstring & str, Matcher * matcher, const int curInd) const +{ + int ret = next->match(str, matcher, curInd); // be lazy, just go on + if (ret < 0) + { + int o = matcher->groupIndeces[gi]; // save info for backtracking + matcher->groupIndeces[gi] = curInd; // advance our position + ++matcher->groups[gi]; + ret = inner->match(str, matcher, curInd); // match our internal stuff + if (ret < 0) // if we failed, then restore the info + { + --matcher->groups[gi]; + matcher->groupIndeces[gi] = o; + } + } + return ret; +} +int NFAGroupLoopNode::matchPossessive(const bkstring & str, Matcher * matcher, const int curInd) const +{ + int o = matcher->groupIndeces[gi]; // save info for backtracking + matcher->groupPos[gi] = matcher->groups[gi]; // set a flag stating we have matcher at least this much + matcher->groupIndeces[gi] = curInd; // move along + ++matcher->groups[gi]; + int ret = inner->match(str, matcher, curInd); // try and match again + if (ret < 0) + { // if we fail, back off, but to an extent + --matcher->groups[gi]; + matcher->groupIndeces[gi] = o; + if (matcher->groups[gi] == matcher->groupPos[gi]) ret = next->match(str, matcher, curInd); + } + return ret; +} + +#ifdef _WIN32 + #pragma warning(pop) +#endif diff --git a/plugins/SmileyAdd/src/regexp/Pattern.h b/plugins/SmileyAdd/src/regexp/Pattern.h new file mode 100644 index 0000000000..bb16ad90fa --- /dev/null +++ b/plugins/SmileyAdd/src/regexp/Pattern.h @@ -0,0 +1,1663 @@ +#ifndef __PATTERN_H__ +#define __PATTERN_H__ + +#ifdef _WIN32 + #pragma warning(disable:4786) +#endif + +#include +#include + +#include "bkstring.h" + +class Matcher; +class NFANode; +class NFAQuantifierNode; + +/** + This pattern class is very similar in functionality to Java's + java.util.regex.Pattern class. The pattern class represents an immutable + regular expression object. Instead of having a single object contain both the + regular expression object and the matching object, instead the two objects are + split apart. The {@link Matcher Matcher} class represents the maching + object. + + The Pattern class works primarily off of "compiled" patterns. A typical + instantiation of a regular expression looks like: + +

+  Pattern * p = Pattern::compile("a*b");
+  Matcher * m = p->createMatcher("aaaaaab");
+  if (m->matches()) ...
+  
+ + However, if you do not need to use a pattern more than once, it is often times + okay to use the Pattern's static methods insteads. An example looks like this: + +
+  if (Pattern::matches("a*b", "aaaab")) { ... }
+  
+ + This class does not currently support unicode. The unicode update for this + class is coming soon. + + This class is partially immutable. It is completely safe to call createMatcher + concurrently in different threads, but the other functions (e.g. split) should + not be called concurrently on the same Pattern. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Construct + + Matches + +
+   +
+ Characters +
+ x + + The character x +
+ \\ + + The character \ +
+ \0nn + + The character with octal ASCII value nn +
+ \0nnn + + The character with octal ASCII value nnn +
+ \xhh + + The character with hexadecimal ASCII value hh +
+ \t + + A tab character +
+ \r + + A carriage return character +
+ \n + + A new-line character +
+   +
+ Character Classes +
+ [abc] + + Either a, b, or c +
+ [^abc] + + Any character but a, b, or c +
+ [a-zA-Z] + + Any character ranging from a thru z, or + A thru Z +
+ [^a-zA-Z] + + Any character except those ranging from a thru + z, or A thru Z +
+ [a\-z] + + Either a, -, or z +
+ [a-z[A-Z]] + + Same as [a-zA-Z] +
+ [a-z&&[g-i]] + + Any character in the intersection of a-z and + g-i +
+ [a-z&&[^g-i]] + + Any character in a-z and not in g-i +
+   +
+ Prefefined character classes +
+ . + + Any character. Multiline matching must be compiled into the pattern for + . to match a \r or a \n. + Even if multiline matching is enabled, . will not + match a \r\n, only a \r or a \n. +
+ \d + + [0-9] +
+ \D + + [^\d] +
+ \s + + [ \t\r\n\x0B] +
+ \S + + [^\s] +
+ \w + + [a-zA-Z0-9_] +
+ \W + + [^\w] +
+   +
+ POSIX character classes +
+ \p{Lower} + + [a-z] +
+ \p{Upper} + + [A-Z] +
+ \p{ASCII} + + [\x00-\x7F] +
+ \p{Alpha} + + [a-zA-Z] +
+ \p{Digit} + + [0-9] +
+ \p{Alnum} + + [\w&&[^_]] +
+ \p{Punct} + + [!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~] +
+ \p{XDigit} + + [a-fA-F0-9] +
+   +
+ Boundary Matches +
+ ^ + + The beginning of a line. Also matches the beginning of input. +
+ $ + + The end of a line. Also matches the end of input. +
+ \b + + A word boundary +
+ \B + + A non word boundary +
+ \A + + The beginning of input +
+ \G + + The end of the previous match. Ensures that a "next" match will only + happen if it begins with the character immediately following the end of + the "current" match. +
+ \Z + + The end of input. Will also match if there is a single trailing + \r\n, a single trailing \r, or a single + trailing \n. +
+ \z + + The end of input +
+   +
+ Greedy Quantifiers +
+ x? + + x, either zero times or one time +
+ x* + + x, zero or more times +
+ x+ + + x, one or more times +
+ x{n} + + x, exactly n times +
+ x{n,} + + x, at least n times +
+ x{,m} + + x, at most m times +
+ x{n,m} + + x, at least n times and at most + m times +
+   +
+ Possessive Quantifiers +
+ x?+ + + x, either zero times or one time +
+ x*+ + + x, zero or more times +
+ x++ + + x, one or more times +
+ x{n}+ + + x, exactly n times +
+ x{n,}+ + + x, at least n times +
+ x{,m}+ + + x, at most m times +
+ x{n,m}+ + + x, at least n times and at most + m times +
+   +
+ Reluctant Quantifiers +
+ x?? + + x, either zero times or one time +
+ x*? + + x, zero or more times +
+ x+? + + x, one or more times +
+ x{n}? + + x, exactly n times +
+ x{n,}? + + x, at least n times +
+ x{,m}? + + x, at most m times +
+ x{n,m}? + + x, at least n times and at most + m times +
+   +
+ Operators +
+ xy + + x then y +
+ x|y + + x or y +
+ (x) + + x as a capturing group +
+   +
+ Quoting +
+ \Q + + Nothing, but treat every character (including \s) literally until a + matching \E +
+ \E + + Nothing, but ends its matching \Q +
+   +
+ Special Constructs +
+ (?:x) + + x, but not as a capturing group +
+ (?=x) + + x, via positive lookahead. This means that the + expression will match only if it is trailed by x. + It will not "eat" any of the characters matched by + x. +
+ (?!x) + + x, via negative lookahead. This means that the + expression will match only if it is not trailed by + x. It will not "eat" any of the characters + matched by x. +
+ (?<=x) + + x, via positive lookbehind. x + cannot contain any quantifiers. +
+ (?x) + + x, via negative lookbehind. x + cannot contain any quantifiers. +
+ (?>x) + + x{1}+ +
+   +
+ Registered Expression Matching +
+ {x} + + The registered pattern x +
+ +
+ + Begin Text Extracted And Modified From java.util.regex.Pattern documentation + +

Backslashes, escapes, and quoting

+ +

The backslash character ('\') serves to introduce escaped + constructs, as defined in the table above, as well as to quote characters + that otherwise would be interpreted as unescaped constructs. Thus the + expression \\ matches a single backslash and \{ matches a + left brace. + +

It is an error to use a backslash prior to any alphabetic character that + does not denote an escaped construct; these are reserved for future + extensions to the regular-expression language. A backslash may be used + prior to a non-alphabetic character regardless of whether that character is + part of an unescaped construct. + +

It is necessary to double backslashes in string literals that represent + regular expressions to protect them from interpretation by a compiler. The + string literal "\b", for example, matches a single backspace + character when interpreted as a regular expression, while + "\\b" matches a word boundary. The string litera + "\(hello\)" is illegal and leads to a compile-time error; + in order to match the string (hello) the string literal + "\\(hello\\)" must be used. + +

Character Classes

+ +

Character classes may appear within other character classes, and + may be composed by the union operator (implicit) and the intersection + operator (&&). + The union operator denotes a class that contains every character that is + in at least one of its operand classes. The intersection operator + denotes a class that contains every character that is in both of its + operand classes. + +

The precedence of character-class operators is as follows, from + highest to lowest: + +

+ + + + + + + + + + + + + + + + +
1    Literal escape    \x
2    Rangea-z
3    Grouping[...]
4    Intersection[a-z&&[aeiou]]
5    Union[a-e][i-u]
+ +

Note that a different set of metacharacters are in effect inside + a character class than outside a character class. For instance, the + regular expression . loses its special meaning inside a + character class, while the expression - becomes a range + forming metacharacter. + + + + +

Groups and capturing

+ +

Capturing groups are numbered by counting their opening parentheses from + left to right. In the expression ((A)(B(C))), for example, there + are four such groups:

+ +
+ + + + + + + + + + +
1    ((A)(B(C)))
2    (A)
3    (B(C))
4    (C)
+ +

Group zero always stands for the entire expression. + +

Capturing groups are so named because, during a match, each subsequence + of the input sequence that matches such a group is saved. The captured + subsequence may be used later in the expression, via a back reference, and + may also be retrieved from the matcher once the match operation is complete. + +

The captured input associated with a group is always the subsequence + that the group most recently matched. If a group is evaluated a second time + because of quantification then its previously-captured value, if any, will + be retained if the second evaluation fails. Matching the string + "aba" against the expression (a(b)?)+, for example, leaves + group two set to "b". All captured input is discarded at the + beginning of each match. + +

Groups beginning with (? are pure, non-capturing groups + that do not capture text and do not count towards the group total. + + +

Unicode support

+ +

Coming Soon. + +

Comparison to Perl 5

+ +

The Pattern engine performs traditional NFA-based matching + with ordered alternation as occurs in Perl 5. + +

Perl constructs not supported by this class:

+ +
    + +
  • The conditional constructs (?{X}) and + (?(condition)X|Y), +

  • + +
  • The embedded code constructs (?{code}) + and (??{code}),

  • + +
  • The embedded comment syntax (?#comment), and

  • + +
  • The preprocessing operations \l \u, + \L, and \U.

  • + +
  • Embedded flags

  • + +
+ +

Constructs supported by this class but not by Perl:

+ +
    + +
  • Possessive quantifiers, which greedily match as much as they can + and do not back off, even when doing so would allow the overall match to + succeed.

  • + +
  • Character-class union and intersection as described + above.

  • + +
+ +

Notable differences from Perl:

+ +
    + +
  • In Perl, \1 through \9 are always interpreted + as back references; a backslash-escaped number greater than 9 is + treated as a back reference if at least that many subexpressions exist, + otherwise it is interpreted, if possible, as an octal escape. In this + class octal escapes must always begin with a zero. In this class, + \1 through \9 are always interpreted as back + references, and a larger number is accepted as a back reference if at + least that many subexpressions exist at that point in the regular + expression, otherwise the parser will drop digits until the number is + smaller or equal to the existing number of groups or it is one digit. +

  • + +
  • Perl uses the g flag to request a match that resumes + where the last match left off. This functionality is provided implicitly + by the Matcher class: Repeated invocations of the + find method will resume where the last match left off, + unless the matcher is reset.

  • + +
  • Perl is forgiving about malformed matching constructs, as in the + expression *a, as well as dangling brackets, as in the + expression abc], and treats them as literals. This + class also strict and will not compile a pattern when dangling characters + are encountered.

  • + +
+ + +

For a more precise description of the behavior of regular expression + constructs, please see + Mastering Regular Expressions, 2nd Edition, Jeffrey E. F. Friedl, + O'Reilly and Associates, 2002. +

+

+ + End Text Extracted And Modified From java.util.regex.Pattern documentation + +


+ + @author Jeffery Stuart + @since March 2003, Stable Since November 2004 + @version 1.07.00 + @memo A class used to represent "PERL 5"-ish regular expressions + */ +class Pattern +{ + friend class Matcher; + friend class NFANode; + friend class NFAQuantifierNode; + private: + /** + This constructor should not be called directly. Those wishing to use the + Pattern class should instead use the {@link compile compile} method. + + @param rhs The pattern to compile + @memo Creates a new pattern from the regular expression in rhs. + */ + Pattern(const bkstring & rhs); + protected: + /** + This currently is not used, so don't try to do anything with it. + @memo Holds all the compiled patterns for quick access. + */ + static std::map compiledPatterns; + /** + Holds all of the registered patterns as strings. Due to certain problems + with compilation of patterns, especially with capturing groups, this seemed + to be the best way to do it. + */ + static std::map > registeredPatterns; + protected: + /** + Holds all the NFA nodes used. This makes deletion of a pattern, as well as + clean-up from an unsuccessful compile much easier and faster. + */ + std::map nodes; + /** + Used when methods like split are called. The matcher class uses a lot of + dynamic memeory, so having an instance increases speedup of certain + operations. + */ + Matcher * matcher; + /** + The front node of the NFA. + */ + NFANode * head; + /** + The actual regular expression we rerpesent + */ + bkstring pattern; + /** + Flag used during compilation. Once the pattern is successfully compiled, + error is no longer used. + */ + bool error; + /** + Used during compilation to keep track of the current index into + {@link pattern pattern}. Once the pattern is successfully + compiled, error is no longer used. + */ + int curInd; + /** + The number of capture groups this contains. + */ + int groupCount; + /** + The number of non-capture groups this contains. + */ + int nonCapGroupCount; + /** + The flags specified when this was compiled. + */ + unsigned long flags; + protected: + /** + Raises an error during compilation. Compilation will cease at that point + and compile will return NULL. + */ + void raiseError(); + /** + Convenience function for registering a node in nodes. + @param node The node to register + @return The registered node + */ + NFANode * registerNode(NFANode * node); + + /** + Calculates the union of two strings. This function will first sort the + strings and then use a simple selection algorithm to find the union. + @param s1 The first "class" to union + @param s2 The second "class" to union + @return A new string containing all unique characters. Each character + must have appeared in one or both of s1 and + s2. + */ + bkstring classUnion (bkstring s1, bkstring s2) const; + /** + Calculates the intersection of two strings. This function will first sort + the strings and then use a simple selection algorithm to find the + intersection. + @param s1 The first "class" to intersect + @param s2 The second "class" to intersect + @return A new string containing all unique characters. Each character + must have appeared both s1 and s2. + */ + bkstring classIntersect (bkstring s1, bkstring s2) const; + /** + Calculates the negation of a string. The negation is the set of all + characters between \x00 and \xFF not + contained in s1. + @param s1 The "class" to be negated. + @param s2 The second "class" to intersect + @return A new string containing all unique characters. Each character + must have appeared both s1 and s2. + */ + bkstring classNegate (bkstring s1) const; + /** + Creates a new "class" representing the range from low thru + hi. This function will wrap if low > + hi. This is a feature, not a buf. Sometimes it is useful + to be able to say [\x70-\x10] instead of [\x70-\x7F\x00-\x10]. + @param low The beginning character + @param hi The ending character + @return A new string containing all the characters from low thru hi. + */ + bkstring classCreateRange(char low, char hi) const; + + /** + Extracts a decimal number from the substring of member-variable + {@link pattern pattern} starting at start and + ending at end. + @param start The starting index in {@link pattern pattern} + @param end The last index in {@link pattern pattern} + @return The decimal number in {@link pattern pattern} + */ + int getInt(int start, int end); + /** + Parses a {n,m} string out of the member-variable + {@link pattern pattern} stores the result in sNum + and eNum. + @param sNum Output parameter. The minimum number of matches required + by the curly quantifier are stored here. + @param eNum Output parameter. The maximum number of matches allowed + by the curly quantifier are stored here. + @return Success/Failure. Fails when the curly does not have the proper + syntax + */ + bool quantifyCurly(int & sNum, int & eNum); + /** + Tries to quantify the currently parsed group. If the group being parsed + is indeed quantified in the member-variable + {@link pattern pattern}, then the NFA is modified accordingly. + @param start The starting node of the current group being parsed + @param stop The ending node of the current group being parsed + @param gn The group number of the current group being parsed + @return The node representing the starting node of the group. If the + group becomes quantified, then this node is not necessarily + a GroupHead node. + */ + NFANode * quantifyGroup(NFANode * start, NFANode * stop, const int gn); + + /** + Tries to quantify the last parsed expression. If the character was indeed + quantified, then the NFA is modified accordingly. + @param newNode The recently created expression node + @return The node representing the last parsed expression. If the + expression was quantified, return value != newNode + */ + NFANode * quantify(NFANode * newNode); + /** + Parses the current class being examined in + {@link pattern pattern}. + @return A string of unique characters contained in the current class being + parsed + */ + bkstring parseClass(); + /** + Parses the current POSIX class being examined in + {@link pattern pattern}. + @return A string of unique characters representing the POSIX class being + parsed + */ + bkstring parsePosix(); + /** + Returns a string containing the octal character being parsed + @return The string contained the octal value being parsed + */ + bkstring parseOctal(); + /** + Returns a string containing the hex character being parsed + @return The string contained the hex value being parsed + */ + bkstring parseHex(); + /** + Returns a new node representing the back reference being parsed + @return The new node representing the back reference being parsed + */ + NFANode * parseBackref(); + /** + Parses the escape sequence currently being examined. Determines if the + escape sequence is a class, a single character, or the beginning of a + quotation sequence. + @param inv Output parameter. Whether or not to invert the returned class + @param quo Output parameter. Whether or not this sequence starts a + quotation. + @return The characters represented by the class + */ + bkstring parseEscape(bool & inv, bool & quo); + /** + Parses a supposed registered pattern currently under compilation. If the + sequence of characters does point to a registered pattern, then the + registered pattern is appended to *end. The registered pattern + is parsed with the current compilation flags. + @param end The ending node of the thus-far compiled pattern + @return The new end node of the current pattern + */ + NFANode * parseRegisteredPattern(NFANode ** end); + /** + Parses a lookbehind expression. Appends the necessary nodes + *end. + @param pos Positive or negative look behind + @param end The ending node of the current pattern + @return The new end node of the current pattern + */ + NFANode * parseBehind(const bool pos, NFANode ** end); + /** + Parses the current expression and tacks on nodes until a \E is found. + @return The end of the current pattern + */ + NFANode * parseQuote(); + /** + Parses {@link pattern pattern}. This function is called + recursively when an or (|) or a group is encountered. + @param inParen Are we currently parsing inside a group + @param inOr Are we currently parsing one side of an or (|) + @param end The end of the current expression + @return The starting node of the NFA constructed from this parse + */ + NFANode * parse(const bool inParen = 0, const bool inOr = 0, NFANode ** end = NULL); + public: + /// We should match regardless of case + const static unsigned long CASE_INSENSITIVE; + /// We are implicitly quoted + const static unsigned long LITERAL; + /// @memo We should treat a . as [\x00-\x7F] + const static unsigned long DOT_MATCHES_ALL; + /** ^ and $ should anchor to the beginning and + ending of lines, not all input + */ + const static unsigned long MULTILINE_MATCHING; + /** When enabled, only instances of \n are recognized as + line terminators + */ + const static unsigned long UNIX_LINE_MODE; + /// The absolute minimum number of matches a quantifier can match (0) + const static int MIN_QMATCH; + /// The absolute maximum number of matches a quantifier can match (0x7FFFFFFF) + const static int MAX_QMATCH; + public: + /** + Call this function to compile a regular expression into a + Pattern object. Special values can be assigned to + mode when certain non-standard behaviors are expected from + the Pattern object. + @param pattern The regular expression to compile + @param mode A bitwise or of flags signalling what special behaviors are + wanted from this Pattern object + @return If successful, compile returns a Pattern + pointer. Upon failure, compile returns + NULL + */ + static Pattern * compile (const bkstring & pattern, + const unsigned long mode = 0); + /** + Dont use this function. This function will compile a pattern, and cache + the result. This will eventually be used as an optimization when people + just want to call static methods using the same pattern over and over + instead of first compiling the pattern and then using the compiled + instance for matching. + @param pattern The regular expression to compile + @param mode A bitwise or of flags signalling what special behaviors are + wanted from this Pattern object + @return If successful, compileAndKeep returns a + Pattern pointer. Upon failure, compile + returns NULL. + */ + static Pattern * compileAndKeep (const bkstring & pattern, + const unsigned long mode = 0); + + /** + Searches through replace and replaces all substrings matched + by pattern with str. str may + contain backreferences (e.g. \1) to capture groups. A typical + invocation looks like: +

+ + Pattern::replace("(a+)b(c+)", "abcccbbabcbabc", "\\2b\\1"); + +

+ which would replace abcccbbabcbabc with + cccbabbcbabcba. + @param pattern The regular expression + @param str The replacement text + @param replacementText The string in which to perform replacements + @param mode The special mode requested of the Pattern + during the replacement process + @return The text with the replacement string substituted where necessary + */ + static bkstring replace (const bkstring & pattern, + const bkstring & str, + const bkstring & replacementText, + const unsigned long mode = 0); + + /** + Splits the specified string over occurrences of the specified pattern. + Empty strings can be optionally ignored. The number of strings returned is + configurable. A typical invocation looks like: +

+ + bkstring str(strSize, '\0');
+ FILE * fp = fopen(fileName, "r");
+ fread((char*)str.data(), strSize, 1, fp);
+ fclose(fp);
+
+ std::vector<bkstring> lines = Pattern::split("[\r\n]+", str, true);
+
+
+ + @param pattern The regular expression + @param replace The string to split + @param keepEmptys Whether or not to keep empty strings + @param limit The maximum number of splits to make + @param mode The special mode requested of the Pattern + during the split process + @return All substrings of str split across pattern. + */ + static std::vector split (const bkstring & pattern, + const bkstring & str, + const bool keepEmptys = 0, + const unsigned long limit = 0, + const unsigned long mode = 0); + + /** + Finds all the instances of the specified pattern within the string. You + should be careful to only pass patterns with a minimum length of one. For + example, the pattern a* can be matched by an empty string, so + instead you should pass a+ since at least one character must + be matched. A typical invocation of findAll looks like: +

+ + std::vector<td::string> numbers = Pattern::findAll("\\d+", string); + +

+ + @param pattern The pattern for which to search + @param str The string to search + @param mode The special mode requested of the Pattern + during the find process + @return All instances of pattern in str + */ + static std::vector findAll (const bkstring & pattern, + const bkstring & str, + const unsigned long mode = 0); + + /** + Determines if an entire string matches the specified pattern + + @param pattern The pattern for to match + @param str The string to match + @param mode The special mode requested of the Pattern + during the replacement process + @return True if str is recognized by pattern + */ + static bool matches (const bkstring & pattern, + const bkstring & str, + const unsigned long mode = 0); + + /** + Registers a pattern under a specific name for use in later compilations. + A typical invocation and later use looks like: +

+ + Pattern::registerPattern("ip", "(?:\\d{1,3}\\.){3}\\d{1,3}");
+ Pattern * p1 = Pattern::compile("{ip}:\\d+");
+ Pattern * p2 = Pattern::compile("Connection from ({ip}) on port \\d+");
+
+

+ Multiple calls to registerPattern with the same + name will result in the pattern getting overwritten. + + @param name The name to give to the pattern + @param pattern The pattern to register + @param mode Any special flags to use when compiling pattern + @return Success/Failure. Fails only if pattern has invalid + syntax + */ + static bool registerPattern(const bkstring & name, + const bkstring & pattern, + const unsigned long mode = 0); + + /** + Clears the pattern registry + */ + static void unregisterPatterns(); + /** + Don't use + */ + static void clearPatternCache(); + + /** + Searches through a string for the nth match of the + given pattern in the string. Match indeces start at zero, not one. + A typical invocation looks like this: +

+ + std::pair<bkstring, int> match = Pattern::findNthMatch("\\d{1,3}", "192.168.1.101:22", 1);
+ printf("%s %i\n", match.first.c_str(), match.second);
+
+ Output: 168 4
+
+ + @param pattern The pattern for which to search + @param str The string to search + @param matchNum Which match to find + @param mode Any special flags to use during the matching process + @return A string and an integer. The string is the string matched. The + integer is the starting location of the matched string in + str. You can check for success/failure by making sure + that the integer returned is greater than or equal to zero. + */ + static std::pair findNthMatch (const bkstring & pattern, + const bkstring & str, + const int matchNum, + const unsigned long mode = 0); + public: + /** + Deletes all NFA nodes allocated during compilation + */ + ~Pattern(); + + bkstring replace (const bkstring & str, + const bkstring & replacementText); + std::vector split (const bkstring & str, const bool keepEmptys = 0, + const unsigned long limit = 0); + std::vector findAll (const bkstring & str); + bool matches (const bkstring & str); + /** + Returns the flags used during compilation of this pattern + @return The flags used during compilation of this pattern + */ + unsigned long getFlags () const; + /** + Returns the regular expression this pattern represents + @return The regular expression this pattern represents + */ + bkstring getPattern () const; + /** + Creates a matcher object using the specified string and this pattern. + @param str The string to match against + @return A new matcher using object using this pattern and the specified + string + */ + Matcher * createMatcher (const bkstring & str); +}; + +class NFANode +{ + friend class Matcher; + public: + NFANode * next; + NFANode(); + virtual ~NFANode(); + virtual void findAllNodes(std::map & soFar); + virtual int match(const bkstring & str, Matcher * matcher, const int curInd = 0) const = 0; + inline virtual bool isGroupHeadNode() const { return false; } + inline virtual bool isStartOfInputNode() const { return false; } +}; +class NFACharNode : public NFANode +{ + protected: + char ch; + public: + NFACharNode(const char c); + virtual int match(const bkstring & str, Matcher * matcher, const int curInd = 0) const; +}; +class NFACICharNode : public NFANode +{ + protected: + char ch; + public: + NFACICharNode(const char c); + virtual int match(const bkstring & str, Matcher * matcher, const int curInd = 0) const; +}; +class NFAStartNode : public NFANode +{ + public: + NFAStartNode(); + virtual int match(const bkstring & str, Matcher * matcher, const int curInd = 0) const; +}; +class NFAEndNode : public NFANode +{ + public: + NFAEndNode(); + virtual int match(const bkstring & str, Matcher * matcher, const int curInd = 0) const; +}; +class NFAQuantifierNode : public NFANode +{ + public: + int min, max; + NFANode * inner; + virtual void findAllNodes(std::map & soFar); + NFAQuantifierNode(Pattern * pat, NFANode * internal, + const int minMatch = Pattern::MIN_QMATCH, + const int maxMatch = Pattern::MAX_QMATCH); + virtual int match(const bkstring & str, Matcher * matcher, const int curInd = 0) const; +}; +class NFAGreedyQuantifierNode : public NFAQuantifierNode +{ + public: + NFAGreedyQuantifierNode(Pattern * pat, NFANode * internal, + const int minMatch = Pattern::MIN_QMATCH, + const int maxMatch = Pattern::MAX_QMATCH); + virtual int match(const bkstring & str, Matcher * matcher, const int curInd = 0) const; + virtual int matchInternal(const bkstring & str, Matcher * matcher, const int curInd, const int soFar) const; +}; +class NFALazyQuantifierNode : public NFAQuantifierNode +{ + public: + NFALazyQuantifierNode(Pattern * pat, NFANode * internal, + const int minMatch = Pattern::MIN_QMATCH, + const int maxMatch = Pattern::MAX_QMATCH); + virtual int match(const bkstring & str, Matcher * matcher, const int curInd = 0) const; +}; +class NFAPossessiveQuantifierNode : public NFAQuantifierNode +{ + public: + NFAPossessiveQuantifierNode(Pattern * pat, NFANode * internal, + const int minMatch = Pattern::MIN_QMATCH, + const int maxMatch = Pattern::MAX_QMATCH); + virtual int match(const bkstring & str, Matcher * matcher, const int curInd = 0) const; +}; +class NFAAcceptNode : public NFANode +{ + public: + NFAAcceptNode(); + virtual int match(const bkstring & str, Matcher * matcher, const int curInd = 0) const; +}; +class NFAClassNode : public NFANode +{ + public: + bool inv; + std::map vals; + NFAClassNode(const bool invert = 0); + NFAClassNode(const bkstring & clazz, const bool invert); + virtual int match(const bkstring & str, Matcher * matcher, const int curInd = 0) const; +}; +class NFACIClassNode : public NFANode +{ + public: + bool inv; + std::map vals; + NFACIClassNode(const bool invert = 0); + NFACIClassNode(const bkstring & clazz, const bool invert); + virtual int match(const bkstring & str, Matcher * matcher, const int curInd = 0) const; +}; +class NFASubStartNode : public NFANode +{ + public: + NFASubStartNode(); + virtual int match(const bkstring & str, Matcher * matcher, const int curInd = 0) const; +}; +class NFAOrNode : public NFANode +{ + public: + NFANode * one; + NFANode * two; + NFAOrNode(NFANode * first, NFANode * second); + virtual void findAllNodes(std::map & soFar); + virtual int match(const bkstring & str, Matcher * matcher, const int curInd = 0) const; +}; +class NFAQuoteNode : public NFANode +{ + public: + bkstring qStr; + NFAQuoteNode(const bkstring & quoted); + virtual int match(const bkstring & str, Matcher * matcher, const int curInd = 0) const; +}; +class NFACIQuoteNode : public NFANode +{ + public: + bkstring qStr; + NFACIQuoteNode(const bkstring & quoted); + virtual int match(const bkstring & str, Matcher * matcher, const int curInd = 0) const; +}; +class NFALookAheadNode : public NFANode +{ + public: + bool pos; + NFANode * inner; + NFALookAheadNode(NFANode * internal, const bool positive); + virtual void findAllNodes(std::map & soFar); + virtual int match(const bkstring & str, Matcher * matcher, const int curInd = 0) const; +}; +class NFALookBehindNode : public NFANode +{ + public: + bool pos; + bkstring mStr; + NFALookBehindNode(const bkstring & str, const bool positive); + virtual int match(const bkstring & str, Matcher * matcher, const int curInd = 0) const; +}; +class NFAStartOfLineNode : public NFANode +{ + public: + NFAStartOfLineNode(); + virtual int match(const bkstring & str, Matcher * matcher, const int curInd = 0) const; +}; +class NFAEndOfLineNode : public NFANode +{ + public: + NFAEndOfLineNode(); + virtual int match(const bkstring & str, Matcher * matcher, const int curInd = 0) const; +}; +class NFAReferenceNode : public NFANode +{ + public: + int gi; + NFAReferenceNode(const int groupIndex); + virtual int match(const bkstring & str, Matcher * matcher, const int curInd = 0) const; +}; +class NFAStartOfInputNode : public NFANode +{ + public: + NFAStartOfInputNode(); + virtual int match(const bkstring & str, Matcher * matcher, const int curInd = 0) const; + inline virtual bool isStartOfInputNode() const { return true; } +}; +class NFAEndOfInputNode : public NFANode +{ + public: + bool term; + NFAEndOfInputNode(const bool lookForTerm); + virtual int match(const bkstring & str, Matcher * matcher, const int curInd = 0) const; +}; +class NFAWordBoundaryNode : public NFANode +{ + public: + bool pos; + NFAWordBoundaryNode(const bool positive); + virtual int match(const bkstring & str, Matcher * matcher, const int curInd = 0) const; +}; +class NFAEndOfMatchNode : public NFANode +{ + public: + NFAEndOfMatchNode(); + virtual int match(const bkstring & str, Matcher * matcher, const int curInd = 0) const; +}; +class NFAGroupHeadNode : public NFANode +{ + public: + int gi; + NFAGroupHeadNode(const int groupIndex); + virtual int match(const bkstring & str, Matcher * matcher, const int curInd = 0) const; + inline virtual bool isGroupHeadNode() const { return true; } +}; +class NFAGroupTailNode : public NFANode +{ + public: + int gi; + NFAGroupTailNode(const int groupIndex); + virtual int match(const bkstring & str, Matcher * matcher, const int curInd = 0) const; +}; +class NFAGroupLoopPrologueNode : public NFANode +{ + public: + int gi; + NFAGroupLoopPrologueNode(const int groupIndex); + virtual int match(const bkstring & str, Matcher * matcher, const int curInd = 0) const; +}; +class NFAGroupLoopNode : public NFANode +{ + public: + int gi, min, max, type; + NFANode * inner; + NFAGroupLoopNode(NFANode * internal, const int minMatch, + const int maxMatch, const int groupIndex, const int matchType); + virtual void findAllNodes(std::map & soFar); + virtual int match(const bkstring & str, Matcher * matcher, const int curInd = 0) const; + int matchGreedy(const bkstring & str, Matcher * matcher, const int curInd = 0) const; + int matchLazy(const bkstring & str, Matcher * matcher, const int curInd = 0) const; + int matchPossessive(const bkstring & str, Matcher * matcher, const int curInd = 0) const; +}; + +#endif + diff --git a/plugins/SmileyAdd/src/regexp/WCMatcher.cpp b/plugins/SmileyAdd/src/regexp/WCMatcher.cpp new file mode 100644 index 0000000000..bed5a1944b --- /dev/null +++ b/plugins/SmileyAdd/src/regexp/WCMatcher.cpp @@ -0,0 +1,181 @@ +#include "WCMatcher.h" +#include "WCPattern.h" + +const int WCMatcher::MATCH_ENTIRE_STRING = 0x01; + +/* + Detailed documentation is provided in this class' header file + + @author Jeffery Stuart + @since November 2004 + @version 1.07.00 +*/ + +WCMatcher::WCMatcher(WCPattern * pattern, const bkstring & text) +{ + pat = pattern; + str = &text; + gc = pattern->groupCount; + ncgc = -pattern->nonCapGroupCount; + flags = 0; + matchedSomething = false; + starts = new int[gc + ncgc]; + ends = new int[gc + ncgc]; + groups = new int[gc + ncgc]; + groupPos = new int[gc + ncgc]; + groupIndeces = new int[gc + ncgc]; + starts = starts + ncgc; + ends = ends + ncgc; + groups = groups + ncgc; + groupPos = groupPos + ncgc; + groupIndeces = groupIndeces + ncgc; + for (int i = 0; i < gc; ++i) starts[i] = ends[i] = 0; +} +WCMatcher::~WCMatcher() +{ + delete [] (starts - ncgc); + delete [] (ends - ncgc); + delete [] (groups - ncgc); + delete [] (groupIndeces - ncgc); + delete [] (groupPos - ncgc); +} +void WCMatcher::clearGroups() +{ + int i; + lm = 0; + for (i = 0; i < gc; ++i) groups[i] = starts[i] = ends[i] = -1; + for (i = 1; i <= ncgc; ++i) groups[0 - i] = starts[0 - i] = ends[0 - i] = -1; +} +bkstring WCMatcher::replaceWithGroups(const bkstring & str) +{ + bkstring ret = L""; + + bkstring t = str; + while (t.size() > 0) + { + if (t[0] == (wchar_t)'\\') + { + t.erase(0, 1); + if (t.size() == 0) + { + ret += L"\\"; + } + else if (t[0] < (wchar_t)'0' || t[0] > (wchar_t)'9') + { + ret += t[0]; + t.erase(0, 1); + } + else + { + int gn = 0; + while (t.size() > 0 && t[0] >= (wchar_t)'0' && t[0] <= (wchar_t)'9') + { + gn = gn * 10 + (t[0] - (wchar_t)'0'); + t.erase(0, 1); + } + ret += getGroup(gn); + } + } + else + { + ret += t[0]; + t.erase(0, 1); + } + } + + return ret; +} +unsigned long WCMatcher::getFlags() const +{ + return flags; +} +const bkstring& WCMatcher::getText() const +{ + return *str; +} + +bool WCMatcher::matches() +{ + flags = MATCH_ENTIRE_STRING; + matchedSomething = false; + clearGroups(); + lm = 0; + return pat->head->match(*str, this, 0) == (int)str->size(); +} +bool WCMatcher::findFirstMatch() +{ + starts[0] = 0; + flags = 0; + clearGroups(); + start = 0; + lm = 0; + ends[0] = pat->head->match(*str, this, 0); + if (ends[0] >= 0) + { + matchedSomething = true; + return 1; + } + return 0; +} +bool WCMatcher::findNextMatch() +{ + int s = starts[0], e = ends[0]; + + if (!matchedSomething) return findFirstMatch(); + if (s == e) ++e; + flags = 0; + clearGroups(); + + starts[0] = e; + if (e >= (int)str->size()) return 0; + start = e; + lm = e; + ends[0] = pat->head->match(*str, this, e); + return ends[0] >= 0; +} +std::vector WCMatcher::findAll() +{ + std::vector ret; + reset(); + while (findNextMatch()) + { + ret.push_back(getGroup()); + } + return ret; +} + +void WCMatcher::reset() +{ + lm = 0; + clearGroups(); + matchedSomething = false; +} + +int WCMatcher::getStartingIndex(const int groupNum) const +{ + if (groupNum < 0 || groupNum >= gc) return -1; + return starts[groupNum]; +} +int WCMatcher::getEndingIndex(const int groupNum) const +{ + if (groupNum < 0 || groupNum >= gc) return -1; + return ends[groupNum]; +} +bkstring WCMatcher::getGroup(const int groupNum) const +{ + if (groupNum < 0 || groupNum >= gc) return L""; + if (starts[groupNum] < 0 || ends[groupNum] < 0) return L""; + return str->substr(starts[groupNum], ends[groupNum] - starts[groupNum]); +} +std::vector WCMatcher::getGroups(const bool includeGroupZero) const +{ + int i, start = (includeGroupZero ? 0 : 1); + std::vector ret; + + for (i = start; i < gc; ++i) + { + ret.push_back(getGroup(i)); + } + return ret; +} + diff --git a/plugins/SmileyAdd/src/regexp/WCMatcher.h b/plugins/SmileyAdd/src/regexp/WCMatcher.h new file mode 100644 index 0000000000..23cc49e41f --- /dev/null +++ b/plugins/SmileyAdd/src/regexp/WCMatcher.h @@ -0,0 +1,234 @@ +#ifndef __WCMATCHER_H__ +#define __WCMATCHER_H__ + +#include "bkstring.h" +#include +#include + +/** + A matcher is a non thread-safe object used to scan strings using a given + {@link WCPattern WCPattern} object. Using a WCMatcher is the preferred + method for scanning strings. WCMatchers are not thread-safe. WCMatchers require + very little dynamic memory, hence one is encouraged to create several + instances of a matcher when necessary as opposed to sharing a single instance + of a matcher. +

+ The most common methods needed by the matcher are matches, + findNextMatch, and getGroup. matches + and findNextMatch both return success or failure, and further + details can be gathered from their documentation. +

+ Unlike Java's WCMatcher, this class allows you to change the string + you are matching against. This provides a small optimization, since you no + longer need multiple matchers for a single pattern in a single thread. +

+ This class also provides an extremely handy method for replacing text with + captured data via the replaceWithGroups method. A typical + invocation looks like: +

+  wchar_t buf[10000];
+  bkstring str = "\\5 (user name \\1) uses \\7 for his/her shell and \\6 is their home directory";
+  FILE * fp = fopen("/etc/passwd", "r");
+  WCPattern::registerWCPattern("entry", "[^:]+");
+  WCPattern * p = WCPattern::compile("^({entry}):({entry}):({entry}):({entry}):({entry}):({entry}):({entry})$",
+                                 WCPattern::MULTILINE_MATCHING | WCPattern::UNIX_LINE_MODE);
+  WCMatcher * m = p->createWCMatcher("");
+  while (fgets(buf, 9999, fp))
+  {
+    m->setString(buf);
+    if (m->matches())
+    {
+      printf("%s\n", m->replaceWithGroups(str).c_str());
+    }
+  }
+  fclose(fp);
+
+  
+ Calling any of the following functions before first calling + matches, findFirstMatch, or + findNextMatch results in undefined behavior and may cause your + program to crash. + +
    +
  • replaceWithGroups +
  • getStartingIndex
  • +
  • getEndingIndex
  • +
  • getGroup
  • +
  • getGroups
  • +
+
+

+ The function findFirstMatch will attempt to find the first match + in the input string. The same results can be obtained by first calling + reset followed by findNextMatch. +

+ To eliminate the necessity of looping through a string to find all the + matching substrings, findAll was created. The function will find + all matching substrings and return them in a vector. If you need + to examine specific capture groups within the substrings, then this method + should not be used. + + @author Jeffery Stuart + @since March 2003, Stable Since November 2004 + @version 1.05.00 + @memo Mutable object used on instances of a WCPattern class + */ +class WCMatcher +{ + friend class NFAUNode; + friend class NFAStartUNode; + friend class NFAEndUNode; + friend class NFAGroupHeadUNode; + friend class NFAGroupLoopUNode; + friend class NFAGroupLoopPrologueUNode; + friend class NFAGroupTailUNode; + friend class NFALookBehindUNode; + friend class NFAStartOfLineUNode; + friend class NFAEndOfLineUNode; + friend class NFAEndOfMatchUNode; + friend class NFAReferenceUNode; + friend class WCPattern; + private: + /** + Creates a new matcher object against text using + pattern. + + @param pattern The pattern with which to search + @param text The text in which to search + */ + WCMatcher(WCPattern * pattern, const bkstring & text); + protected: + /// The pattern we use to match + WCPattern * pat; + /// The string in which we are matching + const bkstring * str; + /// The starting point of our match + int start; + /// An array of the starting positions for each group + int * starts; + /// An array of the ending positions for each group + int * ends; + /// An array of private data used by NFAUNodes during matching + int * groups; + /// An array of private data used by NFAUNodes during matching + int * groupIndeces; + /// An array of private data used by NFAUNodes during matching + int * groupPos; + /// The ending index of the last match + int lm; + /// The number of capturing groups we have + int gc; + /// The number of non-capturing groups we havew + int ncgc; + /// Whether or not we have matched something (used only by findFirstMatch and findNextMatch) + int matchedSomething; + /// The flags with which we were made + unsigned long flags; + /// Called by reset to clear the group arrays + void clearGroups(); + public: + /// Used internally by match to signify we want the entire string matched + const static int MATCH_ENTIRE_STRING; + public: + /// Cleans up the dynamic memory used by this matcher + ~WCMatcher(); + /** + Replaces the contents of str with the appropriate captured + text. str should have at least one back reference, otherwise + this function does nothing. + @param str The string in which to replace text + @return A string with all backreferences appropriately replaced + */ + bkstring replaceWithGroups(const bkstring & str); + /** + The flags currently being used by the matcher. + @return Zero + */ + unsigned long getFlags() const; + /** + The text being searched by the matcher. + @return the text being searched by the matcher. + */ + const bkstring& getText() const; + + /** + Scans the string from start to finish for a match. The entire string must + match for this function to return success. Group variables are + appropriately set and can be queried after this function returns. + + @return Success if and only if the entire string matches the pattern + */ + bool matches(); + /** + Scans the string for the first substring matching the pattern. The entire + string does not necessarily have to match for this function to return + success. Group variables are appropriately set and can be queried after + this function returns. + + @return Success if any substring matches the specified pattern + */ + bool findFirstMatch(); + /** + Scans the string for the next substring matching the pattern. If no calls + have been made to findFirstMatch of findNextMatch since the last call to + reset, matches, or setString, then this function's behavior results to + that of findFirstMatch. + + @return Success if another substring can be found that matches the pattern + */ + bool findNextMatch(); + /** + Returns a vector of every substring in order which matches the given + pattern. + + @return Every substring in order which matches the given pattern + */ + std::vector findAll(); + /** + Resets the internal state of the matcher + */ + void reset(); + /** + Same as getText. Left n for backwards compatibilty with old source code + @return Returns the string that is currently being used for matching + */ + inline const bkstring& getString() const { return *str; } + /** + Sets the string to scan + @param newStr The string to scan for subsequent matches + */ + inline void setString(const bkstring & newStr) { str = &newStr; reset(); } + + /** + Returns the starting index of the specified group. + @param groupNum The group to query + @return The starting index of the group if it was matched, -1 for an + invalid group or if the group was not matched + */ + int getStartingIndex(const int groupNum = 0) const; + /** + Returns the ending index of the specified group. + @param groupNum The group to query + @return The ending index of the group if it was matched, -1 for an + invalid group or if the group was not matched + */ + int getEndingIndex(const int groupNum = 0) const; + /** + Returns the specified group. An empty string ("") does not necessarily + mean the group was not matched. A group such as (a*b?) could be matched by + a zero length. If an empty string is returned, getStartingIndex can be + called to determine if the group was actually matched. + @param groupNum The group to query + @return The text of the group + */ + bkstring getGroup(const int groupNum = 0) const; + /** + Returns every capture group in a vector + + @param includeGroupZero Whether or not include capture group zero + @return Every capture group + */ + std::vector getGroups(const bool includeGroupZero = 0) const; +}; + +#endif diff --git a/plugins/SmileyAdd/src/regexp/WCPattern.cpp b/plugins/SmileyAdd/src/regexp/WCPattern.cpp new file mode 100644 index 0000000000..25f379f5e4 --- /dev/null +++ b/plugins/SmileyAdd/src/regexp/WCPattern.cpp @@ -0,0 +1,1747 @@ +/** + From the author (Jeff Stuart) + " + Let me start by saying this file is pretty big. If you feel up to it, you can + try making changes yourself, but you would be better off to just email me at + stuart@cs.ucdavis.edu if you think there is a bug, or have something useful you + would like added. This project is very "near and dear" to me, so I am fairly quick + to make bug fixes. The header files for WCPattern and WCMatcher are fairly well + documented and the function names are pretty self-explanatory, but if you are having + any trouble, feel free to email me at stuart@cs.ucdavis.edu. + + If you email me, make sure you put something like C++RE in the subject because + I tend to delete email if I don't recognize the name and the subject is + something like "I Need Your Help" or "Got A Second" or "I Found It". + " + */ + +/* + Detailed documentation is provided in this class' header file + + @author Jeffery Stuart + @since November 2004 + @version 1.07.00 +*/ + +#ifdef _WIN32 + #pragma warning(push) + #pragma warning(disable:4996) +#endif + +#include +#include +#include +#include +#ifndef _WIN32 + #include +#endif + +std::map WCPattern::compiledWCPatterns; +std::map > WCPattern::registeredWCPatterns; + +const int WCPattern::MIN_QMATCH = 0x00000000; +const int WCPattern::MAX_QMATCH = 0x7FFFFFFF; + +const unsigned long WCPattern::CASE_INSENSITIVE = 0x01; +const unsigned long WCPattern::LITERAL = 0x02; +const unsigned long WCPattern::DOT_MATCHES_ALL = 0x04; +const unsigned long WCPattern::MULTILINE_MATCHING = 0x08; +const unsigned long WCPattern::UNIX_LINE_MODE = 0x10; + +#define to_lower(a) (wchar_t)(UINT_PTR)CharLowerW((LPWSTR)(unsigned)a) +#define is_alpha IsCharAlphaW + +#if defined(_WIN32) + #define str_icmp lstrcmpiW +#elif defined(__CYGWIN__) || defined(__APPLE__) + #include + static inline int str_icmp(const wchar_t * a, const wchar_t * b) + { + while (*a && *b) + { + const int t = (int)towlower(*a) - (int)tolower(*b); + if (t) return t; + ++a; ++b; + } + if (*a) + { + if (*b) return (int)towlower(*a) - (int)tolower(*b); + return 1; + } + else if (*b) return 1; + return 0; + } +#else + #define str_icmp wcscasecmp +#endif + +WCPattern::WCPattern(const bkstring & rhs) +{ + matcher = NULL; + pattern = rhs; + curInd = 0; + groupCount = 0; + nonCapGroupCount = 0; + error = 0; + head = NULL; +} +// convenience function in case we want to add any extra debugging output +void WCPattern::raiseError() +{ +/* switch (pattern[curInd - 1]) + { + case '*': + case ')': + case '+': + case '?': + case ']': + case '}': + fwprintf(stderr, L"%s\n%*c^\n", pattern.c_str(), curInd - 1, ' '); + fwprintf(stderr, L"Syntax Error near here. Possible unescaped meta character.\n"); + break; + default: + fwprintf(stderr, L"%s\n%*c^\n", pattern.c_str(), curInd - 1, ' '); + fwprintf(stderr, L"Syntax Error near here. \n"); + break; + }*/ + error = 1; +} +NFAUNode * WCPattern::registerNode(NFAUNode * node) +{ + nodes[node] = 1; + return node; +} + +bkstring WCPattern::classUnion (bkstring s1, bkstring s2) const +{ + wchar_t * out = new wchar_t[66000]; + std::sort(s1.begin(), s1.end()); + std::sort(s2.begin(), s2.end()); + wchar_t* p = std::set_union(s1.begin(), s1.end(), s2.begin(), s2.end(), out); *p = 0; + bkstring ret = out; + delete [] out; + return ret; +} +bkstring WCPattern::classIntersect (bkstring s1, bkstring s2) const +{ + wchar_t * out = new wchar_t[66000]; + std::sort(s1.begin(), s1.end()); + std::sort(s2.begin(), s2.end()); + *std::set_intersection(s1.begin(), s1.end(), s2.begin(), s2.end(), out) = 0; + bkstring ret = out; + delete [] out; + return ret; +} +bkstring WCPattern::classNegate (bkstring s1) const +{ + wchar_t * out = new wchar_t[66000]; + int i, ind = 0; + std::map m; + + for (i = 0; i < (int)s1.size(); ++i) m[s1[i]] = 1; + for (i = 0xFF; i >= 0; --i) if (m.find((wchar_t)i) == m.end()) out[ind++] = (wchar_t)i; + out[ind] = 0; + bkstring ret(out, ind); + delete [] out; + return ret; +} +bkstring WCPattern::classCreateRange(wchar_t low, wchar_t hi) const +{ + wchar_t out[300]; + int ind = 0; + while (low != hi) out[ind++] = low++; + out[ind++] = low; + return bkstring(out, ind); +} + +int WCPattern::getInt(int start, int end) +{ + int ret = 0; + for (; start <= end; ++start) ret = ret * 10 + (pattern[start] - (wchar_t)'0'); + return ret; +} +bool WCPattern::quantifyCurly(int & sNum, int & eNum) +{ + bool good = 1; + int i, ci = curInd + 1; + int commaInd = ci, endInd = ci, len = pattern.size(); + sNum = eNum = 0; + + while (endInd < len && pattern[endInd ] != (wchar_t)'}') ++endInd; + while (commaInd < endInd && pattern[commaInd] != (wchar_t)',') ++commaInd; + if (endInd >= len) { raiseError(); return 0; } + for (i = ci; good && i < endInd; ++i) if (i != commaInd && !isdigit(pattern[i])) good = 0; + if (!good && commaInd < endInd) { raiseError(); return 0; } + if (!good) return 0; + /* so now everything in here is either a comma (and there is at most one comma) or a digit */ + if (commaInd == ci) // {,*} + { + if (endInd == commaInd + 1) { sNum = MIN_QMATCH; eNum = MAX_QMATCH; } // {,} = * + else { sNum = MIN_QMATCH; eNum = getInt(commaInd + 1, endInd - 1); } // {,+} + } + else if (commaInd == endInd - 1) { sNum = getInt(ci, commaInd - 1); eNum = MAX_QMATCH; } // {+,} + else if (commaInd == endInd) { sNum = getInt(ci, endInd - 1); eNum = sNum; } // {+} + else { sNum = getInt(ci, commaInd - 1); eNum = getInt(commaInd + 1, endInd - 1); } // {+,+} + curInd = endInd + 1; + return 1; +} +NFAUNode * WCPattern::quantifyGroup(NFAUNode * start, NFAUNode * stop, const int gn) +{ + NFAUNode * newNode = NULL; + int type = 0; + + if (curInd < (int)pattern.size()) + { + wchar_t ch = (curInd + 1 >= (int)pattern.size()) ? USHRT_MAX : pattern[curInd + 1]; + switch (pattern[curInd]) + { + case (wchar_t)'*': + ++curInd; + switch (ch) + { + case (wchar_t)'?': ++curInd; type = 1; break; + case (wchar_t)'+': ++curInd; type = 2; break; + } + newNode = registerNode(new NFAGroupLoopPrologueUNode(gn)); + newNode->next = registerNode(new NFAGroupLoopUNode(start, MIN_QMATCH, MAX_QMATCH, gn, type)); + stop->next = newNode->next; + return newNode; + case (wchar_t)'?': + ++curInd; + switch (ch) + { + case (wchar_t)'?': ++curInd; type = 1; break; + case (wchar_t)'+': ++curInd; type = 2; break; + } + newNode = registerNode(new NFAGroupLoopPrologueUNode(gn)); + newNode->next = registerNode(new NFAGroupLoopUNode(start, MIN_QMATCH, 1, gn, type)); + stop->next = newNode->next; + return newNode; + case (wchar_t)'+': + ++curInd; + switch (ch) + { + case (wchar_t)'?': ++curInd; type = 1; break; + case (wchar_t)'+': ++curInd; type = 2; break; + } + newNode = registerNode(new NFAGroupLoopPrologueUNode(gn)); + newNode->next = registerNode(new NFAGroupLoopUNode(start, 1, MAX_QMATCH, gn, type)); + stop->next = newNode->next; + return newNode; + case (wchar_t)'{': + { + int s, e; + if (quantifyCurly(s, e)) + { + ch = (curInd < (int)pattern.size()) ? pattern[curInd] : USHRT_MAX; + switch (ch) + { + case (wchar_t)'?': ++curInd; type = 1; break; + case (wchar_t)'+': ++curInd; type = 2; break; + } + newNode = registerNode(new NFAGroupLoopPrologueUNode(gn)); + newNode->next = registerNode(new NFAGroupLoopUNode(start, s, e, gn, type)); + stop->next = newNode->next; + return newNode; + } + } + default: + break; + } + } + return NULL; +} + +NFAUNode * WCPattern::quantify(NFAUNode * newNode) +{ + if (curInd < (int)pattern.size()) + { + wchar_t ch = (curInd + 1 >= (int)pattern.size()) ? USHRT_MAX : pattern[curInd + 1]; + switch (pattern[curInd]) + { + case (wchar_t)'*': + ++curInd; + switch (ch) + { + case (wchar_t)'?': ++curInd; newNode = registerNode(new NFALazyQuantifierUNode (this, newNode, MIN_QMATCH, MAX_QMATCH)); break; + case (wchar_t)'+': ++curInd; newNode = registerNode(new NFAPossessiveQuantifierUNode(this, newNode, MIN_QMATCH, MAX_QMATCH)); break; + default: newNode = registerNode(new NFAGreedyQuantifierUNode (this, newNode, MIN_QMATCH, MAX_QMATCH)); break; + } + break; + case (wchar_t)'?': + ++curInd; + switch (ch) + { + case (wchar_t)'?': ++curInd; newNode = registerNode(new NFALazyQuantifierUNode (this, newNode, MIN_QMATCH, 1)); break; + case (wchar_t)'+': ++curInd; newNode = registerNode(new NFAPossessiveQuantifierUNode(this, newNode, MIN_QMATCH, 1)); break; + default: newNode = registerNode(new NFAGreedyQuantifierUNode (this, newNode, MIN_QMATCH, 1)); break; + } + break; + case (wchar_t)'+': + ++curInd; + switch (ch) + { + case (wchar_t)'?': ++curInd; newNode = registerNode(new NFALazyQuantifierUNode (this, newNode, 1, MAX_QMATCH)); break; + case (wchar_t)'+': ++curInd; newNode = registerNode(new NFAPossessiveQuantifierUNode(this, newNode, 1, MAX_QMATCH)); break; + default: newNode = registerNode(new NFAGreedyQuantifierUNode (this, newNode, 1, MAX_QMATCH)); break; + } + break; + case (wchar_t)'{': + { + int s, e; + if (quantifyCurly(s, e)) + { + ch = (curInd < (int)pattern.size()) ? pattern[curInd] : USHRT_MAX; + switch (ch) + { + case (wchar_t)'?': ++curInd; newNode = registerNode(new NFALazyQuantifierUNode (this, newNode, s, e)); break; + case (wchar_t)'+': ++curInd; newNode = registerNode(new NFAPossessiveQuantifierUNode(this, newNode, s, e)); break; + default: newNode = registerNode(new NFAGreedyQuantifierUNode (this, newNode, s, e)); break; + } + } + } + break; + default: + break; + } + } + return newNode; +} +bkstring WCPattern::parseClass() +{ + bkstring t, ret = L""; + wchar_t ch, c1, c2; + bool inv = 0, neg = 0, quo = 0; + + if (curInd < (int)pattern.size() && pattern[curInd] == (wchar_t)'^') + { + ++curInd; + neg = 1; + } + while (curInd < (int)pattern.size() && pattern[curInd] != (wchar_t)']') + { + ch = pattern[curInd++]; + if (ch == (wchar_t)'[') + { + t = parseClass(); + ret = classUnion(ret, t); + } + /*else if (ch == (wchar_t)'-') + { + raiseError(); + curInd = pattern.size(); + }*/ + else if (ch == (wchar_t)'&' && curInd < (int)pattern.size() && pattern[curInd] == (wchar_t)'&') + { + if (pattern[++curInd] != (wchar_t)'[') + { + raiseError(); + curInd = pattern.size(); + } + else + { + ++curInd; + t = parseClass(); + ret = classIntersect(ret, t); + } + } + else if (ch == (wchar_t)'\\') + { + t = parseEscape(inv, quo); + if (quo) + { + raiseError(); + curInd = pattern.size(); + } + else if (inv || t.size() > 1) // cant be part of a range (a-z) + { + if (inv) t = classNegate(t); + ret = classUnion(ret, t); + } + else if (curInd < (int)pattern.size() && pattern[curInd] == (wchar_t)'-') // part of a range (a-z) + { + c1 = t[0]; + ++curInd; + if (curInd >= (int)pattern.size()) raiseError(); + else + { + c2 = pattern[curInd++]; + if (c2 == (wchar_t)'\\') + { + t = parseEscape(inv, quo); + if (quo) + { + raiseError(); + curInd = pattern.size(); + } + else if (inv || t.size() > 1) raiseError(); + else ret = classUnion(ret, classCreateRange(c1, c2)); + } + else if (c2 == (wchar_t)'[' || c2 == (wchar_t)']' || c2 == (wchar_t)'-' || c2 == (wchar_t)'&') + { + raiseError(); + curInd = pattern.size(); + } + else ret = classUnion(ret, classCreateRange(c1, c2)); + } + } + else + { + ret = classUnion(ret, t); + } + } + else if (curInd < (int)pattern.size() && pattern[curInd] == (wchar_t)'-') + { + c1 = ch; + ++curInd; + if (curInd >= (int)pattern.size()) raiseError(); + else + { + c2 = pattern[curInd++]; + if (c2 == (wchar_t)'\\') + { + t = parseEscape(inv, quo); + if (quo) + { + raiseError(); + curInd = pattern.size(); + } + else if (inv || t.size() > 1) raiseError(); + else ret = classUnion(ret, classCreateRange(c1, c2)); + } + else if (c2 == (wchar_t)'[' || c2 == (wchar_t)']' || c2 == (wchar_t)'-' || c2 == (wchar_t)'&') + { + raiseError(); + curInd = pattern.size(); + } + else + { + ret = classUnion(ret, classCreateRange(c1, c2)); + } + } + } + else + { + ret += L" "; + ret[ret.size() - 1] = ch; + } + } + if (curInd >= (int)pattern.size() || pattern[curInd] != (wchar_t)']') + { + raiseError(); + ret = L""; + } + else + { + ++curInd; + if (neg) ret = classNegate(ret); + } + return ret; +} +bkstring WCPattern::parsePosix() +{ + bkstring s7 = pattern.substr(curInd, 7); + if (s7 == L"{Lower}") { curInd += 7; return L"abcdefghijklmnopqrstuvwxyz"; } + if (s7 == L"{Upper}") { curInd += 7; return L"ABCDEFGHIJKLMNOPQRSTUVWXYZ"; } + if (s7 == L"{Alpha}") { curInd += 7; return L"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; } + if (s7 == L"{Digit}") { curInd += 7; return L"0123456789"; } + if (s7 == L"{Alnum}") { curInd += 7; return L"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; } + if (s7 == L"{Punct}") { curInd += 7; return L"!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~"; } + if (s7 == L"{Graph}") { curInd += 7; return L"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~"; } + if (s7 == L"{Print}") { curInd += 7; return L"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~"; } + if (s7 == L"{Blank}") { curInd += 7; return L" \t"; } + if (s7 == L"{Space}") { curInd += 7; return L" \t\n\x0B\f\r"; } + if (s7 == L"{Cntrl}") + { + bkstring::value_type i; + bkstring s = L" "; + + for (i = 0; i < 5; ++i) s += s; + s += L" "; + for (i = 0; i <= 0x1F; ++i) s[i] = i; + s[0x20] = 0x7F; + curInd += 7; + return s; + } + if (s7 == L"{ASCII}") + { + bkstring s(0x80, (wchar_t)' '); + for (bkstring::value_type i = 0; i <= 0x7f; ++i) s[i] = i; + curInd += 7; + return s; + } + if (pattern.substr(curInd, 8) == L"{XDigit}") { curInd += 8; return L"abcdefABCDEF0123456789"; } + raiseError(); + return L""; +} +NFAUNode * WCPattern::parseBackref() +{ + #define is_dig(x) ((x) >= (wchar_t)'0' && (x) <= (wchar_t)'9') + #define to_int(x) ((x) - (wchar_t)'0') + int ci = curInd; + int oldRef = 0, ref = 0; + + while (ci < (int)pattern.size() && is_dig(pattern[ci]) && (ref < 10 || ref < groupCount)) + { + oldRef = ref; + ref = ref * 10 + to_int(pattern[ci++]); + } + if (ci == (int)pattern.size()) + { + oldRef = ref; + ++ci; + } + if (oldRef < 0 || ci <= curInd) + { + raiseError(); + return registerNode(new NFAReferenceUNode(-1)); + } + curInd = ci; + return registerNode(new NFAReferenceUNode(ref)); + + #undef is_dig + #undef to_int +} +bkstring WCPattern::parseOctal() +{ + #define islowoc(x) ((x) >= (wchar_t)'0' && (x) <= (wchar_t)'3') + #define isoc(x) ((x) >= (wchar_t)'0' && (x) <= (wchar_t)'7') + #define fromoc(x) ((x) - (wchar_t)'0') + int ci = curInd; + wchar_t ch1 = (ci + 0 < (int)pattern.size()) ? pattern[ci + 0] : USHRT_MAX; + wchar_t ch2 = (ci + 1 < (int)pattern.size()) ? pattern[ci + 1] : USHRT_MAX; + wchar_t ch3 = (ci + 2 < (int)pattern.size()) ? pattern[ci + 2] : USHRT_MAX; + bkstring s = L" "; + + if (islowoc(ch1) && isoc(ch2)) + { + curInd += 2; + s[0] = fromoc(ch1) * 8 + fromoc(ch2); + if (isoc(ch3)) + { + ++curInd; + s[0] = s[0] * 8 + fromoc(ch3); + } + } + else if (isoc(ch1) && isoc(ch2)) + { + curInd += 2; + s[0] = fromoc(ch1) * 8 + fromoc(ch2); + } + else raiseError(); + + return s; + #undef islowoc + #undef isoc + #undef fromoc +} +bkstring WCPattern::parseHex() +{ + #define to_low(x) (((x) >= (wchar_t)'A' && (x) <= (wchar_t)'Z') ? ((x) - (wchar_t)'A' + (wchar_t)'a') : (x)) + #define is_dig(x) ((x) >= (wchar_t)'0' && (x) <= (wchar_t)'9') + #define is_hex(x) (is_dig(x) || (to_low(x) >= (wchar_t)'a' && to_low(x) <= (wchar_t)'f')) + #define to_int(x) ((is_dig(x)) ? ((x) - (wchar_t)'0') : (to_low(x) - (wchar_t)'a' + 10)) + + int ci = curInd; + wchar_t ch1 = (ci + 0 < (int)pattern.size()) ? pattern[ci + 0] : USHRT_MAX; + wchar_t ch2 = (ci + 1 < (int)pattern.size()) ? pattern[ci + 1] : USHRT_MAX; + wchar_t ch3 = (ci + 2 < (int)pattern.size()) ? pattern[ci + 2] : USHRT_MAX; + wchar_t ch4 = (ci + 3 < (int)pattern.size()) ? pattern[ci + 3] : USHRT_MAX; + bkstring s = L" "; + + if (is_hex(ch1) && is_hex(ch2) && is_hex(ch3) && is_hex(ch4)) + { + curInd += 2; + s[0] = (to_int(ch1) << 12 & 0xF000) | (to_int(ch2) << 8 & 0x0F00) | + (to_int(ch3) << 4 & 0x0F00) | (to_int(ch4) & 0x000F); + } + else if (is_hex(ch1) && is_hex(ch2)) + { + curInd += 2; + s[0] = (to_int(ch1) << 4 & 0xF0) | (to_int(ch2) & 0x0F); + } + + return s; + #undef to_low + #undef is_dig + #undef is_hex + #undef to_int +} +bkstring WCPattern::parseEscape(bool & inv, bool & quo) +{ + wchar_t ch = pattern[curInd++]; + bkstring classes = L""; + + if (curInd > (int)pattern.size()) + { + raiseError(); + return NULL; + } + + quo = 0; + inv = 0; + switch (ch) + { + case (wchar_t)'p': classes = parsePosix(); break; + case (wchar_t)'P': classes = L"!!"; classes += parsePosix(); break; + case (wchar_t)'d': classes = L"0123456789"; break; + case (wchar_t)'D': classes = L"!!0123456789"; break; + case (wchar_t)'s': classes = L" \t\r\n\f"; break; + case (wchar_t)'S': classes = L"!! \t\r\n\f"; break; + case (wchar_t)'w': classes = L"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_"; break; + case (wchar_t)'W': classes = L"!!abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_"; break; + case (wchar_t)'0': classes = parseOctal(); break; + case (wchar_t)'x': classes = parseHex(); break; + + case (wchar_t)'Q': quo = 1; break; + case (wchar_t)'t': classes = L"\t"; break; + case (wchar_t)'r': classes = L"\r"; break; + case (wchar_t)'n': classes = L"\n"; break; + case (wchar_t)'f': classes = L"\f"; break; + case (wchar_t)'a': classes = L"\a"; break; + case (wchar_t)'e': classes = L"\r"; break; + default: classes = L" "; classes[0] = ch; break; + } + if (classes.substr(0, 2) == L"!!") + { + classes = classes.substr(2); + inv = 1; + } + return classes; +} +NFAUNode * WCPattern::parseRegisteredWCPattern(NFAUNode ** end) +{ + int i, j; + bkstring s; + NFAUNode * ret = NULL; + for (i = curInd; i < (int)pattern.size() && pattern[i] != (wchar_t)'}'; ++i) { } + if (pattern[i] != (wchar_t)'}') { raiseError(); return NULL; } + if (i == curInd + 1) { raiseError(); return NULL; } // {} + if ( + !( + (pattern[curInd] >= (wchar_t)'a' && pattern[curInd] <= (wchar_t)'z') || + (pattern[curInd] >= (wchar_t)'A' && pattern[curInd] <= (wchar_t)'Z') || + (pattern[curInd] == (wchar_t)'_') + ) + ) + { + raiseError(); + return NULL; + } + for (j = curInd; !error && j < i; ++j) + { + if ( + !( + (pattern[j] >= (wchar_t)'a' && pattern[j] <= (wchar_t)'z') || + (pattern[j] >= (wchar_t)'A' && pattern[j] <= (wchar_t)'Z') || + (pattern[j] >= (wchar_t)'0' && pattern[j] <= (wchar_t)'9') || + (pattern[j] == (wchar_t)'_') + ) + ) + { + raiseError(); + return NULL; + } + } + s = pattern.substr(curInd, i - curInd); + if (registeredWCPatterns.find(s) == registeredWCPatterns.end()) raiseError(); + else + { + unsigned long oflags = flags; + bkstring op = pattern; + int ci = i + 1; + + pattern = registeredWCPatterns[s].first; + curInd = 0; + flags = registeredWCPatterns[s].second; + + --groupCount; + ret = parse(0, 0, end); + + pattern = op; + curInd = ci; + flags = oflags; + } + if (error) { *end = ret = NULL; } + return ret; +} + +// look behind should interpret everything as a literal (except \\) since the +// pattern must have a concrete length +NFAUNode * WCPattern::parseBehind(const bool pos, NFAUNode ** end) +{ + bkstring t = L""; + while (curInd < (int)pattern.size() && pattern[curInd] != (wchar_t)')') + { + wchar_t ch = pattern[curInd++]; + t += L" "; + if (ch == (wchar_t)'\\') + { + if (curInd + 1 >= (int)pattern.size()) + { + raiseError(); + return *end = registerNode(new NFACharUNode((wchar_t)' ')); + } + ch = pattern[curInd++]; + } + t[t.size() - 1] = ch; + } + if (curInd >= (int)pattern.size() || pattern[curInd] != (wchar_t)')') raiseError(); + else ++curInd; + return *end = registerNode(new NFALookBehindUNode(t, pos)); +} +NFAUNode * WCPattern::parseQuote() +{ + bool done = 0; + bkstring s = L""; + + while (!done) + { + if (curInd >= (int)pattern.size()) + { + raiseError(); + done = 1; + } + else if (pattern.substr(curInd, 2) == L"\\E") + { + curInd += 2; + done = 1; + } + else if (pattern[curInd] == (wchar_t)'\\') + { + s += L" "; + s[s.size() - 1] = pattern[++curInd]; + ++curInd; + } + else + { + s += L" "; + s[s.size() - 1] = pattern[curInd++]; + } + } + if ((flags & WCPattern::CASE_INSENSITIVE) != 0) return registerNode(new NFACIQuoteUNode(s)); + return registerNode(new NFAQuoteUNode(s)); +} +NFAUNode * WCPattern::parse(const bool inParen, const bool inOr, NFAUNode ** end) +{ + NFAUNode * start, * cur, * next = NULL; + bkstring t; + int grc = groupCount++; + bool inv, quo; + bool ahead = 0, pos = 0, noncap = 0, indep = 0; + unsigned long oldFlags = flags; + + if (inParen) + { + if (pattern[curInd] == (wchar_t)'?') + { + ++curInd; + --groupCount; + if (pattern[curInd] == (wchar_t)':') { noncap = 1; ++curInd; grc = --nonCapGroupCount; } + else if (pattern[curInd] == (wchar_t)'=') { ++curInd; ahead = 1; pos = 1; } + else if (pattern[curInd] == (wchar_t)'!') { ++curInd; ahead = 1; pos = 0; } + else if (pattern.substr(curInd, 2) == L"<=") { curInd += 2; return parseBehind(1, end); } + else if (pattern.substr(curInd, 2) == L"') { ++curInd; indep = 1; } + else + { + bool negate = false, done = false; + while (!done) + { + if (curInd >= (int)pattern.size()) + { + raiseError(); + return NULL; + } + else if (negate) + { + switch (pattern[curInd]) + { + case (wchar_t)'i': flags &= ~WCPattern::CASE_INSENSITIVE; break; + case (wchar_t)'d': flags &= ~WCPattern::UNIX_LINE_MODE; break; + case (wchar_t)'m': flags &= ~WCPattern::MULTILINE_MATCHING; break; + case (wchar_t)'s': flags &= ~WCPattern::DOT_MATCHES_ALL; break; + case (wchar_t)':': done = true; break; + case (wchar_t)')': + ++curInd; + *end = registerNode(new NFALookBehindUNode(L"", true)); + return *end; + case (wchar_t)'-': + default: raiseError(); return NULL; + } + } + else + { + switch (pattern[curInd]) + { + case (wchar_t)'i': flags |= WCPattern::CASE_INSENSITIVE; break; + case (wchar_t)'d': flags |= WCPattern::UNIX_LINE_MODE; break; + case (wchar_t)'m': flags |= WCPattern::MULTILINE_MATCHING; break; + case (wchar_t)'s': flags |= WCPattern::DOT_MATCHES_ALL; break; + case (wchar_t)':': done = true; break; + case (wchar_t)'-': negate = true; break; + case (wchar_t)')': + ++curInd; + *end = registerNode(new NFALookBehindUNode(L"", true)); + return *end; + default: raiseError(); return NULL; + } + } + ++curInd; + } + noncap = 1; + grc = --nonCapGroupCount; + } + + if (noncap) cur = start = registerNode(new NFAGroupHeadUNode(grc)); + else cur = start = registerNode(new NFASubStartUNode); + } + else cur = start = registerNode(new NFAGroupHeadUNode(grc)); + } + else cur = start = registerNode(new NFASubStartUNode); + while (curInd < (int)pattern.size()) + { + wchar_t ch = pattern[curInd++]; + + next = NULL; + if (error) return NULL; + switch (ch) + { + case (wchar_t)'^': + if ((flags & WCPattern::MULTILINE_MATCHING) != 0) next = registerNode(new NFAStartOfLineUNode); + else next = registerNode(new NFAStartOfInputUNode); + break; + case (wchar_t)'$': + if ((flags & WCPattern::MULTILINE_MATCHING) != 0) next = registerNode(new NFAEndOfLineUNode); + else next = registerNode(new NFAEndOfInputUNode(0)); + break; + case (wchar_t)'|': + --groupCount; + cur->next = registerNode(new NFAAcceptUNode); + cur = start = registerNode(new NFAOrUNode(start, parse(inParen, 1))); + break; + case (wchar_t)'\\': + if (curInd < (int)pattern.size()) + { + bool eoi = 0; + switch (pattern[curInd]) + { + case (wchar_t)'1': + case (wchar_t)'2': + case (wchar_t)'3': + case (wchar_t)'4': + case (wchar_t)'5': + case (wchar_t)'6': + case (wchar_t)'7': + case (wchar_t)'8': + case (wchar_t)'9': next = parseBackref(); break; + case (wchar_t)'A': ++curInd; next = registerNode(new NFAStartOfInputUNode); break; + case (wchar_t)'B': ++curInd; next = registerNode(new NFAWordBoundaryUNode(0)); break; + case (wchar_t)'b': ++curInd; next = registerNode(new NFAWordBoundaryUNode(1)); break; + case (wchar_t)'G': ++curInd; next = registerNode(new NFAEndOfMatchUNode); break; + case (wchar_t)'Z': eoi = 1; + case (wchar_t)'z': ++curInd; next = registerNode(new NFAEndOfInputUNode(eoi)); break; + default: + t = parseEscape(inv, quo); + //printf("inv quo classes { %c %c %s }\n", inv ? (wchar_t)'t' : (wchar_t)'f', quo ? (wchar_t)'t' : (wchar_t)'f', t.c_str()); + if (!quo) + { + if (t.size() > 1 || inv) + { + if ((flags & WCPattern::CASE_INSENSITIVE) != 0) next = registerNode(new NFACIClassUNode(t, inv)); + else next = registerNode(new NFAClassUNode(t, inv)); + } + else + { + next = registerNode(new NFACharUNode(t[0])); + } + } + else + { + next = parseQuote(); + } + } + } + else raiseError(); + break; + case (wchar_t)'[': + if ((flags & WCPattern::CASE_INSENSITIVE) == 0) + { + NFAClassUNode * clazz = new NFAClassUNode(); + bkstring s = parseClass(); + for (int i = 0; i < (int)s.size(); ++i) clazz->vals[s[i]] = 1; + next = registerNode(clazz); + } + else + { + NFACIClassUNode * clazz = new NFACIClassUNode(); + bkstring s = parseClass(); + for (int i = 0; i < (int)s.size(); ++i) clazz->vals[to_lower(s[i])] = 1; + next = registerNode(clazz); + } + break; + case (wchar_t)'.': + { + bool useN = 1, useR = 1; + NFAClassUNode * clazz = new NFAClassUNode(1); + if ((flags & WCPattern::UNIX_LINE_MODE) != 0) useR = 0; + if ((flags & WCPattern::DOT_MATCHES_ALL) != 0) useN = useR = 0; + if (useN) clazz->vals[(wchar_t)'\n'] = 1; + if (useR) clazz->vals[(wchar_t)'\r'] = 1; + next = registerNode(clazz); + } + break; + case (wchar_t)'(': + { + NFAUNode * end, * t1, * t2; + t1 = parse(1, 0, &end); + if (!t1) raiseError(); + else if (t1->isGroupHeadNode() && (t2 = quantifyGroup(t1, end, grc)) != NULL) + { + cur->next = t2; + cur = t2->next; + } + else + { + cur->next = t1; + cur = end; + } + } + break; + case (wchar_t)')': + if (!inParen) raiseError(); + else if (inOr) + { + --curInd; + cur = cur->next = registerNode(new NFAAcceptUNode); + flags = oldFlags; + return start; + } + else + { + if (ahead) + { + cur = cur->next = registerNode(new NFAAcceptUNode); + flags = oldFlags; + return *end = registerNode(new NFALookAheadUNode(start, pos)); + } + else if (indep) + { + cur = cur->next = registerNode(new NFAAcceptUNode); + flags = oldFlags; + return *end = registerNode(new NFAPossessiveQuantifierUNode(this, start, 1, 1)); + } + else // capping or noncapping, it doesnt matter + { + *end = cur = cur->next = registerNode(new NFAGroupTailUNode(grc)); + next = quantifyGroup(start, *end, grc); + if (next) + { + start = next; + *end = next->next; + } + flags = oldFlags; + return start; + } + } + break; + case (wchar_t)'{': // registered pattern + cur->next = parseRegisteredWCPattern(&next); + if (cur->next) cur = next; + break; + case (wchar_t)'*': + case (wchar_t)'+': + case (wchar_t)'?': +// case (wchar_t)'}': +// case (wchar_t)']': + raiseError(); + break; + default: + if ((flags & WCPattern::CASE_INSENSITIVE) != 0) next = registerNode(new NFACICharUNode(ch)); + else next = registerNode(new NFACharUNode(ch)); + break; + } + if (next) cur = cur->next = quantify(next); + } + if (inParen) raiseError(); + else + { + if (inOr) cur = cur->next = registerNode(new NFAAcceptUNode); + if (end) *end = cur; + } + + flags = oldFlags; + if (error) return NULL; + + return start; +} + +WCPattern * WCPattern::compile(const bkstring & pattern, const unsigned long mode) +{ + WCPattern * p = new WCPattern(pattern); + NFAUNode * end; + + p->flags = mode; + if ((mode & WCPattern::LITERAL) != 0) + { + p->head = p->registerNode(new NFAStartUNode); + if ((mode & WCPattern::CASE_INSENSITIVE) != 0) p->head->next = p->registerNode(new NFACIQuoteUNode(pattern)); + else p->head->next = p->registerNode(new NFAQuoteUNode(pattern)); + p->head->next->next = p->registerNode(new NFAEndUNode); + } + else + { + p->head = p->parse(0, 0, &end); + if (!p->head) + { + delete p; + p = NULL; + } + else + { + if (!(p->head && p->head->isStartOfInputNode())) + { + NFAUNode * n = p->registerNode(new NFAStartUNode); + n->next = p->head; + p->head = n; + } + end->next = p->registerNode(new NFAEndUNode); + } + } + if (p != NULL) + { + p->matcher = new WCMatcher(p, L""); + } + + return p; +} + +WCPattern * WCPattern::compileAndKeep(const bkstring & pattern, const unsigned long mode) +{ + WCPattern * ret = NULL; + std::map::iterator it = compiledWCPatterns.find(pattern); + + if (it != compiledWCPatterns.end()) + { + ret = it->second; + } + else + { + ret = compile(pattern, mode); + compiledWCPatterns[pattern] = ret; + } + + return ret; +} +bkstring WCPattern::replace(const bkstring & pattern, const bkstring & str, + const bkstring & replacementText, const unsigned long mode) +{ + bkstring ret; + WCPattern * p = WCPattern::compile(pattern, mode); + if (p) + { + ret = p->replace(str, replacementText); + delete p; + } + return ret; +} + +std::vector WCPattern::split(const bkstring & pattern, const bkstring & str, const bool keepEmptys, + const unsigned long limit, const unsigned long mode) +{ + std::vector ret; + WCPattern * p = WCPattern::compile(pattern, mode); + if (p) + { + ret = p->split(str, keepEmptys, limit); + delete p; + } + return ret; +} + +std::vector WCPattern::findAll(const bkstring & pattern, const bkstring & str, const unsigned long mode) +{ + std::vector ret; + WCPattern * p = WCPattern::compile(pattern, mode); + if (p) + { + ret = p->findAll(str); + delete p; + } + return ret; +} + +bool WCPattern::matches(const bkstring & pattern, const bkstring & str, const unsigned long mode) +{ + bool ret = 0; + WCPattern * p = compile(pattern, mode); + + if (p) + { + ret = p->matches(str); + delete p; + } + + return ret; +} + +bool WCPattern::registerWCPattern(const bkstring & name, const bkstring & pattern, const unsigned long mode) +{ + WCPattern * p = WCPattern::compile(pattern, mode); + if (!p) return 0; + WCPattern::registeredWCPatterns[name] = std::make_pair(pattern, mode); + delete p; + return 1; +} + +void WCPattern::unregisterWCPatterns() +{ + registeredWCPatterns.clear(); +} +void WCPattern::clearWCPatternCache() +{ + std::map::iterator it; + for (it = compiledWCPatterns.begin(); it != compiledWCPatterns.end(); ++it) + { + delete it->second; + } + compiledWCPatterns.clear(); +} + +std::pair WCPattern::findNthMatch(const bkstring & pattern, const bkstring & str, + const int matchNum, const unsigned long mode) +{ + std::pair ret; + WCPattern * p = WCPattern::compile(pattern, mode); + + ret.second = -1; + if (p) + { + int i = -1; + p->matcher->setString(str); + while (i < matchNum && p->matcher->findNextMatch()) { ++i; } + if (i == matchNum && p->matcher->getStartingIndex() >= 0) + { + ret.first = p->matcher->getGroup(0); + ret.second = p->matcher->getStartingIndex(); + } + delete p; + } + + return ret; +} + +WCPattern::~WCPattern() +{ + /* + nodes.clear(); + if (head) head->findAllNodes(nodes); + */ + if (matcher) delete matcher; + for (std::map::iterator it = nodes.begin(); it != nodes.end(); ++it) delete it->first; +} +bkstring WCPattern::replace(const bkstring & str, const bkstring & replacementText) +{ + int li = 0; + bkstring ret = L""; + + matcher->setString(str); + while (matcher->findNextMatch()) + { + ret += str.substr(li, matcher->getStartingIndex() - li); + ret += matcher->replaceWithGroups(replacementText); + li = matcher->getEndingIndex(); + } + ret += str.substr(li); + + return ret; +} +std::vector WCPattern::split(const bkstring & str, const bool keepEmptys, const unsigned long limit) +{ + unsigned long lim = (limit == 0 ? MAX_QMATCH : limit); + int li = 0; + std::vector ret; + + matcher->setString(str); + + while (matcher->findNextMatch() && ret.size() < lim) + { + if (matcher->getStartingIndex() == 0 && keepEmptys) ret.push_back(L""); + if ((matcher->getStartingIndex() != matcher->getEndingIndex()) || keepEmptys) + { + if (li != matcher->getStartingIndex() || keepEmptys) + { + ret.push_back(str.substr(li, matcher->getStartingIndex() - li)); + } + li = matcher->getEndingIndex(); + } + } + if (li < (int)str.size()) ret.push_back(str.substr(li)); + + return ret; +} +std::vector WCPattern::findAll(const bkstring & str) +{ + matcher->setString(str); + return matcher->findAll(); +} +bool WCPattern::matches(const bkstring & str) +{ + matcher->setString(str); + return matcher->matches(); +} +unsigned long WCPattern::getFlags() const +{ + return flags; +} +bkstring WCPattern::getWCPattern() const +{ + return pattern; +} +WCMatcher * WCPattern::createWCMatcher(const bkstring & str) +{ + return new WCMatcher(this, str); +} + +// NFAUNode + +NFAUNode::NFAUNode() { next = NULL; } +NFAUNode::~NFAUNode() { } +void NFAUNode::findAllNodes(std::map & soFar) +{ + if (soFar.find(this) == soFar.end()) return; + soFar[this] = 1; + if (next) next->findAllNodes(soFar); +} + +// NFACharUNode + +NFACharUNode::NFACharUNode(const wchar_t c) { ch = c; } +int NFACharUNode::match(const bkstring & str, WCMatcher * matcher, const int curInd) const +{ + if (curInd < (int)str.size() && str[curInd] == ch) return next->match(str, matcher, curInd + 1); + return -1; +} + +// NFACICharUNode + +NFACICharUNode::NFACICharUNode(const wchar_t c) { ch = to_lower(c); } +int NFACICharUNode::match(const bkstring & str, WCMatcher * matcher, const int curInd) const +{ + if (curInd < (int)str.size() && to_lower(str[curInd]) == ch) return next->match(str, matcher, curInd + 1); + return -1; +} + +// NFAStartUNode + +NFAStartUNode::NFAStartUNode() { } +int NFAStartUNode::match(const bkstring & str, WCMatcher * matcher, const int curInd) const +{ + int ret = -1, ci = curInd; + + matcher->starts[0] = curInd; + if ((matcher->getFlags() & WCMatcher::MATCH_ENTIRE_STRING) == (unsigned int)WCMatcher::MATCH_ENTIRE_STRING) + { + if (curInd != 0) + { + matcher->starts[0] = -1; + return -1; + } + return next->match(str, matcher, 0); + } + while ((ret = next->match(str, matcher, ci)) == -1 && ci < (int)str.size()) + { + matcher->clearGroups(); + matcher->starts[0] = ++ci; + } + if (ret < 0) matcher->starts[0] = -1; + return ret; +} + +// NFAEndUNode + +NFAEndUNode::NFAEndUNode() { } +int NFAEndUNode::match(const bkstring & str, WCMatcher * matcher, const int curInd) const +{ + matcher->ends[0] = curInd; + if ((matcher->getFlags() & WCMatcher::MATCH_ENTIRE_STRING) != 0) + { + if (curInd == (int)str.size()) return curInd; + matcher->ends[0] = -1; + return -1; + } + return curInd; +} + +// NFAQuantifierUNode + +void NFAQuantifierUNode::findAllNodes(std::map & soFar) +{ + inner->findAllNodes(soFar); + NFAUNode::findAllNodes(soFar); +} +NFAQuantifierUNode::NFAQuantifierUNode(WCPattern * pat, NFAUNode * internal, const int minMatch, const int maxMatch) +{ + inner = internal; + inner->next = pat->registerNode(new NFAAcceptUNode); + min = (minMatch < WCPattern::MIN_QMATCH) ? WCPattern::MIN_QMATCH : minMatch; + max = (maxMatch > WCPattern::MAX_QMATCH) ? WCPattern::MAX_QMATCH : maxMatch; +} + +int NFAQuantifierUNode::match(const bkstring & str, WCMatcher * matcher, const int curInd) const +{ + int i0, i1, i2 = 0; + + i0 = i1 = curInd; + while (i2 < min) + { + + ++i2; + i1 = inner->match(str, matcher, i0); + if (i1 <= i0) return i1; // i1 < i0 means i1 is -1 + i0 = i1; + } + + return i1; +} +// NFAGreedyQuantifierUNode + +NFAGreedyQuantifierUNode::NFAGreedyQuantifierUNode(WCPattern * pat, NFAUNode * internal, const int minMatch, const int maxMatch) + : NFAQuantifierUNode(pat, internal, minMatch, maxMatch) { } +int NFAGreedyQuantifierUNode::match(const bkstring & str, WCMatcher * matcher, const int curInd) const +{ + int t = NFAQuantifierUNode::match(str, matcher, curInd); + if (t != -1) return matchInternal(str, matcher, t, min); + return t; +} +int NFAGreedyQuantifierUNode::matchInternal(const bkstring & str, WCMatcher * matcher, const int curInd, const int soFar) const +{ + if (soFar >= max) return next->match(str, matcher, curInd); + + int i, j; + + i = inner->match(str, matcher, curInd); + if (i != -1) + { + j = matchInternal(str, matcher, i, soFar + 1); + if (j != -1) return j; + } + return next->match(str, matcher, curInd); +} + +// NFALazyQuantifierUNode + +NFALazyQuantifierUNode::NFALazyQuantifierUNode(WCPattern * pat, NFAUNode * internal, const int minMatch, const int maxMatch) + : NFAQuantifierUNode(pat, internal, minMatch, maxMatch) { } +int NFALazyQuantifierUNode::match(const bkstring & str, WCMatcher * matcher, const int curInd) const +{ + int i, j, m = NFAQuantifierUNode::match(str, matcher, curInd); + + if (m == -1) return -1; + + for (i = min; i < max; ++i) + { + j = next->match(str, matcher, m); + if (j == -1) + { + j = inner->match(str, matcher, m); + // if j < m, then j is -1, so we bail. + // if j == m, then we would just go and call next->match on the same index, + // but it already failed trying to match right there, so we know we can + // just bail + if (j <= m) return -1; + m = j; + } + else return j; + } + return next->match(str, matcher, m); +} + +// NFAPossessiveQuantifierUNode + +NFAPossessiveQuantifierUNode::NFAPossessiveQuantifierUNode(WCPattern * pat, NFAUNode * internal, const int minMatch, const int maxMatch) + : NFAQuantifierUNode(pat, internal, minMatch, maxMatch) { } +int NFAPossessiveQuantifierUNode::match(const bkstring & str, WCMatcher * matcher, const int curInd) const +{ + int i, j, m = NFAQuantifierUNode::match(str, matcher, curInd); + + if (m == -1) return -1; + for (i = min; i < max; ++i) + { + j = inner->match(str, matcher, m); + if (j <= m) return next->match(str, matcher, m); + m = j; + } + return next->match(str, matcher, m); +} + +// NFAAcceptUNode + +NFAAcceptUNode::NFAAcceptUNode() { } +int NFAAcceptUNode::match(const bkstring & str, WCMatcher * matcher, const int curInd) const +{ + if (!next) return curInd; + else return next->match(str, matcher, curInd); +} + +// NFAClassUNode + +NFAClassUNode::NFAClassUNode(const bool invert) +{ + inv = invert; +} +NFAClassUNode::NFAClassUNode(const bkstring & clazz, const bool invert) +{ + inv = invert; + for (int i = 0; i < (int)clazz.size(); ++i) vals[clazz[i]] = 1; +} +int NFAClassUNode::match(const bkstring & str, WCMatcher * matcher, const int curInd) const +{ + if (curInd < (int)str.size() && ((vals.find(str[curInd]) != vals.end()) ^ inv)) + { + return next->match(str, matcher, curInd + 1); + } + return -1; +} + +// NFACIClassUNode + +NFACIClassUNode::NFACIClassUNode(const bool invert) +{ + inv = invert; +} +NFACIClassUNode::NFACIClassUNode(const bkstring & clazz, const bool invert) +{ + inv = invert; + for (int i = 0; i < (int)clazz.size(); ++i) vals[to_lower(clazz[i])] = 1; +} +int NFACIClassUNode::match(const bkstring & str, WCMatcher * matcher, const int curInd) const +{ + if (curInd < (int)str.size() && ((vals.find(to_lower(str[curInd])) != vals.end()) ^ inv)) + { + return next->match(str, matcher, curInd + 1); + } + return -1; +} + +// NFASubStartUNode + +NFASubStartUNode::NFASubStartUNode() { } +int NFASubStartUNode::match(const bkstring & str, WCMatcher * matcher, const int curInd) const +{ + return next->match(str, matcher, curInd); +} + +// NFAOrUNode + +NFAOrUNode::NFAOrUNode(NFAUNode * first, NFAUNode * second) : one(first), two(second) { } +void NFAOrUNode::findAllNodes(std::map & soFar) +{ + if (one) one->findAllNodes(soFar); + if (two) two->findAllNodes(soFar); + NFAUNode::findAllNodes(soFar); +} +int NFAOrUNode::match(const bkstring & str, WCMatcher * matcher, const int curInd) const +{ + int ci = one->match(str, matcher, curInd); + + if (ci != -1) ci = next->match(str, matcher, ci); + if (ci != -1) return ci; + if (ci == -1) ci = two->match(str, matcher, curInd); + if (ci != -1) ci = next->match(str, matcher, ci); + return ci; +} + +// NFAQuoteUNode + +NFAQuoteUNode::NFAQuoteUNode(const bkstring & quoted) : qStr(quoted) { } +int NFAQuoteUNode::match(const bkstring & str, WCMatcher * matcher, const int curInd) const +{ + if (curInd + qStr.size() > str.size()) return -1; + if (str.substr(curInd, qStr.size()) != qStr) return -1; + return next->match(str, matcher, curInd + (int)qStr.size()); +} + +// NFACIQuoteUNode + +NFACIQuoteUNode::NFACIQuoteUNode(const bkstring & quoted) : qStr(quoted) { } +int NFACIQuoteUNode::match(const bkstring & str, WCMatcher * matcher, const int curInd) const +{ + if (curInd + qStr.size() > str.size()) return -1; + if (str_icmp(str.substr(curInd, qStr.size()).c_str(), qStr.c_str())) return -1; + return next->match(str, matcher, (int)qStr.size()); +} + +// NFALookAheadUNode + +NFALookAheadUNode::NFALookAheadUNode(NFAUNode * internal, const bool positive) : NFAUNode(), pos(positive), inner(internal) { } +void NFALookAheadUNode::findAllNodes(std::map & soFar) +{ + if (inner) inner->findAllNodes(soFar); + NFAUNode::findAllNodes(soFar); +} +int NFALookAheadUNode::match(const bkstring & str, WCMatcher * matcher, const int curInd) const +{ + return ((inner->match(str, matcher, curInd) == -1) ^ pos) ? next->match(str, matcher, curInd) : -1; +} + +// NFALookBehindUNode + +NFALookBehindUNode::NFALookBehindUNode(const bkstring & str, const bool positive) : pos(positive), mStr(str) { } +int NFALookBehindUNode::match(const bkstring & str, WCMatcher * matcher, const int curInd) const +{ + if (pos) + { + if (curInd < (int)mStr.size()) return -1; + if (str.substr(curInd - mStr.size(), mStr.size()) == mStr) return next->match(str, matcher, curInd); + } + else + { + if (curInd < (int)mStr.size()) return next->match(str, matcher, curInd); + if (str.substr(curInd - mStr.size(), mStr.size()) == mStr) return -1; + return next->match(str, matcher, curInd); + } + return -1; +} + +// NFAStartOfLineUNode + +NFAStartOfLineUNode::NFAStartOfLineUNode() { } +int NFAStartOfLineUNode::match(const bkstring & str, WCMatcher * matcher, const int curInd) const +{ + if (curInd == 0 || str[curInd - 1] == (wchar_t)'\n' || str[curInd - 1] == (wchar_t)'\r') + { + return next->match(str, matcher, curInd); + } + return -1; +} + +// NFAEndOfLineUNode + +NFAEndOfLineUNode::NFAEndOfLineUNode() { } +int NFAEndOfLineUNode::match(const bkstring & str, WCMatcher * matcher, const int curInd) const +{ + if (curInd >= (int)str.size() || str[curInd] == (wchar_t)'\n' || str[curInd] == (wchar_t)'\r') + { + return next->match(str, matcher, curInd); + } + return -1; +} + +// NFAReferenceUNode + +NFAReferenceUNode::NFAReferenceUNode(const int groupIndex) : gi(groupIndex) { } +int NFAReferenceUNode::match(const bkstring & str, WCMatcher * matcher, const int curInd) const +{ + int len = matcher->ends[gi] - matcher->starts[gi]; + int ni = -1; + if (gi < 1 || matcher->ends[gi] < matcher->starts[gi] || len == 0) ni = curInd; + else if (curInd + len > (int)str.size()) return -1; + else if (str.substr(curInd, len) != str.substr(matcher->starts[gi], len)) return -1; + else ni = curInd + len; + + return next->match(str, matcher, ni); +} + +// NFAStartOfInputUNode + +NFAStartOfInputUNode::NFAStartOfInputUNode() { } +int NFAStartOfInputUNode::match(const bkstring & str, WCMatcher * matcher, const int curInd) const +{ + if (curInd == 0) return next->match(str, matcher, curInd); + return -1; +} + +// NFAEndOfInputUNode + +NFAEndOfInputUNode::NFAEndOfInputUNode(const bool lookForTerm) : term(lookForTerm) { } +int NFAEndOfInputUNode::match(const bkstring & str, WCMatcher * matcher, const int curInd) const +{ + int len = (int)str.size(); + if (curInd == len) return next->match(str, matcher, curInd); + else if (term) + { + if (curInd == len - 1 && (str[curInd] == (wchar_t)'\r' || str[curInd] == (wchar_t)'\n')) + { + return next->match(str, matcher, curInd); + } + else if (curInd == len - 2 && str.substr(curInd, 2) == L"\r\n") + { + return next->match(str, matcher, curInd); + } + } + return -1; +} + +// NFAWordBoundaryUNode + +NFAWordBoundaryUNode::NFAWordBoundaryUNode(const bool positive) : pos(positive) { } +int NFAWordBoundaryUNode::match(const bkstring & str, WCMatcher * matcher, const int curInd) const +{ + int len = (int)str.size(); + + wchar_t c1 = (curInd - 1 < len && curInd > 0) ? str[curInd - 1] : '\n'; + wchar_t c2 = (curInd < len) ? str[curInd ] : '\n'; + + if (curInd == len) return next->match(str, matcher, curInd); + bool ok = is_alpha(c1) != is_alpha(c2); + if (ok && pos) return next->match(str, matcher, curInd); + return -1; +} + +// NFAEndOfMatchUNode + +NFAEndOfMatchUNode::NFAEndOfMatchUNode() { } +int NFAEndOfMatchUNode::match(const bkstring & str, WCMatcher * matcher, const int curInd) const +{ + if (curInd == matcher->lm) return next->match(str, matcher, curInd); + return -1; +} + +// NFAGroupHeadUNode + +NFAGroupHeadUNode::NFAGroupHeadUNode(const int groupIndex) : gi(groupIndex) { } +int NFAGroupHeadUNode::match(const bkstring & str, WCMatcher * matcher, const int curInd) const +{ + int ret, o = matcher->starts[gi]; + + matcher->starts[gi] = curInd; + ret = next->match(str, matcher, curInd); + if (ret < 0) matcher->starts[gi] = o; + + return ret; +} + +// NFAGroupTailUNode + +NFAGroupTailUNode::NFAGroupTailUNode(const int groupIndex) : gi(groupIndex) { } +int NFAGroupTailUNode::match(const bkstring & str, WCMatcher * matcher, const int curInd) const +{ + int ret, o = matcher->ends[gi]; + + matcher->ends[gi] = curInd; + ret = next->match(str, matcher, curInd); + if (ret < 0) matcher->ends[gi] = o; + + return ret; +} + +// NFAGroupLoopPrologueUNode + +NFAGroupLoopPrologueUNode::NFAGroupLoopPrologueUNode(const int groupIndex) : gi(groupIndex) { } +int NFAGroupLoopPrologueUNode::match(const bkstring & str, WCMatcher * matcher, const int curInd) const +{ + int ret, o1 = matcher->groups[gi], o2 = matcher->groupPos[gi], o3 = matcher->groupIndeces[gi]; + + matcher->groups[gi] = 0; + matcher->groupPos[gi] = 0; + matcher->groupIndeces[gi] = -1; + ret = next->match(str, matcher, curInd); + if (ret < 0) + { + matcher->groups[gi] = o1; + matcher->groupPos[gi] = o2; + matcher->groupIndeces[gi] = o3; + } + + return ret; +} + +// NFAGroupLoopUNode + +NFAGroupLoopUNode::NFAGroupLoopUNode(NFAUNode * internal, const int minMatch, const int maxMatch, + const int groupIndex, const int matchType) +{ + inner = internal; + min = minMatch; + max = maxMatch; + gi = groupIndex; + type = matchType; +} +void NFAGroupLoopUNode::findAllNodes(std::map & soFar) +{ + if (inner) inner->findAllNodes(soFar); + NFAUNode::findAllNodes(soFar); +} +int NFAGroupLoopUNode::match(const bkstring & str, WCMatcher * matcher, const int curInd) const +{ + bool b = (curInd > matcher->groupIndeces[gi]); + + if (b && matcher->groups[gi] < min) + { + ++matcher->groups[gi]; + int o = matcher->groupIndeces[gi]; + matcher->groupIndeces[gi] = curInd; + int ret = inner->match(str, matcher, curInd); + if (ret < 0) + { + matcher->groupIndeces[gi] = o; + --matcher->groups[gi]; + } + return ret; + } + else if (!b || matcher->groups[gi] >= max) + { + return next->match(str, matcher, curInd); + } + else + { + switch (type) + { + case 0: return matchGreedy(str, matcher, curInd); + case 1: return matchLazy(str, matcher, curInd); + case 2: return matchPossessive(str, matcher, curInd); + } + } + return -1; +} +int NFAGroupLoopUNode::matchGreedy(const bkstring & str, WCMatcher * matcher, const int curInd) const +{ + int o = matcher->groupIndeces[gi]; // save our info for backtracking + matcher->groupIndeces[gi] = curInd; // move along + ++matcher->groups[gi]; + int ret = inner->match(str, matcher, curInd); // match internally + if (ret < 0) + { // if we failed, then restore info and match next + --matcher->groups[gi]; + matcher->groupIndeces[gi] = o; + ret = next->match(str, matcher, curInd); + } + return ret; +} +int NFAGroupLoopUNode::matchLazy(const bkstring & str, WCMatcher * matcher, const int curInd) const +{ + int ret = next->match(str, matcher, curInd); // be lazy, just go on + if (ret < 0) + { + int o = matcher->groupIndeces[gi]; // save info for backtracking + matcher->groupIndeces[gi] = curInd; // advance our position + ++matcher->groups[gi]; + ret = inner->match(str, matcher, curInd); // match our internal stuff + if (ret < 0) // if we failed, then restore the info + { + --matcher->groups[gi]; + matcher->groupIndeces[gi] = o; + } + } + return ret; +} +int NFAGroupLoopUNode::matchPossessive(const bkstring & str, WCMatcher * matcher, const int curInd) const +{ + int o = matcher->groupIndeces[gi]; // save info for backtracking + matcher->groupPos[gi] = matcher->groups[gi]; // set a flag stating we have matcher at least this much + matcher->groupIndeces[gi] = curInd; // move along + ++matcher->groups[gi]; + int ret = inner->match(str, matcher, curInd); // try and match again + if (ret < 0) + { // if we fail, back off, but to an extent + --matcher->groups[gi]; + matcher->groupIndeces[gi] = o; + if (matcher->groups[gi] == matcher->groupPos[gi]) ret = next->match(str, matcher, curInd); + } + return ret; +} + +#ifdef _WIN32 + #pragma warning(pop) +#endif diff --git a/plugins/SmileyAdd/src/regexp/WCPattern.h b/plugins/SmileyAdd/src/regexp/WCPattern.h new file mode 100644 index 0000000000..3d52a7fd2e --- /dev/null +++ b/plugins/SmileyAdd/src/regexp/WCPattern.h @@ -0,0 +1,1663 @@ +#ifndef __WCPATTERN_H__ +#define __WCPATTERN_H__ + +#ifdef _WIN32 + #pragma warning(disable:4786) +#endif + +#include "bkstring.h" + +#include +#include + +class WCMatcher; +class NFAUNode; +class NFAQuantifierUNode; + +/** + This pattern class is very similar in functionality to Java's + java.util.regex.WCPattern class. The pattern class represents an immutable + regular expression object. Instead of having a single object contain both the + regular expression object and the matching object, instead the two objects are + split apart. The {@link WCMatcher WCMatcher} class represents the maching + object. + + The WCPattern class works primarily off of "compiled" patterns. A typical + instantiation of a regular expression looks like: + +

+  WCPattern * p = WCPattern::compile(L"a*b");
+  WCMatcher * m = p->createWCMatcher(L"aaaaaab");
+  if (m->matches()) ...
+  
+ + However, if you do not need to use a pattern more than once, it is often times + okay to use the WCPattern's static methods insteads. An example looks like this: + +
+  if (WCPattern::matches(L"a*b", L"aaaab")) { ... }
+  
+ + This class does not currently support unicode. The unicode update for this + class is coming soon. + + This class is partially immutable. It is completely safe to call createWCMatcher + concurrently in different threads, but the other functions (e.g. split) should + not be called concurrently on the same WCPattern. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Construct + + Matches + +
+   +
+ Characters +
+ x + + The character x +
+ \\ + + The character \ +
+ \0nn + + The character with octal ASCII value nn +
+ \0nnn + + The character with octal ASCII value nnn +
+ \xhh + + The character with hexadecimal ASCII value hh +
+ \t + + A tab character +
+ \r + + A carriage return character +
+ \n + + A new-line character +
+   +
+ Character Classes +
+ [abc] + + Either a, b, or c +
+ [^abc] + + Any character but a, b, or c +
+ [a-zA-Z] + + Any character ranging from a thru z, or + A thru Z +
+ [^a-zA-Z] + + Any character except those ranging from a thru + z, or A thru Z +
+ [a\-z] + + Either a, -, or z +
+ [a-z[A-Z]] + + Same as [a-zA-Z] +
+ [a-z&&[g-i]] + + Any character in the intersection of a-z and + g-i +
+ [a-z&&[^g-i]] + + Any character in a-z and not in g-i +
+   +
+ Prefefined character classes +
+ . + + Any character. Multiline matching must be compiled into the pattern for + . to match a \r or a \n. + Even if multiline matching is enabled, . will not + match a \r\n, only a \r or a \n. +
+ \d + + [0-9] +
+ \D + + [^\d] +
+ \s + + [ \t\r\n\x0B] +
+ \S + + [^\s] +
+ \w + + [a-zA-Z0-9_] +
+ \W + + [^\w] +
+   +
+ POSIX character classes +
+ \p{Lower} + + [a-z] +
+ \p{Upper} + + [A-Z] +
+ \p{ASCII} + + [\x00-\x7F] +
+ \p{Alpha} + + [a-zA-Z] +
+ \p{Digit} + + [0-9] +
+ \p{Alnum} + + [\w&&[^_]] +
+ \p{Punct} + + [!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~] +
+ \p{XDigit} + + [a-fA-F0-9] +
+   +
+ Boundary Matches +
+ ^ + + The beginning of a line. Also matches the beginning of input. +
+ $ + + The end of a line. Also matches the end of input. +
+ \b + + A word boundary +
+ \B + + A non word boundary +
+ \A + + The beginning of input +
+ \G + + The end of the previous match. Ensures that a "next" match will only + happen if it begins with the character immediately following the end of + the "current" match. +
+ \Z + + The end of input. Will also match if there is a single trailing + \r\n, a single trailing \r, or a single + trailing \n. +
+ \z + + The end of input +
+   +
+ Greedy Quantifiers +
+ x? + + x, either zero times or one time +
+ x* + + x, zero or more times +
+ x+ + + x, one or more times +
+ x{n} + + x, exactly n times +
+ x{n,} + + x, at least n times +
+ x{,m} + + x, at most m times +
+ x{n,m} + + x, at least n times and at most + m times +
+   +
+ Possessive Quantifiers +
+ x?+ + + x, either zero times or one time +
+ x*+ + + x, zero or more times +
+ x++ + + x, one or more times +
+ x{n}+ + + x, exactly n times +
+ x{n,}+ + + x, at least n times +
+ x{,m}+ + + x, at most m times +
+ x{n,m}+ + + x, at least n times and at most + m times +
+   +
+ Reluctant Quantifiers +
+ x?? + + x, either zero times or one time +
+ x*? + + x, zero or more times +
+ x+? + + x, one or more times +
+ x{n}? + + x, exactly n times +
+ x{n,}? + + x, at least n times +
+ x{,m}? + + x, at most m times +
+ x{n,m}? + + x, at least n times and at most + m times +
+   +
+ Operators +
+ xy + + x then y +
+ x|y + + x or y +
+ (x) + + x as a capturing group +
+   +
+ Quoting +
+ \Q + + Nothing, but treat every character (including \s) literally until a + matching \E +
+ \E + + Nothing, but ends its matching \Q +
+   +
+ Special Constructs +
+ (?:x) + + x, but not as a capturing group +
+ (?=x) + + x, via positive lookahead. This means that the + expression will match only if it is trailed by x. + It will not "eat" any of the characters matched by + x. +
+ (?!x) + + x, via negative lookahead. This means that the + expression will match only if it is not trailed by + x. It will not "eat" any of the characters + matched by x. +
+ (?<=x) + + x, via positive lookbehind. x + cannot contain any quantifiers. +
+ (?x) + + x, via negative lookbehind. x + cannot contain any quantifiers. +
+ (?>x) + + x{1}+ +
+   +
+ Registered Expression Matching +
+ {x} + + The registered pattern x +
+ +
+ + Begin Text Extracted And Modified From java.util.regex.WCPattern documentation + +

Backslashes, escapes, and quoting

+ +

The backslash character ((wchar_t)'\') serves to introduce escaped + constructs, as defined in the table above, as well as to quote characters + that otherwise would be interpreted as unescaped constructs. Thus the + expression \\ matches a single backslash and \{ matches a + left brace. + +

It is an error to use a backslash prior to any alphabetic character that + does not denote an escaped construct; these are reserved for future + extensions to the regular-expression language. A backslash may be used + prior to a non-alphabetic character regardless of whether that character is + part of an unescaped construct. + +

It is necessary to double backslashes in string literals that represent + regular expressions to protect them from interpretation by a compiler. The + string literal "\b", for example, matches a single backspace + character when interpreted as a regular expression, while + "\\b" matches a word boundary. The string litera + "\(hello\)" is illegal and leads to a compile-time error; + in order to match the string (hello) the string literal + "\\(hello\\)" must be used. + +

Character Classes

+ +

Character classes may appear within other character classes, and + may be composed by the union operator (implicit) and the intersection + operator (&&). + The union operator denotes a class that contains every character that is + in at least one of its operand classes. The intersection operator + denotes a class that contains every character that is in both of its + operand classes. + +

The precedence of character-class operators is as follows, from + highest to lowest: + +

+ + + + + + + + + + + + + + + + +
1    Literal escape    \x
2    Rangea-z
3    Grouping[...]
4    Intersection[a-z&&[aeiou]]
5    Union[a-e][i-u]
+ +

Note that a different set of metacharacters are in effect inside + a character class than outside a character class. For instance, the + regular expression . loses its special meaning inside a + character class, while the expression - becomes a range + forming metacharacter. + + + + +

Groups and capturing

+ +

Capturing groups are numbered by counting their opening parentheses from + left to right. In the expression ((A)(B(C))), for example, there + are four such groups:

+ +
+ + + + + + + + + + +
1    ((A)(B(C)))
2    (A)
3    (B(C))
4    (C)
+ +

Group zero always stands for the entire expression. + +

Capturing groups are so named because, during a match, each subsequence + of the input sequence that matches such a group is saved. The captured + subsequence may be used later in the expression, via a back reference, and + may also be retrieved from the matcher once the match operation is complete. + +

The captured input associated with a group is always the subsequence + that the group most recently matched. If a group is evaluated a second time + because of quantification then its previously-captured value, if any, will + be retained if the second evaluation fails. Matching the string + L"aba" against the expression (a(b)?)+, for example, leaves + group two set to L"b". All captured input is discarded at the + beginning of each match. + +

Groups beginning with (? are pure, non-capturing groups + that do not capture text and do not count towards the group total. + + +

WC support

+ +

Coming Soon. + +

Comparison to Perl 5

+ +

The WCPattern engine performs traditional NFA-based matching + with ordered alternation as occurs in Perl 5. + +

Perl constructs not supported by this class:

+ +
    + +
  • The conditional constructs (?{X}) and + (?(condition)X|Y), +

  • + +
  • The embedded code constructs (?{code}) + and (??{code}),

  • + +
  • The embedded comment syntax (?#comment), and

  • + +
  • The preprocessing operations \l \u, + \L, and \U.

  • + +
  • Embedded flags

  • + +
+ +

Constructs supported by this class but not by Perl:

+ +
    + +
  • Possessive quantifiers, which greedily match as much as they can + and do not back off, even when doing so would allow the overall match to + succeed.

  • + +
  • Character-class union and intersection as described + above.

  • + +
+ +

Notable differences from Perl:

+ +
    + +
  • In Perl, \1 through \9 are always interpreted + as back references; a backslash-escaped number greater than 9 is + treated as a back reference if at least that many subexpressions exist, + otherwise it is interpreted, if possible, as an octal escape. In this + class octal escapes must always begin with a zero. In this class, + \1 through \9 are always interpreted as back + references, and a larger number is accepted as a back reference if at + least that many subexpressions exist at that point in the regular + expression, otherwise the parser will drop digits until the number is + smaller or equal to the existing number of groups or it is one digit. +

  • + +
  • Perl uses the g flag to request a match that resumes + where the last match left off. This functionality is provided implicitly + by the WCMatcher class: Repeated invocations of the + find method will resume where the last match left off, + unless the matcher is reset.

  • + +
  • Perl is forgiving about malformed matching constructs, as in the + expression *a, as well as dangling brackets, as in the + expression abc], and treats them as literals. This + class also strict and will not compile a pattern when dangling characters + are encountered.

  • + +
+ + +

For a more precise description of the behavior of regular expression + constructs, please see + Mastering Regular Expressions, 2nd Edition, Jeffrey E. F. Friedl, + O'Reilly and Associates, 2002. +

+

+ + End Text Extracted And Modified From java.util.regex.WCPattern documentation + +


+ + @author Jeffery Stuart + @since March 2003, Stable Since November 2004 + @version 1.07.00 + @memo A class used to represent "PERL 5"-ish regular expressions + */ +class WCPattern +{ + friend class WCMatcher; + friend class NFAUNode; + friend class NFAQuantifierUNode; + private: + /** + This constructor should not be called directly. Those wishing to use the + WCPattern class should instead use the {@link compile compile} method. + + @param rhs The pattern to compile + @memo Creates a new pattern from the regular expression in rhs. + */ + WCPattern(const bkstring & rhs); + protected: + /** + This currently is not used, so don't try to do anything with it. + @memo Holds all the compiled patterns for quick access. + */ + static std::map compiledWCPatterns; + /** + Holds all of the registered patterns as strings. Due to certain problems + with compilation of patterns, especially with capturing groups, this seemed + to be the best way to do it. + */ + static std::map > registeredWCPatterns; + protected: + /** + Holds all the NFA nodes used. This makes deletion of a pattern, as well as + clean-up from an unsuccessful compile much easier and faster. + */ + std::map nodes; + /** + Used when methods like split are called. The matcher class uses a lot of + dynamic memeory, so having an instance increases speedup of certain + operations. + */ + WCMatcher * matcher; + /** + The front node of the NFA. + */ + NFAUNode * head; + /** + The actual regular expression we rerpesent + */ + bkstring pattern; + /** + Flag used during compilation. Once the pattern is successfully compiled, + error is no longer used. + */ + bool error; + /** + Used during compilation to keep track of the current index into + {@link pattern pattern}. Once the pattern is successfully + compiled, error is no longer used. + */ + int curInd; + /** + The number of capture groups this contains. + */ + int groupCount; + /** + The number of non-capture groups this contains. + */ + int nonCapGroupCount; + /** + The flags specified when this was compiled. + */ + unsigned long flags; + protected: + /** + Raises an error during compilation. Compilation will cease at that point + and compile will return NULL. + */ + void raiseError(); + /** + Convenience function for registering a node in nodes. + @param node The node to register + @return The registered node + */ + NFAUNode * registerNode(NFAUNode * node); + + /** + Calculates the union of two strings. This function will first sort the + strings and then use a simple selection algorithm to find the union. + @param s1 The first "class" to union + @param s2 The second "class" to union + @return A new string containing all unique characters. Each character + must have appeared in one or both of s1 and + s2. + */ + bkstring classUnion (bkstring s1, bkstring s2) const; + /** + Calculates the intersection of two strings. This function will first sort + the strings and then use a simple selection algorithm to find the + intersection. + @param s1 The first "class" to intersect + @param s2 The second "class" to intersect + @return A new string containing all unique characters. Each character + must have appeared both s1 and s2. + */ + bkstring classIntersect (bkstring s1, bkstring s2) const; + /** + Calculates the negation of a string. The negation is the set of all + characters between \x00 and \xFF not + contained in s1. + @param s1 The "class" to be negated. + @param s2 The second "class" to intersect + @return A new string containing all unique characters. Each character + must have appeared both s1 and s2. + */ + bkstring classNegate (bkstring s1) const; + /** + Creates a new "class" representing the range from low thru + hi. This function will wrap if low > + hi. This is a feature, not a buf. Sometimes it is useful + to be able to say [\x70-\x10] instead of [\x70-\x7F\x00-\x10]. + @param low The beginning character + @param hi The ending character + @return A new string containing all the characters from low thru hi. + */ + bkstring classCreateRange(wchar_t low, wchar_t hi) const; + + /** + Extracts a decimal number from the substring of member-variable + {@link pattern pattern} starting at start and + ending at end. + @param start The starting index in {@link pattern pattern} + @param end The last index in {@link pattern pattern} + @return The decimal number in {@link pattern pattern} + */ + int getInt(int start, int end); + /** + Parses a {n,m} string out of the member-variable + {@link pattern pattern} stores the result in sNum + and eNum. + @param sNum Output parameter. The minimum number of matches required + by the curly quantifier are stored here. + @param eNum Output parameter. The maximum number of matches allowed + by the curly quantifier are stored here. + @return Success/Failure. Fails when the curly does not have the proper + syntax + */ + bool quantifyCurly(int & sNum, int & eNum); + /** + Tries to quantify the currently parsed group. If the group being parsed + is indeed quantified in the member-variable + {@link pattern pattern}, then the NFA is modified accordingly. + @param start The starting node of the current group being parsed + @param stop The ending node of the current group being parsed + @param gn The group number of the current group being parsed + @return The node representing the starting node of the group. If the + group becomes quantified, then this node is not necessarily + a GroupHead node. + */ + NFAUNode * quantifyGroup(NFAUNode * start, NFAUNode * stop, const int gn); + + /** + Tries to quantify the last parsed expression. If the character was indeed + quantified, then the NFA is modified accordingly. + @param newNode The recently created expression node + @return The node representing the last parsed expression. If the + expression was quantified, return value != newNode + */ + NFAUNode * quantify(NFAUNode * newNode); + /** + Parses the current class being examined in + {@link pattern pattern}. + @return A string of unique characters contained in the current class being + parsed + */ + bkstring parseClass(); + /** + Parses the current POSIX class being examined in + {@link pattern pattern}. + @return A string of unique characters representing the POSIX class being + parsed + */ + bkstring parsePosix(); + /** + Returns a string containing the octal character being parsed + @return The string contained the octal value being parsed + */ + bkstring parseOctal(); + /** + Returns a string containing the hex character being parsed + @return The string contained the hex value being parsed + */ + bkstring parseHex(); + /** + Returns a new node representing the back reference being parsed + @return The new node representing the back reference being parsed + */ + NFAUNode * parseBackref(); + /** + Parses the escape sequence currently being examined. Determines if the + escape sequence is a class, a single character, or the beginning of a + quotation sequence. + @param inv Output parameter. Whether or not to invert the returned class + @param quo Output parameter. Whether or not this sequence starts a + quotation. + @return The characters represented by the class + */ + bkstring parseEscape(bool & inv, bool & quo); + /** + Parses a supposed registered pattern currently under compilation. If the + sequence of characters does point to a registered pattern, then the + registered pattern is appended to *end. The registered pattern + is parsed with the current compilation flags. + @param end The ending node of the thus-far compiled pattern + @return The new end node of the current pattern + */ + NFAUNode * parseRegisteredWCPattern(NFAUNode ** end); + /** + Parses a lookbehind expression. Appends the necessary nodes + *end. + @param pos Positive or negative look behind + @param end The ending node of the current pattern + @return The new end node of the current pattern + */ + NFAUNode * parseBehind(const bool pos, NFAUNode ** end); + /** + Parses the current expression and tacks on nodes until a \E is found. + @return The end of the current pattern + */ + NFAUNode * parseQuote(); + /** + Parses {@link pattern pattern}. This function is called + recursively when an or (|) or a group is encountered. + @param inParen Are we currently parsing inside a group + @param inOr Are we currently parsing one side of an or (|) + @param end The end of the current expression + @return The starting node of the NFA constructed from this parse + */ + NFAUNode * parse(const bool inParen = 0, const bool inOr = 0, NFAUNode ** end = NULL); + public: + /// We should match regardless of case + const static unsigned long CASE_INSENSITIVE; + /// We are implicitly quoted + const static unsigned long LITERAL; + /// @memo We should treat a . as [\x00-\x7F] + const static unsigned long DOT_MATCHES_ALL; + /** ^ and $ should anchor to the beginning and + ending of lines, not all input + */ + const static unsigned long MULTILINE_MATCHING; + /** When enabled, only instances of \n are recognized as + line terminators + */ + const static unsigned long UNIX_LINE_MODE; + /// The absolute minimum number of matches a quantifier can match (0) + const static int MIN_QMATCH; + /// The absolute maximum number of matches a quantifier can match (0x7FFFFFFF) + const static int MAX_QMATCH; + public: + /** + Call this function to compile a regular expression into a + WCPattern object. Special values can be assigned to + mode when certain non-standard behaviors are expected from + the WCPattern object. + @param pattern The regular expression to compile + @param mode A bitwise or of flags signalling what special behaviors are + wanted from this WCPattern object + @return If successful, compile returns a WCPattern + pointer. Upon failure, compile returns + NULL + */ + static WCPattern * compile (const bkstring & pattern, + const unsigned long mode = 0); + /** + Dont use this function. This function will compile a pattern, and cache + the result. This will eventually be used as an optimization when people + just want to call static methods using the same pattern over and over + instead of first compiling the pattern and then using the compiled + instance for matching. + @param pattern The regular expression to compile + @param mode A bitwise or of flags signalling what special behaviors are + wanted from this WCPattern object + @return If successful, compileAndKeep returns a + WCPattern pointer. Upon failure, compile + returns NULL. + */ + static WCPattern * compileAndKeep (const bkstring & pattern, + const unsigned long mode = 0); + + /** + Searches through replace and replaces all substrings matched + by pattern with str. str may + contain backreferences (e.g. \1) to capture groups. A typical + invocation looks like: +

+ + WCPattern::replace(L"(a+)b(c+)", L"abcccbbabcbabc", L"\\2b\\1"); + +

+ which would replace abcccbbabcbabc with + cccbabbcbabcba. + @param pattern The regular expression + @param str The replacement text + @param replacementText The string in which to perform replacements + @param mode The special mode requested of the WCPattern + during the replacement process + @return The text with the replacement string substituted where necessary + */ + static bkstring replace (const bkstring & pattern, + const bkstring & str, + const bkstring & replacementText, + const unsigned long mode = 0); + + /** + Splits the specified string over occurrences of the specified pattern. + Empty strings can be optionally ignored. The number of strings returned is + configurable. A typical invocation looks like: +

+ + bkstring str(strSize, 0);
+ FILE * fp = fopen(fileName, "r");
+ fread((char*)str.data(), strSize * 2, 1, fp);
+ fclose(fp);
+
+ std::vector<bkstring> lines = WCPattern::split(L"[\r\n]+", str, true);
+
+
+ + @param pattern The regular expression + @param replace The string to split + @param keepEmptys Whether or not to keep empty strings + @param limit The maximum number of splits to make + @param mode The special mode requested of the WCPattern + during the split process + @return All substrings of str split across pattern. + */ + static std::vector split (const bkstring & pattern, + const bkstring & str, + const bool keepEmptys = 0, + const unsigned long limit = 0, + const unsigned long mode = 0); + + /** + Finds all the instances of the specified pattern within the string. You + should be careful to only pass patterns with a minimum length of one. For + example, the pattern a* can be matched by an empty string, so + instead you should pass a+ since at least one character must + be matched. A typical invocation of findAll looks like: +

+ + std::vector<td::string> numbers = WCPattern::findAll(L"\\d+", string); + +

+ + @param pattern The pattern for which to search + @param str The string to search + @param mode The special mode requested of the WCPattern + during the find process + @return All instances of pattern in str + */ + static std::vector findAll (const bkstring & pattern, + const bkstring & str, + const unsigned long mode = 0); + + /** + Determines if an entire string matches the specified pattern + + @param pattern The pattern for to match + @param str The string to match + @param mode The special mode requested of the WCPattern + during the replacement process + @return True if str is recognized by pattern + */ + static bool matches (const bkstring & pattern, + const bkstring & str, + const unsigned long mode = 0); + + /** + Registers a pattern under a specific name for use in later compilations. + A typical invocation and later use looks like: +

+ + WCPattern::registerWCPattern(L"ip", L"(?:\\d{1,3}\\.){3}\\d{1,3}");
+ WCPattern * p1 = WCPattern::compile(L"{ip}:\\d+");
+ WCPattern * p2 = WCPattern::compile(L"Connection from ({ip}) on port \\d+");
+
+

+ Multiple calls to registerWCPattern with the same + name will result in the pattern getting overwritten. + + @param name The name to give to the pattern + @param pattern The pattern to register + @param mode Any special flags to use when compiling pattern + @return Success/Failure. Fails only if pattern has invalid + syntax + */ + static bool registerWCPattern(const bkstring & name, + const bkstring & pattern, + const unsigned long mode = 0); + + /** + Clears the pattern registry + */ + static void unregisterWCPatterns(); + /** + Don't use + */ + static void clearWCPatternCache(); + + /** + Searches through a string for the nth match of the + given pattern in the string. Match indeces start at zero, not one. + A typical invocation looks like this: +

+ + std::pair<bkstring, int> match = WCPattern::findNthMatch(L"\\d{1,3}", L"192.168.1.101:22", 1);
+ wprintf(L"%s %i\n", match.first.c_str(), match.second);
+
+ Output: 168 4
+
+ + @param pattern The pattern for which to search + @param str The string to search + @param matchNum Which match to find + @param mode Any special flags to use during the matching process + @return A string and an integer. The string is the string matched. The + integer is the starting location of the matched string in + str. You can check for success/failure by making sure + that the integer returned is greater than or equal to zero. + */ + static std::pair findNthMatch (const bkstring & pattern, + const bkstring & str, + const int matchNum, + const unsigned long mode = 0); + public: + /** + Deletes all NFA nodes allocated during compilation + */ + ~WCPattern(); + + bkstring replace (const bkstring & str, + const bkstring & replacementText); + std::vector split (const bkstring & str, const bool keepEmptys = 0, + const unsigned long limit = 0); + std::vector findAll (const bkstring & str); + bool matches (const bkstring & str); + /** + Returns the flags used during compilation of this pattern + @return The flags used during compilation of this pattern + */ + unsigned long getFlags () const; + /** + Returns the regular expression this pattern represents + @return The regular expression this pattern represents + */ + bkstring getWCPattern () const; + /** + Creates a matcher object using the specified string and this pattern. + @param str The string to match against + @return A new matcher using object using this pattern and the specified + string + */ + WCMatcher * createWCMatcher (const bkstring & str); +}; + +class NFAUNode +{ + friend class WCMatcher; + public: + NFAUNode * next; + NFAUNode(); + virtual ~NFAUNode(); + virtual void findAllNodes(std::map & soFar); + virtual int match(const bkstring & str, WCMatcher * matcher, const int curInd = 0) const = 0; + inline virtual bool isGroupHeadNode() const { return false; } + inline virtual bool isStartOfInputNode() const { return false; } +}; +class NFACharUNode : public NFAUNode +{ + protected: + wchar_t ch; + public: + NFACharUNode(const wchar_t c); + virtual int match(const bkstring & str, WCMatcher * matcher, const int curInd = 0) const; +}; +class NFACICharUNode : public NFAUNode +{ + protected: + wchar_t ch; + public: + NFACICharUNode(const wchar_t c); + virtual int match(const bkstring & str, WCMatcher * matcher, const int curInd = 0) const; +}; +class NFAStartUNode : public NFAUNode +{ + public: + NFAStartUNode(); + virtual int match(const bkstring & str, WCMatcher * matcher, const int curInd = 0) const; +}; +class NFAEndUNode : public NFAUNode +{ + public: + NFAEndUNode(); + virtual int match(const bkstring & str, WCMatcher * matcher, const int curInd = 0) const; +}; +class NFAQuantifierUNode : public NFAUNode +{ + public: + int min, max; + NFAUNode * inner; + virtual void findAllNodes(std::map & soFar); + NFAQuantifierUNode(WCPattern * pat, NFAUNode * internal, + const int minMatch = WCPattern::MIN_QMATCH, + const int maxMatch = WCPattern::MAX_QMATCH); + virtual int match(const bkstring & str, WCMatcher * matcher, const int curInd = 0) const; +}; +class NFAGreedyQuantifierUNode : public NFAQuantifierUNode +{ + public: + NFAGreedyQuantifierUNode(WCPattern * pat, NFAUNode * internal, + const int minMatch = WCPattern::MIN_QMATCH, + const int maxMatch = WCPattern::MAX_QMATCH); + virtual int match(const bkstring & str, WCMatcher * matcher, const int curInd = 0) const; + virtual int matchInternal(const bkstring & str, WCMatcher * matcher, const int curInd, const int soFar) const; +}; +class NFALazyQuantifierUNode : public NFAQuantifierUNode +{ + public: + NFALazyQuantifierUNode(WCPattern * pat, NFAUNode * internal, + const int minMatch = WCPattern::MIN_QMATCH, + const int maxMatch = WCPattern::MAX_QMATCH); + virtual int match(const bkstring & str, WCMatcher * matcher, const int curInd = 0) const; +}; +class NFAPossessiveQuantifierUNode : public NFAQuantifierUNode +{ + public: + NFAPossessiveQuantifierUNode(WCPattern * pat, NFAUNode * internal, + const int minMatch = WCPattern::MIN_QMATCH, + const int maxMatch = WCPattern::MAX_QMATCH); + virtual int match(const bkstring & str, WCMatcher * matcher, const int curInd = 0) const; +}; +class NFAAcceptUNode : public NFAUNode +{ + public: + NFAAcceptUNode(); + virtual int match(const bkstring & str, WCMatcher * matcher, const int curInd = 0) const; +}; +class NFAClassUNode : public NFAUNode +{ + public: + bool inv; + std::map vals; + NFAClassUNode(const bool invert = 0); + NFAClassUNode(const bkstring & clazz, const bool invert); + virtual int match(const bkstring & str, WCMatcher * matcher, const int curInd = 0) const; +}; +class NFACIClassUNode : public NFAUNode +{ + public: + bool inv; + std::map vals; + NFACIClassUNode(const bool invert = 0); + NFACIClassUNode(const bkstring & clazz, const bool invert); + virtual int match(const bkstring & str, WCMatcher * matcher, const int curInd = 0) const; +}; +class NFASubStartUNode : public NFAUNode +{ + public: + NFASubStartUNode(); + virtual int match(const bkstring & str, WCMatcher * matcher, const int curInd = 0) const; +}; +class NFAOrUNode : public NFAUNode +{ + public: + NFAUNode * one; + NFAUNode * two; + NFAOrUNode(NFAUNode * first, NFAUNode * second); + virtual void findAllNodes(std::map & soFar); + virtual int match(const bkstring & str, WCMatcher * matcher, const int curInd = 0) const; +}; +class NFAQuoteUNode : public NFAUNode +{ + public: + bkstring qStr; + NFAQuoteUNode(const bkstring & quoted); + virtual int match(const bkstring & str, WCMatcher * matcher, const int curInd = 0) const; +}; +class NFACIQuoteUNode : public NFAUNode +{ + public: + bkstring qStr; + NFACIQuoteUNode(const bkstring & quoted); + virtual int match(const bkstring & str, WCMatcher * matcher, const int curInd = 0) const; +}; +class NFALookAheadUNode : public NFAUNode +{ + public: + bool pos; + NFAUNode * inner; + NFALookAheadUNode(NFAUNode * internal, const bool positive); + virtual void findAllNodes(std::map & soFar); + virtual int match(const bkstring & str, WCMatcher * matcher, const int curInd = 0) const; +}; +class NFALookBehindUNode : public NFAUNode +{ + public: + bool pos; + bkstring mStr; + NFALookBehindUNode(const bkstring & str, const bool positive); + virtual int match(const bkstring & str, WCMatcher * matcher, const int curInd = 0) const; +}; +class NFAStartOfLineUNode : public NFAUNode +{ + public: + NFAStartOfLineUNode(); + virtual int match(const bkstring & str, WCMatcher * matcher, const int curInd = 0) const; +}; +class NFAEndOfLineUNode : public NFAUNode +{ + public: + NFAEndOfLineUNode(); + virtual int match(const bkstring & str, WCMatcher * matcher, const int curInd = 0) const; +}; +class NFAReferenceUNode : public NFAUNode +{ + public: + int gi; + NFAReferenceUNode(const int groupIndex); + virtual int match(const bkstring & str, WCMatcher * matcher, const int curInd = 0) const; +}; +class NFAStartOfInputUNode : public NFAUNode +{ + public: + NFAStartOfInputUNode(); + virtual int match(const bkstring & str, WCMatcher * matcher, const int curInd = 0) const; + inline virtual bool isStartOfInputNode() const { return false; } +}; +class NFAEndOfInputUNode : public NFAUNode +{ + public: + bool term; + NFAEndOfInputUNode(const bool lookForTerm); + virtual int match(const bkstring & str, WCMatcher * matcher, const int curInd = 0) const; +}; +class NFAWordBoundaryUNode : public NFAUNode +{ + public: + bool pos; + NFAWordBoundaryUNode(const bool positive); + virtual int match(const bkstring & str, WCMatcher * matcher, const int curInd = 0) const; +}; +class NFAEndOfMatchUNode : public NFAUNode +{ + public: + NFAEndOfMatchUNode(); + virtual int match(const bkstring & str, WCMatcher * matcher, const int curInd = 0) const; +}; +class NFAGroupHeadUNode : public NFAUNode +{ + public: + int gi; + NFAGroupHeadUNode(const int groupIndex); + virtual int match(const bkstring & str, WCMatcher * matcher, const int curInd = 0) const; + inline virtual bool isGroupHeadNode() const { return false; } +}; +class NFAGroupTailUNode : public NFAUNode +{ + public: + int gi; + NFAGroupTailUNode(const int groupIndex); + virtual int match(const bkstring & str, WCMatcher * matcher, const int curInd = 0) const; +}; +class NFAGroupLoopPrologueUNode : public NFAUNode +{ + public: + int gi; + NFAGroupLoopPrologueUNode(const int groupIndex); + virtual int match(const bkstring & str, WCMatcher * matcher, const int curInd = 0) const; +}; +class NFAGroupLoopUNode : public NFAUNode +{ + public: + int gi, min, max, type; + NFAUNode * inner; + NFAGroupLoopUNode(NFAUNode * internal, const int minMatch, + const int maxMatch, const int groupIndex, const int matchType); + virtual void findAllNodes(std::map & soFar); + virtual int match(const bkstring & str, WCMatcher * matcher, const int curInd = 0) const; + int matchGreedy(const bkstring & str, WCMatcher * matcher, const int curInd = 0) const; + int matchLazy(const bkstring & str, WCMatcher * matcher, const int curInd = 0) const; + int matchPossessive(const bkstring & str, WCMatcher * matcher, const int curInd = 0) const; +}; + +#endif + diff --git a/plugins/SmileyAdd/src/regexp/test.cpp b/plugins/SmileyAdd/src/regexp/test.cpp new file mode 100644 index 0000000000..bb41566f96 --- /dev/null +++ b/plugins/SmileyAdd/src/regexp/test.cpp @@ -0,0 +1,38 @@ +#include +#include +#include +#include + +int main() +{ + { + Pattern * p = Pattern::compile("^([^:]*)://([^/:]*)((?::[0-9]+)?)/?(([^?]*)((?:\\?.*)?))$"); + Matcher * m0 = p->createMatcher("http://www.example.com:80/test.php?a=1&a=1&a=1"); + + if (m0->matches()) + { + std::vector groups = m0->getGroups(true); + for (int i = 0; i < (int)groups.size(); ++i) + { + printf("m->group(%d): %s\n", i, groups[i].c_str()); + } + } + } + { + std::wstring pat = L"^([^:]*)://([^/:]*)((?::[0-9]+)?)/?(([^?]*)((?:\\?.*)?))$"; + std::wstring mat = L"http://www.example.com:80/test.php?a=1&a=1&a=1"; + UnicodePattern * p = UnicodePattern::compile(pat); + UnicodeMatcher * m0 = p->createUnicodeMatcher(mat); + + if (m0->matches()) + { + std::vector groups = m0->getGroups(true); + for (int i = 0; i < (int)groups.size(); ++i) + { + wprintf(L"m->group(%d): %s\n", i, groups[i].c_str()); + } + } + } + + return 0; +} diff --git a/plugins/SmileyAdd/src/resource.h b/plugins/SmileyAdd/src/resource.h new file mode 100644 index 0000000000..bdf799fe2c --- /dev/null +++ b/plugins/SmileyAdd/src/resource.h @@ -0,0 +1,49 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by resource.rc +// +#define IDI_SMILINGICON 124 +#define IDD_OPT_SMILEYS 245 +#define IDC_CATEGORYLIST 1017 +#define IDC_PLUGENABLED 1019 +#define IDC_INPUTSMILEYS 1020 +#define IDC_DCURSORSMILEY 1021 +#define IDC_LIBNAME 1023 +#define IDC_SPACES 1024 +#define IDC_LIBAUTHOR 1026 +#define IDC_LIBVERSION 1027 +#define IDC_SCALETOTEXTHEIGHT 1037 +#define IDC_APPENDSPACES 1040 +#define IDC_SMLOPTBUTTON 1045 +#define IDC_SCALEALLSMILEYS 1046 +#define IDC_IEVIEWSTYLE 1047 +#define IDC_ANIMATESEL 1048 +#define IDC_USESTDPACK 1049 +#define IDC_ANIMATEDLG 1051 +#define IDC_DISABLECUSTOM 1052 +#define IDC_DISABLECUSTOM2 1053 +#define IDC_HQSCALING 1053 +#define IDC_SELCLR 1055 +#define IDC_NEWCATEGORY 1058 +#define IDC_ADDCATEGORY 1059 +#define IDC_DELETECATEGORY 1060 +#define IDC_SMLBUT 1061 +#define IDC_MAXCUSTSMSZ 1062 +#define IDC_MAXCUSTSPIN 1063 +#define IDC_MINSMSZ 1064 +#define IDC_MINSPIN 1065 +#define IDC_BROWSE 1184 +#define IDC_FILENAME 1271 +#define IDC_STATIC -1 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NO_MFC 1 +#define _APS_NEXT_RESOURCE_VALUE 127 +#define _APS_NEXT_COMMAND_VALUE 40001 +#define _APS_NEXT_CONTROL_VALUE 1064 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/plugins/SmileyAdd/src/richcall.cpp b/plugins/SmileyAdd/src/richcall.cpp new file mode 100644 index 0000000000..d9b9123c48 --- /dev/null +++ b/plugins/SmileyAdd/src/richcall.cpp @@ -0,0 +1,554 @@ +/* +Miranda SmileyAdd Plugin +Copyright (C) 2008 - 2011 Boris Krasnovskiy All Rights Reserved + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation version 2 +of the License. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include "general.h" +#include "smileys.h" +#include "smileyroutines.h" +#include "services.h" +#include "options.h" +#include "SmileyBase.h" + +#include +#include + +typedef struct +{ + HWND hwnd; + HANDLE hContact; + WNDPROC wpOrigWndProc; + HWND hToolTip; + int tipActive; + bool inputarea; + bool dontReplace; +} RichEditData; + +typedef struct +{ + HWND hwnd; + WNDPROC wpOrigWndProc; + HWND hwndInput; + HWND hwndLog; +} RichEditOwnerData; + +static int CompareRichEditData(const RichEditData* p1, const RichEditData* p2) +{ + return (int)((INT_PTR)p1->hwnd - (INT_PTR)p2->hwnd); +} +static LIST g_RichEditList(10, CompareRichEditData); + + +static int CompareRichEditData(const RichEditOwnerData* p1, const RichEditOwnerData* p2) +{ + return (int)((INT_PTR)p1->hwnd - (INT_PTR)p2->hwnd); +} +static LIST g_RichEditOwnerList(5, CompareRichEditData); + + +static void SetPosition(HWND hwnd) +{ + IRichEditOle* RichEditOle; + if (SendMessage(hwnd, EM_GETOLEINTERFACE, 0, (LPARAM)&RichEditOle) == 0) + return; + + ITextDocument* TextDocument; + if (RichEditOle->QueryInterface(IID_ITextDocument, (void**)&TextDocument) != S_OK) + { + RichEditOle->Release(); + return; + } + + // retrieve text range + ITextRange* TextRange; + if (TextDocument->Range(0, 0, &TextRange) != S_OK) + { + TextDocument->Release(); + RichEditOle->Release(); + return; + } + TextDocument->Release(); + + int objectCount = RichEditOle->GetObjectCount(); + for (int i = objectCount - 1; i >= 0; i--) + { + REOBJECT reObj = {0}; + reObj.cbStruct = sizeof(REOBJECT); + + HRESULT hr = RichEditOle->GetObject(i, &reObj, REO_GETOBJ_POLEOBJ); + if (FAILED(hr)) continue; + + ISmileyBase *igsc = NULL; + if (reObj.clsid == CLSID_NULL) + reObj.poleobj->QueryInterface(IID_ISmileyAddSmiley, (void**) &igsc); + + reObj.poleobj->Release(); + if (igsc == NULL) continue; + + TextRange->SetRange(reObj.cp, reObj.cp); + + BOOL res; + POINT pt; + RECT rect; + hr = TextRange->GetPoint(tomStart | TA_BOTTOM | TA_LEFT, &pt.x, &pt.y); + if (hr == S_OK) + { + res = ScreenToClient(hwnd, &pt); + rect.bottom = pt.y; + rect.left = pt.x; + } + else + rect.bottom = -1; + + hr = TextRange->GetPoint(tomStart | TA_TOP | TA_LEFT, &pt.x, &pt.y); + if (hr == S_OK) + { + res = ScreenToClient(hwnd, &pt); + rect.top = pt.y; + rect.left = pt.x; + } + else + rect.top = -1; + + igsc->SetPosition(hwnd, &rect); + igsc->Release(); + } + TextRange->Release(); + RichEditOle->Release(); +} + +static void SetTooltip(long x, long y, HWND hwnd, RichEditData* rdt) +{ + TCHAR* smltxt; + int needtip = CheckForTip(x, y, hwnd, &smltxt); + if (needtip != rdt->tipActive) + { + TOOLINFO ti = {0}; + ti.cbSize = sizeof(ti); + ti.uFlags = TTF_IDISHWND | TTF_SUBCLASS; + ti.hwnd = hwnd; + ti.uId = (UINT_PTR)ti.hwnd; + + if (needtip != -1) + { + if (rdt->tipActive == -1) + { + rdt->hToolTip = CreateWindowEx(WS_EX_TOPMOST, TOOLTIPS_CLASS, _T(""), + TTS_NOPREFIX | WS_POPUP, + CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, + hwnd, NULL, g_hInst, NULL); + + SendMessage(rdt->hToolTip, TTM_ADDTOOL, 0, (LPARAM)&ti); + } + + ti.lpszText = smltxt; + SendMessage(rdt->hToolTip, TTM_UPDATETIPTEXT, 0, (LPARAM)&ti); + SendMessage(rdt->hToolTip, TTM_ACTIVATE, TRUE, 0); + } + else + { + if (rdt->tipActive != -1) + { + SendMessage(rdt->hToolTip, TTM_ACTIVATE, FALSE, 0); + DestroyWindow(rdt->hToolTip); + rdt->hToolTip = NULL; + } + } + rdt->tipActive = needtip; + } +} + +static const CHARRANGE allsel = { 0, LONG_MAX }; + + +static void ReplaceContactSmileys(RichEditData *rdt, const CHARRANGE &sel, bool ignoreLast, bool unFreeze) +{ + if ((rdt->inputarea && !opt.InputSmileys) || rdt->dontReplace) return; + SmileyPackCType *smcp = NULL; + SmileyPackType* SmileyPack = GetSmileyPack(NULL, rdt->hContact, rdt->inputarea ? NULL : &smcp); + ReplaceSmileys(rdt->hwnd, SmileyPack, smcp, sel, false, ignoreLast, unFreeze); +} + +static void ReplaceContactSmileysWithText(RichEditData *rdt, CHARRANGE &sel, bool freeze) +{ + if ((rdt->inputarea && !opt.InputSmileys) || rdt->dontReplace) return; + ReplaceSmileysWithText(rdt->hwnd, sel, freeze); +} + +static void SmileyToTextCutPrep(RichEditData* rdt) +{ + if ((rdt->inputarea && !opt.InputSmileys) || rdt->dontReplace) return; + + SendMessage(rdt->hwnd, WM_SETREDRAW, FALSE, 0); + CHARRANGE sel; + SendMessage(rdt->hwnd, EM_EXGETSEL, 0, (LPARAM)&sel); + ReplaceContactSmileysWithText(rdt, sel, true); +} + +static void SmileyToTextCutRest(RichEditData* rdt) +{ + if ((rdt->inputarea && !opt.InputSmileys) || rdt->dontReplace) return; + + CHARRANGE sel; + SendMessage(rdt->hwnd, EM_EXGETSEL, 0, (LPARAM)&sel); + ReplaceContactSmileys(rdt, sel, false, true); + SendMessage(rdt->hwnd, WM_SETREDRAW, TRUE, 0); + RedrawWindow(rdt->hwnd, NULL, NULL, RDW_INVALIDATE | RDW_UPDATENOW); +} + + +static LRESULT CALLBACK RichEditSubclass(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) +{ + RichEditData* rdt = g_RichEditList.find((RichEditData*)&hwnd); + if (rdt == NULL) return 0; + + CHARRANGE sel; + + WNDPROC wpOrigWndProc = rdt->wpOrigWndProc; + + switch(uMsg) + { + case WM_DESTROY: + CloseRichCallback(hwnd, false); + break; + + case WM_COPY: + case WM_CUT: + SmileyToTextCutPrep(rdt); + break; + + case WM_PAINT: + SetPosition(hwnd); + break; + + case EM_STREAMOUT: + if (wParam & SFF_SELECTION) + SmileyToTextCutPrep(rdt); + else + { + sel = allsel; + ReplaceContactSmileysWithText(rdt, sel, true); + } + break; + + case WM_KEYDOWN: + if ((wParam == 'C' || wParam == VK_INSERT) && (GetKeyState(VK_CONTROL) & 0x8000)) + { + SmileyToTextCutPrep(rdt); + } + else if ((wParam == 'X' && (GetKeyState(VK_CONTROL) & 0x8000)) || + (wParam == VK_DELETE && (GetKeyState(VK_SHIFT) & 0x8000))) + { + SmileyToTextCutPrep(rdt); + } + else if (wParam == VK_TAB && ((GetKeyState(VK_CONTROL) | GetKeyState(VK_SHIFT)) & 0x8000) == 0) + { + SendMessage(hwnd, EM_EXGETSEL, 0, (LPARAM)&sel); + sel.cpMin = max(sel.cpMin - 20, 0); + + ReplaceContactSmileysWithText(rdt, sel, true); + } + break; + } + + LRESULT result = CallWindowProc(wpOrigWndProc, hwnd, uMsg, wParam, lParam); + + switch(uMsg) + { + case WM_DESTROY: + CloseRichCallback(hwnd, true); + break; + + case WM_MOUSEMOVE: + SetTooltip(LOWORD(lParam), HIWORD(lParam), hwnd, rdt); + break; + + case WM_PAINT: + case WM_HSCROLL: + case WM_VSCROLL: + SetPosition(hwnd); + break; + + case WM_COPY: + case WM_CUT: + SmileyToTextCutRest(rdt); + break; + + case EM_STREAMOUT: + if (wParam & SFF_SELECTION) + SmileyToTextCutRest(rdt); + else + ReplaceContactSmileys(rdt, allsel, false, true); + break; + + case WM_KEYDOWN: + if ((wParam == 'C' || wParam == VK_INSERT) && (GetKeyState(VK_CONTROL) & 0x8000)) + { + SmileyToTextCutRest(rdt); + } + else if ((wParam == 'X' && (GetKeyState(VK_CONTROL) & 0x8000)) || + (wParam == VK_DELETE && (GetKeyState(VK_SHIFT) & 0x8000))) + { + SmileyToTextCutRest(rdt); + } + else if (wParam == VK_TAB && ((GetKeyState(VK_CONTROL) | GetKeyState(VK_SHIFT)) & 0x8000) == 0) + { + sel.cpMax = LONG_MAX; + bool hascont = rdt->hContact != NULL; + ReplaceContactSmileys(rdt, sel, false, hascont); + } + break; + + case WM_CHAR: + if (!rdt->inputarea || (rdt->inputarea && !opt.InputSmileys)) + break; + + if (lParam & (1 << 28)) // ALT key + break; + + if ((lParam & 0xFF) > 2) // Repeat rate + break; + + if (wParam > ' ' && opt.EnforceSpaces) + break; + + if (wParam == 0x16) + { + ReplaceContactSmileys(rdt, allsel, false, false); + break; + } + + if (opt.DCursorSmiley) + { + ReplaceContactSmileys(rdt, allsel, true, true); + } + else + { + if (wParam >= ' ' || wParam == '\n' || wParam == '\r') + { + SendMessage(hwnd, EM_EXGETSEL, 0, (LPARAM)&sel); + sel.cpMin = max(sel.cpMin - 20, 0); + sel.cpMax += 20; + + ReplaceContactSmileysWithText(rdt, sel, true); + ReplaceContactSmileys(rdt, sel, false, true); + } + } + break; + + case EM_PASTESPECIAL: + case WM_PASTE: + case EM_REPLACESEL: + case WM_SETTEXT: + case EM_SETTEXTEX: + if (rdt->inputarea) + ReplaceContactSmileys(rdt, allsel, false, false); + break; + + case WM_REMAKERICH: + ReplaceContactSmileys(rdt, allsel, false, false); + break; + } + + return result; +} + +void CloseRichCallback(HWND hwnd, bool force) +{ + int ind = g_RichEditList.getIndex((RichEditData*)&hwnd); + if ( ind != -1 ) + { + RichEditData* rdt = g_RichEditList[ind]; + bool richsub = GetWindowLongPtr(hwnd, GWLP_WNDPROC) == (LONG_PTR)RichEditSubclass; + if (richsub) SetWindowLongPtr(hwnd, GWLP_WNDPROC, (LONG_PTR)rdt->wpOrigWndProc); + if (richsub || force) + { + if (rdt->hToolTip) DestroyWindow(rdt->hToolTip); + delete rdt; + g_RichEditList.remove(ind); + } + } +} + +bool SetRichCallback(HWND hwnd, HANDLE hContact, bool subany, bool subnew) +{ + RichEditData* rdt = g_RichEditList.find((RichEditData*)&hwnd); + if (rdt == NULL) + { + IRichEditOle* RichEditOle; + if (SendMessage(hwnd, EM_GETOLEINTERFACE, 0, (LPARAM)&RichEditOle) == 0) + return false; + RichEditOle->Release(); + + rdt = new RichEditData; + + rdt->hwnd = hwnd; + rdt->hContact = hContact; + rdt->inputarea = (GetWindowLongPtr(hwnd, GWL_STYLE) & ES_READONLY) == 0; + rdt->dontReplace = false; + rdt->tipActive = -1; + rdt->wpOrigWndProc = NULL; + rdt->hToolTip = NULL; + g_RichEditList.insert(rdt); + + if (subnew) + rdt->wpOrigWndProc = (WNDPROC)SetWindowLongPtr(hwnd, GWLP_WNDPROC, (LONG_PTR)RichEditSubclass); + } + else + { + if (hContact && !rdt->hContact) rdt->hContact = hContact; + if (subany && rdt->wpOrigWndProc == NULL) + rdt->wpOrigWndProc = (WNDPROC)SetWindowLongPtr(hwnd, GWLP_WNDPROC, (LONG_PTR)RichEditSubclass); + } + return true; +} + +static LRESULT CALLBACK RichEditOwnerSubclass(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) +{ + RichEditOwnerData* rdto = g_RichEditOwnerList.find((RichEditOwnerData*)&hwnd); + if (rdto == NULL) return 0; + + WNDPROC wpOrigWndProc = rdto->wpOrigWndProc; + + switch(uMsg) + { + case WM_DESTROY: + { + RichEditData* rdt = g_RichEditList.find((RichEditData*)&rdto->hwndInput); + if (rdt && (!rdt->inputarea || opt.InputSmileys)) + { + CHARRANGE sel = allsel; + rdt->dontReplace = true; + ReplaceSmileysWithText(rdt->hwnd, sel, false); + } + } + CloseRichOwnerCallback(hwnd, false); + break; + + + case WM_COMMAND: + if (LOWORD(wParam) == IDOK || LOWORD(wParam) == 1624) + { + RichEditData* rdt = g_RichEditList.find((RichEditData*)&rdto->hwndInput); + if (rdt && (!rdt->inputarea || opt.InputSmileys)) + { + rdt->dontReplace = true; + CHARRANGE sel = allsel; + ReplaceSmileysWithText(rdt->hwnd, sel, false); + } + } + break; + } + + LRESULT result = CallWindowProc(wpOrigWndProc, hwnd, uMsg, wParam, lParam); + + switch(uMsg) + { + case WM_DESTROY: + CloseRichOwnerCallback(hwnd, true); + break; + + case WM_COMMAND: + if (LOWORD(wParam) == IDOK || LOWORD(wParam) == 1624) // && lParam == 0) + { + RichEditData* rdt = g_RichEditList.find((RichEditData*)&rdto->hwndInput); + if (rdt) + { + CHARRANGE sel = allsel; + if (!result) ReplaceContactSmileys(rdt, sel, false, false); + rdt->dontReplace = false; + } + } + break; + } + return result; +} + +void CloseRichOwnerCallback(HWND hwnd, bool force) +{ + int ind = g_RichEditOwnerList.getIndex((RichEditOwnerData*)&hwnd); + if ( ind != -1 ) + { + RichEditOwnerData* rdto = g_RichEditOwnerList[ind]; + bool richsub = GetWindowLongPtr(hwnd, GWLP_WNDPROC) == (LONG_PTR)RichEditOwnerSubclass; + if (richsub) + { + SetWindowLongPtr(hwnd, GWLP_WNDPROC, (LONG_PTR)rdto->wpOrigWndProc); + rdto->wpOrigWndProc = NULL; + } + if (force) + { + CloseRichCallback(rdto->hwndInput, true); + CloseRichCallback(rdto->hwndLog, true); + + delete rdto; + g_RichEditOwnerList.remove(ind); + } + } +} + +void SetRichOwnerCallback(HWND hwnd, HWND hwndInput, HWND hwndLog) +{ + RichEditOwnerData* rdto = g_RichEditOwnerList.find((RichEditOwnerData*)&hwnd); + if (rdto == NULL) + { + rdto = new RichEditOwnerData; + + rdto->hwnd = hwnd; + rdto->hwndInput = hwndInput; + rdto->hwndLog = hwndLog; + rdto->wpOrigWndProc = (WNDPROC)SetWindowLongPtr(hwnd, GWLP_WNDPROC, (LONG_PTR)RichEditOwnerSubclass); + g_RichEditOwnerList.insert(rdto); + } + else + { + if (rdto->hwndInput == NULL) rdto->hwndInput = hwndInput; + if (rdto->hwndLog == NULL) rdto->hwndLog = hwndLog; + } +} + +void ProcessAllInputAreas(bool restoreText) +{ + for (int i=g_RichEditList.getCount(); i--; ) + { + RichEditData* rdt = g_RichEditList[i]; + if (rdt->inputarea) + { + if (restoreText) + { + CHARRANGE sel = allsel; + ReplaceContactSmileysWithText(rdt, sel, false); + } + else + { + ReplaceContactSmileys(rdt, allsel, false, false); + } + } + } +} + + +void RichEditData_Destroy(void) +{ + int i; + for (i=g_RichEditList.getCount(); i--; ) + CloseRichCallback(g_RichEditList[i]->hwnd, true); + g_RichEditList.destroy(); + + for (i=g_RichEditOwnerList.getCount(); i--; ) + CloseRichOwnerCallback(g_RichEditOwnerList[i]->hwnd, true); + g_RichEditOwnerList.destroy(); +} diff --git a/plugins/SmileyAdd/src/services.cpp b/plugins/SmileyAdd/src/services.cpp new file mode 100644 index 0000000000..fed1b4c7ad --- /dev/null +++ b/plugins/SmileyAdd/src/services.cpp @@ -0,0 +1,590 @@ +/* +Miranda SmileyAdd Plugin +Copyright (C) 2005 - 2011 Boris Krasnovskiy All Rights Reserved +Copyright (C) 2003 - 2004 Rein-Peter de Boer + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation version 2 +of the License. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include "general.h" +#include "smltool.h" +#include "smileyroutines.h" +#include "services.h" +#include "options.h" + + +//globals, defined int main.cpp +extern HANDLE hEvent1, hContactMenuItem; + +LIST menuHandleArray(5); + +//implementation of service functions + +SmileyPackType* GetSmileyPack(const char* proto, HANDLE hContact, SmileyPackCType** smlc) +{ + bkstring categoryName; + + hContact = DecodeMetaContact(hContact); + if (smlc) *smlc = opt.DisableCustom ? NULL : g_SmileyPackCStore.GetSmileyPack(hContact); + + if (proto != NULL && IsBadStringPtrA(proto, 10)) return NULL; + + if (hContact != NULL) + { + opt.ReadContactCategory(hContact, categoryName); + if (categoryName == _T("")) return NULL; + if (!categoryName.empty() && + g_SmileyCategories.GetSmileyCategory(categoryName) == NULL) + { + categoryName.clear(); + opt.WriteContactCategory(hContact, categoryName); + } + + if (categoryName.empty() && !opt.UseOneForAll) + { + char *protonam = (char*) CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0); + if (protonam != NULL) + { + DBVARIANT dbv; + if (DBGetContactSettingTString(hContact, protonam, "Transport", &dbv) == 0) + { + categoryName = dbv.ptszVal; + DBFreeVariant(&dbv); + } + else + categoryName = A2T_SM(protonam); + } + } + } + + if (categoryName.empty()) + { + if (proto == NULL || proto[0] == 0) + { + categoryName = _T("Standard"); + } + else + { + categoryName = A2T_SM(proto); + if (opt.UseOneForAll) + { + SmileyCategoryType *smc = g_SmileyCategories.GetSmileyCategory(categoryName); + if (smc == NULL || smc->IsProto()) categoryName = _T("Standard"); + } + } + } + + return g_SmileyCategories.GetSmileyPack(categoryName); +} + + +INT_PTR ReplaceSmileysCommand(WPARAM, LPARAM lParam) +{ + SMADD_RICHEDIT3* smre = (SMADD_RICHEDIT3*) lParam; + if (smre == NULL || smre->cbSize < SMADD_RICHEDIT_SIZE_V1) return FALSE; + + SMADD_RICHEDIT3 smrec = {0}; + memcpy(&smrec, smre, min(smre->cbSize, sizeof(smrec))); + + static const CHARRANGE selection = { 0, LONG_MAX }; + if (smre->rangeToReplace == NULL) smrec.rangeToReplace = (CHARRANGE*)&selection; + else if (smrec.rangeToReplace->cpMax < 0) smrec.rangeToReplace->cpMax = LONG_MAX; + + SmileyPackCType* smcp = NULL; + SmileyPackType* SmileyPack = GetSmileyPack(smrec.Protocolname, smrec.hContact, + (smrec.flags & (SAFLRE_OUTGOING | SAFLRE_NOCUSTOM)) ? NULL : &smcp); + + ReplaceSmileys(smre->hwndRichEditControl, SmileyPack, smcp, *smrec.rangeToReplace, + smrec.hContact == NULL, false, false); + + return TRUE; +} + + +INT_PTR ShowSmileySelectionCommand(WPARAM, LPARAM lParam) +{ + SMADD_SHOWSEL3* smaddInfo = (SMADD_SHOWSEL3*) lParam; + + if (smaddInfo == NULL || smaddInfo->cbSize < SMADD_SHOWSEL_SIZE_V1) return FALSE; + HWND parent = smaddInfo->cbSize > SMADD_SHOWSEL_SIZE_V1 ? smaddInfo->hwndParent : NULL; + HANDLE hContact = smaddInfo->cbSize > SMADD_SHOWSEL_SIZE_V2 ? smaddInfo->hContact : NULL; + + SmileyToolWindowParam *stwp = new SmileyToolWindowParam; + stwp->pSmileyPack = GetSmileyPack(smaddInfo->Protocolname, hContact); + stwp->hContact = hContact; + + stwp->hWndParent = parent; + stwp->hWndTarget = smaddInfo->hwndTarget; + stwp->targetMessage = smaddInfo->targetMessage; + stwp->targetWParam = smaddInfo->targetWParam; + stwp->xPosition = smaddInfo->xPosition; + stwp->yPosition = smaddInfo->yPosition; + stwp->direction = smaddInfo->Direction; + + mir_forkthread(SmileyToolThread, stwp); + + return TRUE; +} + +INT_PTR GetSmileyIconCommand(WPARAM, LPARAM lParam) +{ + SMADD_GETICON* smre = (SMADD_GETICON*) lParam; + + if (smre == NULL || smre->cbSize < sizeof(SMADD_GETICON)) return FALSE; + + SmileyPackType* SmileyPack = GetSmileyPack(smre->Protocolname); + + if (SmileyPack == NULL || IsBadStringPtrA(smre->SmileySequence, MAX_SMILEY_LENGTH)) + { + smre->SmileyIcon = NULL; + smre->Smileylength = 0; + return FALSE; + } + + unsigned start, size; + SmileyType* sml; + FindSmileyInText(SmileyPack, A2T_SM(smre->SmileySequence), start, size, &sml); + + if (size == 0 || start != 0) + { + smre->SmileyIcon = NULL; + smre->Smileylength = 0; + } + else + { + smre->SmileyIcon = sml->GetIcon(); + smre->Smileylength = size; + } + + return TRUE; +} + + +static int GetInfoCommandE(SMADD_INFO2* smre, bool retDup) +{ + if (smre == NULL || smre->cbSize < SMADD_INFO_SIZE_V1) return FALSE; + HANDLE hContact = smre->cbSize > SMADD_INFO_SIZE_V1 ? smre->hContact : NULL; + + SmileyPackType* SmileyPack = GetSmileyPack(smre->Protocolname, hContact); + + if (SmileyPack == NULL || SmileyPack->SmileyCount() == 0) + { + smre->ButtonIcon = NULL; + smre->NumberOfSmileys = 0; + smre->NumberOfVisibleSmileys = 0; + return FALSE; + } + + SmileyType* sml = FindButtonSmiley(SmileyPack); + + if (sml != NULL) + smre->ButtonIcon = retDup ? sml->GetIconDup() : sml->GetIcon(); + else + smre->ButtonIcon = GetDefaultIcon(retDup); + + smre->NumberOfSmileys = SmileyPack->SmileyCount(); + smre->NumberOfVisibleSmileys = SmileyPack->VisibleSmileyCount(); + + return TRUE; +} + + +INT_PTR GetInfoCommand(WPARAM, LPARAM lParam) +{ + return GetInfoCommandE((SMADD_INFO2*) lParam, false); +} + + +INT_PTR GetInfoCommand2(WPARAM, LPARAM lParam) +{ + return GetInfoCommandE((SMADD_INFO2*) lParam, true); +} + + +INT_PTR ParseText(WPARAM, LPARAM lParam) +{ + SMADD_PARSE* smre = (SMADD_PARSE*) lParam; + + if (smre == NULL || smre->cbSize < sizeof(SMADD_PARSE)) return FALSE; + + SmileyPackType* SmileyPack = GetSmileyPack(smre->Protocolname); + + if (SmileyPack == NULL) + { + smre->SmileyIcon = NULL; + smre->size = 0; + return FALSE; + } + + unsigned strtChrOff = smre->startChar + smre->size; + char* workstr = smre->str + strtChrOff; + + if (strtChrOff > 1024 || IsBadStringPtrA(workstr, 10)) + { + smre->SmileyIcon = NULL; + smre->size = 0; + return FALSE; + } + + SmileyType* sml; + FindSmileyInText(SmileyPack, A2T_SM(workstr), smre->startChar, smre->size, &sml); + + if (smre->size == 0) + { + smre->SmileyIcon = NULL; + } + else + { + smre->SmileyIcon = sml->GetIconDup(); + smre->startChar += strtChrOff; + } + + return TRUE; +} + + +INT_PTR ParseTextW(WPARAM, LPARAM lParam) +{ + SMADD_PARSEW* smre = (SMADD_PARSEW*) lParam; + + if (smre == NULL || smre->cbSize < sizeof(SMADD_PARSEW)) return FALSE; + + SmileyPackType* SmileyPack = GetSmileyPack(smre->Protocolname); + + if (SmileyPack == NULL) + { + smre->SmileyIcon = NULL; + smre->size = 0; + return FALSE; + } + + unsigned strtChrOff = smre->startChar + smre->size; + wchar_t* workstr = smre->str + strtChrOff; + + if (strtChrOff > 1024 || IsBadStringPtrW(workstr, 10)) + { + smre->SmileyIcon = NULL; + smre->size = 0; + return FALSE; + } + + SmileyType* sml; + FindSmileyInText(SmileyPack, workstr, smre->startChar, smre->size, &sml); + + if (smre->size == 0) + { + smre->SmileyIcon = NULL; + } + else + { + smre->SmileyIcon = sml->GetIconDup(); + smre->startChar += strtChrOff; + } + + return TRUE; +} + + +INT_PTR ParseTextBatch(WPARAM, LPARAM lParam) +{ + SMADD_BATCHPARSE2* smre = (SMADD_BATCHPARSE2*) lParam; + + if (smre == NULL || smre->cbSize < SMADD_BATCHPARSE_SIZE_V1) return FALSE; + HANDLE hContact = smre->cbSize > SMADD_BATCHPARSE_SIZE_V1 ? smre->hContact : NULL; + + SmileyPackCType* smcp = NULL; + SmileyPackType* SmileyPack = GetSmileyPack(smre->Protocolname, hContact, + (smre->flag & (SAFL_OUTGOING | SAFL_NOCUSTOM)) ? NULL : &smcp); + + SmileysQueueType smllist; + + if (smre->flag & SAFL_UNICODE) + LookupAllSmileys(SmileyPack, smcp, W2T_SM(smre->wstr), smllist, false); + else + LookupAllSmileys(SmileyPack, smcp, A2T_SM(smre->astr), smllist, false); + + if (smllist.getCount() == 0) return 0; + + SMADD_BATCHPARSERES *res = new SMADD_BATCHPARSERES[smllist.getCount()]; + SMADD_BATCHPARSERES* cres = res; + for (int j = 0; j < smllist.getCount(); j++) + { + cres->startChar = smllist[j].loc.cpMin; + cres->size = smllist[j].loc.cpMax - smllist[j].loc.cpMin; + if (smllist[j].sml) + { + if (smre->flag & SAFL_PATH) + cres->filepath = smllist[j].sml->GetFilePath().c_str(); + else + cres->hIcon = smllist[j].sml->GetIconDup(); + } + else + { + if (smre->flag & SAFL_PATH) + cres->filepath = smllist[j].smlc->GetFilePath().c_str(); + else + cres->hIcon = smllist[j].smlc->GetIcon(); + } + + cres++; + } + + smre->numSmileys = smllist.getCount(); + + smre->oflag = smre->flag | SAFL_UNICODE; + + return (INT_PTR)res; +} + +INT_PTR FreeTextBatch(WPARAM, LPARAM lParam) +{ + delete[] (SMADD_BATCHPARSERES*)lParam; + return TRUE; +} + +INT_PTR RegisterPack(WPARAM, LPARAM lParam) +{ + SMADD_REGCAT* smre = (SMADD_REGCAT*) lParam; + + if (smre == NULL || smre->cbSize < sizeof(SMADD_REGCAT)) return FALSE; + if (IsBadStringPtrA(smre->name, 50) || IsBadStringPtrA(smre->dispname, 50)) return FALSE; + + + unsigned lpcp = (unsigned)CallService(MS_LANGPACK_GETCODEPAGE, 0, 0); + if (lpcp == CALLSERVICE_NOTFOUND) lpcp = CP_ACP; + + + + bkstring nmd(A2W_SM(smre->dispname, lpcp)); + + + bkstring nm(A2T_SM(smre->name)); + g_SmileyCategories.AddAndLoad(nm, nmd); + + return TRUE; +} + +INT_PTR CustomCatMenu(WPARAM wParam, LPARAM lParam) +{ + const HANDLE hContact = (HANDLE)wParam; + if (lParam != 0) + { + SmileyCategoryType* smct = g_SmileyCategories.GetSmileyCategory((unsigned)lParam - 3); + if (smct != NULL) + opt.WriteContactCategory(hContact, smct->GetName()); + else + { + bkstring empty; + if (lParam == 1) empty = _T(""); + opt.WriteContactCategory(hContact, empty); + } + NotifyEventHooks(hEvent1, (WPARAM)hContact, 0); + } + + for (int i = 0; i < menuHandleArray.getCount(); i++) + CallService(MS_CLIST_REMOVECONTACTMENUITEM, (WPARAM)menuHandleArray[i], 0); + menuHandleArray.destroy(); + + return TRUE; +} + + +int RebuildContactMenu(WPARAM wParam, LPARAM) +{ + int i; + CLISTMENUITEM mi = {0}; + + mi.cbSize = sizeof(mi); + mi.flags = CMIM_FLAGS | CMIF_ROOTPOPUP | CMIF_ICONFROMICOLIB; + + SmileyCategoryListType::SmileyCategoryVectorType& smc = *g_SmileyCategories.GetSmileyCategoryList(); + + char* protnam = (char*) CallService(MS_PROTO_GETCONTACTBASEPROTO, wParam, 0); + bool haveMenu = IsSmileyProto(protnam); + if (haveMenu && opt.UseOneForAll) + { + unsigned cnt = 0; + for (i = 0; i < smc.getCount(); ++i) + cnt += smc[i].IsCustom(); + haveMenu = cnt != 0; + } + + if (!haveMenu) mi.flags |= CMIF_HIDDEN; + + CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hContactMenuItem, (LPARAM)&mi); + + for (i = 0; i < menuHandleArray.getCount(); ++i) + CallService(MS_CLIST_REMOVECONTACTMENUITEM, (WPARAM)menuHandleArray[i], 0); + menuHandleArray.destroy(); + + if (haveMenu) + { + bkstring cat; + opt.ReadContactCategory((HANDLE)wParam, cat); + + mi.pszPopupName = (char*)hContactMenuItem; + mi.flags = CMIF_CHILDPOPUP | CMIM_FLAGS | CMIF_TCHAR; + mi.pszService = MS_SMILEYADD_CUSTOMCATMENU; + + bool nonecheck = true; + HGENMENU hMenu; + + for (i = 0; i < smc.getCount(); i++) + { + if (smc[i].IsExt() || (smc[i].IsProto() && opt.UseOneForAll)) continue; + + const int ind = i + 3; + + mi.position = ind; + mi.popupPosition = ind; + mi.ptszName = (TCHAR*)smc[i].GetDisplayName().c_str(); + + if (cat == smc[i].GetName()) + { + mi.flags |= CMIF_CHECKED; + nonecheck = false; + } + + hMenu = Menu_AddContactMenuItem(&mi); + menuHandleArray.insert(hMenu); + mi.flags &= ~CMIF_CHECKED; + } + + mi.position = 1; + mi.popupPosition = 1; + mi.ptszName = _T(""); + if (cat == _T("")) { + mi.flags |= CMIF_CHECKED; + nonecheck = false; + } + + hMenu = Menu_AddContactMenuItem(&mi); + menuHandleArray.insert(hMenu); + + mi.position = 2; + mi.popupPosition = 2; + mi.ptszName = _T("Protocol specific"); + if (nonecheck) mi.flags |= CMIF_CHECKED; else mi.flags &= ~CMIF_CHECKED; + + hMenu = Menu_AddContactMenuItem(&mi); + menuHandleArray.insert(hMenu); + } + + return 0; +} + +INT_PTR ReloadPack(WPARAM, LPARAM lParam) +{ + if (lParam) + { + bkstring categoryName = A2T_SM((char*)lParam); + SmileyCategoryType *smc = g_SmileyCategories.GetSmileyCategory(categoryName); + if (smc != NULL) smc->Load(); + } + else + g_SmileyCategories.ClearAndLoadAll(); + + NotifyEventHooks(hEvent1, 0, 0); + return 0; +} + +INT_PTR LoadContactSmileys(WPARAM, LPARAM lParam) +{ + if (opt.DisableCustom) return 0; + + SMADD_CONT* cont = (SMADD_CONT*)lParam; + + switch (cont->type) + { + case 0: + g_SmileyPackCStore.AddSmileyPack(cont->hContact, cont->path); + NotifyEventHooks(hEvent1, (WPARAM)cont->hContact, 0); + break; + + case 1: + g_SmileyPackCStore.AddSmiley(cont->hContact, cont->path); + NotifyEventHooks(hEvent1, (WPARAM)cont->hContact, 0); + break; + } + return 0; +} + +int AccountListChanged(WPARAM wParam, LPARAM lParam) +{ + PROTOACCOUNT* acc = (PROTOACCOUNT*)lParam; + + switch (wParam) + { + case PRAC_ADDED: + if (acc != NULL) + { + bkstring catname(_T("Standard")); + const bkstring& defaultFile = g_SmileyCategories.GetSmileyCategory(catname)->GetFilename(); + g_SmileyCategories.AddAccountAsCategory(acc, defaultFile); + } + break; + + case PRAC_CHANGED: + if (acc != NULL && acc->szModuleName != NULL) + { + bkstring name(A2T_SM(acc->szModuleName)); + SmileyCategoryType* smc = g_SmileyCategories.GetSmileyCategory(name); + if (smc != NULL) + { + if (acc->tszAccountName) name = acc->tszAccountName; + smc->SetDisplayName(name); + } + } + break; + + case PRAC_REMOVED: + g_SmileyCategories.DeleteAccountAsCategory(acc); + break; + + case PRAC_CHECKED: + if (acc != NULL) + { + if (acc->bIsEnabled) + { + bkstring catname(_T("Standard")); + const bkstring& defaultFile = g_SmileyCategories.GetSmileyCategory(catname)->GetFilename(); + g_SmileyCategories.AddAccountAsCategory(acc, defaultFile); + } + else + { + g_SmileyCategories.DeleteAccountAsCategory(acc); + } + } + break; + } + return 0; +} + +int DbSettingChanged(WPARAM wParam, LPARAM lParam) +{ + HANDLE hContact = (HANDLE)wParam; + DBCONTACTWRITESETTING* cws = (DBCONTACTWRITESETTING*)lParam; + + if (hContact == NULL) return 0; + if (cws->value.type == DBVT_DELETED) return 0; + + if (strcmp(cws->szSetting, "Transport") == 0) + { + bkstring catname(_T("Standard")); + SmileyCategoryType *smc = g_SmileyCategories.GetSmileyCategory(catname); + if (smc != NULL) + g_SmileyCategories.AddContactTransportAsCategory(hContact, smc->GetFilename()); + } + return 0; +} diff --git a/plugins/SmileyAdd/src/services.h b/plugins/SmileyAdd/src/services.h new file mode 100644 index 0000000000..9311e3637d --- /dev/null +++ b/plugins/SmileyAdd/src/services.h @@ -0,0 +1,48 @@ +/* +Miranda SmileyAdd Plugin +Copyright (C) 2005 - 2011 Boris Krasnovskiy +Copyright (C) 2003 - 2004 Rein-Peter de Boer + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation version 2 +of the License. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef SMILEYADD_SERVICES_H_ +#define SMILEYADD_SERVICES_H_ + +#include "m_smileyadd.h" +#include "m_smileyadd_deprecated.h" + +// service commands +INT_PTR ReplaceSmileysCommand(WPARAM wParam, LPARAM lParam); +INT_PTR GetSmileyIconCommand(WPARAM wParam, LPARAM lParam); +INT_PTR ShowSmileySelectionCommand(WPARAM wParam, LPARAM lParam); +INT_PTR GetInfoCommand(WPARAM wParam, LPARAM); +INT_PTR GetInfoCommand2(WPARAM wParam, LPARAM); +INT_PTR ParseText(WPARAM wParam, LPARAM lParam); +INT_PTR ParseTextW(WPARAM wParam, LPARAM lParam); +INT_PTR RegisterPack(WPARAM wParam, LPARAM lParam); +INT_PTR ParseTextBatch(WPARAM wParam, LPARAM lParam); +INT_PTR FreeTextBatch(WPARAM wParam, LPARAM lParam); +INT_PTR CustomCatMenu(WPARAM, LPARAM lParam); +int RebuildContactMenu(WPARAM wParam, LPARAM); +INT_PTR ReloadPack(WPARAM, LPARAM lParam); +INT_PTR LoadContactSmileys(WPARAM, LPARAM lParam); +int AccountListChanged(WPARAM wParam, LPARAM lParam); +int DbSettingChanged(WPARAM wParam, LPARAM lParam); + +SmileyPackType* GetSmileyPack(const char* proto, HANDLE hContact = NULL, SmileyPackCType** smlc = NULL); + + +#endif // SMILEYADD_SERVICES_H_ + diff --git a/plugins/SmileyAdd/src/smileyroutines.cpp b/plugins/SmileyAdd/src/smileyroutines.cpp new file mode 100644 index 0000000000..ba136d7ed5 --- /dev/null +++ b/plugins/SmileyAdd/src/smileyroutines.cpp @@ -0,0 +1,610 @@ +/* +Miranda SmileyAdd Plugin +Copyright (C) 2005 - 2011 Boris Krasnovskiy +Copyright (C) 2003 - 2004 Rein-Peter de Boer + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation version 2 +of the License. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include "general.h" +#include "smileyroutines.h" +#include "SmileyBase.h" +#include "options.h" + +#include +#include + +ISmileyBase* CreateSmileyObject(SmileyType* sml); +ISmileyBase* CreateAniSmileyObject(SmileyType* sml, COLORREF clr, bool ishpp); + + + +bool g_HiddenTextSupported = true; + + +// {8CC497C0-A1DF-11CE-8098-00AA0047BE5D} +const GUID IID_ITextDocument = +{ 0x8CC497C0, 0xA1DF, 0x11CE, { 0x80,0x98,0x00,0xAA,0x00,0x47,0xBE,0x5D } }; + +void LookupAllSmileys(SmileyPackType* smileyPack, SmileyPackCType* smileyCPack, const TCHAR* lpstrText, + SmileysQueueType& smllist, const bool firstOnly) +{ + if (lpstrText == NULL || *lpstrText == 0) return; + + SmileyPackType::SmileyLookupType* sml = smileyPack ? smileyPack->GetSmileyLookup() : NULL; + SmileyPackCType::SmileyLookupType* smlc = smileyCPack ? &smileyCPack->GetSmileyLookup() : NULL; + + // Precompute number of smileys + int smlszo = sml ? sml->getCount() : 0; + int smlszc = smlc ? smlc->getCount() : 0; + int smlsz = smlszo + smlszc; + + if (smlsz == 0) return; + + // All possible smileys + SmileyLookup::SmileyLocVecType* smileys = new SmileyLookup::SmileyLocVecType [smlsz]; + + // Find all possible smileys + bkstring tmpstr(lpstrText); + int i = 0; + + if (sml) + { + for (int j=0; jgetCount(); j++) + { + (*sml)[j].find(tmpstr, smileys[i], false); + i++; + } + } + + if (smlc) + { + for (int j=0; jgetCount(); j++) + { + (*smlc)[j].find(tmpstr, smileys[i], false); + i++; + } + } + + int* csmlit = (int*)alloca(smlsz * sizeof(int)); + if (csmlit == NULL) return; + memset(csmlit, 0, smlsz * sizeof(int)); + + long numCharsSoFar = 0; + bkstring::size_type smloff = 0; + + for (;;) + { + int firstSml = -1; + int firstSmlRef = -1; + SmileyLookup::SmileyLocVecType* smlf = NULL; + + for (int csml=0; csml= smloff) + { + if (firstSmlRef == -1 || smlv[tsml].pos < (*smlf)[firstSmlRef].pos || + (smlv[tsml].pos == (*smlf)[firstSmlRef].pos && smlv[tsml].len > (*smlf)[firstSmlRef].len)) + { + firstSmlRef = tsml; + firstSml = csml; + smlf = &smileys[csml]; + } + break; + } + } + csmlit[csml] = tsml; + } + + // Check if smiley found + if (firstSml != -1) + { + ReplaceSmileyType *dat = new ReplaceSmileyType; + + const TCHAR* textToSearch = lpstrText + smloff; + const TCHAR* textSmlStart = lpstrText + (*smlf)[firstSmlRef].pos; + const TCHAR* textSmlEnd = textSmlStart + (*smlf)[firstSmlRef].len; + + // check if leading space exist + const TCHAR* prech = _tcsdec(textToSearch, textSmlStart); + dat->ldspace = prech != NULL ? _istspace(*prech) != 0 : smloff == 0; + + // check if trailing space exist + dat->trspace = *textSmlEnd == 0 || _istspace(*textSmlEnd); + + // compute text location in RichEdit + dat->loc.cpMin = (long)_tcsnccnt(textToSearch, (*smlf)[firstSmlRef].pos - smloff) + numCharsSoFar; + dat->loc.cpMax = numCharsSoFar = (long)_tcsnccnt(textSmlStart, (*smlf)[firstSmlRef].len) + dat->loc.cpMin; + + if (!opt.EnforceSpaces || (dat->ldspace && dat->trspace)) + { + dat->ldspace |= !opt.SurroundSmileyWithSpaces; + dat->trspace |= !opt.SurroundSmileyWithSpaces; + + if (firstSml < smlszo) + { + dat->sml = smileyPack->GetSmiley((*sml)[firstSml].GetIndex()); + dat->smlc = NULL; + } + else + { + dat->smlc = smileyCPack->GetSmiley((*smlc)[firstSml-smlszo].GetIndex()); + dat->sml = NULL; + } + + if (dat->sml != NULL || dat->smlc != NULL) + { + // First smiley found record it + smllist.insert(dat); + if (firstOnly) break; + } + else + delete dat; + } + else + delete dat; + + // Advance string pointer to search for the next smiley + smloff = (*smlf)[firstSmlRef].pos + (*smlf)[firstSmlRef].len; + csmlit[firstSml]++; + } + else + // Nothing to parse exit + break; + } + delete[] smileys; +} + + +void FindSmileyInText(SmileyPackType* smp, const TCHAR* str, + unsigned& first, unsigned& size, SmileyType** sml) +{ + SmileysQueueType smllist; + LookupAllSmileys(smp, NULL, str, smllist, true); + if (smllist.getCount() == 0) + { + size = 0; + *sml = NULL; + } + else + { + first = smllist[0].loc.cpMin; + size = smllist[0].loc.cpMax - smllist[0].loc.cpMin; + *sml = smllist[0].sml; + } +} + + +SmileyType* FindButtonSmiley(SmileyPackType* smp) +{ + unsigned start, size; + SmileyType* sml; + + FindSmileyInText(smp, smp->GetButtonSmiley(), start, size, &sml); + + return sml; +} + +void UpdateSelection(CHARRANGE& sel, int pos, int dif) +{ + if (sel.cpMax == sel.cpMin) + { + if (sel.cpMax < LONG_MAX && sel.cpMax > pos) + { + sel.cpMax += dif; + sel.cpMin += dif; + } + } + else + { + if (sel.cpMax >= pos && sel.cpMax < LONG_MAX) sel.cpMax += dif; + if (sel.cpMin > pos) sel.cpMin += dif; + } +} + +void ReplaceSmileys(HWND hwnd, SmileyPackType* smp, SmileyPackCType* smcp, const CHARRANGE& sel, + bool useHidden, bool ignoreLast, bool unFreeze) +{ +/* + LARGE_INTEGER freq, strt, end; + QueryPerformanceFrequency(&freq); + QueryPerformanceCounter(&strt); +*/ + IRichEditOle* RichEditOle; + if (SendMessage(hwnd, EM_GETOLEINTERFACE, 0, (LPARAM)&RichEditOle) == 0) + return; + + ITextDocument* TextDocument; + if (RichEditOle->QueryInterface(IID_ITextDocument, (void**)&TextDocument) != S_OK) + { + RichEditOle->Release(); + return; + } + + long cnt; + if (smp == NULL && smcp == NULL) + { + if (unFreeze) TextDocument->Unfreeze(&cnt); + TextDocument->Release(); + RichEditOle->Release(); + return; + } + + // retrieve text range + ITextRange* TextRange; + if (TextDocument->Range(sel.cpMin, sel.cpMax, &TextRange) != S_OK) + { + TextDocument->Release(); + RichEditOle->Release(); + return; + } + + // retrieve text to parse for smileys + BSTR btxt = 0; + if (TextRange->GetText(&btxt) != S_OK) + { + TextRange->Release(); + TextDocument->Release(); + RichEditOle->Release(); + return; + } + + TextRange->Release(); + + SmileysQueueType smllist; + + + LookupAllSmileys(smp, smcp, W2T_SM(btxt), smllist, false); + + SysFreeString(btxt); + + if (smllist.getCount() != 0) + { + // disable screen updates + TextDocument->Freeze(&cnt); + + TCHAR classname[20]; + GetClassName(hwnd, classname, SIZEOF(classname)); + bool ishpp = (_tcsncmp(classname, _T("THppRichEdit"), 12) == 0); + + SetRichCallback(hwnd, NULL, false, true); + + bool rdo = (GetWindowLongPtr(hwnd, GWL_STYLE) & ES_READONLY) != 0; + if (rdo) SendMessage(hwnd, EM_SETREADONLY, FALSE, 0); + + ITextSelection* TextSelection; + TextDocument->GetSelection(&TextSelection); + + ITextFont *TextFont; + TextSelection->GetFont(&TextFont); + + //save selection + CHARRANGE oldSel; + TextSelection->GetStart(&oldSel.cpMin); + TextSelection->GetEnd(&oldSel.cpMax); + + CHARFORMAT2 chf; + + chf.cbSize = sizeof(chf); + chf.dwMask = CFM_ALL2; + + // Determine background color + // This logic trying to minimize number of background color changes + static COLORREF bkgColor = GetSysColor(COLOR_WINDOW); +// if (!insemf) +// { + COLORREF bkgColorPv = (COLORREF)SendMessage(hwnd, EM_SETBKGNDCOLOR, 0, bkgColor); + if (bkgColorPv != bkgColor) + { + bkgColor = bkgColorPv; + SendMessage(hwnd, EM_SETBKGNDCOLOR, 0, bkgColor); + } +// } + + HDC hdc = GetDC(hwnd); + int sclX = GetDeviceCaps(hdc, LOGPIXELSX); + int sclY = GetDeviceCaps(hdc, LOGPIXELSY); + + unsigned numBTBSm = 0; + + BSTR spaceb = SysAllocString(L" "); + + // Replace smileys specified in the list in RichEdit + for (int j = smllist.getCount(); j--; ) + { + CHARRANGE& smlpos = smllist[j].loc; + if (ignoreLast && oldSel.cpMax == smlpos.cpMax) continue; + + smlpos.cpMin += sel.cpMin; + smlpos.cpMax += sel.cpMin; + + // Find all back to back smileys and for propper hidden text detection + if ( numBTBSm == 0 ) + { + CHARRANGE lastPos = smlpos; + for (int jn = j; jn--; ) + { + if (jn != j && smllist[jn].loc.cpMax != lastPos.cpMin) + break; + + ++numBTBSm; + lastPos.cpMin = smllist[jn].loc.cpMin; + } + TextSelection->SetRange(lastPos.cpMin, lastPos.cpMax); + long hid; + TextFont->GetHidden(&hid); + if (hid == tomFalse) numBTBSm = 0; + } + if ( numBTBSm != 0 ) + { + --numBTBSm; + continue; + } + + SmileyType* sml = smllist[j].sml; + SmileyCType* smlc = smllist[j].smlc; + if (sml == NULL && smlc == NULL) continue; + + // Select text analyze + TextSelection->SetRange(smlpos.cpMin, smlpos.cpMax); + + BSTR btxt = NULL; + + if (smlc == NULL && sml->IsText()) + { + btxt = SysAllocString(T2W_SM(sml->GetToolText().c_str())); + TextSelection->SetText(btxt); + } + else + { + TextSelection->GetText(&btxt); + + // Get font properties + SendMessage(hwnd, EM_GETCHARFORMAT, SCF_SELECTION, (LPARAM)&chf); + + //do not look for smileys in hyperlinks + if ((chf.dwEffects & (CFE_LINK | CFE_HIDDEN)) != 0) continue; + + SIZE osize; + if (sml) + sml->GetSize(osize); + else + smlc->GetSize(osize); + + if (osize.cx == 0 || osize.cy == 0) continue; + + int sizeX, sizeY; + if (opt.ScaleToTextheight) + { + sizeY = CalculateTextHeight(hdc, &chf); + sizeX = osize.cx * sizeY / osize.cy; + + int dx = osize.cx - sizeX; + sizeX += dx & 1; + + int dy = osize.cy - sizeY; + sizeY += dy & 1; + } + else + { + sizeX = osize.cx; + sizeY = osize.cy; + } + + if (smlc != NULL && opt.MaxCustomSmileySize && (unsigned)sizeY > opt.MaxCustomSmileySize) + { + sizeY = opt.MaxCustomSmileySize; + sizeX = osize.cx * sizeY / osize.cy; + + int dx = osize.cx - sizeX; + sizeX += dx & 1; + + int dy = osize.cy - opt.MaxCustomSmileySize; + sizeY += dy & 1; + } + + if (opt.MinSmileySize && (unsigned)sizeY < opt.MinSmileySize) + { + sizeY = opt.MinSmileySize; + sizeX = osize.cx * sizeY / osize.cy; + + int dx = osize.cx - sizeX; + sizeX += dx & 1; + + int dy = osize.cy - opt.MinSmileySize; + sizeY += dy & 1; + } + + // Convert pixel to HIMETRIC + SIZEL sizehm; + sizehm.cx = (2540 * (sizeX+1) + (sclX >> 1)) / sclX; + sizehm.cy = (2540 * (sizeY+1) + (sclY >> 1)) / sclY; + + // If font does not have designated background use control background + if (chf.dwEffects & CFE_AUTOBACKCOLOR) chf.crBackColor = bkgColor; + + // insert space after + if (!smllist[j].trspace && useHidden) + { + TextSelection->SetStart(smlpos.cpMax); + TextSelection->TypeText(spaceb); + UpdateSelection(oldSel, smlpos.cpMax , 1); + + // Restore selection + TextSelection->SetRange(smlpos.cpMin, smlpos.cpMax); + } + + if (g_HiddenTextSupported && useHidden) + { + TextFont->SetHidden(tomTrue); + TextSelection->SetEnd(smlpos.cpMin); + UpdateSelection(oldSel, smlpos.cpMin , 1); + } + else + { + UpdateSelection(oldSel, smlpos.cpMin, -(int)SysStringLen(btxt)+1); + } + + ISmileyBase* smileyBase = CreateAniSmileyObject(smlc ? smlc : sml, chf.crBackColor, ishpp); + if (smileyBase == NULL) continue; + + smileyBase->SetExtent(DVASPECT_CONTENT, &sizehm); + smileyBase->SetHint(W2T_SM(btxt)); + + smileyBase->SetPosition(hwnd, NULL); + + // Get the RichEdit container site + IOleClientSite *pOleClientSite; + RichEditOle->GetClientSite(&pOleClientSite); + + // Now Add the object to the RichEdit + REOBJECT reobject = { 0 }; + + reobject.cbStruct = sizeof(REOBJECT); + reobject.cp = REO_CP_SELECTION; + reobject.dvaspect = DVASPECT_CONTENT; + reobject.poleobj = smileyBase; + reobject.polesite = pOleClientSite; + reobject.dwFlags = REO_BELOWBASELINE | REO_BLANK; + reobject.dwUser = (DWORD)smileyBase; + + // Insert the bitmap at the current location in the richedit control + RichEditOle->InsertObject(&reobject); + + smileyBase->Release(); + + // insert space before + if (!smllist[j].ldspace && useHidden) + { + TextSelection->SetRange(smlpos.cpMin, smlpos.cpMin); + TextSelection->TypeText(spaceb); + UpdateSelection(oldSel, smlpos.cpMin , 1); + } + } + SysFreeString(btxt); + } + SysFreeString(spaceb); + + TextSelection->SetRange(oldSel.cpMin, oldSel.cpMax); + if (rdo) SendMessage(hwnd, EM_SETREADONLY, TRUE, 0); + + TextFont->Release(); + TextSelection->Release(); + + ReleaseDC(hwnd, hdc); + + TextDocument->Unfreeze(&cnt); + if (cnt == 0) UpdateWindow(hwnd); + } + + if (unFreeze) + { + TextDocument->Unfreeze(&cnt); + if (cnt == 0) UpdateWindow(hwnd); + } + + TextDocument->Release(); + RichEditOle->Release(); + +/* + QueryPerformanceCounter(&end); + unsigned dif = (end.QuadPart - strt.QuadPart)/(freq.QuadPart/1000); + TCHAR mess[300]; + wsprintf(mess, _T("Time elapsed: %u"), dif); + MessageBox(NULL, mess, _T(""), MB_OK); +*/ +} + + +void ReplaceSmileysWithText(HWND hwnd, CHARRANGE& sel, bool keepFrozen) +{ + IRichEditOle* RichEditOle; + if (SendMessage(hwnd, EM_GETOLEINTERFACE, 0, (LPARAM)&RichEditOle) == 0) + return; + + ITextDocument* TextDocument; + if (RichEditOle->QueryInterface(IID_ITextDocument, (void**)&TextDocument) != S_OK) + { + RichEditOle->Release(); + return; + } + + // retrieve text range + ITextRange* TextRange; + if (TextDocument->Range(0, 0, &TextRange) != S_OK) + { + TextDocument->Release(); + RichEditOle->Release(); + return; + } + + long cnt; + TextDocument->Freeze(&cnt); + + bool rdo = (GetWindowLongPtr(hwnd, GWL_STYLE) & ES_READONLY) != 0; + if (rdo) SendMessage(hwnd, EM_SETREADONLY, FALSE, 0); + + CHARRANGE oldSel; + SendMessage(hwnd, EM_EXGETSEL, 0, (LPARAM)&oldSel); + + int objectCount = RichEditOle->GetObjectCount(); + for (int i = objectCount - 1; i >= 0; i--) + { + REOBJECT reObj = {0}; + reObj.cbStruct = sizeof(REOBJECT); + + HRESULT hr = RichEditOle->GetObject(i, &reObj, REO_GETOBJ_POLEOBJ); + if (FAILED(hr)) continue; + + if (reObj.cp < sel.cpMin) + { + reObj.poleobj->Release(); + break; + } + + ISmileyBase *igsc = NULL; + if (reObj.cp < sel.cpMax && reObj.clsid == CLSID_NULL) + reObj.poleobj->QueryInterface(IID_ISmileyAddSmiley, (void**) &igsc); + + reObj.poleobj->Release(); + if (igsc == NULL) continue; + + TextRange->SetRange(reObj.cp, reObj.cp + 1); + + BSTR bstr = NULL; + igsc->GetTooltip(&bstr); + TextRange->SetText(bstr); + + unsigned int len = SysStringLen(bstr); + UpdateSelection(oldSel, reObj.cp, len-1); + UpdateSelection(sel, reObj.cp, len-1); + + SysFreeString(bstr); + + igsc->Release(); + } + + SendMessage(hwnd, EM_EXSETSEL, 0, (LPARAM)&oldSel); + if (rdo) SendMessage(hwnd, EM_SETREADONLY, TRUE, 0); + if (!keepFrozen) TextDocument->Unfreeze(&cnt); + + TextRange->Release(); + TextDocument->Release(); + RichEditOle->Release(); +} diff --git a/plugins/SmileyAdd/src/smileyroutines.h b/plugins/SmileyAdd/src/smileyroutines.h new file mode 100644 index 0000000000..6b12ee6ead --- /dev/null +++ b/plugins/SmileyAdd/src/smileyroutines.h @@ -0,0 +1,49 @@ +/* +Miranda SmileyAdd Plugin +Copyright (C) 2005 - 2011 Boris Krasnovskiy +Copyright (C) 2003 - 2004 Rein-Peter de Boer + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation version 2 +of the License. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef _SMILEYROUTINES_ +#define _SMILEYROUTINES_ + +#include "smileys.h" +#include "customsmiley.h" + +typedef struct ReplaceSmileyType_tag +{ + CHARRANGE loc; + SmileyType* sml; + SmileyCType* smlc; + bool ldspace; + bool trspace; +} ReplaceSmileyType; + +// Queue to store smileys found +typedef SMOBJLIST SmileysQueueType; + + + +void LookupAllSmileys(SmileyPackType* smileyPack, SmileyPackCType* smileyCPack, const TCHAR* lpstrText, + SmileysQueueType& smllist, const bool firstOnly); +void ReplaceSmileys(HWND hwnd, SmileyPackType* smp, SmileyPackCType* smcp, const CHARRANGE& sel, + bool useHidden, bool ignoreLast, bool unFreeze); +void ReplaceSmileysWithText(HWND hwnd, CHARRANGE& sel, bool keepFrozen); +void FindSmileyInText(SmileyPackType* smp, const TCHAR* str, + unsigned& first, unsigned& size, SmileyType** index); +SmileyType* FindButtonSmiley(SmileyPackType* smp); + +#endif diff --git a/plugins/SmileyAdd/src/smileys.cpp b/plugins/SmileyAdd/src/smileys.cpp new file mode 100644 index 0000000000..2f16cee51e --- /dev/null +++ b/plugins/SmileyAdd/src/smileys.cpp @@ -0,0 +1,1146 @@ +/* +Miranda SmileyAdd Plugin +Copyright (C) 2005 - 2011 Boris Krasnovskiy All Rights Reserved +Copyright (C) 2003 - 2004 Rein-Peter de Boer + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation version 2 +of the License. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + + +#include "smileys.h" +#include "smileyroutines.h" +#include "options.h" +#include "download.h" + +SmileyPackListType g_SmileyPacks; +SmileyCategoryListType g_SmileyCategories; + +extern HANDLE hNetlibUser; + +// +// SmileyType +// + + +SmileyType::SmileyType(void) +{ + m_SmileyIcon = NULL; + m_xepimg = NULL; + m_flags = 0; + m_index = 0; + m_size.cx = 0; + m_size.cy = 0; +} + +SmileyType::~SmileyType() +{ + if (m_xepimg) m_xepimg->Release(); + m_xepimg = NULL; + + if (m_SmileyIcon != NULL) DestroyIcon(m_SmileyIcon); + m_SmileyIcon = NULL; +} + + +HICON SmileyType::GetIcon(void) +{ + if (m_SmileyIcon == NULL) + { + ImageBase* img = CreateCachedImage(); + if (!img) return NULL; + img->SelectFrame(m_index); + m_SmileyIcon = img->GetIcon(); + img->Release(); + } + return m_SmileyIcon; +} + + +HICON SmileyType::GetIconDup(void) +{ + ImageBase* img = CreateCachedImage(); + img->SelectFrame(m_index); + HICON hIcon = img->GetIcon(); + img->Release(); + return hIcon; +} + + +bool SmileyType::LoadFromImage(IStream* pStream) +{ + if (m_xepimg) m_xepimg->Release(); + + bkstring name; + m_xepimg = new ImageType(0, name, pStream); + + return true; +} + + +bool SmileyType::LoadFromResource(const bkstring& file, const int index) +{ + m_index = index; + m_filepath = file; + + return true; +} + + +void SmileyType::GetSize(SIZE& size) +{ + if (m_size.cy == 0) + { + ImageBase* img = CreateCachedImage(); + if (img) + { + img->GetSize(m_size); + img->Release(); + } + } + size = m_size; +} + + +ImageBase* SmileyType::CreateCachedImage(void) +{ + if (m_xepimg) + { + m_xepimg->AddRef(); + return m_xepimg; + } + return AddCacheImage(m_filepath, m_index); +} + + +void SmileyType::SetImList(HIMAGELIST hImLst, long i) +{ + if (m_xepimg) m_xepimg->Release(); + m_xepimg = new ImageListItemType(0, hImLst, i); +} + + +HBITMAP SmileyType::GetBitmap(COLORREF bkgClr, int sizeX, int sizeY) +{ + ImageBase* img = CreateCachedImage(); + if (!img) return NULL; + img->SelectFrame(m_index); + HBITMAP hBmp = img->GetBitmap(bkgClr, sizeX, sizeY); + img->Release(); + + return hBmp; +} + + +// +// SmileyPackType +// + +SmileyPackType::SmileyPackType() +{ + m_hSmList = NULL; + errorFound = false; +} + +SmileyType* SmileyPackType::GetSmiley(unsigned index) +{ + return (index < (unsigned)m_SmileyList.getCount()) ? &m_SmileyList[index] : NULL; +} + + +static DWORD_PTR ConvertServiceParam(HANDLE hContact, const TCHAR *param) +{ + DWORD_PTR ret; + if (param == NULL) + ret = 0; + else if (_tcsicmp(_T("hContact"), param) == 0) + ret = (DWORD_PTR)hContact; + else if (_istdigit(*param)) + ret = _ttoi(param); + else + ret = (DWORD_PTR)param; + + return ret; +} + + +void SmileyType::CallSmileyService(HANDLE hContact) +{ + _TPattern * srvsplit = _TPattern::compile(_T("(.*)\\|(.*)\\|(.*)")); + _TMatcher * m0 = srvsplit->createTMatcher(GetTriggerText()); + m0->findFirstMatch(); + + bkstring name = m0->getGroup(1); + bkstring par1 = m0->getGroup(2); + bkstring par2 = m0->getGroup(3); + + delete m0; + delete srvsplit; + + char str[MAXMODULELABELLENGTH]; + const char *proto = ""; + + if (name[0] == '/') + { + proto = (const char*) CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0); + if (proto == NULL) return; + } + mir_snprintf(str, sizeof(str), "%s%s", proto, T2A_SM(name.c_str())); + CallService(str, + ConvertServiceParam(hContact, par1.c_str()), + ConvertServiceParam(hContact, par2.c_str())); +} + + + +SmileyPackType::~SmileyPackType() +{ + if (m_hSmList != NULL) ImageList_Destroy(m_hSmList); +} + +static const TCHAR urlRegEx[] = + _T("(?:ftp|https|http|file|aim|webcal|irc|msnim|xmpp|gopher|mailto|news|nntp|telnet|wais|prospero)://?[\\w.?%:/$+;]*"); +static const TCHAR pathRegEx[] = _T("[\\s\"][a-zA-Z]:[\\\\/][\\w.\\-\\\\/]*"); +static const TCHAR timeRegEx[] = _T("\\d{1,2}:\\d{2}:\\d{2}|\\d{1,2}:\\d{2}"); + +void SmileyPackType::AddTriggersToSmileyLookup(void) +{ + _TPattern * p = _TPattern::compile(_T("\\s+")); + + { + bkstring emptystr; + m_SmileyLookup.insert(new SmileyLookup(urlRegEx, true, -1, emptystr)); + m_SmileyLookup.insert(new SmileyLookup(pathRegEx, true, -1, emptystr)); + m_SmileyLookup.insert(new SmileyLookup(timeRegEx, true, -1, emptystr)); + } + + for (int dist = 0; dist < m_SmileyList.getCount(); dist++) + { + if (m_SmileyList[dist].IsRegEx()) + { + SmileyLookup* dats = new SmileyLookup(m_SmileyList[dist].GetTriggerText(), true, dist, GetFilename()); + if (dats->IsValid()) + m_SmileyLookup.insert(dats); + else + errorFound = true; + if (m_SmileyList[dist].m_InsertText.empty()) m_SmileyList[dist].m_InsertText = m_SmileyList[dist].m_ToolText; + } + else if (!m_SmileyList[dist].IsService()) + { + bool first = true; + int li = 0; + _TMatcher * m0 = p->createTMatcher(m_SmileyList[dist].GetTriggerText()); + while (m0->findNextMatch()) + { + int stind = m0->getStartingIndex(); + if (li != stind) + { + bkstring out; + ReplaceAllSpecials(m0->getString().substr(li, stind - li), out); + SmileyLookup *dats = new SmileyLookup(out, false, dist, GetFilename()); + if (dats->IsValid()) + { + m_SmileyLookup.insert(dats); + if (first) + { + m_SmileyList[dist].m_InsertText = out; + first = false; + } + } + } + li = m0->getEndingIndex(); + } + + int stind = (int)m0->getString().size(); + if (li < stind) + { + bkstring out; + ReplaceAllSpecials(m0->getString().substr(li, stind - li), out); + SmileyLookup *dats = new SmileyLookup(out, false, dist, GetFilename()); + if (dats->IsValid()) + { + m_SmileyLookup.insert(dats); + if (first) + { + m_SmileyList[dist].m_InsertText = out; + first = false; + } + } + } + delete m0; + } + } + delete p; +} + + +void SmileyPackType::ReplaceAllSpecials(const bkstring& Input, bkstring& Output) +{ + Output = _TPattern::replace(_T("%%_{1,2}%%"), Input, _T(" ")); + Output = _TPattern::replace(_T("%%''%%"), Output, _T("\"")); +} + + +void SmileyPackType::Clear(void) +{ + m_SmileyList.destroy(); + m_SmileyLookup.destroy(); + if (m_hSmList != NULL) { ImageList_Destroy(m_hSmList); m_hSmList = NULL; } + m_Filename.clear(); + m_Name.clear(); + m_Date.clear(); + m_Version.clear(); + m_Author.clear(); + m_VisibleCount = 0; + m_ButtonSmiley.clear(); + errorFound = false; +} + +bool SmileyPackType::LoadSmileyFile(const bkstring& filename, bool onlyInfo, bool noerr) +{ + Clear(); + + if (filename.empty()) + { + m_Name = _T("Nothing loaded"); + return false; + } + + bkstring modpath; + pathToAbsolute(filename, modpath); + + // Load xep file + int fh = _topen(modpath.c_str(), _O_BINARY | _O_RDONLY); + if (fh == -1) + { + if (!noerr) + { + static const TCHAR errmsg[] = _T("Smiley Pack %s not found.\n") + _T("Select correct Smiley Pack in the Miranda Options | Customize | Smileys."); + TCHAR msgtxt[1024]; + mir_sntprintf(msgtxt, SIZEOF(msgtxt), TranslateTS(errmsg), modpath.c_str()); + ReportError(msgtxt); + } + + m_Name = _T("Nothing loaded"); + return false; + } + + m_Filename = filename; + + // Find file size + const long flen = _filelength(fh); + + // Allocate file buffer + char* buf = new char[flen + sizeof(wchar_t)]; + + // Read xep file in + int len = _read(fh, buf, flen); + *(wchar_t*)(buf+len) = 0; + + // Close file + _close(fh); + + bkstring tbuf; + + if (len>2 && *(wchar_t*)buf == 0xfeff) + { + tbuf = W2T_SM((wchar_t*)buf+1); + } + else if (len>3 && buf[0]=='\xef' && buf[1]=='\xbb' && buf[2]=='\xbf') + { + tbuf = W2T_SM(A2W_SM(buf+3, CP_UTF8)); + } + else + { + tbuf = A2T_SM(buf); + } + + delete[] buf; + + bool res; + if (filename.find(_T(".xep")) == filename.npos) + res = LoadSmileyFileMSL(tbuf, onlyInfo, modpath); + else + res = LoadSmileyFileXEP(tbuf, onlyInfo, modpath); + + if (errorFound) ReportError(TranslateT("There were problems loading smiley pack (it should be corrected).\nSee Network Log for details.")); + + return res; +} + +bool SmileyPackType::LoadSmileyFileMSL(bkstring& tbuf, bool onlyInfo, bkstring& modpath) +{ + _TPattern * pathsplit = _TPattern::compile(_T("(.*\\\\)(.*)\\.|$")); + _TMatcher * m0 = pathsplit->createTMatcher(modpath); + + m0->findFirstMatch(); + const bkstring pathstr = m0->getGroup(1); + const bkstring packstr = m0->getGroup(2); + + delete m0; + delete pathsplit; + + _TPattern * otherf = _TPattern::compile( + _T("^\\s*(Name|Author|Date|Version|ButtonSmiley)\\s*=\\s*\"(.*)\""), + _TPattern::MULTILINE_MATCHING); + + m0 = otherf->createTMatcher(tbuf); + + while (m0->findNextMatch()) + { + if (m0->getGroup(1) == _T("Name")) m_Name = m0->getGroup(2); + if (m0->getGroup(1) == _T("Author")) m_Author = m0->getGroup(2); + if (m0->getGroup(1) == _T("Date")) m_Date = m0->getGroup(2); + if (m0->getGroup(1) == _T("Version")) m_Version = m0->getGroup(2); + if (m0->getGroup(1) == _T("ButtonSmiley")) m_ButtonSmiley = m0->getGroup(2); + } + delete m0; + delete otherf; + + if (!onlyInfo) + { + selec.x = 0; + selec.y = 0; + win.x = 0; + win.y = 0; + { + _TPattern * pat = _TPattern::compile( + _T("^\\s*(Selection|Window)Size\\s*=\\s*(\\d+)\\s*,\\s*(\\d+)"), + _TPattern::MULTILINE_MATCHING); + _TMatcher * m0 = pat->createTMatcher(tbuf); + while (m0->findNextMatch()) + { + POINT tpt; + tpt.x = _ttol(m0->getGroup(2).c_str()); + tpt.y = _ttol(m0->getGroup(3).c_str()); + + if (m0->getGroup(1) == _T("Selection")) + selec = tpt; + else if (m0->getGroup(1) == _T("Window")) + win = tpt; + } + delete m0; + delete pat; + } + + _TPattern * smiley = _TPattern::compile( + _T("^\\s*Smiley(\\*)?\\s*=") // Is Hidden + _T("(?:\\s*\"(.*)\")") // Smiley file name + _T("(?:[\\s,]+(\\-?\\d+))") // Icon resource id + _T("(?:[\\s,]+(R|S)?\"(.*?)\")") // Trigger text + _T("(?:[\\s,]+\"(.*?)\")?") // Tooltip or insert text + _T("(?:[\\s,]+\"(.*?)\")?"), // Tooltip text + _TPattern::MULTILINE_MATCHING); + + _TMatcher * m0 = smiley->createTMatcher(tbuf); + + SmileyVectorType hiddenSmileys; + + unsigned smnum = 0; + while (m0->findNextMatch()) + { + bkstring resname = m0->getGroup(2); + if (resname.find(_T("http://")) != resname.npos) + { + if (GetSmileyFile(resname, packstr)) continue; + } + else + { + if (!resname.empty()) resname.insert(0, pathstr); + } + + SmileyType *dat = new SmileyType; + + const int iconIndex = _ttol(m0->getGroup(3).c_str()); + + dat->SetHidden(m0->getStartingIndex(1) >= 0); + if (m0->getStartingIndex(4) >= 0) + { + dat->SetRegEx(m0->getGroup(4) == _T("R")); + dat->SetService(m0->getGroup(4) == _T("S")); + } + dat->m_TriggerText = m0->getGroup(5); + if (dat->IsRegEx()) + { + if (m0->getStartingIndex(6) >= 0) + ReplaceAllSpecials(m0->getGroup(6), dat->m_InsertText); + + if (m0->getStartingIndex(7) >= 0) + ReplaceAllSpecials(m0->getGroup(7), dat->m_ToolText); + else + dat->m_ToolText = dat->m_InsertText; + } + else + { + if (m0->getStartingIndex(6) >= 0) + ReplaceAllSpecials(m0->getGroup(6), dat->m_ToolText); + else + ReplaceAllSpecials(dat->m_TriggerText, dat->m_ToolText); + } + + bool noerr; + if (resname.empty()) + { + dat->SetHidden(true); + dat->SetText(true); + noerr = true; + } + else + noerr = dat->LoadFromResource(resname, iconIndex); + + if (dat->IsHidden()) + hiddenSmileys.insert(dat); + else + m_SmileyList.insert(dat); + + if (!noerr) + { + static const TCHAR errmsg[] = _T("Smiley #%u in file %s for Smiley Pack %s not found."); + TCHAR msgtxt[1024]; + mir_sntprintf(msgtxt, SIZEOF(msgtxt), TranslateTS(errmsg), smnum, resname.c_str(), modpath.c_str()); + CallService(MS_NETLIB_LOG,(WPARAM) hNetlibUser, (LPARAM)(char*)T2A_SM(msgtxt)); + errorFound = true; + } + smnum++; + } + delete m0; + delete smiley; + + m_VisibleCount = m_SmileyList.getCount(); + + m_SmileyList.splice(hiddenSmileys); + + AddTriggersToSmileyLookup(); + } + + return true; +} + + +static void DecodeHTML(bkstring& str) +{ + if (str.find('&') != str.npos) + { + str = _TPattern::replace(bkstring(_T("<")), str, bkstring(_T("<"))); + str = _TPattern::replace(bkstring(_T(">")), str, bkstring(_T(">"))); + } +} + + +static IStream* DecodeBase64Data(const char* data) +{ + NETLIBBASE64 nlb64; + nlb64.pszEncoded = (char*)data; + nlb64.cchEncoded = (int)strlen(data); + nlb64.cbDecoded = Netlib_GetBase64DecodedBufferSize(nlb64.cchEncoded); + + IStream* pStream = NULL; + + // Read image list + HGLOBAL hBuffer = GlobalAlloc(GMEM_MOVEABLE, nlb64.cbDecoded); + if (hBuffer) + { + nlb64.pbDecoded = (PBYTE)GlobalLock(hBuffer); + CallService(MS_NETLIB_BASE64DECODE, 0, (LPARAM)&nlb64); + GlobalUnlock(hBuffer); + + CreateStreamOnHGlobal(hBuffer, TRUE, &pStream); + } + + return pStream; +} + + +bool SmileyPackType::LoadSmileyFileXEP(bkstring& tbuf, bool onlyInfo, bkstring& ) +{ + _TMatcher *m0, *m1, *m2; + + _TPattern * dbname_re = _TPattern::compile(_T("\\s*\"(.*?)\"\\s*"), + _TPattern::MULTILINE_MATCHING); + _TPattern * author_re = _TPattern::compile(_T("\\s*\"(.*?)\"\\s*"), + _TPattern::MULTILINE_MATCHING); + _TPattern * settings_re = _TPattern::compile(_T("(.*?)"), + _TPattern::MULTILINE_MATCHING | _TPattern::DOT_MATCHES_ALL); + + m0 = settings_re->createTMatcher(tbuf); + if (m0->findFirstMatch()) + { + bkstring settings = m0->getGroup(1); + + m1 = author_re->createTMatcher(settings); + if (m1->findFirstMatch()) + { + m_Author = m1->getGroup(1); + DecodeHTML(m_Author); + } + delete m1; + + m1 = dbname_re->createTMatcher(settings); + if (m1->findFirstMatch()) + { + m_Name = m1->getGroup(1); + DecodeHTML(m_Name); + } + delete m1; + } + delete m0; + + delete dbname_re; + delete author_re; + delete settings_re; + + if (!onlyInfo) + { + _TPattern * record_re = _TPattern::compile(_T("(?:\\s*\"(.*?)\")?(.*?)"), + _TPattern::MULTILINE_MATCHING | _TPattern::DOT_MATCHES_ALL); + _TPattern * expression_re = _TPattern::compile(_T("\\s*\"(.*?)\"\\s*"), + _TPattern::MULTILINE_MATCHING); + _TPattern * pastetext_re = _TPattern::compile(_T("\\s*\"(.*?)\"\\s*"), + _TPattern::MULTILINE_MATCHING); + _TPattern * images_re = _TPattern::compile(_T("(.*?)"), + _TPattern::MULTILINE_MATCHING | _TPattern::DOT_MATCHES_ALL); + _TPattern * image_re = _TPattern::compile(_T("(.*?)"), + _TPattern::MULTILINE_MATCHING | _TPattern::DOT_MATCHES_ALL); + _TPattern * imagedt_re = _TPattern::compile(_T(""), + _TPattern::MULTILINE_MATCHING ); + + m0 = images_re->createTMatcher(tbuf); + if (m0->findFirstMatch()) + { + bkstring images = m0->getGroup(1); + + m1 = imagedt_re->createTMatcher(images); + if (m1->findFirstMatch()) + { + IStream* pStream = DecodeBase64Data(T2A_SM(m1->getGroup(1).c_str())); + if (pStream != NULL) + { + if (m_hSmList != NULL) ImageList_Destroy(m_hSmList); + m_hSmList = ImageList_Read(pStream); + pStream->Release(); + } + } + delete m1; + } + delete m0; + + m0 = record_re->createTMatcher(tbuf); + while (m0->findNextMatch()) + { + SmileyType *dat = new SmileyType; + + dat->SetRegEx(true); + dat->SetImList(m_hSmList, _ttol(m0->getGroup(1).c_str())); + dat->m_ToolText = m0->getGroup(2); + DecodeHTML(dat->m_ToolText); + + bkstring rec = m0->getGroup(3); + + m1 = expression_re->createTMatcher(rec); + if (m1->findFirstMatch()) + { + dat->m_TriggerText = m1->getGroup(1); + DecodeHTML(dat->m_TriggerText); + } + delete m1; + + m1 = pastetext_re->createTMatcher(rec); + if (m1->findFirstMatch()) + { + dat->m_InsertText = m1->getGroup(1); + DecodeHTML(dat->m_InsertText); + } + delete m1; + dat->SetHidden(dat->m_InsertText.empty()); + + m1 = image_re->createTMatcher(rec); + if (m1->findFirstMatch()) + { + bkstring images = m1->getGroup(1); + + m2 = imagedt_re->createTMatcher(images); + if (m2->findFirstMatch()) + { + IStream* pStream = DecodeBase64Data(T2A_SM(m2->getGroup(1).c_str())); + if (pStream != NULL) + { + dat->LoadFromImage(pStream); + pStream->Release(); + } + } + delete m2; + } + delete m1; + + m_SmileyList.insert(dat); + } + delete m0; + + delete record_re; + delete expression_re; + delete pastetext_re; + delete images_re; + delete image_re; + delete imagedt_re; + } + + m_VisibleCount = m_SmileyList.getCount(); + + AddTriggersToSmileyLookup(); + + selec.x = 0; + selec.y = 0; + win.x = 0; + win.y = 0; + + return true; +} + + +// +// SmileyPackListType +// + + +bool SmileyPackListType::AddSmileyPack(bkstring& filename) +{ + bool res = true; + if (GetSmileyPack(filename) == NULL) + { //not exist yet, so add + SmileyPackType *smileyPack = new SmileyPackType; + + res = smileyPack->LoadSmileyFile(filename, FALSE); + if (res) + m_SmileyPacks.insert(smileyPack); + else + delete smileyPack; + } + return res; +} + + +SmileyPackType* SmileyPackListType::GetSmileyPack(bkstring& filename) +{ + bkstring modpath; + pathToAbsolute(filename, modpath); + + for (int i = 0; i < m_SmileyPacks.getCount(); i++) + { + bkstring modpath1; + pathToAbsolute(m_SmileyPacks[i].GetFilename(), modpath1); + if (lstrcmpi(modpath.c_str(), modpath1.c_str()) == 0) return &m_SmileyPacks[i]; + } + return NULL; +} + +void SmileyPackListType::ClearAndFreeAll() +{ + m_SmileyPacks.destroy(); +} + + +// +// SmileyCategoryType +// + + +SmileyCategoryType::SmileyCategoryType(SmileyPackListType* pSPS, const bkstring& name, + const bkstring& displayName, + const bkstring& defaultFilename, SmcType typ) +{ + m_pSmileyPackStore = pSPS; + type = typ; + m_Name = name; + m_DisplayName = displayName; + + opt.ReadPackFileName(m_Filename, m_Name, defaultFilename); +} + + +void SmileyCategoryType::Load(void) +{ + if (!opt.UseOneForAll || type != smcProto) + m_pSmileyPackStore->AddSmileyPack(m_Filename); +} + + +SmileyPackType* SmileyCategoryType::GetSmileyPack(void) +{ + return m_pSmileyPackStore->GetSmileyPack(m_Filename); +} + + +void SmileyCategoryType::SaveSettings(void) +{ + opt.WritePackFileName(m_Filename, m_Name); +} + +// +// SmileyCategoryListType +// + +void SmileyCategoryListType::ClearAndLoadAll(void) +{ + m_pSmileyPackStore->ClearAndFreeAll(); + + for (int i = 0; i < m_SmileyCategories.getCount(); i++) + m_SmileyCategories[i].Load(); +} + + +SmileyCategoryType* SmileyCategoryListType::GetSmileyCategory(const bkstring& name) +{ + for (int i = 0; i < m_SmileyCategories.getCount(); i++) + { + if (name.comparei(m_SmileyCategories[i].GetName()) == 0) return &m_SmileyCategories[i]; + } + return NULL; +} + + +SmileyCategoryType* SmileyCategoryListType::GetSmileyCategory(unsigned index) +{ + return index < (unsigned)m_SmileyCategories.getCount() ? &m_SmileyCategories[index] : NULL; +} + + +SmileyPackType* SmileyCategoryListType::GetSmileyPack(bkstring& categoryname) +{ + SmileyCategoryType* smc = GetSmileyCategory(categoryname); + return smc != NULL ? smc->GetSmileyPack() : NULL; +} + + +void SmileyCategoryListType::SaveSettings(void) +{ + bkstring catstr; + for (int i = 0; i < m_SmileyCategories.getCount(); i++) + { + m_SmileyCategories[i].SaveSettings(); + if (m_SmileyCategories[i].IsCustom()) + { + if (!catstr.empty()) catstr += '#'; + catstr += m_SmileyCategories[i].GetName(); + } + } + opt.WriteCustomCategories(catstr); +} + + +void SmileyCategoryListType::AddAndLoad(const bkstring& name, const bkstring& displayName) +{ + if (GetSmileyCategory(name) != NULL) return; + + AddCategory(name, displayName, smcExt); + // Load only if other smileys have been loaded already + if (m_SmileyCategories.getCount() > 1) + m_SmileyCategories[m_SmileyCategories.getCount()-1].Load(); +} + + +void SmileyCategoryListType::AddCategory(const bkstring& name, const bkstring& displayName, + SmcType typ, const bkstring& defaultFilename) +{ + if (GetSmileyCategory(name) == NULL) + m_SmileyCategories.insert(new SmileyCategoryType(m_pSmileyPackStore, name, + displayName, defaultFilename, typ)); +} + + +bool SmileyCategoryListType::DeleteCustomCategory(int index) +{ + if (index < m_SmileyCategories.getCount()) + { + if (m_SmileyCategories[index].IsCustom()) + { + m_SmileyCategories.remove(index); + return true; + } + + } + return false; +} + +void SmileyCategoryListType::AddAccountAsCategory(PROTOACCOUNT *acc, const bkstring& defaultFile) +{ + if (IsAccountEnabled(acc) && acc->szProtoName && IsSmileyProto(acc->szModuleName)) + { + bkstring displayName(acc->tszAccountName ? acc->tszAccountName : A2T_SM(acc->szModuleName)); + + const char* packnam = acc->szProtoName; + if (strcmp(packnam, "JABBER") == 0) + packnam = "JGMail"; + else if (strstr(packnam, "SIP") != NULL) + packnam = "MSN"; + + char path[MAX_PATH]; + mir_snprintf(path, sizeof(path), "Smileys\\nova\\%s.msl", packnam); + + bkstring paths = A2T_SM(path), patha; + pathToAbsolute(paths, patha); + + if (_taccess(patha.c_str(), 0) != 0) + paths = defaultFile; + + bkstring tname(A2T_SM(acc->szModuleName)); + AddCategory(tname, displayName, smcProto, paths); + } +} + +void SmileyCategoryListType::DeleteAccountAsCategory(PROTOACCOUNT *acc) +{ + bkstring tname(A2T_SM(acc->szModuleName)); + + HANDLE hContact = (HANDLE)CallService( MS_DB_CONTACT_FINDFIRST, 0, 0); + while (hContact != NULL) + { + char* proto = (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0); + if (proto) + { + DBVARIANT dbv; + if (DBGetContactSettingTString(hContact, proto, "Transport", &dbv) == 0) + { + bool found = (tname.comparei(dbv.ptszVal) == 0); + DBFreeVariant(&dbv); + if (found) return; + } + } + hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM)hContact, 0); + } + + for (int i = 0; i < m_SmileyCategories.getCount(); i++) + { + if (tname.comparei(m_SmileyCategories[i].GetName()) == 0) + { + m_SmileyCategories.remove(i); + break; + } + } +} + +void SmileyCategoryListType::AddContactTransportAsCategory(HANDLE hContact, const bkstring& defaultFile) +{ + char* proto = (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0); + if (proto == NULL) return; + + DBVARIANT dbv; + if (DBGetContactSettingTString(hContact, proto, "Transport", &dbv) == 0) + { + if (dbv.ptszVal[0] == '\0') + { + DBFreeVariant(&dbv); + return; + } + char* trsp = mir_strdup(T2A_SM(dbv.ptszVal)); + _strlwr(trsp); + + const char *packname = NULL; + if (strstr(trsp, "msn") != NULL) + packname = "msn"; + else if (strstr(trsp, "icq") != NULL) + packname = "icq"; + else if (strstr(trsp, "yahoo") != NULL) + packname = "yahoo"; + else if (strstr(trsp, "aim") != NULL) + packname = "aim"; + else if (strstr(trsp, "lcs") != NULL) + packname = "msn"; + + mir_free(trsp); + + bkstring displayName = dbv.ptszVal; + if (packname != NULL) + { + char path[MAX_PATH]; + mir_snprintf(path, sizeof(path), "Smileys\\nova\\%s.msl", packname); + + bkstring paths = A2T_SM(path), patha; + pathToAbsolute(paths, patha); + + if (_taccess(patha.c_str(), 0) != 0) + paths = defaultFile; + + AddCategory(displayName, displayName, smcProto, paths); + } + else + AddCategory(displayName, displayName, smcProto, defaultFile); + + DBFreeVariant(&dbv); + } +} + + +void SmileyCategoryListType::AddAllProtocolsAsCategory(void) +{ + bkstring displayName = TranslateT("Standard"); + bkstring tname = _T("Standard"); + AddCategory(tname, displayName, smcStd); + + const bkstring& defaultFile = GetSmileyCategory(tname)->GetFilename(); + + + unsigned lpcp = (unsigned)CallService(MS_LANGPACK_GETCODEPAGE, 0, 0); + if (lpcp == CALLSERVICE_NOTFOUND) lpcp = CP_ACP; + + + PROTOCOLDESCRIPTOR **protoList; + PROTOACCOUNT **accList; + int protoCount; + + if (ProtoEnumAccounts(&protoCount, &accList) == CALLSERVICE_NOTFOUND || (protoCount > 0 && accList[0]->cbSize == 0)) + { + CallService(MS_PROTO_ENUMPROTOCOLS, (WPARAM)&protoCount, (LPARAM)&protoList); + for (int i = 0; i < protoCount; i++) + { + if (protoList[i]->type != PROTOTYPE_PROTOCOL) continue; + + if (IsSmileyProto(protoList[i]->szName)) + { + const char* packnam = protoList[i]->szName; + if (strcmp(packnam, "JABBER") == 0) + packnam = "JGMail"; + else if (strstr(packnam, "SIP") != NULL) + packnam = "MSN"; + + char path[MAX_PATH]; + mir_snprintf(path, sizeof(path), "Smileys\\nova\\%s.msl", packnam); + + bkstring paths = A2T_SM(path), patha; + pathToAbsolute(paths, patha); + + if (_taccess(patha.c_str(), 0) != 0) + paths = defaultFile; + + char protoName[128]; + CallProtoService(protoList[i]->szName, PS_GETNAME, sizeof(protoName), (LPARAM)protoName); + + + displayName = A2W_SM(protoName, lpcp); + + tname = A2T_SM(protoList[i]->szName); + AddCategory(tname, displayName, smcProto, paths); + } + } + } + else + { + for (int i = 0; i < protoCount; i++) + AddAccountAsCategory(accList[i], defaultFile); + } + + HANDLE hContact = (HANDLE)CallService( MS_DB_CONTACT_FINDFIRST, 0, 0); + while (hContact != NULL) + { + AddContactTransportAsCategory(hContact, defaultFile); + hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM)hContact, 0); + } + + bkstring cats; + opt.ReadCustomCategories(cats); + + bkstring::size_type cppv = 0; + for (;;) + { + bkstring::size_type cp = cats.find('#', cppv); + if (cp != cats.npos) + { + displayName = cats.substr(cppv, cp - cppv); + AddCategory(displayName, displayName, smcCustom, defaultFile); + cppv = cp + 1; + } + else break; + } + if (cppv != cats.size()) + { + displayName = cats.substr(cppv, cats.size() - cppv); + AddCategory(displayName, displayName, smcCustom, defaultFile); + } +} + + +SmileyLookup::SmileyLookup(const bkstring& str, const bool regexs, const int ind, const bkstring& smpt) +{ + TCHAR msgtxt[1024]; + + m_ind = ind; + if (regexs) + { + static const bkstring testString(_T("Test String")); + m_pattern = _TPattern::compile(str); + m_valid = m_pattern != NULL; + if (m_valid) + { + _TMatcher* matcher = m_pattern->createTMatcher(testString); + m_valid &= (!matcher->findFirstMatch() || + matcher->getStartingIndex() != matcher->getEndingIndex()); + if (!m_valid) + { + static const TCHAR errmsg[] = _T("Regular Expression \"%s\" in smiley pack \"%s\" could produce \"empty matches\"."); + mir_sntprintf(msgtxt, SIZEOF(msgtxt), TranslateTS(errmsg), str.c_str(), smpt.c_str()); + } + delete matcher; + } + else + { + static const TCHAR errmsg[] = _T("Regular Expression \"%s\" in smiley pack \"%s\" malformed.") ; + mir_sntprintf(msgtxt, SIZEOF(msgtxt), TranslateTS(errmsg), str.c_str(), smpt.c_str()); + } + + if (!m_valid) CallService(MS_NETLIB_LOG, (WPARAM) hNetlibUser, (LPARAM)(char*)T2A_SM(msgtxt)); + } + else + { + m_text = str; + m_pattern = NULL; + m_valid = !str.empty(); + } +} + + +SmileyLookup::~SmileyLookup() +{ + if (m_pattern) delete m_pattern; +} + + +void SmileyLookup::find(const bkstring& str, SmileyLocVecType& smlcur, bool firstOnly) const +{ + if (!m_valid) return; + + if (m_text.empty()) + { + _TMatcher* matcher = m_pattern->createTMatcher(str); + while( matcher->findNextMatch()) + { + bkstring::size_type st = matcher->getStartingIndex(); + bkstring::size_type sz = matcher->getEndingIndex() - st; + if (sz != 0) + { + smlcur.insert(new SmileyLocType(st, sz)); + if (firstOnly && m_ind != -1) return; + } + } + delete matcher; + } + else + { + const TCHAR* pos = str.c_str(); + while( (pos = _tcsstr(pos, m_text.c_str())) != NULL ) + { + smlcur.insert(new SmileyLocType(pos - str.c_str(), m_text.size())); + pos += m_text.size(); + if (firstOnly && m_ind != -1) return; + } + } +} diff --git a/plugins/SmileyAdd/src/smileys.h b/plugins/SmileyAdd/src/smileys.h new file mode 100644 index 0000000000..2b127eb225 --- /dev/null +++ b/plugins/SmileyAdd/src/smileys.h @@ -0,0 +1,287 @@ +/* +Miranda SmileyAdd Plugin +Copyright (C) 2005 - 2011 Boris Krasnovskiy +Copyright (C) 2003 - 2004 Rein-Peter de Boer + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation version 2 +of the License. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef SMILEYADD_SMILEYS_H_ +#define SMILEYADD_SMILEYS_H_ + +#include "general.h" +#include "smltool.h" +#include "imagecache.h" + +#define MS_SMILEYADD_CUSTOMCATMENU "SmileyAdd/CustomCatMenu" + +const unsigned HiddenSmiley = 1; +const unsigned RegExSmiley = 2; +const unsigned ServiceSmiley = 4; +const unsigned TextSmiley = 8; +const unsigned SoundSmiley = 16; + +class SmileyType +{ +protected: + unsigned m_flags; + int m_index; + + SIZE m_size; + + HICON m_SmileyIcon; + ImageBase* m_xepimg; + + bkstring m_filepath; + + void SetFlagsBit(unsigned flag, bool set) + { if (set) m_flags |= flag; else m_flags &= ~flag; } + +public: + + bkstring m_TriggerText; + bkstring m_ToolText; + bkstring m_InsertText; + + SmileyType(void); + ~SmileyType(); + + const bkstring& GetTriggerText(void) const { return m_TriggerText; } + const bkstring& GetToolText(void) const { return m_ToolText; } + const bkstring& GetInsertText(void) const { return m_InsertText; } + const bkstring& GetFilePath(void) const { return m_filepath; } + + bool IsHidden(void) const { return (m_flags & HiddenSmiley) != 0; } + bool IsRegEx(void) const { return (m_flags & RegExSmiley) != 0; } + bool IsService(void) const { return (m_flags & ServiceSmiley) != 0; } + bool IsSound(void) const { return (m_flags & SoundSmiley) != 0; } + bool IsText(void) const { return (m_flags & TextSmiley) != 0; } + + bool IsFileFound(void) { return _taccess(m_filepath.c_str(), 0) == 0; } + bool IsValid(void) { return m_size.cx != 0; } + + ImageBase* CreateCachedImage(void); + + void GetSize(SIZE& size); + int GetStaticFrame(void) const { return m_index; } + + HICON GetIcon(void); + HICON GetIconDup(void); + HBITMAP GetBitmap(COLORREF bkgClr, int sizeX, int sizeY); + + void CallSmileyService(HANDLE hContact); + + void SetHidden(bool hid) { SetFlagsBit(HiddenSmiley, hid); } + void SetRegEx(bool regex) { SetFlagsBit(RegExSmiley, regex); } + void SetService(bool service) { SetFlagsBit(ServiceSmiley, service); } + void SetSound(bool sound) { SetFlagsBit(SoundSmiley, sound); } + void SetText(bool text) { SetFlagsBit(TextSmiley, text); } + + void SetImList(HIMAGELIST hImLst, long i); + + bool LoadFromResource(const bkstring& file, const int index); + bool LoadFromImage(IStream* pStream); +}; + + +class SmileyLookup +{ +private: + _TPattern* m_pattern; + + int m_ind; + bkstring m_text; + bool m_valid; + +public: + struct SmileyLocType + { + size_t pos, len; + SmileyLocType(size_t p, size_t l) : pos(p), len(l) {} + SmileyLocType() {} + }; + typedef SMOBJLIST SmileyLocVecType; + + SmileyLookup() { m_ind = 0; m_valid = false; m_pattern = NULL; }; + SmileyLookup(const bkstring& str, const bool regexs, const int ind, const bkstring& smpt); + ~SmileyLookup(); + + void find(const bkstring& str, SmileyLocVecType& smlcur, bool firstOnly) const; + int GetIndex(void) const { return m_ind; } + bool IsValid(void) const { return m_valid; } +}; + + +class SmileyPackType +{ +public: + typedef SMOBJLIST SmileyVectorType; + typedef SMOBJLIST SmileyLookupType; + + POINT selec, win; + +private: + bkstring m_Filename; //used as identification + bkstring m_Name; + bkstring m_Author; + bkstring m_Date; + bkstring m_Version; + bkstring m_ButtonSmiley; + + HIMAGELIST m_hSmList; + + int m_VisibleCount; + + SmileyVectorType m_SmileyList; + SmileyLookupType m_SmileyLookup; + + bool errorFound; + + void InsertLookup(SmileyType& sml, bkstring& lk, bool first); + void AddTriggersToSmileyLookup(void); + void ReplaceAllSpecials(const bkstring& Input, bkstring& Output); + bool LoadSmileyFileMSL(bkstring& tbuf, bool onlyInfo, bkstring& modpath); + bool LoadSmileyFileXEP(bkstring& tbuf, bool onlyInfo, bkstring& modpath); + +public: + SmileyPackType(); + ~SmileyPackType(); + + SmileyVectorType& GetSmileyList(void) { return m_SmileyList; } + SmileyLookupType* GetSmileyLookup(void) { return &m_SmileyLookup; } + + const bkstring& GetFilename(void) const { return m_Filename; } + const bkstring& GetName(void) const { return m_Name; } + const bkstring& GetAuthor(void) const { return m_Author; } + const bkstring& GetDate(void) const { return m_Date; } + const bkstring& GetVersion(void) const { return m_Version; } + + int SmileyCount(void) const { return m_SmileyList.getCount(); } + int VisibleSmileyCount(void) const { return m_VisibleCount; } + + SmileyType* GetSmiley(unsigned index); + + const TCHAR* GetButtonSmiley(void) const { return m_ButtonSmiley.c_str(); } + + bool LoadSmileyFile(const bkstring& filename, bool onlyInfo, bool noerr = false); + + void Clear(void); +}; + + +class SmileyPackListType +{ +public: + typedef SMOBJLIST SmileyPackVectorType; + +private: + SmileyPackVectorType m_SmileyPacks; + +public: + int NumberOfSmileyPacks(void) { return m_SmileyPacks.getCount(); } + + bool AddSmileyPack(bkstring& filename); + void ClearAndFreeAll(void); + SmileyPackType* GetSmileyPack(bkstring& filename); +}; + + +typedef enum +{ + smcNone, + smcStd, + smcProto, + smcCustom, + smcExt +} SmcType; + + +class SmileyCategoryType +{ +private: + bkstring m_Name; + bkstring m_DisplayName; + bkstring m_Filename; //functions as identification + + SmcType type; + + SmileyPackListType* m_pSmileyPackStore; + +public: + SmileyCategoryType() { type = smcNone; m_pSmileyPackStore = NULL; }; + SmileyCategoryType(SmileyPackListType* pSPS, const bkstring& name, + const bkstring& displayName, const bkstring& defaultFilename, SmcType typ); + + const bkstring& GetDisplayName(void) const { return m_DisplayName; } + const bkstring& GetName(void) const { return m_Name; } + const bkstring& GetFilename(void) const { return m_Filename; } + + bool IsCustom(void) { return type == smcCustom; } + bool IsProto(void) { return type == smcProto; } + bool IsExt(void) { return type == smcExt; } + + SmcType GetType(void) { return type; } + + SmileyPackType* GetSmileyPack(void); + + void SetFilename(bkstring& name) { m_Filename = name; } + void SetDisplayName(bkstring& name) { m_DisplayName = name; } + + void ClearFilename(void) { m_Filename.clear(); } + void SaveSettings(void); + + void Load(void); +}; + + +class SmileyCategoryListType +{ +public: + typedef SMOBJLIST SmileyCategoryVectorType; + +private: + SmileyCategoryVectorType m_SmileyCategories; + SmileyPackListType* m_pSmileyPackStore; + +public: + void SetSmileyPackStore(SmileyPackListType* pSPS) { m_pSmileyPackStore = pSPS; } + + SmileyCategoryType* GetSmileyCategory(const bkstring& name); + SmileyCategoryType* GetSmileyCategory(unsigned index); + SmileyPackType* GetSmileyPack(bkstring& name); + SmileyCategoryVectorType* GetSmileyCategoryList(void) { return &m_SmileyCategories; }; + + int NumberOfSmileyCategories(void) { return m_SmileyCategories.getCount(); } + + void AddCategory(const bkstring& name, const bkstring& displayName, SmcType typ, + const bkstring& defaultFilename = bkstring(_T("Smileys\\nova\\default.msl"))); + void AddAndLoad(const bkstring& name, const bkstring& displayName); + void AddAllProtocolsAsCategory(void); + void AddAccountAsCategory(PROTOACCOUNT *acc, const bkstring& defaultFile); + void AddContactTransportAsCategory(HANDLE hContact, const bkstring& defaultFile); + + void ClearAndLoadAll(void); + void ClearAll(void) + { m_pSmileyPackStore->ClearAndFreeAll(); m_SmileyCategories.destroy(); } + + bool DeleteCustomCategory(int index); + void DeleteAccountAsCategory(PROTOACCOUNT *acc); + + void SaveSettings(void); +}; + +extern SmileyPackListType g_SmileyPacks; +extern SmileyCategoryListType g_SmileyCategories; + +#endif //SMILEYADD_SMILEYS_H_ diff --git a/plugins/SmileyAdd/src/smltool.cpp b/plugins/SmileyAdd/src/smltool.cpp new file mode 100644 index 0000000000..31695a516a --- /dev/null +++ b/plugins/SmileyAdd/src/smltool.cpp @@ -0,0 +1,785 @@ +/* +Miranda SmileyAdd Plugin +Copyright (C) 2005 - 2011 Boris Krasnovskiy All Rights Reserved +Copyright (C) 2003 - 2004 Rein-Peter de Boer + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation version 2 +of the License. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include "general.h" +#include "options.h" +#include "smileys.h" +#include "smltool.h" +#include "anim.h" + +#define SB_MYMOVE 20 + +// +// SmileyToolwindowType +// +class SmileyToolWindowType +{ +private: + unsigned m_NumberOfVerticalButtons; + unsigned m_NumberOfHorizontalButtons; + SIZE m_BitmapWidth; + SIZE m_ButtonSize; + unsigned m_ButtonSpace; + unsigned m_NumberOfButtons; + int m_WindowSizeY; + + HWND m_hwndDialog; + HWND m_hToolTip; + HWND m_hWndTarget; + SmileyPackType* m_pSmileyPack; + int m_CurrentHotTrack; + int m_XPosition; + int m_YPosition; + int m_Direction; + UINT m_TargetMessage; + WPARAM m_TargetWParam; + HANDLE m_hContact; + int rowSel; + bool m_Choosing; + + AnimatedPack* m_AniPack; + + void InitDialog(LPARAM lParam); + void PaintWindow(void); + void InsertSmiley(void); + void MouseMove(int x, int y); + void KeyUp(WPARAM wParam, LPARAM lParam); + void SmileySel(int but); + void ScrollV(int action, int dist = 0); + + int GetRowSize(void) const { return m_ButtonSize.cy + m_ButtonSpace; } + + void CreateSmileyBitmap(HDC hdc); + void CreateSmileyWinDim(void); + RECT CalculateButtonToCoordinates(int buttonPosition, int scroll); + int CalculateCoordinatesToButton(POINT pt, int scroll); + +public: + SmileyToolWindowType(HWND hWnd); + LRESULT DialogProcedure(UINT msg, WPARAM wParam, LPARAM lParam); +}; + + +LRESULT CALLBACK DlgProcSmileyToolWindow(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) +{ + SmileyToolWindowType* pOD; + LRESULT Result; + + pOD = (SmileyToolWindowType*) GetWindowLongPtr(hwndDlg, GWLP_USERDATA); + if (pOD == NULL) { + pOD = new SmileyToolWindowType(hwndDlg); + SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR) pOD); + } + + Result = pOD->DialogProcedure(msg, wParam, lParam); + // SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, Result); + + if (msg == WM_NCDESTROY) + { + delete pOD; + Result = FALSE; + } + + return Result; +} + + +SmileyToolWindowType::SmileyToolWindowType(HWND hWnd) +{ + m_hwndDialog = hWnd; + rowSel = -1; + m_AniPack = NULL; + + m_NumberOfVerticalButtons = 0; + m_NumberOfHorizontalButtons = 0; + m_BitmapWidth.cx = 0; + m_BitmapWidth.cy = 0; + m_ButtonSize.cx = 0; + m_ButtonSize.cy = 0; + m_ButtonSpace = 1; + m_NumberOfButtons = 0; +} + + +LRESULT SmileyToolWindowType::DialogProcedure(UINT msg, WPARAM wParam, LPARAM lParam) +{ + LRESULT Result = FALSE; + + switch (msg) + { + case WM_ACTIVATE: + if (wParam == WA_INACTIVE) + DestroyWindow(m_hwndDialog); + break; + + case WM_PAINT: + PaintWindow(); + break; + + case WM_TIMER: + if (m_AniPack) m_AniPack->ProcessTimerTick(m_hwndDialog); + break; + + case WM_DESTROY: + KillTimer(m_hwndDialog, 1); + if (m_AniPack) delete m_AniPack; + m_AniPack = NULL; + DestroyWindow(m_hToolTip); + PostQuitMessage(0); + if (m_Choosing) + SetFocus(m_hWndTarget); + break; + + case WM_KEYUP: + KeyUp(wParam, lParam); + break; + + case WM_CREATE: + InitDialog(lParam); + break; + + case WM_VSCROLL: + ScrollV(LOWORD(wParam)); + break; + + case WM_MOUSEMOVE: + MouseMove(LOWORD(lParam), HIWORD(lParam)); + break; + + case WM_LBUTTONUP: + InsertSmiley(); + break; + + case WM_MOUSEWHEEL: + ScrollV(SB_MYMOVE, ((short)HIWORD(wParam))/-120); + MouseMove(LOWORD(lParam), HIWORD(lParam)); + break; + + default: + Result = DefWindowProc(m_hwndDialog, msg, wParam, lParam); + break; + } + + return Result; +} + +struct smlsrvstruct +{ + smlsrvstruct(SmileyType *tsml, HANDLE thContact) + : sml(tsml), hContact(thContact) {} + SmileyType *sml; + HANDLE hContact; +}; + +void CALLBACK smileyServiceCallback(void* arg) +{ + smlsrvstruct* p = (smlsrvstruct*)arg; + p->sml->CallSmileyService(p->hContact); + delete p; +} + +void SmileyToolWindowType::InsertSmiley(void) +{ + if (m_CurrentHotTrack >= 0 && m_hWndTarget != NULL) + { + SmileyType *sml = m_pSmileyPack->GetSmiley(m_CurrentHotTrack); + + if (sml->IsService()) + { + smlsrvstruct* p = new smlsrvstruct(sml, m_hContact); + CallFunctionAsync(smileyServiceCallback, p); + } + else + { + bkstring insertText; + + if (opt.SurroundSmileyWithSpaces) insertText = ' '; + insertText += sml->GetInsertText(); + if (opt.SurroundSmileyWithSpaces) insertText += ' '; + + SendMessage(m_hWndTarget, m_TargetMessage, m_TargetWParam, (LPARAM) insertText.c_str()); + } + m_Choosing = true; + DestroyWindow(m_hwndDialog); + } + else if (m_hWndTarget == NULL) + DestroyWindow(m_hwndDialog); +} + +void SmileyToolWindowType::SmileySel(int but) +{ + if (but != m_CurrentHotTrack) + { + SCROLLINFO si; + si.cbSize = sizeof (si); + si.fMask = SIF_POS; + si.nPos = 0; + GetScrollInfo (m_hwndDialog, SB_VERT, &si); + + HDC hdc = GetDC(m_hwndDialog); + if (m_CurrentHotTrack >= 0) + { + RECT rect = CalculateButtonToCoordinates(m_CurrentHotTrack, si.nPos); + DrawFocusRect(hdc, &rect); + m_CurrentHotTrack = -1; + SendMessage(m_hToolTip, TTM_ACTIVATE, FALSE, 0); + } + m_CurrentHotTrack = but; + if (m_CurrentHotTrack >= 0) + { + TOOLINFO ti = {0}; + ti.cbSize = sizeof(ti); + ti.uFlags = TTF_IDISHWND | TTF_SUBCLASS; + ti.hwnd = m_hwndDialog; + ti.uId = (UINT_PTR)m_hwndDialog; + + const bkstring& toolText = m_pSmileyPack->GetSmiley(m_CurrentHotTrack)->GetToolText(); + ti.lpszText = const_cast(toolText.c_str()); + SendMessage(m_hToolTip, TTM_UPDATETIPTEXT, 0, (LPARAM)&ti); + SendMessage(m_hToolTip, TTM_ACTIVATE, TRUE, 0); + + RECT rect = CalculateButtonToCoordinates(m_CurrentHotTrack, si.nPos); + DrawFocusRect(hdc, &rect); + if (m_AniPack) m_AniPack->SetSel(rect); + } + ReleaseDC(m_hwndDialog, hdc); + } +} + + +void SmileyToolWindowType::ScrollV(int action, int dist) +{ + SCROLLINFO si; + si.cbSize = sizeof (si); + si.fMask = SIF_ALL; + GetScrollInfo (m_hwndDialog, SB_VERT, &si); + + // Save the position for comparison later on + int yPos = si.nPos; + switch (action) + { + // user clicked the HOME keyboard key + case SB_TOP: + si.nPos = si.nMin; + break; + + // user clicked the END keyboard key + case SB_BOTTOM: + si.nPos = si.nMax; + break; + + // user clicked the top arrow + case SB_LINEUP: + si.nPos -= 1; + break; + + // user clicked the bottom arrow + case SB_LINEDOWN: + si.nPos += 1; + break; + + // user clicked the scroll bar shaft above the scroll box + case SB_PAGEUP: + si.nPos -= si.nPage; + break; + + // user clicked the scroll bar shaft below the scroll box + case SB_PAGEDOWN: + si.nPos += si.nPage; + break; + + // user dragged the scroll box + case SB_THUMBTRACK: + si.nPos = si.nTrackPos; + break; + + // user dragged the scroll box + case SB_MYMOVE: + si.nPos += dist; + break; + } + // Set the position and then retrieve it. Due to adjustments + // by Windows it may not be the same as the value set. + si.fMask = SIF_POS; + SetScrollInfo (m_hwndDialog, SB_VERT, &si, TRUE); + GetScrollInfo (m_hwndDialog, SB_VERT, &si); + // If the position has changed, scroll window and update it + if (si.nPos != yPos) + { + if (m_AniPack) m_AniPack->SetOffset(si.nPos*GetRowSize()); + + ScrollWindowEx(m_hwndDialog, 0, (yPos - si.nPos) * GetRowSize(), + NULL, NULL, NULL, NULL, SW_INVALIDATE); + + UpdateWindow (m_hwndDialog); + } +} + + +void SmileyToolWindowType::MouseMove(int xposition, int yposition) +{ + if (m_CurrentHotTrack == -2) return; //prevent focussing when not drawn yet! + // SetFocus(m_hwndDialog); + + + SCROLLINFO si; + si.cbSize = sizeof (si); + si.fMask = SIF_POS; + si.nPos = 0; + GetScrollInfo (m_hwndDialog, SB_VERT, &si); + + POINT pt = { xposition, yposition }; + int but = CalculateCoordinatesToButton(pt, si.nPos); + SmileySel(but); +} + + + +void SmileyToolWindowType::KeyUp(WPARAM wParam, LPARAM lParam) +{ + int colSel = -1, numKey = -1; + int but = m_CurrentHotTrack; + + switch(wParam) + { + case VK_END: + but = m_NumberOfButtons-1; + break; + + case VK_HOME: + but = 0; + break; + + case VK_LEFT: + but -= (opt.IEViewStyle ? 1 : m_NumberOfVerticalButtons) * LOWORD(lParam); + break; + + case VK_UP: + but -= (opt.IEViewStyle ? m_NumberOfHorizontalButtons : 1) * LOWORD(lParam); + break; + + case VK_RIGHT: + but += (opt.IEViewStyle ? 1 : m_NumberOfVerticalButtons) * LOWORD(lParam); + break; + + case VK_DOWN: + but += (opt.IEViewStyle ? m_NumberOfHorizontalButtons : 1) * LOWORD(lParam); + break; + + case VK_SPACE: + case VK_RETURN: + if (but != -1) InsertSmiley(); + return; + + case VK_ESCAPE: + DestroyWindow(m_hwndDialog); + return; + + case VK_NUMPAD1: + case VK_NUMPAD2: + case VK_NUMPAD3: + case VK_NUMPAD4: + case VK_NUMPAD5: + case VK_NUMPAD6: + case VK_NUMPAD7: + case VK_NUMPAD8: + case VK_NUMPAD9: + if ((GetKeyState(VK_NUMLOCK) & 1) != 0) + numKey = (int)wParam - VK_NUMPAD1; + else + { + rowSel = -1; + return; + } + break; + + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + numKey = (int)wParam - '1'; + break; + + default: + rowSel = -1; + return; + } + + if (numKey != -1) + { + if (rowSel == -1) + { + rowSel = numKey; + but = (opt.IEViewStyle ? m_NumberOfHorizontalButtons : 1) * rowSel; + } + else + { + colSel = numKey; + if (opt.IEViewStyle) + but = colSel + m_NumberOfHorizontalButtons * rowSel; + else + but = rowSel + m_NumberOfVerticalButtons * colSel; + } + } + + if (but < 0) but = 0; + if (but >= (int)m_NumberOfButtons) but = m_NumberOfButtons-1; + + SmileySel(but); + if (colSel != -1) InsertSmiley(); +} + + +void SmileyToolWindowType::InitDialog(LPARAM lParam) +{ + LPCREATESTRUCT createStruct = (LPCREATESTRUCT)lParam; + SmileyToolWindowParam* stwp = (SmileyToolWindowParam*) createStruct->lpCreateParams; + + m_pSmileyPack = stwp->pSmileyPack; + m_XPosition = stwp->xPosition; + m_YPosition = stwp->yPosition; + m_hWndTarget = stwp->hWndTarget; + m_TargetMessage = stwp->targetMessage; + m_TargetWParam = stwp->targetWParam; + m_Direction = stwp->direction; + m_hContact = stwp->hContact; + + m_CurrentHotTrack = -2; + m_Choosing = false; + + CreateSmileyWinDim(); + + int width = m_BitmapWidth.cx; + int height = m_BitmapWidth.cy; + + const int colsz = GetRowSize(); + const int heightn = m_WindowSizeY; + + SCROLLINFO si; + + si.cbSize = sizeof(si); + si.fMask = SIF_RANGE | SIF_PAGE | SIF_POS; + si.nMin = 0; + si.nMax = height / colsz - 1; + si.nPage = heightn / colsz; + si.nPos = 0; + SetScrollInfo(m_hwndDialog, SB_VERT, &si, TRUE); + + if (GetWindowLongPtr(m_hwndDialog, GWL_STYLE) & WS_VSCROLL) + width += GetSystemMetrics(SM_CXVSCROLL); + + RECT rc = { 0, 0, width, heightn }; + AdjustWindowRectEx(&rc, GetWindowLongPtr(m_hwndDialog, GWL_STYLE), + FALSE, GetWindowLongPtr(m_hwndDialog, GWL_EXSTYLE)); + + width = rc.right - rc.left; + height = rc.bottom - rc.top; + + switch (m_Direction) + { + case 1: + m_XPosition-=width; + break; + case 2: + m_XPosition-=width; + m_YPosition-=height; + break; + case 3: + m_YPosition-=height; + break; + } + + // Get screen dimentions + int xoScreen = GetSystemMetrics(SM_XVIRTUALSCREEN); + int yoScreen = GetSystemMetrics(SM_YVIRTUALSCREEN); + + int xScreen = GetSystemMetrics(SM_CXVIRTUALSCREEN); + int yScreen = GetSystemMetrics(SM_CYVIRTUALSCREEN); + + if (xScreen == 0) xScreen = GetSystemMetrics(SM_CXSCREEN); + if (yScreen == 0) yScreen = GetSystemMetrics(SM_CYSCREEN); + + xScreen += xoScreen; + yScreen += yoScreen; + + // Prevent window from opening off-screen + if (m_YPosition + height > yScreen) m_YPosition = yScreen - height; + if (m_XPosition + width > xScreen) m_XPosition = xScreen - width; + if (m_YPosition < yoScreen) m_YPosition = yoScreen; + if (m_XPosition < xoScreen) m_XPosition = xoScreen; + + // Move window to desired location + SetWindowPos(m_hwndDialog, NULL, m_XPosition, m_YPosition, + width, height, SWP_NOZORDER); + + m_AniPack = new AnimatedPack(m_hwndDialog, height, m_ButtonSize, opt.SelWndBkgClr); + + SmileyPackType::SmileyVectorType &sml = m_pSmileyPack->GetSmileyList(); + for (unsigned i=0; iAdd(&sml[i], CalculateButtonToCoordinates(i, 0), opt.IEViewStyle); + } + } + m_AniPack->SetOffset(0); + + if (opt.AnimateSel) SetTimer(m_hwndDialog, 1, 100, NULL); + + //add tooltips + m_hToolTip = CreateWindowEx(WS_EX_TOPMOST, TOOLTIPS_CLASS, _T(""), + TTS_NOPREFIX | WS_POPUP, 0, 0, 0, 0, m_hwndDialog, NULL, g_hInst, NULL); + TOOLINFO ti = {0}; + ti.cbSize = sizeof(ti); + ti.uFlags = TTF_IDISHWND | TTF_SUBCLASS; + ti.hwnd = m_hwndDialog; + ti.uId = (UINT_PTR)m_hwndDialog; + ti.lpszText = TranslateT("d'Oh!"); + SendMessage(m_hToolTip, TTM_ADDTOOL, 0, (LPARAM)&ti); +} + + +void SmileyToolWindowType::PaintWindow(void) +{ + SCROLLINFO si; + si.cbSize = sizeof(si); + si.fMask = SIF_POS; + si.nPos = 0; + GetScrollInfo(m_hwndDialog, SB_VERT, &si); + + PAINTSTRUCT ps; + HDC hdc = BeginPaint(m_hwndDialog, &ps); + + HBITMAP hBmp = CreateCompatibleBitmap(hdc, m_BitmapWidth.cx, m_BitmapWidth.cy); + HDC hdcMem = CreateCompatibleDC(hdc); + HANDLE hOld = SelectObject(hdcMem, hBmp); + + CreateSmileyBitmap(hdcMem); + + if (m_AniPack) m_AniPack->Draw(hdcMem); + + BitBlt(hdc, 0, 0, m_BitmapWidth.cx, m_WindowSizeY, hdcMem, 0, 0, SRCCOPY); + + SelectObject(hdcMem, hOld); + DeleteObject(hBmp); + DeleteDC(hdcMem); + + if (m_CurrentHotTrack == -2) m_CurrentHotTrack = -1; + + EndPaint(m_hwndDialog, &ps); +} + + +void SmileyToolWindowType::CreateSmileyWinDim(void) +{ + m_NumberOfButtons = m_pSmileyPack->VisibleSmileyCount(); + + if (m_NumberOfButtons == 0) return; + + // Find largest smiley + if (m_pSmileyPack->selec.x == 0 || m_pSmileyPack->selec.y == 0) + { + if (opt.ScaleAllSmileys) + { + m_pSmileyPack->GetSmiley(0)->GetSize(m_ButtonSize); + ++m_ButtonSize.cx; ++m_ButtonSize.cy; + } + else + { + m_ButtonSize.cx = 0; + m_ButtonSize.cy = 0; + SmileyPackType::SmileyVectorType &sml = m_pSmileyPack->GetSmileyList(); + for (unsigned i=0; iselec; + } + + if (m_pSmileyPack->win.x == 0 || m_pSmileyPack->win.y == 0) + { + if (opt.IEViewStyle) + { + // All integer square root + unsigned i; + for (i=1; i*iwin.x; + m_NumberOfVerticalButtons = m_NumberOfButtons / m_NumberOfHorizontalButtons + + (m_NumberOfButtons % m_NumberOfHorizontalButtons != 0); + } + + m_BitmapWidth.cx = m_NumberOfHorizontalButtons * (m_ButtonSize.cx + m_ButtonSpace) + m_ButtonSpace; + m_BitmapWidth.cy = m_NumberOfVerticalButtons * (m_ButtonSize.cy + m_ButtonSpace) + m_ButtonSpace; + + const int colsz = m_ButtonSize.cy + m_ButtonSpace; + int wndsz = min((int)m_BitmapWidth.cy, GetSystemMetrics(SM_CYSCREEN) / 2); + if (opt.IEViewStyle) wndsz = min(wndsz, 250); + + if (m_pSmileyPack->win.x != 0 && m_pSmileyPack->win.y != 0) + wndsz = min(wndsz, m_pSmileyPack->win.y * (m_ButtonSize.cy + (int)m_ButtonSpace) + (int)m_ButtonSpace); + + m_WindowSizeY = wndsz - (wndsz % colsz) + m_ButtonSpace; +} + + +void SmileyToolWindowType::CreateSmileyBitmap(HDC hdc) +{ + const RECT rc = { 0, 0, m_BitmapWidth.cx, m_WindowSizeY }; + + SetBkColor(hdc, opt.SelWndBkgClr); + const HBRUSH hBkgBrush = CreateSolidBrush(opt.SelWndBkgClr); + FillRect(hdc, &rc, hBkgBrush); + DeleteObject(hBkgBrush); + + if (opt.IEViewStyle) + { + HPEN hpen = CreatePen(PS_DOT, 1, 0); + HGDIOBJ hOldPen = SelectObject(hdc, hpen); + + POINT pts[2] = { {0, 0}, {m_BitmapWidth.cx, 0} }; + + for (unsigned i=0; i<=m_NumberOfVerticalButtons; i++) + { + pts[0].y = pts[1].y = i * (m_ButtonSize.cy + m_ButtonSpace); + if (pts[0].y > m_WindowSizeY) break; + Polyline(hdc, pts, 2); + } + + pts[0].y = 0; pts[1].y = m_BitmapWidth.cy; + for (unsigned j=0; j<=m_NumberOfHorizontalButtons; j++) + { + pts[0].x = pts[1].x = j * (m_ButtonSize.cx + m_ButtonSpace); + Polyline(hdc, pts, 2); + } + + SelectObject(hdc, hOldPen); + DeleteObject(hpen); + } +} + + +RECT SmileyToolWindowType::CalculateButtonToCoordinates(int buttonPosition, int scroll) +{ + int row, rowpos; + + if (opt.IEViewStyle) + { + row = buttonPosition / m_NumberOfHorizontalButtons; + rowpos = buttonPosition % m_NumberOfHorizontalButtons; + } + else + { + row = buttonPosition % m_NumberOfVerticalButtons; + rowpos = buttonPosition / m_NumberOfVerticalButtons; + } + + RECT pt; + pt.left = rowpos * (m_ButtonSize.cx + m_ButtonSpace) + m_ButtonSpace; + pt.top = (row - scroll) * (m_ButtonSize.cy + m_ButtonSpace) + m_ButtonSpace; + pt.right = pt.left + m_ButtonSize.cx; + pt.bottom = pt.top + m_ButtonSize.cy; + + return pt; +} + + +int SmileyToolWindowType::CalculateCoordinatesToButton(POINT pt, int scroll) +{ + const int rowpos = (pt.x - m_ButtonSpace) / (m_ButtonSize.cx + m_ButtonSpace); + const int row = (pt.y - m_ButtonSpace) / (m_ButtonSize.cy + m_ButtonSpace) + scroll; + + int pos; + if (opt.IEViewStyle) + pos = m_NumberOfHorizontalButtons * row + rowpos; + else + pos = m_NumberOfVerticalButtons * rowpos + row; + + if (pos >= (int)m_NumberOfButtons) pos = -1; + + return pos; +} + +void __cdecl SmileyToolThread(void *arg) +{ + SmileyToolWindowParam* stwp = (SmileyToolWindowParam*)arg; + if (stwp->pSmileyPack && stwp->pSmileyPack->VisibleSmileyCount()) + { + WNDCLASSEX wndclass; + wndclass.cbSize = sizeof(wndclass); + wndclass.style = CS_SAVEBITS; + wndclass.lpfnWndProc = DlgProcSmileyToolWindow; + wndclass.cbClsExtra = 0; + wndclass.cbWndExtra = 4; + wndclass.hInstance = g_hInst; + wndclass.hIcon = NULL; + wndclass.hCursor = LoadCursor (NULL, IDC_ARROW); + wndclass.hbrBackground = CreateSolidBrush(opt.SelWndBkgClr); + wndclass.lpszMenuName = NULL; + wndclass.lpszClassName = _T("SmileyTool"); + wndclass.hIconSm = NULL; + RegisterClassEx(&wndclass); + + CreateWindowEx(WS_EX_TOPMOST | WS_EX_NOPARENTNOTIFY, _T("SmileyTool"), NULL, + WS_BORDER | WS_POPUP | WS_VISIBLE, + CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, + ((SmileyToolWindowParam*)arg)->hWndParent, NULL, g_hInst, arg); + + SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_BELOW_NORMAL); + + MSG msg; + while (GetMessage(&msg, NULL, 0, 0)) + { + TranslateMessage(&msg); + DispatchMessage(&msg); + } + UnregisterClass(_T("SmileyTool"), g_hInst); + } + delete stwp; +} diff --git a/plugins/SmileyAdd/src/smltool.h b/plugins/SmileyAdd/src/smltool.h new file mode 100644 index 0000000000..89fb786862 --- /dev/null +++ b/plugins/SmileyAdd/src/smltool.h @@ -0,0 +1,45 @@ +/* +Miranda SmileyAdd Plugin +Copyright (C) 2005 - 2011 Boris Krasnovskiy +Copyright (C) 2003 - 2004 Rein-Peter de Boer + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation version 2 +of the License. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef SMILEYADD_SMLTOOL_H_ +#define SMILEYADD_SMLTOOL_H_ + +class SmileyPackType; + +struct SmileyToolWindowParam +{ + SmileyPackType* pSmileyPack; + int xPosition; + int yPosition; + int direction; + HWND hWndTarget; + HWND hWndParent; + UINT targetMessage; + WPARAM targetWParam; + HANDLE hContact; +}; + + +void __cdecl SmileyToolThread(void *arg); + +#ifndef min +#define min(A, B) ((A) < (B) ? (A) : (B)) +#endif + +#endif // SMILEYADD_SMLTOOL_H_ diff --git a/plugins/SmileyAdd/src/version.h b/plugins/SmileyAdd/src/version.h new file mode 100644 index 0000000000..104839a3a2 --- /dev/null +++ b/plugins/SmileyAdd/src/version.h @@ -0,0 +1,3 @@ +#define __FILEVERSION_STRING 0,2,3,17 +#define __VERSION_STRING "0.2.3.17" +#define __VERSION_DWORD PLUGIN_MAKE_VERSION(0, 2, 3, 17) diff --git a/plugins/SmileyAdd/version.h b/plugins/SmileyAdd/version.h deleted file mode 100644 index 104839a3a2..0000000000 --- a/plugins/SmileyAdd/version.h +++ /dev/null @@ -1,3 +0,0 @@ -#define __FILEVERSION_STRING 0,2,3,17 -#define __VERSION_STRING "0.2.3.17" -#define __VERSION_DWORD PLUGIN_MAKE_VERSION(0, 2, 3, 17) diff --git a/plugins/SpellChecker/Docs/spellchecker-translation.txt b/plugins/SpellChecker/Docs/spellchecker-translation.txt new file mode 100644 index 0000000000..cfd53dd935 --- /dev/null +++ b/plugins/SpellChecker/Docs/spellchecker-translation.txt @@ -0,0 +1,71 @@ +; Common strings that belong to many files +;[Spell Checker] + +; ../../plugins/SpellChecker/ardialog.cpp +;[The correction can't be empty!] +;[The correction can't be equal to the wrong word!] +;[The wrong word can't be empty!] +;[Wrong Correction] + +; ../../plugins/SpellChecker/options.cpp +;[Auto-replacements] +;[Correction] +;[Dash] +;[Dash dot] +;[Dash dot dot] +;[Dotted] +;[Line] +;[Message Sessions] +;[Thick] +;[Wave] +;[Wrong word] + +; ../../plugins/SpellChecker/resource.rc +;[Add auto-replace word] +;[Add...] +;[Advanced] +;[Ask before sending a message with spelling errors] +;[Auto-replace words with dictionary suggestions] +;[Avoid removing underscores (slows down checking of long texts)] +;[Cancel] +;[Correction:] +;[Default language:] +;[Download more dictionaries] +;[Edit...] +;[Enable auto-replacements] +;[Ignore words in UPPER CASE] +;[Ignore words with numbers] +;[Language:] +;[No separators and all lowercase chars] +;[OK] +;[Remove] +;[Replacements] +;[Show all corrections in context menu (takes more time to show)] +;[Show corrections in submenu] +;[Show wrong word] +;[Underline type:] +;[Use dictionaries from other programs] +;[Use flags] +;[Use input language to select dictionary] +;[Use variables in correction] +;[Wrong word:] + +; ../../plugins/SpellChecker/spellchecker.cpp +;[Add to dictionary] +;[Always replace with] +;[Corrections] +;[Custom Dictionaries] +;[Dictionaries] +;[Disabled] +;[Enable spell checking] +;[Enable/disable spell checker] +;[Enabled] +;[Flags DLL] +;[Ignore all] +;[Language] +;[Other...] +;[There are %d spelling errors. Are you sure you want to send this message?] +;[Unknown Flag] +;[Wrong word: %s] +;[Wrong words] +;[Your message window does not support SpellChecker Plugin.\nIf you use SRMM, tabSRMM or Scriver, please update them to the latest version,\notherwise ask the author of your message window plugin to add support for Spell Checker.] diff --git a/plugins/SpellChecker/Flags-Angelika/Unknown.ico b/plugins/SpellChecker/Flags-Angelika/Unknown.ico deleted file mode 100644 index 11bfae597f..0000000000 Binary files a/plugins/SpellChecker/Flags-Angelika/Unknown.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags-Angelika/af_ZA.ico b/plugins/SpellChecker/Flags-Angelika/af_ZA.ico deleted file mode 100644 index 1031738ba5..0000000000 Binary files a/plugins/SpellChecker/Flags-Angelika/af_ZA.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags-Angelika/ar_AR.ico b/plugins/SpellChecker/Flags-Angelika/ar_AR.ico deleted file mode 100644 index 52e72a60a7..0000000000 Binary files a/plugins/SpellChecker/Flags-Angelika/ar_AR.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags-Angelika/az_AZ.ico b/plugins/SpellChecker/Flags-Angelika/az_AZ.ico deleted file mode 100644 index 444d85e2b3..0000000000 Binary files a/plugins/SpellChecker/Flags-Angelika/az_AZ.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags-Angelika/bg_BG.ico b/plugins/SpellChecker/Flags-Angelika/bg_BG.ico deleted file mode 100644 index 2bac2a3f55..0000000000 Binary files a/plugins/SpellChecker/Flags-Angelika/bg_BG.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags-Angelika/bn_IN.ico b/plugins/SpellChecker/Flags-Angelika/bn_IN.ico deleted file mode 100644 index 1ac90d703b..0000000000 Binary files a/plugins/SpellChecker/Flags-Angelika/bn_IN.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags-Angelika/ca_ES.ico b/plugins/SpellChecker/Flags-Angelika/ca_ES.ico deleted file mode 100644 index dd167237fd..0000000000 Binary files a/plugins/SpellChecker/Flags-Angelika/ca_ES.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags-Angelika/cs_CZ.ico b/plugins/SpellChecker/Flags-Angelika/cs_CZ.ico deleted file mode 100644 index de6f2e3328..0000000000 Binary files a/plugins/SpellChecker/Flags-Angelika/cs_CZ.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags-Angelika/csb_PO.ico b/plugins/SpellChecker/Flags-Angelika/csb_PO.ico deleted file mode 100644 index 5727503fb4..0000000000 Binary files a/plugins/SpellChecker/Flags-Angelika/csb_PO.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags-Angelika/cy_GB.ico b/plugins/SpellChecker/Flags-Angelika/cy_GB.ico deleted file mode 100644 index f0df97b38e..0000000000 Binary files a/plugins/SpellChecker/Flags-Angelika/cy_GB.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags-Angelika/da_DK.ico b/plugins/SpellChecker/Flags-Angelika/da_DK.ico deleted file mode 100644 index 321eb69dbb..0000000000 Binary files a/plugins/SpellChecker/Flags-Angelika/da_DK.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags-Angelika/de_AT.ico b/plugins/SpellChecker/Flags-Angelika/de_AT.ico deleted file mode 100644 index c603271c5b..0000000000 Binary files a/plugins/SpellChecker/Flags-Angelika/de_AT.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags-Angelika/de_CH.ico b/plugins/SpellChecker/Flags-Angelika/de_CH.ico deleted file mode 100644 index d6cf941425..0000000000 Binary files a/plugins/SpellChecker/Flags-Angelika/de_CH.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags-Angelika/de_DE.ico b/plugins/SpellChecker/Flags-Angelika/de_DE.ico deleted file mode 100644 index eb32452346..0000000000 Binary files a/plugins/SpellChecker/Flags-Angelika/de_DE.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags-Angelika/el_GR.ico b/plugins/SpellChecker/Flags-Angelika/el_GR.ico deleted file mode 100644 index 64e3b4b05d..0000000000 Binary files a/plugins/SpellChecker/Flags-Angelika/el_GR.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags-Angelika/em_ET.ico b/plugins/SpellChecker/Flags-Angelika/em_ET.ico deleted file mode 100644 index e836d74819..0000000000 Binary files a/plugins/SpellChecker/Flags-Angelika/em_ET.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags-Angelika/en_AU.ico b/plugins/SpellChecker/Flags-Angelika/en_AU.ico deleted file mode 100644 index 1580a68162..0000000000 Binary files a/plugins/SpellChecker/Flags-Angelika/en_AU.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags-Angelika/en_CA.ico b/plugins/SpellChecker/Flags-Angelika/en_CA.ico deleted file mode 100644 index 4e61a0bf91..0000000000 Binary files a/plugins/SpellChecker/Flags-Angelika/en_CA.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags-Angelika/en_GB.ico b/plugins/SpellChecker/Flags-Angelika/en_GB.ico deleted file mode 100644 index 0a3461376b..0000000000 Binary files a/plugins/SpellChecker/Flags-Angelika/en_GB.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags-Angelika/en_NZ.ico b/plugins/SpellChecker/Flags-Angelika/en_NZ.ico deleted file mode 100644 index 10ed20ff61..0000000000 Binary files a/plugins/SpellChecker/Flags-Angelika/en_NZ.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags-Angelika/en_US.ico b/plugins/SpellChecker/Flags-Angelika/en_US.ico deleted file mode 100644 index 4274317e66..0000000000 Binary files a/plugins/SpellChecker/Flags-Angelika/en_US.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags-Angelika/en_ZA.ico b/plugins/SpellChecker/Flags-Angelika/en_ZA.ico deleted file mode 100644 index 1031738ba5..0000000000 Binary files a/plugins/SpellChecker/Flags-Angelika/en_ZA.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags-Angelika/es_ES.ico b/plugins/SpellChecker/Flags-Angelika/es_ES.ico deleted file mode 100644 index 3e1d263951..0000000000 Binary files a/plugins/SpellChecker/Flags-Angelika/es_ES.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags-Angelika/es_MX.ico b/plugins/SpellChecker/Flags-Angelika/es_MX.ico deleted file mode 100644 index f13b9a172a..0000000000 Binary files a/plugins/SpellChecker/Flags-Angelika/es_MX.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags-Angelika/et_EE.ico b/plugins/SpellChecker/Flags-Angelika/et_EE.ico deleted file mode 100644 index bb844d3fa1..0000000000 Binary files a/plugins/SpellChecker/Flags-Angelika/et_EE.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags-Angelika/fa_IR.ico b/plugins/SpellChecker/Flags-Angelika/fa_IR.ico deleted file mode 100644 index 22ad9ffc5c..0000000000 Binary files a/plugins/SpellChecker/Flags-Angelika/fa_IR.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags-Angelika/fi_FI.ico b/plugins/SpellChecker/Flags-Angelika/fi_FI.ico deleted file mode 100644 index c3a329928c..0000000000 Binary files a/plugins/SpellChecker/Flags-Angelika/fi_FI.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags-Angelika/fj_FJ.ico b/plugins/SpellChecker/Flags-Angelika/fj_FJ.ico deleted file mode 100644 index 93ccf587c0..0000000000 Binary files a/plugins/SpellChecker/Flags-Angelika/fj_FJ.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags-Angelika/fo_FO.ico b/plugins/SpellChecker/Flags-Angelika/fo_FO.ico deleted file mode 100644 index a5e0e766e3..0000000000 Binary files a/plugins/SpellChecker/Flags-Angelika/fo_FO.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags-Angelika/fr_BE.ico b/plugins/SpellChecker/Flags-Angelika/fr_BE.ico deleted file mode 100644 index 62d4fb61c6..0000000000 Binary files a/plugins/SpellChecker/Flags-Angelika/fr_BE.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags-Angelika/fr_FR.ico b/plugins/SpellChecker/Flags-Angelika/fr_FR.ico deleted file mode 100644 index 4010cf5f55..0000000000 Binary files a/plugins/SpellChecker/Flags-Angelika/fr_FR.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags-Angelika/ga_IE.ico b/plugins/SpellChecker/Flags-Angelika/ga_IE.ico deleted file mode 100644 index 18eac04b82..0000000000 Binary files a/plugins/SpellChecker/Flags-Angelika/ga_IE.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags-Angelika/gd_GB.ico b/plugins/SpellChecker/Flags-Angelika/gd_GB.ico deleted file mode 100644 index 9c1953a1c2..0000000000 Binary files a/plugins/SpellChecker/Flags-Angelika/gd_GB.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags-Angelika/gl_ES.ico b/plugins/SpellChecker/Flags-Angelika/gl_ES.ico deleted file mode 100644 index d40ef552fe..0000000000 Binary files a/plugins/SpellChecker/Flags-Angelika/gl_ES.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags-Angelika/he_IL.ico b/plugins/SpellChecker/Flags-Angelika/he_IL.ico deleted file mode 100644 index 5153d8779b..0000000000 Binary files a/plugins/SpellChecker/Flags-Angelika/he_IL.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags-Angelika/hi_IN.ico b/plugins/SpellChecker/Flags-Angelika/hi_IN.ico deleted file mode 100644 index 44d2239ada..0000000000 Binary files a/plugins/SpellChecker/Flags-Angelika/hi_IN.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags-Angelika/hr_Hr.ico b/plugins/SpellChecker/Flags-Angelika/hr_Hr.ico deleted file mode 100644 index ce46932656..0000000000 Binary files a/plugins/SpellChecker/Flags-Angelika/hr_Hr.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags-Angelika/hu_HU.ico b/plugins/SpellChecker/Flags-Angelika/hu_HU.ico deleted file mode 100644 index ce95ae6bc1..0000000000 Binary files a/plugins/SpellChecker/Flags-Angelika/hu_HU.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags-Angelika/id_ID.ico b/plugins/SpellChecker/Flags-Angelika/id_ID.ico deleted file mode 100644 index f454edcb71..0000000000 Binary files a/plugins/SpellChecker/Flags-Angelika/id_ID.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags-Angelika/is_IS.ico b/plugins/SpellChecker/Flags-Angelika/is_IS.ico deleted file mode 100644 index 6c4110eab2..0000000000 Binary files a/plugins/SpellChecker/Flags-Angelika/is_IS.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags-Angelika/it_IT.ico b/plugins/SpellChecker/Flags-Angelika/it_IT.ico deleted file mode 100644 index 850ce77ea1..0000000000 Binary files a/plugins/SpellChecker/Flags-Angelika/it_IT.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags-Angelika/km_KH.ico b/plugins/SpellChecker/Flags-Angelika/km_KH.ico deleted file mode 100644 index ae92b1a17d..0000000000 Binary files a/plugins/SpellChecker/Flags-Angelika/km_KH.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags-Angelika/ku_TR.ico b/plugins/SpellChecker/Flags-Angelika/ku_TR.ico deleted file mode 100644 index d6d9ab41f9..0000000000 Binary files a/plugins/SpellChecker/Flags-Angelika/ku_TR.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags-Angelika/lt_LT.ico b/plugins/SpellChecker/Flags-Angelika/lt_LT.ico deleted file mode 100644 index 4d4a6c6629..0000000000 Binary files a/plugins/SpellChecker/Flags-Angelika/lt_LT.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags-Angelika/lu_LU.ico b/plugins/SpellChecker/Flags-Angelika/lu_LU.ico deleted file mode 100644 index c701560f2d..0000000000 Binary files a/plugins/SpellChecker/Flags-Angelika/lu_LU.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags-Angelika/lv_LV.ico b/plugins/SpellChecker/Flags-Angelika/lv_LV.ico deleted file mode 100644 index ca51d2e88b..0000000000 Binary files a/plugins/SpellChecker/Flags-Angelika/lv_LV.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags-Angelika/mg_MG.ico b/plugins/SpellChecker/Flags-Angelika/mg_MG.ico deleted file mode 100644 index 2b334e6517..0000000000 Binary files a/plugins/SpellChecker/Flags-Angelika/mg_MG.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags-Angelika/mi_NZ.ico b/plugins/SpellChecker/Flags-Angelika/mi_NZ.ico deleted file mode 100644 index 10ed20ff61..0000000000 Binary files a/plugins/SpellChecker/Flags-Angelika/mi_NZ.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags-Angelika/mn_MN.ico b/plugins/SpellChecker/Flags-Angelika/mn_MN.ico deleted file mode 100644 index 6479314720..0000000000 Binary files a/plugins/SpellChecker/Flags-Angelika/mn_MN.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags-Angelika/mo_BF.ico b/plugins/SpellChecker/Flags-Angelika/mo_BF.ico deleted file mode 100644 index 49ce981336..0000000000 Binary files a/plugins/SpellChecker/Flags-Angelika/mo_BF.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags-Angelika/mr_IN.ico b/plugins/SpellChecker/Flags-Angelika/mr_IN.ico deleted file mode 100644 index 44d2239ada..0000000000 Binary files a/plugins/SpellChecker/Flags-Angelika/mr_IN.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags-Angelika/ms_MY.ico b/plugins/SpellChecker/Flags-Angelika/ms_MY.ico deleted file mode 100644 index a0a4be2a8c..0000000000 Binary files a/plugins/SpellChecker/Flags-Angelika/ms_MY.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags-Angelika/nb_NO.ico b/plugins/SpellChecker/Flags-Angelika/nb_NO.ico deleted file mode 100644 index 66ca4eac03..0000000000 Binary files a/plugins/SpellChecker/Flags-Angelika/nb_NO.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags-Angelika/ne_NP.ico b/plugins/SpellChecker/Flags-Angelika/ne_NP.ico deleted file mode 100644 index 21801370d7..0000000000 Binary files a/plugins/SpellChecker/Flags-Angelika/ne_NP.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags-Angelika/nl_NL.ico b/plugins/SpellChecker/Flags-Angelika/nl_NL.ico deleted file mode 100644 index f3280bbdf3..0000000000 Binary files a/plugins/SpellChecker/Flags-Angelika/nl_NL.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags-Angelika/nn_NO.ico b/plugins/SpellChecker/Flags-Angelika/nn_NO.ico deleted file mode 100644 index 66ca4eac03..0000000000 Binary files a/plugins/SpellChecker/Flags-Angelika/nn_NO.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags-Angelika/nr_ZA.ico b/plugins/SpellChecker/Flags-Angelika/nr_ZA.ico deleted file mode 100644 index 1031738ba5..0000000000 Binary files a/plugins/SpellChecker/Flags-Angelika/nr_ZA.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags-Angelika/ns_ZA.ico b/plugins/SpellChecker/Flags-Angelika/ns_ZA.ico deleted file mode 100644 index 1031738ba5..0000000000 Binary files a/plugins/SpellChecker/Flags-Angelika/ns_ZA.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags-Angelika/or_IN.ico b/plugins/SpellChecker/Flags-Angelika/or_IN.ico deleted file mode 100644 index 44d2239ada..0000000000 Binary files a/plugins/SpellChecker/Flags-Angelika/or_IN.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags-Angelika/pl_PL.ico b/plugins/SpellChecker/Flags-Angelika/pl_PL.ico deleted file mode 100644 index d85aa5b0b0..0000000000 Binary files a/plugins/SpellChecker/Flags-Angelika/pl_PL.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags-Angelika/pt_BR.ico b/plugins/SpellChecker/Flags-Angelika/pt_BR.ico deleted file mode 100644 index c7d93382db..0000000000 Binary files a/plugins/SpellChecker/Flags-Angelika/pt_BR.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags-Angelika/pt_PT.ico b/plugins/SpellChecker/Flags-Angelika/pt_PT.ico deleted file mode 100644 index af073daf2b..0000000000 Binary files a/plugins/SpellChecker/Flags-Angelika/pt_PT.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags-Angelika/qu_BO.ico b/plugins/SpellChecker/Flags-Angelika/qu_BO.ico deleted file mode 100644 index 663586e6f6..0000000000 Binary files a/plugins/SpellChecker/Flags-Angelika/qu_BO.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags-Angelika/ro_RO.ico b/plugins/SpellChecker/Flags-Angelika/ro_RO.ico deleted file mode 100644 index 9623b07eee..0000000000 Binary files a/plugins/SpellChecker/Flags-Angelika/ro_RO.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags-Angelika/ru_RU.ico b/plugins/SpellChecker/Flags-Angelika/ru_RU.ico deleted file mode 100644 index 60d08c198e..0000000000 Binary files a/plugins/SpellChecker/Flags-Angelika/ru_RU.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags-Angelika/rw_RW.ico b/plugins/SpellChecker/Flags-Angelika/rw_RW.ico deleted file mode 100644 index a424d1cc0a..0000000000 Binary files a/plugins/SpellChecker/Flags-Angelika/rw_RW.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags-Angelika/sk_SK.ico b/plugins/SpellChecker/Flags-Angelika/sk_SK.ico deleted file mode 100644 index 05e16ef646..0000000000 Binary files a/plugins/SpellChecker/Flags-Angelika/sk_SK.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags-Angelika/sl_SI.ico b/plugins/SpellChecker/Flags-Angelika/sl_SI.ico deleted file mode 100644 index c23a66e574..0000000000 Binary files a/plugins/SpellChecker/Flags-Angelika/sl_SI.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags-Angelika/ss_ZA.ico b/plugins/SpellChecker/Flags-Angelika/ss_ZA.ico deleted file mode 100644 index 1031738ba5..0000000000 Binary files a/plugins/SpellChecker/Flags-Angelika/ss_ZA.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags-Angelika/st_ZA.ico b/plugins/SpellChecker/Flags-Angelika/st_ZA.ico deleted file mode 100644 index 1031738ba5..0000000000 Binary files a/plugins/SpellChecker/Flags-Angelika/st_ZA.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags-Angelika/sv_SE.ico b/plugins/SpellChecker/Flags-Angelika/sv_SE.ico deleted file mode 100644 index c6e1964edb..0000000000 Binary files a/plugins/SpellChecker/Flags-Angelika/sv_SE.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags-Angelika/ta_IN.ico b/plugins/SpellChecker/Flags-Angelika/ta_IN.ico deleted file mode 100644 index 44d2239ada..0000000000 Binary files a/plugins/SpellChecker/Flags-Angelika/ta_IN.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags-Angelika/tet_ID.ico b/plugins/SpellChecker/Flags-Angelika/tet_ID.ico deleted file mode 100644 index f454edcb71..0000000000 Binary files a/plugins/SpellChecker/Flags-Angelika/tet_ID.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags-Angelika/tl_PH.ico b/plugins/SpellChecker/Flags-Angelika/tl_PH.ico deleted file mode 100644 index 30772bfa49..0000000000 Binary files a/plugins/SpellChecker/Flags-Angelika/tl_PH.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags-Angelika/tn_ZA.ico b/plugins/SpellChecker/Flags-Angelika/tn_ZA.ico deleted file mode 100644 index 1031738ba5..0000000000 Binary files a/plugins/SpellChecker/Flags-Angelika/tn_ZA.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags-Angelika/ts_ZA.ico b/plugins/SpellChecker/Flags-Angelika/ts_ZA.ico deleted file mode 100644 index 1031738ba5..0000000000 Binary files a/plugins/SpellChecker/Flags-Angelika/ts_ZA.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags-Angelika/uk_UA.ico b/plugins/SpellChecker/Flags-Angelika/uk_UA.ico deleted file mode 100644 index 765681033c..0000000000 Binary files a/plugins/SpellChecker/Flags-Angelika/uk_UA.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags-Angelika/uz_UZ.ico b/plugins/SpellChecker/Flags-Angelika/uz_UZ.ico deleted file mode 100644 index 573c4aee84..0000000000 Binary files a/plugins/SpellChecker/Flags-Angelika/uz_UZ.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags-Angelika/ve_ZA.ico b/plugins/SpellChecker/Flags-Angelika/ve_ZA.ico deleted file mode 100644 index 1031738ba5..0000000000 Binary files a/plugins/SpellChecker/Flags-Angelika/ve_ZA.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags-Angelika/vi_VI.ico b/plugins/SpellChecker/Flags-Angelika/vi_VI.ico deleted file mode 100644 index 999d0622fc..0000000000 Binary files a/plugins/SpellChecker/Flags-Angelika/vi_VI.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags-Angelika/xh_ZA.ico b/plugins/SpellChecker/Flags-Angelika/xh_ZA.ico deleted file mode 100644 index 1031738ba5..0000000000 Binary files a/plugins/SpellChecker/Flags-Angelika/xh_ZA.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags-Angelika/zu_ZA.ico b/plugins/SpellChecker/Flags-Angelika/zu_ZA.ico deleted file mode 100644 index 1031738ba5..0000000000 Binary files a/plugins/SpellChecker/Flags-Angelika/zu_ZA.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/ad.ico b/plugins/SpellChecker/Flags/ad.ico deleted file mode 100644 index 041939a95d..0000000000 Binary files a/plugins/SpellChecker/Flags/ad.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/ae.ico b/plugins/SpellChecker/Flags/ae.ico deleted file mode 100644 index dbf70eeccb..0000000000 Binary files a/plugins/SpellChecker/Flags/ae.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/af_ZA.ico b/plugins/SpellChecker/Flags/af_ZA.ico deleted file mode 100644 index 80019f3dfd..0000000000 Binary files a/plugins/SpellChecker/Flags/af_ZA.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/ag.ico b/plugins/SpellChecker/Flags/ag.ico deleted file mode 100644 index aa362f81dc..0000000000 Binary files a/plugins/SpellChecker/Flags/ag.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/ai.ico b/plugins/SpellChecker/Flags/ai.ico deleted file mode 100644 index a066e8d6f2..0000000000 Binary files a/plugins/SpellChecker/Flags/ai.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/al.ico b/plugins/SpellChecker/Flags/al.ico deleted file mode 100644 index 33c2aeee17..0000000000 Binary files a/plugins/SpellChecker/Flags/al.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/am.ico b/plugins/SpellChecker/Flags/am.ico deleted file mode 100644 index c9caba18d4..0000000000 Binary files a/plugins/SpellChecker/Flags/am.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/an.ico b/plugins/SpellChecker/Flags/an.ico deleted file mode 100644 index 865d4bb997..0000000000 Binary files a/plugins/SpellChecker/Flags/an.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/ao.ico b/plugins/SpellChecker/Flags/ao.ico deleted file mode 100644 index 12f6fc55d1..0000000000 Binary files a/plugins/SpellChecker/Flags/ao.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/ar.ico b/plugins/SpellChecker/Flags/ar.ico deleted file mode 100644 index c62bddfaae..0000000000 Binary files a/plugins/SpellChecker/Flags/ar.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/as.ico b/plugins/SpellChecker/Flags/as.ico deleted file mode 100644 index e721fcac5d..0000000000 Binary files a/plugins/SpellChecker/Flags/as.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/aw.ico b/plugins/SpellChecker/Flags/aw.ico deleted file mode 100644 index 6ffae09f21..0000000000 Binary files a/plugins/SpellChecker/Flags/aw.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/ax.ico b/plugins/SpellChecker/Flags/ax.ico deleted file mode 100644 index 201d72d95e..0000000000 Binary files a/plugins/SpellChecker/Flags/ax.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/az_AZ.ico b/plugins/SpellChecker/Flags/az_AZ.ico deleted file mode 100644 index 5a89d0a23d..0000000000 Binary files a/plugins/SpellChecker/Flags/az_AZ.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/ba.ico b/plugins/SpellChecker/Flags/ba.ico deleted file mode 100644 index c8e1c91686..0000000000 Binary files a/plugins/SpellChecker/Flags/ba.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/bb.ico b/plugins/SpellChecker/Flags/bb.ico deleted file mode 100644 index e726c725fd..0000000000 Binary files a/plugins/SpellChecker/Flags/bb.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/bg_BG.ico b/plugins/SpellChecker/Flags/bg_BG.ico deleted file mode 100644 index 64b732fbf2..0000000000 Binary files a/plugins/SpellChecker/Flags/bg_BG.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/bh.ico b/plugins/SpellChecker/Flags/bh.ico deleted file mode 100644 index c9e20c8ceb..0000000000 Binary files a/plugins/SpellChecker/Flags/bh.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/bi.ico b/plugins/SpellChecker/Flags/bi.ico deleted file mode 100644 index a383e617b1..0000000000 Binary files a/plugins/SpellChecker/Flags/bi.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/bj.ico b/plugins/SpellChecker/Flags/bj.ico deleted file mode 100644 index 25392dbec4..0000000000 Binary files a/plugins/SpellChecker/Flags/bj.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/bm.ico b/plugins/SpellChecker/Flags/bm.ico deleted file mode 100644 index 5eb9f7d8e2..0000000000 Binary files a/plugins/SpellChecker/Flags/bm.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/bn.ico b/plugins/SpellChecker/Flags/bn.ico deleted file mode 100644 index 42117c3ee6..0000000000 Binary files a/plugins/SpellChecker/Flags/bn.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/bn_IN.ico b/plugins/SpellChecker/Flags/bn_IN.ico deleted file mode 100644 index ed15c62073..0000000000 Binary files a/plugins/SpellChecker/Flags/bn_IN.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/bs.ico b/plugins/SpellChecker/Flags/bs.ico deleted file mode 100644 index e26f72af06..0000000000 Binary files a/plugins/SpellChecker/Flags/bs.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/bt.ico b/plugins/SpellChecker/Flags/bt.ico deleted file mode 100644 index a319583d07..0000000000 Binary files a/plugins/SpellChecker/Flags/bt.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/bv.ico b/plugins/SpellChecker/Flags/bv.ico deleted file mode 100644 index f0b648deba..0000000000 Binary files a/plugins/SpellChecker/Flags/bv.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/by.ico b/plugins/SpellChecker/Flags/by.ico deleted file mode 100644 index 5c90057d8e..0000000000 Binary files a/plugins/SpellChecker/Flags/by.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/bz.ico b/plugins/SpellChecker/Flags/bz.ico deleted file mode 100644 index 08a2217321..0000000000 Binary files a/plugins/SpellChecker/Flags/bz.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/cc.ico b/plugins/SpellChecker/Flags/cc.ico deleted file mode 100644 index f03d802d49..0000000000 Binary files a/plugins/SpellChecker/Flags/cc.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/cd.ico b/plugins/SpellChecker/Flags/cd.ico deleted file mode 100644 index 440f4eb4da..0000000000 Binary files a/plugins/SpellChecker/Flags/cd.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/cf.ico b/plugins/SpellChecker/Flags/cf.ico deleted file mode 100644 index 4b7d5f74f1..0000000000 Binary files a/plugins/SpellChecker/Flags/cf.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/cg.ico b/plugins/SpellChecker/Flags/cg.ico deleted file mode 100644 index 66f15bbda7..0000000000 Binary files a/plugins/SpellChecker/Flags/cg.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/ci.ico b/plugins/SpellChecker/Flags/ci.ico deleted file mode 100644 index 76fde54963..0000000000 Binary files a/plugins/SpellChecker/Flags/ci.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/ck.ico b/plugins/SpellChecker/Flags/ck.ico deleted file mode 100644 index 65851243f7..0000000000 Binary files a/plugins/SpellChecker/Flags/ck.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/cl.ico b/plugins/SpellChecker/Flags/cl.ico deleted file mode 100644 index fb695e480f..0000000000 Binary files a/plugins/SpellChecker/Flags/cl.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/cm.ico b/plugins/SpellChecker/Flags/cm.ico deleted file mode 100644 index cb79701891..0000000000 Binary files a/plugins/SpellChecker/Flags/cm.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/cn.ico b/plugins/SpellChecker/Flags/cn.ico deleted file mode 100644 index 0ceb0866f3..0000000000 Binary files a/plugins/SpellChecker/Flags/cn.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/co.ico b/plugins/SpellChecker/Flags/co.ico deleted file mode 100644 index 1cc69eac57..0000000000 Binary files a/plugins/SpellChecker/Flags/co.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/cr.ico b/plugins/SpellChecker/Flags/cr.ico deleted file mode 100644 index 193b961d34..0000000000 Binary files a/plugins/SpellChecker/Flags/cr.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/cs_CZ.ico b/plugins/SpellChecker/Flags/cs_CZ.ico deleted file mode 100644 index f0c14bc3e1..0000000000 Binary files a/plugins/SpellChecker/Flags/cs_CZ.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/cu.ico b/plugins/SpellChecker/Flags/cu.ico deleted file mode 100644 index 7f1ad5b202..0000000000 Binary files a/plugins/SpellChecker/Flags/cu.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/cv.ico b/plugins/SpellChecker/Flags/cv.ico deleted file mode 100644 index 349d4e9675..0000000000 Binary files a/plugins/SpellChecker/Flags/cv.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/cx.ico b/plugins/SpellChecker/Flags/cx.ico deleted file mode 100644 index 363cef2396..0000000000 Binary files a/plugins/SpellChecker/Flags/cx.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/cy.ico b/plugins/SpellChecker/Flags/cy.ico deleted file mode 100644 index 546f1a7697..0000000000 Binary files a/plugins/SpellChecker/Flags/cy.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/cy_GB.ico b/plugins/SpellChecker/Flags/cy_GB.ico deleted file mode 100644 index 021c4cbb7f..0000000000 Binary files a/plugins/SpellChecker/Flags/cy_GB.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/da_DK.ico b/plugins/SpellChecker/Flags/da_DK.ico deleted file mode 100644 index eebf7f90ec..0000000000 Binary files a/plugins/SpellChecker/Flags/da_DK.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/de_AT.ico b/plugins/SpellChecker/Flags/de_AT.ico deleted file mode 100644 index aa0ebc231c..0000000000 Binary files a/plugins/SpellChecker/Flags/de_AT.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/de_CH.ico b/plugins/SpellChecker/Flags/de_CH.ico deleted file mode 100644 index c272204278..0000000000 Binary files a/plugins/SpellChecker/Flags/de_CH.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/de_DE.ico b/plugins/SpellChecker/Flags/de_DE.ico deleted file mode 100644 index ed1ce66d22..0000000000 Binary files a/plugins/SpellChecker/Flags/de_DE.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/dj.ico b/plugins/SpellChecker/Flags/dj.ico deleted file mode 100644 index 146e62a083..0000000000 Binary files a/plugins/SpellChecker/Flags/dj.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/dm.ico b/plugins/SpellChecker/Flags/dm.ico deleted file mode 100644 index 585ad1dca7..0000000000 Binary files a/plugins/SpellChecker/Flags/dm.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/do.ico b/plugins/SpellChecker/Flags/do.ico deleted file mode 100644 index 0602e9f03b..0000000000 Binary files a/plugins/SpellChecker/Flags/do.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/dz.ico b/plugins/SpellChecker/Flags/dz.ico deleted file mode 100644 index 23fe39b5ec..0000000000 Binary files a/plugins/SpellChecker/Flags/dz.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/ec.ico b/plugins/SpellChecker/Flags/ec.ico deleted file mode 100644 index 93689ca917..0000000000 Binary files a/plugins/SpellChecker/Flags/ec.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/eg.ico b/plugins/SpellChecker/Flags/eg.ico deleted file mode 100644 index ce231de10f..0000000000 Binary files a/plugins/SpellChecker/Flags/eg.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/eh.ico b/plugins/SpellChecker/Flags/eh.ico deleted file mode 100644 index 1ac030fa6f..0000000000 Binary files a/plugins/SpellChecker/Flags/eh.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/el_GR.ico b/plugins/SpellChecker/Flags/el_GR.ico deleted file mode 100644 index b7d70e74c6..0000000000 Binary files a/plugins/SpellChecker/Flags/el_GR.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/em_ET.ico b/plugins/SpellChecker/Flags/em_ET.ico deleted file mode 100644 index aef5354dcb..0000000000 Binary files a/plugins/SpellChecker/Flags/em_ET.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/en_AU.ico b/plugins/SpellChecker/Flags/en_AU.ico deleted file mode 100644 index 4c042925aa..0000000000 Binary files a/plugins/SpellChecker/Flags/en_AU.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/en_CA.ico b/plugins/SpellChecker/Flags/en_CA.ico deleted file mode 100644 index ab30abbf43..0000000000 Binary files a/plugins/SpellChecker/Flags/en_CA.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/en_GB.ico b/plugins/SpellChecker/Flags/en_GB.ico deleted file mode 100644 index 14fcae20a7..0000000000 Binary files a/plugins/SpellChecker/Flags/en_GB.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/en_NZ.ico b/plugins/SpellChecker/Flags/en_NZ.ico deleted file mode 100644 index 9c4cac8f15..0000000000 Binary files a/plugins/SpellChecker/Flags/en_NZ.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/en_US.ico b/plugins/SpellChecker/Flags/en_US.ico deleted file mode 100644 index 793e92678e..0000000000 Binary files a/plugins/SpellChecker/Flags/en_US.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/en_ZA.ico b/plugins/SpellChecker/Flags/en_ZA.ico deleted file mode 100644 index a786459654..0000000000 Binary files a/plugins/SpellChecker/Flags/en_ZA.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/england.ico b/plugins/SpellChecker/Flags/england.ico deleted file mode 100644 index 94cd4a75a8..0000000000 Binary files a/plugins/SpellChecker/Flags/england.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/er.ico b/plugins/SpellChecker/Flags/er.ico deleted file mode 100644 index baff122729..0000000000 Binary files a/plugins/SpellChecker/Flags/er.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/es_ES.ico b/plugins/SpellChecker/Flags/es_ES.ico deleted file mode 100644 index 007ca2558b..0000000000 Binary files a/plugins/SpellChecker/Flags/es_ES.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/es_MX.ico b/plugins/SpellChecker/Flags/es_MX.ico deleted file mode 100644 index 086ed39da7..0000000000 Binary files a/plugins/SpellChecker/Flags/es_MX.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/et_EE.ico b/plugins/SpellChecker/Flags/et_EE.ico deleted file mode 100644 index 5e2a142d1d..0000000000 Binary files a/plugins/SpellChecker/Flags/et_EE.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/fa_IR.ico b/plugins/SpellChecker/Flags/fa_IR.ico deleted file mode 100644 index 35d952abb7..0000000000 Binary files a/plugins/SpellChecker/Flags/fa_IR.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/fi_FI.ico b/plugins/SpellChecker/Flags/fi_FI.ico deleted file mode 100644 index f333f5a92c..0000000000 Binary files a/plugins/SpellChecker/Flags/fi_FI.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/fj_FJ.ico b/plugins/SpellChecker/Flags/fj_FJ.ico deleted file mode 100644 index 8f1b309652..0000000000 Binary files a/plugins/SpellChecker/Flags/fj_FJ.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/fk.ico b/plugins/SpellChecker/Flags/fk.ico deleted file mode 100644 index bbb36896a8..0000000000 Binary files a/plugins/SpellChecker/Flags/fk.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/fm.ico b/plugins/SpellChecker/Flags/fm.ico deleted file mode 100644 index d9f5cd1fe8..0000000000 Binary files a/plugins/SpellChecker/Flags/fm.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/fo_FO.ico b/plugins/SpellChecker/Flags/fo_FO.ico deleted file mode 100644 index dc4835e413..0000000000 Binary files a/plugins/SpellChecker/Flags/fo_FO.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/fr_BE.ico b/plugins/SpellChecker/Flags/fr_BE.ico deleted file mode 100644 index e5d92e1753..0000000000 Binary files a/plugins/SpellChecker/Flags/fr_BE.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/fr_FR.ico b/plugins/SpellChecker/Flags/fr_FR.ico deleted file mode 100644 index 503ab0040c..0000000000 Binary files a/plugins/SpellChecker/Flags/fr_FR.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/ga.ico b/plugins/SpellChecker/Flags/ga.ico deleted file mode 100644 index 46ba42d82e..0000000000 Binary files a/plugins/SpellChecker/Flags/ga.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/ga_IE.ico b/plugins/SpellChecker/Flags/ga_IE.ico deleted file mode 100644 index 6cd8a7d7a6..0000000000 Binary files a/plugins/SpellChecker/Flags/ga_IE.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/gd.ico b/plugins/SpellChecker/Flags/gd.ico deleted file mode 100644 index 72bd001826..0000000000 Binary files a/plugins/SpellChecker/Flags/gd.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/gd_GB.ico b/plugins/SpellChecker/Flags/gd_GB.ico deleted file mode 100644 index f29d98cc06..0000000000 Binary files a/plugins/SpellChecker/Flags/gd_GB.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/ge.ico b/plugins/SpellChecker/Flags/ge.ico deleted file mode 100644 index 7d6897c9fc..0000000000 Binary files a/plugins/SpellChecker/Flags/ge.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/gi.ico b/plugins/SpellChecker/Flags/gi.ico deleted file mode 100644 index b4455ec2e6..0000000000 Binary files a/plugins/SpellChecker/Flags/gi.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/gl.ico b/plugins/SpellChecker/Flags/gl.ico deleted file mode 100644 index e60f0d69f6..0000000000 Binary files a/plugins/SpellChecker/Flags/gl.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/gm.ico b/plugins/SpellChecker/Flags/gm.ico deleted file mode 100644 index 355587c4ca..0000000000 Binary files a/plugins/SpellChecker/Flags/gm.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/gn.ico b/plugins/SpellChecker/Flags/gn.ico deleted file mode 100644 index 2af4a63e46..0000000000 Binary files a/plugins/SpellChecker/Flags/gn.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/gp.ico b/plugins/SpellChecker/Flags/gp.ico deleted file mode 100644 index 25ed546c2f..0000000000 Binary files a/plugins/SpellChecker/Flags/gp.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/gq.ico b/plugins/SpellChecker/Flags/gq.ico deleted file mode 100644 index 1ee063a8fd..0000000000 Binary files a/plugins/SpellChecker/Flags/gq.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/gs.ico b/plugins/SpellChecker/Flags/gs.ico deleted file mode 100644 index 15ec1b2bf5..0000000000 Binary files a/plugins/SpellChecker/Flags/gs.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/gt.ico b/plugins/SpellChecker/Flags/gt.ico deleted file mode 100644 index 64530c8ccd..0000000000 Binary files a/plugins/SpellChecker/Flags/gt.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/gu.ico b/plugins/SpellChecker/Flags/gu.ico deleted file mode 100644 index 2b235cf8f9..0000000000 Binary files a/plugins/SpellChecker/Flags/gu.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/gw.ico b/plugins/SpellChecker/Flags/gw.ico deleted file mode 100644 index ffb060551c..0000000000 Binary files a/plugins/SpellChecker/Flags/gw.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/gy.ico b/plugins/SpellChecker/Flags/gy.ico deleted file mode 100644 index a20415d615..0000000000 Binary files a/plugins/SpellChecker/Flags/gy.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/he_IL.ico b/plugins/SpellChecker/Flags/he_IL.ico deleted file mode 100644 index fdd3ea10bc..0000000000 Binary files a/plugins/SpellChecker/Flags/he_IL.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/hi_IN.ico b/plugins/SpellChecker/Flags/hi_IN.ico deleted file mode 100644 index b1a927d872..0000000000 Binary files a/plugins/SpellChecker/Flags/hi_IN.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/hk.ico b/plugins/SpellChecker/Flags/hk.ico deleted file mode 100644 index ad16f068e9..0000000000 Binary files a/plugins/SpellChecker/Flags/hk.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/hn.ico b/plugins/SpellChecker/Flags/hn.ico deleted file mode 100644 index 12e2ab08b7..0000000000 Binary files a/plugins/SpellChecker/Flags/hn.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/hr_HR.ico b/plugins/SpellChecker/Flags/hr_HR.ico deleted file mode 100644 index c6efff9bb0..0000000000 Binary files a/plugins/SpellChecker/Flags/hr_HR.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/ht.ico b/plugins/SpellChecker/Flags/ht.ico deleted file mode 100644 index 51fb8a6b40..0000000000 Binary files a/plugins/SpellChecker/Flags/ht.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/hu_HU.ico b/plugins/SpellChecker/Flags/hu_HU.ico deleted file mode 100644 index 73ddd2df6a..0000000000 Binary files a/plugins/SpellChecker/Flags/hu_HU.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/id_ID.ico b/plugins/SpellChecker/Flags/id_ID.ico deleted file mode 100644 index 9432e87f95..0000000000 Binary files a/plugins/SpellChecker/Flags/id_ID.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/io.ico b/plugins/SpellChecker/Flags/io.ico deleted file mode 100644 index a2eaba74e3..0000000000 Binary files a/plugins/SpellChecker/Flags/io.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/iq.ico b/plugins/SpellChecker/Flags/iq.ico deleted file mode 100644 index 8501e2588a..0000000000 Binary files a/plugins/SpellChecker/Flags/iq.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/is_IS.ico b/plugins/SpellChecker/Flags/is_IS.ico deleted file mode 100644 index 6dbbcef47f..0000000000 Binary files a/plugins/SpellChecker/Flags/is_IS.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/it_IT.ico b/plugins/SpellChecker/Flags/it_IT.ico deleted file mode 100644 index 11d08ed51f..0000000000 Binary files a/plugins/SpellChecker/Flags/it_IT.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/jm.ico b/plugins/SpellChecker/Flags/jm.ico deleted file mode 100644 index c4d76a5778..0000000000 Binary files a/plugins/SpellChecker/Flags/jm.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/jo.ico b/plugins/SpellChecker/Flags/jo.ico deleted file mode 100644 index a80478f787..0000000000 Binary files a/plugins/SpellChecker/Flags/jo.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/jp.ico b/plugins/SpellChecker/Flags/jp.ico deleted file mode 100644 index a415342ab2..0000000000 Binary files a/plugins/SpellChecker/Flags/jp.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/ke.ico b/plugins/SpellChecker/Flags/ke.ico deleted file mode 100644 index 554ecbb433..0000000000 Binary files a/plugins/SpellChecker/Flags/ke.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/kg.ico b/plugins/SpellChecker/Flags/kg.ico deleted file mode 100644 index 81b33aa1a0..0000000000 Binary files a/plugins/SpellChecker/Flags/kg.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/ki.ico b/plugins/SpellChecker/Flags/ki.ico deleted file mode 100644 index 93b225df0e..0000000000 Binary files a/plugins/SpellChecker/Flags/ki.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/km.ico b/plugins/SpellChecker/Flags/km.ico deleted file mode 100644 index 3bf56839d9..0000000000 Binary files a/plugins/SpellChecker/Flags/km.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/km_KH.ico b/plugins/SpellChecker/Flags/km_KH.ico deleted file mode 100644 index 69d08fbd86..0000000000 Binary files a/plugins/SpellChecker/Flags/km_KH.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/kn.ico b/plugins/SpellChecker/Flags/kn.ico deleted file mode 100644 index c959493d47..0000000000 Binary files a/plugins/SpellChecker/Flags/kn.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/kp.ico b/plugins/SpellChecker/Flags/kp.ico deleted file mode 100644 index 4dc460f2c7..0000000000 Binary files a/plugins/SpellChecker/Flags/kp.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/kr.ico b/plugins/SpellChecker/Flags/kr.ico deleted file mode 100644 index b2c8f19dce..0000000000 Binary files a/plugins/SpellChecker/Flags/kr.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/ku_TR.ico b/plugins/SpellChecker/Flags/ku_TR.ico deleted file mode 100644 index 024d3838f9..0000000000 Binary files a/plugins/SpellChecker/Flags/ku_TR.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/kw.ico b/plugins/SpellChecker/Flags/kw.ico deleted file mode 100644 index a7382b28ab..0000000000 Binary files a/plugins/SpellChecker/Flags/kw.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/ky.ico b/plugins/SpellChecker/Flags/ky.ico deleted file mode 100644 index a0f44c16dc..0000000000 Binary files a/plugins/SpellChecker/Flags/ky.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/kz.ico b/plugins/SpellChecker/Flags/kz.ico deleted file mode 100644 index e18579c25a..0000000000 Binary files a/plugins/SpellChecker/Flags/kz.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/la.ico b/plugins/SpellChecker/Flags/la.ico deleted file mode 100644 index 1b5762786f..0000000000 Binary files a/plugins/SpellChecker/Flags/la.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/lb.ico b/plugins/SpellChecker/Flags/lb.ico deleted file mode 100644 index 7221f195a4..0000000000 Binary files a/plugins/SpellChecker/Flags/lb.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/lc.ico b/plugins/SpellChecker/Flags/lc.ico deleted file mode 100644 index d3e57d6b3e..0000000000 Binary files a/plugins/SpellChecker/Flags/lc.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/li.ico b/plugins/SpellChecker/Flags/li.ico deleted file mode 100644 index 2431ff8222..0000000000 Binary files a/plugins/SpellChecker/Flags/li.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/lk.ico b/plugins/SpellChecker/Flags/lk.ico deleted file mode 100644 index b39b1fd2cf..0000000000 Binary files a/plugins/SpellChecker/Flags/lk.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/lr.ico b/plugins/SpellChecker/Flags/lr.ico deleted file mode 100644 index cfab48057d..0000000000 Binary files a/plugins/SpellChecker/Flags/lr.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/ls.ico b/plugins/SpellChecker/Flags/ls.ico deleted file mode 100644 index 874b1626aa..0000000000 Binary files a/plugins/SpellChecker/Flags/ls.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/lt_LT.ico b/plugins/SpellChecker/Flags/lt_LT.ico deleted file mode 100644 index a115a7da55..0000000000 Binary files a/plugins/SpellChecker/Flags/lt_LT.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/lu_LU.ico b/plugins/SpellChecker/Flags/lu_LU.ico deleted file mode 100644 index c509c39988..0000000000 Binary files a/plugins/SpellChecker/Flags/lu_LU.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/lv_LV.ico b/plugins/SpellChecker/Flags/lv_LV.ico deleted file mode 100644 index eafbc01a21..0000000000 Binary files a/plugins/SpellChecker/Flags/lv_LV.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/ly.ico b/plugins/SpellChecker/Flags/ly.ico deleted file mode 100644 index 00bdab1183..0000000000 Binary files a/plugins/SpellChecker/Flags/ly.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/ma.ico b/plugins/SpellChecker/Flags/ma.ico deleted file mode 100644 index 7ac31f210b..0000000000 Binary files a/plugins/SpellChecker/Flags/ma.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/mc.ico b/plugins/SpellChecker/Flags/mc.ico deleted file mode 100644 index 14ab0d4851..0000000000 Binary files a/plugins/SpellChecker/Flags/mc.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/md.ico b/plugins/SpellChecker/Flags/md.ico deleted file mode 100644 index 238890dfd2..0000000000 Binary files a/plugins/SpellChecker/Flags/md.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/mg_MG.ico b/plugins/SpellChecker/Flags/mg_MG.ico deleted file mode 100644 index c4bd13e6ca..0000000000 Binary files a/plugins/SpellChecker/Flags/mg_MG.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/mh.ico b/plugins/SpellChecker/Flags/mh.ico deleted file mode 100644 index d82482fb09..0000000000 Binary files a/plugins/SpellChecker/Flags/mh.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/mi_NZ.ico b/plugins/SpellChecker/Flags/mi_NZ.ico deleted file mode 100644 index 9c4cac8f15..0000000000 Binary files a/plugins/SpellChecker/Flags/mi_NZ.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/mk.ico b/plugins/SpellChecker/Flags/mk.ico deleted file mode 100644 index 1c032d9a9a..0000000000 Binary files a/plugins/SpellChecker/Flags/mk.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/ml.ico b/plugins/SpellChecker/Flags/ml.ico deleted file mode 100644 index d05c5bede3..0000000000 Binary files a/plugins/SpellChecker/Flags/ml.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/mm.ico b/plugins/SpellChecker/Flags/mm.ico deleted file mode 100644 index f8257e6132..0000000000 Binary files a/plugins/SpellChecker/Flags/mm.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/mn_MN.ico b/plugins/SpellChecker/Flags/mn_MN.ico deleted file mode 100644 index 2ad366dae2..0000000000 Binary files a/plugins/SpellChecker/Flags/mn_MN.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/mo.ico b/plugins/SpellChecker/Flags/mo.ico deleted file mode 100644 index 0d1d78aed1..0000000000 Binary files a/plugins/SpellChecker/Flags/mo.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/mo_BF.ico b/plugins/SpellChecker/Flags/mo_BF.ico deleted file mode 100644 index cadd8be169..0000000000 Binary files a/plugins/SpellChecker/Flags/mo_BF.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/mp.ico b/plugins/SpellChecker/Flags/mp.ico deleted file mode 100644 index 6df1f656d1..0000000000 Binary files a/plugins/SpellChecker/Flags/mp.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/mq.ico b/plugins/SpellChecker/Flags/mq.ico deleted file mode 100644 index f42c7d13e0..0000000000 Binary files a/plugins/SpellChecker/Flags/mq.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/mr.ico b/plugins/SpellChecker/Flags/mr.ico deleted file mode 100644 index e2617fd5b4..0000000000 Binary files a/plugins/SpellChecker/Flags/mr.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/mr_IN.ico b/plugins/SpellChecker/Flags/mr_IN.ico deleted file mode 100644 index b1a927d872..0000000000 Binary files a/plugins/SpellChecker/Flags/mr_IN.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/ms.ico b/plugins/SpellChecker/Flags/ms.ico deleted file mode 100644 index 700e4f5478..0000000000 Binary files a/plugins/SpellChecker/Flags/ms.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/ms_MY.ico b/plugins/SpellChecker/Flags/ms_MY.ico deleted file mode 100644 index b6ddded2d5..0000000000 Binary files a/plugins/SpellChecker/Flags/ms_MY.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/mt.ico b/plugins/SpellChecker/Flags/mt.ico deleted file mode 100644 index d8b5ad2c41..0000000000 Binary files a/plugins/SpellChecker/Flags/mt.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/mu.ico b/plugins/SpellChecker/Flags/mu.ico deleted file mode 100644 index 09b4103584..0000000000 Binary files a/plugins/SpellChecker/Flags/mu.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/mv.ico b/plugins/SpellChecker/Flags/mv.ico deleted file mode 100644 index ca77f768ef..0000000000 Binary files a/plugins/SpellChecker/Flags/mv.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/mz.ico b/plugins/SpellChecker/Flags/mz.ico deleted file mode 100644 index 803e62cde4..0000000000 Binary files a/plugins/SpellChecker/Flags/mz.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/na.ico b/plugins/SpellChecker/Flags/na.ico deleted file mode 100644 index 09ae908448..0000000000 Binary files a/plugins/SpellChecker/Flags/na.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/nb_NO.ico b/plugins/SpellChecker/Flags/nb_NO.ico deleted file mode 100644 index f0b648deba..0000000000 Binary files a/plugins/SpellChecker/Flags/nb_NO.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/nc.ico b/plugins/SpellChecker/Flags/nc.ico deleted file mode 100644 index f8c8695c00..0000000000 Binary files a/plugins/SpellChecker/Flags/nc.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/ne.ico b/plugins/SpellChecker/Flags/ne.ico deleted file mode 100644 index 45b61121ca..0000000000 Binary files a/plugins/SpellChecker/Flags/ne.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/ne_NP.ico b/plugins/SpellChecker/Flags/ne_NP.ico deleted file mode 100644 index cc7954f1ad..0000000000 Binary files a/plugins/SpellChecker/Flags/ne_NP.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/nf.ico b/plugins/SpellChecker/Flags/nf.ico deleted file mode 100644 index 49e50f9478..0000000000 Binary files a/plugins/SpellChecker/Flags/nf.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/ng.ico b/plugins/SpellChecker/Flags/ng.ico deleted file mode 100644 index 250fc73fa2..0000000000 Binary files a/plugins/SpellChecker/Flags/ng.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/ni.ico b/plugins/SpellChecker/Flags/ni.ico deleted file mode 100644 index f0795cec7f..0000000000 Binary files a/plugins/SpellChecker/Flags/ni.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/nl_NL.ico b/plugins/SpellChecker/Flags/nl_NL.ico deleted file mode 100644 index ea2d4c64d4..0000000000 Binary files a/plugins/SpellChecker/Flags/nl_NL.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/nn_NO.ico b/plugins/SpellChecker/Flags/nn_NO.ico deleted file mode 100644 index f0b648deba..0000000000 Binary files a/plugins/SpellChecker/Flags/nn_NO.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/nr.ico b/plugins/SpellChecker/Flags/nr.ico deleted file mode 100644 index 995a00a79a..0000000000 Binary files a/plugins/SpellChecker/Flags/nr.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/nr_ZA.ico b/plugins/SpellChecker/Flags/nr_ZA.ico deleted file mode 100644 index a786459654..0000000000 Binary files a/plugins/SpellChecker/Flags/nr_ZA.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/ns_ZA.ico b/plugins/SpellChecker/Flags/ns_ZA.ico deleted file mode 100644 index a786459654..0000000000 Binary files a/plugins/SpellChecker/Flags/ns_ZA.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/nu.ico b/plugins/SpellChecker/Flags/nu.ico deleted file mode 100644 index 98675192de..0000000000 Binary files a/plugins/SpellChecker/Flags/nu.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/ny_MW.ico b/plugins/SpellChecker/Flags/ny_MW.ico deleted file mode 100644 index dce539f90d..0000000000 Binary files a/plugins/SpellChecker/Flags/ny_MW.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/om.ico b/plugins/SpellChecker/Flags/om.ico deleted file mode 100644 index 98d735bcc9..0000000000 Binary files a/plugins/SpellChecker/Flags/om.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/or_IN.ico b/plugins/SpellChecker/Flags/or_IN.ico deleted file mode 100644 index b1a927d872..0000000000 Binary files a/plugins/SpellChecker/Flags/or_IN.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/pa.ico b/plugins/SpellChecker/Flags/pa.ico deleted file mode 100644 index a0b4d344fe..0000000000 Binary files a/plugins/SpellChecker/Flags/pa.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/pe.ico b/plugins/SpellChecker/Flags/pe.ico deleted file mode 100644 index 1e3d1a7339..0000000000 Binary files a/plugins/SpellChecker/Flags/pe.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/pf.ico b/plugins/SpellChecker/Flags/pf.ico deleted file mode 100644 index 2b2acef214..0000000000 Binary files a/plugins/SpellChecker/Flags/pf.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/pg.ico b/plugins/SpellChecker/Flags/pg.ico deleted file mode 100644 index 324ba8e192..0000000000 Binary files a/plugins/SpellChecker/Flags/pg.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/pk.ico b/plugins/SpellChecker/Flags/pk.ico deleted file mode 100644 index d979e9decc..0000000000 Binary files a/plugins/SpellChecker/Flags/pk.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/pl_PL.ico b/plugins/SpellChecker/Flags/pl_PL.ico deleted file mode 100644 index 9b3bfd1fbc..0000000000 Binary files a/plugins/SpellChecker/Flags/pl_PL.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/pm.ico b/plugins/SpellChecker/Flags/pm.ico deleted file mode 100644 index 0de10e26f5..0000000000 Binary files a/plugins/SpellChecker/Flags/pm.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/pn.ico b/plugins/SpellChecker/Flags/pn.ico deleted file mode 100644 index 566b7facbc..0000000000 Binary files a/plugins/SpellChecker/Flags/pn.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/pr.ico b/plugins/SpellChecker/Flags/pr.ico deleted file mode 100644 index 890e131d11..0000000000 Binary files a/plugins/SpellChecker/Flags/pr.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/ps.ico b/plugins/SpellChecker/Flags/ps.ico deleted file mode 100644 index 773c066649..0000000000 Binary files a/plugins/SpellChecker/Flags/ps.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/pt_BR.ico b/plugins/SpellChecker/Flags/pt_BR.ico deleted file mode 100644 index 9d015e3614..0000000000 Binary files a/plugins/SpellChecker/Flags/pt_BR.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/pt_PT.ico b/plugins/SpellChecker/Flags/pt_PT.ico deleted file mode 100644 index d322f99767..0000000000 Binary files a/plugins/SpellChecker/Flags/pt_PT.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/pw.ico b/plugins/SpellChecker/Flags/pw.ico deleted file mode 100644 index cd5b828bc6..0000000000 Binary files a/plugins/SpellChecker/Flags/pw.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/py.ico b/plugins/SpellChecker/Flags/py.ico deleted file mode 100644 index a0cc19e81a..0000000000 Binary files a/plugins/SpellChecker/Flags/py.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/qa.ico b/plugins/SpellChecker/Flags/qa.ico deleted file mode 100644 index dbd700f008..0000000000 Binary files a/plugins/SpellChecker/Flags/qa.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/qu_BO.ico b/plugins/SpellChecker/Flags/qu_BO.ico deleted file mode 100644 index 315825c47e..0000000000 Binary files a/plugins/SpellChecker/Flags/qu_BO.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/readme.txt b/plugins/SpellChecker/Flags/readme.txt deleted file mode 100644 index d20182b7c2..0000000000 --- a/plugins/SpellChecker/Flags/readme.txt +++ /dev/null @@ -1,8 +0,0 @@ -flag icons - famfamfam.com - -Free for any use. If you use these flags in your software or -on your website, an email with a link or a screenshot would be nice. :) - -- Thanks to Christian Cook for splitting it all up into separate images - -Contact: mjames@gmail.com \ No newline at end of file diff --git a/plugins/SpellChecker/Flags/ro_BO.ico b/plugins/SpellChecker/Flags/ro_BO.ico deleted file mode 100644 index 149a031893..0000000000 Binary files a/plugins/SpellChecker/Flags/ro_BO.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/ro_RO.ico b/plugins/SpellChecker/Flags/ro_RO.ico deleted file mode 100644 index 1345d5166f..0000000000 Binary files a/plugins/SpellChecker/Flags/ro_RO.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/ru_RU.ico b/plugins/SpellChecker/Flags/ru_RU.ico deleted file mode 100644 index ecbe640578..0000000000 Binary files a/plugins/SpellChecker/Flags/ru_RU.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/rw_RW.ico b/plugins/SpellChecker/Flags/rw_RW.ico deleted file mode 100644 index 77d8c8b8c1..0000000000 Binary files a/plugins/SpellChecker/Flags/rw_RW.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/sa.ico b/plugins/SpellChecker/Flags/sa.ico deleted file mode 100644 index 9d10c250a0..0000000000 Binary files a/plugins/SpellChecker/Flags/sa.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/sb.ico b/plugins/SpellChecker/Flags/sb.ico deleted file mode 100644 index 5937333372..0000000000 Binary files a/plugins/SpellChecker/Flags/sb.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/sc.ico b/plugins/SpellChecker/Flags/sc.ico deleted file mode 100644 index 770967b5a0..0000000000 Binary files a/plugins/SpellChecker/Flags/sc.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/sd.ico b/plugins/SpellChecker/Flags/sd.ico deleted file mode 100644 index 6545b0e3f6..0000000000 Binary files a/plugins/SpellChecker/Flags/sd.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/sg.ico b/plugins/SpellChecker/Flags/sg.ico deleted file mode 100644 index f6ec180a53..0000000000 Binary files a/plugins/SpellChecker/Flags/sg.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/sh.ico b/plugins/SpellChecker/Flags/sh.ico deleted file mode 100644 index b6acb4008d..0000000000 Binary files a/plugins/SpellChecker/Flags/sh.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/sk_SK.ico b/plugins/SpellChecker/Flags/sk_SK.ico deleted file mode 100644 index b1fac30bea..0000000000 Binary files a/plugins/SpellChecker/Flags/sk_SK.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/sl.ico b/plugins/SpellChecker/Flags/sl.ico deleted file mode 100644 index e9159c16a0..0000000000 Binary files a/plugins/SpellChecker/Flags/sl.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/sl_SI.ico b/plugins/SpellChecker/Flags/sl_SI.ico deleted file mode 100644 index 833fbec207..0000000000 Binary files a/plugins/SpellChecker/Flags/sl_SI.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/sm.ico b/plugins/SpellChecker/Flags/sm.ico deleted file mode 100644 index 5a7423c178..0000000000 Binary files a/plugins/SpellChecker/Flags/sm.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/sn.ico b/plugins/SpellChecker/Flags/sn.ico deleted file mode 100644 index f8501d7e77..0000000000 Binary files a/plugins/SpellChecker/Flags/sn.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/so.ico b/plugins/SpellChecker/Flags/so.ico deleted file mode 100644 index 27ea026ebe..0000000000 Binary files a/plugins/SpellChecker/Flags/so.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/sr.ico b/plugins/SpellChecker/Flags/sr.ico deleted file mode 100644 index e32ebd74e5..0000000000 Binary files a/plugins/SpellChecker/Flags/sr.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/sr_CS.ico b/plugins/SpellChecker/Flags/sr_CS.ico deleted file mode 100644 index 82e104a81c..0000000000 Binary files a/plugins/SpellChecker/Flags/sr_CS.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/ss_ZA.ico b/plugins/SpellChecker/Flags/ss_ZA.ico deleted file mode 100644 index c5dcd88737..0000000000 Binary files a/plugins/SpellChecker/Flags/ss_ZA.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/st.ico b/plugins/SpellChecker/Flags/st.ico deleted file mode 100644 index d4dda8a626..0000000000 Binary files a/plugins/SpellChecker/Flags/st.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/st_ZA.ico b/plugins/SpellChecker/Flags/st_ZA.ico deleted file mode 100644 index a786459654..0000000000 Binary files a/plugins/SpellChecker/Flags/st_ZA.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/sv.ico b/plugins/SpellChecker/Flags/sv.ico deleted file mode 100644 index 00bb86086f..0000000000 Binary files a/plugins/SpellChecker/Flags/sv.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/sv_SE.ico b/plugins/SpellChecker/Flags/sv_SE.ico deleted file mode 100644 index 7a58adf63b..0000000000 Binary files a/plugins/SpellChecker/Flags/sv_SE.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/sy.ico b/plugins/SpellChecker/Flags/sy.ico deleted file mode 100644 index d022ebcd57..0000000000 Binary files a/plugins/SpellChecker/Flags/sy.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/tc.ico b/plugins/SpellChecker/Flags/tc.ico deleted file mode 100644 index 750323d0a6..0000000000 Binary files a/plugins/SpellChecker/Flags/tc.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/td.ico b/plugins/SpellChecker/Flags/td.ico deleted file mode 100644 index c02ef93595..0000000000 Binary files a/plugins/SpellChecker/Flags/td.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/tet_ID.ico b/plugins/SpellChecker/Flags/tet_ID.ico deleted file mode 100644 index 9432e87f95..0000000000 Binary files a/plugins/SpellChecker/Flags/tet_ID.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/tf.ico b/plugins/SpellChecker/Flags/tf.ico deleted file mode 100644 index 334b7f0086..0000000000 Binary files a/plugins/SpellChecker/Flags/tf.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/tg.ico b/plugins/SpellChecker/Flags/tg.ico deleted file mode 100644 index 2ab28c0d06..0000000000 Binary files a/plugins/SpellChecker/Flags/tg.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/th.ico b/plugins/SpellChecker/Flags/th.ico deleted file mode 100644 index 522dd9e1ed..0000000000 Binary files a/plugins/SpellChecker/Flags/th.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/tj.ico b/plugins/SpellChecker/Flags/tj.ico deleted file mode 100644 index fd17d8a87e..0000000000 Binary files a/plugins/SpellChecker/Flags/tj.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/tk.ico b/plugins/SpellChecker/Flags/tk.ico deleted file mode 100644 index f76b1979a6..0000000000 Binary files a/plugins/SpellChecker/Flags/tk.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/tl.ico b/plugins/SpellChecker/Flags/tl.ico deleted file mode 100644 index e9956a86e5..0000000000 Binary files a/plugins/SpellChecker/Flags/tl.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/tl_PH.ico b/plugins/SpellChecker/Flags/tl_PH.ico deleted file mode 100644 index d4369474b5..0000000000 Binary files a/plugins/SpellChecker/Flags/tl_PH.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/tm.ico b/plugins/SpellChecker/Flags/tm.ico deleted file mode 100644 index 676fa75bf2..0000000000 Binary files a/plugins/SpellChecker/Flags/tm.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/tn.ico b/plugins/SpellChecker/Flags/tn.ico deleted file mode 100644 index 4427d36fb3..0000000000 Binary files a/plugins/SpellChecker/Flags/tn.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/tn_ZA.ico b/plugins/SpellChecker/Flags/tn_ZA.ico deleted file mode 100644 index efa797a715..0000000000 Binary files a/plugins/SpellChecker/Flags/tn_ZA.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/to.ico b/plugins/SpellChecker/Flags/to.ico deleted file mode 100644 index ce677d90df..0000000000 Binary files a/plugins/SpellChecker/Flags/to.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/ts_ZA.ico b/plugins/SpellChecker/Flags/ts_ZA.ico deleted file mode 100644 index a786459654..0000000000 Binary files a/plugins/SpellChecker/Flags/ts_ZA.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/tt.ico b/plugins/SpellChecker/Flags/tt.ico deleted file mode 100644 index a737128efb..0000000000 Binary files a/plugins/SpellChecker/Flags/tt.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/tv.ico b/plugins/SpellChecker/Flags/tv.ico deleted file mode 100644 index 9778da18b2..0000000000 Binary files a/plugins/SpellChecker/Flags/tv.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/tw.ico b/plugins/SpellChecker/Flags/tw.ico deleted file mode 100644 index 4f44eeaf70..0000000000 Binary files a/plugins/SpellChecker/Flags/tw.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/tz.ico b/plugins/SpellChecker/Flags/tz.ico deleted file mode 100644 index 961587b265..0000000000 Binary files a/plugins/SpellChecker/Flags/tz.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/ug.ico b/plugins/SpellChecker/Flags/ug.ico deleted file mode 100644 index 91b92fd2c9..0000000000 Binary files a/plugins/SpellChecker/Flags/ug.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/uk_UA.ico b/plugins/SpellChecker/Flags/uk_UA.ico deleted file mode 100644 index be541024cb..0000000000 Binary files a/plugins/SpellChecker/Flags/uk_UA.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/um.ico b/plugins/SpellChecker/Flags/um.ico deleted file mode 100644 index 0979678e62..0000000000 Binary files a/plugins/SpellChecker/Flags/um.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/uy.ico b/plugins/SpellChecker/Flags/uy.ico deleted file mode 100644 index 9b8203065f..0000000000 Binary files a/plugins/SpellChecker/Flags/uy.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/uz_UZ.ico b/plugins/SpellChecker/Flags/uz_UZ.ico deleted file mode 100644 index 1665b26caa..0000000000 Binary files a/plugins/SpellChecker/Flags/uz_UZ.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/va.ico b/plugins/SpellChecker/Flags/va.ico deleted file mode 100644 index 0f7e081c83..0000000000 Binary files a/plugins/SpellChecker/Flags/va.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/vc.ico b/plugins/SpellChecker/Flags/vc.ico deleted file mode 100644 index 65e26263ee..0000000000 Binary files a/plugins/SpellChecker/Flags/vc.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/ve.ico b/plugins/SpellChecker/Flags/ve.ico deleted file mode 100644 index 45ffac8262..0000000000 Binary files a/plugins/SpellChecker/Flags/ve.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/ve_ZA.ico b/plugins/SpellChecker/Flags/ve_ZA.ico deleted file mode 100644 index a786459654..0000000000 Binary files a/plugins/SpellChecker/Flags/ve_ZA.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/vg.ico b/plugins/SpellChecker/Flags/vg.ico deleted file mode 100644 index e41c589f6f..0000000000 Binary files a/plugins/SpellChecker/Flags/vg.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/vi.ico b/plugins/SpellChecker/Flags/vi.ico deleted file mode 100644 index df3a8c1215..0000000000 Binary files a/plugins/SpellChecker/Flags/vi.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/vi_VI.ico b/plugins/SpellChecker/Flags/vi_VI.ico deleted file mode 100644 index eb767d01a4..0000000000 Binary files a/plugins/SpellChecker/Flags/vi_VI.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/vu.ico b/plugins/SpellChecker/Flags/vu.ico deleted file mode 100644 index 71d877f03d..0000000000 Binary files a/plugins/SpellChecker/Flags/vu.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/wf.ico b/plugins/SpellChecker/Flags/wf.ico deleted file mode 100644 index 48364346ae..0000000000 Binary files a/plugins/SpellChecker/Flags/wf.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/ws.ico b/plugins/SpellChecker/Flags/ws.ico deleted file mode 100644 index 468ec949c1..0000000000 Binary files a/plugins/SpellChecker/Flags/ws.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/xh_ZA.ico b/plugins/SpellChecker/Flags/xh_ZA.ico deleted file mode 100644 index a786459654..0000000000 Binary files a/plugins/SpellChecker/Flags/xh_ZA.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/ye.ico b/plugins/SpellChecker/Flags/ye.ico deleted file mode 100644 index 049c38c1c4..0000000000 Binary files a/plugins/SpellChecker/Flags/ye.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/yt.ico b/plugins/SpellChecker/Flags/yt.ico deleted file mode 100644 index 7bec05ff9e..0000000000 Binary files a/plugins/SpellChecker/Flags/yt.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/zm.ico b/plugins/SpellChecker/Flags/zm.ico deleted file mode 100644 index d8ea9873eb..0000000000 Binary files a/plugins/SpellChecker/Flags/zm.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/zu_ZA.ico b/plugins/SpellChecker/Flags/zu_ZA.ico deleted file mode 100644 index a786459654..0000000000 Binary files a/plugins/SpellChecker/Flags/zu_ZA.ico and /dev/null differ diff --git a/plugins/SpellChecker/Flags/zw.ico b/plugins/SpellChecker/Flags/zw.ico deleted file mode 100644 index aa7b042fae..0000000000 Binary files a/plugins/SpellChecker/Flags/zw.ico and /dev/null differ diff --git a/plugins/SpellChecker/RichEdit.cpp b/plugins/SpellChecker/RichEdit.cpp deleted file mode 100644 index 102b1acfde..0000000000 --- a/plugins/SpellChecker/RichEdit.cpp +++ /dev/null @@ -1,332 +0,0 @@ -#include "commons.h" - - -RichEdit::RichEdit(HWND hwnd) - : hwnd(NULL), ole(NULL), textDocument(NULL), stopped(0), undoEnabled(TRUE) -{ - SetHWND(hwnd); -} - -RichEdit::~RichEdit() -{ - SetHWND(NULL); -} - -bool RichEdit::IsValid() const -{ - return ole != NULL; -} - -HWND RichEdit::GetHWND() const -{ - return hwnd; -} - -void RichEdit::SetHWND(HWND hwnd) -{ - if (textDocument != NULL) - { - textDocument->Release(); - textDocument = NULL; - } - if (ole != NULL) - { - ole->Release(); - ole = NULL; - } - - this->hwnd = hwnd; - - if (hwnd == NULL) - return; - - SendMessage(EM_GETOLEINTERFACE, 0, (LPARAM) &ole); - if (ole == NULL) - return; - - if (ole->QueryInterface(IID_ITextDocument, (void**) &textDocument) != S_OK) - textDocument = NULL; -} - -LRESULT RichEdit::SendMessage(UINT Msg, WPARAM wParam, LPARAM lParam) const -{ - return ::SendMessage(hwnd, Msg, wParam, lParam); -} - -bool RichEdit::IsReadOnly() const -{ - return (GetWindowLongPtr(hwnd, GWL_STYLE) & ES_READONLY) == ES_READONLY; -} - -void RichEdit::SuspendUndo() -{ - if (textDocument != NULL) - { - textDocument->Undo(tomSuspend, NULL); - undoEnabled = FALSE; - } -} - -void RichEdit::ResumeUndo() -{ - if (textDocument != NULL) - { - textDocument->Undo(tomResume, NULL); - undoEnabled = TRUE; - } -} - -void RichEdit::Stop() -{ - stopped++; - if (stopped != 1) - return; - - SuspendUndo(); - -// HideCaret(hwnd); - SendMessage(WM_SETREDRAW, FALSE, 0); - - SendMessage(EM_GETSCROLLPOS, 0, (LPARAM) &old_scroll_pos); - SendMessage(EM_EXGETSEL, 0, (LPARAM) &old_sel); - GetCaretPos(&caretPos); - - old_mask = SendMessage(EM_GETEVENTMASK, 0, 0); - SendMessage(EM_SETEVENTMASK, 0, old_mask & ~ENM_CHANGE); - - inverse = (old_sel.cpMin >= LOWORD(SendMessage(EM_CHARFROMPOS, 0, (LPARAM) &caretPos))); -} - -void RichEdit::Start() -{ - stopped--; - - if (stopped < 0) - { - stopped = 0; - return; - } - else if (stopped > 0) - return; - - if (inverse) - { - LONG tmp = old_sel.cpMin; - old_sel.cpMin = old_sel.cpMax; - old_sel.cpMax = tmp; - } - - SendMessage(EM_SETEVENTMASK, 0, old_mask); - SendMessage(EM_EXSETSEL, 0, (LPARAM) &old_sel); - SendMessage(EM_SETSCROLLPOS, 0, (LPARAM) &old_scroll_pos); - - SendMessage(WM_SETREDRAW, TRUE, 0); - InvalidateRect(hwnd, NULL, FALSE); -// ShowCaret(hwnd); - - ResumeUndo(); -} - -BOOL RichEdit::IsStopped() -{ - return stopped > 0; -} - -int RichEdit::GetCharFromPos(const POINT &pt) -{ - return LOWORD(SendMessage(EM_CHARFROMPOS, 0, (LPARAM) &pt)); -} - -int RichEdit::GetLineCount() const -{ - return SendMessage(EM_GETLINECOUNT, 0, 0); -} - -void RichEdit::GetLine(int line, TCHAR *text, size_t text_len) const -{ - *((WORD*)text) = text_len - 1; - unsigned size = (unsigned) SendMessage(EM_GETLINE, (WPARAM) line, (LPARAM) text); - // Sometimes it likes to return size = lineLen+1, adding an \n at the end, so we remove it here - // to make both implementations return same size - int lineLen = GetLineLength(line); - size = (unsigned) max(0, min((int)text_len - 1, min((int) size, lineLen))); - text[size] = _T('\0'); - -/* - int len = GetLineLength(line); - if (len < 1) - { - text[0] = 0; - return; - } - - int first = GetFirstCharOfLine(line); - TCHAR *tmp = GetText(first, first + GetLineLength(line)); - lstrcpyn(text, tmp, text_len); - mir_free(tmp); -*/ -} - -int RichEdit::GetLineLength(int line) const -{ - return SendMessage(EM_LINELENGTH, GetFirstCharOfLine(line), 0); -} - -int RichEdit::GetFirstCharOfLine(int line) const -{ - return SendMessage(EM_LINEINDEX, (WPARAM) line, 0); -} - -int RichEdit::GetLineFromChar(int charPos) const -{ - return SendMessage(EM_LINEFROMCHAR, charPos, 0); -} - -CHARRANGE RichEdit::GetSel() const -{ - CHARRANGE sel; - SendMessage(EM_EXGETSEL, 0, (LPARAM) &sel); - return sel; -} - -void RichEdit::SetSel(int start, int end) -{ - CHARRANGE sel = { start, end }; - SetSel(sel); -} - -void RichEdit::SetSel(const CHARRANGE &sel) -{ - SendMessage(EM_EXSETSEL, 0, (LPARAM) &sel); -} - -int RichEdit::GetTextLength() const -{ - return GetWindowTextLength(hwnd); -} - -TCHAR *RichEdit::GetText(int start, int end) const -{ - if (end <= start) - end = GetTextLength(); - - if (textDocument != NULL) - { - ITextRange *range; - if (textDocument->Range(start, end, &range) != S_OK) - return mir_tstrdup(_T("")); - - BSTR text = NULL; - if (range->GetText(&text) != S_OK || text == NULL) - { - range->Release(); - return mir_tstrdup(_T("")); - } - - TCHAR *ret = mir_u2t(text); - - SysFreeString(text); - - range->Release(); - - return ret; - } - else - { - int len = GetTextLength(); - TCHAR *tmp = (TCHAR *) mir_alloc(len * sizeof(TCHAR)); - GetWindowText(hwnd, tmp, len); - tmp[len] = 0; - - TCHAR *ret = (TCHAR *) mir_alloc((end - start + 1) * sizeof(TCHAR)); - memmove(ret, &tmp[start], (end - start) * sizeof(TCHAR)); - ret[end - start] = 0; - - mir_free(tmp); - return ret; - } -} - -void RichEdit::ReplaceSel(const TCHAR *new_text) -{ - if (stopped) - { - CHARRANGE sel = GetSel(); - - ResumeUndo(); - - SendMessage(EM_REPLACESEL, undoEnabled, (LPARAM) new_text); - - SuspendUndo(); - - FixSel(&old_sel, sel, lstrlen(new_text)); - - SendMessage(WM_SETREDRAW, FALSE, 0); - SendMessage(EM_SETEVENTMASK, 0, old_mask & ~ENM_CHANGE); - } - else - { - SendMessage(EM_REPLACESEL, undoEnabled, (LPARAM) new_text); - } -} - -int RichEdit::Replace(int start, int end, const TCHAR *new_text) -{ - CHARRANGE sel = GetSel(); - CHARRANGE replace_sel = { start, end }; - SetSel(replace_sel); - - ReplaceSel(new_text); - - int dif = FixSel(&sel, replace_sel, lstrlen(new_text)); - SetSel(sel); - return dif; -} - -int RichEdit::Insert(int pos, const TCHAR *text) -{ - CHARRANGE sel = GetSel(); - CHARRANGE replace_sel = { pos, pos }; - SetSel(replace_sel); - - ReplaceSel(text); - - int dif = FixSel(&sel, replace_sel, lstrlen(text)); - SetSel(sel); - return dif; -} - -int RichEdit::Delete(int start, int end) -{ - CHARRANGE sel = GetSel(); - CHARRANGE replace_sel = { start, end }; - SetSel(replace_sel); - - ReplaceSel(_T("")); - - int dif = FixSel(&sel, replace_sel, 0); - SetSel(sel); - return dif; -} - -int RichEdit::FixSel(CHARRANGE *to_fix, CHARRANGE sel_changed, int new_len) -{ - int dif = new_len - (sel_changed.cpMax - sel_changed.cpMin); - - if (to_fix->cpMax <= sel_changed.cpMin) - return dif; - - int newMax = sel_changed.cpMax + dif; - - if (to_fix->cpMin >= sel_changed.cpMax) - to_fix->cpMin += dif; - else if (to_fix->cpMin >= newMax) // For dif < 0, pos beetween sel_changed.cpMax + dif and sel_changed.cpMax - to_fix->cpMin = newMax; - - if (to_fix->cpMax >= sel_changed.cpMax) - to_fix->cpMax += dif; - else if (to_fix->cpMax >= newMax) // For dif < 0, pos beetween sel_changed.cpMax + dif and sel_changed.cpMax - to_fix->cpMax = newMax; - - return dif; -} diff --git a/plugins/SpellChecker/RichEdit.h b/plugins/SpellChecker/RichEdit.h deleted file mode 100644 index e8b4101be4..0000000000 --- a/plugins/SpellChecker/RichEdit.h +++ /dev/null @@ -1,71 +0,0 @@ -#ifndef __RICHEDIT_H__ -#define __RICHEDIT_H__ - -#include -#include -#include -#include - - -class RichEdit -{ - HWND hwnd; - IRichEditOle *ole; - ITextDocument *textDocument; - - int stopped; - BOOL undoEnabled; - POINT old_scroll_pos; - CHARRANGE old_sel; - POINT caretPos; - DWORD old_mask; - BOOL inverse; - -public: - RichEdit(HWND hwnd); - ~RichEdit(); - - bool IsValid() const; - HWND GetHWND() const; - - LRESULT SendMessage(UINT Msg, WPARAM wParam, LPARAM lParam) const; - - bool IsReadOnly() const; - - void SuspendUndo(); - void ResumeUndo(); - void Stop(); - void Start(); - BOOL IsStopped(); - - int GetCharFromPos(const POINT &pt); - - int GetLineCount() const; - void GetLine(int line, TCHAR *text, size_t text_len) const; - int GetLineLength(int line) const; - int GetFirstCharOfLine(int line) const; - int GetLineFromChar(int charPos) const; - - CHARRANGE GetSel() const; - void SetSel(int start, int end); - void SetSel(const CHARRANGE &sel); - - TCHAR *GetText(int start, int end) const; - int GetTextLength() const; - - void ReplaceSel(const TCHAR *new_text); - int Replace(int start, int end, const TCHAR *new_text); - int Insert(int pos, const TCHAR *text); - int Delete(int start, int end); - -private: - void SetHWND(HWND hwnd); - - int FixSel(CHARRANGE *to_fix, CHARRANGE sel_changed, int new_len); -}; - - - - - -#endif // __RICHEDIT_H__ diff --git a/plugins/SpellChecker/Version.h b/plugins/SpellChecker/Version.h deleted file mode 100644 index 2fa11f0306..0000000000 --- a/plugins/SpellChecker/Version.h +++ /dev/null @@ -1,20 +0,0 @@ -#define __MAJOR_VERSION 0 -#define __MINOR_VERSION 2 -#define __RELEASE_NUM 6 -#define __BUILD_NUM 0 - -#define __FILEVERSION_STRING __MAJOR_VERSION,__MINOR_VERSION,__RELEASE_NUM,__BUILD_NUM -#define __FILEVERSION_DOTS __MAJOR_VERSION.__MINOR_VERSION.__RELEASE_NUM.__BUILD_NUM - -#define __STRINGIFY_IMPL(x) #x -#define __STRINGIFY(x) __STRINGIFY_IMPL(x) -#define __VERSION_STRING __STRINGIFY(__FILEVERSION_DOTS) - -#define __PLUGIN_NAME "Spell Checker" -#define __INTERNAL_NAME "SpellChecker" -#define __FILENAME "SpellChecker.dll" -#define __DESCRIPTION "Spell checker for the message windows. Uses Hunspell to do the checking." -#define __AUTHOR "Ricardo Pescuma Domenecci, FREAK_THEMIGHTY" -#define __AUTHOREMAIL "pescuma@miranda-im.org" -#define __AUTHORWEB "http://nightly.miranda.im/" -#define __COPYRIGHT "© 2006-2010 Ricardo Pescuma Domenecci" diff --git a/plugins/SpellChecker/Version.rc b/plugins/SpellChecker/Version.rc deleted file mode 100644 index d1da5e8d6a..0000000000 --- a/plugins/SpellChecker/Version.rc +++ /dev/null @@ -1,42 +0,0 @@ -// Microsoft Visual C++ generated resource script. -// -#ifdef APSTUDIO_INVOKED -#error this file is not editable by Microsoft Visual C++ -#endif //APSTUDIO_INVOKED - -#include "afxres.h" -#include "version.h" - -#ifdef _WIN32 -LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL -#endif //_WIN32 - -VS_VERSION_INFO VERSIONINFO - FILEVERSION __FILEVERSION_STRING - PRODUCTVERSION __FILEVERSION_STRING - FILEFLAGSMASK 0x17L -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x4L - FILETYPE 0x0L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "000004b0" - BEGIN - VALUE "FileDescription", __DESCRIPTION - VALUE "InternalName", __PLUGIN_NAME - VALUE "LegalCopyright", __COPYRIGHT - VALUE "OriginalFilename", __FILENAME - VALUE "ProductName", __PLUGIN_NAME - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x0, 1200 - END -END diff --git a/plugins/SpellChecker/ardialog.cpp b/plugins/SpellChecker/ardialog.cpp deleted file mode 100644 index 6a08585ea1..0000000000 --- a/plugins/SpellChecker/ardialog.cpp +++ /dev/null @@ -1,316 +0,0 @@ -/* -Copyright (C) 2006-2010 Ricardo Pescuma Domenecci - -This is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public -License as published by the Free Software Foundation; either -version 2 of the License, or (at your option) any later version. - -This is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with this file; see the file license.txt. If -not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -Boston, MA 02111-1307, USA. -*/ - - -#include "commons.h" - - -static LRESULT CALLBACK EditProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); -static INT_PTR CALLBACK AddReplacementDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam); - - -struct Data -{ - Dictionary *dict; - tstring find; - tstring replace; - BOOL useVariables; - - BOOL modal; - BOOL findReadOnly; - - AutoReplaceDialogCallback callback; - void *param; - - WNDPROC old_edit_proc; -}; - -BOOL ShowAutoReplaceDialog(HWND parent, BOOL modal, - Dictionary *dict, const TCHAR *find, const TCHAR *replace, BOOL useVariables, - BOOL findReadOnly, AutoReplaceDialogCallback callback, void *param) -{ - Data *data = new Data(); - data->dict = dict; - data->useVariables = useVariables; - data->modal = modal; - data->findReadOnly = findReadOnly; - data->callback = callback; - data->param = param; - - if (find != NULL) - data->find = find; - - if (replace != NULL) - data->replace = replace; - - if (modal) - { - return DialogBoxParam(hInst, MAKEINTRESOURCE(IDD_ADD_REPLACEMENT), parent, - AddReplacementDlgProc, (LPARAM) data); - } - else - { - HWND hwnd = CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_ADD_REPLACEMENT), parent, - AddReplacementDlgProc, (LPARAM) data); - SetForegroundWindow(hwnd); - SetFocus(hwnd); - SetFocus(GetDlgItem(hwnd, IDC_NEW)); - ShowWindow(hwnd, SW_SHOW); - return TRUE; - } -} - - -static LRESULT CALLBACK OnlyCharsEditProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) -{ - Data *data = (Data *) GetWindowLongPtr(hwnd, GWLP_USERDATA); - - switch(msg) - { - case WM_CHAR: - { - if (wParam == VK_BACK) - break; - if (lParam & (1 << 28)) // ALT key - break; - if (GetKeyState(VK_CONTROL) & 0x8000) // CTRL key - break; - - TCHAR c = (TCHAR) wParam; - if (!data->dict->autoReplace->isWordChar(c)) - return 1; - - TCHAR tmp[2] = { c, 0 }; - CharLower(tmp); - wParam = tmp[0]; - - break; - } - } - - LRESULT ret = CallWindowProc(data->old_edit_proc, hwnd, msg, wParam, lParam); - - switch(msg) - { - case EM_PASTESPECIAL: - case WM_PASTE: - { - TCHAR text[256]; - GetWindowText(hwnd, text, MAX_REGS(text)); - - scoped_free dest = data->dict->autoReplace->filterText(text); - SetWindowText(hwnd, dest); - break; - } - } - - return ret; - -} - - -static BOOL CenterParent(HWND hwnd) -{ - HWND hwndParent = GetParent(hwnd); - if (hwndParent == NULL) - return FALSE; - - RECT rect, rectP; - GetWindowRect(hwnd, &rect); - GetWindowRect(hwndParent, &rectP); - - int width = rect.right - rect.left; - int height = rect.bottom - rect.top; - - int x = ((rectP.right-rectP.left) - width) / 2 + rectP.left; - int y = ((rectP.bottom-rectP.top) - height) / 2 + rectP.top; - - int screenwidth = GetSystemMetrics(SM_CXSCREEN); - int screenheight = GetSystemMetrics(SM_CYSCREEN); - - if(x + width > screenwidth) x = screenwidth - width; - if(y + height > screenheight) y = screenheight - height; - if(x < 0) x = 0; - if(y < 0) y = 0; - - MoveWindow(hwnd, x, y, width, height, FALSE); - - return TRUE; -} - -static void Close(HWND hwndDlg, int ret) -{ - Data *data = (Data *) GetWindowLongPtr(hwndDlg, GWLP_USERDATA); - - if (!ret) - { - data->callback(TRUE, data->dict, - data->find.c_str(), data->replace.c_str(), data->useVariables, - data->find.c_str(), data->param); - } - - SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_OLD), GWLP_WNDPROC, (LONG_PTR) data->old_edit_proc); - data->old_edit_proc = NULL; - - if (data->modal) - EndDialog(hwndDlg, ret); - else - DestroyWindow(hwndDlg); - - delete data; -} - -static INT_PTR CALLBACK AddReplacementDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) -{ - switch (msg) - { - case WM_INITDIALOG: - { - TranslateDialogDefault(hwndDlg); - - Data *data = (Data *) lParam; - SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR) data); - - SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_OLD), GWLP_USERDATA, (LONG_PTR) data); - data->old_edit_proc = (WNDPROC) SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_OLD), GWLP_WNDPROC, - (LONG_PTR) OnlyCharsEditProc); - - HICON hIcon = IcoLib_LoadIcon("spellchecker_enabled"); - SendMessage(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM) hIcon); - Skin_ReleaseIcon(hIcon); - - SendDlgItemMessage(hwndDlg, IDC_OLD, EM_LIMITTEXT, 256, 0); - SendDlgItemMessage(hwndDlg, IDC_NEW, EM_LIMITTEXT, 256, 0); - - if (!data->find.empty()) - { - scoped_free tmp = data->dict->autoReplace->filterText(data->find.c_str()); - SetDlgItemText(hwndDlg, IDC_OLD, tmp); - } - if (!data->replace.empty()) - SetDlgItemText(hwndDlg, IDC_NEW, data->replace.c_str()); - - CheckDlgButton(hwndDlg, IDC_VARIABLES, data->useVariables ? BST_CHECKED : BST_UNCHECKED); - - if (data->findReadOnly) - { - SendDlgItemMessage(hwndDlg, IDC_OLD, EM_SETREADONLY, TRUE, 0); - EnableWindow(GetDlgItem(hwndDlg, IDC_OLD_PS), FALSE); - } - - if (!variables_enabled) - { - ShowWindow(GetDlgItem(hwndDlg, IDC_VARIABLES), FALSE); - ShowWindow(GetDlgItem(hwndDlg, IDC_VAR_HELP), FALSE); - - RECT rc_old; - GetWindowRect(GetDlgItem(hwndDlg, IDC_OLD), &rc_old); - RECT rc_new; - GetWindowRect(GetDlgItem(hwndDlg, IDC_NEW), &rc_new); - rc_new.right = rc_old.right; - - SetWindowPos(GetDlgItem(hwndDlg, IDC_NEW), NULL, 0, 0, - rc_new.right - rc_new.left, rc_new.bottom - rc_new.top, - SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOOWNERZORDER | SWP_NOREDRAW | SWP_NOZORDER); - } - else - { - variables_skin_helpbutton(hwndDlg, IDC_VAR_HELP); - EnableWindow(GetDlgItem(hwndDlg, IDC_VAR_HELP), IsDlgButtonChecked(hwndDlg, IDC_VARIABLES)); - } - - CenterParent(hwndDlg); - - return TRUE; - } - - case WM_COMMAND: - switch(wParam) - { - case IDOK: - { - Data *data = (Data *) GetWindowLongPtr(hwndDlg, GWLP_USERDATA); - - TCHAR find[256]; - if (data->findReadOnly) - { - lstrcpyn(find, data->find.c_str(), MAX_REGS(find)); - } - else - { - GetDlgItemText(hwndDlg, IDC_OLD, find, MAX_REGS(find)); - lstrtrim(find); - } - - TCHAR replace[256]; - GetDlgItemText(hwndDlg, IDC_NEW, replace, MAX_REGS(replace)); - lstrtrim(replace); - - if (!data->findReadOnly && find[0] == 0) - { - MessageBox(hwndDlg, TranslateT("The wrong word can't be empty!"), TranslateT("Wrong Correction"), - MB_OK | MB_ICONERROR); - } - else if (replace[0] == 0) - { - MessageBox(hwndDlg, TranslateT("The correction can't be empty!"), TranslateT("Wrong Correction"), - MB_OK | MB_ICONERROR); - } - else if (_tcscmp(find, replace) == 0) - { - MessageBox(hwndDlg, TranslateT("The correction can't be equal to the wrong word!"), TranslateT("Wrong Correction"), - MB_OK | MB_ICONERROR); - } - else - { - data->callback(FALSE, data->dict, - find, replace, IsDlgButtonChecked(hwndDlg, IDC_VARIABLES), - data->find.c_str(), data->param); - Close(hwndDlg, 1); - } - - break; - } - case IDCANCEL: - { - Close(hwndDlg, 0); - break; - } - case IDC_VARIABLES: - { - EnableWindow(GetDlgItem(hwndDlg, IDC_VAR_HELP), IsDlgButtonChecked(hwndDlg, IDC_VARIABLES)); - break; - } - case IDC_VAR_HELP: - { - variables_showhelp(hwndDlg, IDC_NEW, VHF_FULLDLG, NULL, "The wrong word typed by the user"); - break; - } - } - break; - - case WM_CLOSE: - { - Close(hwndDlg, 0); - break; - } - } - - return FALSE; -} diff --git a/plugins/SpellChecker/ardialog.h b/plugins/SpellChecker/ardialog.h deleted file mode 100644 index 83f97c6026..0000000000 --- a/plugins/SpellChecker/ardialog.h +++ /dev/null @@ -1,33 +0,0 @@ -/* -Copyright (C) 2009-2010 Ricardo Pescuma Domenecci - -This is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public -License as published by the Free Software Foundation; either -version 2 of the License, or (at your option) any later version. - -This is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with this file; see the file license.txt. If -not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -Boston, MA 02111-1307, USA. -*/ - -#ifndef __ARDIALOG_H__ -# define __ARDIALOG_H__ - - -typedef void (*AutoReplaceDialogCallback)(BOOL canceled, Dictionary *dict, - const TCHAR *find, const TCHAR *replace, BOOL useVariables, - const TCHAR *original_find, void *param); - -BOOL ShowAutoReplaceDialog(HWND parent, BOOL modal, - Dictionary *dict, const TCHAR *find, const TCHAR *replace, BOOL useVariables, - BOOL findReadOnly, AutoReplaceDialogCallback callback, void *param); - - -#endif // __ARDIALOG_H__ diff --git a/plugins/SpellChecker/autoreplace.cpp b/plugins/SpellChecker/autoreplace.cpp deleted file mode 100644 index 2d257ccfec..0000000000 --- a/plugins/SpellChecker/autoreplace.cpp +++ /dev/null @@ -1,229 +0,0 @@ -/* -Copyright (C) 2009-2010 Ricardo Pescuma Domenecci - -This is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public -License as published by the Free Software Foundation; either -version 2 of the License, or (at your option) any later version. - -This is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with this file; see the file license.txt. If -not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -Boston, MA 02111-1307, USA. -*/ - - -#include "commons.h" - - -AutoReplacement::AutoReplacement() - : useVariables(FALSE) -{ -} - -AutoReplacement::AutoReplacement(const TCHAR *replace, BOOL useVariables) - : replace(replace), useVariables(useVariables) -{ -} - - -AutoReplaceMap::AutoReplaceMap(TCHAR *aFilename, Dictionary *dict) -{ - this->dict = dict; - lstrcpyn(filename, aFilename, MAX_REGS(filename)); - loadAutoReplaceMap(); -} - -void AutoReplaceMap::loadAutoReplaceMap() -{ - FILE *file = _tfopen(filename, _T("rb")); - if (file == NULL) - return; - - char tmp[1024]; - char c; - int pos = 0; - while((c = fgetc(file)) != EOF) - { - if (c == '\n' || c == '\r' || pos >= MAX_REGS(tmp) - 1) - { - if (pos > 0) - { - tmp[pos] = '\0'; - - // Get from - BOOL useVars; - char *p; - if ((p = strstr(tmp, "->")) != NULL) - { - *p = '\0'; - p += 2; - useVars = FALSE; - } - else if ((p = strstr(tmp, "-V>")) != NULL) - { - *p = '\0'; - p += 3; - useVars = TRUE; - } - - if (p != NULL) - { - Utf8ToTchar find(tmp); - Utf8ToTchar replace(p); - - lstrtrim(find); - lstrtrim(replace); - - if (find[0] != 0 && replace[0] != 0) - replacements[find.get()] = AutoReplacement(replace, useVars); - } - } - - pos = 0; - } - else - { - tmp[pos] = c; - pos ++; - } - } - fclose(file); -} - -void AutoReplaceMap::writeAutoReplaceMap() -{ - // Create path - TCHAR *p = _tcsrchr(filename, _T('\\')); - if (p != NULL) - { - *p = 0; - CreatePath(filename); - *p = _T('\\'); - } - - // Write it - FILE *file = _tfopen(filename, _T("wb")); - if (file != NULL) - { - map::iterator it = replacements.begin(); - for (; it != replacements.end(); it++) - { - AutoReplacement &ar = it->second; - - TcharToUtf8 find(it->first.c_str()); - TcharToUtf8 replace(ar.replace.c_str()); - - if (ar.useVariables) - fprintf(file, "%s-V>%s\n", (const char *)find, (const char *)replace); - else - fprintf(file, "%s->%s\n", (const char *)find, (const char *)replace); - } - fclose(file); - } -} - - -BOOL AutoReplaceMap::isWordChar(TCHAR c) -{ - if (IsNumber(c)) - return TRUE; - - if (_tcschr(_T("-_.!@#$%&*()[]{}<>:?/\\=+"), c) != NULL) - return TRUE; - - return dict->isWordChar(c); -} - - -TCHAR * AutoReplaceMap::autoReplace(const TCHAR * word) -{ - scoped_free from = _tcslwr(_tcsdup(word)); - - if (replacements.find(from.get()) == replacements.end()) - return NULL; - - AutoReplacement &ar = replacements[from.get()]; - - TCHAR *to; - if (ar.useVariables) - to = variables_parsedup((TCHAR *) ar.replace.c_str(), (TCHAR *) word, NULL); - else - to = _tcsdup(ar.replace.c_str()); - - // Wich case to use? - size_t len = lstrlen(word); - size_t i; - for (i = 0; i < len; i++) - if (IsCharLower(word[i])) - break; - - if (i <= 0) - { - // All lower - return to; - } - else if (i >= len) - { - // All upper - return CharUpper(to); - } - else - { - // First upper - TCHAR tmp[2]; - tmp[0] = to[0]; - tmp[1] = _T('\0'); - CharUpper(tmp); - to[0] = tmp[0]; - return to; - } -} - -TCHAR * AutoReplaceMap::filterText(const TCHAR *find) -{ - TCHAR *ret = _tcsdup(find); - int len = lstrlen(ret); - int pos = 0; - for(int i = 0; i < len; i++) - if (isWordChar(find[i])) - ret[pos++] = ret[i]; - ret[pos] = 0; - return CharLower(ret); -} - -void AutoReplaceMap::add(const TCHAR * aFrom, const TCHAR * to, BOOL useVariables) -{ - scoped_free from = filterText(aFrom); - - replacements[from.get()] = AutoReplacement(to, useVariables); - - writeAutoReplaceMap(); -} - -void AutoReplaceMap::copyMap(map *replacements) -{ - *replacements = this->replacements; -} - -void AutoReplaceMap::setMap(const map &replacements) -{ - this->replacements.clear(); - - map::const_iterator it = replacements.begin(); - for (; it != replacements.end(); it++) - { - scoped_free from = filterText(it->first.c_str()); - this->replacements[from.get()] = it->second; - } - - writeAutoReplaceMap(); -} - - - diff --git a/plugins/SpellChecker/autoreplace.h b/plugins/SpellChecker/autoreplace.h deleted file mode 100644 index e7e2efbb55..0000000000 --- a/plugins/SpellChecker/autoreplace.h +++ /dev/null @@ -1,70 +0,0 @@ -/* -Copyright (C) 2009-2010 Ricardo Pescuma Domenecci - -This is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public -License as published by the Free Software Foundation; either -version 2 of the License, or (at your option) any later version. - -This is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with this file; see the file license.txt. If -not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -Boston, MA 02111-1307, USA. -*/ - - -#ifndef __AUTOREPLACE_H__ -# define __AUTOREPLACE_H__ - - -struct AutoReplacement -{ - tstring replace; - BOOL useVariables; - - AutoReplacement(); - AutoReplacement(const TCHAR *replace, BOOL useVariables); -}; - - -class Dictionary; - - -class AutoReplaceMap -{ -private: - TCHAR filename[1024]; - Dictionary *dict; - map replacements; - - void loadAutoReplaceMap(); - void writeAutoReplaceMap(); - -public: - AutoReplaceMap(TCHAR *filename, Dictionary *dict); - - TCHAR *filterText(const TCHAR *find); - BOOL isWordChar(TCHAR c); - - /// Return an auto replacement to a word or NULL if none exists. - /// You have to free the item. - TCHAR * autoReplace(const TCHAR * word); - - /// Add a word to the list of auto-replaced words - void add(const TCHAR * from, const TCHAR * to, BOOL useVariables = FALSE); - - /// Make a copy of the auto replace map - void copyMap(map *replacements); - - /// Make a copy of the auto replace map - void setMap(const map &replacements); -}; - - - -#endif // __AUTOREPLACE_H__ diff --git a/plugins/SpellChecker/codepages.cpp b/plugins/SpellChecker/codepages.cpp deleted file mode 100644 index 6441cda1b0..0000000000 --- a/plugins/SpellChecker/codepages.cpp +++ /dev/null @@ -1,307 +0,0 @@ - -struct { - char *name; - UINT codepage; -} codepages[] = { - { "ISO8859-1", 28591 }, - { "UTF-7", CP_UTF7 }, - { "UTF-8", CP_UTF8 }, - { "UTF7", CP_UTF7 }, - { "UTF8", CP_UTF8 }, - { "ISO8859-2", 28592 }, - { "ISO8859-3", 28593 }, - { "ISO8859-4", 28594 }, - { "ISO8859-5", 28595 }, - { "ISO8859-6", 28596 }, - { "ISO8859-7", 28597 }, - { "ISO8859-8", 28598 }, - { "ISO8859-9", 28599 }, - { "ASMO-708", 708 }, - { "DOS-720", 720 }, - { "iso-8859-6", 28596 }, - { "arabic", 28596 }, - { "csISOLatinArabic", 28596 }, - { "ECMA-114", 28596 }, - { "ISO_8859-6", 28596 }, - { "ISO_8859-6:1987", 28596 }, - { "iso-ir-127", 28596 }, - { "x-mac-arabic", 10004 }, - { "windows-1256", 1256 }, - { "cp1256", 1256 }, - { "ibm775", 775 }, - { "CP500", 775 }, - { "iso-8859-4", 28594 }, - { "csISOLatin4", 28594 }, - { "ISO_8859-4", 28594 }, - { "ISO_8859-4:1988", 28594 }, - { "iso-ir-110", 28594 }, - { "l4", 28594 }, - { "latin4", 28594 }, - { "windows-1257", 1257 }, - { "ibm852", 852 }, - { "cp852", 852 }, - { "iso-8859-2", 28592 }, - { "csISOLatin2", 28592 }, - { "iso_8859-2", 28592 }, - { "iso_8859-2:1987", 28592 }, - { "iso-ir-101", 28592 }, - { "l2", 28592 }, - { "latin2", 28592 }, - { "x-mac-ce", 10029 }, - { "windows-1250", 1250 }, - { "x-cp1250", 1250 }, - { "EUC-CN", 51936 }, - { "x-euc-cn", 51936 }, - { "gb2312", 936 }, - { "chinese", 936 }, - { "CN-GB", 936 }, - { "csGB2312", 936 }, - { "csGB231280", 936 }, - { "csISO58GB231280", 936 }, - { "GB_2312-80", 936 }, - { "GB231280", 936 }, - { "GB2312-80", 936 }, - { "GBK", 936 }, - { "iso-ir-58", 936 }, - { "hz-gb-2312", 52936 }, - { "x-mac-chinesesimp", 10008 }, - { "big5", 950 }, - { "cn-big5", 950 }, - { "csbig5", 950 }, - { "x-x-big5", 950 }, - { "x-Chinese-CNS", 20000 }, - { "x-Chinese-Eten", 20002 }, - { "x-mac-chinesetrad", 10002 }, - { "cp866", 866 }, - { "ibm866", 866 }, - { "iso-8859-5", 28595 }, - { "csISOLatin5", 28595 }, - { "csISOLatinCyrillic", 28595 }, - { "cyrillic", 28595 }, - { "ISO_8859-5", 28595 }, - { "ISO_8859-5:1988", 28595 }, - { "iso-ir-144", 28595 }, - { "l5", 28595 }, - { "KOI8-R", 20866 }, - { "csKOI8R", 20866 }, - { "koi", 20866 }, - { "koi8", 20866 }, - { "koi8r", 20866 }, - { "KOI8-U", 21866 }, - { "koi8-ru", 21866 }, - { "x-mac-cyrillic", 10007 }, - { "windows-1251", 1251 }, - { "Win1251", 1251 }, - { "x-cp1251", 1251 }, - { "x-Europa", 29001 }, - { "x-IA5-German", 20106 }, - { "ibm737", 737 }, - { "iso-8859-7", 28597 }, - { "csISOLatinGreek", 28597 }, - { "ECMA-118", 28597 }, - { "ELOT_928", 28597 }, - { "greek", 28597 }, - { "greek8", 28597 }, - { "ISO_8859-7", 28597 }, - { "ISO_8859-7:1987", 28597 }, - { "iso-ir-126", 28597 }, - { "x-mac-greek", 10006 }, - { "windows-1253", 1253 }, - { "ibm869", 869 }, - { "DOS-862", 862 }, - { "iso-8859-8-i", 38598 }, - { "logical", 38598 }, - { "iso-8859-8", 28598 }, - { "csISOLatinHebrew", 28598 }, - { "hebrew", 28598 }, - { "ISO_8859-8", 28598 }, - { "ISO_8859-8:1988", 28598 }, - { "ISO-8859-8", 28598 }, - { "iso-ir-138", 28598 }, - { "visual", 28598 }, - { "x-mac-hebrew", 10005 }, - { "windows-1255", 1255 }, - { "ISO_8859-8-I", 1255 }, - { "ISO-8859-8", 1255 }, - { "x-EBCDIC-Arabic", 20420 }, - { "x-EBCDIC-CyrillicRussian", 20880 }, - { "x-EBCDIC-CyrillicSerbianBulgarian", 21025 }, - { "x-EBCDIC-DenmarkNorway", 20277 }, - { "x-ebcdic-denmarknorway-euro", 1142 }, - { "x-EBCDIC-FinlandSweden", 20278 }, - { "x-ebcdic-finlandsweden-euro", 1143 }, - { "X-EBCDIC-France", 1143 }, - { "X-EBCDIC-France", 1143 }, - { "x-ebcdic-france-euro", 1147 }, - { "x-EBCDIC-Germany", 20273 }, - { "x-ebcdic-germany-euro", 1141 }, - { "x-EBCDIC-GreekModern", 875 }, - { "x-EBCDIC-Greek", 20423 }, - { "x-EBCDIC-Hebrew", 20424 }, - { "x-EBCDIC-Icelandic", 20871 }, - { "x-ebcdic-icelandic-euro", 1149 }, - { "x-ebcdic-international-euro", 1148 }, - { "x-EBCDIC-Italy", 20280 }, - { "x-ebcdic-italy-euro", 1144 }, - { "x-EBCDIC-JapaneseAndKana", 50930 }, - { "x-EBCDIC-JapaneseAndJapaneseLatin", 50939 }, - { "x-EBCDIC-JapaneseAndUSCanada", 50931 }, - { "x-EBCDIC-JapaneseKatakana", 20290 }, - { "x-EBCDIC-KoreanAndKoreanExtended", 50933 }, - { "x-EBCDIC-KoreanExtended", 20833 }, - { "CP870", 870 }, - { "x-EBCDIC-SimplifiedChinese", 50935 }, - { "X-EBCDIC-Spain", 20284 }, - { "x-ebcdic-spain-euro", 1145 }, - { "x-EBCDIC-Thai", 20838 }, - { "x-EBCDIC-TraditionalChinese", 50937 }, - { "CP1026", 1026 }, - { "x-EBCDIC-Turkish", 20905 }, - { "x-EBCDIC-UK", 20285 }, - { "x-ebcdic-uk-euro", 1146 }, - { "ebcdic-cp-us", 37 }, - { "x-ebcdic-cp-us-euro", 1140 }, - { "ibm861", 861 }, - { "x-mac-icelandic", 10079 }, - { "x-iscii-as", 57006 }, - { "x-iscii-be", 57003 }, - { "x-iscii-de", 57002 }, - { "x-iscii-gu", 57010 }, - { "x-iscii-ka", 57008 }, - { "x-iscii-ma", 57009 }, - { "x-iscii-or", 57007 }, - { "x-iscii-pa", 57011 }, - { "x-iscii-ta", 57004 }, - { "x-iscii-te", 57005 }, - { "euc-jp", 51932 }, - { "csEUCPkdFmtJapanese", 51932 }, - { "Extended_UNIX_Code_Packed_Format_for_Japanese", 51932 }, - { "x-euc", 51932 }, - { "x-euc-jp", 51932 }, - { "iso-2022-jp", 50220 }, - { "iso-2022-jp", 50222 }, - { "_iso-2022-jp$SIO", 50222 }, - { "csISO2022JP", 50221 }, - { "_iso-2022-jp", 50221 }, - { "x-mac-japanese", 10001 }, - { "shift_jis", 932 }, - { "csShiftJIS", 932 }, - { "csWindows31J", 932 }, - { "ms_Kanji", 932 }, - { "shift-jis", 932 }, - { "x-ms-cp932", 932 }, - { "x-sjis", 932 }, - { "ks_c_5601-1987", 949 }, - { "csKSC56011987", 949 }, - { "euc-kr", 949 }, - { "iso-ir-149", 949 }, - { "korean", 949 }, - { "ks_c_5601", 949 }, - { "ks_c_5601_1987", 949 }, - { "ks_c_5601-1989", 949 }, - { "KSC_5601", 949 }, - { "KSC5601", 949 }, - { "euc-kr", 51949 }, - { "csEUCKR", 51949 }, - { "iso-2022-kr", 50225 }, - { "csISO2022KR", 50225 }, - { "Johab", 1361 }, - { "x-mac-korean", 10003 }, - { "iso-8859-3", 28593 }, - { "csISO", 28593 }, - { "Latin3", 28593 }, - { "ISO_8859-3", 28593 }, - { "ISO_8859-3:1988", 28593 }, - { "iso-ir-109", 28593 }, - { "l3", 28593 }, - { "latin3", 28593 }, - { "iso-8859-15", 28605 }, - { "csISO", 28605 }, - { "Latin9", 28605 }, - { "ISO_8859-15", 28605 }, - { "l9", 28605 }, - { "latin9", 28605 }, - { "x-IA5-Norwegian", 20108 }, - { "IBM437", 437 }, - { "437", 437 }, - { "cp437", 437 }, - { "csPC8", 437 }, - { "CodePage437", 437 }, - { "x-IA5-Swedish", 20107 }, - { "windows-874", 874 }, - { "DOS-874", 874 }, - { "iso-8859-11", 874 }, - { "TIS-620", 874 }, - { "ibm857", 857 }, - { "iso-8859-9", 28599 }, - { "csISO", 28599 }, - { "Latin5", 28599 }, - { "ISO_8859-9", 28599 }, - { "ISO_8859-9:1989", 28599 }, - { "iso-ir-148", 28599 }, - { "l5", 28599 }, - { "latin5", 28599 }, - { "x-mac-turkish", 10081 }, - { "windows-1254", 1254 }, - { "ISO_8859-9", 1254 }, - { "ISO_8859-9:1989", 1254 }, - { "iso-8859-9", 1254 }, - { "iso-ir-148", 1254 }, - { "latin5", 1254 }, - { "unicode", 1200 }, - { "utf-16", 1200 }, - { "unicodeFFFE", 1201 }, - { "utf-7", 65000 }, - { "csUnicode11UTF7", 65000 }, - { "unicode-1-1-utf-7", 65000 }, - { "x-unicode-2-0-utf-7", 65000 }, - { "utf-8", 65001 }, - { "unicode-1-1-utf-8", 65001 }, - { "unicode-2-0-utf-8", 65001 }, - { "x-unicode-2-0-utf-8", 65001 }, - { "us-ascii", 20127 }, - { "ANSI_X3.4-1968", 20127 }, - { "ANSI_X3.4-1986", 20127 }, - { "ascii", 20127 }, - { "cp367", 20127 }, - { "csASCII", 20127 }, - { "IBM367", 20127 }, - { "ISO_646.irv:1991", 20127 }, - { "ISO646-US", 20127 }, - { "iso-ir-6us", 20127 }, - { "windows-1258", 1258 }, - { "ibm850", 850 }, - { "x-IA5", 20105 }, - { "iso-8859-1", 28591 }, - { "cp819", 28591 }, - { "csISO", 28591 }, - { "Latin1", 28591 }, - { "ibm819", 28591 }, - { "iso_8859-1", 28591 }, - { "iso_8859-1:1987", 28591 }, - { "iso-ir-100", 28591 }, - { "l1", 28591 }, - { "latin1", 28591 }, - { "macintosh", 10000 }, - { "Windows-1252", 1252 }, - { "ANSI_X3.4-1968", 1252 }, - { "ANSI_X3.4-1986", 1252 }, - { "ascii", 1252 }, - { "cp367", 1252 }, - { "cp819", 1252 }, - { "csASCII", 1252 }, - { "IBM367", 1252 }, - { "ibm819", 1252 }, - { "ISO_646.irv:1991", 1252 }, - { "iso_8859-1", 1252 }, - { "iso_8859-1:1987", 1252 }, - { "ISO646-US", 1252 }, - { "iso-ir-100", 1252 }, - { "iso-ir-6", 1252 }, - { "latin1", 1252 }, - { "us", 1252 }, - { "us-ascii", 1252 }, - { "x-ansi", 1252 }, - { "microsoft-cp1251", 1251 } -}; - diff --git a/plugins/SpellChecker/commons.h b/plugins/SpellChecker/commons.h deleted file mode 100644 index c03fc3d7cd..0000000000 --- a/plugins/SpellChecker/commons.h +++ /dev/null @@ -1,154 +0,0 @@ -/* -Copyright (C) 2006-2010 Ricardo Pescuma Domenecci - -This is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public -License as published by the Free Software Foundation; either -version 2 of the License, or (at your option) any later version. - -This is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with this file; see the file license.txt. If -not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -Boston, MA 02111-1307, USA. -*/ - -#ifndef __COMMONS_H__ -# define __COMMONS_H__ - - -#define OEMRESOURCE -#define _CRT_SECURE_NO_WARNINGS -#include -#include -#include -#include -#include -#include -#include -#include - -// Disable "...truncated to '255' characters in the debug information" warnings -#pragma warning(disable: 4786) - -#include -#include -#include -using namespace std; - - -// Miranda headers -#define MIRANDA_VER 0x0900 -#define MIRANDA_CUSTOM_LP -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -//own includes -#include "m_folders.h" -#include "m_metacontacts.h" -#include "m_variables.h" -#include "m_userinfoex.h" - -#include "../utils/mir_memory.h" -#include "../utils/mir_options.h" -#include "../utils/mir_icons.h" -#include "../utils/tstring.h" -#include "../utils/utf8_helpers.h" -#include "../utils/scope.h" - -#include "resource.h" -#include "Version.h" -#include "m_spellchecker.h" -#include "options.h" -#include "autoreplace.h" -#include "dictionary.h" -#include "ardialog.h" -#include "RichEdit.h" - - -#define MODULE_NAME "SpellChecker" - -#define FLAGS_DLL_FOLDER _T("%miranda_path%\\Icons") -#define CUSTOM_DICTIONARIES_FOLDER _T("%miranda_userdata%\\Dictionaries") -#define DICTIONARIES_FOLDER _T("%miranda_path%\\Dictionaries") - -// Global Variables -extern HINSTANCE hInst; -extern BOOL uinfoex_enabled; -extern BOOL variables_enabled; - - -#define MAX_REGS(_A_) ( sizeof(_A_) / sizeof(_A_[0])) -#define FREE(_m_) if (_m_ != NULL) { free(_m_); _m_ = NULL; } - - -#define ICON_SIZE 16 - - -extern LIST languages; - -struct WrongWordPopupMenuData -{ - Suggestions suggestions; - TCHAR *word; - CHARRANGE pos; - HMENU hMeSubMenu; - HMENU hCorrectSubMenu; - HMENU hReplaceSubMenu; -}; - -struct Dialog -{ - HWND hwnd; - HWND hwnd_owner; - HANDLE hContact; - char name[64]; - Dictionary *lang; - TCHAR lang_name[32]; - WNDPROC old_edit_proc; - WNDPROC owner_old_edit_proc; - BOOL enabled; - BOOL srmm; - - RichEdit *re; - - HWND hwnd_menu_owner; - WNDPROC old_menu_proc; - - BOOL changed; - BOOL markedSomeWord; - int old_text_len; - - // Popup data - HMENU hLanguageSubMenu; - HMENU hWrongWordsSubMenu; - vector *wrong_words; -}; - -HICON IcoLib_LoadIcon(Dictionary *dict, BOOL copy = FALSE); - -BOOL CenterParent(HWND hwnd); -BOOL CreatePath(const TCHAR *path); -TCHAR *lstrtrim(TCHAR *str); -BOOL lstreq(TCHAR *a, TCHAR *b, size_t len = -1); -BOOL IsNumber(TCHAR c); - -#endif // __COMMONS_H__ diff --git a/plugins/SpellChecker/dictionary.cpp b/plugins/SpellChecker/dictionary.cpp deleted file mode 100644 index ac24af66ea..0000000000 --- a/plugins/SpellChecker/dictionary.cpp +++ /dev/null @@ -1,721 +0,0 @@ -/* -Copyright (C) 2006-2010 Ricardo Pescuma Domenecci - -This is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public -License as published by the Free Software Foundation; either -version 2 of the License, or (at your option) any later version. - -This is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with this file; see the file license.txt. If -not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -Boston, MA 02111-1307, USA. -*/ - - -#include "commons.h" - -#include "hunspell/config.h" -#include "hunspell/hunspell.hxx" -#include "hunspell/csutil.hxx" - - -#include "codepages.cpp" - - -DWORD WINAPI LoadThread(LPVOID hd); - -// Additional languages that i could not find in Windows -TCHAR *aditionalLanguages[] = { - _T("tl_PH"), _T("Tagalog (Philippines)"), - _T("de_frami_neu"), _T("German (Germany)") -}; - - - -#define LANGUAGE_NOT_LOADED 1 -#define LANGUAGE_LOADING -1 -#define LANGUAGE_LOADED 0 - - - -class HunspellDictionary : public Dictionary { -protected: - TCHAR fileWithoutExtension[1024]; - TCHAR userPath[1024]; - volatile int loaded; - Hunspell *hunspell; - TCHAR *wordChars; - UINT codePage; - - void loadCustomDict() - { - TCHAR filename[1024]; - mir_sntprintf(filename, MAX_REGS(filename), _T("%s\\%s.cdic"), userPath, language); - - FILE *file = _tfopen(filename, _T("rb")); - if (file != NULL) - { - char tmp[1024]; - char c; - int pos = 0; - while((c = fgetc(file)) != EOF) - { - if (c == '\n' || c == '\r' || pos >= MAX_REGS(tmp) - 1) - { - if (pos > 0) - { - tmp[pos] = '\0'; - hunspell->add(tmp); - } - - pos = 0; - } - else - { - tmp[pos] = c; - pos ++; - } - } - fclose(file); - } - } - - void appendToCustomDict(const TCHAR *word) - { - CreatePath(userPath); - - TCHAR filename[1024]; - mir_sntprintf(filename, MAX_REGS(filename), _T("%s\\%s.cdic"), userPath, language); - - FILE *file = _tfopen(filename, _T("ab")); - if (file != NULL) - { - char tmp[1024]; - toHunspell(tmp, word, MAX_REGS(tmp)); - fprintf(file, "%s\n", tmp); - fclose(file); - } - } - - virtual void addWordInternal(const TCHAR * word) - { - if (loaded != LANGUAGE_LOADED) - return; - - char hunspell_word[1024]; - toHunspell(hunspell_word, word, MAX_REGS(hunspell_word)); - - hunspell->add(hunspell_word); - } - - void toHunspell(char *hunspellWord, const TCHAR *word, size_t hunspellWordLen) - { - - WideCharToMultiByte(codePage, 0, word, -1, hunspellWord, hunspellWordLen, NULL, NULL); - - } - - TCHAR * fromHunspell(const char *hunspellWord) - { - - int len = MultiByteToWideChar(codePage, 0, hunspellWord, -1, NULL, 0); - WCHAR *ret = (WCHAR *) malloc((len + 1) * sizeof(WCHAR)); - MultiByteToWideChar(codePage, 0, hunspellWord, -1, ret, len + 1); - return ret; - - } - - TCHAR * fromHunspellAndFree(char *hunspellWord) - { - if (hunspellWord == NULL) - return NULL; - - TCHAR *ret = fromHunspell(hunspellWord); - free(hunspellWord); - return ret; - } - -public: - HunspellDictionary(TCHAR *aLanguage, TCHAR *aFileWithoutExtension, TCHAR *anUserPath, TCHAR *aSource) - { - lstrcpyn(language, aLanguage, MAX_REGS(language)); - lstrcpyn(fileWithoutExtension, aFileWithoutExtension, MAX_REGS(fileWithoutExtension)); - lstrcpyn(userPath, anUserPath, MAX_REGS(userPath)); - if (aSource == NULL) - source[0] = _T('\0'); - else - lstrcpyn(source, aSource, MAX_REGS(source)); - - loaded = LANGUAGE_NOT_LOADED; - localized_name[0] = _T('\0'); - english_name[0] = _T('\0'); - full_name[0] = _T('\0'); - hunspell = NULL; - wordChars = NULL; - codePage = CP_ACP; - autoReplace = NULL; - } - - virtual ~HunspellDictionary() - { - if (hunspell != NULL) - delete hunspell; - if (wordChars != NULL) - free(wordChars); - } - - TCHAR * merge(TCHAR * s1, TCHAR *s2) - { - int len1 = (s1 == NULL ? 0 : lstrlen(s1)); - int len2 = (s2 == NULL ? 0 : lstrlen(s2)); - - TCHAR *ret; - if (len1 > 0 && len2 > 0) - { - ret = (TCHAR *) malloc(sizeof(TCHAR) * (len1 + len2 + 1)); - lstrcpyn(ret, s1, len1+1); - lstrcpyn(&ret[len1], s2, len2+1); - - FREE(s1); - FREE(s2); - } - else if (len1 > 0) - { - ret = s1; - FREE(s2); - } - else if (len2 > 0) - { - ret = s2; - FREE(s1); - } - else - { - ret = (TCHAR *) malloc(sizeof(TCHAR)); - ret[0] = 0; - - FREE(s1); - FREE(s2); - } - - // Remove duplicated chars - int last = lstrlen(ret) - 1; - for(int i = 0; i <= last; i++) - { - TCHAR c = ret[i]; - for(int j = last; j > i; j--) - { - if (c != ret[j]) - continue; - if (j != last) - ret[j] = ret[last]; - ret[last] = _T('\0'); - last--; - } - } - - return ret; - } - - - void loadThread() - { - char dic[1024]; - char aff[1024]; - - - mir_snprintf(dic, MAX_REGS(dic), "%S.dic", fileWithoutExtension); - mir_snprintf(aff, MAX_REGS(aff), "%S.aff", fileWithoutExtension); - - - hunspell = new Hunspell(aff, dic); - - // Get codepage - const char *dic_enc = hunspell->get_dic_encoding(); - - TCHAR *hwordchars; - if (strcmp(dic_enc, "UTF-8") == 0) - { - codePage = CP_UTF8; - - - int wcs_len; - hwordchars = fromHunspell((char *) hunspell->get_wordchars_utf16(&wcs_len)); - - } - else - { - for (int i = 0; i < MAX_REGS(codepages); i++) - { - if (_strcmpi(codepages[i].name, dic_enc) == 0) - { - if (IsValidCodePage(codepages[i].codepage)) - codePage = codepages[i].codepage; - break; - } - } - - hwordchars = fromHunspell(hunspell->get_wordchars()); - } - - TCHAR *casechars = fromHunspellAndFree(get_casechars(dic_enc)); - TCHAR *try_string = fromHunspellAndFree(hunspell->get_try_string()); - - wordChars = merge(merge(casechars, hwordchars), try_string); - - // Make a suggestion to load hunspell internalls - char ** words = NULL; - int count = hunspell->suggest(&words, "asdf"); - for (int i = 0; i < count; i++) - free(words[i]); - if (words != NULL) - free(words); - - loadCustomDict(); - - loaded = LANGUAGE_LOADED; - } - - // Return TRUE if the word is correct - virtual BOOL spell(const TCHAR *word) - { - load(); - if (loaded != LANGUAGE_LOADED) - return TRUE; - - // TODO Check if it was generated by auto-replacement - - char hunspell_word[1024]; - toHunspell(hunspell_word, word, MAX_REGS(hunspell_word)); - - return hunspell->spell(hunspell_word); - } - - // Return a list of suggestions to a word - virtual Suggestions suggest(const TCHAR * word) - { - Suggestions ret = {0}; - - load(); - if (loaded != LANGUAGE_LOADED) - return ret; - - char hunspell_word[1024]; - toHunspell(hunspell_word, word, MAX_REGS(hunspell_word)); - - char ** words = NULL; - ret.count = hunspell->suggest(&words, hunspell_word); - - if (ret.count > 0) - { - // Oki, lets make our array - ret.words = (TCHAR **) malloc(ret.count * sizeof(TCHAR *)); - for (unsigned i = 0; i < ret.count; i++) - { - ret.words[i] = fromHunspell(words[i]); - free(words[i]); - } - } - - if (words != NULL) - free(words); - - return ret; - } - - // Return a list of auto suggestions to a word - virtual Suggestions autoSuggest(const TCHAR * word) - { - Suggestions ret = {0}; - - load(); - if (loaded != LANGUAGE_LOADED) - return ret; - - char hunspell_word[1024]; - toHunspell(hunspell_word, word, MAX_REGS(hunspell_word)); - - char ** words; - int count = hunspell->suggest_auto(&words, hunspell_word); - - if (count <= 0) - return ret; - - // Oki, lets make our array - ret.count = count; - ret.words = (TCHAR **) malloc(ret.count * sizeof(TCHAR *)); - for (int i = 0; i < count; i++) - { - ret.words[i] = fromHunspell(words[i]); - free(words[i]); - } - free(words); - - return ret; - } - - // Return a list of auto suggestions to a word - // You have to free the list AND each item - virtual TCHAR * autoSuggestOne(const TCHAR * word) - { - load(); - if (loaded != LANGUAGE_LOADED) - return NULL; - - char hunspell_word[1024]; - toHunspell(hunspell_word, word, MAX_REGS(hunspell_word)); - - char ** words; - int count = hunspell->suggest_auto(&words, hunspell_word); - - if (count <= 0) - return NULL; - - TCHAR *ret = fromHunspell(words[0]); - - // Oki, lets make our array - for (int i = 0; i < count; i++) - free(words[i]); - free(words); - - return ret; - } - - // Return TRUE if the char is a word char - virtual BOOL isWordChar(TCHAR c) - { - if (c == 0) - return FALSE; - - load(); - if (loaded != LANGUAGE_LOADED) - return TRUE; - - return _tcschr(wordChars, (_TINT) c) != NULL; - } - - // Assert that all needed data is loaded - virtual void load() - { - if (loaded == LANGUAGE_NOT_LOADED) - { - loaded = LANGUAGE_LOADING; - - DWORD thread_id; - CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE) LoadThread, - (LPVOID) this, 0, &thread_id); - } - } - - virtual BOOL isLoaded() - { - return loaded == LANGUAGE_LOADED; - } - - - // Add a word to the user custom dict - virtual void addWord(const TCHAR * word) - { - addWordInternal(word); - appendToCustomDict(word); - } - - // Add a word to the list of ignored words - virtual void ignoreWord(const TCHAR * word) - { - addWordInternal(word); - } -}; - - -DWORD WINAPI LoadThread(LPVOID hd) -{ - HunspellDictionary *dict = (HunspellDictionary *) hd; - dict->loadThread(); - return 0; -} - - - -// To use with EnumLocalesProc :( -LIST *tmp_dicts; - -// To get the names of the languages -BOOL CALLBACK EnumLocalesProc(LPTSTR lpLocaleString) -{ - TCHAR *stopped = NULL; - USHORT langID = (USHORT) _tcstol(lpLocaleString, &stopped, 16); - - TCHAR ini[32]; - TCHAR end[32]; - GetLocaleInfo(MAKELCID(langID, 0), LOCALE_SISO639LANGNAME, ini, MAX_REGS(ini)); - GetLocaleInfo(MAKELCID(langID, 0), LOCALE_SISO3166CTRYNAME, end, MAX_REGS(end)); - - TCHAR name[64]; - mir_sntprintf(name, MAX_REGS(name), _T("%s_%s"), ini, end); - - for(int i = 0; i < tmp_dicts->getCount(); i++) - { - Dictionary *dict = (*tmp_dicts)[i]; - if (lstrcmpi(dict->language, name) == 0) - { -#define LOCALE_SLOCALIZEDLANGUAGENAME 0x0000006f -#define LOCALE_SNATIVEDISPLAYNAME 0x00000073 - - GetLocaleInfo(MAKELCID(langID, 0), LOCALE_SENGLANGUAGE, dict->english_name, MAX_REGS(dict->english_name)); - - GetLocaleInfo(MAKELCID(langID, 0), LOCALE_SLANGUAGE, dict->localized_name, MAX_REGS(dict->localized_name)); - if (dict->localized_name[0] == 0) - GetLocaleInfo(MAKELCID(langID, 0), LOCALE_SLOCALIZEDLANGUAGENAME, dict->localized_name, MAX_REGS(dict->localized_name)); - if (dict->localized_name[0] == 0) - GetLocaleInfo(MAKELCID(langID, 0), LOCALE_SNATIVEDISPLAYNAME, dict->localized_name, MAX_REGS(dict->localized_name)); - if (dict->localized_name[0] == 0 && dict->english_name[0] != 0) - { - TCHAR country[1024]; - GetLocaleInfo(MAKELCID(langID, 0), LOCALE_SENGCOUNTRY, country, MAX_REGS(country)); - - TCHAR name[1024]; - if (country[0] != 0) - mir_sntprintf(name, MAX_REGS(name), _T("%s (%s)"), dict->english_name, country); - else - lstrcpyn(name, dict->english_name, MAX_REGS(name)); - - lstrcpyn(dict->localized_name, TranslateTS(name), MAX_REGS(dict->localized_name)); - } - - if (dict->localized_name[0] != 0) - { - mir_sntprintf(dict->full_name, MAX_REGS(dict->full_name), _T("%s [%s]"), dict->localized_name, dict->language); - } - break; - } - } - return TRUE; -} - - -void GetDictsInfo(LIST &dicts) -{ - tmp_dicts = &dicts; - EnumSystemLocales(EnumLocalesProc, LCID_SUPPORTED); - - // Try to get name from DB - for(int i = 0; i < dicts.getCount(); i++) - { - Dictionary *dict = dicts[i]; - - if (dict->full_name[0] == _T('\0')) - { - DBVARIANT dbv; - - char lang[128]; - WideCharToMultiByte(CP_ACP, 0, dict->language, -1, lang, sizeof(lang), NULL, NULL); - if (!DBGetContactSettingTString(NULL, MODULE_NAME, lang, &dbv)) - - { - lstrcpyn(dict->localized_name, dbv.ptszVal, MAX_REGS(dict->localized_name)); - DBFreeVariant(&dbv); - } - - if (dict->localized_name[0] == _T('\0')) - { - for(size_t j = 0; j < MAX_REGS(aditionalLanguages); j+=2) - { - if (lstrcmp(aditionalLanguages[j], dict->language) == 0) - { - lstrcpyn(dict->localized_name, aditionalLanguages[j+1], MAX_REGS(dict->localized_name)); - break; - } - } - } - - if (dict->localized_name[0] != _T('\0')) - { - mir_sntprintf(dict->full_name, MAX_REGS(dict->full_name), _T("%s [%s]"), dict->localized_name, dict->language); - } - else - { - lstrcpyn(dict->full_name, dict->language, MAX_REGS(dict->full_name)); - } - } - } -} - - -void GetHunspellDictionariesFromFolder(LIST &dicts, TCHAR *path, TCHAR *user_path, TCHAR *source) -{ - // Load the language files and create an array with then - TCHAR file[1024]; - mir_sntprintf(file, MAX_REGS(file), _T("%s\\*.dic"), path); - - BOOL found = FALSE; - - WIN32_FIND_DATA ffd = {0}; - HANDLE hFFD = FindFirstFile(file, &ffd); - if (hFFD != INVALID_HANDLE_VALUE) - { - do - { - mir_sntprintf(file, MAX_REGS(file), _T("%s\\%s"), path, ffd.cFileName); - - // Check .dic - DWORD attrib = GetFileAttributes(file); - if (attrib == 0xFFFFFFFF || (attrib & FILE_ATTRIBUTE_DIRECTORY)) - continue; - - // See if .aff exists too - lstrcpy(&file[lstrlen(file) - 4], _T(".aff")); - attrib = GetFileAttributes(file); - if (attrib == 0xFFFFFFFF || (attrib & FILE_ATTRIBUTE_DIRECTORY)) - continue; - - ffd.cFileName[lstrlen(ffd.cFileName)-4] = _T('\0'); - - TCHAR *lang = ffd.cFileName; - - // Replace - for _ - int i; - for(i = 0; i < lstrlen(lang); i++) - if (lang[i] == _T('-')) - lang[i] = _T('_'); - - // Check if dict is new - BOOL exists = FALSE; - for(i = 0; i < dicts.getCount() && !exists; i++) - if (lstrcmp(dicts[i]->language, lang) == 0) - exists = TRUE; - - if (!exists) - { - found = TRUE; - file[lstrlen(file) - 4] = _T('\0'); - dicts.insert(new HunspellDictionary(lang, file, user_path, source)); - } - } - while(FindNextFile(hFFD, &ffd)); - - FindClose(hFFD); - } -} - - -// Return a list of avaible languages -void GetAvaibleDictionaries(LIST &dicts, TCHAR *path, TCHAR *user_path) -{ - // Get miranda folder dicts - GetHunspellDictionariesFromFolder(dicts, path, user_path, NULL); - - if (opts.use_other_apps_dicts) - { - TCHAR *otherHunspellApps[] = { _T("Thunderbird"), _T("thunderbird.exe"), - _T("Firefox"), _T("firefox.exe") }; - -#define APPPATH _T("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\%s") -#define MUICACHE _T("Software\\Microsoft\\Windows\\ShellNoRoam\\MUICache") - - // Get other apps dicts - for (int i = 0; i < MAX_REGS(otherHunspellApps); i += 2) - { - TCHAR key[1024]; - mir_sntprintf(key, MAX_REGS(key), APPPATH, otherHunspellApps[i+1]); - - HKEY hKey = 0; - LONG lResult = 0; - if (ERROR_SUCCESS == RegOpenKeyEx(HKEY_LOCAL_MACHINE, key, 0, KEY_QUERY_VALUE, &hKey)) - { - DWORD size = MAX_REGS(key); - lResult = RegQueryValueEx(hKey, _T("Path"), NULL, NULL, (LPBYTE)key, &size); - RegCloseKey(hKey); - } - else - { - // Not found in installed apps - Try MUICache - lResult = RegOpenKeyEx(HKEY_CURRENT_USER, MUICACHE, 0, KEY_QUERY_VALUE, &hKey); - if (ERROR_SUCCESS == lResult) - { - DWORD numValues; - if (ERROR_SUCCESS != RegQueryInfoKey(hKey, NULL, NULL, NULL, NULL, NULL, NULL, &numValues, NULL, NULL, NULL, NULL)) - numValues = 0; - - lResult = ERROR_NO_MORE_ITEMS; - for (DWORD local = 0; local < numValues; local++) - { - DWORD cchValue = MAX_REGS(key); - if (ERROR_SUCCESS != RegEnumValue(hKey, local, key, &cchValue, NULL, NULL, NULL, NULL)) - break; - key[cchValue] = 0; - TCHAR *pos; - if (pos = _tcsrchr(key, _T('\\'))) - { - if (lstrcmpi(&pos[1], otherHunspellApps[i+1]) == 0) - { - pos[0] = 0; - lResult = ERROR_SUCCESS; - break; - } - } - } - RegCloseKey(hKey); - } - } - - if (ERROR_SUCCESS == lResult) - { - TCHAR folder[1024]; - mir_sntprintf(folder, MAX_REGS(folder), _T("%s\\Dictionaries"), key); - - GetHunspellDictionariesFromFolder(languages, folder, user_path, otherHunspellApps[i]); - } - } - } - - GetDictsInfo(dicts); - - // Yeah, yeah, yeah, I know, but this is the easiest way... - SortedList *sl = (SortedList *) &dicts; - - // Sort dicts - for(int i = 0; i < dicts.getCount(); i++) - { - for(int j = i + 1; j < dicts.getCount(); j++) - { - if (lstrcmp(dicts[i]->full_name, dicts[j]->full_name) > 0) - { - Dictionary *dict = dicts[i]; - sl->items[i] = dicts[j]; - sl->items[j] = dict; - } - } - } -} - - -// Free the list returned by GetAvaibleDictionaries -void FreeDictionaries(LIST &dicts) -{ - for (int i = 0; i < dicts.getCount(); i++) - { - delete dicts[i]; - } - dicts.destroy(); -} - - -// Free the list returned by GetAvaibleDictionaries -void FreeSuggestions(Suggestions &suggestions) -{ - for (size_t i = 0; i < suggestions.count; i++) - { - free(suggestions.words[i]); - } - free(suggestions.words); - - suggestions.words = NULL; - suggestions.count = 0; -} diff --git a/plugins/SpellChecker/dictionary.h b/plugins/SpellChecker/dictionary.h deleted file mode 100644 index b57aa730bd..0000000000 --- a/plugins/SpellChecker/dictionary.h +++ /dev/null @@ -1,86 +0,0 @@ -/* -Copyright (C) 2006-2010 Ricardo Pescuma Domenecci - -This is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public -License as published by the Free Software Foundation; either -version 2 of the License, or (at your option) any later version. - -This is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with this file; see the file license.txt. If -not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -Boston, MA 02111-1307, USA. -*/ - - -#ifndef __DICTIONARY_H__ -# define __DICTIONARY_H__ - - -struct Suggestions { - TCHAR ** words; - size_t count; -}; - - -// A Dictionary interface -// All dictionaries use a lazy interface -class Dictionary { -public: - TCHAR language[128]; - TCHAR localized_name[128]; - TCHAR english_name[128]; - TCHAR full_name[256]; - TCHAR source[128]; - AutoReplaceMap *autoReplace; - - virtual ~Dictionary() {} - - // Return TRUE if the word is correct - virtual BOOL spell(const TCHAR *) =0; - - // Return a list of suggestions to a word - virtual Suggestions suggest(const TCHAR * word) =0; - - // Return a list of auto suggestions to a word - virtual Suggestions autoSuggest(const TCHAR * word) =0; - - // Return a auto suggestions to a word - // You have to free the item - virtual TCHAR * autoSuggestOne(const TCHAR * word) =0; - - // Return TRUE if the char is a word char - virtual BOOL isWordChar(TCHAR c) =0; - - // Add a word to the user custom dict - virtual void addWord(const TCHAR * word) =0; - - // Add a word to the list of ignored words - virtual void ignoreWord(const TCHAR * word) =0; - - // Assert that all needed data is loaded - virtual void load() =0; - - // Return TRUE if the dict is fully loaded - virtual BOOL isLoaded() =0; -}; - - - -// Return a list of avaible languages -void GetAvaibleDictionaries(LIST &dicts, TCHAR *path, TCHAR *user_path); - -// Free the list returned by GetAvaibleDictionaries -void FreeDictionaries(LIST &dicts); - -// Free the list returned by GetAvaibleDictionaries -void FreeSuggestions(Suggestions &suggestions); - - - -#endif // __DICTIONARY_H__ diff --git a/plugins/SpellChecker/flags-angelika.rc b/plugins/SpellChecker/flags-angelika.rc deleted file mode 100644 index 73d95036d3..0000000000 --- a/plugins/SpellChecker/flags-angelika.rc +++ /dev/null @@ -1,118 +0,0 @@ -af ICON ".\\Flags-Angelika\\af_ZA.ico" -af_ZA ICON ".\\Flags-Angelika\\af_ZA.ico" -ar ICON ".\\Flags-Angelika\\ar_AR.ico" -ar_AR ICON ".\\Flags-Angelika\\ar_AR.ico" -az ICON ".\\Flags-Angelika\\az_AZ.ico" -az_AZ ICON ".\\Flags-Angelika\\az_AZ.ico" -bg ICON ".\\Flags-Angelika\\bg_BG.ico" -bg_BG ICON ".\\Flags-Angelika\\bg_BG.ico" -bn_IN ICON ".\\Flags-Angelika\\bn_IN.ico" -ca_ES ICON ".\\Flags-Angelika\\ca_ES.ico" -cs ICON ".\\Flags-Angelika\\cs_CZ.ico" -cs_CZ ICON ".\\Flags-Angelika\\cs_CZ.ico" -csb_PO ICON ".\\Flags-Angelika\\csb_PO.ico" -cy ICON ".\\Flags-Angelika\\cy_GB.ico" -cy_GB ICON ".\\Flags-Angelika\\cy_GB.ico" -da_DK ICON ".\\Flags-Angelika\\da_DK.ico" -de ICON ".\\Flags-Angelika\\de_DE.ico" -de_AT ICON ".\\Flags-Angelika\\de_AT.ico" -de_CH ICON ".\\Flags-Angelika\\de_CH.ico" -de_DE ICON ".\\Flags-Angelika\\de_DE.ico" -el ICON ".\\Flags-Angelika\\el_GR.ico" -el_GR ICON ".\\Flags-Angelika\\el_GR.ico" -em_ET ICON ".\\Flags-Angelika\\em_ET.ico" -en_AU ICON ".\\Flags-Angelika\\en_AU.ico" -en_CA ICON ".\\Flags-Angelika\\en_CA.ico" -en_GB ICON ".\\Flags-Angelika\\en_GB.ico" -en_UK ICON ".\\Flags-Angelika\\en_GB.ico" -en_NZ ICON ".\\Flags-Angelika\\en_NZ.ico" -en_US ICON ".\\Flags-Angelika\\en_US.ico" -en_ZA ICON ".\\Flags-Angelika\\en_ZA.ico" -es ICON ".\\Flags-Angelika\\es_ES.ico" -es_ES ICON ".\\Flags-Angelika\\es_ES.ico" -es_MX ICON ".\\Flags-Angelika\\es_MX.ico" -et_EE ICON ".\\Flags-Angelika\\et_EE.ico" -fa_IR ICON ".\\Flags-Angelika\\fa_IR.ico" -fi ICON ".\\Flags-Angelika\\fi_FI.ico" -fi_FI ICON ".\\Flags-Angelika\\fi_FI.ico" -fj ICON ".\\Flags-Angelika\\fj_FJ.ico" -fj_FJ ICON ".\\Flags-Angelika\\fj_FJ.ico" -fo ICON ".\\Flags-Angelika\\fo_FO.ico" -fo_FO ICON ".\\Flags-Angelika\\fo_FO.ico" -fr ICON ".\\Flags-Angelika\\fr_FR.ico" -fr_BE ICON ".\\Flags-Angelika\\fr_BE.ico" -fr_FR ICON ".\\Flags-Angelika\\fr_FR.ico" -ga_IE ICON ".\\Flags-Angelika\\ga_IE.ico" -gd_GB ICON ".\\Flags-Angelika\\gd_GB.ico" -gl_ES ICON ".\\Flags-Angelika\\gl_ES.ico" -he_IL ICON ".\\Flags-Angelika\\he_IL.ico" -hi ICON ".\\Flags-Angelika\\hi_IN.ico" -hi_IN ICON ".\\Flags-Angelika\\hi_IN.ico" -hr ICON ".\\Flags-Angelika\\hr_Hr.ico" -hr_Hr ICON ".\\Flags-Angelika\\hr_Hr.ico" -hu ICON ".\\Flags-Angelika\\hu_HU.ico" -hu_HU ICON ".\\Flags-Angelika\\hu_HU.ico" -id ICON ".\\Flags-Angelika\\id_ID.ico" -id_ID ICON ".\\Flags-Angelika\\id_ID.ico" -is ICON ".\\Flags-Angelika\\is_IS.ico" -is_IS ICON ".\\Flags-Angelika\\is_IS.ico" -it ICON ".\\Flags-Angelika\\it_IT.ico" -it_IT ICON ".\\Flags-Angelika\\it_IT.ico" -km_KH ICON ".\\Flags-Angelika\\km_KH.ico" -ku_TR ICON ".\\Flags-Angelika\\ku_TR.ico" -lt ICON ".\\Flags-Angelika\\lt_LT.ico" -lt_LT ICON ".\\Flags-Angelika\\lt_LT.ico" -lu ICON ".\\Flags-Angelika\\lu_LU.ico" -lu_LU ICON ".\\Flags-Angelika\\lu_LU.ico" -lv ICON ".\\Flags-Angelika\\lv_LV.ico" -lv_LV ICON ".\\Flags-Angelika\\lv_LV.ico" -mg ICON ".\\Flags-Angelika\\mg_MG.ico" -mg_MG ICON ".\\Flags-Angelika\\mg_MG.ico" -mi_NZ ICON ".\\Flags-Angelika\\mi_NZ.ico" -mn ICON ".\\Flags-Angelika\\mn_MN.ico" -mn_MN ICON ".\\Flags-Angelika\\mn_MN.ico" -mo_BF ICON ".\\Flags-Angelika\\mo_BF.ico" -mr_IN ICON ".\\Flags-Angelika\\mr_IN.ico" -ms_MY ICON ".\\Flags-Angelika\\ms_MY.ico" -nb ICON ".\\Flags-Angelika\\nb_NO.ico" -nb_NO ICON ".\\Flags-Angelika\\nb_NO.ico" -ne_NP ICON ".\\Flags-Angelika\\ne_NP.ico" -nl ICON ".\\Flags-Angelika\\nl_NL.ico" -nl_NL ICON ".\\Flags-Angelika\\nl_NL.ico" -nn_NO ICON ".\\Flags-Angelika\\nn_NO.ico" -no ICON ".\\Flags-Angelika\\nb_NO.ico" -nr_ZA ICON ".\\Flags-Angelika\\nr_ZA.ico" -ns_ZA ICON ".\\Flags-Angelika\\ns_ZA.ico" -or_IN ICON ".\\Flags-Angelika\\or_IN.ico" -pl ICON ".\\Flags-Angelika\\pl_PL.ico" -pl_PL ICON ".\\Flags-Angelika\\pl_PL.ico" -pt ICON ".\\Flags-Angelika\\pt_PT.ico" -pt_BR ICON ".\\Flags-Angelika\\pt_BR.ico" -pt_PT ICON ".\\Flags-Angelika\\pt_PT.ico" -qu_BO ICON ".\\Flags-Angelika\\qu_BO.ico" -ro ICON ".\\Flags-Angelika\\ro_RO.ico" -ro_RO ICON ".\\Flags-Angelika\\ro_RO.ico" -ru ICON ".\\Flags-Angelika\\ru_RU.ico" -ru_RU ICON ".\\Flags-Angelika\\ru_RU.ico" -rw ICON ".\\Flags-Angelika\\rw_RW.ico" -rw_RW ICON ".\\Flags-Angelika\\rw_RW.ico" -sk ICON ".\\Flags-Angelika\\sk_SK.ico" -sk_SK ICON ".\\Flags-Angelika\\sk_SK.ico" -sl_SI ICON ".\\Flags-Angelika\\sl_SI.ico" -ss_ZA ICON ".\\Flags-Angelika\\ss_ZA.ico" -st_ZA ICON ".\\Flags-Angelika\\st_ZA.ico" -sv ICON ".\\Flags-Angelika\\sv_SE.ico" -sv_SE ICON ".\\Flags-Angelika\\sv_SE.ico" -ta_IN ICON ".\\Flags-Angelika\\ta_IN.ico" -tet_ID ICON ".\\Flags-Angelika\\tet_ID.ico" -tl_PH ICON ".\\Flags-Angelika\\tl_PH.ico" -tn_ZA ICON ".\\Flags-Angelika\\tn_ZA.ico" -ts_ZA ICON ".\\Flags-Angelika\\ts_ZA.ico" -uk_UA ICON ".\\Flags-Angelika\\uk_UA.ico" -uz ICON ".\\Flags-Angelika\\uz_UZ.ico" -uz_UZ ICON ".\\Flags-Angelika\\uz_UZ.ico" -ve_ZA ICON ".\\Flags-Angelika\\ve_ZA.ico" -vi ICON ".\\Flags-Angelika\\vi_VI.ico" -vi_VI ICON ".\\Flags-Angelika\\vi_VI.ico" -xh_ZA ICON ".\\Flags-Angelika\\xh_ZA.ico" -zu_ZA ICON ".\\Flags-Angelika\\zu_ZA.ico" diff --git a/plugins/SpellChecker/flags-angelika.vcxproj b/plugins/SpellChecker/flags-angelika.vcxproj index a19f505770..46c26d0fa3 100644 --- a/plugins/SpellChecker/flags-angelika.vcxproj +++ b/plugins/SpellChecker/flags-angelika.vcxproj @@ -117,7 +117,7 @@ - + diff --git a/plugins/SpellChecker/flags.rc b/plugins/SpellChecker/flags.rc deleted file mode 100644 index 7695b0f7d6..0000000000 --- a/plugins/SpellChecker/flags.rc +++ /dev/null @@ -1,119 +0,0 @@ -af ICON ".\\Flags\\af_ZA.ico" -af_ZA ICON ".\\Flags\\af_ZA.ico" -az ICON ".\\Flags\\az_AZ.ico" -az_AZ ICON ".\\Flags\\az_AZ.ico" -bg ICON ".\\Flags\\bg_BG.ico" -bg_BG ICON ".\\Flags\\bg_BG.ico" -bn_IN ICON ".\\Flags\\bn_IN.ico" -cs ICON ".\\Flags\\cs_CZ.ico" -cs_CZ ICON ".\\Flags\\cs_CZ.ico" -cy ICON ".\\Flags\\cy_GB.ico" -cy_GB ICON ".\\Flags\\cy_GB.ico" -da_DK ICON ".\\Flags\\da_DK.ico" -de ICON ".\\Flags\\de_DE.ico" -de_AT ICON ".\\Flags\\de_AT.ico" -de_CH ICON ".\\Flags\\de_CH.ico" -de_DE ICON ".\\Flags\\de_DE.ico" -el ICON ".\\Flags\\el_GR.ico" -el_GR ICON ".\\Flags\\el_GR.ico" -em_ET ICON ".\\Flags\\em_ET.ico" -en_AU ICON ".\\Flags\\en_AU.ico" -en_CA ICON ".\\Flags\\en_CA.ico" -en_GB ICON ".\\Flags\\en_GB.ico" -en_UK ICON ".\\Flags\\en_GB.ico" -en_NZ ICON ".\\Flags\\en_NZ.ico" -en_US ICON ".\\Flags\\en_US.ico" -en_ZA ICON ".\\Flags\\en_ZA.ico" -es ICON ".\\Flags\\es_ES.ico" -es_ES ICON ".\\Flags\\es_ES.ico" -es_MX ICON ".\\Flags\\es_MX.ico" -et_EE ICON ".\\Flags\\et_EE.ico" -fa_IR ICON ".\\Flags\\fa_IR.ico" -fi ICON ".\\Flags\\fi_FI.ico" -fi_FI ICON ".\\Flags\\fi_FI.ico" -fj ICON ".\\Flags\\fj_FJ.ico" -fj_FJ ICON ".\\Flags\\fj_FJ.ico" -fo ICON ".\\Flags\\fo_FO.ico" -fo_FO ICON ".\\Flags\\fo_FO.ico" -fr ICON ".\\Flags\\fr_FR.ico" -fr_BE ICON ".\\Flags\\fr_BE.ico" -fr_FR ICON ".\\Flags\\fr_FR.ico" -ga_IE ICON ".\\Flags\\ga_IE.ico" -gd_GB ICON ".\\Flags\\gd_GB.ico" -he_IL ICON ".\\Flags\\he_IL.ico" -hi ICON ".\\Flags\\hi_IN.ico" -hi_IN ICON ".\\Flags\\hi_IN.ico" -hr ICON ".\\Flags\\hr_HR.ico" -hr_HR ICON ".\\Flags\\hr_HR.ico" -hu ICON ".\\Flags\\hu_HU.ico" -hu_HU ICON ".\\Flags\\hu_HU.ico" -id ICON ".\\Flags\\id_ID.ico" -id_ID ICON ".\\Flags\\id_ID.ico" -is ICON ".\\Flags\\is_IS.ico" -is_IS ICON ".\\Flags\\is_IS.ico" -it ICON ".\\Flags\\it_IT.ico" -it_IT ICON ".\\Flags\\it_IT.ico" -km_KH ICON ".\\Flags\\km_KH.ico" -ku_TR ICON ".\\Flags\\ku_TR.ico" -lt ICON ".\\Flags\\lt_LT.ico" -lt_LT ICON ".\\Flags\\lt_LT.ico" -lu ICON ".\\Flags\\lu_LU.ico" -lu_LU ICON ".\\Flags\\lu_LU.ico" -lv ICON ".\\Flags\\lv_LV.ico" -lv_LV ICON ".\\Flags\\lv_LV.ico" -mg ICON ".\\Flags\\mg_MG.ico" -mg_MG ICON ".\\Flags\\mg_MG.ico" -mi_NZ ICON ".\\Flags\\mi_NZ.ico" -mn ICON ".\\Flags\\mn_MN.ico" -mn_MN ICON ".\\Flags\\mn_MN.ico" -mo_BF ICON ".\\Flags\\mo_BF.ico" -mr_IN ICON ".\\Flags\\mr_IN.ico" -ms_MY ICON ".\\Flags\\ms_MY.ico" -nb ICON ".\\Flags\\nb_NO.ico" -nb_NO ICON ".\\Flags\\nb_NO.ico" -ne_NP ICON ".\\Flags\\ne_NP.ico" -nl ICON ".\\Flags\\nl_NL.ico" -nl_NL ICON ".\\Flags\\nl_NL.ico" -nn_NO ICON ".\\Flags\\nn_NO.ico" -no ICON ".\\Flags\\nb_NO.ico" -nr_ZA ICON ".\\Flags\\nr_ZA.ico" -ns_ZA ICON ".\\Flags\\ns_ZA.ico" -ny_MW ICON ".\\Flags\\ny_MW.ico" -or_IN ICON ".\\Flags\\or_IN.ico" -pl ICON ".\\Flags\\pl_PL.ico" -pl_PL ICON ".\\Flags\\pl_PL.ico" -pt ICON ".\\Flags\\pt_PT.ico" -pt_BR ICON ".\\Flags\\pt_BR.ico" -pt_PT ICON ".\\Flags\\pt_PT.ico" -qu_BO ICON ".\\Flags\\qu_BO.ico" -ro ICON ".\\Flags\\ro_RO.ico" -ro_BO ICON ".\\Flags\\ro_BO.ico" -ro_RO ICON ".\\Flags\\ro_RO.ico" -ru ICON ".\\Flags\\ru_RU.ico" -ru_RU ICON ".\\Flags\\ru_RU.ico" -rw ICON ".\\Flags\\rw_RW.ico" -rw_RW ICON ".\\Flags\\rw_RW.ico" -sk ICON ".\\Flags\\sk_SK.ico" -sk_SK ICON ".\\Flags\\sk_SK.ico" -sl_SI ICON ".\\Flags\\sl_SI.ico" -sr_CS ICON ".\\Flags\\sr_CS.ico" -ss_ZA ICON ".\\Flags\\ss_ZA.ico" -st_ZA ICON ".\\Flags\\st_ZA.ico" -sv ICON ".\\Flags\\sv_SE.ico" -sv_SE ICON ".\\Flags\\sv_SE.ico" -tet_ID ICON ".\\Flags\\tet_ID.ico" -tl_PH ICON ".\\Flags\\tl_PH.ico" -tn_ZA ICON ".\\Flags\\tn_ZA.ico" -ts_ZA ICON ".\\Flags\\ts_ZA.ico" -uk_UA ICON ".\\Flags\\uk_UA.ico" -uz ICON ".\\Flags\\uz_UZ.ico" -uz_UZ ICON ".\\Flags\\uz_UZ.ico" -ve_ZA ICON ".\\Flags\\ve_ZA.ico" -vi ICON ".\\Flags\\vi_VI.ico" -vi_VI ICON ".\\Flags\\vi_VI.ico" -xh_ZA ICON ".\\Flags\\xh_ZA.ico" -zu_ZA ICON ".\\Flags\\zu_ZA.ico" -mk ICON ".\\Flags\\mk.ico" -bs ICON ".\\Flags\\ba.ico" -zh ICON ".\\Flags\\cn.ico" -en ICON ".\\Flags\\england.ico" diff --git a/plugins/SpellChecker/hunspell/README b/plugins/SpellChecker/hunspell/README deleted file mode 100644 index b452096282..0000000000 --- a/plugins/SpellChecker/hunspell/README +++ /dev/null @@ -1,21 +0,0 @@ -Hunspell spell checker and morphological analyser library - -Documentation, tests, examples: http://hunspell.sourceforge.net - -Author of Hunspell: -László Németh (nemethl (at) gyorsposta.hu) - -Hunspell based on OpenOffice.org's Myspell. MySpell's author: -Kevin Hendricks (kevin.hendricks (at) sympatico.ca) - -License: GPL 2.0/LGPL 2.1/MPL 1.1 tri-license - -The contents of this library may be used under the terms of -the GNU General Public License Version 2 or later (the "GPL"), or -the GNU Lesser General Public License Version 2.1 or later (the "LGPL", -see http://gnu.org/copyleft/lesser.html) or the Mozilla Public License -Version 1.1 or later (the "MPL", see http://mozilla.org/MPL/MPL-1.1.html). - -Software distributed under these licenses is distributed on an "AS IS" basis, -WITHOUT WARRANTY OF ANY KIND, either express or implied. See the licences -for the specific language governing rights and limitations under the licenses. diff --git a/plugins/SpellChecker/hunspell/affentry.cxx b/plugins/SpellChecker/hunspell/affentry.cxx deleted file mode 100644 index fef0cca5f5..0000000000 --- a/plugins/SpellChecker/hunspell/affentry.cxx +++ /dev/null @@ -1,962 +0,0 @@ -#include "license.hunspell" -#include "license.myspell" - -#include -#include -#include -#include - -#include "affentry.hxx" -#include "csutil.hxx" - -PfxEntry::PfxEntry(AffixMgr* pmgr, affentry* dp) -{ - // register affix manager - pmyMgr = pmgr; - - // set up its initial values - - aflag = dp->aflag; // flag - strip = dp->strip; // string to strip - appnd = dp->appnd; // string to append - stripl = dp->stripl; // length of strip string - appndl = dp->appndl; // length of append string - numconds = dp->numconds; // length of the condition - opts = dp->opts; // cross product flag - // then copy over all of the conditions - if (opts & aeLONGCOND) { - memcpy(c.conds, dp->c.l.conds1, MAXCONDLEN_1); - c.l.conds2 = dp->c.l.conds2; - } else memcpy(c.conds, dp->c.conds, MAXCONDLEN); - next = NULL; - nextne = NULL; - nexteq = NULL; - morphcode = dp->morphcode; - contclass = dp->contclass; - contclasslen = dp->contclasslen; -} - - -PfxEntry::~PfxEntry() -{ - aflag = 0; - if (appnd) free(appnd); - if (strip) free(strip); - pmyMgr = NULL; - appnd = NULL; - strip = NULL; - if (opts & aeLONGCOND) free(c.l.conds2); - if (morphcode && !(opts & aeALIASM)) free(morphcode); - if (contclass && !(opts & aeALIASF)) free(contclass); -} - -// add prefix to this word assuming conditions hold -char * PfxEntry::add(const char * word, int len) -{ - char tword[MAXWORDUTF8LEN + 4]; - - if ((len > stripl || (len == 0 && pmyMgr->get_fullstrip())) && - (len >= numconds) && test_condition(word) && - (!stripl || (strncmp(word, strip, stripl) == 0)) && - ((MAXWORDUTF8LEN + 4) > (len + appndl - stripl))) { - /* we have a match so add prefix */ - char * pp = tword; - if (appndl) { - strcpy(tword,appnd); - pp += appndl; - } - strcpy(pp, (word + stripl)); - return mystrdup(tword); - } - return NULL; -} - -inline char * PfxEntry::nextchar(char * p) { - if (p) { - p++; - if (opts & aeLONGCOND) { - // jump to the 2nd part of the condition - if (p == c.conds + MAXCONDLEN_1) return c.l.conds2; - // end of the MAXCONDLEN length condition - } else if (p == c.conds + MAXCONDLEN) return NULL; - return *p ? p : NULL; - } - return NULL; -} - -inline int PfxEntry::test_condition(const char * st) -{ - const char * pos = NULL; // group with pos input position - bool neg = false; // complementer - bool ingroup = false; // character in the group - if (numconds == 0) return 1; - char * p = c.conds; - while (1) { - switch (*p) { - case '\0': return 1; - case '[': { - neg = false; - ingroup = false; - p = nextchar(p); - pos = st; break; - } - case '^': { p = nextchar(p); neg = true; break; } - case ']': { - if ((neg && ingroup) || (!neg && !ingroup)) return 0; - pos = NULL; - p = nextchar(p); - // skip the next character - if (!ingroup && *st) for (st++; (opts & aeUTF8) && (*st & 0xc0) == 0x80; st++); - if (*st == '\0' && p) return 0; // word <= condition - break; - } - case '.': if (!pos) { // dots are not metacharacters in groups: [.] - p = nextchar(p); - // skip the next character - for (st++; (opts & aeUTF8) && (*st & 0xc0) == 0x80; st++); - if (*st == '\0' && p) return 0; // word <= condition - break; - } - default: { - if (*st == *p) { - st++; - p = nextchar(p); - if ((opts & aeUTF8) && (*(st - 1) & 0x80)) { // multibyte - while (p && (*p & 0xc0) == 0x80) { // character - if (*p != *st) { - if (!pos) return 0; - st = pos; - break; - } - p = nextchar(p); - st++; - } - if (pos && st != pos) { - ingroup = true; - while (p && *p != ']' && (p = nextchar(p))); - } - } else if (pos) { - ingroup = true; - while (p && *p != ']' && (p = nextchar(p))); - } - } else if (pos) { // group - p = nextchar(p); - } else return 0; - } - } - if (!p) return 1; - } -} - -// check if this prefix entry matches -struct hentry * PfxEntry::checkword(const char * word, int len, char in_compound, const FLAG needflag) -{ - int tmpl; // length of tmpword - struct hentry * he; // hash entry of root word or NULL - char tmpword[MAXWORDUTF8LEN + 4]; - - // on entry prefix is 0 length or already matches the beginning of the word. - // So if the remaining root word has positive length - // and if there are enough chars in root word and added back strip chars - // to meet the number of characters conditions, then test it - - tmpl = len - appndl; - - if (tmpl > 0 || (tmpl == 0 && pmyMgr->get_fullstrip())) { - - // generate new root word by removing prefix and adding - // back any characters that would have been stripped - - if (stripl) strcpy (tmpword, strip); - strcpy ((tmpword + stripl), (word + appndl)); - - // now make sure all of the conditions on characters - // are met. Please see the appendix at the end of - // this file for more info on exactly what is being - // tested - - // if all conditions are met then check if resulting - // root word in the dictionary - - if (test_condition(tmpword)) { - tmpl += stripl; - if ((he = pmyMgr->lookup(tmpword)) != NULL) { - do { - if (TESTAFF(he->astr, aflag, he->alen) && - // forbid single prefixes with needaffix flag - ! TESTAFF(contclass, pmyMgr->get_needaffix(), contclasslen) && - // needflag - ((!needflag) || TESTAFF(he->astr, needflag, he->alen) || - (contclass && TESTAFF(contclass, needflag, contclasslen)))) - return he; - he = he->next_homonym; // check homonyms - } while (he); - } - - // prefix matched but no root word was found - // if aeXPRODUCT is allowed, try again but now - // ross checked combined with a suffix - - //if ((opts & aeXPRODUCT) && in_compound) { - if ((opts & aeXPRODUCT)) { - he = pmyMgr->suffix_check(tmpword, tmpl, aeXPRODUCT, this, NULL, - 0, NULL, FLAG_NULL, needflag, in_compound); - if (he) return he; - } - } - } - return NULL; -} - -// check if this prefix entry matches -struct hentry * PfxEntry::check_twosfx(const char * word, int len, - char in_compound, const FLAG needflag) -{ - int tmpl; // length of tmpword - struct hentry * he; // hash entry of root word or NULL - char tmpword[MAXWORDUTF8LEN + 4]; - - // on entry prefix is 0 length or already matches the beginning of the word. - // So if the remaining root word has positive length - // and if there are enough chars in root word and added back strip chars - // to meet the number of characters conditions, then test it - - tmpl = len - appndl; - - if ((tmpl > 0 || (tmpl == 0 && pmyMgr->get_fullstrip())) && - (tmpl + stripl >= numconds)) { - - // generate new root word by removing prefix and adding - // back any characters that would have been stripped - - if (stripl) strcpy (tmpword, strip); - strcpy ((tmpword + stripl), (word + appndl)); - - // now make sure all of the conditions on characters - // are met. Please see the appendix at the end of - // this file for more info on exactly what is being - // tested - - // if all conditions are met then check if resulting - // root word in the dictionary - - if (test_condition(tmpword)) { - tmpl += stripl; - - // prefix matched but no root word was found - // if aeXPRODUCT is allowed, try again but now - // cross checked combined with a suffix - - if ((opts & aeXPRODUCT) && (in_compound != IN_CPD_BEGIN)) { - he = pmyMgr->suffix_check_twosfx(tmpword, tmpl, aeXPRODUCT, this, needflag); - if (he) return he; - } - } - } - return NULL; -} - -// check if this prefix entry matches -char * PfxEntry::check_twosfx_morph(const char * word, int len, - char in_compound, const FLAG needflag) -{ - int tmpl; // length of tmpword - char tmpword[MAXWORDUTF8LEN + 4]; - - // on entry prefix is 0 length or already matches the beginning of the word. - // So if the remaining root word has positive length - // and if there are enough chars in root word and added back strip chars - // to meet the number of characters conditions, then test it - - tmpl = len - appndl; - - if ((tmpl > 0 || (tmpl == 0 && pmyMgr->get_fullstrip())) && - (tmpl + stripl >= numconds)) { - - // generate new root word by removing prefix and adding - // back any characters that would have been stripped - - if (stripl) strcpy (tmpword, strip); - strcpy ((tmpword + stripl), (word + appndl)); - - // now make sure all of the conditions on characters - // are met. Please see the appendix at the end of - // this file for more info on exactly what is being - // tested - - // if all conditions are met then check if resulting - // root word in the dictionary - - if (test_condition(tmpword)) { - tmpl += stripl; - - // prefix matched but no root word was found - // if aeXPRODUCT is allowed, try again but now - // ross checked combined with a suffix - - if ((opts & aeXPRODUCT) && (in_compound != IN_CPD_BEGIN)) { - return pmyMgr->suffix_check_twosfx_morph(tmpword, tmpl, - aeXPRODUCT, this, needflag); - } - } - } - return NULL; -} - -// check if this prefix entry matches -char * PfxEntry::check_morph(const char * word, int len, char in_compound, const FLAG needflag) -{ - int tmpl; // length of tmpword - struct hentry * he; // hash entry of root word or NULL - char tmpword[MAXWORDUTF8LEN + 4]; - char result[MAXLNLEN]; - char * st; - - *result = '\0'; - - // on entry prefix is 0 length or already matches the beginning of the word. - // So if the remaining root word has positive length - // and if there are enough chars in root word and added back strip chars - // to meet the number of characters conditions, then test it - - tmpl = len - appndl; - - if ((tmpl > 0 || (tmpl == 0 && pmyMgr->get_fullstrip())) && - (tmpl + stripl >= numconds)) { - - // generate new root word by removing prefix and adding - // back any characters that would have been stripped - - if (stripl) strcpy (tmpword, strip); - strcpy ((tmpword + stripl), (word + appndl)); - - // now make sure all of the conditions on characters - // are met. Please see the appendix at the end of - // this file for more info on exactly what is being - // tested - - // if all conditions are met then check if resulting - // root word in the dictionary - - if (test_condition(tmpword)) { - tmpl += stripl; - if ((he = pmyMgr->lookup(tmpword)) != NULL) { - do { - if (TESTAFF(he->astr, aflag, he->alen) && - // forbid single prefixes with needaffix flag - ! TESTAFF(contclass, pmyMgr->get_needaffix(), contclasslen) && - // needflag - ((!needflag) || TESTAFF(he->astr, needflag, he->alen) || - (contclass && TESTAFF(contclass, needflag, contclasslen)))) { - if (morphcode) { - mystrcat(result, " ", MAXLNLEN); - mystrcat(result, morphcode, MAXLNLEN); - } else mystrcat(result,getKey(), MAXLNLEN); - if (!HENTRY_FIND(he, MORPH_STEM)) { - mystrcat(result, " ", MAXLNLEN); - mystrcat(result, MORPH_STEM, MAXLNLEN); - mystrcat(result, HENTRY_WORD(he), MAXLNLEN); - } - // store the pointer of the hash entry - if (HENTRY_DATA(he)) { - mystrcat(result, " ", MAXLNLEN); - mystrcat(result, HENTRY_DATA2(he), MAXLNLEN); - } else { - // return with debug information - char * flag = pmyMgr->encode_flag(getFlag()); - mystrcat(result, " ", MAXLNLEN); - mystrcat(result, MORPH_FLAG, MAXLNLEN); - mystrcat(result, flag, MAXLNLEN); - free(flag); - } - mystrcat(result, "\n", MAXLNLEN); - } - he = he->next_homonym; - } while (he); - } - - // prefix matched but no root word was found - // if aeXPRODUCT is allowed, try again but now - // ross checked combined with a suffix - - if ((opts & aeXPRODUCT) && (in_compound != IN_CPD_BEGIN)) { - st = pmyMgr->suffix_check_morph(tmpword, tmpl, aeXPRODUCT, this, - FLAG_NULL, needflag); - if (st) { - mystrcat(result, st, MAXLNLEN); - free(st); - } - } - } - } - - if (*result) return mystrdup(result); - return NULL; -} - -SfxEntry::SfxEntry(AffixMgr * pmgr, affentry* dp) -{ - // register affix manager - pmyMgr = pmgr; - - // set up its initial values - aflag = dp->aflag; // char flag - strip = dp->strip; // string to strip - appnd = dp->appnd; // string to append - stripl = dp->stripl; // length of strip string - appndl = dp->appndl; // length of append string - numconds = dp->numconds; // length of the condition - opts = dp->opts; // cross product flag - - // then copy over all of the conditions - if (opts & aeLONGCOND) { - memcpy(c.l.conds1, dp->c.l.conds1, MAXCONDLEN_1); - c.l.conds2 = dp->c.l.conds2; - } else memcpy(c.conds, dp->c.conds, MAXCONDLEN); - - rappnd = myrevstrdup(appnd); - morphcode = dp->morphcode; - contclass = dp->contclass; - contclasslen = dp->contclasslen; -} - - -SfxEntry::~SfxEntry() -{ - aflag = 0; - if (appnd) free(appnd); - if (rappnd) free(rappnd); - if (strip) free(strip); - pmyMgr = NULL; - appnd = NULL; - strip = NULL; - if (opts & aeLONGCOND) free(c.l.conds2); - if (morphcode && !(opts & aeALIASM)) free(morphcode); - if (contclass && !(opts & aeALIASF)) free(contclass); -} - -// add suffix to this word assuming conditions hold -char * SfxEntry::add(const char * word, int len) -{ - char tword[MAXWORDUTF8LEN + 4]; - - /* make sure all conditions match */ - if ((len > stripl || (len == 0 && pmyMgr->get_fullstrip())) && - (len >= numconds) && test_condition(word + len, word) && - (!stripl || (strcmp(word + len - stripl, strip) == 0)) && - ((MAXWORDUTF8LEN + 4) > (len + appndl - stripl))) { - /* we have a match so add suffix */ - strcpy(tword,word); - if (appndl) { - strcpy(tword + len - stripl, appnd); - } else { - *(tword + len - stripl) = '\0'; - } - return mystrdup(tword); - } - return NULL; -} - -inline char * SfxEntry::nextchar(char * p) { - if (p) { - p++; - if (opts & aeLONGCOND) { - // jump to the 2nd part of the condition - if (p == c.l.conds1 + MAXCONDLEN_1) return c.l.conds2; - // end of the MAXCONDLEN length condition - } else if (p == c.conds + MAXCONDLEN) return NULL; - return *p ? p : NULL; - } - return NULL; -} - -inline int SfxEntry::test_condition(const char * st, const char * beg) -{ - const char * pos = NULL; // group with pos input position - bool neg = false; // complementer - bool ingroup = false; // character in the group - if (numconds == 0) return 1; - char * p = c.conds; - st--; - int i = 1; - while (1) { - switch (*p) { - case '\0': return 1; - case '[': { p = nextchar(p); pos = st; break; } - case '^': { p = nextchar(p); neg = true; break; } - case ']': { if (!neg && !ingroup) return 0; - i++; - // skip the next character - if (!ingroup) { - for (; (opts & aeUTF8) && (st >= beg) && (*st & 0xc0) == 0x80; st--); - st--; - } - pos = NULL; - neg = false; - ingroup = false; - p = nextchar(p); - if (st < beg && p) return 0; // word <= condition - break; - } - case '.': if (!pos) { // dots are not metacharacters in groups: [.] - p = nextchar(p); - // skip the next character - for (st--; (opts & aeUTF8) && (st >= beg) && (*st & 0xc0) == 0x80; st--); - if (st < beg) { // word <= condition - if (p) return 0; else return 1; - } - if ((opts & aeUTF8) && (*st & 0x80)) { // head of the UTF-8 character - st--; - if (st < beg) { // word <= condition - if (p) return 0; else return 1; - } - } - break; - } - default: { - if (*st == *p) { - p = nextchar(p); - if ((opts & aeUTF8) && (*st & 0x80)) { - st--; - while (p && (st >= beg)) { - if (*p != *st) { - if (!pos) return 0; - st = pos; - break; - } - // first byte of the UTF-8 multibyte character - if ((*p & 0xc0) != 0x80) break; - p = nextchar(p); - st--; - } - if (pos && st != pos) { - if (neg) return 0; - else if (i == numconds) return 1; - ingroup = true; - while (p && *p != ']' && (p = nextchar(p))); - st--; - } - if (p && *p != ']') p = nextchar(p); - } else if (pos) { - if (neg) return 0; - else if (i == numconds) return 1; - ingroup = true; - while (p && *p != ']' && (p = nextchar(p))); -// if (p && *p != ']') p = nextchar(p); - st--; - } - if (!pos) { - i++; - st--; - } - if (st < beg && p && *p != ']') return 0; // word <= condition - } else if (pos) { // group - p = nextchar(p); - } else return 0; - } - } - if (!p) return 1; - } -} - -// see if this suffix is present in the word -struct hentry * SfxEntry::checkword(const char * word, int len, int optflags, - PfxEntry* ppfx, char ** wlst, int maxSug, int * ns, const FLAG cclass, const FLAG needflag, - const FLAG badflag) -{ - int tmpl; // length of tmpword - struct hentry * he; // hash entry pointer - unsigned char * cp; - char tmpword[MAXWORDUTF8LEN + 4]; - PfxEntry* ep = ppfx; - - // if this suffix is being cross checked with a prefix - // but it does not support cross products skip it - - if (((optflags & aeXPRODUCT) != 0) && ((opts & aeXPRODUCT) == 0)) - return NULL; - - // upon entry suffix is 0 length or already matches the end of the word. - // So if the remaining root word has positive length - // and if there are enough chars in root word and added back strip chars - // to meet the number of characters conditions, then test it - - tmpl = len - appndl; - // the second condition is not enough for UTF-8 strings - // it checked in test_condition() - - if ((tmpl > 0 || (tmpl == 0 && pmyMgr->get_fullstrip())) && - (tmpl + stripl >= numconds)) { - - // generate new root word by removing suffix and adding - // back any characters that would have been stripped or - // or null terminating the shorter string - - strcpy (tmpword, word); - cp = (unsigned char *)(tmpword + tmpl); - if (stripl) { - strcpy ((char *)cp, strip); - tmpl += stripl; - cp = (unsigned char *)(tmpword + tmpl); - } else *cp = '\0'; - - // now make sure all of the conditions on characters - // are met. Please see the appendix at the end of - // this file for more info on exactly what is being - // tested - - // if all conditions are met then check if resulting - // root word in the dictionary - - if (test_condition((char *) cp, (char *) tmpword)) { - -#ifdef SZOSZABLYA_POSSIBLE_ROOTS - fprintf(stdout,"%s %s %c\n", word, tmpword, aflag); -#endif - if ((he = pmyMgr->lookup(tmpword)) != NULL) { - do { - // check conditional suffix (enabled by prefix) - if ((TESTAFF(he->astr, aflag, he->alen) || (ep && ep->getCont() && - TESTAFF(ep->getCont(), aflag, ep->getContLen()))) && - (((optflags & aeXPRODUCT) == 0) || - (ep && TESTAFF(he->astr, ep->getFlag(), he->alen)) || - // enabled by prefix - ((contclass) && (ep && TESTAFF(contclass, ep->getFlag(), contclasslen))) - ) && - // handle cont. class - ((!cclass) || - ((contclass) && TESTAFF(contclass, cclass, contclasslen)) - ) && - // check only in compound homonyms (bad flags) - (!badflag || !TESTAFF(he->astr, badflag, he->alen) - ) && - // handle required flag - ((!needflag) || - (TESTAFF(he->astr, needflag, he->alen) || - ((contclass) && TESTAFF(contclass, needflag, contclasslen))) - ) - ) return he; - he = he->next_homonym; // check homonyms - } while (he); - - // obsolote stemming code (used only by the - // experimental SuffixMgr:suggest_pos_stems) - // store resulting root in wlst - } else if (wlst && (*ns < maxSug)) { - int cwrd = 1; - for (int k=0; k < *ns; k++) - if (strcmp(tmpword, wlst[k]) == 0) cwrd = 0; - if (cwrd) { - wlst[*ns] = mystrdup(tmpword); - if (wlst[*ns] == NULL) { - for (int j=0; j<*ns; j++) free(wlst[j]); - *ns = -1; - return NULL; - } - (*ns)++; - } - } - } - } - return NULL; -} - -// see if two-level suffix is present in the word -struct hentry * SfxEntry::check_twosfx(const char * word, int len, int optflags, - PfxEntry* ppfx, const FLAG needflag) -{ - int tmpl; // length of tmpword - struct hentry * he; // hash entry pointer - unsigned char * cp; - char tmpword[MAXWORDUTF8LEN + 4]; - PfxEntry* ep = ppfx; - - - // if this suffix is being cross checked with a prefix - // but it does not support cross products skip it - - if ((optflags & aeXPRODUCT) != 0 && (opts & aeXPRODUCT) == 0) - return NULL; - - // upon entry suffix is 0 length or already matches the end of the word. - // So if the remaining root word has positive length - // and if there are enough chars in root word and added back strip chars - // to meet the number of characters conditions, then test it - - tmpl = len - appndl; - - if ((tmpl > 0 || (tmpl == 0 && pmyMgr->get_fullstrip())) && - (tmpl + stripl >= numconds)) { - - // generate new root word by removing suffix and adding - // back any characters that would have been stripped or - // or null terminating the shorter string - - strcpy (tmpword, word); - cp = (unsigned char *)(tmpword + tmpl); - if (stripl) { - strcpy ((char *)cp, strip); - tmpl += stripl; - cp = (unsigned char *)(tmpword + tmpl); - } else *cp = '\0'; - - // now make sure all of the conditions on characters - // are met. Please see the appendix at the end of - // this file for more info on exactly what is being - // tested - - // if all conditions are met then recall suffix_check - - if (test_condition((char *) cp, (char *) tmpword)) { - if (ppfx) { - // handle conditional suffix - if ((contclass) && TESTAFF(contclass, ep->getFlag(), contclasslen)) - he = pmyMgr->suffix_check(tmpword, tmpl, 0, NULL, NULL, 0, NULL, (FLAG) aflag, needflag); - else - he = pmyMgr->suffix_check(tmpword, tmpl, optflags, ppfx, NULL, 0, NULL, (FLAG) aflag, needflag); - } else { - he = pmyMgr->suffix_check(tmpword, tmpl, 0, NULL, NULL, 0, NULL, (FLAG) aflag, needflag); - } - if (he) return he; - } - } - return NULL; -} - -// see if two-level suffix is present in the word -char * SfxEntry::check_twosfx_morph(const char * word, int len, int optflags, - PfxEntry* ppfx, const FLAG needflag) -{ - int tmpl; // length of tmpword - unsigned char * cp; - char tmpword[MAXWORDUTF8LEN + 4]; - PfxEntry* ep = ppfx; - char * st; - - char result[MAXLNLEN]; - - *result = '\0'; - - // if this suffix is being cross checked with a prefix - // but it does not support cross products skip it - - if ((optflags & aeXPRODUCT) != 0 && (opts & aeXPRODUCT) == 0) - return NULL; - - // upon entry suffix is 0 length or already matches the end of the word. - // So if the remaining root word has positive length - // and if there are enough chars in root word and added back strip chars - // to meet the number of characters conditions, then test it - - tmpl = len - appndl; - - if ((tmpl > 0 || (tmpl == 0 && pmyMgr->get_fullstrip())) && - (tmpl + stripl >= numconds)) { - - // generate new root word by removing suffix and adding - // back any characters that would have been stripped or - // or null terminating the shorter string - - strcpy (tmpword, word); - cp = (unsigned char *)(tmpword + tmpl); - if (stripl) { - strcpy ((char *)cp, strip); - tmpl += stripl; - cp = (unsigned char *)(tmpword + tmpl); - } else *cp = '\0'; - - // now make sure all of the conditions on characters - // are met. Please see the appendix at the end of - // this file for more info on exactly what is being - // tested - - // if all conditions are met then recall suffix_check - - if (test_condition((char *) cp, (char *) tmpword)) { - if (ppfx) { - // handle conditional suffix - if ((contclass) && TESTAFF(contclass, ep->getFlag(), contclasslen)) { - st = pmyMgr->suffix_check_morph(tmpword, tmpl, 0, NULL, aflag, needflag); - if (st) { - if (ppfx->getMorph()) { - mystrcat(result, ppfx->getMorph(), MAXLNLEN); - mystrcat(result, " ", MAXLNLEN); - } - mystrcat(result,st, MAXLNLEN); - free(st); - mychomp(result); - } - } else { - st = pmyMgr->suffix_check_morph(tmpword, tmpl, optflags, ppfx, aflag, needflag); - if (st) { - mystrcat(result, st, MAXLNLEN); - free(st); - mychomp(result); - } - } - } else { - st = pmyMgr->suffix_check_morph(tmpword, tmpl, 0, NULL, aflag, needflag); - if (st) { - mystrcat(result, st, MAXLNLEN); - free(st); - mychomp(result); - } - } - if (*result) return mystrdup(result); - } - } - return NULL; -} - -// get next homonym with same affix -struct hentry * SfxEntry::get_next_homonym(struct hentry * he, int optflags, PfxEntry* ppfx, - const FLAG cclass, const FLAG needflag) -{ - PfxEntry* ep = ppfx; - FLAG eFlag = ep ? ep->getFlag() : FLAG_NULL; - - while (he->next_homonym) { - he = he->next_homonym; - if ((TESTAFF(he->astr, aflag, he->alen) || (ep && ep->getCont() && TESTAFF(ep->getCont(), aflag, ep->getContLen()))) && - ((optflags & aeXPRODUCT) == 0 || - TESTAFF(he->astr, eFlag, he->alen) || - // handle conditional suffix - ((contclass) && TESTAFF(contclass, eFlag, contclasslen)) - ) && - // handle cont. class - ((!cclass) || - ((contclass) && TESTAFF(contclass, cclass, contclasslen)) - ) && - // handle required flag - ((!needflag) || - (TESTAFF(he->astr, needflag, he->alen) || - ((contclass) && TESTAFF(contclass, needflag, contclasslen))) - ) - ) return he; - } - return NULL; -} - - -#if 0 - -Appendix: Understanding Affix Code - - -An affix is either a prefix or a suffix attached to root words to make -other words. - -Basically a Prefix or a Suffix is set of AffEntry objects -which store information about the prefix or suffix along -with supporting routines to check if a word has a particular -prefix or suffix or a combination. - -The structure affentry is defined as follows: - -struct affentry -{ - unsigned short aflag; // ID used to represent the affix - char * strip; // string to strip before adding affix - char * appnd; // the affix string to add - unsigned char stripl; // length of the strip string - unsigned char appndl; // length of the affix string - char numconds; // the number of conditions that must be met - char opts; // flag: aeXPRODUCT- combine both prefix and suffix - char conds[SETSIZE]; // array which encodes the conditions to be met -}; - - -Here is a suffix borrowed from the en_US.aff file. This file -is whitespace delimited. - -SFX D Y 4 -SFX D 0 e d -SFX D y ied [^aeiou]y -SFX D 0 ed [^ey] -SFX D 0 ed [aeiou]y - -This information can be interpreted as follows: - -In the first line has 4 fields - -Field ------ -1 SFX - indicates this is a suffix -2 D - is the name of the character flag which represents this suffix -3 Y - indicates it can be combined with prefixes (cross product) -4 4 - indicates that sequence of 4 affentry structures are needed to - properly store the affix information - -The remaining lines describe the unique information for the 4 SfxEntry -objects that make up this affix. Each line can be interpreted -as follows: (note fields 1 and 2 are as a check against line 1 info) - -Field ------ -1 SFX - indicates this is a suffix -2 D - is the name of the character flag for this affix -3 y - the string of chars to strip off before adding affix - (a 0 here indicates the NULL string) -4 ied - the string of affix characters to add -5 [^aeiou]y - the conditions which must be met before the affix - can be applied - -Field 5 is interesting. Since this is a suffix, field 5 tells us that -there are 2 conditions that must be met. The first condition is that -the next to the last character in the word must *NOT* be any of the -following "a", "e", "i", "o" or "u". The second condition is that -the last character of the word must end in "y". - -So how can we encode this information concisely and be able to -test for both conditions in a fast manner? The answer is found -but studying the wonderful ispell code of Geoff Kuenning, et.al. -(now available under a normal BSD license). - -If we set up a conds array of 256 bytes indexed (0 to 255) and access it -using a character (cast to an unsigned char) of a string, we have 8 bits -of information we can store about that character. Specifically we -could use each bit to say if that character is allowed in any of the -last (or first for prefixes) 8 characters of the word. - -Basically, each character at one end of the word (up to the number -of conditions) is used to index into the conds array and the resulting -value found there says whether the that character is valid for a -specific character position in the word. - -For prefixes, it does this by setting bit 0 if that char is valid -in the first position, bit 1 if valid in the second position, and so on. - -If a bit is not set, then that char is not valid for that postion in the -word. - -If working with suffixes bit 0 is used for the character closest -to the front, bit 1 for the next character towards the end, ..., -with bit numconds-1 representing the last char at the end of the string. - -Note: since entries in the conds[] are 8 bits, only 8 conditions -(read that only 8 character positions) can be examined at one -end of a word (the beginning for prefixes and the end for suffixes. - -So to make this clearer, lets encode the conds array values for the -first two affentries for the suffix D described earlier. - - - For the first affentry: - numconds = 1 (only examine the last character) - - conds['e'] = (1 << 0) (the word must end in an E) - all others are all 0 - - For the second affentry: - numconds = 2 (only examine the last two characters) - - conds[X] = conds[X] | (1 << 0) (aeiou are not allowed) - where X is all characters *but* a, e, i, o, or u - - - conds['y'] = (1 << 1) (the last char must be a y) - all other bits for all other entries in the conds array are zero - - -#endif - diff --git a/plugins/SpellChecker/hunspell/affentry.hxx b/plugins/SpellChecker/hunspell/affentry.hxx deleted file mode 100644 index eaf361fcce..0000000000 --- a/plugins/SpellChecker/hunspell/affentry.hxx +++ /dev/null @@ -1,136 +0,0 @@ -#ifndef _AFFIX_HXX_ -#define _AFFIX_HXX_ - -#include "hunvisapi.h" - -#include "atypes.hxx" -#include "baseaffix.hxx" -#include "affixmgr.hxx" - -/* A Prefix Entry */ - -class LIBHUNSPELL_DLL_EXPORTED PfxEntry : protected AffEntry -{ - AffixMgr* pmyMgr; - - PfxEntry * next; - PfxEntry * nexteq; - PfxEntry * nextne; - PfxEntry * flgnxt; - -public: - - PfxEntry(AffixMgr* pmgr, affentry* dp ); - ~PfxEntry(); - - inline bool allowCross() { return ((opts & aeXPRODUCT) != 0); } - struct hentry * checkword(const char * word, int len, char in_compound, - const FLAG needflag = FLAG_NULL); - - struct hentry * check_twosfx(const char * word, int len, char in_compound, const FLAG needflag = NULL); - - char * check_morph(const char * word, int len, char in_compound, - const FLAG needflag = FLAG_NULL); - - char * check_twosfx_morph(const char * word, int len, - char in_compound, const FLAG needflag = FLAG_NULL); - - inline FLAG getFlag() { return aflag; } - inline const char * getKey() { return appnd; } - char * add(const char * word, int len); - - inline short getKeyLen() { return appndl; } - - inline const char * getMorph() { return morphcode; } - - inline const unsigned short * getCont() { return contclass; } - inline short getContLen() { return contclasslen; } - - inline PfxEntry * getNext() { return next; } - inline PfxEntry * getNextNE() { return nextne; } - inline PfxEntry * getNextEQ() { return nexteq; } - inline PfxEntry * getFlgNxt() { return flgnxt; } - - inline void setNext(PfxEntry * ptr) { next = ptr; } - inline void setNextNE(PfxEntry * ptr) { nextne = ptr; } - inline void setNextEQ(PfxEntry * ptr) { nexteq = ptr; } - inline void setFlgNxt(PfxEntry * ptr) { flgnxt = ptr; } - - inline char * nextchar(char * p); - inline int test_condition(const char * st); -}; - - - - -/* A Suffix Entry */ - -class LIBHUNSPELL_DLL_EXPORTED SfxEntry : protected AffEntry -{ - AffixMgr* pmyMgr; - char * rappnd; - - SfxEntry * next; - SfxEntry * nexteq; - SfxEntry * nextne; - SfxEntry * flgnxt; - - SfxEntry * l_morph; - SfxEntry * r_morph; - SfxEntry * eq_morph; - -public: - - SfxEntry(AffixMgr* pmgr, affentry* dp ); - ~SfxEntry(); - - inline bool allowCross() { return ((opts & aeXPRODUCT) != 0); } - struct hentry * checkword(const char * word, int len, int optflags, - PfxEntry* ppfx, char ** wlst, int maxSug, int * ns, -// const FLAG cclass = FLAG_NULL, const FLAG needflag = FLAG_NULL, char in_compound=IN_CPD_NOT); - const FLAG cclass = FLAG_NULL, const FLAG needflag = FLAG_NULL, const FLAG badflag = 0); - - struct hentry * check_twosfx(const char * word, int len, int optflags, PfxEntry* ppfx, const FLAG needflag = NULL); - - char * check_twosfx_morph(const char * word, int len, int optflags, - PfxEntry* ppfx, const FLAG needflag = FLAG_NULL); - struct hentry * get_next_homonym(struct hentry * he); - struct hentry * get_next_homonym(struct hentry * word, int optflags, PfxEntry* ppfx, - const FLAG cclass, const FLAG needflag); - - - inline FLAG getFlag() { return aflag; } - inline const char * getKey() { return rappnd; } - char * add(const char * word, int len); - - - inline const char * getMorph() { return morphcode; } - - inline const unsigned short * getCont() { return contclass; } - inline short getContLen() { return contclasslen; } - inline const char * getAffix() { return appnd; } - - inline short getKeyLen() { return appndl; } - - inline SfxEntry * getNext() { return next; } - inline SfxEntry * getNextNE() { return nextne; } - inline SfxEntry * getNextEQ() { return nexteq; } - - inline SfxEntry * getLM() { return l_morph; } - inline SfxEntry * getRM() { return r_morph; } - inline SfxEntry * getEQM() { return eq_morph; } - inline SfxEntry * getFlgNxt() { return flgnxt; } - - inline void setNext(SfxEntry * ptr) { next = ptr; } - inline void setNextNE(SfxEntry * ptr) { nextne = ptr; } - inline void setNextEQ(SfxEntry * ptr) { nexteq = ptr; } - inline void setFlgNxt(SfxEntry * ptr) { flgnxt = ptr; } - - inline char * nextchar(char * p); - inline int test_condition(const char * st, const char * begin); - -}; - -#endif - - diff --git a/plugins/SpellChecker/hunspell/affixmgr.cxx b/plugins/SpellChecker/hunspell/affixmgr.cxx deleted file mode 100644 index ae72f70270..0000000000 --- a/plugins/SpellChecker/hunspell/affixmgr.cxx +++ /dev/null @@ -1,4521 +0,0 @@ -#include "license.hunspell" -#include "license.myspell" - -#include -#include -#include -#include - -#include - -#include "affixmgr.hxx" -#include "affentry.hxx" -#include "langnum.hxx" - -#include "csutil.hxx" - -AffixMgr::AffixMgr(const char * affpath, HashMgr** ptr, int * md, const char * key) -{ - // register hash manager and load affix data from aff file - pHMgr = ptr[0]; - alldic = ptr; - maxdic = md; - keystring = NULL; - trystring = NULL; - encoding=NULL; - csconv=NULL; - utf8 = 0; - complexprefixes = 0; - maptable = NULL; - nummap = 0; - breaktable = NULL; - numbreak = -1; - reptable = NULL; - numrep = 0; - iconvtable = NULL; - oconvtable = NULL; - checkcpdtable = NULL; - // allow simplified compound forms (see 3rd field of CHECKCOMPOUNDPATTERN) - simplifiedcpd = 0; - numcheckcpd = 0; - defcpdtable = NULL; - numdefcpd = 0; - phone = NULL; - compoundflag = FLAG_NULL; // permits word in compound forms - compoundbegin = FLAG_NULL; // may be first word in compound forms - compoundmiddle = FLAG_NULL; // may be middle word in compound forms - compoundend = FLAG_NULL; // may be last word in compound forms - compoundroot = FLAG_NULL; // compound word signing flag - compoundpermitflag = FLAG_NULL; // compound permitting flag for suffixed word - compoundforbidflag = FLAG_NULL; // compound fordidden flag for suffixed word - checkcompounddup = 0; // forbid double words in compounds - checkcompoundrep = 0; // forbid bad compounds (may be non compound word with a REP substitution) - checkcompoundcase = 0; // forbid upper and lowercase combinations at word bounds - checkcompoundtriple = 0; // forbid compounds with triple letters - simplifiedtriple = 0; // allow simplified triple letters in compounds (Schiff+fahrt -> Schiffahrt) - forbiddenword = FORBIDDENWORD; // forbidden word signing flag - nosuggest = FLAG_NULL; // don't suggest words signed with NOSUGGEST flag - nongramsuggest = FLAG_NULL; - lang = NULL; // language - langnum = 0; // language code (see http://l10n.openoffice.org/languages.html) - needaffix = FLAG_NULL; // forbidden root, allowed only with suffixes - cpdwordmax = -1; // default: unlimited wordcount in compound words - cpdmin = -1; // undefined - cpdmaxsyllable = 0; // default: unlimited syllablecount in compound words - cpdvowels=NULL; // vowels (for calculating of Hungarian compounding limit, O(n) search! XXX) - cpdvowels_utf16=NULL; // vowels for UTF-8 encoding (bsearch instead of O(n) search) - cpdvowels_utf16_len=0; // vowels - pfxappnd=NULL; // previous prefix for counting the syllables of prefix BUG - sfxappnd=NULL; // previous suffix for counting a special syllables BUG - cpdsyllablenum=NULL; // syllable count incrementing flag - checknum=0; // checking numbers, and word with numbers - wordchars=NULL; // letters + spec. word characters - wordchars_utf16=NULL; // letters + spec. word characters - wordchars_utf16_len=0; // letters + spec. word characters - ignorechars=NULL; // letters + spec. word characters - ignorechars_utf16=NULL; // letters + spec. word characters - ignorechars_utf16_len=0; // letters + spec. word characters - version=NULL; // affix and dictionary file version string - havecontclass=0; // flags of possible continuing classes (double affix) - // LEMMA_PRESENT: not put root into the morphological output. Lemma presents - // in morhological description in dictionary file. It's often combined with PSEUDOROOT. - lemma_present = FLAG_NULL; - circumfix = FLAG_NULL; - onlyincompound = FLAG_NULL; - maxngramsugs = -1; // undefined - maxdiff = -1; // undefined - onlymaxdiff = 0; - maxcpdsugs = -1; // undefined - nosplitsugs = 0; - sugswithdots = 0; - keepcase = 0; - forceucase = 0; - warn = 0; - forbidwarn = 0; - checksharps = 0; - substandard = FLAG_NULL; - fullstrip = 0; - - sfx = NULL; - pfx = NULL; - - for (int i=0; i < SETSIZE; i++) { - pStart[i] = NULL; - sStart[i] = NULL; - pFlag[i] = NULL; - sFlag[i] = NULL; - } - - for (int j=0; j < CONTSIZE; j++) { - contclasses[j] = 0; - } - - if (parse_file(affpath, key)) { - HUNSPELL_WARNING(stderr, "Failure loading aff file %s\n",affpath); - } - - if (cpdmin == -1) cpdmin = MINCPDLEN; - -} - - -AffixMgr::~AffixMgr() -{ - // pass through linked prefix entries and clean up - for (int i=0; i < SETSIZE ;i++) { - pFlag[i] = NULL; - PfxEntry * ptr = pStart[i]; - PfxEntry * nptr = NULL; - while (ptr) { - nptr = ptr->getNext(); - delete(ptr); - ptr = nptr; - nptr = NULL; - } - } - - // pass through linked suffix entries and clean up - for (int j=0; j < SETSIZE ; j++) { - sFlag[j] = NULL; - SfxEntry * ptr = sStart[j]; - SfxEntry * nptr = NULL; - while (ptr) { - nptr = ptr->getNext(); - delete(ptr); - ptr = nptr; - nptr = NULL; - } - sStart[j] = NULL; - } - - if (keystring) free(keystring); - keystring=NULL; - if (trystring) free(trystring); - trystring=NULL; - if (encoding) free(encoding); - encoding=NULL; - if (maptable) { - for (int j=0; j < nummap; j++) { - for (int k=0; k < maptable[j].len; k++) { - if (maptable[j].set[k]) free(maptable[j].set[k]); - } - free(maptable[j].set); - maptable[j].set = NULL; - maptable[j].len = 0; - } - free(maptable); - maptable = NULL; - } - nummap = 0; - if (breaktable) { - for (int j=0; j < numbreak; j++) { - if (breaktable[j]) free(breaktable[j]); - breaktable[j] = NULL; - } - free(breaktable); - breaktable = NULL; - } - numbreak = 0; - if (reptable) { - for (int j=0; j < numrep; j++) { - free(reptable[j].pattern); - free(reptable[j].pattern2); - } - free(reptable); - reptable = NULL; - } - if (iconvtable) delete iconvtable; - if (oconvtable) delete oconvtable; - if (phone && phone->rules) { - for (int j=0; j < phone->num + 1; j++) { - free(phone->rules[j * 2]); - free(phone->rules[j * 2 + 1]); - } - free(phone->rules); - free(phone); - phone = NULL; - } - - if (defcpdtable) { - for (int j=0; j < numdefcpd; j++) { - free(defcpdtable[j].def); - defcpdtable[j].def = NULL; - } - free(defcpdtable); - defcpdtable = NULL; - } - numrep = 0; - if (checkcpdtable) { - for (int j=0; j < numcheckcpd; j++) { - free(checkcpdtable[j].pattern); - free(checkcpdtable[j].pattern2); - free(checkcpdtable[j].pattern3); - checkcpdtable[j].pattern = NULL; - checkcpdtable[j].pattern2 = NULL; - checkcpdtable[j].pattern3 = NULL; - } - free(checkcpdtable); - checkcpdtable = NULL; - } - numcheckcpd = 0; - FREE_FLAG(compoundflag); - FREE_FLAG(compoundbegin); - FREE_FLAG(compoundmiddle); - FREE_FLAG(compoundend); - FREE_FLAG(compoundpermitflag); - FREE_FLAG(compoundforbidflag); - FREE_FLAG(compoundroot); - FREE_FLAG(forbiddenword); - FREE_FLAG(nosuggest); - FREE_FLAG(nongramsuggest); - FREE_FLAG(needaffix); - FREE_FLAG(lemma_present); - FREE_FLAG(circumfix); - FREE_FLAG(onlyincompound); - - cpdwordmax = 0; - pHMgr = NULL; - cpdmin = 0; - cpdmaxsyllable = 0; - if (cpdvowels) free(cpdvowels); - if (cpdvowels_utf16) free(cpdvowels_utf16); - if (cpdsyllablenum) free(cpdsyllablenum); - free_utf_tbl(); - if (lang) free(lang); - if (wordchars) free(wordchars); - if (wordchars_utf16) free(wordchars_utf16); - if (ignorechars) free(ignorechars); - if (ignorechars_utf16) free(ignorechars_utf16); - if (version) free(version); - checknum=0; -#ifdef MOZILLA_CLIENT - delete [] csconv; -#endif -} - - -// read in aff file and build up prefix and suffix entry objects -int AffixMgr::parse_file(const char * affpath, const char * key) -{ - char * line; // io buffers - char ft; // affix type - - // checking flag duplication - char dupflags[CONTSIZE]; - char dupflags_ini = 1; - - // first line indicator for removing byte order mark - int firstline = 1; - - // open the affix file - FileMgr * afflst = new FileMgr(affpath, key); - if (!afflst) { - HUNSPELL_WARNING(stderr, "error: could not open affix description file %s\n",affpath); - return 1; - } - - // step one is to parse the affix file building up the internal - // affix data structures - - // read in each line ignoring any that do not - // start with a known line type indicator - while ((line = afflst->getline())) { - mychomp(line); - - /* remove byte order mark */ - if (firstline) { - firstline = 0; - // Affix file begins with byte order mark: possible incompatibility with old Hunspell versions - if (strncmp(line,"\xEF\xBB\xBF",3) == 0) { - memmove(line, line+3, strlen(line+3)+1); - } - } - - /* parse in the keyboard string */ - if (strncmp(line,"KEY",3) == 0) { - if (parse_string(line, &keystring, afflst->getlinenum())) { - delete afflst; - return 1; - } - } - - /* parse in the try string */ - if (strncmp(line,"TRY",3) == 0) { - if (parse_string(line, &trystring, afflst->getlinenum())) { - delete afflst; - return 1; - } - } - - /* parse in the name of the character set used by the .dict and .aff */ - if (strncmp(line,"SET",3) == 0) { - if (parse_string(line, &encoding, afflst->getlinenum())) { - delete afflst; - return 1; - } - if (strcmp(encoding, "UTF-8") == 0) { - utf8 = 1; -#ifndef OPENOFFICEORG -#ifndef MOZILLA_CLIENT - if (initialize_utf_tbl()) return 1; -#endif -#endif - } - } - - /* parse COMPLEXPREFIXES for agglutinative languages with right-to-left writing system */ - if (strncmp(line,"COMPLEXPREFIXES",15) == 0) - complexprefixes = 1; - - /* parse in the flag used by the controlled compound words */ - if (strncmp(line,"COMPOUNDFLAG",12) == 0) { - if (parse_flag(line, &compoundflag, afflst)) { - delete afflst; - return 1; - } - } - - /* parse in the flag used by compound words */ - if (strncmp(line,"COMPOUNDBEGIN",13) == 0) { - if (complexprefixes) { - if (parse_flag(line, &compoundend, afflst)) { - delete afflst; - return 1; - } - } else { - if (parse_flag(line, &compoundbegin, afflst)) { - delete afflst; - return 1; - } - } - } - - /* parse in the flag used by compound words */ - if (strncmp(line,"COMPOUNDMIDDLE",14) == 0) { - if (parse_flag(line, &compoundmiddle, afflst)) { - delete afflst; - return 1; - } - } - /* parse in the flag used by compound words */ - if (strncmp(line,"COMPOUNDEND",11) == 0) { - if (complexprefixes) { - if (parse_flag(line, &compoundbegin, afflst)) { - delete afflst; - return 1; - } - } else { - if (parse_flag(line, &compoundend, afflst)) { - delete afflst; - return 1; - } - } - } - - /* parse in the data used by compound_check() method */ - if (strncmp(line,"COMPOUNDWORDMAX",15) == 0) { - if (parse_num(line, &cpdwordmax, afflst)) { - delete afflst; - return 1; - } - } - - /* parse in the flag sign compounds in dictionary */ - if (strncmp(line,"COMPOUNDROOT",12) == 0) { - if (parse_flag(line, &compoundroot, afflst)) { - delete afflst; - return 1; - } - } - - /* parse in the flag used by compound_check() method */ - if (strncmp(line,"COMPOUNDPERMITFLAG",18) == 0) { - if (parse_flag(line, &compoundpermitflag, afflst)) { - delete afflst; - return 1; - } - } - - /* parse in the flag used by compound_check() method */ - if (strncmp(line,"COMPOUNDFORBIDFLAG",18) == 0) { - if (parse_flag(line, &compoundforbidflag, afflst)) { - delete afflst; - return 1; - } - } - - if (strncmp(line,"CHECKCOMPOUNDDUP",16) == 0) { - checkcompounddup = 1; - } - - if (strncmp(line,"CHECKCOMPOUNDREP",16) == 0) { - checkcompoundrep = 1; - } - - if (strncmp(line,"CHECKCOMPOUNDTRIPLE",19) == 0) { - checkcompoundtriple = 1; - } - - if (strncmp(line,"SIMPLIFIEDTRIPLE",16) == 0) { - simplifiedtriple = 1; - } - - if (strncmp(line,"CHECKCOMPOUNDCASE",17) == 0) { - checkcompoundcase = 1; - } - - if (strncmp(line,"NOSUGGEST",9) == 0) { - if (parse_flag(line, &nosuggest, afflst)) { - delete afflst; - return 1; - } - } - - if (strncmp(line,"NONGRAMSUGGEST",14) == 0) { - if (parse_flag(line, &nongramsuggest, afflst)) { - delete afflst; - return 1; - } - } - - /* parse in the flag used by forbidden words */ - if (strncmp(line,"FORBIDDENWORD",13) == 0) { - if (parse_flag(line, &forbiddenword, afflst)) { - delete afflst; - return 1; - } - } - - /* parse in the flag used by forbidden words */ - if (strncmp(line,"LEMMA_PRESENT",13) == 0) { - if (parse_flag(line, &lemma_present, afflst)) { - delete afflst; - return 1; - } - } - - /* parse in the flag used by circumfixes */ - if (strncmp(line,"CIRCUMFIX",9) == 0) { - if (parse_flag(line, &circumfix, afflst)) { - delete afflst; - return 1; - } - } - - /* parse in the flag used by fogemorphemes */ - if (strncmp(line,"ONLYINCOMPOUND",14) == 0) { - if (parse_flag(line, &onlyincompound, afflst)) { - delete afflst; - return 1; - } - } - - /* parse in the flag used by `needaffixs' */ - if (strncmp(line,"PSEUDOROOT",10) == 0) { - if (parse_flag(line, &needaffix, afflst)) { - delete afflst; - return 1; - } - } - - /* parse in the flag used by `needaffixs' */ - if (strncmp(line,"NEEDAFFIX",9) == 0) { - if (parse_flag(line, &needaffix, afflst)) { - delete afflst; - return 1; - } - } - - /* parse in the minimal length for words in compounds */ - if (strncmp(line,"COMPOUNDMIN",11) == 0) { - if (parse_num(line, &cpdmin, afflst)) { - delete afflst; - return 1; - } - if (cpdmin < 1) cpdmin = 1; - } - - /* parse in the max. words and syllables in compounds */ - if (strncmp(line,"COMPOUNDSYLLABLE",16) == 0) { - if (parse_cpdsyllable(line, afflst)) { - delete afflst; - return 1; - } - } - - /* parse in the flag used by compound_check() method */ - if (strncmp(line,"SYLLABLENUM",11) == 0) { - if (parse_string(line, &cpdsyllablenum, afflst->getlinenum())) { - delete afflst; - return 1; - } - } - - /* parse in the flag used by the controlled compound words */ - if (strncmp(line,"CHECKNUM",8) == 0) { - checknum=1; - } - - /* parse in the extra word characters */ - if (strncmp(line,"WORDCHARS",9) == 0) { - if (parse_array(line, &wordchars, &wordchars_utf16, &wordchars_utf16_len, utf8, afflst->getlinenum())) { - delete afflst; - return 1; - } - } - - /* parse in the ignored characters (for example, Arabic optional diacretics charachters */ - if (strncmp(line,"IGNORE",6) == 0) { - if (parse_array(line, &ignorechars, &ignorechars_utf16, &ignorechars_utf16_len, utf8, afflst->getlinenum())) { - delete afflst; - return 1; - } - } - - /* parse in the typical fault correcting table */ - if (strncmp(line,"REP",3) == 0) { - if (parse_reptable(line, afflst)) { - delete afflst; - return 1; - } - } - - /* parse in the input conversion table */ - if (strncmp(line,"ICONV",5) == 0) { - if (parse_convtable(line, afflst, &iconvtable, "ICONV")) { - delete afflst; - return 1; - } - } - - /* parse in the input conversion table */ - if (strncmp(line,"OCONV",5) == 0) { - if (parse_convtable(line, afflst, &oconvtable, "OCONV")) { - delete afflst; - return 1; - } - } - - /* parse in the phonetic translation table */ - if (strncmp(line,"PHONE",5) == 0) { - if (parse_phonetable(line, afflst)) { - delete afflst; - return 1; - } - } - - /* parse in the checkcompoundpattern table */ - if (strncmp(line,"CHECKCOMPOUNDPATTERN",20) == 0) { - if (parse_checkcpdtable(line, afflst)) { - delete afflst; - return 1; - } - } - - /* parse in the defcompound table */ - if (strncmp(line,"COMPOUNDRULE",12) == 0) { - if (parse_defcpdtable(line, afflst)) { - delete afflst; - return 1; - } - } - - /* parse in the related character map table */ - if (strncmp(line,"MAP",3) == 0) { - if (parse_maptable(line, afflst)) { - delete afflst; - return 1; - } - } - - /* parse in the word breakpoints table */ - if (strncmp(line,"BREAK",5) == 0) { - if (parse_breaktable(line, afflst)) { - delete afflst; - return 1; - } - } - - /* parse in the language for language specific codes */ - if (strncmp(line,"LANG",4) == 0) { - if (parse_string(line, &lang, afflst->getlinenum())) { - delete afflst; - return 1; - } - langnum = get_lang_num(lang); - } - - if (strncmp(line,"VERSION",7) == 0) { - for(line = line + 7; *line == ' ' || *line == '\t'; line++); - version = mystrdup(line); - } - - if (strncmp(line,"MAXNGRAMSUGS",12) == 0) { - if (parse_num(line, &maxngramsugs, afflst)) { - delete afflst; - return 1; - } - } - - if (strncmp(line,"ONLYMAXDIFF", 11) == 0) - onlymaxdiff = 1; - - if (strncmp(line,"MAXDIFF",7) == 0) { - if (parse_num(line, &maxdiff, afflst)) { - delete afflst; - return 1; - } - } - - if (strncmp(line,"MAXCPDSUGS",10) == 0) { - if (parse_num(line, &maxcpdsugs, afflst)) { - delete afflst; - return 1; - } - } - - if (strncmp(line,"NOSPLITSUGS",11) == 0) { - nosplitsugs=1; - } - - if (strncmp(line,"FULLSTRIP",9) == 0) { - fullstrip=1; - } - - if (strncmp(line,"SUGSWITHDOTS",12) == 0) { - sugswithdots=1; - } - - /* parse in the flag used by forbidden words */ - if (strncmp(line,"KEEPCASE",8) == 0) { - if (parse_flag(line, &keepcase, afflst)) { - delete afflst; - return 1; - } - } - - /* parse in the flag used by `forceucase' */ - if (strncmp(line,"FORCEUCASE",10) == 0) { - if (parse_flag(line, &forceucase, afflst)) { - delete afflst; - return 1; - } - } - - /* parse in the flag used by `warn' */ - if (strncmp(line,"WARN",4) == 0) { - if (parse_flag(line, &warn, afflst)) { - delete afflst; - return 1; - } - } - - if (strncmp(line,"FORBIDWARN",10) == 0) { - forbidwarn=1; - } - - /* parse in the flag used by the affix generator */ - if (strncmp(line,"SUBSTANDARD",11) == 0) { - if (parse_flag(line, &substandard, afflst)) { - delete afflst; - return 1; - } - } - - if (strncmp(line,"CHECKSHARPS",11) == 0) { - checksharps=1; - } - - /* parse this affix: P - prefix, S - suffix */ - ft = ' '; - if (strncmp(line,"PFX",3) == 0) ft = complexprefixes ? 'S' : 'P'; - if (strncmp(line,"SFX",3) == 0) ft = complexprefixes ? 'P' : 'S'; - if (ft != ' ') { - if (dupflags_ini) { - memset(dupflags, 0, sizeof(dupflags)); - dupflags_ini = 0; - } - if (parse_affix(line, ft, afflst, dupflags)) { - delete afflst; - process_pfx_tree_to_list(); - process_sfx_tree_to_list(); - return 1; - } - } - - } - delete afflst; - - // convert affix trees to sorted list - process_pfx_tree_to_list(); - process_sfx_tree_to_list(); - - // now we can speed up performance greatly taking advantage of the - // relationship between the affixes and the idea of "subsets". - - // View each prefix as a potential leading subset of another and view - // each suffix (reversed) as a potential trailing subset of another. - - // To illustrate this relationship if we know the prefix "ab" is found in the - // word to examine, only prefixes that "ab" is a leading subset of need be examined. - // Furthermore is "ab" is not present then none of the prefixes that "ab" is - // is a subset need be examined. - // The same argument goes for suffix string that are reversed. - - // Then to top this off why not examine the first char of the word to quickly - // limit the set of prefixes to examine (i.e. the prefixes to examine must - // be leading supersets of the first character of the word (if they exist) - - // To take advantage of this "subset" relationship, we need to add two links - // from entry. One to take next if the current prefix is found (call it nexteq) - // and one to take next if the current prefix is not found (call it nextne). - - // Since we have built ordered lists, all that remains is to properly initialize - // the nextne and nexteq pointers that relate them - - process_pfx_order(); - process_sfx_order(); - - /* get encoding for CHECKCOMPOUNDCASE */ - if (!utf8) { - char * enc = get_encoding(); - csconv = get_current_cs(enc); - free(enc); - enc = NULL; - - char expw[MAXLNLEN]; - if (wordchars) { - strcpy(expw, wordchars); - free(wordchars); - } else *expw = '\0'; - - for (int i = 0; i <= 255; i++) { - if ( (csconv[i].cupper != csconv[i].clower) && - (! strchr(expw, (char) i))) { - *(expw + strlen(expw) + 1) = '\0'; - *(expw + strlen(expw)) = (char) i; - } - } - - wordchars = mystrdup(expw); - } - - // default BREAK definition - if (numbreak == -1) { - breaktable = (char **) malloc(sizeof(char *) * 3); - if (!breaktable) return 1; - breaktable[0] = mystrdup("-"); - breaktable[1] = mystrdup("^-"); - breaktable[2] = mystrdup("-$"); - if (breaktable[0] && breaktable[1] && breaktable[2]) numbreak = 3; - } - return 0; -} - - -// we want to be able to quickly access prefix information -// both by prefix flag, and sorted by prefix string itself -// so we need to set up two indexes - -int AffixMgr::build_pfxtree(PfxEntry* pfxptr) -{ - PfxEntry * ptr; - PfxEntry * pptr; - PfxEntry * ep = pfxptr; - - // get the right starting points - const char * key = ep->getKey(); - const unsigned char flg = (unsigned char) (ep->getFlag() & 0x00FF); - - // first index by flag which must exist - ptr = pFlag[flg]; - ep->setFlgNxt(ptr); - pFlag[flg] = ep; - - - // handle the special case of null affix string - if (strlen(key) == 0) { - // always inset them at head of list at element 0 - ptr = pStart[0]; - ep->setNext(ptr); - pStart[0] = ep; - return 0; - } - - // now handle the normal case - ep->setNextEQ(NULL); - ep->setNextNE(NULL); - - unsigned char sp = *((const unsigned char *)key); - ptr = pStart[sp]; - - // handle the first insert - if (!ptr) { - pStart[sp] = ep; - return 0; - } - - - // otherwise use binary tree insertion so that a sorted - // list can easily be generated later - pptr = NULL; - for (;;) { - pptr = ptr; - if (strcmp(ep->getKey(), ptr->getKey()) <= 0) { - ptr = ptr->getNextEQ(); - if (!ptr) { - pptr->setNextEQ(ep); - break; - } - } else { - ptr = ptr->getNextNE(); - if (!ptr) { - pptr->setNextNE(ep); - break; - } - } - } - return 0; -} - -// we want to be able to quickly access suffix information -// both by suffix flag, and sorted by the reverse of the -// suffix string itself; so we need to set up two indexes -int AffixMgr::build_sfxtree(SfxEntry* sfxptr) -{ - SfxEntry * ptr; - SfxEntry * pptr; - SfxEntry * ep = sfxptr; - - /* get the right starting point */ - const char * key = ep->getKey(); - const unsigned char flg = (unsigned char) (ep->getFlag() & 0x00FF); - - // first index by flag which must exist - ptr = sFlag[flg]; - ep->setFlgNxt(ptr); - sFlag[flg] = ep; - - // next index by affix string - - // handle the special case of null affix string - if (strlen(key) == 0) { - // always inset them at head of list at element 0 - ptr = sStart[0]; - ep->setNext(ptr); - sStart[0] = ep; - return 0; - } - - // now handle the normal case - ep->setNextEQ(NULL); - ep->setNextNE(NULL); - - unsigned char sp = *((const unsigned char *)key); - ptr = sStart[sp]; - - // handle the first insert - if (!ptr) { - sStart[sp] = ep; - return 0; - } - - // otherwise use binary tree insertion so that a sorted - // list can easily be generated later - pptr = NULL; - for (;;) { - pptr = ptr; - if (strcmp(ep->getKey(), ptr->getKey()) <= 0) { - ptr = ptr->getNextEQ(); - if (!ptr) { - pptr->setNextEQ(ep); - break; - } - } else { - ptr = ptr->getNextNE(); - if (!ptr) { - pptr->setNextNE(ep); - break; - } - } - } - return 0; -} - -// convert from binary tree to sorted list -int AffixMgr::process_pfx_tree_to_list() -{ - for (int i=1; i< SETSIZE; i++) { - pStart[i] = process_pfx_in_order(pStart[i],NULL); - } - return 0; -} - - -PfxEntry* AffixMgr::process_pfx_in_order(PfxEntry* ptr, PfxEntry* nptr) -{ - if (ptr) { - nptr = process_pfx_in_order(ptr->getNextNE(), nptr); - ptr->setNext(nptr); - nptr = process_pfx_in_order(ptr->getNextEQ(), ptr); - } - return nptr; -} - - -// convert from binary tree to sorted list -int AffixMgr:: process_sfx_tree_to_list() -{ - for (int i=1; i< SETSIZE; i++) { - sStart[i] = process_sfx_in_order(sStart[i],NULL); - } - return 0; -} - -SfxEntry* AffixMgr::process_sfx_in_order(SfxEntry* ptr, SfxEntry* nptr) -{ - if (ptr) { - nptr = process_sfx_in_order(ptr->getNextNE(), nptr); - ptr->setNext(nptr); - nptr = process_sfx_in_order(ptr->getNextEQ(), ptr); - } - return nptr; -} - - -// reinitialize the PfxEntry links NextEQ and NextNE to speed searching -// using the idea of leading subsets this time -int AffixMgr::process_pfx_order() -{ - PfxEntry* ptr; - - // loop through each prefix list starting point - for (int i=1; i < SETSIZE; i++) { - - ptr = pStart[i]; - - // look through the remainder of the list - // and find next entry with affix that - // the current one is not a subset of - // mark that as destination for NextNE - // use next in list that you are a subset - // of as NextEQ - - for (; ptr != NULL; ptr = ptr->getNext()) { - - PfxEntry * nptr = ptr->getNext(); - for (; nptr != NULL; nptr = nptr->getNext()) { - if (! isSubset( ptr->getKey() , nptr->getKey())) break; - } - ptr->setNextNE(nptr); - ptr->setNextEQ(NULL); - if ((ptr->getNext()) && isSubset(ptr->getKey() , (ptr->getNext())->getKey())) - ptr->setNextEQ(ptr->getNext()); - } - - // now clean up by adding smart search termination strings: - // if you are already a superset of the previous prefix - // but not a subset of the next, search can end here - // so set NextNE properly - - ptr = pStart[i]; - for (; ptr != NULL; ptr = ptr->getNext()) { - PfxEntry * nptr = ptr->getNext(); - PfxEntry * mptr = NULL; - for (; nptr != NULL; nptr = nptr->getNext()) { - if (! isSubset(ptr->getKey(),nptr->getKey())) break; - mptr = nptr; - } - if (mptr) mptr->setNextNE(NULL); - } - } - return 0; -} - -// initialize the SfxEntry links NextEQ and NextNE to speed searching -// using the idea of leading subsets this time -int AffixMgr::process_sfx_order() -{ - SfxEntry* ptr; - - // loop through each prefix list starting point - for (int i=1; i < SETSIZE; i++) { - - ptr = sStart[i]; - - // look through the remainder of the list - // and find next entry with affix that - // the current one is not a subset of - // mark that as destination for NextNE - // use next in list that you are a subset - // of as NextEQ - - for (; ptr != NULL; ptr = ptr->getNext()) { - SfxEntry * nptr = ptr->getNext(); - for (; nptr != NULL; nptr = nptr->getNext()) { - if (! isSubset(ptr->getKey(),nptr->getKey())) break; - } - ptr->setNextNE(nptr); - ptr->setNextEQ(NULL); - if ((ptr->getNext()) && isSubset(ptr->getKey(),(ptr->getNext())->getKey())) - ptr->setNextEQ(ptr->getNext()); - } - - - // now clean up by adding smart search termination strings: - // if you are already a superset of the previous suffix - // but not a subset of the next, search can end here - // so set NextNE properly - - ptr = sStart[i]; - for (; ptr != NULL; ptr = ptr->getNext()) { - SfxEntry * nptr = ptr->getNext(); - SfxEntry * mptr = NULL; - for (; nptr != NULL; nptr = nptr->getNext()) { - if (! isSubset(ptr->getKey(),nptr->getKey())) break; - mptr = nptr; - } - if (mptr) mptr->setNextNE(NULL); - } - } - return 0; -} - -// add flags to the result for dictionary debugging -void AffixMgr::debugflag(char * result, unsigned short flag) { - char * st = encode_flag(flag); - mystrcat(result, " ", MAXLNLEN); - mystrcat(result, MORPH_FLAG, MAXLNLEN); - if (st) { - mystrcat(result, st, MAXLNLEN); - free(st); - } -} - -// calculate the character length of the condition -int AffixMgr::condlen(char * st) -{ - int l = 0; - bool group = false; - for(; *st; st++) { - if (*st == '[') { - group = true; - l++; - } else if (*st == ']') group = false; - else if (!group && (!utf8 || - (!(*st & 0x80) || ((*st & 0xc0) == 0x80)))) l++; - } - return l; -} - -int AffixMgr::encodeit(affentry &entry, char * cs) -{ - if (strcmp(cs,".") != 0) { - entry.numconds = (char) condlen(cs); - strncpy(entry.c.conds, cs, MAXCONDLEN); - // long condition (end of conds padded by strncpy) - if (entry.c.conds[MAXCONDLEN - 1] && cs[MAXCONDLEN]) { - entry.opts += aeLONGCOND; - entry.c.l.conds2 = mystrdup(cs + MAXCONDLEN_1); - if (!entry.c.l.conds2) return 1; - } - } else { - entry.numconds = 0; - entry.c.conds[0] = '\0'; - } - return 0; -} - -// return 1 if s1 is a leading subset of s2 (dots are for infixes) -inline int AffixMgr::isSubset(const char * s1, const char * s2) - { - while (((*s1 == *s2) || (*s1 == '.')) && (*s1 != '\0')) { - s1++; - s2++; - } - return (*s1 == '\0'); - } - - -// check word for prefixes -struct hentry * AffixMgr::prefix_check(const char * word, int len, char in_compound, - const FLAG needflag) -{ - struct hentry * rv= NULL; - - pfx = NULL; - pfxappnd = NULL; - sfxappnd = NULL; - - // first handle the special case of 0 length prefixes - PfxEntry * pe = pStart[0]; - while (pe) { - if ( - // fogemorpheme - ((in_compound != IN_CPD_NOT) || !(pe->getCont() && - (TESTAFF(pe->getCont(), onlyincompound, pe->getContLen())))) && - // permit prefixes in compounds - ((in_compound != IN_CPD_END) || (pe->getCont() && - (TESTAFF(pe->getCont(), compoundpermitflag, pe->getContLen())))) - ) { - // check prefix - rv = pe->checkword(word, len, in_compound, needflag); - if (rv) { - pfx=pe; // BUG: pfx not stateless - return rv; - } - } - pe = pe->getNext(); - } - - // now handle the general case - unsigned char sp = *((const unsigned char *)word); - PfxEntry * pptr = pStart[sp]; - - while (pptr) { - if (isSubset(pptr->getKey(),word)) { - if ( - // fogemorpheme - ((in_compound != IN_CPD_NOT) || !(pptr->getCont() && - (TESTAFF(pptr->getCont(), onlyincompound, pptr->getContLen())))) && - // permit prefixes in compounds - ((in_compound != IN_CPD_END) || (pptr->getCont() && - (TESTAFF(pptr->getCont(), compoundpermitflag, pptr->getContLen())))) - ) { - // check prefix - rv = pptr->checkword(word, len, in_compound, needflag); - if (rv) { - pfx=pptr; // BUG: pfx not stateless - return rv; - } - } - pptr = pptr->getNextEQ(); - } else { - pptr = pptr->getNextNE(); - } - } - - return NULL; -} - -// check word for prefixes -struct hentry * AffixMgr::prefix_check_twosfx(const char * word, int len, - char in_compound, const FLAG needflag) -{ - struct hentry * rv= NULL; - - pfx = NULL; - sfxappnd = NULL; - - // first handle the special case of 0 length prefixes - PfxEntry * pe = pStart[0]; - - while (pe) { - rv = pe->check_twosfx(word, len, in_compound, needflag); - if (rv) return rv; - pe = pe->getNext(); - } - - // now handle the general case - unsigned char sp = *((const unsigned char *)word); - PfxEntry * pptr = pStart[sp]; - - while (pptr) { - if (isSubset(pptr->getKey(),word)) { - rv = pptr->check_twosfx(word, len, in_compound, needflag); - if (rv) { - pfx = pptr; - return rv; - } - pptr = pptr->getNextEQ(); - } else { - pptr = pptr->getNextNE(); - } - } - - return NULL; -} - -// check word for prefixes -char * AffixMgr::prefix_check_morph(const char * word, int len, char in_compound, - const FLAG needflag) -{ - char * st; - - char result[MAXLNLEN]; - result[0] = '\0'; - - pfx = NULL; - sfxappnd = NULL; - - // first handle the special case of 0 length prefixes - PfxEntry * pe = pStart[0]; - while (pe) { - st = pe->check_morph(word,len,in_compound, needflag); - if (st) { - mystrcat(result, st, MAXLNLEN); - free(st); - } - // if (rv) return rv; - pe = pe->getNext(); - } - - // now handle the general case - unsigned char sp = *((const unsigned char *)word); - PfxEntry * pptr = pStart[sp]; - - while (pptr) { - if (isSubset(pptr->getKey(),word)) { - st = pptr->check_morph(word,len,in_compound, needflag); - if (st) { - // fogemorpheme - if ((in_compound != IN_CPD_NOT) || !((pptr->getCont() && - (TESTAFF(pptr->getCont(), onlyincompound, pptr->getContLen()))))) { - mystrcat(result, st, MAXLNLEN); - pfx = pptr; - } - free(st); - } - pptr = pptr->getNextEQ(); - } else { - pptr = pptr->getNextNE(); - } - } - - if (*result) return mystrdup(result); - return NULL; -} - - -// check word for prefixes -char * AffixMgr::prefix_check_twosfx_morph(const char * word, int len, - char in_compound, const FLAG needflag) -{ - char * st; - - char result[MAXLNLEN]; - result[0] = '\0'; - - pfx = NULL; - sfxappnd = NULL; - - // first handle the special case of 0 length prefixes - PfxEntry * pe = pStart[0]; - while (pe) { - st = pe->check_twosfx_morph(word,len,in_compound, needflag); - if (st) { - mystrcat(result, st, MAXLNLEN); - free(st); - } - pe = pe->getNext(); - } - - // now handle the general case - unsigned char sp = *((const unsigned char *)word); - PfxEntry * pptr = pStart[sp]; - - while (pptr) { - if (isSubset(pptr->getKey(),word)) { - st = pptr->check_twosfx_morph(word, len, in_compound, needflag); - if (st) { - mystrcat(result, st, MAXLNLEN); - free(st); - pfx = pptr; - } - pptr = pptr->getNextEQ(); - } else { - pptr = pptr->getNextNE(); - } - } - - if (*result) return mystrdup(result); - return NULL; -} - -// Is word a non compound with a REP substitution (see checkcompoundrep)? -int AffixMgr::cpdrep_check(const char * word, int wl) -{ - char candidate[MAXLNLEN]; - const char * r; - int lenr, lenp; - - if ((wl < 2) || !numrep) return 0; - - for (int i=0; i < numrep; i++ ) { - r = word; - lenr = strlen(reptable[i].pattern2); - lenp = strlen(reptable[i].pattern); - // search every occurence of the pattern in the word - while ((r=strstr(r, reptable[i].pattern)) != NULL) { - strcpy(candidate, word); - if (r-word + lenr + strlen(r+lenp) >= MAXLNLEN) break; - strcpy(candidate+(r-word),reptable[i].pattern2); - strcpy(candidate+(r-word)+lenr, r+lenp); - if (candidate_check(candidate,strlen(candidate))) return 1; - r++; // search for the next letter - } - } - return 0; -} - -// forbid compoundings when there are special patterns at word bound -int AffixMgr::cpdpat_check(const char * word, int pos, hentry * r1, hentry * r2, const char affixed) -{ - int len; - for (int i = 0; i < numcheckcpd; i++) { - if (isSubset(checkcpdtable[i].pattern2, word + pos) && - (!r1 || !checkcpdtable[i].cond || - (r1->astr && TESTAFF(r1->astr, checkcpdtable[i].cond, r1->alen))) && - (!r2 || !checkcpdtable[i].cond2 || - (r2->astr && TESTAFF(r2->astr, checkcpdtable[i].cond2, r2->alen))) && - // zero length pattern => only TESTAFF - // zero pattern (0/flag) => unmodified stem (zero affixes allowed) - (!*(checkcpdtable[i].pattern) || ( - (*(checkcpdtable[i].pattern)=='0' && r1->blen <= pos && strncmp(word + pos - r1->blen, r1->word, r1->blen) == 0) || - (*(checkcpdtable[i].pattern)!='0' && (len = strlen(checkcpdtable[i].pattern)) && - strncmp(word + pos - len, checkcpdtable[i].pattern, len) == 0)))) { - return 1; - } - } - return 0; -} - -// forbid compounding with neighbouring upper and lower case characters at word bounds -int AffixMgr::cpdcase_check(const char * word, int pos) -{ - if (utf8) { - w_char u, w; - const char * p; - u8_u16(&u, 1, word + pos); - for (p = word + pos - 1; (*p & 0xc0) == 0x80; p--); - u8_u16(&w, 1, p); - unsigned short a = (u.h << 8) + u.l; - unsigned short b = (w.h << 8) + w.l; - if (((unicodetoupper(a, langnum) == a) || (unicodetoupper(b, langnum) == b)) && - (a != '-') && (b != '-')) return 1; - } else { - unsigned char a = *(word + pos - 1); - unsigned char b = *(word + pos); - if ((csconv[a].ccase || csconv[b].ccase) && (a != '-') && (b != '-')) return 1; - } - return 0; -} - -// check compound patterns -int AffixMgr::defcpd_check(hentry *** words, short wnum, hentry * rv, hentry ** def, char all) -{ - signed short btpp[MAXWORDLEN]; // metacharacter (*, ?) positions for backtracking - signed short btwp[MAXWORDLEN]; // word positions for metacharacters - int btnum[MAXWORDLEN]; // number of matched characters in metacharacter positions - short bt = 0; - int i, j; - int ok; - int w = 0; - - if (!*words) { - w = 1; - *words = def; - } - - if (!*words) { - return 0; - } - - (*words)[wnum] = rv; - - // has the last word COMPOUNDRULE flag? - if (rv->alen == 0) { - (*words)[wnum] = NULL; - if (w) *words = NULL; - return 0; - } - ok = 0; - for (i = 0; i < numdefcpd; i++) { - for (j = 0; j < defcpdtable[i].len; j++) { - if (defcpdtable[i].def[j] != '*' && defcpdtable[i].def[j] != '?' && - TESTAFF(rv->astr, defcpdtable[i].def[j], rv->alen)) ok = 1; - } - } - if (ok == 0) { - (*words)[wnum] = NULL; - if (w) *words = NULL; - return 0; - } - - for (i = 0; i < numdefcpd; i++) { - signed short pp = 0; // pattern position - signed short wp = 0; // "words" position - int ok2; - ok = 1; - ok2 = 1; - do { - while ((pp < defcpdtable[i].len) && (wp <= wnum)) { - if (((pp+1) < defcpdtable[i].len) && - ((defcpdtable[i].def[pp+1] == '*') || (defcpdtable[i].def[pp+1] == '?'))) { - int wend = (defcpdtable[i].def[pp+1] == '?') ? wp : wnum; - ok2 = 1; - pp+=2; - btpp[bt] = pp; - btwp[bt] = wp; - while (wp <= wend) { - if (!(*words)[wp]->alen || - !TESTAFF((*words)[wp]->astr, defcpdtable[i].def[pp-2], (*words)[wp]->alen)) { - ok2 = 0; - break; - } - wp++; - } - if (wp <= wnum) ok2 = 0; - btnum[bt] = wp - btwp[bt]; - if (btnum[bt] > 0) bt++; - if (ok2) break; - } else { - ok2 = 1; - if (!(*words)[wp] || !(*words)[wp]->alen || - !TESTAFF((*words)[wp]->astr, defcpdtable[i].def[pp], (*words)[wp]->alen)) { - ok = 0; - break; - } - pp++; - wp++; - if ((defcpdtable[i].len == pp) && !(wp > wnum)) ok = 0; - } - } - if (ok && ok2) { - int r = pp; - while ((defcpdtable[i].len > r) && ((r+1) < defcpdtable[i].len) && - ((defcpdtable[i].def[r+1] == '*') || (defcpdtable[i].def[r+1] == '?'))) r+=2; - if (defcpdtable[i].len <= r) return 1; - } - // backtrack - if (bt) do { - ok = 1; - btnum[bt - 1]--; - pp = btpp[bt - 1]; - wp = btwp[bt - 1] + (signed short) btnum[bt - 1]; - } while ((btnum[bt - 1] < 0) && --bt); - } while (bt); - - if (ok && ok2 && (!all || (defcpdtable[i].len <= pp))) return 1; - - // check zero ending - while (ok && ok2 && (defcpdtable[i].len > pp) && ((pp+1) < defcpdtable[i].len) && - ((defcpdtable[i].def[pp+1] == '*') || (defcpdtable[i].def[pp+1] == '?'))) pp+=2; - if (ok && ok2 && (defcpdtable[i].len <= pp)) return 1; - } - (*words)[wnum] = NULL; - if (w) *words = NULL; - return 0; -} - -inline int AffixMgr::candidate_check(const char * word, int len) -{ - struct hentry * rv=NULL; - - rv = lookup(word); - if (rv) return 1; - -// rv = prefix_check(word,len,1); -// if (rv) return 1; - - rv = affix_check(word,len); - if (rv) return 1; - return 0; -} - -// calculate number of syllable for compound-checking -short AffixMgr::get_syllable(const char * word, int wlen) -{ - if (cpdmaxsyllable==0) return 0; - - short num=0; - - if (!utf8) { - for (int i=0; i 0; i--) { - if (flag_bsearch((unsigned short *) cpdvowels_utf16, - ((unsigned short *) w)[i - 1], cpdvowels_utf16_len)) num++; - } - } - return num; -} - -void AffixMgr::setcminmax(int * cmin, int * cmax, const char * word, int len) { - if (utf8) { - int i; - for (*cmin = 0, i = 0; (i < cpdmin) && word[*cmin]; i++) { - for ((*cmin)++; (word[*cmin] & 0xc0) == 0x80; (*cmin)++); - } - for (*cmax = len, i = 0; (i < (cpdmin - 1)) && *cmax; i++) { - for ((*cmax)--; (word[*cmax] & 0xc0) == 0x80; (*cmax)--); - } - } else { - *cmin = cpdmin; - *cmax = len - cpdmin + 1; - } -} - - -// check if compound word is correctly spelled -// hu_mov_rule = spec. Hungarian rule (XXX) -struct hentry * AffixMgr::compound_check(const char * word, int len, - short wordnum, short numsyllable, short maxwordnum, short wnum, hentry ** words = NULL, - char hu_mov_rule = 0, char is_sug = 0, int * info = NULL) -{ - int i; - short oldnumsyllable, oldnumsyllable2, oldwordnum, oldwordnum2; - struct hentry * rv = NULL; - struct hentry * rv_first; - struct hentry * rwords[MAXWORDLEN]; // buffer for COMPOUND pattern checking - char st [MAXWORDUTF8LEN + 4]; - char ch = '\0'; - int cmin; - int cmax; - int striple = 0; - int scpd = 0; - int soldi = 0; - int oldcmin = 0; - int oldcmax = 0; - int oldlen = 0; - int checkedstriple = 0; - int onlycpdrule; - int affixed = 0; - hentry ** oldwords = words; - - int checked_prefix; - - setcminmax(&cmin, &cmax, word, len); - - strcpy(st, word); - - for (i = cmin; i < cmax; i++) { - // go to end of the UTF-8 character - if (utf8) { - for (; (st[i] & 0xc0) == 0x80; i++); - if (i >= cmax) return NULL; - } - - words = oldwords; - onlycpdrule = (words) ? 1 : 0; - - do { // onlycpdrule loop - - oldnumsyllable = numsyllable; - oldwordnum = wordnum; - checked_prefix = 0; - - - do { // simplified checkcompoundpattern loop - - if (scpd > 0) { - for (; scpd <= numcheckcpd && (!checkcpdtable[scpd-1].pattern3 || - strncmp(word + i, checkcpdtable[scpd-1].pattern3, strlen(checkcpdtable[scpd-1].pattern3)) != 0); scpd++); - - if (scpd > numcheckcpd) break; // break simplified checkcompoundpattern loop - strcpy(st + i, checkcpdtable[scpd-1].pattern); - soldi = i; - i += strlen(checkcpdtable[scpd-1].pattern); - strcpy(st + i, checkcpdtable[scpd-1].pattern2); - strcpy(st + i + strlen(checkcpdtable[scpd-1].pattern2), word + soldi + strlen(checkcpdtable[scpd-1].pattern3)); - - oldlen = len; - len += strlen(checkcpdtable[scpd-1].pattern) + strlen(checkcpdtable[scpd-1].pattern2) - strlen(checkcpdtable[scpd-1].pattern3); - oldcmin = cmin; - oldcmax = cmax; - setcminmax(&cmin, &cmax, st, len); - - cmax = len - cpdmin + 1; - } - - ch = st[i]; - st[i] = '\0'; - - sfx = NULL; - pfx = NULL; - - // FIRST WORD - - affixed = 1; - rv = lookup(st); // perhaps without prefix - - // search homonym with compound flag - while ((rv) && !hu_mov_rule && - ((needaffix && TESTAFF(rv->astr, needaffix, rv->alen)) || - !((compoundflag && !words && !onlycpdrule && TESTAFF(rv->astr, compoundflag, rv->alen)) || - (compoundbegin && !wordnum && !onlycpdrule && - TESTAFF(rv->astr, compoundbegin, rv->alen)) || - (compoundmiddle && wordnum && !words && !onlycpdrule && - TESTAFF(rv->astr, compoundmiddle, rv->alen)) || - (numdefcpd && onlycpdrule && - ((!words && !wordnum && defcpd_check(&words, wnum, rv, (hentry **) &rwords, 0)) || - (words && defcpd_check(&words, wnum, rv, (hentry **) &rwords, 0))))) || - (scpd != 0 && checkcpdtable[scpd-1].cond != FLAG_NULL && - !TESTAFF(rv->astr, checkcpdtable[scpd-1].cond, rv->alen))) - ) { - rv = rv->next_homonym; - } - - if (rv) affixed = 0; - - if (!rv) { - if (onlycpdrule) break; - if (compoundflag && - !(rv = prefix_check(st, i, hu_mov_rule ? IN_CPD_OTHER : IN_CPD_BEGIN, compoundflag))) { - if ((rv = suffix_check(st, i, 0, NULL, NULL, 0, NULL, - FLAG_NULL, compoundflag, hu_mov_rule ? IN_CPD_OTHER : IN_CPD_BEGIN)) && !hu_mov_rule && - sfx->getCont() && - ((compoundforbidflag && TESTAFF(sfx->getCont(), compoundforbidflag, - sfx->getContLen())) || (compoundend && - TESTAFF(sfx->getCont(), compoundend, - sfx->getContLen())))) { - rv = NULL; - } - } - - if (rv || - (((wordnum == 0) && compoundbegin && - ((rv = suffix_check(st, i, 0, NULL, NULL, 0, NULL, FLAG_NULL, compoundbegin, hu_mov_rule ? IN_CPD_OTHER : IN_CPD_BEGIN)) || - (rv = prefix_check(st, i, hu_mov_rule ? IN_CPD_OTHER : IN_CPD_BEGIN, compoundbegin)))) || - ((wordnum > 0) && compoundmiddle && - ((rv = suffix_check(st, i, 0, NULL, NULL, 0, NULL, FLAG_NULL, compoundmiddle, hu_mov_rule ? IN_CPD_OTHER : IN_CPD_BEGIN)) || - (rv = prefix_check(st, i, hu_mov_rule ? IN_CPD_OTHER : IN_CPD_BEGIN, compoundmiddle))))) - ) checked_prefix = 1; - // else check forbiddenwords and needaffix - } else if (rv->astr && (TESTAFF(rv->astr, forbiddenword, rv->alen) || - TESTAFF(rv->astr, needaffix, rv->alen) || - TESTAFF(rv->astr, ONLYUPCASEFLAG, rv->alen) || - (is_sug && nosuggest && TESTAFF(rv->astr, nosuggest, rv->alen)) - )) { - st[i] = ch; - //continue; - break; - } - - // check non_compound flag in suffix and prefix - if ((rv) && !hu_mov_rule && - ((pfx && pfx->getCont() && - TESTAFF(pfx->getCont(), compoundforbidflag, - pfx->getContLen())) || - (sfx && sfx->getCont() && - TESTAFF(sfx->getCont(), compoundforbidflag, - sfx->getContLen())))) { - rv = NULL; - } - - // check compoundend flag in suffix and prefix - if ((rv) && !checked_prefix && compoundend && !hu_mov_rule && - ((pfx && pfx->getCont() && - TESTAFF(pfx->getCont(), compoundend, - pfx->getContLen())) || - (sfx && sfx->getCont() && - TESTAFF(sfx->getCont(), compoundend, - sfx->getContLen())))) { - rv = NULL; - } - - // check compoundmiddle flag in suffix and prefix - if ((rv) && !checked_prefix && (wordnum==0) && compoundmiddle && !hu_mov_rule && - ((pfx && pfx->getCont() && - TESTAFF(pfx->getCont(), compoundmiddle, - pfx->getContLen())) || - (sfx && sfx->getCont() && - TESTAFF(sfx->getCont(), compoundmiddle, - sfx->getContLen())))) { - rv = NULL; - } - - // check forbiddenwords - if ((rv) && (rv->astr) && (TESTAFF(rv->astr, forbiddenword, rv->alen) || - TESTAFF(rv->astr, ONLYUPCASEFLAG, rv->alen) || - (is_sug && nosuggest && TESTAFF(rv->astr, nosuggest, rv->alen)))) { - return NULL; - } - - // increment word number, if the second root has a compoundroot flag - if ((rv) && compoundroot && - (TESTAFF(rv->astr, compoundroot, rv->alen))) { - wordnum++; - } - - // first word is acceptable in compound words? - if (((rv) && - ( checked_prefix || (words && words[wnum]) || - (compoundflag && TESTAFF(rv->astr, compoundflag, rv->alen)) || - ((oldwordnum == 0) && compoundbegin && TESTAFF(rv->astr, compoundbegin, rv->alen)) || - ((oldwordnum > 0) && compoundmiddle && TESTAFF(rv->astr, compoundmiddle, rv->alen))// || -// (numdefcpd && ) - -// LANG_hu section: spec. Hungarian rule - || ((langnum == LANG_hu) && hu_mov_rule && ( - TESTAFF(rv->astr, 'F', rv->alen) || // XXX hardwired Hungarian dictionary codes - TESTAFF(rv->astr, 'G', rv->alen) || - TESTAFF(rv->astr, 'H', rv->alen) - ) - ) -// END of LANG_hu section - ) && - ( - // test CHECKCOMPOUNDPATTERN conditions - scpd == 0 || checkcpdtable[scpd-1].cond == FLAG_NULL || - TESTAFF(rv->astr, checkcpdtable[scpd-1].cond, rv->alen) - ) - && ! (( checkcompoundtriple && scpd == 0 && !words && // test triple letters - (word[i-1]==word[i]) && ( - ((i>1) && (word[i-1]==word[i-2])) || - ((word[i-1]==word[i+1])) // may be word[i+1] == '\0' - ) - ) || - ( - checkcompoundcase && scpd == 0 && !words && cpdcase_check(word, i) - )) - ) -// LANG_hu section: spec. Hungarian rule - || ((!rv) && (langnum == LANG_hu) && hu_mov_rule && (rv = affix_check(st,i)) && - (sfx && sfx->getCont() && ( // XXX hardwired Hungarian dic. codes - TESTAFF(sfx->getCont(), (unsigned short) 'x', sfx->getContLen()) || - TESTAFF(sfx->getCont(), (unsigned short) '%', sfx->getContLen()) - ) - ) - ) - ) { // first word is ok condition - -// LANG_hu section: spec. Hungarian rule - if (langnum == LANG_hu) { - // calculate syllable number of the word - numsyllable += get_syllable(st, i); - // + 1 word, if syllable number of the prefix > 1 (hungarian convention) - if (pfx && (get_syllable(pfx->getKey(),strlen(pfx->getKey())) > 1)) wordnum++; - } -// END of LANG_hu section - - // NEXT WORD(S) - rv_first = rv; - st[i] = ch; - - do { // striple loop - - // check simplifiedtriple - if (simplifiedtriple) { - if (striple) { - checkedstriple = 1; - i--; // check "fahrt" instead of "ahrt" in "Schiffahrt" - } else if (i > 2 && *(word+i - 1) == *(word + i - 2)) striple = 1; - } - - rv = lookup((st+i)); // perhaps without prefix - - // search homonym with compound flag - while ((rv) && ((needaffix && TESTAFF(rv->astr, needaffix, rv->alen)) || - !((compoundflag && !words && TESTAFF(rv->astr, compoundflag, rv->alen)) || - (compoundend && !words && TESTAFF(rv->astr, compoundend, rv->alen)) || - (numdefcpd && words && defcpd_check(&words, wnum + 1, rv, NULL,1))) || - (scpd != 0 && checkcpdtable[scpd-1].cond2 != FLAG_NULL && - !TESTAFF(rv->astr, checkcpdtable[scpd-1].cond2, rv->alen)) - )) { - rv = rv->next_homonym; - } - - // check FORCEUCASE - if (rv && forceucase && (rv) && - (TESTAFF(rv->astr, forceucase, rv->alen)) && !(info && *info & SPELL_ORIGCAP)) rv = NULL; - - if (rv && words && words[wnum + 1]) return rv_first; - - oldnumsyllable2 = numsyllable; - oldwordnum2 = wordnum; - - -// LANG_hu section: spec. Hungarian rule, XXX hardwired dictionary code - if ((rv) && (langnum == LANG_hu) && (TESTAFF(rv->astr, 'I', rv->alen)) && !(TESTAFF(rv->astr, 'J', rv->alen))) { - numsyllable--; - } -// END of LANG_hu section - - // increment word number, if the second root has a compoundroot flag - if ((rv) && (compoundroot) && - (TESTAFF(rv->astr, compoundroot, rv->alen))) { - wordnum++; - } - - // check forbiddenwords - if ((rv) && (rv->astr) && (TESTAFF(rv->astr, forbiddenword, rv->alen) || - TESTAFF(rv->astr, ONLYUPCASEFLAG, rv->alen) || - (is_sug && nosuggest && TESTAFF(rv->astr, nosuggest, rv->alen)))) return NULL; - - // second word is acceptable, as a root? - // hungarian conventions: compounding is acceptable, - // when compound forms consist of 2 words, or if more, - // then the syllable number of root words must be 6, or lesser. - - if ((rv) && ( - (compoundflag && TESTAFF(rv->astr, compoundflag, rv->alen)) || - (compoundend && TESTAFF(rv->astr, compoundend, rv->alen)) - ) - && ( - ((cpdwordmax==-1) || (wordnum+1clen)<=cpdmaxsyllable)) - ) && - ( - // test CHECKCOMPOUNDPATTERN - !numcheckcpd || scpd != 0 || !cpdpat_check(word, i, rv_first, rv, 0) - ) && - ( - (!checkcompounddup || (rv != rv_first)) - ) - // test CHECKCOMPOUNDPATTERN conditions - && (scpd == 0 || checkcpdtable[scpd-1].cond2 == FLAG_NULL || - TESTAFF(rv->astr, checkcpdtable[scpd-1].cond2, rv->alen)) - ) - { - // forbid compound word, if it is a non compound word with typical fault - if (checkcompoundrep && cpdrep_check(word,len)) return NULL; - return rv_first; - } - - numsyllable = oldnumsyllable2; - wordnum = oldwordnum2; - - // perhaps second word has prefix or/and suffix - sfx = NULL; - sfxflag = FLAG_NULL; - rv = (compoundflag && !onlycpdrule) ? affix_check((word+i),strlen(word+i), compoundflag, IN_CPD_END) : NULL; - if (!rv && compoundend && !onlycpdrule) { - sfx = NULL; - pfx = NULL; - rv = affix_check((word+i),strlen(word+i), compoundend, IN_CPD_END); - } - - if (!rv && numdefcpd && words) { - rv = affix_check((word+i),strlen(word+i), 0, IN_CPD_END); - if (rv && defcpd_check(&words, wnum + 1, rv, NULL, 1)) return rv_first; - rv = NULL; - } - - // test CHECKCOMPOUNDPATTERN conditions (allowed forms) - if (rv && !(scpd == 0 || checkcpdtable[scpd-1].cond2 == FLAG_NULL || - TESTAFF(rv->astr, checkcpdtable[scpd-1].cond2, rv->alen))) rv = NULL; - - // test CHECKCOMPOUNDPATTERN conditions (forbidden compounds) - if (rv && numcheckcpd && scpd == 0 && cpdpat_check(word, i, rv_first, rv, affixed)) rv = NULL; - - // check non_compound flag in suffix and prefix - if ((rv) && - ((pfx && pfx->getCont() && - TESTAFF(pfx->getCont(), compoundforbidflag, - pfx->getContLen())) || - (sfx && sfx->getCont() && - TESTAFF(sfx->getCont(), compoundforbidflag, - sfx->getContLen())))) { - rv = NULL; - } - - // check FORCEUCASE - if (rv && forceucase && (rv) && - (TESTAFF(rv->astr, forceucase, rv->alen)) && !(info && *info & SPELL_ORIGCAP)) rv = NULL; - - // check forbiddenwords - if ((rv) && (rv->astr) && (TESTAFF(rv->astr, forbiddenword, rv->alen) || - TESTAFF(rv->astr, ONLYUPCASEFLAG, rv->alen) || - (is_sug && nosuggest && TESTAFF(rv->astr, nosuggest, rv->alen)))) return NULL; - - // pfxappnd = prefix of word+i, or NULL - // calculate syllable number of prefix. - // hungarian convention: when syllable number of prefix is more, - // than 1, the prefix+word counts as two words. - - if (langnum == LANG_hu) { - // calculate syllable number of the word - numsyllable += get_syllable(word + i, strlen(word + i)); - - // - affix syllable num. - // XXX only second suffix (inflections, not derivations) - if (sfxappnd) { - char * tmp = myrevstrdup(sfxappnd); - numsyllable -= get_syllable(tmp, strlen(tmp)); - free(tmp); - } - - // + 1 word, if syllable number of the prefix > 1 (hungarian convention) - if (pfx && (get_syllable(pfx->getKey(),strlen(pfx->getKey())) > 1)) wordnum++; - - // increment syllable num, if last word has a SYLLABLENUM flag - // and the suffix is beginning `s' - - if (cpdsyllablenum) { - switch (sfxflag) { - case 'c': { numsyllable+=2; break; } - case 'J': { numsyllable += 1; break; } - case 'I': { if (rv && TESTAFF(rv->astr, 'J', rv->alen)) numsyllable += 1; break; } - } - } - } - - // increment word number, if the second word has a compoundroot flag - if ((rv) && (compoundroot) && - (TESTAFF(rv->astr, compoundroot, rv->alen))) { - wordnum++; - } - - // second word is acceptable, as a word with prefix or/and suffix? - // hungarian conventions: compounding is acceptable, - // when compound forms consist 2 word, otherwise - // the syllable number of root words is 6, or lesser. - if ((rv) && - ( - ((cpdwordmax == -1) || (wordnum + 1 < cpdwordmax)) || - ((cpdmaxsyllable != 0) && - (numsyllable <= cpdmaxsyllable)) - ) - && ( - (!checkcompounddup || (rv != rv_first)) - )) { - // forbid compound word, if it is a non compound word with typical fault - if (checkcompoundrep && cpdrep_check(word, len)) return NULL; - return rv_first; - } - - numsyllable = oldnumsyllable2; - wordnum = oldwordnum2; - - // perhaps second word is a compound word (recursive call) - if (wordnum < maxwordnum) { - rv = compound_check((st+i),strlen(st+i), wordnum+1, - numsyllable, maxwordnum, wnum + 1, words, 0, is_sug, info); - - if (rv && numcheckcpd && ((scpd == 0 && cpdpat_check(word, i, rv_first, rv, affixed)) || - (scpd != 0 && !cpdpat_check(word, i, rv_first, rv, affixed)))) rv = NULL; - } else { - rv=NULL; - } - if (rv) { - // forbid compound word, if it is a non compound word with typical fault - if (checkcompoundrep || forbiddenword) { - struct hentry * rv2 = NULL; - - if (checkcompoundrep && cpdrep_check(word, len)) return NULL; - - // check first part - if (strncmp(rv->word, word + i, rv->blen) == 0) { - char r = *(st + i + rv->blen); - *(st + i + rv->blen) = '\0'; - - if (checkcompoundrep && cpdrep_check(st, i + rv->blen)) { - *(st + i + rv->blen) = r; - continue; - } - - if (forbiddenword) { - rv2 = lookup(word); - if (!rv2) rv2 = affix_check(word, len); - if (rv2 && rv2->astr && TESTAFF(rv2->astr, forbiddenword, rv2->alen) && - (strncmp(rv2->word, st, i + rv->blen) == 0)) { - return NULL; - } - } - *(st + i + rv->blen) = r; - } - } - return rv_first; - } - } while (striple && !checkedstriple); // end of striple loop - - if (checkedstriple) { - i++; - checkedstriple = 0; - striple = 0; - } - - } // first word is ok condition - - if (soldi != 0) { - i = soldi; - soldi = 0; - len = oldlen; - cmin = oldcmin; - cmax = oldcmax; - } - scpd++; - - - } while (!onlycpdrule && simplifiedcpd && scpd <= numcheckcpd); // end of simplifiedcpd loop - - scpd = 0; - wordnum = oldwordnum; - numsyllable = oldnumsyllable; - - if (soldi != 0) { - i = soldi; - strcpy(st, word); // XXX add more optim. - soldi = 0; - } else st[i] = ch; - - } while (numdefcpd && oldwordnum == 0 && !onlycpdrule && (onlycpdrule = 1)); // end of onlycpd loop - - } - - return NULL; -} - -// check if compound word is correctly spelled -// hu_mov_rule = spec. Hungarian rule (XXX) -int AffixMgr::compound_check_morph(const char * word, int len, - short wordnum, short numsyllable, short maxwordnum, short wnum, hentry ** words, - char hu_mov_rule = 0, char ** result = NULL, char * partresult = NULL) -{ - int i; - short oldnumsyllable, oldnumsyllable2, oldwordnum, oldwordnum2; - int ok = 0; - - struct hentry * rv = NULL; - struct hentry * rv_first; - struct hentry * rwords[MAXWORDLEN]; // buffer for COMPOUND pattern checking - char st [MAXWORDUTF8LEN + 4]; - char ch; - - int checked_prefix; - char presult[MAXLNLEN]; - - int cmin; - int cmax; - - int onlycpdrule; - int affixed = 0; - hentry ** oldwords = words; - - setcminmax(&cmin, &cmax, word, len); - - strcpy(st, word); - - for (i = cmin; i < cmax; i++) { - oldnumsyllable = numsyllable; - oldwordnum = wordnum; - checked_prefix = 0; - - // go to end of the UTF-8 character - if (utf8) { - for (; (st[i] & 0xc0) == 0x80; i++); - if (i >= cmax) return 0; - } - - words = oldwords; - onlycpdrule = (words) ? 1 : 0; - - do { // onlycpdrule loop - - oldnumsyllable = numsyllable; - oldwordnum = wordnum; - checked_prefix = 0; - - ch = st[i]; - st[i] = '\0'; - sfx = NULL; - - // FIRST WORD - - affixed = 1; - - *presult = '\0'; - if (partresult) mystrcat(presult, partresult, MAXLNLEN); - - rv = lookup(st); // perhaps without prefix - - // search homonym with compound flag - while ((rv) && !hu_mov_rule && - ((needaffix && TESTAFF(rv->astr, needaffix, rv->alen)) || - !((compoundflag && !words && !onlycpdrule && TESTAFF(rv->astr, compoundflag, rv->alen)) || - (compoundbegin && !wordnum && !onlycpdrule && - TESTAFF(rv->astr, compoundbegin, rv->alen)) || - (compoundmiddle && wordnum && !words && !onlycpdrule && - TESTAFF(rv->astr, compoundmiddle, rv->alen)) || - (numdefcpd && onlycpdrule && - ((!words && !wordnum && defcpd_check(&words, wnum, rv, (hentry **) &rwords, 0)) || - (words && defcpd_check(&words, wnum, rv, (hentry **) &rwords, 0)))) - ))) { - rv = rv->next_homonym; - } - - if (rv) affixed = 0; - - if (rv) { - sprintf(presult + strlen(presult), "%c%s%s", MSEP_FLD, MORPH_PART, st); - if (!HENTRY_FIND(rv, MORPH_STEM)) { - sprintf(presult + strlen(presult), "%c%s%s", MSEP_FLD, MORPH_STEM, st); - } - // store the pointer of the hash entry -// sprintf(presult + strlen(presult), "%c%s%p", MSEP_FLD, MORPH_HENTRY, rv); - if (HENTRY_DATA(rv)) { - sprintf(presult + strlen(presult), "%c%s", MSEP_FLD, HENTRY_DATA2(rv)); - } - } - - if (!rv) { - if (onlycpdrule) break; - if (compoundflag && - !(rv = prefix_check(st, i, hu_mov_rule ? IN_CPD_OTHER : IN_CPD_BEGIN, compoundflag))) { - if ((rv = suffix_check(st, i, 0, NULL, NULL, 0, NULL, - FLAG_NULL, compoundflag, hu_mov_rule ? IN_CPD_OTHER : IN_CPD_BEGIN)) && !hu_mov_rule && - sfx->getCont() && - ((compoundforbidflag && TESTAFF(sfx->getCont(), compoundforbidflag, - sfx->getContLen())) || (compoundend && - TESTAFF(sfx->getCont(), compoundend, - sfx->getContLen())))) { - rv = NULL; - } - } - - if (rv || - (((wordnum == 0) && compoundbegin && - ((rv = suffix_check(st, i, 0, NULL, NULL, 0, NULL, FLAG_NULL, compoundbegin, hu_mov_rule ? IN_CPD_OTHER : IN_CPD_BEGIN)) || - (rv = prefix_check(st, i, hu_mov_rule ? IN_CPD_OTHER : IN_CPD_BEGIN, compoundbegin)))) || - ((wordnum > 0) && compoundmiddle && - ((rv = suffix_check(st, i, 0, NULL, NULL, 0, NULL, FLAG_NULL, compoundmiddle, hu_mov_rule ? IN_CPD_OTHER : IN_CPD_BEGIN)) || - (rv = prefix_check(st, i, hu_mov_rule ? IN_CPD_OTHER : IN_CPD_BEGIN, compoundmiddle))))) - ) { - // char * p = prefix_check_morph(st, i, 0, compound); - char * p = NULL; - if (compoundflag) p = affix_check_morph(st, i, compoundflag); - if (!p || (*p == '\0')) { - if (p) free(p); - p = NULL; - if ((wordnum == 0) && compoundbegin) { - p = affix_check_morph(st, i, compoundbegin); - } else if ((wordnum > 0) && compoundmiddle) { - p = affix_check_morph(st, i, compoundmiddle); - } - } - if (p && (*p != '\0')) { - sprintf(presult + strlen(presult), "%c%s%s%s", MSEP_FLD, - MORPH_PART, st, line_uniq_app(&p, MSEP_REC)); - } - if (p) free(p); - checked_prefix = 1; - } - // else check forbiddenwords - } else if (rv->astr && (TESTAFF(rv->astr, forbiddenword, rv->alen) || - TESTAFF(rv->astr, ONLYUPCASEFLAG, rv->alen) || - TESTAFF(rv->astr, needaffix, rv->alen))) { - st[i] = ch; - continue; - } - - // check non_compound flag in suffix and prefix - if ((rv) && !hu_mov_rule && - ((pfx && pfx->getCont() && - TESTAFF(pfx->getCont(), compoundforbidflag, - pfx->getContLen())) || - (sfx && sfx->getCont() && - TESTAFF(sfx->getCont(), compoundforbidflag, - sfx->getContLen())))) { - continue; - } - - // check compoundend flag in suffix and prefix - if ((rv) && !checked_prefix && compoundend && !hu_mov_rule && - ((pfx && pfx->getCont() && - TESTAFF(pfx->getCont(), compoundend, - pfx->getContLen())) || - (sfx && sfx->getCont() && - TESTAFF(sfx->getCont(), compoundend, - sfx->getContLen())))) { - continue; - } - - // check compoundmiddle flag in suffix and prefix - if ((rv) && !checked_prefix && (wordnum==0) && compoundmiddle && !hu_mov_rule && - ((pfx && pfx->getCont() && - TESTAFF(pfx->getCont(), compoundmiddle, - pfx->getContLen())) || - (sfx && sfx->getCont() && - TESTAFF(sfx->getCont(), compoundmiddle, - sfx->getContLen())))) { - rv = NULL; - } - - // check forbiddenwords - if ((rv) && (rv->astr) && (TESTAFF(rv->astr, forbiddenword, rv->alen) - || TESTAFF(rv->astr, ONLYUPCASEFLAG, rv->alen))) continue; - - // increment word number, if the second root has a compoundroot flag - if ((rv) && (compoundroot) && - (TESTAFF(rv->astr, compoundroot, rv->alen))) { - wordnum++; - } - - // first word is acceptable in compound words? - if (((rv) && - ( checked_prefix || (words && words[wnum]) || - (compoundflag && TESTAFF(rv->astr, compoundflag, rv->alen)) || - ((oldwordnum == 0) && compoundbegin && TESTAFF(rv->astr, compoundbegin, rv->alen)) || - ((oldwordnum > 0) && compoundmiddle && TESTAFF(rv->astr, compoundmiddle, rv->alen)) -// LANG_hu section: spec. Hungarian rule - || ((langnum == LANG_hu) && // hu_mov_rule - hu_mov_rule && ( - TESTAFF(rv->astr, 'F', rv->alen) || - TESTAFF(rv->astr, 'G', rv->alen) || - TESTAFF(rv->astr, 'H', rv->alen) - ) - ) -// END of LANG_hu section - ) - && ! (( checkcompoundtriple && !words && // test triple letters - (word[i-1]==word[i]) && ( - ((i>1) && (word[i-1]==word[i-2])) || - ((word[i-1]==word[i+1])) // may be word[i+1] == '\0' - ) - ) || - ( - // test CHECKCOMPOUNDPATTERN - numcheckcpd && !words && cpdpat_check(word, i, rv, NULL, affixed) - ) || - ( - checkcompoundcase && !words && cpdcase_check(word, i) - )) - ) -// LANG_hu section: spec. Hungarian rule - || ((!rv) && (langnum == LANG_hu) && hu_mov_rule && (rv = affix_check(st,i)) && - (sfx && sfx->getCont() && ( - TESTAFF(sfx->getCont(), (unsigned short) 'x', sfx->getContLen()) || - TESTAFF(sfx->getCont(), (unsigned short) '%', sfx->getContLen()) - ) - ) - ) -// END of LANG_hu section - ) { - -// LANG_hu section: spec. Hungarian rule - if (langnum == LANG_hu) { - // calculate syllable number of the word - numsyllable += get_syllable(st, i); - - // + 1 word, if syllable number of the prefix > 1 (hungarian convention) - if (pfx && (get_syllable(pfx->getKey(),strlen(pfx->getKey())) > 1)) wordnum++; - } -// END of LANG_hu section - - // NEXT WORD(S) - rv_first = rv; - rv = lookup((word+i)); // perhaps without prefix - - // search homonym with compound flag - while ((rv) && ((needaffix && TESTAFF(rv->astr, needaffix, rv->alen)) || - !((compoundflag && !words && TESTAFF(rv->astr, compoundflag, rv->alen)) || - (compoundend && !words && TESTAFF(rv->astr, compoundend, rv->alen)) || - (numdefcpd && words && defcpd_check(&words, wnum + 1, rv, NULL,1))))) { - rv = rv->next_homonym; - } - - if (rv && words && words[wnum + 1]) { - mystrcat(*result, presult, MAXLNLEN); - mystrcat(*result, " ", MAXLNLEN); - mystrcat(*result, MORPH_PART, MAXLNLEN); - mystrcat(*result, word+i, MAXLNLEN); - if (complexprefixes && HENTRY_DATA(rv)) mystrcat(*result, HENTRY_DATA2(rv), MAXLNLEN); - if (!HENTRY_FIND(rv, MORPH_STEM)) { - mystrcat(*result, " ", MAXLNLEN); - mystrcat(*result, MORPH_STEM, MAXLNLEN); - mystrcat(*result, HENTRY_WORD(rv), MAXLNLEN); - } - // store the pointer of the hash entry -// sprintf(*result + strlen(*result), " %s%p", MORPH_HENTRY, rv); - if (!complexprefixes && HENTRY_DATA(rv)) { - mystrcat(*result, " ", MAXLNLEN); - mystrcat(*result, HENTRY_DATA2(rv), MAXLNLEN); - } - mystrcat(*result, "\n", MAXLNLEN); - ok = 1; - return 0; - } - - oldnumsyllable2 = numsyllable; - oldwordnum2 = wordnum; - -// LANG_hu section: spec. Hungarian rule - if ((rv) && (langnum == LANG_hu) && (TESTAFF(rv->astr, 'I', rv->alen)) && !(TESTAFF(rv->astr, 'J', rv->alen))) { - numsyllable--; - } -// END of LANG_hu section - // increment word number, if the second root has a compoundroot flag - if ((rv) && (compoundroot) && - (TESTAFF(rv->astr, compoundroot, rv->alen))) { - wordnum++; - } - - // check forbiddenwords - if ((rv) && (rv->astr) && (TESTAFF(rv->astr, forbiddenword, rv->alen) || - TESTAFF(rv->astr, ONLYUPCASEFLAG, rv->alen))) { - st[i] = ch; - continue; - } - - // second word is acceptable, as a root? - // hungarian conventions: compounding is acceptable, - // when compound forms consist of 2 words, or if more, - // then the syllable number of root words must be 6, or lesser. - if ((rv) && ( - (compoundflag && TESTAFF(rv->astr, compoundflag, rv->alen)) || - (compoundend && TESTAFF(rv->astr, compoundend, rv->alen)) - ) - && ( - ((cpdwordmax==-1) || (wordnum+1blen)<=cpdmaxsyllable)) - ) - && ( - (!checkcompounddup || (rv != rv_first)) - ) - ) - { - // bad compound word - mystrcat(*result, presult, MAXLNLEN); - mystrcat(*result, " ", MAXLNLEN); - mystrcat(*result, MORPH_PART, MAXLNLEN); - mystrcat(*result, word+i, MAXLNLEN); - - if (HENTRY_DATA(rv)) { - if (complexprefixes) mystrcat(*result, HENTRY_DATA2(rv), MAXLNLEN); - if (! HENTRY_FIND(rv, MORPH_STEM)) { - mystrcat(*result, " ", MAXLNLEN); - mystrcat(*result, MORPH_STEM, MAXLNLEN); - mystrcat(*result, HENTRY_WORD(rv), MAXLNLEN); - } - // store the pointer of the hash entry -// sprintf(*result + strlen(*result), " %s%p", MORPH_HENTRY, rv); - if (!complexprefixes) { - mystrcat(*result, " ", MAXLNLEN); - mystrcat(*result, HENTRY_DATA2(rv), MAXLNLEN); - } - } - mystrcat(*result, "\n", MAXLNLEN); - ok = 1; - } - - numsyllable = oldnumsyllable2 ; - wordnum = oldwordnum2; - - // perhaps second word has prefix or/and suffix - sfx = NULL; - sfxflag = FLAG_NULL; - - if (compoundflag && !onlycpdrule) rv = affix_check((word+i),strlen(word+i), compoundflag); else rv = NULL; - - if (!rv && compoundend && !onlycpdrule) { - sfx = NULL; - pfx = NULL; - rv = affix_check((word+i),strlen(word+i), compoundend); - } - - if (!rv && numdefcpd && words) { - rv = affix_check((word+i),strlen(word+i), 0, IN_CPD_END); - if (rv && words && defcpd_check(&words, wnum + 1, rv, NULL, 1)) { - char * m = NULL; - if (compoundflag) m = affix_check_morph((word+i),strlen(word+i), compoundflag); - if ((!m || *m == '\0') && compoundend) { - if (m) free(m); - m = affix_check_morph((word+i),strlen(word+i), compoundend); - } - mystrcat(*result, presult, MAXLNLEN); - if (m || (*m != '\0')) { - sprintf(*result + strlen(*result), "%c%s%s%s", MSEP_FLD, - MORPH_PART, word + i, line_uniq_app(&m, MSEP_REC)); - } - if (m) free(m); - mystrcat(*result, "\n", MAXLNLEN); - ok = 1; - } - } - - // check non_compound flag in suffix and prefix - if ((rv) && - ((pfx && pfx->getCont() && - TESTAFF(pfx->getCont(), compoundforbidflag, - pfx->getContLen())) || - (sfx && sfx->getCont() && - TESTAFF(sfx->getCont(), compoundforbidflag, - sfx->getContLen())))) { - rv = NULL; - } - - // check forbiddenwords - if ((rv) && (rv->astr) && (TESTAFF(rv->astr,forbiddenword,rv->alen) || - TESTAFF(rv->astr, ONLYUPCASEFLAG, rv->alen)) - && (! TESTAFF(rv->astr, needaffix, rv->alen))) { - st[i] = ch; - continue; - } - - if (langnum == LANG_hu) { - // calculate syllable number of the word - numsyllable += get_syllable(word + i, strlen(word + i)); - - // - affix syllable num. - // XXX only second suffix (inflections, not derivations) - if (sfxappnd) { - char * tmp = myrevstrdup(sfxappnd); - numsyllable -= get_syllable(tmp, strlen(tmp)); - free(tmp); - } - - // + 1 word, if syllable number of the prefix > 1 (hungarian convention) - if (pfx && (get_syllable(pfx->getKey(),strlen(pfx->getKey())) > 1)) wordnum++; - - // increment syllable num, if last word has a SYLLABLENUM flag - // and the suffix is beginning `s' - - if (cpdsyllablenum) { - switch (sfxflag) { - case 'c': { numsyllable+=2; break; } - case 'J': { numsyllable += 1; break; } - case 'I': { if (rv && TESTAFF(rv->astr, 'J', rv->alen)) numsyllable += 1; break; } - } - } - } - - // increment word number, if the second word has a compoundroot flag - if ((rv) && (compoundroot) && - (TESTAFF(rv->astr, compoundroot, rv->alen))) { - wordnum++; - } - // second word is acceptable, as a word with prefix or/and suffix? - // hungarian conventions: compounding is acceptable, - // when compound forms consist 2 word, otherwise - // the syllable number of root words is 6, or lesser. - if ((rv) && - ( - ((cpdwordmax==-1) || (wordnum+1 0) && *s1 && (*s1 == *end_of_s2)) { - s1++; - end_of_s2--; - len--; - } - return (*s1 == '\0'); - } - */ - -inline int AffixMgr::isRevSubset(const char * s1, const char * end_of_s2, int len) - { - while ((len > 0) && (*s1 != '\0') && ((*s1 == *end_of_s2) || (*s1 == '.'))) { - s1++; - end_of_s2--; - len--; - } - return (*s1 == '\0'); - } - -// check word for suffixes - -struct hentry * AffixMgr::suffix_check (const char * word, int len, - int sfxopts, PfxEntry * ppfx, char ** wlst, int maxSug, int * ns, - const FLAG cclass, const FLAG needflag, char in_compound) -{ - struct hentry * rv = NULL; - PfxEntry* ep = ppfx; - - // first handle the special case of 0 length suffixes - SfxEntry * se = sStart[0]; - - while (se) { - if (!cclass || se->getCont()) { - // suffixes are not allowed in beginning of compounds - if ((((in_compound != IN_CPD_BEGIN)) || // && !cclass - // except when signed with compoundpermitflag flag - (se->getCont() && compoundpermitflag && - TESTAFF(se->getCont(),compoundpermitflag,se->getContLen()))) && (!circumfix || - // no circumfix flag in prefix and suffix - ((!ppfx || !(ep->getCont()) || !TESTAFF(ep->getCont(), - circumfix, ep->getContLen())) && - (!se->getCont() || !(TESTAFF(se->getCont(),circumfix,se->getContLen())))) || - // circumfix flag in prefix AND suffix - ((ppfx && (ep->getCont()) && TESTAFF(ep->getCont(), - circumfix, ep->getContLen())) && - (se->getCont() && (TESTAFF(se->getCont(),circumfix,se->getContLen()))))) && - // fogemorpheme - (in_compound || - !(se->getCont() && (TESTAFF(se->getCont(), onlyincompound, se->getContLen())))) && - // needaffix on prefix or first suffix - (cclass || - !(se->getCont() && TESTAFF(se->getCont(), needaffix, se->getContLen())) || - (ppfx && !((ep->getCont()) && - TESTAFF(ep->getCont(), needaffix, - ep->getContLen()))) - )) { - rv = se->checkword(word,len, sfxopts, ppfx, wlst, maxSug, ns, (FLAG) cclass, - needflag, (in_compound ? 0 : onlyincompound)); - if (rv) { - sfx=se; // BUG: sfx not stateless - return rv; - } - } - } - se = se->getNext(); - } - - // now handle the general case - if (len == 0) return NULL; // FULLSTRIP - unsigned char sp= *((const unsigned char *)(word + len - 1)); - SfxEntry * sptr = sStart[sp]; - - while (sptr) { - if (isRevSubset(sptr->getKey(), word + len - 1, len) - ) { - // suffixes are not allowed in beginning of compounds - if ((((in_compound != IN_CPD_BEGIN)) || // && !cclass - // except when signed with compoundpermitflag flag - (sptr->getCont() && compoundpermitflag && - TESTAFF(sptr->getCont(),compoundpermitflag,sptr->getContLen()))) && (!circumfix || - // no circumfix flag in prefix and suffix - ((!ppfx || !(ep->getCont()) || !TESTAFF(ep->getCont(), - circumfix, ep->getContLen())) && - (!sptr->getCont() || !(TESTAFF(sptr->getCont(),circumfix,sptr->getContLen())))) || - // circumfix flag in prefix AND suffix - ((ppfx && (ep->getCont()) && TESTAFF(ep->getCont(), - circumfix, ep->getContLen())) && - (sptr->getCont() && (TESTAFF(sptr->getCont(),circumfix,sptr->getContLen()))))) && - // fogemorpheme - (in_compound || - !((sptr->getCont() && (TESTAFF(sptr->getCont(), onlyincompound, sptr->getContLen()))))) && - // needaffix on prefix or first suffix - (cclass || - !(sptr->getCont() && TESTAFF(sptr->getCont(), needaffix, sptr->getContLen())) || - (ppfx && !((ep->getCont()) && - TESTAFF(ep->getCont(), needaffix, - ep->getContLen()))) - ) - ) if (in_compound != IN_CPD_END || ppfx || !(sptr->getCont() && TESTAFF(sptr->getCont(), onlyincompound, sptr->getContLen()))) { - rv = sptr->checkword(word,len, sfxopts, ppfx, wlst, - maxSug, ns, cclass, needflag, (in_compound ? 0 : onlyincompound)); - if (rv) { - sfx=sptr; // BUG: sfx not stateless - sfxflag = sptr->getFlag(); // BUG: sfxflag not stateless - if (!sptr->getCont()) sfxappnd=sptr->getKey(); // BUG: sfxappnd not stateless - return rv; - } - } - sptr = sptr->getNextEQ(); - } else { - sptr = sptr->getNextNE(); - } - } - - return NULL; -} - -// check word for two-level suffixes - -struct hentry * AffixMgr::suffix_check_twosfx(const char * word, int len, - int sfxopts, PfxEntry * ppfx, const FLAG needflag) -{ - struct hentry * rv = NULL; - - // first handle the special case of 0 length suffixes - SfxEntry * se = sStart[0]; - while (se) { - if (contclasses[se->getFlag()]) - { - rv = se->check_twosfx(word,len, sfxopts, ppfx, needflag); - if (rv) return rv; - } - se = se->getNext(); - } - - // now handle the general case - if (len == 0) return NULL; // FULLSTRIP - unsigned char sp = *((const unsigned char *)(word + len - 1)); - SfxEntry * sptr = sStart[sp]; - - while (sptr) { - if (isRevSubset(sptr->getKey(), word + len - 1, len)) { - if (contclasses[sptr->getFlag()]) - { - rv = sptr->check_twosfx(word,len, sfxopts, ppfx, needflag); - if (rv) { - sfxflag = sptr->getFlag(); // BUG: sfxflag not stateless - if (!sptr->getCont()) sfxappnd=sptr->getKey(); // BUG: sfxappnd not stateless - return rv; - } - } - sptr = sptr->getNextEQ(); - } else { - sptr = sptr->getNextNE(); - } - } - - return NULL; -} - -char * AffixMgr::suffix_check_twosfx_morph(const char * word, int len, - int sfxopts, PfxEntry * ppfx, const FLAG needflag) -{ - char result[MAXLNLEN]; - char result2[MAXLNLEN]; - char result3[MAXLNLEN]; - - char * st; - - result[0] = '\0'; - result2[0] = '\0'; - result3[0] = '\0'; - - // first handle the special case of 0 length suffixes - SfxEntry * se = sStart[0]; - while (se) { - if (contclasses[se->getFlag()]) - { - st = se->check_twosfx_morph(word,len, sfxopts, ppfx, needflag); - if (st) { - if (ppfx) { - if (ppfx->getMorph()) { - mystrcat(result, ppfx->getMorph(), MAXLNLEN); - mystrcat(result, " ", MAXLNLEN); - } else debugflag(result, ppfx->getFlag()); - } - mystrcat(result, st, MAXLNLEN); - free(st); - if (se->getMorph()) { - mystrcat(result, " ", MAXLNLEN); - mystrcat(result, se->getMorph(), MAXLNLEN); - } else debugflag(result, se->getFlag()); - mystrcat(result, "\n", MAXLNLEN); - } - } - se = se->getNext(); - } - - // now handle the general case - if (len == 0) return NULL; // FULLSTRIP - unsigned char sp = *((const unsigned char *)(word + len - 1)); - SfxEntry * sptr = sStart[sp]; - - while (sptr) { - if (isRevSubset(sptr->getKey(), word + len - 1, len)) { - if (contclasses[sptr->getFlag()]) - { - st = sptr->check_twosfx_morph(word,len, sfxopts, ppfx, needflag); - if (st) { - sfxflag = sptr->getFlag(); // BUG: sfxflag not stateless - if (!sptr->getCont()) sfxappnd=sptr->getKey(); // BUG: sfxappnd not stateless - strcpy(result2, st); - free(st); - - result3[0] = '\0'; - - if (sptr->getMorph()) { - mystrcat(result3, " ", MAXLNLEN); - mystrcat(result3, sptr->getMorph(), MAXLNLEN); - } else debugflag(result3, sptr->getFlag()); - strlinecat(result2, result3); - mystrcat(result2, "\n", MAXLNLEN); - mystrcat(result, result2, MAXLNLEN); - } - } - sptr = sptr->getNextEQ(); - } else { - sptr = sptr->getNextNE(); - } - } - if (*result) return mystrdup(result); - return NULL; -} - -char * AffixMgr::suffix_check_morph(const char * word, int len, - int sfxopts, PfxEntry * ppfx, const FLAG cclass, const FLAG needflag, char in_compound) -{ - char result[MAXLNLEN]; - - struct hentry * rv = NULL; - - result[0] = '\0'; - - PfxEntry* ep = ppfx; - - // first handle the special case of 0 length suffixes - SfxEntry * se = sStart[0]; - while (se) { - if (!cclass || se->getCont()) { - // suffixes are not allowed in beginning of compounds - if (((((in_compound != IN_CPD_BEGIN)) || // && !cclass - // except when signed with compoundpermitflag flag - (se->getCont() && compoundpermitflag && - TESTAFF(se->getCont(),compoundpermitflag,se->getContLen()))) && (!circumfix || - // no circumfix flag in prefix and suffix - ((!ppfx || !(ep->getCont()) || !TESTAFF(ep->getCont(), - circumfix, ep->getContLen())) && - (!se->getCont() || !(TESTAFF(se->getCont(),circumfix,se->getContLen())))) || - // circumfix flag in prefix AND suffix - ((ppfx && (ep->getCont()) && TESTAFF(ep->getCont(), - circumfix, ep->getContLen())) && - (se->getCont() && (TESTAFF(se->getCont(),circumfix,se->getContLen()))))) && - // fogemorpheme - (in_compound || - !((se->getCont() && (TESTAFF(se->getCont(), onlyincompound, se->getContLen()))))) && - // needaffix on prefix or first suffix - (cclass || - !(se->getCont() && TESTAFF(se->getCont(), needaffix, se->getContLen())) || - (ppfx && !((ep->getCont()) && - TESTAFF(ep->getCont(), needaffix, - ep->getContLen()))) - ) - )) - rv = se->checkword(word, len, sfxopts, ppfx, NULL, 0, 0, cclass, needflag); - while (rv) { - if (ppfx) { - if (ppfx->getMorph()) { - mystrcat(result, ppfx->getMorph(), MAXLNLEN); - mystrcat(result, " ", MAXLNLEN); - } else debugflag(result, ppfx->getFlag()); - } - if (complexprefixes && HENTRY_DATA(rv)) mystrcat(result, HENTRY_DATA2(rv), MAXLNLEN); - if (! HENTRY_FIND(rv, MORPH_STEM)) { - mystrcat(result, " ", MAXLNLEN); - mystrcat(result, MORPH_STEM, MAXLNLEN); - mystrcat(result, HENTRY_WORD(rv), MAXLNLEN); - } - // store the pointer of the hash entry -// sprintf(result + strlen(result), " %s%p", MORPH_HENTRY, rv); - - if (!complexprefixes && HENTRY_DATA(rv)) { - mystrcat(result, " ", MAXLNLEN); - mystrcat(result, HENTRY_DATA2(rv), MAXLNLEN); - } - if (se->getMorph()) { - mystrcat(result, " ", MAXLNLEN); - mystrcat(result, se->getMorph(), MAXLNLEN); - } else debugflag(result, se->getFlag()); - mystrcat(result, "\n", MAXLNLEN); - rv = se->get_next_homonym(rv, sfxopts, ppfx, cclass, needflag); - } - } - se = se->getNext(); - } - - // now handle the general case - if (len == 0) return NULL; // FULLSTRIP - unsigned char sp = *((const unsigned char *)(word + len - 1)); - SfxEntry * sptr = sStart[sp]; - - while (sptr) { - if (isRevSubset(sptr->getKey(), word + len - 1, len) - ) { - // suffixes are not allowed in beginning of compounds - if (((((in_compound != IN_CPD_BEGIN)) || // && !cclass - // except when signed with compoundpermitflag flag - (sptr->getCont() && compoundpermitflag && - TESTAFF(sptr->getCont(),compoundpermitflag,sptr->getContLen()))) && (!circumfix || - // no circumfix flag in prefix and suffix - ((!ppfx || !(ep->getCont()) || !TESTAFF(ep->getCont(), - circumfix, ep->getContLen())) && - (!sptr->getCont() || !(TESTAFF(sptr->getCont(),circumfix,sptr->getContLen())))) || - // circumfix flag in prefix AND suffix - ((ppfx && (ep->getCont()) && TESTAFF(ep->getCont(), - circumfix, ep->getContLen())) && - (sptr->getCont() && (TESTAFF(sptr->getCont(),circumfix,sptr->getContLen()))))) && - // fogemorpheme - (in_compound || - !((sptr->getCont() && (TESTAFF(sptr->getCont(), onlyincompound, sptr->getContLen()))))) && - // needaffix on first suffix - (cclass || !(sptr->getCont() && - TESTAFF(sptr->getCont(), needaffix, sptr->getContLen()))) - )) rv = sptr->checkword(word,len, sfxopts, ppfx, NULL, 0, 0, cclass, needflag); - while (rv) { - if (ppfx) { - if (ppfx->getMorph()) { - mystrcat(result, ppfx->getMorph(), MAXLNLEN); - mystrcat(result, " ", MAXLNLEN); - } else debugflag(result, ppfx->getFlag()); - } - if (complexprefixes && HENTRY_DATA(rv)) mystrcat(result, HENTRY_DATA2(rv), MAXLNLEN); - if (! HENTRY_FIND(rv, MORPH_STEM)) { - mystrcat(result, " ", MAXLNLEN); - mystrcat(result, MORPH_STEM, MAXLNLEN); - mystrcat(result, HENTRY_WORD(rv), MAXLNLEN); - } - // store the pointer of the hash entry -// sprintf(result + strlen(result), " %s%p", MORPH_HENTRY, rv); - - if (!complexprefixes && HENTRY_DATA(rv)) { - mystrcat(result, " ", MAXLNLEN); - mystrcat(result, HENTRY_DATA2(rv), MAXLNLEN); - } - - if (sptr->getMorph()) { - mystrcat(result, " ", MAXLNLEN); - mystrcat(result, sptr->getMorph(), MAXLNLEN); - } else debugflag(result, sptr->getFlag()); - mystrcat(result, "\n", MAXLNLEN); - rv = sptr->get_next_homonym(rv, sfxopts, ppfx, cclass, needflag); - } - sptr = sptr->getNextEQ(); - } else { - sptr = sptr->getNextNE(); - } - } - - if (*result) return mystrdup(result); - return NULL; -} - -// check if word with affixes is correctly spelled -struct hentry * AffixMgr::affix_check (const char * word, int len, const FLAG needflag, char in_compound) -{ - struct hentry * rv= NULL; - - // check all prefixes (also crossed with suffixes if allowed) - rv = prefix_check(word, len, in_compound, needflag); - if (rv) return rv; - - // if still not found check all suffixes - rv = suffix_check(word, len, 0, NULL, NULL, 0, NULL, FLAG_NULL, needflag, in_compound); - - if (havecontclass) { - sfx = NULL; - pfx = NULL; - - if (rv) return rv; - // if still not found check all two-level suffixes - rv = suffix_check_twosfx(word, len, 0, NULL, needflag); - - if (rv) return rv; - // if still not found check all two-level suffixes - rv = prefix_check_twosfx(word, len, IN_CPD_NOT, needflag); - } - - return rv; -} - -// check if word with affixes is correctly spelled -char * AffixMgr::affix_check_morph(const char * word, int len, const FLAG needflag, char in_compound) -{ - char result[MAXLNLEN]; - char * st = NULL; - - *result = '\0'; - - // check all prefixes (also crossed with suffixes if allowed) - st = prefix_check_morph(word, len, in_compound); - if (st) { - mystrcat(result, st, MAXLNLEN); - free(st); - } - - // if still not found check all suffixes - st = suffix_check_morph(word, len, 0, NULL, '\0', needflag, in_compound); - if (st) { - mystrcat(result, st, MAXLNLEN); - free(st); - } - - if (havecontclass) { - sfx = NULL; - pfx = NULL; - // if still not found check all two-level suffixes - st = suffix_check_twosfx_morph(word, len, 0, NULL, needflag); - if (st) { - mystrcat(result, st, MAXLNLEN); - free(st); - } - - // if still not found check all two-level suffixes - st = prefix_check_twosfx_morph(word, len, IN_CPD_NOT, needflag); - if (st) { - mystrcat(result, st, MAXLNLEN); - free(st); - } - } - - return mystrdup(result); -} - -char * AffixMgr::morphgen(char * ts, int wl, const unsigned short * ap, - unsigned short al, char * morph, char * targetmorph, int level) -{ - // handle suffixes - char * stemmorph; - char * stemmorphcatpos; - char mymorph[MAXLNLEN]; - - if (!morph) return NULL; - - // check substandard flag - if (TESTAFF(ap, substandard, al)) return NULL; - - if (morphcmp(morph, targetmorph) == 0) return mystrdup(ts); - -// int targetcount = get_sfxcount(targetmorph); - - // use input suffix fields, if exist - if (strstr(morph, MORPH_INFL_SFX) || strstr(morph, MORPH_DERI_SFX)) { - stemmorph = mymorph; - strcpy(stemmorph, morph); - mystrcat(stemmorph, " ", MAXLNLEN); - stemmorphcatpos = stemmorph + strlen(stemmorph); - } else { - stemmorph = morph; - stemmorphcatpos = NULL; - } - - for (int i = 0; i < al; i++) { - const unsigned char c = (unsigned char) (ap[i] & 0x00FF); - SfxEntry * sptr = sFlag[c]; - while (sptr) { - if (sptr->getFlag() == ap[i] && sptr->getMorph() && ((sptr->getContLen() == 0) || - // don't generate forms with substandard affixes - !TESTAFF(sptr->getCont(), substandard, sptr->getContLen()))) { - - if (stemmorphcatpos) strcpy(stemmorphcatpos, sptr->getMorph()); - else stemmorph = (char *) sptr->getMorph(); - - int cmp = morphcmp(stemmorph, targetmorph); - - if (cmp == 0) { - char * newword = sptr->add(ts, wl); - if (newword) { - hentry * check = pHMgr->lookup(newword); // XXX extra dic - if (!check || !check->astr || - !(TESTAFF(check->astr, forbiddenword, check->alen) || - TESTAFF(check->astr, ONLYUPCASEFLAG, check->alen))) { - return newword; - } - free(newword); - } - } - - // recursive call for secondary suffixes - if ((level == 0) && (cmp == 1) && (sptr->getContLen() > 0) && -// (get_sfxcount(stemmorph) < targetcount) && - !TESTAFF(sptr->getCont(), substandard, sptr->getContLen())) { - char * newword = sptr->add(ts, wl); - if (newword) { - char * newword2 = morphgen(newword, strlen(newword), sptr->getCont(), - sptr->getContLen(), stemmorph, targetmorph, 1); - - if (newword2) { - free(newword); - return newword2; - } - free(newword); - newword = NULL; - } - } - } - sptr = sptr->getFlgNxt(); - } - } - return NULL; -} - - -int AffixMgr::expand_rootword(struct guessword * wlst, int maxn, const char * ts, - int wl, const unsigned short * ap, unsigned short al, char * bad, int badl, - char * phon) -{ - int nh=0; - // first add root word to list - if ((nh < maxn) && !(al && ((needaffix && TESTAFF(ap, needaffix, al)) || - (onlyincompound && TESTAFF(ap, onlyincompound, al))))) { - wlst[nh].word = mystrdup(ts); - if (!wlst[nh].word) return 0; - wlst[nh].allow = (1 == 0); - wlst[nh].orig = NULL; - nh++; - // add special phonetic version - if (phon && (nh < maxn)) { - wlst[nh].word = mystrdup(phon); - if (!wlst[nh].word) return nh - 1; - wlst[nh].allow = (1 == 0); - wlst[nh].orig = mystrdup(ts); - if (!wlst[nh].orig) return nh - 1; - nh++; - } - } - - // handle suffixes - for (int i = 0; i < al; i++) { - const unsigned char c = (unsigned char) (ap[i] & 0x00FF); - SfxEntry * sptr = sFlag[c]; - while (sptr) { - if ((sptr->getFlag() == ap[i]) && (!sptr->getKeyLen() || ((badl > sptr->getKeyLen()) && - (strcmp(sptr->getAffix(), bad + badl - sptr->getKeyLen()) == 0))) && - // check needaffix flag - !(sptr->getCont() && ((needaffix && - TESTAFF(sptr->getCont(), needaffix, sptr->getContLen())) || - (circumfix && - TESTAFF(sptr->getCont(), circumfix, sptr->getContLen())) || - (onlyincompound && - TESTAFF(sptr->getCont(), onlyincompound, sptr->getContLen())))) - ) { - char * newword = sptr->add(ts, wl); - if (newword) { - if (nh < maxn) { - wlst[nh].word = newword; - wlst[nh].allow = sptr->allowCross(); - wlst[nh].orig = NULL; - nh++; - // add special phonetic version - if (phon && (nh < maxn)) { - char st[MAXWORDUTF8LEN]; - strcpy(st, phon); - strcat(st, sptr->getKey()); - reverseword(st + strlen(phon)); - wlst[nh].word = mystrdup(st); - if (!wlst[nh].word) return nh - 1; - wlst[nh].allow = (1 == 0); - wlst[nh].orig = mystrdup(newword); - if (!wlst[nh].orig) return nh - 1; - nh++; - } - } else { - free(newword); - } - } - } - sptr = sptr->getFlgNxt(); - } - } - - int n = nh; - - // handle cross products of prefixes and suffixes - for (int j=1;jgetFlag() == ap[k]) && cptr->allowCross() && (!cptr->getKeyLen() || ((badl > cptr->getKeyLen()) && - (strncmp(cptr->getKey(), bad, cptr->getKeyLen()) == 0)))) { - int l1 = strlen(wlst[j].word); - char * newword = cptr->add(wlst[j].word, l1); - if (newword) { - if (nh < maxn) { - wlst[nh].word = newword; - wlst[nh].allow = cptr->allowCross(); - wlst[nh].orig = NULL; - nh++; - } else { - free(newword); - } - } - } - cptr = cptr->getFlgNxt(); - } - } - } - - - // now handle pure prefixes - for (int m = 0; m < al; m ++) { - const unsigned char c = (unsigned char) (ap[m] & 0x00FF); - PfxEntry * ptr = pFlag[c]; - while (ptr) { - if ((ptr->getFlag() == ap[m]) && (!ptr->getKeyLen() || ((badl > ptr->getKeyLen()) && - (strncmp(ptr->getKey(), bad, ptr->getKeyLen()) == 0))) && - // check needaffix flag - !(ptr->getCont() && ((needaffix && - TESTAFF(ptr->getCont(), needaffix, ptr->getContLen())) || - (circumfix && - TESTAFF(ptr->getCont(), circumfix, ptr->getContLen())) || - (onlyincompound && - TESTAFF(ptr->getCont(), onlyincompound, ptr->getContLen())))) - ) { - char * newword = ptr->add(ts, wl); - if (newword) { - if (nh < maxn) { - wlst[nh].word = newword; - wlst[nh].allow = ptr->allowCross(); - wlst[nh].orig = NULL; - nh++; - } else { - free(newword); - } - } - } - ptr = ptr->getFlgNxt(); - } - } - - return nh; -} - -// return length of replacing table -int AffixMgr::get_numrep() const -{ - return numrep; -} - -// return replacing table -struct replentry * AffixMgr::get_reptable() const -{ - if (! reptable ) return NULL; - return reptable; -} - -// return iconv table -RepList * AffixMgr::get_iconvtable() const -{ - if (! iconvtable ) return NULL; - return iconvtable; -} - -// return oconv table -RepList * AffixMgr::get_oconvtable() const -{ - if (! oconvtable ) return NULL; - return oconvtable; -} - -// return replacing table -struct phonetable * AffixMgr::get_phonetable() const -{ - if (! phone ) return NULL; - return phone; -} - -// return length of character map table -int AffixMgr::get_nummap() const -{ - return nummap; -} - -// return character map table -struct mapentry * AffixMgr::get_maptable() const -{ - if (! maptable ) return NULL; - return maptable; -} - -// return length of word break table -int AffixMgr::get_numbreak() const -{ - return numbreak; -} - -// return character map table -char ** AffixMgr::get_breaktable() const -{ - if (! breaktable ) return NULL; - return breaktable; -} - -// return text encoding of dictionary -char * AffixMgr::get_encoding() -{ - if (! encoding ) encoding = mystrdup(SPELL_ENCODING); - return mystrdup(encoding); -} - -// return text encoding of dictionary -int AffixMgr::get_langnum() const -{ - return langnum; -} - -// return double prefix option -int AffixMgr::get_complexprefixes() const -{ - return complexprefixes; -} - -// return FULLSTRIP option -int AffixMgr::get_fullstrip() const -{ - return fullstrip; -} - -FLAG AffixMgr::get_keepcase() const -{ - return keepcase; -} - -FLAG AffixMgr::get_forceucase() const -{ - return forceucase; -} - -FLAG AffixMgr::get_warn() const -{ - return warn; -} - -int AffixMgr::get_forbidwarn() const -{ - return forbidwarn; -} - -int AffixMgr::get_checksharps() const -{ - return checksharps; -} - -char * AffixMgr::encode_flag(unsigned short aflag) const -{ - return pHMgr->encode_flag(aflag); -} - - -// return the preferred ignore string for suggestions -char * AffixMgr::get_ignore() const -{ - if (!ignorechars) return NULL; - return ignorechars; -} - -// return the preferred ignore string for suggestions -unsigned short * AffixMgr::get_ignore_utf16(int * len) const -{ - *len = ignorechars_utf16_len; - return ignorechars_utf16; -} - -// return the keyboard string for suggestions -char * AffixMgr::get_key_string() -{ - if (! keystring ) keystring = mystrdup(SPELL_KEYSTRING); - return mystrdup(keystring); -} - -// return the preferred try string for suggestions -char * AffixMgr::get_try_string() const -{ - if (! trystring ) return NULL; - return mystrdup(trystring); -} - -// return the preferred try string for suggestions -const char * AffixMgr::get_wordchars() const -{ - return wordchars; -} - -unsigned short * AffixMgr::get_wordchars_utf16(int * len) const -{ - *len = wordchars_utf16_len; - return wordchars_utf16; -} - -// is there compounding? -int AffixMgr::get_compound() const -{ - return compoundflag || compoundbegin || numdefcpd; -} - -// return the compound words control flag -FLAG AffixMgr::get_compoundflag() const -{ - return compoundflag; -} - -// return the forbidden words control flag -FLAG AffixMgr::get_forbiddenword() const -{ - return forbiddenword; -} - -// return the forbidden words control flag -FLAG AffixMgr::get_nosuggest() const -{ - return nosuggest; -} - -// return the forbidden words control flag -FLAG AffixMgr::get_nongramsuggest() const -{ - return nongramsuggest; -} - -// return the forbidden words flag modify flag -FLAG AffixMgr::get_needaffix() const -{ - return needaffix; -} - -// return the onlyincompound flag -FLAG AffixMgr::get_onlyincompound() const -{ - return onlyincompound; -} - -// return the compound word signal flag -FLAG AffixMgr::get_compoundroot() const -{ - return compoundroot; -} - -// return the compound begin signal flag -FLAG AffixMgr::get_compoundbegin() const -{ - return compoundbegin; -} - -// return the value of checknum -int AffixMgr::get_checknum() const -{ - return checknum; -} - -// return the value of prefix -const char * AffixMgr::get_prefix() const -{ - if (pfx) return pfx->getKey(); - return NULL; -} - -// return the value of suffix -const char * AffixMgr::get_suffix() const -{ - return sfxappnd; -} - -// return the value of suffix -const char * AffixMgr::get_version() const -{ - return version; -} - -// return lemma_present flag -FLAG AffixMgr::get_lemma_present() const -{ - return lemma_present; -} - -// utility method to look up root words in hash table -struct hentry * AffixMgr::lookup(const char * word) -{ - int i; - struct hentry * he = NULL; - for (i = 0; i < *maxdic && !he; i++) { - he = (alldic[i])->lookup(word); - } - return he; -} - -// return the value of suffix -int AffixMgr::have_contclass() const -{ - return havecontclass; -} - -// return utf8 -int AffixMgr::get_utf8() const -{ - return utf8; -} - -int AffixMgr::get_maxngramsugs(void) const -{ - return maxngramsugs; -} - -int AffixMgr::get_maxcpdsugs(void) const -{ - return maxcpdsugs; -} - -int AffixMgr::get_maxdiff(void) const -{ - return maxdiff; -} - -int AffixMgr::get_onlymaxdiff(void) const -{ - return onlymaxdiff; -} - -// return nosplitsugs -int AffixMgr::get_nosplitsugs(void) const -{ - return nosplitsugs; -} - -// return sugswithdots -int AffixMgr::get_sugswithdots(void) const -{ - return sugswithdots; -} - -/* parse flag */ -int AffixMgr::parse_flag(char * line, unsigned short * out, FileMgr * af) { - char * s = NULL; - if (*out != FLAG_NULL && !(*out >= DEFAULTFLAGS)) { - HUNSPELL_WARNING(stderr, "error: line %d: multiple definitions of an affix file parameter\n", af->getlinenum()); - return 1; - } - if (parse_string(line, &s, af->getlinenum())) return 1; - *out = pHMgr->decode_flag(s); - free(s); - return 0; -} - -/* parse num */ -int AffixMgr::parse_num(char * line, int * out, FileMgr * af) { - char * s = NULL; - if (*out != -1) { - HUNSPELL_WARNING(stderr, "error: line %d: multiple definitions of an affix file parameter\n", af->getlinenum()); - return 1; - } - if (parse_string(line, &s, af->getlinenum())) return 1; - *out = atoi(s); - free(s); - return 0; -} - -/* parse in the max syllablecount of compound words and */ -int AffixMgr::parse_cpdsyllable(char * line, FileMgr * af) -{ - char * tp = line; - char * piece; - int i = 0; - int np = 0; - w_char w[MAXWORDLEN]; - piece = mystrsep(&tp, 0); - while (piece) { - if (*piece != '\0') { - switch(i) { - case 0: { np++; break; } - case 1: { cpdmaxsyllable = atoi(piece); np++; break; } - case 2: { - if (!utf8) { - cpdvowels = mystrdup(piece); - } else { - int n = u8_u16(w, MAXWORDLEN, piece); - if (n > 0) { - flag_qsort((unsigned short *) w, 0, n); - cpdvowels_utf16 = (w_char *) malloc(n * sizeof(w_char)); - if (!cpdvowels_utf16) return 1; - memcpy(cpdvowels_utf16, w, n * sizeof(w_char)); - } - cpdvowels_utf16_len = n; - } - np++; - break; - } - default: break; - } - i++; - } - piece = mystrsep(&tp, 0); - } - if (np < 2) { - HUNSPELL_WARNING(stderr, "error: line %d: missing compoundsyllable information\n", af->getlinenum()); - return 1; - } - if (np == 2) cpdvowels = mystrdup("aeiouAEIOU"); - return 0; -} - -/* parse in the typical fault correcting table */ -int AffixMgr::parse_reptable(char * line, FileMgr * af) -{ - if (numrep != 0) { - HUNSPELL_WARNING(stderr, "error: line %d: multiple table definitions\n", af->getlinenum()); - return 1; - } - char * tp = line; - char * piece; - int i = 0; - int np = 0; - piece = mystrsep(&tp, 0); - while (piece) { - if (*piece != '\0') { - switch(i) { - case 0: { np++; break; } - case 1: { - numrep = atoi(piece); - if (numrep < 1) { - HUNSPELL_WARNING(stderr, "error: line %d: incorrect entry number\n", af->getlinenum()); - return 1; - } - reptable = (replentry *) malloc(numrep * sizeof(struct replentry)); - if (!reptable) return 1; - np++; - break; - } - default: break; - } - i++; - } - piece = mystrsep(&tp, 0); - } - if (np != 2) { - HUNSPELL_WARNING(stderr, "error: line %d: missing data\n", af->getlinenum()); - return 1; - } - - /* now parse the numrep lines to read in the remainder of the table */ - char * nl; - for (int j=0; j < numrep; j++) { - if (!(nl = af->getline())) return 1; - mychomp(nl); - tp = nl; - i = 0; - reptable[j].pattern = NULL; - reptable[j].pattern2 = NULL; - piece = mystrsep(&tp, 0); - while (piece) { - if (*piece != '\0') { - switch(i) { - case 0: { - if (strncmp(piece,"REP",3) != 0) { - HUNSPELL_WARNING(stderr, "error: line %d: table is corrupt\n", af->getlinenum()); - numrep = 0; - return 1; - } - break; - } - case 1: { - if (*piece == '^') reptable[j].start = true; else reptable[j].start = false; - reptable[j].pattern = mystrrep(mystrdup(piece + int(reptable[j].start)),"_"," "); - int lr = strlen(reptable[j].pattern) - 1; - if (reptable[j].pattern[lr] == '$') { - reptable[j].end = true; - reptable[j].pattern[lr] = '\0'; - } else reptable[j].end = false; - break; - } - case 2: { reptable[j].pattern2 = mystrrep(mystrdup(piece),"_"," "); break; } - default: break; - } - i++; - } - piece = mystrsep(&tp, 0); - } - if ((!(reptable[j].pattern)) || (!(reptable[j].pattern2))) { - HUNSPELL_WARNING(stderr, "error: line %d: table is corrupt\n", af->getlinenum()); - numrep = 0; - return 1; - } - } - return 0; -} - -/* parse in the typical fault correcting table */ -int AffixMgr::parse_convtable(char * line, FileMgr * af, RepList ** rl, const char * keyword) -{ - if (*rl) { - HUNSPELL_WARNING(stderr, "error: line %d: multiple table definitions\n", af->getlinenum()); - return 1; - } - char * tp = line; - char * piece; - int i = 0; - int np = 0; - int numrl = 0; - piece = mystrsep(&tp, 0); - while (piece) { - if (*piece != '\0') { - switch(i) { - case 0: { np++; break; } - case 1: { - numrl = atoi(piece); - if (numrl < 1) { - HUNSPELL_WARNING(stderr, "error: line %d: incorrect entry number\n", af->getlinenum()); - return 1; - } - *rl = new RepList(numrl); - if (!*rl) return 1; - np++; - break; - } - default: break; - } - i++; - } - piece = mystrsep(&tp, 0); - } - if (np != 2) { - HUNSPELL_WARNING(stderr, "error: line %d: missing data\n", af->getlinenum()); - return 1; - } - - /* now parse the num lines to read in the remainder of the table */ - char * nl; - for (int j=0; j < numrl; j++) { - if (!(nl = af->getline())) return 1; - mychomp(nl); - tp = nl; - i = 0; - char * pattern = NULL; - char * pattern2 = NULL; - piece = mystrsep(&tp, 0); - while (piece) { - if (*piece != '\0') { - switch(i) { - case 0: { - if (strncmp(piece, keyword, sizeof(keyword)) != 0) { - HUNSPELL_WARNING(stderr, "error: line %d: table is corrupt\n", af->getlinenum()); - delete *rl; - *rl = NULL; - return 1; - } - break; - } - case 1: { pattern = mystrrep(mystrdup(piece),"_"," "); break; } - case 2: { - pattern2 = mystrrep(mystrdup(piece),"_"," "); - break; - } - default: break; - } - i++; - } - piece = mystrsep(&tp, 0); - } - if (!pattern || !pattern2) { - if (pattern) - free(pattern); - if (pattern2) - free(pattern2); - HUNSPELL_WARNING(stderr, "error: line %d: table is corrupt\n", af->getlinenum()); - return 1; - } - (*rl)->add(pattern, pattern2); - } - return 0; -} - - -/* parse in the typical fault correcting table */ -int AffixMgr::parse_phonetable(char * line, FileMgr * af) -{ - if (phone) { - HUNSPELL_WARNING(stderr, "error: line %d: multiple table definitions\n", af->getlinenum()); - return 1; - } - char * tp = line; - char * piece; - int i = 0; - int np = 0; - piece = mystrsep(&tp, 0); - while (piece) { - if (*piece != '\0') { - switch(i) { - case 0: { np++; break; } - case 1: { - phone = (phonetable *) malloc(sizeof(struct phonetable)); - if (!phone) return 1; - phone->num = atoi(piece); - phone->rules = NULL; - phone->utf8 = (char) utf8; - if (phone->num < 1) { - HUNSPELL_WARNING(stderr, "error: line %d: bad entry number\n", af->getlinenum()); - return 1; - } - phone->rules = (char * *) malloc(2 * (phone->num + 1) * sizeof(char *)); - if (!phone->rules) { - free(phone); - phone = NULL; - return 1; - } - np++; - break; - } - default: break; - } - i++; - } - piece = mystrsep(&tp, 0); - } - if (np != 2) { - HUNSPELL_WARNING(stderr, "error: line %d: missing data\n", af->getlinenum()); - return 1; - } - - /* now parse the phone->num lines to read in the remainder of the table */ - char * nl; - for (int j=0; j < phone->num; j++) { - if (!(nl = af->getline())) return 1; - mychomp(nl); - tp = nl; - i = 0; - phone->rules[j * 2] = NULL; - phone->rules[j * 2 + 1] = NULL; - piece = mystrsep(&tp, 0); - while (piece) { - if (*piece != '\0') { - switch(i) { - case 0: { - if (strncmp(piece,"PHONE",5) != 0) { - HUNSPELL_WARNING(stderr, "error: line %d: table is corrupt\n", af->getlinenum()); - phone->num = 0; - return 1; - } - break; - } - case 1: { phone->rules[j * 2] = mystrrep(mystrdup(piece),"_",""); break; } - case 2: { phone->rules[j * 2 + 1] = mystrrep(mystrdup(piece),"_",""); break; } - default: break; - } - i++; - } - piece = mystrsep(&tp, 0); - } - if ((!(phone->rules[j * 2])) || (!(phone->rules[j * 2 + 1]))) { - HUNSPELL_WARNING(stderr, "error: line %d: table is corrupt\n", af->getlinenum()); - phone->num = 0; - return 1; - } - } - phone->rules[phone->num * 2] = mystrdup(""); - phone->rules[phone->num * 2 + 1] = mystrdup(""); - init_phonet_hash(*phone); - return 0; -} - -/* parse in the checkcompoundpattern table */ -int AffixMgr::parse_checkcpdtable(char * line, FileMgr * af) -{ - if (numcheckcpd != 0) { - HUNSPELL_WARNING(stderr, "error: line %d: multiple table definitions\n", af->getlinenum()); - return 1; - } - char * tp = line; - char * piece; - int i = 0; - int np = 0; - piece = mystrsep(&tp, 0); - while (piece) { - if (*piece != '\0') { - switch(i) { - case 0: { np++; break; } - case 1: { - numcheckcpd = atoi(piece); - if (numcheckcpd < 1) { - HUNSPELL_WARNING(stderr, "error: line %d: bad entry number\n", af->getlinenum()); - return 1; - } - checkcpdtable = (patentry *) malloc(numcheckcpd * sizeof(struct patentry)); - if (!checkcpdtable) return 1; - np++; - break; - } - default: break; - } - i++; - } - piece = mystrsep(&tp, 0); - } - if (np != 2) { - HUNSPELL_WARNING(stderr, "error: line %d: missing data\n", af->getlinenum()); - return 1; - } - - /* now parse the numcheckcpd lines to read in the remainder of the table */ - char * nl; - for (int j=0; j < numcheckcpd; j++) { - if (!(nl = af->getline())) return 1; - mychomp(nl); - tp = nl; - i = 0; - checkcpdtable[j].pattern = NULL; - checkcpdtable[j].pattern2 = NULL; - checkcpdtable[j].pattern3 = NULL; - checkcpdtable[j].cond = FLAG_NULL; - checkcpdtable[j].cond2 = FLAG_NULL; - piece = mystrsep(&tp, 0); - while (piece) { - if (*piece != '\0') { - switch(i) { - case 0: { - if (strncmp(piece,"CHECKCOMPOUNDPATTERN",20) != 0) { - HUNSPELL_WARNING(stderr, "error: line %d: table is corrupt\n", af->getlinenum()); - numcheckcpd = 0; - return 1; - } - break; - } - case 1: { - checkcpdtable[j].pattern = mystrdup(piece); - char * p = strchr(checkcpdtable[j].pattern, '/'); - if (p) { - *p = '\0'; - checkcpdtable[j].cond = pHMgr->decode_flag(p + 1); - } - break; } - case 2: { - checkcpdtable[j].pattern2 = mystrdup(piece); - char * p = strchr(checkcpdtable[j].pattern2, '/'); - if (p) { - *p = '\0'; - checkcpdtable[j].cond2 = pHMgr->decode_flag(p + 1); - } - break; - } - case 3: { checkcpdtable[j].pattern3 = mystrdup(piece); simplifiedcpd = 1; break; } - default: break; - } - i++; - } - piece = mystrsep(&tp, 0); - } - if ((!(checkcpdtable[j].pattern)) || (!(checkcpdtable[j].pattern2))) { - HUNSPELL_WARNING(stderr, "error: line %d: table is corrupt\n", af->getlinenum()); - numcheckcpd = 0; - return 1; - } - } - return 0; -} - -/* parse in the compound rule table */ -int AffixMgr::parse_defcpdtable(char * line, FileMgr * af) -{ - if (numdefcpd != 0) { - HUNSPELL_WARNING(stderr, "error: line %d: multiple table definitions\n", af->getlinenum()); - return 1; - } - char * tp = line; - char * piece; - int i = 0; - int np = 0; - piece = mystrsep(&tp, 0); - while (piece) { - if (*piece != '\0') { - switch(i) { - case 0: { np++; break; } - case 1: { - numdefcpd = atoi(piece); - if (numdefcpd < 1) { - HUNSPELL_WARNING(stderr, "error: line %d: bad entry number\n", af->getlinenum()); - return 1; - } - defcpdtable = (flagentry *) malloc(numdefcpd * sizeof(flagentry)); - if (!defcpdtable) return 1; - np++; - break; - } - default: break; - } - i++; - } - piece = mystrsep(&tp, 0); - } - if (np != 2) { - HUNSPELL_WARNING(stderr, "error: line %d: missing data\n", af->getlinenum()); - return 1; - } - - /* now parse the numdefcpd lines to read in the remainder of the table */ - char * nl; - for (int j=0; j < numdefcpd; j++) { - if (!(nl = af->getline())) return 1; - mychomp(nl); - tp = nl; - i = 0; - defcpdtable[j].def = NULL; - piece = mystrsep(&tp, 0); - while (piece) { - if (*piece != '\0') { - switch(i) { - case 0: { - if (strncmp(piece, "COMPOUNDRULE", 12) != 0) { - HUNSPELL_WARNING(stderr, "error: line %d: table is corrupt\n", af->getlinenum()); - numdefcpd = 0; - return 1; - } - break; - } - case 1: { // handle parenthesized flags - if (strchr(piece, '(')) { - defcpdtable[j].def = (FLAG *) malloc(strlen(piece) * sizeof(FLAG)); - defcpdtable[j].len = 0; - int end = 0; - FLAG * conv; - while (!end) { - char * par = piece + 1; - while (*par != '(' && *par != ')' && *par != '\0') par++; - if (*par == '\0') end = 1; else *par = '\0'; - if (*piece == '(') piece++; - if (*piece == '*' || *piece == '?') { - defcpdtable[j].def[defcpdtable[j].len++] = (FLAG) *piece; - } else if (*piece != '\0') { - int l = pHMgr->decode_flags(&conv, piece, af); - for (int k = 0; k < l; k++) defcpdtable[j].def[defcpdtable[j].len++] = conv[k]; - free(conv); - } - piece = par + 1; - } - } else { - defcpdtable[j].len = pHMgr->decode_flags(&(defcpdtable[j].def), piece, af); - } - break; - } - default: break; - } - i++; - } - piece = mystrsep(&tp, 0); - } - if (!defcpdtable[j].len) { - HUNSPELL_WARNING(stderr, "error: line %d: table is corrupt\n", af->getlinenum()); - numdefcpd = 0; - return 1; - } - } - return 0; -} - - -/* parse in the character map table */ -int AffixMgr::parse_maptable(char * line, FileMgr * af) -{ - if (nummap != 0) { - HUNSPELL_WARNING(stderr, "error: line %d: multiple table definitions\n", af->getlinenum()); - return 1; - } - char * tp = line; - char * piece; - int i = 0; - int np = 0; - piece = mystrsep(&tp, 0); - while (piece) { - if (*piece != '\0') { - switch(i) { - case 0: { np++; break; } - case 1: { - nummap = atoi(piece); - if (nummap < 1) { - HUNSPELL_WARNING(stderr, "error: line %d: bad entry number\n", af->getlinenum()); - return 1; - } - maptable = (mapentry *) malloc(nummap * sizeof(struct mapentry)); - if (!maptable) return 1; - np++; - break; - } - default: break; - } - i++; - } - piece = mystrsep(&tp, 0); - } - if (np != 2) { - HUNSPELL_WARNING(stderr, "error: line %d: missing data\n", af->getlinenum()); - return 1; - } - - /* now parse the nummap lines to read in the remainder of the table */ - char * nl; - for (int j=0; j < nummap; j++) { - if (!(nl = af->getline())) return 1; - mychomp(nl); - tp = nl; - i = 0; - maptable[j].set = NULL; - maptable[j].len = 0; - piece = mystrsep(&tp, 0); - while (piece) { - if (*piece != '\0') { - switch(i) { - case 0: { - if (strncmp(piece,"MAP",3) != 0) { - HUNSPELL_WARNING(stderr, "error: line %d: table is corrupt\n", af->getlinenum()); - nummap = 0; - return 1; - } - break; - } - case 1: { - int setn = 0; - maptable[j].len = strlen(piece); - maptable[j].set = (char **) malloc(maptable[j].len * sizeof(char*)); - if (!maptable[j].set) return 1; - for (int k = 0; k < maptable[j].len; k++) { - int chl = 1; - int chb = k; - if (piece[k] == '(') { - char * parpos = strchr(piece + k, ')'); - if (parpos != NULL) { - chb = k + 1; - chl = (int)(parpos - piece) - k - 1; - k = k + chl + 1; - } - } else { - if (utf8 && (piece[k] & 0xc0) == 0xc0) { - for (k++; utf8 && (piece[k] & 0xc0) == 0x80; k++); - chl = k - chb; - k--; - } - } - maptable[j].set[setn] = (char *) malloc(chl + 1); - if (!maptable[j].set[setn]) return 1; - strncpy(maptable[j].set[setn], piece + chb, chl); - maptable[j].set[setn][chl] = '\0'; - setn++; - } - maptable[j].len = setn; - break; } - default: break; - } - i++; - } - piece = mystrsep(&tp, 0); - } - if (!maptable[j].set || !maptable[j].len) { - HUNSPELL_WARNING(stderr, "error: line %d: table is corrupt\n", af->getlinenum()); - nummap = 0; - return 1; - } - } - return 0; -} - -/* parse in the word breakpoint table */ -int AffixMgr::parse_breaktable(char * line, FileMgr * af) -{ - if (numbreak > -1) { - HUNSPELL_WARNING(stderr, "error: line %d: multiple table definitions\n", af->getlinenum()); - return 1; - } - char * tp = line; - char * piece; - int i = 0; - int np = 0; - piece = mystrsep(&tp, 0); - while (piece) { - if (*piece != '\0') { - switch(i) { - case 0: { np++; break; } - case 1: { - numbreak = atoi(piece); - if (numbreak < 0) { - HUNSPELL_WARNING(stderr, "error: line %d: bad entry number\n", af->getlinenum()); - return 1; - } - if (numbreak == 0) return 0; - breaktable = (char **) malloc(numbreak * sizeof(char *)); - if (!breaktable) return 1; - np++; - break; - } - default: break; - } - i++; - } - piece = mystrsep(&tp, 0); - } - if (np != 2) { - HUNSPELL_WARNING(stderr, "error: line %d: missing data\n", af->getlinenum()); - return 1; - } - - /* now parse the numbreak lines to read in the remainder of the table */ - char * nl; - for (int j=0; j < numbreak; j++) { - if (!(nl = af->getline())) return 1; - mychomp(nl); - tp = nl; - i = 0; - piece = mystrsep(&tp, 0); - while (piece) { - if (*piece != '\0') { - switch(i) { - case 0: { - if (strncmp(piece,"BREAK",5) != 0) { - HUNSPELL_WARNING(stderr, "error: line %d: table is corrupt\n", af->getlinenum()); - numbreak = 0; - return 1; - } - break; - } - case 1: { - breaktable[j] = mystrdup(piece); - break; - } - default: break; - } - i++; - } - piece = mystrsep(&tp, 0); - } - if (!breaktable) { - HUNSPELL_WARNING(stderr, "error: line %d: table is corrupt\n", af->getlinenum()); - numbreak = 0; - return 1; - } - } - return 0; -} - -void AffixMgr::reverse_condition(char * piece) { - int neg = 0; - for (char * k = piece + strlen(piece) - 1; k >= piece; k--) { - switch(*k) { - case '[': { - if (neg) *(k+1) = '['; else *k = ']'; - break; - } - case ']': { - *k = '['; - if (neg) *(k+1) = '^'; - neg = 0; - break; - } - case '^': { - if (*(k+1) == ']') neg = 1; else *(k+1) = *k; - break; - } - default: { - if (neg) *(k+1) = *k; - } - } - } -} - -int AffixMgr::parse_affix(char * line, const char at, FileMgr * af, char * dupflags) -{ - int numents = 0; // number of affentry structures to parse - - unsigned short aflag = 0; // affix char identifier - - char ff=0; - std::vector affentries; - - char * tp = line; - char * nl = line; - char * piece; - int i = 0; - - // checking lines with bad syntax -#ifdef DEBUG - int basefieldnum = 0; -#endif - - // split affix header line into pieces - - int np = 0; - - piece = mystrsep(&tp, 0); - while (piece) { - if (*piece != '\0') { - switch(i) { - // piece 1 - is type of affix - case 0: { np++; break; } - - // piece 2 - is affix char - case 1: { - np++; - aflag = pHMgr->decode_flag(piece); - if (((at == 'S') && (dupflags[aflag] & dupSFX)) || - ((at == 'P') && (dupflags[aflag] & dupPFX))) { - HUNSPELL_WARNING(stderr, "error: line %d: multiple definitions of an affix flag\n", - af->getlinenum()); - // return 1; XXX permissive mode for bad dictionaries - } - dupflags[aflag] += (char) ((at == 'S') ? dupSFX : dupPFX); - break; - } - // piece 3 - is cross product indicator - case 2: { np++; if (*piece == 'Y') ff = aeXPRODUCT; break; } - - // piece 4 - is number of affentries - case 3: { - np++; - numents = atoi(piece); - if (numents == 0) { - char * err = pHMgr->encode_flag(aflag); - if (err) { - HUNSPELL_WARNING(stderr, "error: line %d: bad entry number\n", - af->getlinenum()); - free(err); - } - return 1; - } - affentries.resize(numents); - affentries[0].opts = ff; - if (utf8) affentries[0].opts += aeUTF8; - if (pHMgr->is_aliasf()) affentries[0].opts += aeALIASF; - if (pHMgr->is_aliasm()) affentries[0].opts += aeALIASM; - affentries[0].aflag = aflag; - } - - default: break; - } - i++; - } - piece = mystrsep(&tp, 0); - } - // check to make sure we parsed enough pieces - if (np != 4) { - char * err = pHMgr->encode_flag(aflag); - if (err) { - HUNSPELL_WARNING(stderr, "error: line %d: missing data\n", af->getlinenum()); - free(err); - } - return 1; - } - - // now parse numents affentries for this affix - std::vector::iterator start = affentries.begin(); - std::vector::iterator end = affentries.end(); - for (std::vector::iterator entry = start; entry != end; ++entry) { - if (!(nl = af->getline())) return 1; - mychomp(nl); - tp = nl; - i = 0; - np = 0; - - // split line into pieces - piece = mystrsep(&tp, 0); - while (piece) { - if (*piece != '\0') { - switch(i) { - // piece 1 - is type - case 0: { - np++; - if (entry != start) entry->opts = start->opts & - (char) (aeXPRODUCT + aeUTF8 + aeALIASF + aeALIASM); - break; - } - - // piece 2 - is affix char - case 1: { - np++; - if (pHMgr->decode_flag(piece) != aflag) { - char * err = pHMgr->encode_flag(aflag); - if (err) { - HUNSPELL_WARNING(stderr, "error: line %d: affix %s is corrupt\n", - af->getlinenum(), err); - free(err); - } - return 1; - } - - if (entry != start) entry->aflag = start->aflag; - break; - } - - // piece 3 - is string to strip or 0 for null - case 2: { - np++; - if (complexprefixes) { - if (utf8) reverseword_utf(piece); else reverseword(piece); - } - entry->strip = mystrdup(piece); - entry->stripl = (unsigned char) strlen(entry->strip); - if (strcmp(entry->strip,"0") == 0) { - free(entry->strip); - entry->strip=mystrdup(""); - entry->stripl = 0; - } - break; - } - - // piece 4 - is affix string or 0 for null - case 3: { - char * dash; - entry->morphcode = NULL; - entry->contclass = NULL; - entry->contclasslen = 0; - np++; - dash = strchr(piece, '/'); - if (dash) { - *dash = '\0'; - - if (ignorechars) { - if (utf8) { - remove_ignored_chars_utf(piece, ignorechars_utf16, ignorechars_utf16_len); - } else { - remove_ignored_chars(piece,ignorechars); - } - } - - if (complexprefixes) { - if (utf8) reverseword_utf(piece); else reverseword(piece); - } - entry->appnd = mystrdup(piece); - - if (pHMgr->is_aliasf()) { - int index = atoi(dash + 1); - entry->contclasslen = (unsigned short) pHMgr->get_aliasf(index, &(entry->contclass), af); - if (!entry->contclasslen) HUNSPELL_WARNING(stderr, "error: bad affix flag alias: \"%s\"\n", dash+1); - } else { - entry->contclasslen = (unsigned short) pHMgr->decode_flags(&(entry->contclass), dash + 1, af); - flag_qsort(entry->contclass, 0, entry->contclasslen); - } - *dash = '/'; - - havecontclass = 1; - for (unsigned short _i = 0; _i < entry->contclasslen; _i++) { - contclasses[(entry->contclass)[_i]] = 1; - } - } else { - if (ignorechars) { - if (utf8) { - remove_ignored_chars_utf(piece, ignorechars_utf16, ignorechars_utf16_len); - } else { - remove_ignored_chars(piece,ignorechars); - } - } - - if (complexprefixes) { - if (utf8) reverseword_utf(piece); else reverseword(piece); - } - entry->appnd = mystrdup(piece); - } - - entry->appndl = (unsigned char) strlen(entry->appnd); - if (strcmp(entry->appnd,"0") == 0) { - free(entry->appnd); - entry->appnd=mystrdup(""); - entry->appndl = 0; - } - break; - } - - // piece 5 - is the conditions descriptions - case 4: { - np++; - if (complexprefixes) { - if (utf8) reverseword_utf(piece); else reverseword(piece); - reverse_condition(piece); - } - if (entry->stripl && (strcmp(piece, ".") != 0) && - redundant_condition(at, entry->strip, entry->stripl, piece, af->getlinenum())) - strcpy(piece, "."); - if (at == 'S') { - reverseword(piece); - reverse_condition(piece); - } - if (encodeit(*entry, piece)) return 1; - break; - } - - case 5: { - np++; - if (pHMgr->is_aliasm()) { - int index = atoi(piece); - entry->morphcode = pHMgr->get_aliasm(index); - } else { - if (complexprefixes) { // XXX - fix me for morph. gen. - if (utf8) reverseword_utf(piece); else reverseword(piece); - } - // add the remaining of the line - if (*tp) { - *(tp - 1) = ' '; - tp = tp + strlen(tp); - } - entry->morphcode = mystrdup(piece); - if (!entry->morphcode) return 1; - } - break; - } - default: break; - } - i++; - } - piece = mystrsep(&tp, 0); - } - // check to make sure we parsed enough pieces - if (np < 4) { - char * err = pHMgr->encode_flag(aflag); - if (err) { - HUNSPELL_WARNING(stderr, "error: line %d: affix %s is corrupt\n", - af->getlinenum(), err); - free(err); - } - return 1; - } - -#ifdef DEBUG - // detect unnecessary fields, excepting comments - if (basefieldnum) { - int fieldnum = !(entry->morphcode) ? 5 : ((*(entry->morphcode)=='#') ? 5 : 6); - if (fieldnum != basefieldnum) - HUNSPELL_WARNING(stderr, "warning: line %d: bad field number\n", af->getlinenum()); - } else { - basefieldnum = !(entry->morphcode) ? 5 : ((*(entry->morphcode)=='#') ? 5 : 6); - } -#endif - } - - // now create SfxEntry or PfxEntry objects and use links to - // build an ordered (sorted by affix string) list - for (std::vector::iterator entry = start; entry != end; ++entry) { - if (at == 'P') { - PfxEntry * pfxptr = new PfxEntry(this,&(*entry)); - build_pfxtree(pfxptr); - } else { - SfxEntry * sfxptr = new SfxEntry(this,&(*entry)); - build_sfxtree(sfxptr); - } - } - return 0; -} - -int AffixMgr::redundant_condition(char ft, char * strip, int stripl, const char * cond, int linenum) { - int condl = strlen(cond); - int i; - int j; - int neg; - int in; - if (ft == 'P') { // prefix - if (strncmp(strip, cond, condl) == 0) return 1; - if (utf8) { - } else { - for (i = 0, j = 0; (i < stripl) && (j < condl); i++, j++) { - if (cond[j] != '[') { - if (cond[j] != strip[i]) { - HUNSPELL_WARNING(stderr, "warning: line %d: incompatible stripping characters and condition\n", linenum); - return 0; - } - } else { - neg = (cond[j+1] == '^') ? 1 : 0; - in = 0; - do { - j++; - if (strip[i] == cond[j]) in = 1; - } while ((j < (condl - 1)) && (cond[j] != ']')); - if (j == (condl - 1) && (cond[j] != ']')) { - HUNSPELL_WARNING(stderr, "error: line %d: missing ] in condition:\n%s\n", linenum, cond); - return 0; - } - if ((!neg && !in) || (neg && in)) { - HUNSPELL_WARNING(stderr, "warning: line %d: incompatible stripping characters and condition\n", linenum); - return 0; - } - } - } - if (j >= condl) return 1; - } - } else { // suffix - if ((stripl >= condl) && strcmp(strip + stripl - condl, cond) == 0) return 1; - if (utf8) { - } else { - for (i = stripl - 1, j = condl - 1; (i >= 0) && (j >= 0); i--, j--) { - if (cond[j] != ']') { - if (cond[j] != strip[i]) { - HUNSPELL_WARNING(stderr, "warning: line %d: incompatible stripping characters and condition\n", linenum); - return 0; - } - } else { - in = 0; - do { - j--; - if (strip[i] == cond[j]) in = 1; - } while ((j > 0) && (cond[j] != '[')); - if ((j == 0) && (cond[j] != '[')) { - HUNSPELL_WARNING(stderr, "error: line: %d: missing ] in condition:\n%s\n", linenum, cond); - return 0; - } - neg = (cond[j+1] == '^') ? 1 : 0; - if ((!neg && !in) || (neg && in)) { - HUNSPELL_WARNING(stderr, "warning: line %d: incompatible stripping characters and condition\n", linenum); - return 0; - } - } - } - if (j < 0) return 1; - } - } - return 0; -} diff --git a/plugins/SpellChecker/hunspell/affixmgr.hxx b/plugins/SpellChecker/hunspell/affixmgr.hxx deleted file mode 100644 index d9c625aed0..0000000000 --- a/plugins/SpellChecker/hunspell/affixmgr.hxx +++ /dev/null @@ -1,250 +0,0 @@ -#ifndef _AFFIXMGR_HXX_ -#define _AFFIXMGR_HXX_ - -#include "hunvisapi.h" - -#include - -#include "atypes.hxx" -#include "baseaffix.hxx" -#include "hashmgr.hxx" -#include "phonet.hxx" -#include "replist.hxx" - -// check flag duplication -#define dupSFX (1 << 0) -#define dupPFX (1 << 1) - -class PfxEntry; -class SfxEntry; - -class LIBHUNSPELL_DLL_EXPORTED AffixMgr -{ - - PfxEntry * pStart[SETSIZE]; - SfxEntry * sStart[SETSIZE]; - PfxEntry * pFlag[SETSIZE]; - SfxEntry * sFlag[SETSIZE]; - HashMgr * pHMgr; - HashMgr ** alldic; - int * maxdic; - char * keystring; - char * trystring; - char * encoding; - struct cs_info * csconv; - int utf8; - int complexprefixes; - FLAG compoundflag; - FLAG compoundbegin; - FLAG compoundmiddle; - FLAG compoundend; - FLAG compoundroot; - FLAG compoundforbidflag; - FLAG compoundpermitflag; - int checkcompounddup; - int checkcompoundrep; - int checkcompoundcase; - int checkcompoundtriple; - int simplifiedtriple; - FLAG forbiddenword; - FLAG nosuggest; - FLAG nongramsuggest; - FLAG needaffix; - int cpdmin; - int numrep; - replentry * reptable; - RepList * iconvtable; - RepList * oconvtable; - int nummap; - mapentry * maptable; - int numbreak; - char ** breaktable; - int numcheckcpd; - patentry * checkcpdtable; - int simplifiedcpd; - int numdefcpd; - flagentry * defcpdtable; - phonetable * phone; - int maxngramsugs; - int maxcpdsugs; - int maxdiff; - int onlymaxdiff; - int nosplitsugs; - int sugswithdots; - int cpdwordmax; - int cpdmaxsyllable; - char * cpdvowels; - w_char * cpdvowels_utf16; - int cpdvowels_utf16_len; - char * cpdsyllablenum; - const char * pfxappnd; // BUG: not stateless - const char * sfxappnd; // BUG: not stateless - FLAG sfxflag; // BUG: not stateless - char * derived; // BUG: not stateless - SfxEntry * sfx; // BUG: not stateless - PfxEntry * pfx; // BUG: not stateless - int checknum; - char * wordchars; - unsigned short * wordchars_utf16; - int wordchars_utf16_len; - char * ignorechars; - unsigned short * ignorechars_utf16; - int ignorechars_utf16_len; - char * version; - char * lang; - int langnum; - FLAG lemma_present; - FLAG circumfix; - FLAG onlyincompound; - FLAG keepcase; - FLAG forceucase; - FLAG warn; - int forbidwarn; - FLAG substandard; - int checksharps; - int fullstrip; - - int havecontclass; // boolean variable - char contclasses[CONTSIZE]; // flags of possible continuing classes (twofold affix) - -public: - - AffixMgr(const char * affpath, HashMgr** ptr, int * md, - const char * key = NULL); - ~AffixMgr(); - struct hentry * affix_check(const char * word, int len, - const unsigned short needflag = (unsigned short) 0, - char in_compound = IN_CPD_NOT); - struct hentry * prefix_check(const char * word, int len, - char in_compound, const FLAG needflag = FLAG_NULL); - inline int isSubset(const char * s1, const char * s2); - struct hentry * prefix_check_twosfx(const char * word, int len, - char in_compound, const FLAG needflag = FLAG_NULL); - inline int isRevSubset(const char * s1, const char * end_of_s2, int len); - struct hentry * suffix_check(const char * word, int len, int sfxopts, - PfxEntry* ppfx, char ** wlst, int maxSug, int * ns, - const FLAG cclass = FLAG_NULL, const FLAG needflag = FLAG_NULL, - char in_compound = IN_CPD_NOT); - struct hentry * suffix_check_twosfx(const char * word, int len, - int sfxopts, PfxEntry* ppfx, const FLAG needflag = FLAG_NULL); - - char * affix_check_morph(const char * word, int len, - const FLAG needflag = FLAG_NULL, char in_compound = IN_CPD_NOT); - char * prefix_check_morph(const char * word, int len, - char in_compound, const FLAG needflag = FLAG_NULL); - char * suffix_check_morph (const char * word, int len, int sfxopts, - PfxEntry * ppfx, const FLAG cclass = FLAG_NULL, - const FLAG needflag = FLAG_NULL, char in_compound = IN_CPD_NOT); - - char * prefix_check_twosfx_morph(const char * word, int len, - char in_compound, const FLAG needflag = FLAG_NULL); - char * suffix_check_twosfx_morph(const char * word, int len, - int sfxopts, PfxEntry * ppfx, const FLAG needflag = FLAG_NULL); - - char * morphgen(char * ts, int wl, const unsigned short * ap, - unsigned short al, char * morph, char * targetmorph, int level); - - int expand_rootword(struct guessword * wlst, int maxn, const char * ts, - int wl, const unsigned short * ap, unsigned short al, char * bad, - int, char *); - - short get_syllable (const char * word, int wlen); - int cpdrep_check(const char * word, int len); - int cpdpat_check(const char * word, int len, hentry * r1, hentry * r2, - const char affixed); - int defcpd_check(hentry *** words, short wnum, hentry * rv, - hentry ** rwords, char all); - int cpdcase_check(const char * word, int len); - inline int candidate_check(const char * word, int len); - void setcminmax(int * cmin, int * cmax, const char * word, int len); - struct hentry * compound_check(const char * word, int len, short wordnum, - short numsyllable, short maxwordnum, short wnum, hentry ** words, - char hu_mov_rule, char is_sug, int * info); - - int compound_check_morph(const char * word, int len, short wordnum, - short numsyllable, short maxwordnum, short wnum, hentry ** words, - char hu_mov_rule, char ** result, char * partresult); - - struct hentry * lookup(const char * word); - int get_numrep() const; - struct replentry * get_reptable() const; - RepList * get_iconvtable() const; - RepList * get_oconvtable() const; - struct phonetable * get_phonetable() const; - int get_nummap() const; - struct mapentry * get_maptable() const; - int get_numbreak() const; - char ** get_breaktable() const; - char * get_encoding(); - int get_langnum() const; - char * get_key_string(); - char * get_try_string() const; - const char * get_wordchars() const; - unsigned short * get_wordchars_utf16(int * len) const; - char * get_ignore() const; - unsigned short * get_ignore_utf16(int * len) const; - int get_compound() const; - FLAG get_compoundflag() const; - FLAG get_compoundbegin() const; - FLAG get_forbiddenword() const; - FLAG get_nosuggest() const; - FLAG get_nongramsuggest() const; - FLAG get_needaffix() const; - FLAG get_onlyincompound() const; - FLAG get_compoundroot() const; - FLAG get_lemma_present() const; - int get_checknum() const; - const char * get_prefix() const; - const char * get_suffix() const; - const char * get_derived() const; - const char * get_version() const; - int have_contclass() const; - int get_utf8() const; - int get_complexprefixes() const; - char * get_suffixed(char ) const; - int get_maxngramsugs() const; - int get_maxcpdsugs() const; - int get_maxdiff() const; - int get_onlymaxdiff() const; - int get_nosplitsugs() const; - int get_sugswithdots(void) const; - FLAG get_keepcase(void) const; - FLAG get_forceucase(void) const; - FLAG get_warn(void) const; - int get_forbidwarn(void) const; - int get_checksharps(void) const; - char * encode_flag(unsigned short aflag) const; - int get_fullstrip() const; - -private: - int parse_file(const char * affpath, const char * key); - int parse_flag(char * line, unsigned short * out, FileMgr * af); - int parse_num(char * line, int * out, FileMgr * af); - int parse_cpdsyllable(char * line, FileMgr * af); - int parse_reptable(char * line, FileMgr * af); - int parse_convtable(char * line, FileMgr * af, RepList ** rl, const char * keyword); - int parse_phonetable(char * line, FileMgr * af); - int parse_maptable(char * line, FileMgr * af); - int parse_breaktable(char * line, FileMgr * af); - int parse_checkcpdtable(char * line, FileMgr * af); - int parse_defcpdtable(char * line, FileMgr * af); - int parse_affix(char * line, const char at, FileMgr * af, char * dupflags); - - void reverse_condition(char *); - void debugflag(char * result, unsigned short flag); - int condlen(char *); - int encodeit(affentry &entry, char * cs); - int build_pfxtree(PfxEntry* pfxptr); - int build_sfxtree(SfxEntry* sfxptr); - int process_pfx_order(); - int process_sfx_order(); - PfxEntry * process_pfx_in_order(PfxEntry * ptr, PfxEntry * nptr); - SfxEntry * process_sfx_in_order(SfxEntry * ptr, SfxEntry * nptr); - int process_pfx_tree_to_list(); - int process_sfx_tree_to_list(); - int redundant_condition(char, char * strip, int stripl, - const char * cond, int); -}; - -#endif - diff --git a/plugins/SpellChecker/hunspell/atypes.hxx b/plugins/SpellChecker/hunspell/atypes.hxx deleted file mode 100644 index df27c4d1cb..0000000000 --- a/plugins/SpellChecker/hunspell/atypes.hxx +++ /dev/null @@ -1,107 +0,0 @@ -#ifndef _ATYPES_HXX_ -#define _ATYPES_HXX_ - -#ifndef HUNSPELL_WARNING -#include -#ifdef HUNSPELL_WARNING_ON -#define HUNSPELL_WARNING fprintf -#else -// empty inline function to switch off warnings (instead of the C99 standard variadic macros) -static inline void HUNSPELL_WARNING(FILE *, const char *, ...) {} -#endif -#endif - -// HUNSTEM def. -#define HUNSTEM - -#include "hashmgr.hxx" -#include "w_char.hxx" - -#define SETSIZE 256 -#define CONTSIZE 65536 -#define MAXWORDLEN 100 -#define MAXWORDUTF8LEN 256 - -// affentry options -#define aeXPRODUCT (1 << 0) -#define aeUTF8 (1 << 1) -#define aeALIASF (1 << 2) -#define aeALIASM (1 << 3) -#define aeLONGCOND (1 << 4) - -// compound options -#define IN_CPD_NOT 0 -#define IN_CPD_BEGIN 1 -#define IN_CPD_END 2 -#define IN_CPD_OTHER 3 - -// info options -#define SPELL_COMPOUND (1 << 0) -#define SPELL_FORBIDDEN (1 << 1) -#define SPELL_ALLCAP (1 << 2) -#define SPELL_NOCAP (1 << 3) -#define SPELL_INITCAP (1 << 4) -#define SPELL_ORIGCAP (1 << 5) -#define SPELL_WARN (1 << 6) - -#define MAXLNLEN 8192 - -#define MINCPDLEN 3 -#define MAXCOMPOUND 10 -#define MAXCONDLEN 20 -#define MAXCONDLEN_1 (MAXCONDLEN - sizeof(char *)) - -#define MAXACC 1000 - -#define FLAG unsigned short -#define FLAG_NULL 0x00 -#define FREE_FLAG(a) a = 0 - -#define TESTAFF( a, b , c ) flag_bsearch((unsigned short *) a, (unsigned short) b, c) - -struct affentry -{ - char * strip; - char * appnd; - unsigned char stripl; - unsigned char appndl; - char numconds; - char opts; - unsigned short aflag; - unsigned short * contclass; - short contclasslen; - union { - char conds[MAXCONDLEN]; - struct { - char conds1[MAXCONDLEN_1]; - char * conds2; - } l; - } c; - char * morphcode; -}; - -struct guessword { - char * word; - bool allow; - char * orig; -}; - -struct mapentry { - char ** set; - int len; -}; - -struct flagentry { - FLAG * def; - int len; -}; - -struct patentry { - char * pattern; - char * pattern2; - char * pattern3; - FLAG cond; - FLAG cond2; -}; - -#endif diff --git a/plugins/SpellChecker/hunspell/baseaffix.hxx b/plugins/SpellChecker/hunspell/baseaffix.hxx deleted file mode 100644 index ed64f3d84f..0000000000 --- a/plugins/SpellChecker/hunspell/baseaffix.hxx +++ /dev/null @@ -1,28 +0,0 @@ -#ifndef _BASEAFF_HXX_ -#define _BASEAFF_HXX_ - -#include "hunvisapi.h" - -class LIBHUNSPELL_DLL_EXPORTED AffEntry -{ -protected: - char * appnd; - char * strip; - unsigned char appndl; - unsigned char stripl; - char numconds; - char opts; - unsigned short aflag; - union { - char conds[MAXCONDLEN]; - struct { - char conds1[MAXCONDLEN_1]; - char * conds2; - } l; - } c; - char * morphcode; - unsigned short * contclass; - short contclasslen; -}; - -#endif diff --git a/plugins/SpellChecker/hunspell/config.h b/plugins/SpellChecker/hunspell/config.h deleted file mode 100644 index 6e85f1b41c..0000000000 --- a/plugins/SpellChecker/hunspell/config.h +++ /dev/null @@ -1,217 +0,0 @@ -/* config.h.in. Generated from configure.ac by autoheader. */ - -#define _CRT_SECURE_NO_WARNINGS - -/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP - systems. This function is required for `alloca.c' support on those systems. - */ -#define CRAY_STACKSEG_END 1 - -/* Define to 1 if using `alloca.c'. */ -#define C_ALLOCA 1 - -/* Define to 1 if translation of program messages to the user's native - language is requested. */ -#undef ENABLE_NLS - -/* Define to 1 if you have `alloca', as a function or macro. */ -#define HAVE_ALLOCA 1 - -/* Define to 1 if you have and it should be used (not on Ultrix). - */ -#define HAVE_ALLOCA_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_ARGZ_H 1 - -/* "Define if you have the header" */ -#undef HAVE_CURSES_H - -/* Define if the GNU dcgettext() function is already present or preinstalled. - */ -#define HAVE_DCGETTEXT 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_DLFCN_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_ERROR_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_FCNTL_H 1 - -/* Define to 1 if you have the `feof_unlocked' function. */ -#define HAVE_FEOF_UNLOCKED 1 - -/* Define to 1 if you have the `fgets_unlocked' function. */ -#define HAVE_FGETS_UNLOCKED 1 - -/* Define to 1 if you have the `getcwd' function. */ -#define HAVE_GETCWD 1 - -/* Define to 1 if you have the `getc_unlocked' function. */ -#define HAVE_GETC_UNLOCKED 1 - -/* Define to 1 if you have the `getegid' function. */ -#define HAVE_GETEGID 1 - -/* Define to 1 if you have the `geteuid' function. */ -#define HAVE_GETEUID 1 - -/* Define to 1 if you have the `getgid' function. */ -#define HAVE_GETGID 1 - -/* Define to 1 if you have the `getpagesize' function. */ -#define HAVE_GETPAGESIZE 1 - -/* Define if the GNU gettext() function is already present or preinstalled. */ -#define HAVE_GETTEXT 1 - -/* Define to 1 if you have the `getuid' function. */ -#define HAVE_GETUID 1 - -/* Define if you have the iconv() function. */ -#undef HAVE_ICONV - -/* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 - -/* Define if you have and nl_langinfo(CODESET). */ -#define HAVE_LANGINFO_CODESET 1 - -/* Define if your file defines LC_MESSAGES. */ -#define HAVE_LC_MESSAGES 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_LIBINTL_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_LIMITS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_LOCALE_H 1 - -/* Define to 1 if your system has a GNU libc compatible `malloc' function, and - to 0 otherwise. */ -#define HAVE_MALLOC 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_MALLOC_H 1 - -/* Define to 1 if you have the `memchr' function. */ -#define HAVE_MEMCHR 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if you have the `mempcpy' function. */ -#define HAVE_MEMPCPY 1 - -/* Define to 1 if you have a working `mmap' system call. */ -#define HAVE_MMAP 1 - -/* Define to 1 if you have the `munmap' function. */ -#define HAVE_MUNMAP 1 - -/* "Define if you have the header" */ -#define HAVE_NCURSESW_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_NL_TYPES_H 1 - -/* Define to 1 if you have the `putenv' function. */ -#define HAVE_PUTENV 1 - -/* "Define if you have fancy command input editing with Readline" */ -#undef HAVE_READLINE - -/* Define to 1 if you have the `setenv' function. */ -#define HAVE_SETENV 1 - -/* Define to 1 if you have the `setlocale' function. */ -#define HAVE_SETLOCALE 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDDEF_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if you have the `stpcpy' function. */ -#define HAVE_STPCPY 1 - -/* Define to 1 if you have the `strcasecmp' function. */ -#define HAVE_STRCASECMP 1 - -/* Define to 1 if you have the `strchr' function. */ -#define HAVE_STRCHR 1 - -/* Define to 1 if you have the `strdup' function. */ -#define HAVE_STRDUP 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRINGS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the `strstr' function. */ -#define HAVE_STRSTR 1 - -/* Define to 1 if you have the `strtoul' function. */ -#define HAVE_STRTOUL 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_PARAM_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the `tsearch' function. */ -#define HAVE_TSEARCH 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_UNISTD_H 1 - -/* Define to 1 if you have the `__argz_count' function. */ -#define HAVE___ARGZ_COUNT 1 - -/* Define to 1 if you have the `__argz_next' function. */ -#define HAVE___ARGZ_NEXT 1 - -/* Define to 1 if you have the `__argz_stringify' function. */ -#define HAVE___ARGZ_STRINGIFY 1 - -/* "Define if you use exterimental functions" */ -#define HUNSPELL_EXPERIMENTAL 1 - -/* "Define if you need warning messages" */ -#define HUNSPELL_WARNING_ON - -/* Define as const if the declaration of iconv() needs const. */ -#define ICONV_CONST 1 - -/* Name of package */ -#define PACKAGE - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT - -/* Define to the full name of this package. */ -#define PACKAGE_NAME - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "1.3.1" -#define VERSION "1.3.1" diff --git a/plugins/SpellChecker/hunspell/csutil.cxx b/plugins/SpellChecker/hunspell/csutil.cxx deleted file mode 100644 index 35154a73ed..0000000000 --- a/plugins/SpellChecker/hunspell/csutil.cxx +++ /dev/null @@ -1,5834 +0,0 @@ -#include "license.hunspell" -#include "license.myspell" - -#include -#include -#include -#include - -#include "csutil.hxx" -#include "atypes.hxx" -#include "langnum.hxx" - -// Unicode character encoding information -struct unicode_info { - unsigned short c; - unsigned short cupper; - unsigned short clower; -}; - -#ifdef OPENOFFICEORG -# include -#else -# ifndef MOZILLA_CLIENT -# include "utf_info.cxx" -# define UTF_LST_LEN (sizeof(utf_lst) / (sizeof(unicode_info))) -# endif -#endif - -#ifdef MOZILLA_CLIENT -#include "nsCOMPtr.h" -#include "nsServiceManagerUtils.h" -#include "nsIUnicodeEncoder.h" -#include "nsIUnicodeDecoder.h" -#include "nsUnicharUtils.h" -#include "nsICharsetConverterManager.h" - -static NS_DEFINE_CID(kCharsetConverterManagerCID, NS_ICHARSETCONVERTERMANAGER_CID); -#endif - -struct unicode_info2 { - char cletter; - unsigned short cupper; - unsigned short clower; -}; - -static struct unicode_info2 * utf_tbl = NULL; -static int utf_tbl_count = 0; // utf_tbl can be used by multiple Hunspell instances - -/* only UTF-16 (BMP) implementation */ -char * u16_u8(char * dest, int size, const w_char * src, int srclen) { - signed char * u8 = (signed char *)dest; - signed char * u8_max = (signed char *)(u8 + size); - const w_char * u2 = src; - const w_char * u2_max = src + srclen; - while ((u2 < u2_max) && (u8 < u8_max)) { - if (u2->h) { // > 0xFF - // XXX 4-byte haven't implemented yet. - if (u2->h >= 0x08) { // >= 0x800 (3-byte UTF-8 character) - *u8 = 0xe0 + (u2->h >> 4); - u8++; - if (u8 < u8_max) { - *u8 = 0x80 + ((u2->h & 0xf) << 2) + (u2->l >> 6); - u8++; - if (u8 < u8_max) { - *u8 = 0x80 + (u2->l & 0x3f); - u8++; - } - } - } else { // < 0x800 (2-byte UTF-8 character) - *u8 = 0xc0 + (u2->h << 2) + (u2->l >> 6); - u8++; - if (u8 < u8_max) { - *u8 = 0x80 + (u2->l & 0x3f); - u8++; - } - } - } else { // <= 0xFF - if (u2->l & 0x80) { // >0x80 (2-byte UTF-8 character) - *u8 = 0xc0 + (u2->l >> 6); - u8++; - if (u8 < u8_max) { - *u8 = 0x80 + (u2->l & 0x3f); - u8++; - } - } else { // < 0x80 (1-byte UTF-8 character) - *u8 = u2->l; - u8++; - } - } - u2++; - } - *u8 = '\0'; - return dest; -} - - -/* only UTF-16 (BMP) implementation */ -int u8_u16(w_char * dest, int size, const char * src) { - const signed char * u8 = (const signed char *)src; - w_char * u2 = dest; - w_char * u2_max = u2 + size; - - while ((u2 < u2_max) && *u8) { - switch ((*u8) & 0xf0) { - case 0x00: - case 0x10: - case 0x20: - case 0x30: - case 0x40: - case 0x50: - case 0x60: - case 0x70: { - u2->h = 0; - u2->l = *u8; - break; - } - case 0x80: - case 0x90: - case 0xa0: - case 0xb0: { - HUNSPELL_WARNING(stderr, "UTF-8 encoding error. Unexpected continuation bytes in %ld. character position\n%s\n", static_cast(u8 - (signed char *)src), src); - u2->h = 0xff; - u2->l = 0xfd; - break; - } - case 0xc0: - case 0xd0: { // 2-byte UTF-8 codes - if ((*(u8+1) & 0xc0) == 0x80) { - u2->h = (*u8 & 0x1f) >> 2; - u2->l = (*u8 << 6) + (*(u8+1) & 0x3f); - u8++; - } else { - HUNSPELL_WARNING(stderr, "UTF-8 encoding error. Missing continuation byte in %ld. character position:\n%s\n", static_cast(u8 - (signed char *)src), src); - u2->h = 0xff; - u2->l = 0xfd; - } - break; - } - case 0xe0: { // 3-byte UTF-8 codes - if ((*(u8+1) & 0xc0) == 0x80) { - u2->h = ((*u8 & 0x0f) << 4) + ((*(u8+1) & 0x3f) >> 2); - u8++; - if ((*(u8+1) & 0xc0) == 0x80) { - u2->l = (*u8 << 6) + (*(u8+1) & 0x3f); - u8++; - } else { - HUNSPELL_WARNING(stderr, "UTF-8 encoding error. Missing continuation byte in %ld. character position:\n%s\n", static_cast(u8 - (signed char *)src), src); - u2->h = 0xff; - u2->l = 0xfd; - } - } else { - HUNSPELL_WARNING(stderr, "UTF-8 encoding error. Missing continuation byte in %ld. character position:\n%s\n", static_cast(u8 - (signed char *)src), src); - u2->h = 0xff; - u2->l = 0xfd; - } - break; - } - case 0xf0: { // 4 or more byte UTF-8 codes - HUNSPELL_WARNING(stderr, "This UTF-8 encoding can't convert to UTF-16:\n%s\n", src); - u2->h = 0xff; - u2->l = 0xfd; - return -1; - } - } - u8++; - u2++; - } - return (int)(u2 - dest); -} - -void flag_qsort(unsigned short flags[], int begin, int end) { - unsigned short reg; - if (end > begin) { - unsigned short pivot = flags[begin]; - int l = begin + 1; - int r = end; - while(l < r) { - if (flags[l] <= pivot) { - l++; - } else { - r--; - reg = flags[l]; - flags[l] = flags[r]; - flags[r] = reg; - } - } - l--; - reg = flags[begin]; - flags[begin] = flags[l]; - flags[l] = reg; - - flag_qsort(flags, begin, l); - flag_qsort(flags, r, end); - } - } - -int flag_bsearch(unsigned short flags[], unsigned short flag, int length) { - int mid; - int left = 0; - int right = length - 1; - while (left <= right) { - mid = (left + right) / 2; - if (flags[mid] == flag) return 1; - if (flag < flags[mid]) right = mid - 1; - else left = mid + 1; - } - return 0; -} - - // strip strings into token based on single char delimiter - // acts like strsep() but only uses a delim char and not - // a delim string - // default delimiter: white space characters - - char * mystrsep(char ** stringp, const char delim) - { - char * mp = *stringp; - if (*mp != '\0') { - char * dp; - if (delim) { - dp = strchr(mp, delim); - } else { - // don't use isspace() here, the string can be in some random charset - // that's way different than the locale's - for (dp = mp; (*dp && *dp != ' ' && *dp != '\t'); dp++); - if (!*dp) dp = NULL; - } - if (dp) { - *stringp = dp+1; - *dp = '\0'; - } else { - *stringp = mp + strlen(mp); - } - return mp; - } - return NULL; - } - - // replaces strdup with ansi version - char * mystrdup(const char * s) - { - char * d = NULL; - if (s) { - size_t sl = strlen(s)+1; - d = (char *) malloc(sl); - if (d) { - memcpy(d,s,sl); - } else { - HUNSPELL_WARNING(stderr, "Can't allocate memory.\n"); - } - } - return d; - } - - // strcat for limited length destination string - char * mystrcat(char * dest, const char * st, int max) { - int len; - int len2; - if (dest == NULL || st == NULL) return dest; - len = strlen(dest); - len2 = strlen(st); - if (len + len2 + 1 > max) return dest; - strcpy(dest + len, st); - return dest; - } - - // remove cross-platform text line end characters - void mychomp(char * s) - { - size_t k = strlen(s); - if ((k > 0) && ((*(s+k-1)=='\r') || (*(s+k-1)=='\n'))) *(s+k-1) = '\0'; - if ((k > 1) && (*(s+k-2) == '\r')) *(s+k-2) = '\0'; - } - - - // does an ansi strdup of the reverse of a string - char * myrevstrdup(const char * s) - { - char * d = NULL; - if (s) { - size_t sl = strlen(s); - d = (char *) malloc(sl+1); - if (d) { - const char * p = s + sl - 1; - char * q = d; - while (p >= s) *q++ = *p--; - *q = '\0'; - } else { - HUNSPELL_WARNING(stderr, "Can't allocate memory.\n"); - } - } - return d; - } - -// break text to lines -// return number of lines -int line_tok(const char * text, char *** lines, char breakchar) { - int linenum = 0; - if (!text) { - return linenum; - } - char * dup = mystrdup(text); - char * p = strchr(dup, breakchar); - while (p) { - linenum++; - *p = '\0'; - p++; - p = strchr(p, breakchar); - } - linenum++; - *lines = (char **) malloc(linenum * sizeof(char *)); - if (!(*lines)) { - free(dup); - return 0; - } - - p = dup; - int l = 0; - for (int i = 0; i < linenum; i++) { - if (*p != '\0') { - (*lines)[l] = mystrdup(p); - if (!(*lines)[l]) { - for (i = 0; i < l; i++) free((*lines)[i]); - free(dup); - return 0; - } - l++; - } - p += strlen(p) + 1; - } - free(dup); - if (!l) free(*lines); - return l; -} - -// uniq line in place -char * line_uniq(char * text, char breakchar) { - char ** lines; - int linenum = line_tok(text, &lines, breakchar); - int i; - strcpy(text, lines[0]); - for ( i = 1; i < linenum; i++ ) { - int dup = 0; - for (int j = 0; j < i; j++) { - if (strcmp(lines[i], lines[j]) == 0) dup = 1; - } - if (!dup) { - if ((i > 1) || (*(lines[0]) != '\0')) { - sprintf(text + strlen(text), "%c", breakchar); - } - strcat(text, lines[i]); - } - } - for ( i = 0; i < linenum; i++ ) { - if (lines[i]) free(lines[i]); - } - if (lines) free(lines); - return text; -} - -// uniq and boundary for compound analysis: "1\n\2\n\1" -> " ( \1 | \2 ) " -char * line_uniq_app(char ** text, char breakchar) { - if (!strchr(*text, breakchar)) { - return *text; - } - - char ** lines; - int i; - int linenum = line_tok(*text, &lines, breakchar); - int dup = 0; - for (i = 0; i < linenum; i++) { - for (int j = 0; j < (i - 1); j++) { - if (strcmp(lines[i], lines[j]) == 0) { - *(lines[i]) = '\0'; - dup++; - break; - } - } - } - if ((linenum - dup) == 1) { - strcpy(*text, lines[0]); - freelist(&lines, linenum); - return *text; - } - char * newtext = (char *) malloc(strlen(*text) + 2 * linenum + 3 + 1); - if (newtext) { - free(*text); - *text = newtext; - } else { - freelist(&lines, linenum); - return *text; - } - strcpy(*text," ( "); - for (i = 0; i < linenum; i++) if (*(lines[i])) { - sprintf(*text + strlen(*text), "%s%s", lines[i], " | "); - } - (*text)[strlen(*text) - 2] = ')'; // " ) " - freelist(&lines, linenum); - return *text; -} - - // append s to ends of every lines in text - void strlinecat(char * dest, const char * s) - { - char * dup = mystrdup(dest); - char * source = dup; - int len = strlen(s); - if (dup) { - while (*source) { - if (*source == '\n') { - strncpy(dest, s, len); - dest += len; - } - *dest = *source; - source++; dest++; - } - strcpy(dest, s); - free(dup); - } - } - -// change \n to char c -char * tr(char * text, char oldc, char newc) { - char * p; - for (p = text; *p; p++) if (*p == oldc) *p = newc; - return text; -} - -// morphcmp(): compare MORPH_DERI_SFX, MORPH_INFL_SFX and MORPH_TERM_SFX fields -// in the first line of the inputs -// return 0, if inputs equal -// return 1, if inputs may equal with a secondary suffix -// otherwise return -1 -int morphcmp(const char * s, const char * t) -{ - int se = 0; - int te = 0; - const char * sl; - const char * tl; - const char * olds; - const char * oldt; - if (!s || !t) return 1; - olds = s; - sl = strchr(s, '\n'); - s = strstr(s, MORPH_DERI_SFX); - if (!s || (sl && sl < s)) s = strstr(olds, MORPH_INFL_SFX); - if (!s || (sl && sl < s)) { - s= strstr(olds, MORPH_TERM_SFX); - olds = NULL; - } - oldt = t; - tl = strchr(t, '\n'); - t = strstr(t, MORPH_DERI_SFX); - if (!t || (tl && tl < t)) t = strstr(oldt, MORPH_INFL_SFX); - if (!t || (tl && tl < t)) { - t = strstr(oldt, MORPH_TERM_SFX); - oldt = NULL; - } - while (s && t && (!sl || sl > s) && (!tl || tl > t)) { - s += MORPH_TAG_LEN; - t += MORPH_TAG_LEN; - se = 0; - te = 0; - while ((*s == *t) && !se && !te) { - s++; - t++; - switch(*s) { - case ' ': - case '\n': - case '\t': - case '\0': se = 1; - } - switch(*t) { - case ' ': - case '\n': - case '\t': - case '\0': te = 1; - } - } - if (!se || !te) { - // not terminal suffix difference - if (olds) return -1; - return 1; - } - olds = s; - s = strstr(s, MORPH_DERI_SFX); - if (!s || (sl && sl < s)) s = strstr(olds, MORPH_INFL_SFX); - if (!s || (sl && sl < s)) { - s = strstr(olds, MORPH_TERM_SFX); - olds = NULL; - } - oldt = t; - t = strstr(t, MORPH_DERI_SFX); - if (!t || (tl && tl < t)) t = strstr(oldt, MORPH_INFL_SFX); - if (!t || (tl && tl < t)) { - t = strstr(oldt, MORPH_TERM_SFX); - oldt = NULL; - } - } - if (!s && !t && se && te) return 0; - return 1; -} - -int get_sfxcount(const char * morph) -{ - if (!morph || !*morph) return 0; - int n = 0; - const char * old = morph; - morph = strstr(morph, MORPH_DERI_SFX); - if (!morph) morph = strstr(old, MORPH_INFL_SFX); - if (!morph) morph = strstr(old, MORPH_TERM_SFX); - while (morph) { - n++; - old = morph; - morph = strstr(morph + 1, MORPH_DERI_SFX); - if (!morph) morph = strstr(old + 1, MORPH_INFL_SFX); - if (!morph) morph = strstr(old + 1, MORPH_TERM_SFX); - } - return n; -} - - -int fieldlen(const char * r) -{ - int n = 0; - while (r && *r != ' ' && *r != '\t' && *r != '\0' && *r != '\n') { - r++; - n++; - } - return n; -} - -char * copy_field(char * dest, const char * morph, const char * var) -{ - if (!morph) return NULL; - const char * beg = strstr(morph, var); - if (beg) { - char * d = dest; - for (beg += MORPH_TAG_LEN; *beg != ' ' && *beg != '\t' && - *beg != '\n' && *beg != '\0'; d++, beg++) { - *d = *beg; - } - *d = '\0'; - return dest; - } - return NULL; -} - -char * mystrrep(char * word, const char * pat, const char * rep) { - char * pos = strstr(word, pat); - if (pos) { - int replen = strlen(rep); - int patlen = strlen(pat); - while (pos) { - if (replen < patlen) { - char * end = word + strlen(word); - char * next = pos + replen; - char * prev = pos + strlen(pat); - for (; prev < end; *next = *prev, prev++, next++); - *next = '\0'; - } else if (replen > patlen) { - char * end = pos + patlen; - char * next = word + strlen(word) + replen - patlen; - char * prev = next - replen + patlen; - for (; prev >= end; *next = *prev, prev--, next--); - } - strncpy(pos, rep, replen); - pos = strstr(word, pat); - } - } - return word; -} - - // reverse word - int reverseword(char * word) { - char r; - for (char * dest = word + strlen(word) - 1; word < dest; word++, dest--) { - r=*word; - *word = *dest; - *dest = r; - } - return 0; - } - - // reverse word (error: 1) - int reverseword_utf(char * word) { - w_char w[MAXWORDLEN]; - w_char * p; - w_char r; - int l = u8_u16(w, MAXWORDLEN, word); - if (l == -1) return 1; - p = w; - for (w_char * dest = w + l - 1; p < dest; p++, dest--) { - r=*p; - *p = *dest; - *dest = r; - } - u16_u8(word, MAXWORDUTF8LEN, w, l); - return 0; - } - - int uniqlist(char ** list, int n) { - int i; - if (n < 2) return n; - for (i = 0; i < n; i++) { - for (int j = 0; j < i; j++) { - if (list[j] && list[i] && (strcmp(list[j], list[i]) == 0)) { - free(list[i]); - list[i] = NULL; - break; - } - } - } - int m = 1; - for (i = 1; i < n; i++) if (list[i]) { - list[m] = list[i]; - m++; - } - return m; - } - - void freelist(char *** list, int n) { - if (list && *list && n > 0) { - for (int i = 0; i < n; i++) if ((*list)[i]) free((*list)[i]); - free(*list); - *list = NULL; - } - } - - // convert null terminated string to all caps - void mkallcap(char * p, const struct cs_info * csconv) - { - while (*p != '\0') { - *p = csconv[((unsigned char) *p)].cupper; - p++; - } - } - - // convert null terminated string to all little - void mkallsmall(char * p, const struct cs_info * csconv) - { - while (*p != '\0') { - *p = csconv[((unsigned char) *p)].clower; - p++; - } - } - -void mkallsmall_utf(w_char * u, int nc, int langnum) { - for (int i = 0; i < nc; i++) { - unsigned short idx = (u[i].h << 8) + u[i].l; - if (idx != unicodetolower(idx, langnum)) { - u[i].h = (unsigned char) (unicodetolower(idx, langnum) >> 8); - u[i].l = (unsigned char) (unicodetolower(idx, langnum) & 0x00FF); - } - } -} - -void mkallcap_utf(w_char * u, int nc, int langnum) { - for (int i = 0; i < nc; i++) { - unsigned short idx = (u[i].h << 8) + u[i].l; - if (idx != unicodetoupper(idx, langnum)) { - u[i].h = (unsigned char) (unicodetoupper(idx, langnum) >> 8); - u[i].l = (unsigned char) (unicodetoupper(idx, langnum) & 0x00FF); - } - } -} - - // convert null terminated string to have initial capital - void mkinitcap(char * p, const struct cs_info * csconv) - { - if (*p != '\0') *p = csconv[((unsigned char)*p)].cupper; - } - - // conversion function for protected memory - void store_pointer(char * dest, char * source) - { - memcpy(dest, &source, sizeof(char *)); - } - - // conversion function for protected memory - char * get_stored_pointer(const char * s) - { - char * p; - memcpy(&p, s, sizeof(char *)); - return p; - } - -#ifndef MOZILLA_CLIENT - // convert null terminated string to all caps using encoding - void enmkallcap(char * d, const char * p, const char * encoding) - - { - struct cs_info * csconv = get_current_cs(encoding); - while (*p != '\0') { - *d++ = csconv[((unsigned char) *p)].cupper; - p++; - } - *d = '\0'; - } - - // convert null terminated string to all little using encoding - void enmkallsmall(char * d, const char * p, const char * encoding) - { - struct cs_info * csconv = get_current_cs(encoding); - while (*p != '\0') { - *d++ = csconv[((unsigned char) *p)].clower; - p++; - } - *d = '\0'; - } - - // convert null terminated string to have initial capital using encoding - void enmkinitcap(char * d, const char * p, const char * encoding) - { - struct cs_info * csconv = get_current_cs(encoding); - memcpy(d,p,(strlen(p)+1)); - if (*p != '\0') *d= csconv[((unsigned char)*p)].cupper; - } - -// these are simple character mappings for the -// encodings supported -// supplying isupper, tolower, and toupper - -static struct cs_info iso1_tbl[] = { -{ 0x00, 0x00, 0x00 }, -{ 0x00, 0x01, 0x01 }, -{ 0x00, 0x02, 0x02 }, -{ 0x00, 0x03, 0x03 }, -{ 0x00, 0x04, 0x04 }, -{ 0x00, 0x05, 0x05 }, -{ 0x00, 0x06, 0x06 }, -{ 0x00, 0x07, 0x07 }, -{ 0x00, 0x08, 0x08 }, -{ 0x00, 0x09, 0x09 }, -{ 0x00, 0x0a, 0x0a }, -{ 0x00, 0x0b, 0x0b }, -{ 0x00, 0x0c, 0x0c }, -{ 0x00, 0x0d, 0x0d }, -{ 0x00, 0x0e, 0x0e }, -{ 0x00, 0x0f, 0x0f }, -{ 0x00, 0x10, 0x10 }, -{ 0x00, 0x11, 0x11 }, -{ 0x00, 0x12, 0x12 }, -{ 0x00, 0x13, 0x13 }, -{ 0x00, 0x14, 0x14 }, -{ 0x00, 0x15, 0x15 }, -{ 0x00, 0x16, 0x16 }, -{ 0x00, 0x17, 0x17 }, -{ 0x00, 0x18, 0x18 }, -{ 0x00, 0x19, 0x19 }, -{ 0x00, 0x1a, 0x1a }, -{ 0x00, 0x1b, 0x1b }, -{ 0x00, 0x1c, 0x1c }, -{ 0x00, 0x1d, 0x1d }, -{ 0x00, 0x1e, 0x1e }, -{ 0x00, 0x1f, 0x1f }, -{ 0x00, 0x20, 0x20 }, -{ 0x00, 0x21, 0x21 }, -{ 0x00, 0x22, 0x22 }, -{ 0x00, 0x23, 0x23 }, -{ 0x00, 0x24, 0x24 }, -{ 0x00, 0x25, 0x25 }, -{ 0x00, 0x26, 0x26 }, -{ 0x00, 0x27, 0x27 }, -{ 0x00, 0x28, 0x28 }, -{ 0x00, 0x29, 0x29 }, -{ 0x00, 0x2a, 0x2a }, -{ 0x00, 0x2b, 0x2b }, -{ 0x00, 0x2c, 0x2c }, -{ 0x00, 0x2d, 0x2d }, -{ 0x00, 0x2e, 0x2e }, -{ 0x00, 0x2f, 0x2f }, -{ 0x00, 0x30, 0x30 }, -{ 0x00, 0x31, 0x31 }, -{ 0x00, 0x32, 0x32 }, -{ 0x00, 0x33, 0x33 }, -{ 0x00, 0x34, 0x34 }, -{ 0x00, 0x35, 0x35 }, -{ 0x00, 0x36, 0x36 }, -{ 0x00, 0x37, 0x37 }, -{ 0x00, 0x38, 0x38 }, -{ 0x00, 0x39, 0x39 }, -{ 0x00, 0x3a, 0x3a }, -{ 0x00, 0x3b, 0x3b }, -{ 0x00, 0x3c, 0x3c }, -{ 0x00, 0x3d, 0x3d }, -{ 0x00, 0x3e, 0x3e }, -{ 0x00, 0x3f, 0x3f }, -{ 0x00, 0x40, 0x40 }, -{ 0x01, 0x61, 0x41 }, -{ 0x01, 0x62, 0x42 }, -{ 0x01, 0x63, 0x43 }, -{ 0x01, 0x64, 0x44 }, -{ 0x01, 0x65, 0x45 }, -{ 0x01, 0x66, 0x46 }, -{ 0x01, 0x67, 0x47 }, -{ 0x01, 0x68, 0x48 }, -{ 0x01, 0x69, 0x49 }, -{ 0x01, 0x6a, 0x4a }, -{ 0x01, 0x6b, 0x4b }, -{ 0x01, 0x6c, 0x4c }, -{ 0x01, 0x6d, 0x4d }, -{ 0x01, 0x6e, 0x4e }, -{ 0x01, 0x6f, 0x4f }, -{ 0x01, 0x70, 0x50 }, -{ 0x01, 0x71, 0x51 }, -{ 0x01, 0x72, 0x52 }, -{ 0x01, 0x73, 0x53 }, -{ 0x01, 0x74, 0x54 }, -{ 0x01, 0x75, 0x55 }, -{ 0x01, 0x76, 0x56 }, -{ 0x01, 0x77, 0x57 }, -{ 0x01, 0x78, 0x58 }, -{ 0x01, 0x79, 0x59 }, -{ 0x01, 0x7a, 0x5a }, -{ 0x00, 0x5b, 0x5b }, -{ 0x00, 0x5c, 0x5c }, -{ 0x00, 0x5d, 0x5d }, -{ 0x00, 0x5e, 0x5e }, -{ 0x00, 0x5f, 0x5f }, -{ 0x00, 0x60, 0x60 }, -{ 0x00, 0x61, 0x41 }, -{ 0x00, 0x62, 0x42 }, -{ 0x00, 0x63, 0x43 }, -{ 0x00, 0x64, 0x44 }, -{ 0x00, 0x65, 0x45 }, -{ 0x00, 0x66, 0x46 }, -{ 0x00, 0x67, 0x47 }, -{ 0x00, 0x68, 0x48 }, -{ 0x00, 0x69, 0x49 }, -{ 0x00, 0x6a, 0x4a }, -{ 0x00, 0x6b, 0x4b }, -{ 0x00, 0x6c, 0x4c }, -{ 0x00, 0x6d, 0x4d }, -{ 0x00, 0x6e, 0x4e }, -{ 0x00, 0x6f, 0x4f }, -{ 0x00, 0x70, 0x50 }, -{ 0x00, 0x71, 0x51 }, -{ 0x00, 0x72, 0x52 }, -{ 0x00, 0x73, 0x53 }, -{ 0x00, 0x74, 0x54 }, -{ 0x00, 0x75, 0x55 }, -{ 0x00, 0x76, 0x56 }, -{ 0x00, 0x77, 0x57 }, -{ 0x00, 0x78, 0x58 }, -{ 0x00, 0x79, 0x59 }, -{ 0x00, 0x7a, 0x5a }, -{ 0x00, 0x7b, 0x7b }, -{ 0x00, 0x7c, 0x7c }, -{ 0x00, 0x7d, 0x7d }, -{ 0x00, 0x7e, 0x7e }, -{ 0x00, 0x7f, 0x7f }, -{ 0x00, 0x80, 0x80 }, -{ 0x00, 0x81, 0x81 }, -{ 0x00, 0x82, 0x82 }, -{ 0x00, 0x83, 0x83 }, -{ 0x00, 0x84, 0x84 }, -{ 0x00, 0x85, 0x85 }, -{ 0x00, 0x86, 0x86 }, -{ 0x00, 0x87, 0x87 }, -{ 0x00, 0x88, 0x88 }, -{ 0x00, 0x89, 0x89 }, -{ 0x00, 0x8a, 0x8a }, -{ 0x00, 0x8b, 0x8b }, -{ 0x00, 0x8c, 0x8c }, -{ 0x00, 0x8d, 0x8d }, -{ 0x00, 0x8e, 0x8e }, -{ 0x00, 0x8f, 0x8f }, -{ 0x00, 0x90, 0x90 }, -{ 0x00, 0x91, 0x91 }, -{ 0x00, 0x92, 0x92 }, -{ 0x00, 0x93, 0x93 }, -{ 0x00, 0x94, 0x94 }, -{ 0x00, 0x95, 0x95 }, -{ 0x00, 0x96, 0x96 }, -{ 0x00, 0x97, 0x97 }, -{ 0x00, 0x98, 0x98 }, -{ 0x00, 0x99, 0x99 }, -{ 0x00, 0x9a, 0x9a }, -{ 0x00, 0x9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fb, 0xdb }, -{ 0x00, 0xfc, 0xdc }, -{ 0x00, 0xfd, 0xdd }, -{ 0x00, 0xfe, 0xde }, -{ 0x00, 0xff, 0xff } -}; - - -static struct cs_info iso2_tbl[] = { -{ 0x00, 0x00, 0x00 }, -{ 0x00, 0x01, 0x01 }, -{ 0x00, 0x02, 0x02 }, -{ 0x00, 0x03, 0x03 }, -{ 0x00, 0x04, 0x04 }, -{ 0x00, 0x05, 0x05 }, -{ 0x00, 0x06, 0x06 }, -{ 0x00, 0x07, 0x07 }, -{ 0x00, 0x08, 0x08 }, -{ 0x00, 0x09, 0x09 }, -{ 0x00, 0x0a, 0x0a }, -{ 0x00, 0x0b, 0x0b }, -{ 0x00, 0x0c, 0x0c }, -{ 0x00, 0x0d, 0x0d }, -{ 0x00, 0x0e, 0x0e }, -{ 0x00, 0x0f, 0x0f }, -{ 0x00, 0x10, 0x10 }, -{ 0x00, 0x11, 0x11 }, -{ 0x00, 0x12, 0x12 }, -{ 0x00, 0x13, 0x13 }, -{ 0x00, 0x14, 0x14 }, -{ 0x00, 0x15, 0x15 }, -{ 0x00, 0x16, 0x16 }, -{ 0x00, 0x17, 0x17 }, -{ 0x00, 0x18, 0x18 }, -{ 0x00, 0x19, 0x19 }, -{ 0x00, 0x1a, 0x1a }, -{ 0x00, 0x1b, 0x1b }, -{ 0x00, 0x1c, 0x1c }, -{ 0x00, 0x1d, 0x1d }, -{ 0x00, 0x1e, 0x1e }, -{ 0x00, 0x1f, 0x1f }, -{ 0x00, 0x20, 0x20 }, -{ 0x00, 0x21, 0x21 }, -{ 0x00, 0x22, 0x22 }, -{ 0x00, 0x23, 0x23 }, -{ 0x00, 0x24, 0x24 }, -{ 0x00, 0x25, 0x25 }, -{ 0x00, 0x26, 0x26 }, -{ 0x00, 0x27, 0x27 }, -{ 0x00, 0x28, 0x28 }, -{ 0x00, 0x29, 0x29 }, -{ 0x00, 0x2a, 0x2a }, -{ 0x00, 0x2b, 0x2b }, -{ 0x00, 0x2c, 0x2c }, -{ 0x00, 0x2d, 0x2d }, -{ 0x00, 0x2e, 0x2e }, -{ 0x00, 0x2f, 0x2f }, -{ 0x00, 0x30, 0x30 }, -{ 0x00, 0x31, 0x31 }, -{ 0x00, 0x32, 0x32 }, -{ 0x00, 0x33, 0x33 }, -{ 0x00, 0x34, 0x34 }, -{ 0x00, 0x35, 0x35 }, -{ 0x00, 0x36, 0x36 }, -{ 0x00, 0x37, 0x37 }, -{ 0x00, 0x38, 0x38 }, -{ 0x00, 0x39, 0x39 }, -{ 0x00, 0x3a, 0x3a }, -{ 0x00, 0x3b, 0x3b }, -{ 0x00, 0x3c, 0x3c }, -{ 0x00, 0x3d, 0x3d }, -{ 0x00, 0x3e, 0x3e }, -{ 0x00, 0x3f, 0x3f }, -{ 0x00, 0x40, 0x40 }, -{ 0x01, 0x61, 0x41 }, -{ 0x01, 0x62, 0x42 }, -{ 0x01, 0x63, 0x43 }, -{ 0x01, 0x64, 0x44 }, -{ 0x01, 0x65, 0x45 }, -{ 0x01, 0x66, 0x46 }, -{ 0x01, 0x67, 0x47 }, -{ 0x01, 0x68, 0x48 }, -{ 0x01, 0x69, 0x49 }, -{ 0x01, 0x6a, 0x4a }, -{ 0x01, 0x6b, 0x4b }, -{ 0x01, 0x6c, 0x4c }, -{ 0x01, 0x6d, 0x4d }, -{ 0x01, 0x6e, 0x4e }, -{ 0x01, 0x6f, 0x4f }, -{ 0x01, 0x70, 0x50 }, -{ 0x01, 0x71, 0x51 }, -{ 0x01, 0x72, 0x52 }, -{ 0x01, 0x73, 0x53 }, -{ 0x01, 0x74, 0x54 }, -{ 0x01, 0x75, 0x55 }, -{ 0x01, 0x76, 0x56 }, -{ 0x01, 0x77, 0x57 }, -{ 0x01, 0x78, 0x58 }, -{ 0x01, 0x79, 0x59 }, -{ 0x01, 0x7a, 0x5a }, -{ 0x00, 0x5b, 0x5b }, -{ 0x00, 0x5c, 0x5c }, -{ 0x00, 0x5d, 0x5d }, -{ 0x00, 0x5e, 0x5e }, -{ 0x00, 0x5f, 0x5f }, -{ 0x00, 0x60, 0x60 }, -{ 0x00, 0x61, 0x41 }, -{ 0x00, 0x62, 0x42 }, -{ 0x00, 0x63, 0x43 }, -{ 0x00, 0x64, 0x44 }, -{ 0x00, 0x65, 0x45 }, -{ 0x00, 0x66, 0x46 }, -{ 0x00, 0x67, 0x47 }, -{ 0x00, 0x68, 0x48 }, -{ 0x00, 0x69, 0x49 }, -{ 0x00, 0x6a, 0x4a }, -{ 0x00, 0x6b, 0x4b }, -{ 0x00, 0x6c, 0x4c }, -{ 0x00, 0x6d, 0x4d }, -{ 0x00, 0x6e, 0x4e }, -{ 0x00, 0x6f, 0x4f }, -{ 0x00, 0x70, 0x50 }, -{ 0x00, 0x71, 0x51 }, -{ 0x00, 0x72, 0x52 }, -{ 0x00, 0x73, 0x53 }, -{ 0x00, 0x74, 0x54 }, -{ 0x00, 0x75, 0x55 }, -{ 0x00, 0x76, 0x56 }, -{ 0x00, 0x77, 0x57 }, -{ 0x00, 0x78, 0x58 }, -{ 0x00, 0x79, 0x59 }, -{ 0x00, 0x7a, 0x5a }, -{ 0x00, 0x7b, 0x7b }, -{ 0x00, 0x7c, 0x7c }, -{ 0x00, 0x7d, 0x7d }, -{ 0x00, 0x7e, 0x7e }, -{ 0x00, 0x7f, 0x7f }, -{ 0x00, 0x80, 0x80 }, -{ 0x00, 0x81, 0x81 }, -{ 0x00, 0x82, 0x82 }, -{ 0x00, 0x83, 0x83 }, -{ 0x00, 0x84, 0x84 }, -{ 0x00, 0x85, 0x85 }, -{ 0x00, 0x86, 0x86 }, -{ 0x00, 0x87, 0x87 }, -{ 0x00, 0x88, 0x88 }, -{ 0x00, 0x89, 0x89 }, -{ 0x00, 0x8a, 0x8a }, -{ 0x00, 0x8b, 0x8b }, -{ 0x00, 0x8c, 0x8c }, -{ 0x00, 0x8d, 0x8d }, -{ 0x00, 0x8e, 0x8e }, -{ 0x00, 0x8f, 0x8f }, -{ 0x00, 0x90, 0x90 }, -{ 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}, -{ 0x00, 0xf2, 0xd2 }, -{ 0x00, 0xf3, 0xd3 }, -{ 0x00, 0xf4, 0xd4 }, -{ 0x00, 0xf5, 0xd5 }, -{ 0x00, 0xf6, 0xd6 }, -{ 0x00, 0xf7, 0xf7 }, -{ 0x00, 0xf8, 0xd8 }, -{ 0x00, 0xf9, 0xd9 }, -{ 0x00, 0xfa, 0xda }, -{ 0x00, 0xfb, 0xdb }, -{ 0x00, 0xfc, 0xdc }, -{ 0x00, 0xfd, 0xdd }, -{ 0x00, 0xfe, 0xde }, -{ 0x00, 0xff, 0xff } -}; - - -static struct cs_info iso3_tbl[] = { -{ 0x00, 0x00, 0x00 }, -{ 0x00, 0x01, 0x01 }, -{ 0x00, 0x02, 0x02 }, -{ 0x00, 0x03, 0x03 }, -{ 0x00, 0x04, 0x04 }, -{ 0x00, 0x05, 0x05 }, -{ 0x00, 0x06, 0x06 }, -{ 0x00, 0x07, 0x07 }, -{ 0x00, 0x08, 0x08 }, -{ 0x00, 0x09, 0x09 }, -{ 0x00, 0x0a, 0x0a }, -{ 0x00, 0x0b, 0x0b }, -{ 0x00, 0x0c, 0x0c }, -{ 0x00, 0x0d, 0x0d }, -{ 0x00, 0x0e, 0x0e }, -{ 0x00, 0x0f, 0x0f }, -{ 0x00, 0x10, 0x10 }, -{ 0x00, 0x11, 0x11 }, -{ 0x00, 0x12, 0x12 }, -{ 0x00, 0x13, 0x13 }, -{ 0x00, 0x14, 0x14 }, -{ 0x00, 0x15, 0x15 }, -{ 0x00, 0x16, 0x16 }, -{ 0x00, 0x17, 0x17 }, -{ 0x00, 0x18, 0x18 }, -{ 0x00, 0x19, 0x19 }, -{ 0x00, 0x1a, 0x1a }, -{ 0x00, 0x1b, 0x1b }, -{ 0x00, 0x1c, 0x1c }, -{ 0x00, 0x1d, 0x1d }, -{ 0x00, 0x1e, 0x1e }, -{ 0x00, 0x1f, 0x1f }, -{ 0x00, 0x20, 0x20 }, -{ 0x00, 0x21, 0x21 }, -{ 0x00, 0x22, 0x22 }, -{ 0x00, 0x23, 0x23 }, -{ 0x00, 0x24, 0x24 }, -{ 0x00, 0x25, 0x25 }, -{ 0x00, 0x26, 0x26 }, -{ 0x00, 0x27, 0x27 }, -{ 0x00, 0x28, 0x28 }, -{ 0x00, 0x29, 0x29 }, -{ 0x00, 0x2a, 0x2a }, -{ 0x00, 0x2b, 0x2b }, -{ 0x00, 0x2c, 0x2c }, -{ 0x00, 0x2d, 0x2d }, -{ 0x00, 0x2e, 0x2e }, -{ 0x00, 0x2f, 0x2f }, -{ 0x00, 0x30, 0x30 }, -{ 0x00, 0x31, 0x31 }, -{ 0x00, 0x32, 0x32 }, -{ 0x00, 0x33, 0x33 }, -{ 0x00, 0x34, 0x34 }, -{ 0x00, 0x35, 0x35 }, -{ 0x00, 0x36, 0x36 }, -{ 0x00, 0x37, 0x37 }, -{ 0x00, 0x38, 0x38 }, -{ 0x00, 0x39, 0x39 }, -{ 0x00, 0x3a, 0x3a }, -{ 0x00, 0x3b, 0x3b }, -{ 0x00, 0x3c, 0x3c }, -{ 0x00, 0x3d, 0x3d }, -{ 0x00, 0x3e, 0x3e }, -{ 0x00, 0x3f, 0x3f }, -{ 0x00, 0x40, 0x40 }, -{ 0x01, 0x61, 0x41 }, -{ 0x01, 0x62, 0x42 }, -{ 0x01, 0x63, 0x43 }, -{ 0x01, 0x64, 0x44 }, -{ 0x01, 0x65, 0x45 }, -{ 0x01, 0x66, 0x46 }, -{ 0x01, 0x67, 0x47 }, -{ 0x01, 0x68, 0x48 }, -{ 0x01, 0x69, 0x49 }, -{ 0x01, 0x6a, 0x4a }, -{ 0x01, 0x6b, 0x4b }, -{ 0x01, 0x6c, 0x4c }, -{ 0x01, 0x6d, 0x4d }, -{ 0x01, 0x6e, 0x4e }, -{ 0x01, 0x6f, 0x4f }, -{ 0x01, 0x70, 0x50 }, -{ 0x01, 0x71, 0x51 }, -{ 0x01, 0x72, 0x52 }, -{ 0x01, 0x73, 0x53 }, -{ 0x01, 0x74, 0x54 }, -{ 0x01, 0x75, 0x55 }, -{ 0x01, 0x76, 0x56 }, -{ 0x01, 0x77, 0x57 }, -{ 0x01, 0x78, 0x58 }, -{ 0x01, 0x79, 0x59 }, -{ 0x01, 0x7a, 0x5a }, -{ 0x00, 0x5b, 0x5b }, -{ 0x00, 0x5c, 0x5c }, -{ 0x00, 0x5d, 0x5d }, -{ 0x00, 0x5e, 0x5e }, -{ 0x00, 0x5f, 0x5f }, -{ 0x00, 0x60, 0x60 }, -{ 0x00, 0x61, 0x41 }, -{ 0x00, 0x62, 0x42 }, -{ 0x00, 0x63, 0x43 }, -{ 0x00, 0x64, 0x44 }, -{ 0x00, 0x65, 0x45 }, -{ 0x00, 0x66, 0x46 }, -{ 0x00, 0x67, 0x47 }, -{ 0x00, 0x68, 0x48 }, -{ 0x00, 0x69, 0x49 }, -{ 0x00, 0x6a, 0x4a }, -{ 0x00, 0x6b, 0x4b }, -{ 0x00, 0x6c, 0x4c }, -{ 0x00, 0x6d, 0x4d }, -{ 0x00, 0x6e, 0x4e }, -{ 0x00, 0x6f, 0x4f }, -{ 0x00, 0x70, 0x50 }, -{ 0x00, 0x71, 0x51 }, -{ 0x00, 0x72, 0x52 }, -{ 0x00, 0x73, 0x53 }, -{ 0x00, 0x74, 0x54 }, -{ 0x00, 0x75, 0x55 }, -{ 0x00, 0x76, 0x56 }, -{ 0x00, 0x77, 0x57 }, -{ 0x00, 0x78, 0x58 }, -{ 0x00, 0x79, 0x59 }, -{ 0x00, 0x7a, 0x5a }, -{ 0x00, 0x7b, 0x7b }, -{ 0x00, 0x7c, 0x7c }, -{ 0x00, 0x7d, 0x7d }, -{ 0x00, 0x7e, 0x7e }, -{ 0x00, 0x7f, 0x7f }, -{ 0x00, 0x80, 0x80 }, -{ 0x00, 0x81, 0x81 }, -{ 0x00, 0x82, 0x82 }, -{ 0x00, 0x83, 0x83 }, -{ 0x00, 0x84, 0x84 }, -{ 0x00, 0x85, 0x85 }, -{ 0x00, 0x86, 0x86 }, -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}, -{ 0x00, 0xe8, 0xc8 }, -{ 0x00, 0xe9, 0xc9 }, -{ 0x00, 0xea, 0xca }, -{ 0x00, 0xeb, 0xcb }, -{ 0x00, 0xec, 0xcc }, -{ 0x00, 0xed, 0xcd }, -{ 0x00, 0xee, 0xce }, -{ 0x00, 0xef, 0xcf }, -{ 0x00, 0xf0, 0xf0 }, -{ 0x00, 0xf1, 0xd1 }, -{ 0x00, 0xf2, 0xd2 }, -{ 0x00, 0xf3, 0xd3 }, -{ 0x00, 0xf4, 0xd4 }, -{ 0x00, 0xf5, 0xd5 }, -{ 0x00, 0xf6, 0xd6 }, -{ 0x00, 0xf7, 0xf7 }, -{ 0x00, 0xf8, 0xd8 }, -{ 0x00, 0xf9, 0xd9 }, -{ 0x00, 0xfa, 0xda }, -{ 0x00, 0xfb, 0xdb }, -{ 0x00, 0xfc, 0xdc }, -{ 0x00, 0xfd, 0xdd }, -{ 0x00, 0xfe, 0xde }, -{ 0x00, 0xff, 0xff } -}; - -static struct cs_info iso4_tbl[] = { -{ 0x00, 0x00, 0x00 }, -{ 0x00, 0x01, 0x01 }, -{ 0x00, 0x02, 0x02 }, -{ 0x00, 0x03, 0x03 }, -{ 0x00, 0x04, 0x04 }, -{ 0x00, 0x05, 0x05 }, -{ 0x00, 0x06, 0x06 }, -{ 0x00, 0x07, 0x07 }, -{ 0x00, 0x08, 0x08 }, -{ 0x00, 0x09, 0x09 }, -{ 0x00, 0x0a, 0x0a }, -{ 0x00, 0x0b, 0x0b }, -{ 0x00, 0x0c, 0x0c }, -{ 0x00, 0x0d, 0x0d }, -{ 0x00, 0x0e, 0x0e }, -{ 0x00, 0x0f, 0x0f }, -{ 0x00, 0x10, 0x10 }, -{ 0x00, 0x11, 0x11 }, -{ 0x00, 0x12, 0x12 }, -{ 0x00, 0x13, 0x13 }, -{ 0x00, 0x14, 0x14 }, -{ 0x00, 0x15, 0x15 }, -{ 0x00, 0x16, 0x16 }, -{ 0x00, 0x17, 0x17 }, -{ 0x00, 0x18, 0x18 }, -{ 0x00, 0x19, 0x19 }, -{ 0x00, 0x1a, 0x1a }, -{ 0x00, 0x1b, 0x1b }, -{ 0x00, 0x1c, 0x1c }, -{ 0x00, 0x1d, 0x1d }, -{ 0x00, 0x1e, 0x1e }, -{ 0x00, 0x1f, 0x1f }, -{ 0x00, 0x20, 0x20 }, -{ 0x00, 0x21, 0x21 }, -{ 0x00, 0x22, 0x22 }, -{ 0x00, 0x23, 0x23 }, -{ 0x00, 0x24, 0x24 }, -{ 0x00, 0x25, 0x25 }, -{ 0x00, 0x26, 0x26 }, -{ 0x00, 0x27, 0x27 }, -{ 0x00, 0x28, 0x28 }, -{ 0x00, 0x29, 0x29 }, -{ 0x00, 0x2a, 0x2a }, -{ 0x00, 0x2b, 0x2b }, -{ 0x00, 0x2c, 0x2c }, -{ 0x00, 0x2d, 0x2d }, -{ 0x00, 0x2e, 0x2e }, -{ 0x00, 0x2f, 0x2f }, -{ 0x00, 0x30, 0x30 }, -{ 0x00, 0x31, 0x31 }, -{ 0x00, 0x32, 0x32 }, -{ 0x00, 0x33, 0x33 }, -{ 0x00, 0x34, 0x34 }, -{ 0x00, 0x35, 0x35 }, -{ 0x00, 0x36, 0x36 }, -{ 0x00, 0x37, 0x37 }, -{ 0x00, 0x38, 0x38 }, -{ 0x00, 0x39, 0x39 }, -{ 0x00, 0x3a, 0x3a }, -{ 0x00, 0x3b, 0x3b }, -{ 0x00, 0x3c, 0x3c }, -{ 0x00, 0x3d, 0x3d }, -{ 0x00, 0x3e, 0x3e }, -{ 0x00, 0x3f, 0x3f }, -{ 0x00, 0x40, 0x40 }, -{ 0x01, 0x61, 0x41 }, -{ 0x01, 0x62, 0x42 }, -{ 0x01, 0x63, 0x43 }, -{ 0x01, 0x64, 0x44 }, -{ 0x01, 0x65, 0x45 }, -{ 0x01, 0x66, 0x46 }, -{ 0x01, 0x67, 0x47 }, -{ 0x01, 0x68, 0x48 }, -{ 0x01, 0x69, 0x49 }, -{ 0x01, 0x6a, 0x4a }, -{ 0x01, 0x6b, 0x4b }, -{ 0x01, 0x6c, 0x4c }, -{ 0x01, 0x6d, 0x4d }, -{ 0x01, 0x6e, 0x4e }, -{ 0x01, 0x6f, 0x4f }, -{ 0x01, 0x70, 0x50 }, -{ 0x01, 0x71, 0x51 }, -{ 0x01, 0x72, 0x52 }, -{ 0x01, 0x73, 0x53 }, -{ 0x01, 0x74, 0x54 }, -{ 0x01, 0x75, 0x55 }, -{ 0x01, 0x76, 0x56 }, -{ 0x01, 0x77, 0x57 }, -{ 0x01, 0x78, 0x58 }, -{ 0x01, 0x79, 0x59 }, -{ 0x01, 0x7a, 0x5a }, -{ 0x00, 0x5b, 0x5b }, -{ 0x00, 0x5c, 0x5c }, -{ 0x00, 0x5d, 0x5d }, -{ 0x00, 0x5e, 0x5e }, -{ 0x00, 0x5f, 0x5f }, -{ 0x00, 0x60, 0x60 }, -{ 0x00, 0x61, 0x41 }, -{ 0x00, 0x62, 0x42 }, -{ 0x00, 0x63, 0x43 }, -{ 0x00, 0x64, 0x44 }, -{ 0x00, 0x65, 0x45 }, -{ 0x00, 0x66, 0x46 }, -{ 0x00, 0x67, 0x47 }, -{ 0x00, 0x68, 0x48 }, -{ 0x00, 0x69, 0x49 }, -{ 0x00, 0x6a, 0x4a }, -{ 0x00, 0x6b, 0x4b }, -{ 0x00, 0x6c, 0x4c }, -{ 0x00, 0x6d, 0x4d }, -{ 0x00, 0x6e, 0x4e }, -{ 0x00, 0x6f, 0x4f }, -{ 0x00, 0x70, 0x50 }, -{ 0x00, 0x71, 0x51 }, -{ 0x00, 0x72, 0x52 }, -{ 0x00, 0x73, 0x53 }, -{ 0x00, 0x74, 0x54 }, -{ 0x00, 0x75, 0x55 }, -{ 0x00, 0x76, 0x56 }, -{ 0x00, 0x77, 0x57 }, -{ 0x00, 0x78, 0x58 }, -{ 0x00, 0x79, 0x59 }, -{ 0x00, 0x7a, 0x5a }, -{ 0x00, 0x7b, 0x7b }, -{ 0x00, 0x7c, 0x7c }, -{ 0x00, 0x7d, 0x7d }, -{ 0x00, 0x7e, 0x7e }, -{ 0x00, 0x7f, 0x7f }, -{ 0x00, 0x80, 0x80 }, -{ 0x00, 0x81, 0x81 }, -{ 0x00, 0x82, 0x82 }, -{ 0x00, 0x83, 0x83 }, -{ 0x00, 0x84, 0x84 }, -{ 0x00, 0x85, 0x85 }, -{ 0x00, 0x86, 0x86 }, -{ 0x00, 0x87, 0x87 }, -{ 0x00, 0x88, 0x88 }, -{ 0x00, 0x89, 0x89 }, -{ 0x00, 0x8a, 0x8a }, -{ 0x00, 0x8b, 0x8b }, -{ 0x00, 0x8c, 0x8c }, -{ 0x00, 0x8d, 0x8d }, -{ 0x00, 0x8e, 0x8e }, -{ 0x00, 0x8f, 0x8f }, -{ 0x00, 0x90, 0x90 }, -{ 0x00, 0x91, 0x91 }, -{ 0x00, 0x92, 0x92 }, -{ 0x00, 0x93, 0x93 }, -{ 0x00, 0x94, 0x94 }, -{ 0x00, 0x95, 0x95 }, -{ 0x00, 0x96, 0x96 }, -{ 0x00, 0x97, 0x97 }, -{ 0x00, 0x98, 0x98 }, -{ 0x00, 0x99, 0x99 }, -{ 0x00, 0x9a, 0x9a }, -{ 0x00, 0x9b, 0x9b }, -{ 0x00, 0x9c, 0x9c }, -{ 0x00, 0x9d, 0x9d }, -{ 0x00, 0x9e, 0x9e }, -{ 0x00, 0x9f, 0x9f }, -{ 0x00, 0xa0, 0xa0 }, -{ 0x01, 0xb1, 0xa1 }, -{ 0x00, 0xa2, 0xa2 }, -{ 0x01, 0xb3, 0xa3 }, -{ 0x00, 0xa4, 0xa4 }, -{ 0x01, 0xb5, 0xa5 }, -{ 0x01, 0xb6, 0xa6 }, -{ 0x00, 0xa7, 0xa7 }, -{ 0x00, 0xa8, 0xa8 }, -{ 0x01, 0xb9, 0xa9 }, -{ 0x01, 0xba, 0xaa }, -{ 0x01, 0xbb, 0xab }, -{ 0x01, 0xbc, 0xac }, -{ 0x00, 0xad, 0xad }, -{ 0x01,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, 0xfe, 0xde }, -{ 0x00, 0xdf, 0xdf }, -{ 0x00, 0xe0, 0xc0 }, -{ 0x00, 0xe1, 0xc1 }, -{ 0x00, 0xe2, 0xc2 }, -{ 0x00, 0xe3, 0xc3 }, -{ 0x00, 0xe4, 0xc4 }, -{ 0x00, 0xe5, 0xc5 }, -{ 0x00, 0xe6, 0xc6 }, -{ 0x00, 0xe7, 0xc7 }, -{ 0x00, 0xe8, 0xc8 }, -{ 0x00, 0xe9, 0xc9 }, -{ 0x00, 0xea, 0xca }, -{ 0x00, 0xeb, 0xcb }, -{ 0x00, 0xec, 0xcc }, -{ 0x00, 0xed, 0xcd }, -{ 0x00, 0xee, 0xce }, -{ 0x00, 0xef, 0xcf }, -{ 0x00, 0xf0, 0xd0 }, -{ 0x00, 0xf1, 0xd1 }, -{ 0x00, 0xf2, 0xd2 }, -{ 0x00, 0xf3, 0xd3 }, -{ 0x00, 0xf4, 0xd4 }, -{ 0x00, 0xf5, 0xd5 }, -{ 0x00, 0xf6, 0xd6 }, -{ 0x00, 0xf7, 0xf7 }, -{ 0x00, 0xf8, 0xd8 }, -{ 0x00, 0xf9, 0xd9 }, -{ 0x00, 0xfa, 0xda }, -{ 0x00, 0xfb, 0xdb }, -{ 0x00, 0xfc, 0xdc }, -{ 0x00, 0xfd, 0xdd }, -{ 0x00, 0xfe, 0xde }, -{ 0x00, 0xff, 0xff } -}; - -static struct cs_info iso5_tbl[] = { -{ 0x00, 0x00, 0x00 }, -{ 0x00, 0x01, 0x01 }, -{ 0x00, 0x02, 0x02 }, -{ 0x00, 0x03, 0x03 }, -{ 0x00, 0x04, 0x04 }, -{ 0x00, 0x05, 0x05 }, -{ 0x00, 0x06, 0x06 }, -{ 0x00, 0x07, 0x07 }, -{ 0x00, 0x08, 0x08 }, -{ 0x00, 0x09, 0x09 }, -{ 0x00, 0x0a, 0x0a }, -{ 0x00, 0x0b, 0x0b }, -{ 0x00, 0x0c, 0x0c }, -{ 0x00, 0x0d, 0x0d }, -{ 0x00, 0x0e, 0x0e }, -{ 0x00, 0x0f, 0x0f }, -{ 0x00, 0x10, 0x10 }, -{ 0x00, 0x11, 0x11 }, -{ 0x00, 0x12, 0x12 }, -{ 0x00, 0x13, 0x13 }, -{ 0x00, 0x14, 0x14 }, -{ 0x00, 0x15, 0x15 }, -{ 0x00, 0x16, 0x16 }, -{ 0x00, 0x17, 0x17 }, -{ 0x00, 0x18, 0x18 }, -{ 0x00, 0x19, 0x19 }, -{ 0x00, 0x1a, 0x1a }, -{ 0x00, 0x1b, 0x1b }, -{ 0x00, 0x1c, 0x1c }, -{ 0x00, 0x1d, 0x1d }, -{ 0x00, 0x1e, 0x1e }, -{ 0x00, 0x1f, 0x1f }, -{ 0x00, 0x20, 0x20 }, -{ 0x00, 0x21, 0x21 }, -{ 0x00, 0x22, 0x22 }, -{ 0x00, 0x23, 0x23 }, -{ 0x00, 0x24, 0x24 }, -{ 0x00, 0x25, 0x25 }, -{ 0x00, 0x26, 0x26 }, -{ 0x00, 0x27, 0x27 }, -{ 0x00, 0x28, 0x28 }, -{ 0x00, 0x29, 0x29 }, -{ 0x00, 0x2a, 0x2a }, -{ 0x00, 0x2b, 0x2b }, -{ 0x00, 0x2c, 0x2c }, -{ 0x00, 0x2d, 0x2d }, -{ 0x00, 0x2e, 0x2e }, -{ 0x00, 0x2f, 0x2f }, -{ 0x00, 0x30, 0x30 }, -{ 0x00, 0x31, 0x31 }, -{ 0x00, 0x32, 0x32 }, -{ 0x00, 0x33, 0x33 }, -{ 0x00, 0x34, 0x34 }, -{ 0x00, 0x35, 0x35 }, -{ 0x00, 0x36, 0x36 }, -{ 0x00, 0x37, 0x37 }, -{ 0x00, 0x38, 0x38 }, -{ 0x00, 0x39, 0x39 }, -{ 0x00, 0x3a, 0x3a }, -{ 0x00, 0x3b, 0x3b }, -{ 0x00, 0x3c, 0x3c }, -{ 0x00, 0x3d, 0x3d }, -{ 0x00, 0x3e, 0x3e }, -{ 0x00, 0x3f, 0x3f }, -{ 0x00, 0x40, 0x40 }, -{ 0x01, 0x61, 0x41 }, -{ 0x01, 0x62, 0x42 }, -{ 0x01, 0x63, 0x43 }, -{ 0x01, 0x64, 0x44 }, -{ 0x01, 0x65, 0x45 }, -{ 0x01, 0x66, 0x46 }, -{ 0x01, 0x67, 0x47 }, -{ 0x01, 0x68, 0x48 }, -{ 0x01, 0x69, 0x49 }, -{ 0x01, 0x6a, 0x4a }, -{ 0x01, 0x6b, 0x4b }, -{ 0x01, 0x6c, 0x4c }, -{ 0x01, 0x6d, 0x4d }, -{ 0x01, 0x6e, 0x4e }, -{ 0x01, 0x6f, 0x4f }, -{ 0x01, 0x70, 0x50 }, -{ 0x01, 0x71, 0x51 }, -{ 0x01, 0x72, 0x52 }, -{ 0x01, 0x73, 0x53 }, -{ 0x01, 0x74, 0x54 }, -{ 0x01, 0x75, 0x55 }, -{ 0x01, 0x76, 0x56 }, -{ 0x01, 0x77, 0x57 }, -{ 0x01, 0x78, 0x58 }, -{ 0x01, 0x79, 0x59 }, -{ 0x01, 0x7a, 0x5a }, -{ 0x00, 0x5b, 0x5b }, -{ 0x00, 0x5c, 0x5c }, -{ 0x00, 0x5d, 0x5d }, -{ 0x00, 0x5e, 0x5e }, -{ 0x00, 0x5f, 0x5f }, -{ 0x00, 0x60, 0x60 }, -{ 0x00, 0x61, 0x41 }, -{ 0x00, 0x62, 0x42 }, -{ 0x00, 0x63, 0x43 }, -{ 0x00, 0x64, 0x44 }, -{ 0x00, 0x65, 0x45 }, -{ 0x00, 0x66, 0x46 }, -{ 0x00, 0x67, 0x47 }, -{ 0x00, 0x68, 0x48 }, -{ 0x00, 0x69, 0x49 }, -{ 0x00, 0x6a, 0x4a }, -{ 0x00, 0x6b, 0x4b }, -{ 0x00, 0x6c, 0x4c }, -{ 0x00, 0x6d, 0x4d }, -{ 0x00, 0x6e, 0x4e }, -{ 0x00, 0x6f, 0x4f }, -{ 0x00, 0x70, 0x50 }, -{ 0x00, 0x71, 0x51 }, -{ 0x00, 0x72, 0x52 }, -{ 0x00, 0x73, 0x53 }, -{ 0x00, 0x74, 0x54 }, -{ 0x00, 0x75, 0x55 }, -{ 0x00, 0x76, 0x56 }, -{ 0x00, 0x77, 0x57 }, -{ 0x00, 0x78, 0x58 }, -{ 0x00, 0x79, 0x59 }, -{ 0x00, 0x7a, 0x5a }, -{ 0x00, 0x7b, 0x7b }, -{ 0x00, 0x7c, 0x7c }, -{ 0x00, 0x7d, 0x7d }, -{ 0x00, 0x7e, 0x7e }, -{ 0x00, 0x7f, 0x7f }, -{ 0x00, 0x80, 0x80 }, -{ 0x00, 0x81, 0x81 }, -{ 0x00, 0x82, 0x82 }, -{ 0x00, 0x83, 0x83 }, -{ 0x00, 0x84, 0x84 }, -{ 0x00, 0x85, 0x85 }, -{ 0x00, 0x86, 0x86 }, -{ 0x00, 0x87, 0x87 }, -{ 0x00, 0x88, 0x88 }, -{ 0x00, 0x89, 0x89 }, -{ 0x00, 0x8a, 0x8a }, -{ 0x00, 0x8b, 0x8b }, -{ 0x00, 0x8c, 0x8c }, -{ 0x00, 0x8d, 0x8d }, -{ 0x00, 0x8e, 0x8e }, -{ 0x00, 0x8f, 0x8f }, -{ 0x00, 0x90, 0x90 }, -{ 0x00, 0x91, 0x91 }, -{ 0x00, 0x92, 0x92 }, -{ 0x00, 0x93, 0x93 }, -{ 0x00, 0x94, 0x94 }, -{ 0x00, 0x95, 0x95 }, -{ 0x00, 0x96, 0x96 }, -{ 0x00, 0x97, 0x97 }, -{ 0x00, 0x98, 0x98 }, -{ 0x00, 0x99, 0x99 }, -{ 0x00, 0x9a, 0x9a }, -{ 0x00, 0x9b, 0x9b }, -{ 0x00, 0x9c, 0x9c }, -{ 0x00, 0x9d, 0x9d }, -{ 0x00, 0x9e, 0x9e }, -{ 0x00, 0x9f, 0x9f }, -{ 0x00, 0xa0, 0xa0 }, -{ 0x01, 0xf1, 0xa1 }, -{ 0x01, 0xf2, 0xa2 }, -{ 0x01, 0xf3, 0xa3 }, -{ 0x01, 0x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, 0xb4 }, -{ 0x00, 0xd5, 0xb5 }, -{ 0x00, 0xd6, 0xb6 }, -{ 0x00, 0xd7, 0xb7 }, -{ 0x00, 0xd8, 0xb8 }, -{ 0x00, 0xd9, 0xb9 }, -{ 0x00, 0xda, 0xba }, -{ 0x00, 0xdb, 0xbb }, -{ 0x00, 0xdc, 0xbc }, -{ 0x00, 0xdd, 0xbd }, -{ 0x00, 0xde, 0xbe }, -{ 0x00, 0xdf, 0xbf }, -{ 0x00, 0xe0, 0xc0 }, -{ 0x00, 0xe1, 0xc1 }, -{ 0x00, 0xe2, 0xc2 }, -{ 0x00, 0xe3, 0xc3 }, -{ 0x00, 0xe4, 0xc4 }, -{ 0x00, 0xe5, 0xc5 }, -{ 0x00, 0xe6, 0xc6 }, -{ 0x00, 0xe7, 0xc7 }, -{ 0x00, 0xe8, 0xc8 }, -{ 0x00, 0xe9, 0xc9 }, -{ 0x00, 0xea, 0xca }, -{ 0x00, 0xeb, 0xcb }, -{ 0x00, 0xec, 0xcc }, -{ 0x00, 0xed, 0xcd }, -{ 0x00, 0xee, 0xce }, -{ 0x00, 0xef, 0xcf }, -{ 0x00, 0xf0, 0xf0 }, -{ 0x00, 0xf1, 0xa1 }, -{ 0x00, 0xf2, 0xa2 }, -{ 0x00, 0xf3, 0xa3 }, -{ 0x00, 0xf4, 0xa4 }, -{ 0x00, 0xf5, 0xa5 }, -{ 0x00, 0xf6, 0xa6 }, -{ 0x00, 0xf7, 0xa7 }, -{ 0x00, 0xf8, 0xa8 }, -{ 0x00, 0xf9, 0xa9 }, -{ 0x00, 0xfa, 0xaa }, -{ 0x00, 0xfb, 0xab }, -{ 0x00, 0xfc, 0xac }, -{ 0x00, 0xfd, 0xfd }, -{ 0x00, 0xfe, 0xae }, -{ 0x00, 0xff, 0xaf } -}; - -static struct cs_info iso6_tbl[] = { -{ 0x00, 0x00, 0x00 }, -{ 0x00, 0x01, 0x01 }, -{ 0x00, 0x02, 0x02 }, -{ 0x00, 0x03, 0x03 }, -{ 0x00, 0x04, 0x04 }, -{ 0x00, 0x05, 0x05 }, -{ 0x00, 0x06, 0x06 }, -{ 0x00, 0x07, 0x07 }, -{ 0x00, 0x08, 0x08 }, -{ 0x00, 0x09, 0x09 }, -{ 0x00, 0x0a, 0x0a }, -{ 0x00, 0x0b, 0x0b }, -{ 0x00, 0x0c, 0x0c }, -{ 0x00, 0x0d, 0x0d }, -{ 0x00, 0x0e, 0x0e }, -{ 0x00, 0x0f, 0x0f }, -{ 0x00, 0x10, 0x10 }, -{ 0x00, 0x11, 0x11 }, -{ 0x00, 0x12, 0x12 }, -{ 0x00, 0x13, 0x13 }, -{ 0x00, 0x14, 0x14 }, -{ 0x00, 0x15, 0x15 }, -{ 0x00, 0x16, 0x16 }, -{ 0x00, 0x17, 0x17 }, -{ 0x00, 0x18, 0x18 }, -{ 0x00, 0x19, 0x19 }, -{ 0x00, 0x1a, 0x1a }, -{ 0x00, 0x1b, 0x1b }, -{ 0x00, 0x1c, 0x1c }, -{ 0x00, 0x1d, 0x1d }, -{ 0x00, 0x1e, 0x1e }, -{ 0x00, 0x1f, 0x1f }, -{ 0x00, 0x20, 0x20 }, -{ 0x00, 0x21, 0x21 }, -{ 0x00, 0x22, 0x22 }, -{ 0x00, 0x23, 0x23 }, -{ 0x00, 0x24, 0x24 }, -{ 0x00, 0x25, 0x25 }, -{ 0x00, 0x26, 0x26 }, -{ 0x00, 0x27, 0x27 }, -{ 0x00, 0x28, 0x28 }, -{ 0x00, 0x29, 0x29 }, -{ 0x00, 0x2a, 0x2a }, -{ 0x00, 0x2b, 0x2b }, -{ 0x00, 0x2c, 0x2c }, -{ 0x00, 0x2d, 0x2d }, -{ 0x00, 0x2e, 0x2e }, -{ 0x00, 0x2f, 0x2f }, -{ 0x00, 0x30, 0x30 }, -{ 0x00, 0x31, 0x31 }, -{ 0x00, 0x32, 0x32 }, -{ 0x00, 0x33, 0x33 }, -{ 0x00, 0x34, 0x34 }, -{ 0x00, 0x35, 0x35 }, -{ 0x00, 0x36, 0x36 }, -{ 0x00, 0x37, 0x37 }, -{ 0x00, 0x38, 0x38 }, -{ 0x00, 0x39, 0x39 }, -{ 0x00, 0x3a, 0x3a }, -{ 0x00, 0x3b, 0x3b }, -{ 0x00, 0x3c, 0x3c }, -{ 0x00, 0x3d, 0x3d }, -{ 0x00, 0x3e, 0x3e }, -{ 0x00, 0x3f, 0x3f }, -{ 0x00, 0x40, 0x40 }, -{ 0x01, 0x61, 0x41 }, -{ 0x01, 0x62, 0x42 }, -{ 0x01, 0x63, 0x43 }, -{ 0x01, 0x64, 0x44 }, -{ 0x01, 0x65, 0x45 }, -{ 0x01, 0x66, 0x46 }, -{ 0x01, 0x67, 0x47 }, -{ 0x01, 0x68, 0x48 }, -{ 0x01, 0x69, 0x49 }, -{ 0x01, 0x6a, 0x4a }, -{ 0x01, 0x6b, 0x4b }, -{ 0x01, 0x6c, 0x4c }, -{ 0x01, 0x6d, 0x4d }, -{ 0x01, 0x6e, 0x4e }, -{ 0x01, 0x6f, 0x4f }, -{ 0x01, 0x70, 0x50 }, -{ 0x01, 0x71, 0x51 }, -{ 0x01, 0x72, 0x52 }, -{ 0x01, 0x73, 0x53 }, -{ 0x01, 0x74, 0x54 }, -{ 0x01, 0x75, 0x55 }, -{ 0x01, 0x76, 0x56 }, -{ 0x01, 0x77, 0x57 }, -{ 0x01, 0x78, 0x58 }, -{ 0x01, 0x79, 0x59 }, -{ 0x01, 0x7a, 0x5a }, -{ 0x00, 0x5b, 0x5b }, -{ 0x00, 0x5c, 0x5c }, -{ 0x00, 0x5d, 0x5d }, -{ 0x00, 0x5e, 0x5e }, -{ 0x00, 0x5f, 0x5f }, -{ 0x00, 0x60, 0x60 }, -{ 0x00, 0x61, 0x41 }, -{ 0x00, 0x62, 0x42 }, -{ 0x00, 0x63, 0x43 }, -{ 0x00, 0x64, 0x44 }, -{ 0x00, 0x65, 0x45 }, -{ 0x00, 0x66, 0x46 }, -{ 0x00, 0x67, 0x47 }, -{ 0x00, 0x68, 0x48 }, -{ 0x00, 0x69, 0x49 }, -{ 0x00, 0x6a, 0x4a }, -{ 0x00, 0x6b, 0x4b }, -{ 0x00, 0x6c, 0x4c }, -{ 0x00, 0x6d, 0x4d }, -{ 0x00, 0x6e, 0x4e }, -{ 0x00, 0x6f, 0x4f }, -{ 0x00, 0x70, 0x50 }, -{ 0x00, 0x71, 0x51 }, -{ 0x00, 0x72, 0x52 }, -{ 0x00, 0x73, 0x53 }, -{ 0x00, 0x74, 0x54 }, -{ 0x00, 0x75, 0x55 }, -{ 0x00, 0x76, 0x56 }, -{ 0x00, 0x77, 0x57 }, -{ 0x00, 0x78, 0x58 }, -{ 0x00, 0x79, 0x59 }, -{ 0x00, 0x7a, 0x5a }, -{ 0x00, 0x7b, 0x7b }, -{ 0x00, 0x7c, 0x7c }, -{ 0x00, 0x7d, 0x7d }, -{ 0x00, 0x7e, 0x7e }, -{ 0x00, 0x7f, 0x7f }, -{ 0x00, 0x80, 0x80 }, -{ 0x00, 0x81, 0x81 }, -{ 0x00, 0x82, 0x82 }, -{ 0x00, 0x83, 0x83 }, -{ 0x00, 0x84, 0x84 }, -{ 0x00, 0x85, 0x85 }, -{ 0x00, 0x86, 0x86 }, -{ 0x00, 0x87, 0x87 }, -{ 0x00, 0x88, 0x88 }, -{ 0x00, 0x89, 0x89 }, -{ 0x00, 0x8a, 0x8a }, -{ 0x00, 0x8b, 0x8b }, -{ 0x00, 0x8c, 0x8c }, -{ 0x00, 0x8d, 0x8d }, -{ 0x00, 0x8e, 0x8e }, -{ 0x00, 0x8f, 0x8f }, -{ 0x00, 0x90, 0x90 }, -{ 0x00, 0x91, 0x91 }, -{ 0x00, 0x92, 0x92 }, -{ 0x00, 0x93, 0x93 }, -{ 0x00, 0x94, 0x94 }, -{ 0x00, 0x95, 0x95 }, -{ 0x00, 0x96, 0x96 }, -{ 0x00, 0x97, 0x97 }, -{ 0x00, 0x98, 0x98 }, -{ 0x00, 0x99, 0x99 }, -{ 0x00, 0x9a, 0x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fa }, -{ 0x00, 0xfb, 0xfb }, -{ 0x00, 0xfc, 0xfc }, -{ 0x00, 0xfd, 0xfd }, -{ 0x00, 0xfe, 0xfe }, -{ 0x00, 0xff, 0xff } -}; - -static struct cs_info iso7_tbl[] = { -{ 0x00, 0x00, 0x00 }, -{ 0x00, 0x01, 0x01 }, -{ 0x00, 0x02, 0x02 }, -{ 0x00, 0x03, 0x03 }, -{ 0x00, 0x04, 0x04 }, -{ 0x00, 0x05, 0x05 }, -{ 0x00, 0x06, 0x06 }, -{ 0x00, 0x07, 0x07 }, -{ 0x00, 0x08, 0x08 }, -{ 0x00, 0x09, 0x09 }, -{ 0x00, 0x0a, 0x0a }, -{ 0x00, 0x0b, 0x0b }, -{ 0x00, 0x0c, 0x0c }, -{ 0x00, 0x0d, 0x0d }, -{ 0x00, 0x0e, 0x0e }, -{ 0x00, 0x0f, 0x0f }, -{ 0x00, 0x10, 0x10 }, -{ 0x00, 0x11, 0x11 }, -{ 0x00, 0x12, 0x12 }, -{ 0x00, 0x13, 0x13 }, -{ 0x00, 0x14, 0x14 }, -{ 0x00, 0x15, 0x15 }, -{ 0x00, 0x16, 0x16 }, -{ 0x00, 0x17, 0x17 }, -{ 0x00, 0x18, 0x18 }, -{ 0x00, 0x19, 0x19 }, -{ 0x00, 0x1a, 0x1a }, -{ 0x00, 0x1b, 0x1b }, -{ 0x00, 0x1c, 0x1c }, -{ 0x00, 0x1d, 0x1d }, -{ 0x00, 0x1e, 0x1e }, -{ 0x00, 0x1f, 0x1f }, -{ 0x00, 0x20, 0x20 }, -{ 0x00, 0x21, 0x21 }, -{ 0x00, 0x22, 0x22 }, -{ 0x00, 0x23, 0x23 }, -{ 0x00, 0x24, 0x24 }, -{ 0x00, 0x25, 0x25 }, -{ 0x00, 0x26, 0x26 }, -{ 0x00, 0x27, 0x27 }, -{ 0x00, 0x28, 0x28 }, -{ 0x00, 0x29, 0x29 }, -{ 0x00, 0x2a, 0x2a }, -{ 0x00, 0x2b, 0x2b }, -{ 0x00, 0x2c, 0x2c }, -{ 0x00, 0x2d, 0x2d }, -{ 0x00, 0x2e, 0x2e }, -{ 0x00, 0x2f, 0x2f }, -{ 0x00, 0x30, 0x30 }, -{ 0x00, 0x31, 0x31 }, -{ 0x00, 0x32, 0x32 }, -{ 0x00, 0x33, 0x33 }, -{ 0x00, 0x34, 0x34 }, -{ 0x00, 0x35, 0x35 }, -{ 0x00, 0x36, 0x36 }, -{ 0x00, 0x37, 0x37 }, -{ 0x00, 0x38, 0x38 }, -{ 0x00, 0x39, 0x39 }, -{ 0x00, 0x3a, 0x3a }, -{ 0x00, 0x3b, 0x3b }, -{ 0x00, 0x3c, 0x3c }, -{ 0x00, 0x3d, 0x3d }, -{ 0x00, 0x3e, 0x3e }, -{ 0x00, 0x3f, 0x3f }, -{ 0x00, 0x40, 0x40 }, -{ 0x01, 0x61, 0x41 }, -{ 0x01, 0x62, 0x42 }, -{ 0x01, 0x63, 0x43 }, -{ 0x01, 0x64, 0x44 }, -{ 0x01, 0x65, 0x45 }, -{ 0x01, 0x66, 0x46 }, -{ 0x01, 0x67, 0x47 }, -{ 0x01, 0x68, 0x48 }, -{ 0x01, 0x69, 0x49 }, -{ 0x01, 0x6a, 0x4a }, -{ 0x01, 0x6b, 0x4b }, -{ 0x01, 0x6c, 0x4c }, -{ 0x01, 0x6d, 0x4d }, -{ 0x01, 0x6e, 0x4e }, -{ 0x01, 0x6f, 0x4f }, -{ 0x01, 0x70, 0x50 }, -{ 0x01, 0x71, 0x51 }, -{ 0x01, 0x72, 0x52 }, -{ 0x01, 0x73, 0x53 }, -{ 0x01, 0x74, 0x54 }, -{ 0x01, 0x75, 0x55 }, -{ 0x01, 0x76, 0x56 }, -{ 0x01, 0x77, 0x57 }, -{ 0x01, 0x78, 0x58 }, -{ 0x01, 0x79, 0x59 }, -{ 0x01, 0x7a, 0x5a }, -{ 0x00, 0x5b, 0x5b }, -{ 0x00, 0x5c, 0x5c }, -{ 0x00, 0x5d, 0x5d }, -{ 0x00, 0x5e, 0x5e }, -{ 0x00, 0x5f, 0x5f }, -{ 0x00, 0x60, 0x60 }, -{ 0x00, 0x61, 0x41 }, -{ 0x00, 0x62, 0x42 }, -{ 0x00, 0x63, 0x43 }, -{ 0x00, 0x64, 0x44 }, -{ 0x00, 0x65, 0x45 }, -{ 0x00, 0x66, 0x46 }, -{ 0x00, 0x67, 0x47 }, -{ 0x00, 0x68, 0x48 }, -{ 0x00, 0x69, 0x49 }, -{ 0x00, 0x6a, 0x4a }, -{ 0x00, 0x6b, 0x4b }, -{ 0x00, 0x6c, 0x4c }, -{ 0x00, 0x6d, 0x4d }, -{ 0x00, 0x6e, 0x4e }, -{ 0x00, 0x6f, 0x4f }, -{ 0x00, 0x70, 0x50 }, -{ 0x00, 0x71, 0x51 }, -{ 0x00, 0x72, 0x52 }, -{ 0x00, 0x73, 0x53 }, -{ 0x00, 0x74, 0x54 }, -{ 0x00, 0x75, 0x55 }, -{ 0x00, 0x76, 0x56 }, -{ 0x00, 0x77, 0x57 }, -{ 0x00, 0x78, 0x58 }, -{ 0x00, 0x79, 0x59 }, -{ 0x00, 0x7a, 0x5a }, -{ 0x00, 0x7b, 0x7b }, -{ 0x00, 0x7c, 0x7c }, -{ 0x00, 0x7d, 0x7d }, -{ 0x00, 0x7e, 0x7e }, -{ 0x00, 0x7f, 0x7f }, -{ 0x00, 0x80, 0x80 }, -{ 0x00, 0x81, 0x81 }, -{ 0x00, 0x82, 0x82 }, -{ 0x00, 0x83, 0x83 }, -{ 0x00, 0x84, 0x84 }, -{ 0x00, 0x85, 0x85 }, -{ 0x00, 0x86, 0x86 }, -{ 0x00, 0x87, 0x87 }, -{ 0x00, 0x88, 0x88 }, -{ 0x00, 0x89, 0x89 }, -{ 0x00, 0x8a, 0x8a }, -{ 0x00, 0x8b, 0x8b }, -{ 0x00, 0x8c, 0x8c }, -{ 0x00, 0x8d, 0x8d }, -{ 0x00, 0x8e, 0x8e }, -{ 0x00, 0x8f, 0x8f }, -{ 0x00, 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 0x00, 0xf1, 0xd1 }, -{ 0x00, 0xf2, 0xd3 }, -{ 0x00, 0xf3, 0xd3 }, -{ 0x00, 0xf4, 0xd4 }, -{ 0x00, 0xf5, 0xd5 }, -{ 0x00, 0xf6, 0xd6 }, -{ 0x00, 0xf7, 0xd7 }, -{ 0x00, 0xf8, 0xd8 }, -{ 0x00, 0xf9, 0xd9 }, -{ 0x00, 0xfa, 0xda }, -{ 0x00, 0xfb, 0xdb }, -{ 0x00, 0xfc, 0xbc }, -{ 0x00, 0xfd, 0xbe }, -{ 0x00, 0xfe, 0xbf }, -{ 0x00, 0xff, 0xff } -}; - -static struct cs_info iso8_tbl[] = { -{ 0x00, 0x00, 0x00 }, -{ 0x00, 0x01, 0x01 }, -{ 0x00, 0x02, 0x02 }, -{ 0x00, 0x03, 0x03 }, -{ 0x00, 0x04, 0x04 }, -{ 0x00, 0x05, 0x05 }, -{ 0x00, 0x06, 0x06 }, -{ 0x00, 0x07, 0x07 }, -{ 0x00, 0x08, 0x08 }, -{ 0x00, 0x09, 0x09 }, -{ 0x00, 0x0a, 0x0a }, -{ 0x00, 0x0b, 0x0b }, -{ 0x00, 0x0c, 0x0c }, -{ 0x00, 0x0d, 0x0d }, -{ 0x00, 0x0e, 0x0e }, -{ 0x00, 0x0f, 0x0f }, -{ 0x00, 0x10, 0x10 }, -{ 0x00, 0x11, 0x11 }, -{ 0x00, 0x12, 0x12 }, -{ 0x00, 0x13, 0x13 }, -{ 0x00, 0x14, 0x14 }, -{ 0x00, 0x15, 0x15 }, -{ 0x00, 0x16, 0x16 }, -{ 0x00, 0x17, 0x17 }, -{ 0x00, 0x18, 0x18 }, -{ 0x00, 0x19, 0x19 }, -{ 0x00, 0x1a, 0x1a }, -{ 0x00, 0x1b, 0x1b }, -{ 0x00, 0x1c, 0x1c }, -{ 0x00, 0x1d, 0x1d }, -{ 0x00, 0x1e, 0x1e }, -{ 0x00, 0x1f, 0x1f }, -{ 0x00, 0x20, 0x20 }, -{ 0x00, 0x21, 0x21 }, -{ 0x00, 0x22, 0x22 }, -{ 0x00, 0x23, 0x23 }, -{ 0x00, 0x24, 0x24 }, -{ 0x00, 0x25, 0x25 }, -{ 0x00, 0x26, 0x26 }, -{ 0x00, 0x27, 0x27 }, -{ 0x00, 0x28, 0x28 }, -{ 0x00, 0x29, 0x29 }, -{ 0x00, 0x2a, 0x2a }, -{ 0x00, 0x2b, 0x2b }, -{ 0x00, 0x2c, 0x2c }, -{ 0x00, 0x2d, 0x2d }, -{ 0x00, 0x2e, 0x2e }, -{ 0x00, 0x2f, 0x2f }, -{ 0x00, 0x30, 0x30 }, -{ 0x00, 0x31, 0x31 }, -{ 0x00, 0x32, 0x32 }, -{ 0x00, 0x33, 0x33 }, -{ 0x00, 0x34, 0x34 }, -{ 0x00, 0x35, 0x35 }, -{ 0x00, 0x36, 0x36 }, -{ 0x00, 0x37, 0x37 }, -{ 0x00, 0x38, 0x38 }, -{ 0x00, 0x39, 0x39 }, -{ 0x00, 0x3a, 0x3a }, -{ 0x00, 0x3b, 0x3b }, -{ 0x00, 0x3c, 0x3c }, -{ 0x00, 0x3d, 0x3d }, -{ 0x00, 0x3e, 0x3e }, -{ 0x00, 0x3f, 0x3f }, -{ 0x00, 0x40, 0x40 }, -{ 0x01, 0x61, 0x41 }, -{ 0x01, 0x62, 0x42 }, -{ 0x01, 0x63, 0x43 }, -{ 0x01, 0x64, 0x44 }, -{ 0x01, 0x65, 0x45 }, -{ 0x01, 0x66, 0x46 }, -{ 0x01, 0x67, 0x47 }, -{ 0x01, 0x68, 0x48 }, -{ 0x01, 0x69, 0x49 }, -{ 0x01, 0x6a, 0x4a }, -{ 0x01, 0x6b, 0x4b }, -{ 0x01, 0x6c, 0x4c }, -{ 0x01, 0x6d, 0x4d }, -{ 0x01, 0x6e, 0x4e }, -{ 0x01, 0x6f, 0x4f }, -{ 0x01, 0x70, 0x50 }, -{ 0x01, 0x71, 0x51 }, -{ 0x01, 0x72, 0x52 }, -{ 0x01, 0x73, 0x53 }, -{ 0x01, 0x74, 0x54 }, -{ 0x01, 0x75, 0x55 }, -{ 0x01, 0x76, 0x56 }, -{ 0x01, 0x77, 0x57 }, -{ 0x01, 0x78, 0x58 }, -{ 0x01, 0x79, 0x59 }, -{ 0x01, 0x7a, 0x5a }, -{ 0x00, 0x5b, 0x5b }, -{ 0x00, 0x5c, 0x5c }, -{ 0x00, 0x5d, 0x5d }, -{ 0x00, 0x5e, 0x5e }, -{ 0x00, 0x5f, 0x5f }, -{ 0x00, 0x60, 0x60 }, -{ 0x00, 0x61, 0x41 }, -{ 0x00, 0x62, 0x42 }, -{ 0x00, 0x63, 0x43 }, -{ 0x00, 0x64, 0x44 }, -{ 0x00, 0x65, 0x45 }, -{ 0x00, 0x66, 0x46 }, -{ 0x00, 0x67, 0x47 }, -{ 0x00, 0x68, 0x48 }, -{ 0x00, 0x69, 0x49 }, -{ 0x00, 0x6a, 0x4a }, -{ 0x00, 0x6b, 0x4b }, -{ 0x00, 0x6c, 0x4c }, -{ 0x00, 0x6d, 0x4d }, -{ 0x00, 0x6e, 0x4e }, -{ 0x00, 0x6f, 0x4f }, -{ 0x00, 0x70, 0x50 }, -{ 0x00, 0x71, 0x51 }, -{ 0x00, 0x72, 0x52 }, -{ 0x00, 0x73, 0x53 }, -{ 0x00, 0x74, 0x54 }, -{ 0x00, 0x75, 0x55 }, -{ 0x00, 0x76, 0x56 }, -{ 0x00, 0x77, 0x57 }, -{ 0x00, 0x78, 0x58 }, -{ 0x00, 0x79, 0x59 }, -{ 0x00, 0x7a, 0x5a }, -{ 0x00, 0x7b, 0x7b }, -{ 0x00, 0x7c, 0x7c }, -{ 0x00, 0x7d, 0x7d }, -{ 0x00, 0x7e, 0x7e }, -{ 0x00, 0x7f, 0x7f }, -{ 0x00, 0x80, 0x80 }, -{ 0x00, 0x81, 0x81 }, -{ 0x00, 0x82, 0x82 }, -{ 0x00, 0x83, 0x83 }, -{ 0x00, 0x84, 0x84 }, -{ 0x00, 0x85, 0x85 }, -{ 0x00, 0x86, 0x86 }, -{ 0x00, 0x87, 0x87 }, -{ 0x00, 0x88, 0x88 }, -{ 0x00, 0x89, 0x89 }, -{ 0x00, 0x8a, 0x8a }, -{ 0x00, 0x8b, 0x8b }, -{ 0x00, 0x8c, 0x8c }, -{ 0x00, 0x8d, 0x8d }, -{ 0x00, 0x8e, 0x8e }, -{ 0x00, 0x8f, 0x8f }, -{ 0x00, 0x90, 0x90 }, -{ 0x00, 0x91, 0x91 }, -{ 0x00, 0x92, 0x92 }, -{ 0x00, 0x93, 0x93 }, -{ 0x00, 0x94, 0x94 }, -{ 0x00, 0x95, 0x95 }, -{ 0x00, 0x96, 0x96 }, -{ 0x00, 0x97, 0x97 }, -{ 0x00, 0x98, 0x98 }, -{ 0x00, 0x99, 0x99 }, -{ 0x00, 0x9a, 0x9a }, -{ 0x00, 0x9b, 0x9b }, -{ 0x00, 0x9c, 0x9c }, -{ 0x00, 0x9d, 0x9d }, -{ 0x00, 0x9e, 0x9e }, -{ 0x00, 0x9f, 0x9f }, -{ 0x00, 0xa0, 0xa0 }, -{ 0x00, 0xa1, 0xa1 }, -{ 0x00, 0xa2, 0xa2 }, -{ 0x00, 0xa3, 0xa3 }, -{ 0x00, 0xa4, 0xa4 }, -{ 0x00, 0xa5, 0xa5 }, -{ 0x00, 0xa6, 0xa6 }, -{ 0x00, 0xa7, 0xa7 }, -{ 0x00, 0xa8, 0xa8 }, -{ 0x00, 0xa9, 0xa9 }, -{ 0x00, 0xaa, 0xaa }, -{ 0x00, 0xab, 0xab }, -{ 0x00, 0xac, 0xac }, -{ 0x00, 0xad, 0xad }, -{ 0x00, 0xae, 0xae }, -{ 0x00, 0xaf, 0xaf }, -{ 0x00, 0xb0, 0xb0 }, -{ 0x00, 0xb1, 0xb1 }, -{ 0x00, 0xb2, 0xb2 }, -{ 0x00, 0xb3, 0xb3 }, -{ 0x00, 0xb4, 0xb4 }, -{ 0x00, 0xb5, 0xb5 }, -{ 0x00, 0xb6, 0xb6 }, -{ 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-{ 0x00, 0xe7, 0xe7 }, -{ 0x00, 0xe8, 0xe8 }, -{ 0x00, 0xe9, 0xe9 }, -{ 0x00, 0xea, 0xea }, -{ 0x00, 0xeb, 0xeb }, -{ 0x00, 0xec, 0xec }, -{ 0x00, 0xed, 0xed }, -{ 0x00, 0xee, 0xee }, -{ 0x00, 0xef, 0xef }, -{ 0x00, 0xf0, 0xf0 }, -{ 0x00, 0xf1, 0xf1 }, -{ 0x00, 0xf2, 0xf2 }, -{ 0x00, 0xf3, 0xf3 }, -{ 0x00, 0xf4, 0xf4 }, -{ 0x00, 0xf5, 0xf5 }, -{ 0x00, 0xf6, 0xf6 }, -{ 0x00, 0xf7, 0xf7 }, -{ 0x00, 0xf8, 0xf8 }, -{ 0x00, 0xf9, 0xf9 }, -{ 0x00, 0xfa, 0xfa }, -{ 0x00, 0xfb, 0xfb }, -{ 0x00, 0xfc, 0xfc }, -{ 0x00, 0xfd, 0xfd }, -{ 0x00, 0xfe, 0xfe }, -{ 0x00, 0xff, 0xff } -}; - -static struct cs_info iso9_tbl[] = { -{ 0x00, 0x00, 0x00 }, -{ 0x00, 0x01, 0x01 }, -{ 0x00, 0x02, 0x02 }, -{ 0x00, 0x03, 0x03 }, -{ 0x00, 0x04, 0x04 }, -{ 0x00, 0x05, 0x05 }, -{ 0x00, 0x06, 0x06 }, -{ 0x00, 0x07, 0x07 }, -{ 0x00, 0x08, 0x08 }, -{ 0x00, 0x09, 0x09 }, -{ 0x00, 0x0a, 0x0a }, -{ 0x00, 0x0b, 0x0b }, -{ 0x00, 0x0c, 0x0c }, -{ 0x00, 0x0d, 0x0d }, -{ 0x00, 0x0e, 0x0e }, -{ 0x00, 0x0f, 0x0f }, -{ 0x00, 0x10, 0x10 }, -{ 0x00, 0x11, 0x11 }, -{ 0x00, 0x12, 0x12 }, -{ 0x00, 0x13, 0x13 }, -{ 0x00, 0x14, 0x14 }, -{ 0x00, 0x15, 0x15 }, -{ 0x00, 0x16, 0x16 }, -{ 0x00, 0x17, 0x17 }, -{ 0x00, 0x18, 0x18 }, -{ 0x00, 0x19, 0x19 }, -{ 0x00, 0x1a, 0x1a }, -{ 0x00, 0x1b, 0x1b }, -{ 0x00, 0x1c, 0x1c }, -{ 0x00, 0x1d, 0x1d }, -{ 0x00, 0x1e, 0x1e }, -{ 0x00, 0x1f, 0x1f }, -{ 0x00, 0x20, 0x20 }, -{ 0x00, 0x21, 0x21 }, -{ 0x00, 0x22, 0x22 }, -{ 0x00, 0x23, 0x23 }, -{ 0x00, 0x24, 0x24 }, -{ 0x00, 0x25, 0x25 }, -{ 0x00, 0x26, 0x26 }, -{ 0x00, 0x27, 0x27 }, -{ 0x00, 0x28, 0x28 }, -{ 0x00, 0x29, 0x29 }, -{ 0x00, 0x2a, 0x2a }, -{ 0x00, 0x2b, 0x2b }, -{ 0x00, 0x2c, 0x2c }, -{ 0x00, 0x2d, 0x2d }, -{ 0x00, 0x2e, 0x2e }, -{ 0x00, 0x2f, 0x2f }, -{ 0x00, 0x30, 0x30 }, -{ 0x00, 0x31, 0x31 }, -{ 0x00, 0x32, 0x32 }, -{ 0x00, 0x33, 0x33 }, -{ 0x00, 0x34, 0x34 }, -{ 0x00, 0x35, 0x35 }, -{ 0x00, 0x36, 0x36 }, -{ 0x00, 0x37, 0x37 }, -{ 0x00, 0x38, 0x38 }, -{ 0x00, 0x39, 0x39 }, -{ 0x00, 0x3a, 0x3a }, -{ 0x00, 0x3b, 0x3b }, -{ 0x00, 0x3c, 0x3c }, -{ 0x00, 0x3d, 0x3d }, -{ 0x00, 0x3e, 0x3e }, -{ 0x00, 0x3f, 0x3f }, -{ 0x00, 0x40, 0x40 }, -{ 0x01, 0x61, 0x41 }, -{ 0x01, 0x62, 0x42 }, -{ 0x01, 0x63, 0x43 }, -{ 0x01, 0x64, 0x44 }, -{ 0x01, 0x65, 0x45 }, -{ 0x01, 0x66, 0x46 }, -{ 0x01, 0x67, 0x47 }, -{ 0x01, 0x68, 0x48 }, -{ 0x01, 0xfd, 0x49 }, -{ 0x01, 0x6a, 0x4a }, -{ 0x01, 0x6b, 0x4b }, -{ 0x01, 0x6c, 0x4c }, -{ 0x01, 0x6d, 0x4d }, -{ 0x01, 0x6e, 0x4e }, -{ 0x01, 0x6f, 0x4f }, -{ 0x01, 0x70, 0x50 }, -{ 0x01, 0x71, 0x51 }, -{ 0x01, 0x72, 0x52 }, -{ 0x01, 0x73, 0x53 }, -{ 0x01, 0x74, 0x54 }, -{ 0x01, 0x75, 0x55 }, -{ 0x01, 0x76, 0x56 }, -{ 0x01, 0x77, 0x57 }, -{ 0x01, 0x78, 0x58 }, -{ 0x01, 0x79, 0x59 }, -{ 0x01, 0x7a, 0x5a }, -{ 0x00, 0x5b, 0x5b }, -{ 0x00, 0x5c, 0x5c }, -{ 0x00, 0x5d, 0x5d }, -{ 0x00, 0x5e, 0x5e }, -{ 0x00, 0x5f, 0x5f }, -{ 0x00, 0x60, 0x60 }, -{ 0x00, 0x61, 0x41 }, -{ 0x00, 0x62, 0x42 }, -{ 0x00, 0x63, 0x43 }, -{ 0x00, 0x64, 0x44 }, -{ 0x00, 0x65, 0x45 }, -{ 0x00, 0x66, 0x46 }, -{ 0x00, 0x67, 0x47 }, -{ 0x00, 0x68, 0x48 }, -{ 0x00, 0x69, 0xdd }, -{ 0x00, 0x6a, 0x4a }, -{ 0x00, 0x6b, 0x4b }, -{ 0x00, 0x6c, 0x4c }, -{ 0x00, 0x6d, 0x4d }, -{ 0x00, 0x6e, 0x4e }, -{ 0x00, 0x6f, 0x4f }, -{ 0x00, 0x70, 0x50 }, -{ 0x00, 0x71, 0x51 }, -{ 0x00, 0x72, 0x52 }, -{ 0x00, 0x73, 0x53 }, -{ 0x00, 0x74, 0x54 }, -{ 0x00, 0x75, 0x55 }, -{ 0x00, 0x76, 0x56 }, -{ 0x00, 0x77, 0x57 }, -{ 0x00, 0x78, 0x58 }, -{ 0x00, 0x79, 0x59 }, -{ 0x00, 0x7a, 0x5a }, -{ 0x00, 0x7b, 0x7b }, -{ 0x00, 0x7c, 0x7c }, -{ 0x00, 0x7d, 0x7d }, -{ 0x00, 0x7e, 0x7e }, -{ 0x00, 0x7f, 0x7f }, -{ 0x00, 0x80, 0x80 }, -{ 0x00, 0x81, 0x81 }, -{ 0x00, 0x82, 0x82 }, -{ 0x00, 0x83, 0x83 }, -{ 0x00, 0x84, 0x84 }, -{ 0x00, 0x85, 0x85 }, -{ 0x00, 0x86, 0x86 }, -{ 0x00, 0x87, 0x87 }, -{ 0x00, 0x88, 0x88 }, -{ 0x00, 0x89, 0x89 }, -{ 0x00, 0x8a, 0x8a }, -{ 0x00, 0x8b, 0x8b }, -{ 0x00, 0x8c, 0x8c }, -{ 0x00, 0x8d, 0x8d }, -{ 0x00, 0x8e, 0x8e }, -{ 0x00, 0x8f, 0x8f }, -{ 0x00, 0x90, 0x90 }, -{ 0x00, 0x91, 0x91 }, -{ 0x00, 0x92, 0x92 }, -{ 0x00, 0x93, 0x93 }, -{ 0x00, 0x94, 0x94 }, -{ 0x00, 0x95, 0x95 }, -{ 0x00, 0x96, 0x96 }, -{ 0x00, 0x97, 0x97 }, -{ 0x00, 0x98, 0x98 }, -{ 0x00, 0x99, 0x99 }, -{ 0x00, 0x9a, 0x9a }, -{ 0x00, 0x9b, 0x9b }, -{ 0x00, 0x9c, 0x9c }, -{ 0x00, 0x9d, 0x9d }, -{ 0x00, 0x9e, 0x9e }, -{ 0x00, 0x9f, 0x9f }, -{ 0x00, 0xa0, 0xa0 }, -{ 0x00, 0xa1, 0xa1 }, -{ 0x00, 0xa2, 0xa2 }, -{ 0x00, 0xa3, 0xa3 }, -{ 0x00, 0xa4, 0xa4 }, -{ 0x00, 0xa5, 0xa5 }, -{ 0x00, 0xa6, 0xa6 }, -{ 0x00, 0xa7, 0xa7 }, -{ 0x00, 0xa8, 0xa8 }, -{ 0x00, 0xa9, 0xa9 }, -{ 0x00, 0xaa, 0xaa }, -{ 0x00, 0xab, 0xab }, -{ 0x00, 0xac, 0xac }, -{ 0x00,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 0x69, 0xdd }, -{ 0x01, 0xfe, 0xde }, -{ 0x00, 0xdf, 0xdf }, -{ 0x00, 0xe0, 0xc0 }, -{ 0x00, 0xe1, 0xc1 }, -{ 0x00, 0xe2, 0xc2 }, -{ 0x00, 0xe3, 0xc3 }, -{ 0x00, 0xe4, 0xc4 }, -{ 0x00, 0xe5, 0xc5 }, -{ 0x00, 0xe6, 0xc6 }, -{ 0x00, 0xe7, 0xc7 }, -{ 0x00, 0xe8, 0xc8 }, -{ 0x00, 0xe9, 0xc9 }, -{ 0x00, 0xea, 0xca }, -{ 0x00, 0xeb, 0xcb }, -{ 0x00, 0xec, 0xcc }, -{ 0x00, 0xed, 0xcd }, -{ 0x00, 0xee, 0xce }, -{ 0x00, 0xef, 0xcf }, -{ 0x00, 0xf0, 0xd0 }, -{ 0x00, 0xf1, 0xd1 }, -{ 0x00, 0xf2, 0xd2 }, -{ 0x00, 0xf3, 0xd3 }, -{ 0x00, 0xf4, 0xd4 }, -{ 0x00, 0xf5, 0xd5 }, -{ 0x00, 0xf6, 0xd6 }, -{ 0x00, 0xf7, 0xf7 }, -{ 0x00, 0xf8, 0xd8 }, -{ 0x00, 0xf9, 0xd9 }, -{ 0x00, 0xfa, 0xda }, -{ 0x00, 0xfb, 0xdb }, -{ 0x00, 0xfc, 0xdc }, -{ 0x00, 0xfd, 0x49 }, -{ 0x00, 0xfe, 0xde }, -{ 0x00, 0xff, 0xff } -}; - -static struct cs_info iso10_tbl[] = { -{ 0x00, 0x00, 0x00 }, -{ 0x00, 0x01, 0x01 }, -{ 0x00, 0x02, 0x02 }, -{ 0x00, 0x03, 0x03 }, -{ 0x00, 0x04, 0x04 }, -{ 0x00, 0x05, 0x05 }, -{ 0x00, 0x06, 0x06 }, -{ 0x00, 0x07, 0x07 }, -{ 0x00, 0x08, 0x08 }, -{ 0x00, 0x09, 0x09 }, -{ 0x00, 0x0a, 0x0a }, -{ 0x00, 0x0b, 0x0b }, -{ 0x00, 0x0c, 0x0c }, -{ 0x00, 0x0d, 0x0d }, -{ 0x00, 0x0e, 0x0e }, -{ 0x00, 0x0f, 0x0f }, -{ 0x00, 0x10, 0x10 }, -{ 0x00, 0x11, 0x11 }, -{ 0x00, 0x12, 0x12 }, -{ 0x00, 0x13, 0x13 }, -{ 0x00, 0x14, 0x14 }, -{ 0x00, 0x15, 0x15 }, -{ 0x00, 0x16, 0x16 }, -{ 0x00, 0x17, 0x17 }, -{ 0x00, 0x18, 0x18 }, -{ 0x00, 0x19, 0x19 }, -{ 0x00, 0x1a, 0x1a }, -{ 0x00, 0x1b, 0x1b }, -{ 0x00, 0x1c, 0x1c }, -{ 0x00, 0x1d, 0x1d }, -{ 0x00, 0x1e, 0x1e }, -{ 0x00, 0x1f, 0x1f }, -{ 0x00, 0x20, 0x20 }, -{ 0x00, 0x21, 0x21 }, -{ 0x00, 0x22, 0x22 }, -{ 0x00, 0x23, 0x23 }, -{ 0x00, 0x24, 0x24 }, -{ 0x00, 0x25, 0x25 }, -{ 0x00, 0x26, 0x26 }, -{ 0x00, 0x27, 0x27 }, -{ 0x00, 0x28, 0x28 }, -{ 0x00, 0x29, 0x29 }, -{ 0x00, 0x2a, 0x2a }, -{ 0x00, 0x2b, 0x2b }, -{ 0x00, 0x2c, 0x2c }, -{ 0x00, 0x2d, 0x2d }, -{ 0x00, 0x2e, 0x2e }, -{ 0x00, 0x2f, 0x2f }, -{ 0x00, 0x30, 0x30 }, -{ 0x00, 0x31, 0x31 }, -{ 0x00, 0x32, 0x32 }, -{ 0x00, 0x33, 0x33 }, -{ 0x00, 0x34, 0x34 }, -{ 0x00, 0x35, 0x35 }, -{ 0x00, 0x36, 0x36 }, -{ 0x00, 0x37, 0x37 }, -{ 0x00, 0x38, 0x38 }, -{ 0x00, 0x39, 0x39 }, -{ 0x00, 0x3a, 0x3a }, -{ 0x00, 0x3b, 0x3b }, -{ 0x00, 0x3c, 0x3c }, -{ 0x00, 0x3d, 0x3d }, -{ 0x00, 0x3e, 0x3e }, -{ 0x00, 0x3f, 0x3f }, -{ 0x00, 0x40, 0x40 }, -{ 0x01, 0x61, 0x41 }, -{ 0x01, 0x62, 0x42 }, -{ 0x01, 0x63, 0x43 }, -{ 0x01, 0x64, 0x44 }, -{ 0x01, 0x65, 0x45 }, -{ 0x01, 0x66, 0x46 }, -{ 0x01, 0x67, 0x47 }, -{ 0x01, 0x68, 0x48 }, -{ 0x01, 0x69, 0x49 }, -{ 0x01, 0x6a, 0x4a }, -{ 0x01, 0x6b, 0x4b }, -{ 0x01, 0x6c, 0x4c }, -{ 0x01, 0x6d, 0x4d }, -{ 0x01, 0x6e, 0x4e }, -{ 0x01, 0x6f, 0x4f }, -{ 0x01, 0x70, 0x50 }, -{ 0x01, 0x71, 0x51 }, -{ 0x01, 0x72, 0x52 }, -{ 0x01, 0x73, 0x53 }, -{ 0x01, 0x74, 0x54 }, -{ 0x01, 0x75, 0x55 }, -{ 0x01, 0x76, 0x56 }, -{ 0x01, 0x77, 0x57 }, -{ 0x01, 0x78, 0x58 }, -{ 0x01, 0x79, 0x59 }, -{ 0x01, 0x7a, 0x5a }, -{ 0x00, 0x5b, 0x5b }, -{ 0x00, 0x5c, 0x5c }, -{ 0x00, 0x5d, 0x5d }, -{ 0x00, 0x5e, 0x5e }, -{ 0x00, 0x5f, 0x5f }, -{ 0x00, 0x60, 0x60 }, -{ 0x00, 0x61, 0x41 }, -{ 0x00, 0x62, 0x42 }, -{ 0x00, 0x63, 0x43 }, -{ 0x00, 0x64, 0x44 }, -{ 0x00, 0x65, 0x45 }, -{ 0x00, 0x66, 0x46 }, -{ 0x00, 0x67, 0x47 }, -{ 0x00, 0x68, 0x48 }, -{ 0x00, 0x69, 0x49 }, -{ 0x00, 0x6a, 0x4a }, -{ 0x00, 0x6b, 0x4b }, -{ 0x00, 0x6c, 0x4c }, -{ 0x00, 0x6d, 0x4d }, -{ 0x00, 0x6e, 0x4e }, -{ 0x00, 0x6f, 0x4f }, -{ 0x00, 0x70, 0x50 }, -{ 0x00, 0x71, 0x51 }, -{ 0x00, 0x72, 0x52 }, -{ 0x00, 0x73, 0x53 }, -{ 0x00, 0x74, 0x54 }, -{ 0x00, 0x75, 0x55 }, -{ 0x00, 0x76, 0x56 }, -{ 0x00, 0x77, 0x57 }, -{ 0x00, 0x78, 0x58 }, -{ 0x00, 0x79, 0x59 }, -{ 0x00, 0x7a, 0x5a }, -{ 0x00, 0x7b, 0x7b }, -{ 0x00, 0x7c, 0x7c }, -{ 0x00, 0x7d, 0x7d }, -{ 0x00, 0x7e, 0x7e }, -{ 0x00, 0x7f, 0x7f }, -{ 0x00, 0x80, 0x80 }, -{ 0x00, 0x81, 0x81 }, -{ 0x00, 0x82, 0x82 }, -{ 0x00, 0x83, 0x83 }, -{ 0x00, 0x84, 0x84 }, -{ 0x00, 0x85, 0x85 }, -{ 0x00, 0x86, 0x86 }, -{ 0x00, 0x87, 0x87 }, -{ 0x00, 0x88, 0x88 }, -{ 0x00, 0x89, 0x89 }, -{ 0x00, 0x8a, 0x8a }, -{ 0x00, 0x8b, 0x8b }, -{ 0x00, 0x8c, 0x8c }, -{ 0x00, 0x8d, 0x8d }, -{ 0x00, 0x8e, 0x8e }, -{ 0x00, 0x8f, 0x8f }, -{ 0x00, 0x90, 0x90 }, -{ 0x00, 0x91, 0x91 }, -{ 0x00, 0x92, 0x92 }, -{ 0x00, 0x93, 0x93 }, -{ 0x00, 0x94, 0x94 }, -{ 0x00, 0x95, 0x95 }, -{ 0x00, 0x96, 0x96 }, -{ 0x00, 0x97, 0x97 }, -{ 0x00, 0x98, 0x98 }, -{ 0x00, 0x99, 0x99 }, -{ 0x00, 0x9a, 0x9a }, -{ 0x00, 0x9b, 0x9b }, -{ 0x00, 0x9c, 0x9c }, -{ 0x00, 0x9d, 0x9d }, -{ 0x00, 0x9e, 0x9e }, -{ 0x00, 0x9f, 0x9f }, -{ 0x00, 0xa0, 0xa0 }, -{ 0x00, 0xa1, 0xa1 }, -{ 0x00, 0xa2, 0xa2 }, -{ 0x00, 0xa3,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 0xd3 }, -{ 0x00, 0xd4, 0xd4 }, -{ 0x00, 0xd5, 0xd5 }, -{ 0x00, 0xd6, 0xd6 }, -{ 0x00, 0xd7, 0xd7 }, -{ 0x00, 0xd8, 0xd8 }, -{ 0x00, 0xd9, 0xd9 }, -{ 0x00, 0xda, 0xda }, -{ 0x00, 0xdb, 0xdb }, -{ 0x00, 0xdc, 0xdc }, -{ 0x00, 0xdd, 0xdd }, -{ 0x00, 0xde, 0xde }, -{ 0x00, 0xdf, 0xdf }, -{ 0x00, 0xe0, 0xe0 }, -{ 0x00, 0xe1, 0xe1 }, -{ 0x00, 0xe2, 0xe2 }, -{ 0x00, 0xe3, 0xe3 }, -{ 0x00, 0xe4, 0xe4 }, -{ 0x00, 0xe5, 0xe5 }, -{ 0x00, 0xe6, 0xe6 }, -{ 0x00, 0xe7, 0xe7 }, -{ 0x00, 0xe8, 0xe8 }, -{ 0x00, 0xe9, 0xe9 }, -{ 0x00, 0xea, 0xea }, -{ 0x00, 0xeb, 0xeb }, -{ 0x00, 0xec, 0xec }, -{ 0x00, 0xed, 0xed }, -{ 0x00, 0xee, 0xee }, -{ 0x00, 0xef, 0xef }, -{ 0x00, 0xf0, 0xf0 }, -{ 0x00, 0xf1, 0xf1 }, -{ 0x00, 0xf2, 0xf2 }, -{ 0x00, 0xf3, 0xf3 }, -{ 0x00, 0xf4, 0xf4 }, -{ 0x00, 0xf5, 0xf5 }, -{ 0x00, 0xf6, 0xf6 }, -{ 0x00, 0xf7, 0xf7 }, -{ 0x00, 0xf8, 0xf8 }, -{ 0x00, 0xf9, 0xf9 }, -{ 0x00, 0xfa, 0xfa }, -{ 0x00, 0xfb, 0xfb }, -{ 0x00, 0xfc, 0xfc }, -{ 0x00, 0xfd, 0xfd }, -{ 0x00, 0xfe, 0xfe }, -{ 0x00, 0xff, 0xff } -}; - -static struct cs_info koi8r_tbl[] = { -{ 0x00, 0x00, 0x00 }, -{ 0x00, 0x01, 0x01 }, -{ 0x00, 0x02, 0x02 }, -{ 0x00, 0x03, 0x03 }, -{ 0x00, 0x04, 0x04 }, -{ 0x00, 0x05, 0x05 }, -{ 0x00, 0x06, 0x06 }, -{ 0x00, 0x07, 0x07 }, -{ 0x00, 0x08, 0x08 }, -{ 0x00, 0x09, 0x09 }, -{ 0x00, 0x0a, 0x0a }, -{ 0x00, 0x0b, 0x0b }, -{ 0x00, 0x0c, 0x0c }, -{ 0x00, 0x0d, 0x0d }, -{ 0x00, 0x0e, 0x0e }, -{ 0x00, 0x0f, 0x0f }, -{ 0x00, 0x10, 0x10 }, -{ 0x00, 0x11, 0x11 }, -{ 0x00, 0x12, 0x12 }, -{ 0x00, 0x13, 0x13 }, -{ 0x00, 0x14, 0x14 }, -{ 0x00, 0x15, 0x15 }, -{ 0x00, 0x16, 0x16 }, -{ 0x00, 0x17, 0x17 }, -{ 0x00, 0x18, 0x18 }, -{ 0x00, 0x19, 0x19 }, -{ 0x00, 0x1a, 0x1a }, -{ 0x00, 0x1b, 0x1b }, -{ 0x00, 0x1c, 0x1c }, -{ 0x00, 0x1d, 0x1d }, -{ 0x00, 0x1e, 0x1e }, -{ 0x00, 0x1f, 0x1f }, -{ 0x00, 0x20, 0x20 }, -{ 0x00, 0x21, 0x21 }, -{ 0x00, 0x22, 0x22 }, -{ 0x00, 0x23, 0x23 }, -{ 0x00, 0x24, 0x24 }, -{ 0x00, 0x25, 0x25 }, -{ 0x00, 0x26, 0x26 }, -{ 0x00, 0x27, 0x27 }, -{ 0x00, 0x28, 0x28 }, -{ 0x00, 0x29, 0x29 }, -{ 0x00, 0x2a, 0x2a }, -{ 0x00, 0x2b, 0x2b }, -{ 0x00, 0x2c, 0x2c }, -{ 0x00, 0x2d, 0x2d }, -{ 0x00, 0x2e, 0x2e }, -{ 0x00, 0x2f, 0x2f }, -{ 0x00, 0x30, 0x30 }, -{ 0x00, 0x31, 0x31 }, -{ 0x00, 0x32, 0x32 }, -{ 0x00, 0x33, 0x33 }, -{ 0x00, 0x34, 0x34 }, -{ 0x00, 0x35, 0x35 }, -{ 0x00, 0x36, 0x36 }, -{ 0x00, 0x37, 0x37 }, -{ 0x00, 0x38, 0x38 }, -{ 0x00, 0x39, 0x39 }, -{ 0x00, 0x3a, 0x3a }, -{ 0x00, 0x3b, 0x3b }, -{ 0x00, 0x3c, 0x3c }, -{ 0x00, 0x3d, 0x3d }, -{ 0x00, 0x3e, 0x3e }, -{ 0x00, 0x3f, 0x3f }, -{ 0x00, 0x40, 0x40 }, -{ 0x01, 0x61, 0x41 }, -{ 0x01, 0x62, 0x42 }, -{ 0x01, 0x63, 0x43 }, -{ 0x01, 0x64, 0x44 }, -{ 0x01, 0x65, 0x45 }, -{ 0x01, 0x66, 0x46 }, -{ 0x01, 0x67, 0x47 }, -{ 0x01, 0x68, 0x48 }, -{ 0x01, 0x69, 0x49 }, -{ 0x01, 0x6a, 0x4a }, -{ 0x01, 0x6b, 0x4b }, -{ 0x01, 0x6c, 0x4c }, -{ 0x01, 0x6d, 0x4d }, -{ 0x01, 0x6e, 0x4e }, -{ 0x01, 0x6f, 0x4f }, -{ 0x01, 0x70, 0x50 }, -{ 0x01, 0x71, 0x51 }, -{ 0x01, 0x72, 0x52 }, -{ 0x01, 0x73, 0x53 }, -{ 0x01, 0x74, 0x54 }, -{ 0x01, 0x75, 0x55 }, -{ 0x01, 0x76, 0x56 }, -{ 0x01, 0x77, 0x57 }, -{ 0x01, 0x78, 0x58 }, -{ 0x01, 0x79, 0x59 }, -{ 0x01, 0x7a, 0x5a }, -{ 0x00, 0x5b, 0x5b }, -{ 0x00, 0x5c, 0x5c }, -{ 0x00, 0x5d, 0x5d }, -{ 0x00, 0x5e, 0x5e }, -{ 0x00, 0x5f, 0x5f }, -{ 0x00, 0x60, 0x60 }, -{ 0x00, 0x61, 0x41 }, -{ 0x00, 0x62, 0x42 }, -{ 0x00, 0x63, 0x43 }, -{ 0x00, 0x64, 0x44 }, -{ 0x00, 0x65, 0x45 }, -{ 0x00, 0x66, 0x46 }, -{ 0x00, 0x67, 0x47 }, -{ 0x00, 0x68, 0x48 }, -{ 0x00, 0x69, 0x49 }, -{ 0x00, 0x6a, 0x4a }, -{ 0x00, 0x6b, 0x4b }, -{ 0x00, 0x6c, 0x4c }, -{ 0x00, 0x6d, 0x4d }, -{ 0x00, 0x6e, 0x4e }, -{ 0x00, 0x6f, 0x4f }, -{ 0x00, 0x70, 0x50 }, -{ 0x00, 0x71, 0x51 }, -{ 0x00, 0x72, 0x52 }, -{ 0x00, 0x73, 0x53 }, -{ 0x00, 0x74, 0x54 }, -{ 0x00, 0x75, 0x55 }, -{ 0x00, 0x76, 0x56 }, -{ 0x00, 0x77, 0x57 }, -{ 0x00, 0x78, 0x58 }, -{ 0x00, 0x79, 0x59 }, -{ 0x00, 0x7a, 0x5a }, -{ 0x00, 0x7b, 0x7b }, -{ 0x00, 0x7c, 0x7c }, -{ 0x00, 0x7d, 0x7d }, -{ 0x00, 0x7e, 0x7e }, -{ 0x00, 0x7f, 0x7f }, -{ 0x00, 0x80, 0x80 }, -{ 0x00, 0x81, 0x81 }, -{ 0x00, 0x82, 0x82 }, -{ 0x00, 0x83, 0x83 }, -{ 0x00, 0x84, 0x84 }, -{ 0x00, 0x85, 0x85 }, -{ 0x00, 0x86, 0x86 }, -{ 0x00, 0x87, 0x87 }, -{ 0x00, 0x88, 0x88 }, -{ 0x00, 0x89, 0x89 }, -{ 0x00, 0x8a, 0x8a }, -{ 0x00, 0x8b, 0x8b }, -{ 0x00, 0x8c, 0x8c }, -{ 0x00, 0x8d, 0x8d }, -{ 0x00, 0x8e, 0x8e }, -{ 0x00, 0x8f, 0x8f }, -{ 0x00, 0x90, 0x90 }, -{ 0x00, 0x91, 0x91 }, -{ 0x00, 0x92, 0x92 }, -{ 0x00, 0x93, 0x93 }, -{ 0x00, 0x94, 0x94 }, -{ 0x00, 0x95, 0x95 }, -{ 0x00, 0x96, 0x96 }, -{ 0x00, 0x97, 0x97 }, -{ 0x00, 0x98, 0x98 }, -{ 0x00, 0x99, 0x99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9 }, -{ 0x01, 0xda, 0xfa }, -{ 0x01, 0xdb, 0xfb }, -{ 0x01, 0xdc, 0xfc }, -{ 0x01, 0xdd, 0xfd }, -{ 0x01, 0xde, 0xfe }, -{ 0x01, 0xdf, 0xff } -}; - -static struct cs_info koi8u_tbl[] = { -{ 0x00, 0x00, 0x00 }, -{ 0x00, 0x01, 0x01 }, -{ 0x00, 0x02, 0x02 }, -{ 0x00, 0x03, 0x03 }, -{ 0x00, 0x04, 0x04 }, -{ 0x00, 0x05, 0x05 }, -{ 0x00, 0x06, 0x06 }, -{ 0x00, 0x07, 0x07 }, -{ 0x00, 0x08, 0x08 }, -{ 0x00, 0x09, 0x09 }, -{ 0x00, 0x0a, 0x0a }, -{ 0x00, 0x0b, 0x0b }, -{ 0x00, 0x0c, 0x0c }, -{ 0x00, 0x0d, 0x0d }, -{ 0x00, 0x0e, 0x0e }, -{ 0x00, 0x0f, 0x0f }, -{ 0x00, 0x10, 0x10 }, -{ 0x00, 0x11, 0x11 }, -{ 0x00, 0x12, 0x12 }, -{ 0x00, 0x13, 0x13 }, -{ 0x00, 0x14, 0x14 }, -{ 0x00, 0x15, 0x15 }, -{ 0x00, 0x16, 0x16 }, -{ 0x00, 0x17, 0x17 }, -{ 0x00, 0x18, 0x18 }, -{ 0x00, 0x19, 0x19 }, -{ 0x00, 0x1a, 0x1a }, -{ 0x00, 0x1b, 0x1b }, -{ 0x00, 0x1c, 0x1c }, -{ 0x00, 0x1d, 0x1d }, -{ 0x00, 0x1e, 0x1e }, -{ 0x00, 0x1f, 0x1f }, -{ 0x00, 0x20, 0x20 }, -{ 0x00, 0x21, 0x21 }, -{ 0x00, 0x22, 0x22 }, -{ 0x00, 0x23, 0x23 }, -{ 0x00, 0x24, 0x24 }, -{ 0x00, 0x25, 0x25 }, -{ 0x00, 0x26, 0x26 }, -{ 0x00, 0x27, 0x27 }, -{ 0x00, 0x28, 0x28 }, -{ 0x00, 0x29, 0x29 }, -{ 0x00, 0x2a, 0x2a }, -{ 0x00, 0x2b, 0x2b }, -{ 0x00, 0x2c, 0x2c }, -{ 0x00, 0x2d, 0x2d }, -{ 0x00, 0x2e, 0x2e }, -{ 0x00, 0x2f, 0x2f }, -{ 0x00, 0x30, 0x30 }, -{ 0x00, 0x31, 0x31 }, -{ 0x00, 0x32, 0x32 }, -{ 0x00, 0x33, 0x33 }, -{ 0x00, 0x34, 0x34 }, -{ 0x00, 0x35, 0x35 }, -{ 0x00, 0x36, 0x36 }, -{ 0x00, 0x37, 0x37 }, -{ 0x00, 0x38, 0x38 }, -{ 0x00, 0x39, 0x39 }, -{ 0x00, 0x3a, 0x3a }, -{ 0x00, 0x3b, 0x3b }, -{ 0x00, 0x3c, 0x3c }, -{ 0x00, 0x3d, 0x3d }, -{ 0x00, 0x3e, 0x3e }, -{ 0x00, 0x3f, 0x3f }, -{ 0x00, 0x40, 0x40 }, -{ 0x01, 0x61, 0x41 }, -{ 0x01, 0x62, 0x42 }, -{ 0x01, 0x63, 0x43 }, -{ 0x01, 0x64, 0x44 }, -{ 0x01, 0x65, 0x45 }, -{ 0x01, 0x66, 0x46 }, -{ 0x01, 0x67, 0x47 }, -{ 0x01, 0x68, 0x48 }, -{ 0x01, 0x69, 0x49 }, -{ 0x01, 0x6a, 0x4a }, -{ 0x01, 0x6b, 0x4b }, -{ 0x01, 0x6c, 0x4c }, -{ 0x01, 0x6d, 0x4d }, -{ 0x01, 0x6e, 0x4e }, -{ 0x01, 0x6f, 0x4f }, -{ 0x01, 0x70, 0x50 }, -{ 0x01, 0x71, 0x51 }, -{ 0x01, 0x72, 0x52 }, -{ 0x01, 0x73, 0x53 }, -{ 0x01, 0x74, 0x54 }, -{ 0x01, 0x75, 0x55 }, -{ 0x01, 0x76, 0x56 }, -{ 0x01, 0x77, 0x57 }, -{ 0x01, 0x78, 0x58 }, -{ 0x01, 0x79, 0x59 }, -{ 0x01, 0x7a, 0x5a }, -{ 0x00, 0x5b, 0x5b }, -{ 0x00, 0x5c, 0x5c }, -{ 0x00, 0x5d, 0x5d }, -{ 0x00, 0x5e, 0x5e }, -{ 0x00, 0x5f, 0x5f }, -{ 0x00, 0x60, 0x60 }, -{ 0x00, 0x61, 0x41 }, -{ 0x00, 0x62, 0x42 }, -{ 0x00, 0x63, 0x43 }, -{ 0x00, 0x64, 0x44 }, -{ 0x00, 0x65, 0x45 }, -{ 0x00, 0x66, 0x46 }, -{ 0x00, 0x67, 0x47 }, -{ 0x00, 0x68, 0x48 }, -{ 0x00, 0x69, 0x49 }, -{ 0x00, 0x6a, 0x4a }, -{ 0x00, 0x6b, 0x4b }, -{ 0x00, 0x6c, 0x4c }, -{ 0x00, 0x6d, 0x4d }, -{ 0x00, 0x6e, 0x4e }, -{ 0x00, 0x6f, 0x4f }, -{ 0x00, 0x70, 0x50 }, -{ 0x00, 0x71, 0x51 }, -{ 0x00, 0x72, 0x52 }, -{ 0x00, 0x73, 0x53 }, -{ 0x00, 0x74, 0x54 }, -{ 0x00, 0x75, 0x55 }, -{ 0x00, 0x76, 0x56 }, -{ 0x00, 0x77, 0x57 }, -{ 0x00, 0x78, 0x58 }, -{ 0x00, 0x79, 0x59 }, -{ 0x00, 0x7a, 0x5a }, -{ 0x00, 0x7b, 0x7b }, -{ 0x00, 0x7c, 0x7c }, -{ 0x00, 0x7d, 0x7d }, -{ 0x00, 0x7e, 0x7e }, -{ 0x00, 0x7f, 0x7f }, -{ 0x00, 0x80, 0x80 }, -{ 0x00, 0x81, 0x81 }, -{ 0x00, 0x82, 0x82 }, -{ 0x00, 0x83, 0x83 }, -{ 0x00, 0x84, 0x84 }, -{ 0x00, 0x85, 0x85 }, -{ 0x00, 0x86, 0x86 }, -{ 0x00, 0x87, 0x87 }, -{ 0x00, 0x88, 0x88 }, -{ 0x00, 0x89, 0x89 }, -{ 0x00, 0x8a, 0x8a }, -{ 0x00, 0x8b, 0x8b }, -{ 0x00, 0x8c, 0x8c }, -{ 0x00, 0x8d, 0x8d }, -{ 0x00, 0x8e, 0x8e }, -{ 0x00, 0x8f, 0x8f }, -{ 0x00, 0x90, 0x90 }, -{ 0x00, 0x91, 0x91 }, -{ 0x00, 0x92, 0x92 }, -{ 0x00, 0x93, 0x93 }, -{ 0x00, 0x94, 0x94 }, -{ 0x00, 0x95, 0x95 }, -{ 0x00, 0x96, 0x96 }, -{ 0x00, 0x97, 0x97 }, -{ 0x00, 0x98, 0x98 }, -{ 0x00, 0x99, 0x99 }, -{ 0x00, 0x9a, 0x9a }, -{ 0x00, 0x9b, 0x9b }, -{ 0x00, 0x9c, 0x9c }, -{ 0x00, 0x9d, 0x9d }, -{ 0x00, 0x9e, 0x9e }, -{ 0x00, 0x9f, 0x9f }, -{ 0x00, 0xa0, 0xa0 }, -{ 0x00, 0xa1, 0xa1 }, -{ 0x00, 0xa2, 0xa2 }, -{ 0x00, 0xa3, 0xb3 }, -{ 0x00, 0xa4, 0xb4 }, /* ie */ -{ 0x00, 0xa5, 0xa5 }, -{ 0x00, 0xa6, 0xb6 }, /* i */ -{ 0x00, 0xa7, 0xb7 }, /* ii */ -{ 0x00, 0xa8, 0xa8 }, -{ 0x00, 0xa9, 0xa9 }, -{ 0x00, 0xaa, 0xaa }, -{ 0x00, 0xab, 0xab }, -{ 0x00, 0xac, 0xac }, -{ 0x00, 0xad, 0xbd }, /* g'' */ -{ 0x00, 0xae, 0xae }, -{ 0x00, 0xaf, 0xaf }, -{ 0x00, 0xb0, 0xb0 }, -{ 0x00, 0xb1, 0xb1 }, -{ 0x00, 0xb2, 0xb2 }, -{ 0x01, 0xa3, 0xb3 }, -{ 0x00, 0xb4, 0xb4 }, /* IE */ -{ 0x00, 0xb5, 0xb5 }, -{ 0x00, 0xb6, 0xb6 }, /* I */ -{ 0x00, 0xb7, 0xb7 }, /* II */ -{ 0x00, 0xb8, 0xb8 }, -{ 0x00, 0xb9, 0xb9 }, -{ 0x00, 0xba, 0xba }, -{ 0x00, 0xbb, 0xbb }, -{ 0x00, 0xbc, 0xbc }, -{ 0x00, 0xbd, 0xbd }, -{ 0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x01, 0xce, 0xee }, -{ 0x01, 0xcf, 0xef }, -{ 0x01, 0xd0, 0xf0 }, -{ 0x01, 0xd1, 0xf1 }, -{ 0x01, 0xd2, 0xf2 }, -{ 0x01, 0xd3, 0xf3 }, -{ 0x01, 0xd4, 0xf4 }, -{ 0x01, 0xd5, 0xf5 }, -{ 0x01, 0xd6, 0xf6 }, -{ 0x01, 0xd7, 0xf7 }, -{ 0x01, 0xd8, 0xf8 }, -{ 0x01, 0xd9, 0xf9 }, -{ 0x01, 0xda, 0xfa }, -{ 0x01, 0xdb, 0xfb }, -{ 0x01, 0xdc, 0xfc }, -{ 0x01, 0xdd, 0xfd }, -{ 0x01, 0xde, 0xfe }, -{ 0x01, 0xdf, 0xff } -}; - -static struct cs_info cp1251_tbl[] = { -{ 0x00, 0x00, 0x00 }, -{ 0x00, 0x01, 0x01 }, -{ 0x00, 0x02, 0x02 }, -{ 0x00, 0x03, 0x03 }, -{ 0x00, 0x04, 0x04 }, -{ 0x00, 0x05, 0x05 }, -{ 0x00, 0x06, 0x06 }, -{ 0x00, 0x07, 0x07 }, -{ 0x00, 0x08, 0x08 }, -{ 0x00, 0x09, 0x09 }, -{ 0x00, 0x0a, 0x0a }, -{ 0x00, 0x0b, 0x0b }, -{ 0x00, 0x0c, 0x0c }, -{ 0x00, 0x0d, 0x0d }, -{ 0x00, 0x0e, 0x0e }, -{ 0x00, 0x0f, 0x0f }, -{ 0x00, 0x10, 0x10 }, -{ 0x00, 0x11, 0x11 }, -{ 0x00, 0x12, 0x12 }, -{ 0x00, 0x13, 0x13 }, -{ 0x00, 0x14, 0x14 }, -{ 0x00, 0x15, 0x15 }, -{ 0x00, 0x16, 0x16 }, -{ 0x00, 0x17, 0x17 }, -{ 0x00, 0x18, 0x18 }, -{ 0x00, 0x19, 0x19 }, -{ 0x00, 0x1a, 0x1a }, -{ 0x00, 0x1b, 0x1b }, -{ 0x00, 0x1c, 0x1c }, -{ 0x00, 0x1d, 0x1d }, -{ 0x00, 0x1e, 0x1e }, -{ 0x00, 0x1f, 0x1f }, -{ 0x00, 0x20, 0x20 }, -{ 0x00, 0x21, 0x21 }, -{ 0x00, 0x22, 0x22 }, -{ 0x00, 0x23, 0x23 }, -{ 0x00, 0x24, 0x24 }, -{ 0x00, 0x25, 0x25 }, -{ 0x00, 0x26, 0x26 }, -{ 0x00, 0x27, 0x27 }, -{ 0x00, 0x28, 0x28 }, -{ 0x00, 0x29, 0x29 }, -{ 0x00, 0x2a, 0x2a }, -{ 0x00, 0x2b, 0x2b }, -{ 0x00, 0x2c, 0x2c }, -{ 0x00, 0x2d, 0x2d }, -{ 0x00, 0x2e, 0x2e }, -{ 0x00, 0x2f, 0x2f }, -{ 0x00, 0x30, 0x30 }, -{ 0x00, 0x31, 0x31 }, -{ 0x00, 0x32, 0x32 }, -{ 0x00, 0x33, 0x33 }, -{ 0x00, 0x34, 0x34 }, -{ 0x00, 0x35, 0x35 }, -{ 0x00, 0x36, 0x36 }, -{ 0x00, 0x37, 0x37 }, -{ 0x00, 0x38, 0x38 }, -{ 0x00, 0x39, 0x39 }, -{ 0x00, 0x3a, 0x3a }, -{ 0x00, 0x3b, 0x3b }, -{ 0x00, 0x3c, 0x3c }, -{ 0x00, 0x3d, 0x3d }, -{ 0x00, 0x3e, 0x3e }, -{ 0x00, 0x3f, 0x3f }, -{ 0x00, 0x40, 0x40 }, -{ 0x01, 0x61, 0x41 }, -{ 0x01, 0x62, 0x42 }, -{ 0x01, 0x63, 0x43 }, -{ 0x01, 0x64, 0x44 }, -{ 0x01, 0x65, 0x45 }, -{ 0x01, 0x66, 0x46 }, -{ 0x01, 0x67, 0x47 }, -{ 0x01, 0x68, 0x48 }, -{ 0x01, 0x69, 0x49 }, -{ 0x01, 0x6a, 0x4a }, -{ 0x01, 0x6b, 0x4b }, -{ 0x01, 0x6c, 0x4c }, -{ 0x01, 0x6d, 0x4d }, -{ 0x01, 0x6e, 0x4e }, -{ 0x01, 0x6f, 0x4f }, -{ 0x01, 0x70, 0x50 }, -{ 0x01, 0x71, 0x51 }, -{ 0x01, 0x72, 0x52 }, -{ 0x01, 0x73, 0x53 }, -{ 0x01, 0x74, 0x54 }, -{ 0x01, 0x75, 0x55 }, -{ 0x01, 0x76, 0x56 }, -{ 0x01, 0x77, 0x57 }, -{ 0x01, 0x78, 0x58 }, -{ 0x01, 0x79, 0x59 }, -{ 0x01, 0x7a, 0x5a }, -{ 0x00, 0x5b, 0x5b }, -{ 0x00, 0x5c, 0x5c }, -{ 0x00, 0x5d, 0x5d }, -{ 0x00, 0x5e, 0x5e }, -{ 0x00, 0x5f, 0x5f }, -{ 0x00, 0x60, 0x60 }, -{ 0x00, 0x61, 0x41 }, -{ 0x00, 0x62, 0x42 }, -{ 0x00, 0x63, 0x43 }, -{ 0x00, 0x64, 0x44 }, -{ 0x00, 0x65, 0x45 }, -{ 0x00, 0x66, 0x46 }, -{ 0x00, 0x67, 0x47 }, -{ 0x00, 0x68, 0x48 }, -{ 0x00, 0x69, 0x49 }, -{ 0x00, 0x6a, 0x4a }, -{ 0x00, 0x6b, 0x4b }, -{ 0x00, 0x6c, 0x4c }, -{ 0x00, 0x6d, 0x4d }, -{ 0x00, 0x6e, 0x4e }, -{ 0x00, 0x6f, 0x4f }, -{ 0x00, 0x70, 0x50 }, -{ 0x00, 0x71, 0x51 }, -{ 0x00, 0x72, 0x52 }, -{ 0x00, 0x73, 0x53 }, -{ 0x00, 0x74, 0x54 }, -{ 0x00, 0x75, 0x55 }, -{ 0x00, 0x76, 0x56 }, -{ 0x00, 0x77, 0x57 }, -{ 0x00, 0x78, 0x58 }, -{ 0x00, 0x79, 0x59 }, -{ 0x00, 0x7a, 0x5a }, -{ 0x00, 0x7b, 0x7b }, -{ 0x00, 0x7c, 0x7c }, -{ 0x00, 0x7d, 0x7d }, -{ 0x00, 0x7e, 0x7e }, -{ 0x00, 0x7f, 0x7f }, -{ 0x01, 0x90, 0x80 }, -{ 0x01, 0x83, 0x81 }, -{ 0x00, 0x82, 0x82 }, -{ 0x00, 0x83, 0x81 }, -{ 0x00, 0x84, 0x84 }, -{ 0x00, 0x85, 0x85 }, -{ 0x00, 0x86, 0x86 }, -{ 0x00, 0x87, 0x87 }, -{ 0x00, 0x88, 0x88 }, -{ 0x00, 0x89, 0x89 }, -{ 0x01, 0x9a, 0x8a }, -{ 0x00, 0x8b, 0x8b }, -{ 0x01, 0x9c, 0x8c }, -{ 0x01, 0x9d, 0x8d }, -{ 0x01, 0x9e, 0x8e }, -{ 0x01, 0x9f, 0x8f }, -{ 0x00, 0x90, 0x80 }, -{ 0x00, 0x91, 0x91 }, -{ 0x00, 0x92, 0x92 }, -{ 0x00, 0x93, 0x93 }, -{ 0x00, 0x94, 0x94 }, -{ 0x00, 0x95, 0x95 }, -{ 0x00, 0x96, 0x96 }, -{ 0x00, 0x97, 0x97 }, -{ 0x00, 0x98, 0x98 }, -{ 0x00, 0x99, 0x99 }, -{ 0x00, 0x9a, 0x8a }, -{ 0x00, 0x9b, 0x9b }, -{ 0x00, 0x9c, 0x8c }, -{ 0x00, 0x9d, 0x8d }, -{ 0x00, 0x9e, 0x8e }, -{ 0x00, 0x9f, 0x8f }, -{ 0x00, 0xa0, 0xa0 }, -{ 0x01, 0xa2, 0xa1 }, -{ 0x00, 0xa2, 0xa1 }, -{ 0x01, 0xbc, 0xa3 }, -{ 0x00, 0xa4, 0xa4 }, -{ 0x01, 0xb4, 0xa5 }, -{ 0x00, 0xa6, 0xa6 }, -{ 0x00, 0xa7, 0xa7 }, -{ 0x01, 0xb8, 0xa8 }, -{ 0x00, 0xa9, 0xa9 }, -{ 0x01, 0xba, 0xaa }, -{ 0x00, 0xab, 0xab }, -{ 0x00, 0xac, 0xac }, -{ 0x00, 0xad, 0xad }, -{ 0x00, 0xae, 0xae }, -{ 0x01, 0xbf, 0xaf }, -{ 0x00, 0xb0, 0xb0 }, -{ 0x00, 0xb1, 0xb1 }, -{ 0x01, 0xb3, 0xb2 }, -{ 0x00, 0xb3, 0xb2 }, -{ 0x00, 0x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, 0xe4, 0xc4 }, -{ 0x00, 0xe5, 0xc5 }, -{ 0x00, 0xe6, 0xc6 }, -{ 0x00, 0xe7, 0xc7 }, -{ 0x00, 0xe8, 0xc8 }, -{ 0x00, 0xe9, 0xc9 }, -{ 0x00, 0xea, 0xca }, -{ 0x00, 0xeb, 0xcb }, -{ 0x00, 0xec, 0xcc }, -{ 0x00, 0xed, 0xcd }, -{ 0x00, 0xee, 0xce }, -{ 0x00, 0xef, 0xcf }, -{ 0x00, 0xf0, 0xd0 }, -{ 0x00, 0xf1, 0xd1 }, -{ 0x00, 0xf2, 0xd2 }, -{ 0x00, 0xf3, 0xd3 }, -{ 0x00, 0xf4, 0xd4 }, -{ 0x00, 0xf5, 0xd5 }, -{ 0x00, 0xf6, 0xd6 }, -{ 0x00, 0xf7, 0xd7 }, -{ 0x00, 0xf8, 0xd8 }, -{ 0x00, 0xf9, 0xd9 }, -{ 0x00, 0xfa, 0xda }, -{ 0x00, 0xfb, 0xdb }, -{ 0x00, 0xfc, 0xdc }, -{ 0x00, 0xfd, 0xdd }, -{ 0x00, 0xfe, 0xde }, -{ 0x00, 0xff, 0xdf } -}; - -static struct cs_info iso13_tbl[] = { -{ 0x00, 0x00, 0x00 }, -{ 0x00, 0x01, 0x01 }, -{ 0x00, 0x02, 0x02 }, -{ 0x00, 0x03, 0x03 }, -{ 0x00, 0x04, 0x04 }, -{ 0x00, 0x05, 0x05 }, -{ 0x00, 0x06, 0x06 }, -{ 0x00, 0x07, 0x07 }, -{ 0x00, 0x08, 0x08 }, -{ 0x00, 0x09, 0x09 }, -{ 0x00, 0x0A, 0x0A }, -{ 0x00, 0x0B, 0x0B }, -{ 0x00, 0x0C, 0x0C }, -{ 0x00, 0x0D, 0x0D }, -{ 0x00, 0x0E, 0x0E }, -{ 0x00, 0x0F, 0x0F }, -{ 0x00, 0x10, 0x10 }, -{ 0x00, 0x11, 0x11 }, -{ 0x00, 0x12, 0x12 }, -{ 0x00, 0x13, 0x13 }, -{ 0x00, 0x14, 0x14 }, -{ 0x00, 0x15, 0x15 }, -{ 0x00, 0x16, 0x16 }, -{ 0x00, 0x17, 0x17 }, -{ 0x00, 0x18, 0x18 }, -{ 0x00, 0x19, 0x19 }, -{ 0x00, 0x1A, 0x1A }, -{ 0x00, 0x1B, 0x1B }, -{ 0x00, 0x1C, 0x1C }, -{ 0x00, 0x1D, 0x1D }, -{ 0x00, 0x1E, 0x1E }, -{ 0x00, 0x1F, 0x1F }, -{ 0x00, 0x20, 0x20 }, -{ 0x00, 0x21, 0x21 }, -{ 0x00, 0x22, 0x22 }, -{ 0x00, 0x23, 0x23 }, -{ 0x00, 0x24, 0x24 }, -{ 0x00, 0x25, 0x25 }, -{ 0x00, 0x26, 0x26 }, -{ 0x00, 0x27, 0x27 }, -{ 0x00, 0x28, 0x28 }, -{ 0x00, 0x29, 0x29 }, -{ 0x00, 0x2A, 0x2A }, -{ 0x00, 0x2B, 0x2B }, -{ 0x00, 0x2C, 0x2C }, -{ 0x00, 0x2D, 0x2D }, -{ 0x00, 0x2E, 0x2E }, -{ 0x00, 0x2F, 0x2F }, -{ 0x00, 0x30, 0x30 }, -{ 0x00, 0x31, 0x31 }, -{ 0x00, 0x32, 0x32 }, -{ 0x00, 0x33, 0x33 }, -{ 0x00, 0x34, 0x34 }, -{ 0x00, 0x35, 0x35 }, -{ 0x00, 0x36, 0x36 }, -{ 0x00, 0x37, 0x37 }, -{ 0x00, 0x38, 0x38 }, -{ 0x00, 0x39, 0x39 }, -{ 0x00, 0x3A, 0x3A }, -{ 0x00, 0x3B, 0x3B }, -{ 0x00, 0x3C, 0x3C }, -{ 0x00, 0x3D, 0x3D }, -{ 0x00, 0x3E, 0x3E }, -{ 0x00, 0x3F, 0x3F }, -{ 0x00, 0x40, 0x40 }, -{ 0x01, 0x61, 0x41 }, -{ 0x01, 0x62, 0x42 }, -{ 0x01, 0x63, 0x43 }, -{ 0x01, 0x64, 0x44 }, -{ 0x01, 0x65, 0x45 }, -{ 0x01, 0x66, 0x46 }, -{ 0x01, 0x67, 0x47 }, -{ 0x01, 0x68, 0x48 }, -{ 0x01, 0x69, 0x49 }, -{ 0x01, 0x6A, 0x4A }, -{ 0x01, 0x6B, 0x4B }, -{ 0x01, 0x6C, 0x4C }, -{ 0x01, 0x6D, 0x4D }, -{ 0x01, 0x6E, 0x4E }, -{ 0x01, 0x6F, 0x4F }, -{ 0x01, 0x70, 0x50 }, -{ 0x01, 0x71, 0x51 }, -{ 0x01, 0x72, 0x52 }, -{ 0x01, 0x73, 0x53 }, -{ 0x01, 0x74, 0x54 }, -{ 0x01, 0x75, 0x55 }, -{ 0x01, 0x76, 0x56 }, -{ 0x01, 0x77, 0x57 }, -{ 0x01, 0x78, 0x58 }, -{ 0x01, 0x79, 0x59 }, -{ 0x01, 0x7A, 0x5A }, -{ 0x00, 0x5B, 0x5B }, -{ 0x00, 0x5C, 0x5C }, -{ 0x00, 0x5D, 0x5D }, -{ 0x00, 0x5E, 0x5E }, -{ 0x00, 0x5F, 0x5F }, -{ 0x00, 0x60, 0x60 }, -{ 0x00, 0x61, 0x41 }, -{ 0x00, 0x62, 0x42 }, -{ 0x00, 0x63, 0x43 }, -{ 0x00, 0x64, 0x44 }, -{ 0x00, 0x65, 0x45 }, -{ 0x00, 0x66, 0x46 }, -{ 0x00, 0x67, 0x47 }, -{ 0x00, 0x68, 0x48 }, -{ 0x00, 0x69, 0x49 }, -{ 0x00, 0x6A, 0x4A }, -{ 0x00, 0x6B, 0x4B }, -{ 0x00, 0x6C, 0x4C }, -{ 0x00, 0x6D, 0x4D }, -{ 0x00, 0x6E, 0x4E }, -{ 0x00, 0x6F, 0x4F }, -{ 0x00, 0x70, 0x50 }, -{ 0x00, 0x71, 0x51 }, -{ 0x00, 0x72, 0x52 }, -{ 0x00, 0x73, 0x53 }, -{ 0x00, 0x74, 0x54 }, -{ 0x00, 0x75, 0x55 }, -{ 0x00, 0x76, 0x56 }, -{ 0x00, 0x77, 0x57 }, -{ 0x00, 0x78, 0x58 }, -{ 0x00, 0x79, 0x59 }, -{ 0x00, 0x7A, 0x5A }, -{ 0x00, 0x7B, 0x7B }, -{ 0x00, 0x7C, 0x7C }, -{ 0x00, 0x7D, 0x7D }, -{ 0x00, 0x7E, 0x7E }, -{ 0x00, 0x7F, 0x7F }, -{ 0x00, 0x80, 0x80 }, -{ 0x00, 0x81, 0x81 }, -{ 0x00, 0x82, 0x82 }, -{ 0x00, 0x83, 0x83 }, -{ 0x00, 0x84, 0x84 }, -{ 0x00, 0x85, 0x85 }, -{ 0x00, 0x86, 0x86 }, -{ 0x00, 0x87, 0x87 }, -{ 0x00, 0x88, 0x88 }, -{ 0x00, 0x89, 0x89 }, -{ 0x00, 0x8A, 0x8A }, -{ 0x00, 0x8B, 0x8B }, -{ 0x00, 0x8C, 0x8C }, -{ 0x00, 0x8D, 0x8D }, -{ 0x00, 0x8E, 0x8E }, -{ 0x00, 0x8F, 0x8F }, -{ 0x00, 0x90, 0x90 }, -{ 0x00, 0x91, 0x91 }, -{ 0x00, 0x92, 0x92 }, -{ 0x00, 0x93, 0x93 }, -{ 0x00, 0x94, 0x94 }, -{ 0x00, 0x95, 0x95 }, -{ 0x00, 0x96, 0x96 }, -{ 0x00, 0x97, 0x97 }, -{ 0x00, 0x98, 0x98 }, -{ 0x00, 0x99, 0x99 }, -{ 0x00, 0x9A, 0x9A }, -{ 0x00, 0x9B, 0x9B }, -{ 0x00, 0x9C, 0x9C }, -{ 0x00, 0x9D, 0x9D }, -{ 0x00, 0x9E, 0x9E }, -{ 0x00, 0x9F, 0x9F }, -{ 0x00, 0xA0, 0xA0 }, -{ 0x00, 0xA1, 0xA1 }, -{ 0x00, 0xA2, 0xA2 }, -{ 0x00, 0xA3, 0xA3 }, -{ 0x00, 0xA4, 0xA4 }, -{ 0x00, 0xA5, 0xA5 }, -{ 0x00, 0xA6, 0xA6 }, -{ 0x00, 0xA7, 0xA7 }, -{ 0x01, 0xB8, 0xA8 }, -{ 0x00, 0xA9, 0xA9 }, -{ 0x01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xD9 }, -{ 0x01, 0xFA, 0xDA }, -{ 0x01, 0xFB, 0xDB }, -{ 0x01, 0xFC, 0xDC }, -{ 0x01, 0xFD, 0xDD }, -{ 0x01, 0xFE, 0xDE }, -{ 0x00, 0xDF, 0xDF }, -{ 0x00, 0xE0, 0xC0 }, -{ 0x00, 0xE1, 0xC1 }, -{ 0x00, 0xE2, 0xC2 }, -{ 0x00, 0xE3, 0xC3 }, -{ 0x00, 0xE4, 0xC4 }, -{ 0x00, 0xE5, 0xC5 }, -{ 0x00, 0xE6, 0xC6 }, -{ 0x00, 0xE7, 0xC7 }, -{ 0x00, 0xE8, 0xC8 }, -{ 0x00, 0xE9, 0xC9 }, -{ 0x00, 0xEA, 0xCA }, -{ 0x00, 0xEB, 0xCB }, -{ 0x00, 0xEC, 0xCC }, -{ 0x00, 0xED, 0xCD }, -{ 0x00, 0xEE, 0xCE }, -{ 0x00, 0xEF, 0xCF }, -{ 0x00, 0xF0, 0xD0 }, -{ 0x00, 0xF1, 0xD1 }, -{ 0x00, 0xF2, 0xD2 }, -{ 0x00, 0xF3, 0xD3 }, -{ 0x00, 0xF4, 0xD4 }, -{ 0x00, 0xF5, 0xD5 }, -{ 0x00, 0xF6, 0xD6 }, -{ 0x00, 0xF7, 0xF7 }, -{ 0x00, 0xF8, 0xD8 }, -{ 0x00, 0xF9, 0xD9 }, -{ 0x00, 0xFA, 0xDA }, -{ 0x00, 0xFB, 0xDB }, -{ 0x00, 0xFC, 0xDC }, -{ 0x00, 0xFD, 0xDD }, -{ 0x00, 0xFE, 0xDE }, -{ 0x00, 0xFF, 0xFF } -}; - - -static struct cs_info iso14_tbl[] = { -{ 0x00, 0x00, 0x00 }, -{ 0x00, 0x01, 0x01 }, -{ 0x00, 0x02, 0x02 }, -{ 0x00, 0x03, 0x03 }, -{ 0x00, 0x04, 0x04 }, -{ 0x00, 0x05, 0x05 }, -{ 0x00, 0x06, 0x06 }, -{ 0x00, 0x07, 0x07 }, -{ 0x00, 0x08, 0x08 }, -{ 0x00, 0x09, 0x09 }, -{ 0x00, 0x0a, 0x0a }, -{ 0x00, 0x0b, 0x0b }, -{ 0x00, 0x0c, 0x0c }, -{ 0x00, 0x0d, 0x0d }, -{ 0x00, 0x0e, 0x0e }, -{ 0x00, 0x0f, 0x0f }, -{ 0x00, 0x10, 0x10 }, -{ 0x00, 0x11, 0x11 }, -{ 0x00, 0x12, 0x12 }, -{ 0x00, 0x13, 0x13 }, -{ 0x00, 0x14, 0x14 }, -{ 0x00, 0x15, 0x15 }, -{ 0x00, 0x16, 0x16 }, -{ 0x00, 0x17, 0x17 }, -{ 0x00, 0x18, 0x18 }, -{ 0x00, 0x19, 0x19 }, -{ 0x00, 0x1a, 0x1a }, -{ 0x00, 0x1b, 0x1b }, -{ 0x00, 0x1c, 0x1c }, -{ 0x00, 0x1d, 0x1d }, -{ 0x00, 0x1e, 0x1e }, -{ 0x00, 0x1f, 0x1f }, -{ 0x00, 0x20, 0x20 }, -{ 0x00, 0x21, 0x21 }, -{ 0x00, 0x22, 0x22 }, -{ 0x00, 0x23, 0x23 }, -{ 0x00, 0x24, 0x24 }, -{ 0x00, 0x25, 0x25 }, -{ 0x00, 0x26, 0x26 }, -{ 0x00, 0x27, 0x27 }, -{ 0x00, 0x28, 0x28 }, -{ 0x00, 0x29, 0x29 }, -{ 0x00, 0x2a, 0x2a }, -{ 0x00, 0x2b, 0x2b }, -{ 0x00, 0x2c, 0x2c }, -{ 0x00, 0x2d, 0x2d }, -{ 0x00, 0x2e, 0x2e }, -{ 0x00, 0x2f, 0x2f }, -{ 0x00, 0x30, 0x30 }, -{ 0x00, 0x31, 0x31 }, -{ 0x00, 0x32, 0x32 }, -{ 0x00, 0x33, 0x33 }, -{ 0x00, 0x34, 0x34 }, -{ 0x00, 0x35, 0x35 }, -{ 0x00, 0x36, 0x36 }, -{ 0x00, 0x37, 0x37 }, -{ 0x00, 0x38, 0x38 }, -{ 0x00, 0x39, 0x39 }, -{ 0x00, 0x3a, 0x3a }, -{ 0x00, 0x3b, 0x3b }, -{ 0x00, 0x3c, 0x3c }, -{ 0x00, 0x3d, 0x3d }, -{ 0x00, 0x3e, 0x3e }, -{ 0x00, 0x3f, 0x3f }, -{ 0x00, 0x40, 0x40 }, -{ 0x01, 0x61, 0x41 }, -{ 0x01, 0x62, 0x42 }, -{ 0x01, 0x63, 0x43 }, -{ 0x01, 0x64, 0x44 }, -{ 0x01, 0x65, 0x45 }, -{ 0x01, 0x66, 0x46 }, -{ 0x01, 0x67, 0x47 }, -{ 0x01, 0x68, 0x48 }, -{ 0x01, 0x69, 0x49 }, -{ 0x01, 0x6a, 0x4a }, -{ 0x01, 0x6b, 0x4b }, -{ 0x01, 0x6c, 0x4c }, -{ 0x01, 0x6d, 0x4d }, -{ 0x01, 0x6e, 0x4e }, -{ 0x01, 0x6f, 0x4f }, -{ 0x01, 0x70, 0x50 }, -{ 0x01, 0x71, 0x51 }, -{ 0x01, 0x72, 0x52 }, -{ 0x01, 0x73, 0x53 }, -{ 0x01, 0x74, 0x54 }, -{ 0x01, 0x75, 0x55 }, -{ 0x01, 0x76, 0x56 }, -{ 0x01, 0x77, 0x57 }, -{ 0x01, 0x78, 0x58 }, -{ 0x01, 0x79, 0x59 }, -{ 0x01, 0x7a, 0x5a }, -{ 0x00, 0x5b, 0x5b }, -{ 0x00, 0x5c, 0x5c }, -{ 0x00, 0x5d, 0x5d }, -{ 0x00, 0x5e, 0x5e }, -{ 0x00, 0x5f, 0x5f }, -{ 0x00, 0x60, 0x60 }, -{ 0x00, 0x61, 0x41 }, -{ 0x00, 0x62, 0x42 }, -{ 0x00, 0x63, 0x43 }, -{ 0x00, 0x64, 0x44 }, -{ 0x00, 0x65, 0x45 }, -{ 0x00, 0x66, 0x46 }, -{ 0x00, 0x67, 0x47 }, -{ 0x00, 0x68, 0x48 }, -{ 0x00, 0x69, 0x49 }, -{ 0x00, 0x6a, 0x4a }, -{ 0x00, 0x6b, 0x4b }, -{ 0x00, 0x6c, 0x4c }, -{ 0x00, 0x6d, 0x4d }, -{ 0x00, 0x6e, 0x4e }, -{ 0x00, 0x6f, 0x4f }, -{ 0x00, 0x70, 0x50 }, -{ 0x00, 0x71, 0x51 }, -{ 0x00, 0x72, 0x52 }, -{ 0x00, 0x73, 0x53 }, -{ 0x00, 0x74, 0x54 }, -{ 0x00, 0x75, 0x55 }, -{ 0x00, 0x76, 0x56 }, -{ 0x00, 0x77, 0x57 }, -{ 0x00, 0x78, 0x58 }, -{ 0x00, 0x79, 0x59 }, -{ 0x00, 0x7a, 0x5a }, -{ 0x00, 0x7b, 0x7b }, -{ 0x00, 0x7c, 0x7c }, -{ 0x00, 0x7d, 0x7d }, -{ 0x00, 0x7e, 0x7e }, -{ 0x00, 0x7f, 0x7f }, -{ 0x00, 0x80, 0x80 }, -{ 0x00, 0x81, 0x81 }, -{ 0x00, 0x82, 0x82 }, -{ 0x00, 0x83, 0x83 }, -{ 0x00, 0x84, 0x84 }, -{ 0x00, 0x85, 0x85 }, -{ 0x00, 0x86, 0x86 }, -{ 0x00, 0x87, 0x87 }, -{ 0x00, 0x88, 0x88 }, -{ 0x00, 0x89, 0x89 }, -{ 0x00, 0x8a, 0x8a }, -{ 0x00, 0x8b, 0x8b }, -{ 0x00, 0x8c, 0x8c }, -{ 0x00, 0x8d, 0x8d }, -{ 0x00, 0x8e, 0x8e }, -{ 0x00, 0x8f, 0x8f }, -{ 0x00, 0x90, 0x90 }, -{ 0x00, 0x91, 0x91 }, -{ 0x00, 0x92, 0x92 }, -{ 0x00, 0x93, 0x93 }, -{ 0x00, 0x94, 0x94 }, -{ 0x00, 0x95, 0x95 }, -{ 0x00, 0x96, 0x96 }, -{ 0x00, 0x97, 0x97 }, -{ 0x00, 0x98, 0x98 }, -{ 0x00, 0x99, 0x99 }, -{ 0x00, 0x9a, 0x9a }, -{ 0x00, 0x9b, 0x9b }, -{ 0x00, 0x9c, 0x9c }, -{ 0x00, 0x9d, 0x9d }, -{ 0x00, 0x9e, 0x9e }, -{ 0x00, 0x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, 0xff } -}; - -static struct cs_info iso15_tbl[] = { -{ 0x00, 0x00, 0x00 }, -{ 0x00, 0x01, 0x01 }, -{ 0x00, 0x02, 0x02 }, -{ 0x00, 0x03, 0x03 }, -{ 0x00, 0x04, 0x04 }, -{ 0x00, 0x05, 0x05 }, -{ 0x00, 0x06, 0x06 }, -{ 0x00, 0x07, 0x07 }, -{ 0x00, 0x08, 0x08 }, -{ 0x00, 0x09, 0x09 }, -{ 0x00, 0x0a, 0x0a }, -{ 0x00, 0x0b, 0x0b }, -{ 0x00, 0x0c, 0x0c }, -{ 0x00, 0x0d, 0x0d }, -{ 0x00, 0x0e, 0x0e }, -{ 0x00, 0x0f, 0x0f }, -{ 0x00, 0x10, 0x10 }, -{ 0x00, 0x11, 0x11 }, -{ 0x00, 0x12, 0x12 }, -{ 0x00, 0x13, 0x13 }, -{ 0x00, 0x14, 0x14 }, -{ 0x00, 0x15, 0x15 }, -{ 0x00, 0x16, 0x16 }, -{ 0x00, 0x17, 0x17 }, -{ 0x00, 0x18, 0x18 }, -{ 0x00, 0x19, 0x19 }, -{ 0x00, 0x1a, 0x1a }, -{ 0x00, 0x1b, 0x1b }, -{ 0x00, 0x1c, 0x1c }, -{ 0x00, 0x1d, 0x1d }, -{ 0x00, 0x1e, 0x1e }, -{ 0x00, 0x1f, 0x1f }, -{ 0x00, 0x20, 0x20 }, -{ 0x00, 0x21, 0x21 }, -{ 0x00, 0x22, 0x22 }, -{ 0x00, 0x23, 0x23 }, -{ 0x00, 0x24, 0x24 }, -{ 0x00, 0x25, 0x25 }, -{ 0x00, 0x26, 0x26 }, -{ 0x00, 0x27, 0x27 }, -{ 0x00, 0x28, 0x28 }, -{ 0x00, 0x29, 0x29 }, -{ 0x00, 0x2a, 0x2a }, -{ 0x00, 0x2b, 0x2b }, -{ 0x00, 0x2c, 0x2c }, -{ 0x00, 0x2d, 0x2d }, -{ 0x00, 0x2e, 0x2e }, -{ 0x00, 0x2f, 0x2f }, -{ 0x00, 0x30, 0x30 }, -{ 0x00, 0x31, 0x31 }, -{ 0x00, 0x32, 0x32 }, -{ 0x00, 0x33, 0x33 }, -{ 0x00, 0x34, 0x34 }, -{ 0x00, 0x35, 0x35 }, -{ 0x00, 0x36, 0x36 }, -{ 0x00, 0x37, 0x37 }, -{ 0x00, 0x38, 0x38 }, -{ 0x00, 0x39, 0x39 }, -{ 0x00, 0x3a, 0x3a }, -{ 0x00, 0x3b, 0x3b }, -{ 0x00, 0x3c, 0x3c }, -{ 0x00, 0x3d, 0x3d }, -{ 0x00, 0x3e, 0x3e }, -{ 0x00, 0x3f, 0x3f }, -{ 0x00, 0x40, 0x40 }, -{ 0x01, 0x61, 0x41 }, -{ 0x01, 0x62, 0x42 }, -{ 0x01, 0x63, 0x43 }, -{ 0x01, 0x64, 0x44 }, -{ 0x01, 0x65, 0x45 }, -{ 0x01, 0x66, 0x46 }, -{ 0x01, 0x67, 0x47 }, -{ 0x01, 0x68, 0x48 }, -{ 0x01, 0x69, 0x49 }, -{ 0x01, 0x6a, 0x4a }, -{ 0x01, 0x6b, 0x4b }, -{ 0x01, 0x6c, 0x4c }, -{ 0x01, 0x6d, 0x4d }, -{ 0x01, 0x6e, 0x4e }, -{ 0x01, 0x6f, 0x4f }, -{ 0x01, 0x70, 0x50 }, -{ 0x01, 0x71, 0x51 }, -{ 0x01, 0x72, 0x52 }, -{ 0x01, 0x73, 0x53 }, -{ 0x01, 0x74, 0x54 }, -{ 0x01, 0x75, 0x55 }, -{ 0x01, 0x76, 0x56 }, -{ 0x01, 0x77, 0x57 }, -{ 0x01, 0x78, 0x58 }, -{ 0x01, 0x79, 0x59 }, -{ 0x01, 0x7a, 0x5a }, -{ 0x00, 0x5b, 0x5b }, -{ 0x00, 0x5c, 0x5c }, -{ 0x00, 0x5d, 0x5d }, -{ 0x00, 0x5e, 0x5e }, -{ 0x00, 0x5f, 0x5f }, -{ 0x00, 0x60, 0x60 }, -{ 0x00, 0x61, 0x41 }, -{ 0x00, 0x62, 0x42 }, -{ 0x00, 0x63, 0x43 }, -{ 0x00, 0x64, 0x44 }, -{ 0x00, 0x65, 0x45 }, -{ 0x00, 0x66, 0x46 }, -{ 0x00, 0x67, 0x47 }, -{ 0x00, 0x68, 0x48 }, -{ 0x00, 0x69, 0x49 }, -{ 0x00, 0x6a, 0x4a }, -{ 0x00, 0x6b, 0x4b }, -{ 0x00, 0x6c, 0x4c }, -{ 0x00, 0x6d, 0x4d }, -{ 0x00, 0x6e, 0x4e }, -{ 0x00, 0x6f, 0x4f }, -{ 0x00, 0x70, 0x50 }, -{ 0x00, 0x71, 0x51 }, -{ 0x00, 0x72, 0x52 }, -{ 0x00, 0x73, 0x53 }, -{ 0x00, 0x74, 0x54 }, -{ 0x00, 0x75, 0x55 }, -{ 0x00, 0x76, 0x56 }, -{ 0x00, 0x77, 0x57 }, -{ 0x00, 0x78, 0x58 }, -{ 0x00, 0x79, 0x59 }, -{ 0x00, 0x7a, 0x5a }, -{ 0x00, 0x7b, 0x7b }, -{ 0x00, 0x7c, 0x7c }, -{ 0x00, 0x7d, 0x7d }, -{ 0x00, 0x7e, 0x7e }, -{ 0x00, 0x7f, 0x7f }, -{ 0x00, 0x80, 0x80 }, -{ 0x00, 0x81, 0x81 }, -{ 0x00, 0x82, 0x82 }, -{ 0x00, 0x83, 0x83 }, -{ 0x00, 0x84, 0x84 }, -{ 0x00, 0x85, 0x85 }, -{ 0x00, 0x86, 0x86 }, -{ 0x00, 0x87, 0x87 }, -{ 0x00, 0x88, 0x88 }, -{ 0x00, 0x89, 0x89 }, -{ 0x00, 0x8a, 0x8a }, -{ 0x00, 0x8b, 0x8b }, -{ 0x00, 0x8c, 0x8c }, -{ 0x00, 0x8d, 0x8d }, -{ 0x00, 0x8e, 0x8e }, -{ 0x00, 0x8f, 0x8f }, -{ 0x00, 0x90, 0x90 }, -{ 0x00, 0x91, 0x91 }, -{ 0x00, 0x92, 0x92 }, -{ 0x00, 0x93, 0x93 }, -{ 0x00, 0x94, 0x94 }, -{ 0x00, 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5 }, -{ 0x00, 0xf6, 0xd6 }, -{ 0x00, 0xf7, 0xf7 }, -{ 0x00, 0xf8, 0xd8 }, -{ 0x00, 0xf9, 0xd9 }, -{ 0x00, 0xfa, 0xda }, -{ 0x00, 0xfb, 0xdb }, -{ 0x00, 0xfc, 0xdc }, -{ 0x00, 0xfd, 0xdd }, -{ 0x00, 0xfe, 0xde }, -{ 0x00, 0xff, 0xbe } -}; - -static struct cs_info iscii_devanagari_tbl[] = { -{ 0x00, 0x00, 0x00 }, -{ 0x00, 0x01, 0x01 }, -{ 0x00, 0x02, 0x02 }, -{ 0x00, 0x03, 0x03 }, -{ 0x00, 0x04, 0x04 }, -{ 0x00, 0x05, 0x05 }, -{ 0x00, 0x06, 0x06 }, -{ 0x00, 0x07, 0x07 }, -{ 0x00, 0x08, 0x08 }, -{ 0x00, 0x09, 0x09 }, -{ 0x00, 0x0a, 0x0a }, -{ 0x00, 0x0b, 0x0b }, -{ 0x00, 0x0c, 0x0c }, -{ 0x00, 0x0d, 0x0d }, -{ 0x00, 0x0e, 0x0e }, -{ 0x00, 0x0f, 0x0f }, -{ 0x00, 0x10, 0x10 }, -{ 0x00, 0x11, 0x11 }, -{ 0x00, 0x12, 0x12 }, -{ 0x00, 0x13, 0x13 }, -{ 0x00, 0x14, 0x14 }, -{ 0x00, 0x15, 0x15 }, -{ 0x00, 0x16, 0x16 }, -{ 0x00, 0x17, 0x17 }, -{ 0x00, 0x18, 0x18 }, -{ 0x00, 0x19, 0x19 }, -{ 0x00, 0x1a, 0x1a }, -{ 0x00, 0x1b, 0x1b }, -{ 0x00, 0x1c, 0x1c }, -{ 0x00, 0x1d, 0x1d }, -{ 0x00, 0x1e, 0x1e }, -{ 0x00, 0x1f, 0x1f }, -{ 0x00, 0x20, 0x20 }, -{ 0x00, 0x21, 0x21 }, -{ 0x00, 0x22, 0x22 }, -{ 0x00, 0x23, 0x23 }, -{ 0x00, 0x24, 0x24 }, -{ 0x00, 0x25, 0x25 }, -{ 0x00, 0x26, 0x26 }, -{ 0x00, 0x27, 0x27 }, -{ 0x00, 0x28, 0x28 }, -{ 0x00, 0x29, 0x29 }, -{ 0x00, 0x2a, 0x2a }, -{ 0x00, 0x2b, 0x2b }, -{ 0x00, 0x2c, 0x2c }, -{ 0x00, 0x2d, 0x2d }, -{ 0x00, 0x2e, 0x2e }, -{ 0x00, 0x2f, 0x2f }, -{ 0x00, 0x30, 0x30 }, -{ 0x00, 0x31, 0x31 }, -{ 0x00, 0x32, 0x32 }, -{ 0x00, 0x33, 0x33 }, -{ 0x00, 0x34, 0x34 }, -{ 0x00, 0x35, 0x35 }, -{ 0x00, 0x36, 0x36 }, -{ 0x00, 0x37, 0x37 }, -{ 0x00, 0x38, 0x38 }, -{ 0x00, 0x39, 0x39 }, -{ 0x00, 0x3a, 0x3a }, -{ 0x00, 0x3b, 0x3b }, -{ 0x00, 0x3c, 0x3c }, -{ 0x00, 0x3d, 0x3d }, -{ 0x00, 0x3e, 0x3e }, -{ 0x00, 0x3f, 0x3f }, -{ 0x00, 0x40, 0x40 }, -{ 0x01, 0x61, 0x41 }, -{ 0x01, 0x62, 0x42 }, -{ 0x01, 0x63, 0x43 }, -{ 0x01, 0x64, 0x44 }, -{ 0x01, 0x65, 0x45 }, -{ 0x01, 0x66, 0x46 }, -{ 0x01, 0x67, 0x47 }, -{ 0x01, 0x68, 0x48 }, -{ 0x01, 0x69, 0x49 }, -{ 0x01, 0x6a, 0x4a }, -{ 0x01, 0x6b, 0x4b }, -{ 0x01, 0x6c, 0x4c }, -{ 0x01, 0x6d, 0x4d }, -{ 0x01, 0x6e, 0x4e }, -{ 0x01, 0x6f, 0x4f }, -{ 0x01, 0x70, 0x50 }, -{ 0x01, 0x71, 0x51 }, -{ 0x01, 0x72, 0x52 }, -{ 0x01, 0x73, 0x53 }, -{ 0x01, 0x74, 0x54 }, -{ 0x01, 0x75, 0x55 }, -{ 0x01, 0x76, 0x56 }, -{ 0x01, 0x77, 0x57 }, -{ 0x01, 0x78, 0x58 }, -{ 0x01, 0x79, 0x59 }, -{ 0x01, 0x7a, 0x5a }, -{ 0x00, 0x5b, 0x5b }, -{ 0x00, 0x5c, 0x5c }, -{ 0x00, 0x5d, 0x5d }, -{ 0x00, 0x5e, 0x5e }, -{ 0x00, 0x5f, 0x5f }, -{ 0x00, 0x60, 0x60 }, -{ 0x00, 0x61, 0x41 }, -{ 0x00, 0x62, 0x42 }, -{ 0x00, 0x63, 0x43 }, -{ 0x00, 0x64, 0x44 }, -{ 0x00, 0x65, 0x45 }, -{ 0x00, 0x66, 0x46 }, -{ 0x00, 0x67, 0x47 }, -{ 0x00, 0x68, 0x48 }, -{ 0x00, 0x69, 0x49 }, -{ 0x00, 0x6a, 0x4a }, -{ 0x00, 0x6b, 0x4b }, -{ 0x00, 0x6c, 0x4c }, -{ 0x00, 0x6d, 0x4d }, -{ 0x00, 0x6e, 0x4e }, -{ 0x00, 0x6f, 0x4f }, -{ 0x00, 0x70, 0x50 }, -{ 0x00, 0x71, 0x51 }, -{ 0x00, 0x72, 0x52 }, -{ 0x00, 0x73, 0x53 }, -{ 0x00, 0x74, 0x54 }, -{ 0x00, 0x75, 0x55 }, -{ 0x00, 0x76, 0x56 }, -{ 0x00, 0x77, 0x57 }, -{ 0x00, 0x78, 0x58 }, -{ 0x00, 0x79, 0x59 }, -{ 0x00, 0x7a, 0x5a }, -{ 0x00, 0x7b, 0x7b }, -{ 0x00, 0x7c, 0x7c }, -{ 0x00, 0x7d, 0x7d }, -{ 0x00, 0x7e, 0x7e }, -{ 0x00, 0x7f, 0x7f }, -{ 0x00, 0x80, 0x80 }, -{ 0x00, 0x81, 0x81 }, -{ 0x00, 0x82, 0x82 }, -{ 0x00, 0x83, 0x83 }, -{ 0x00, 0x84, 0x84 }, -{ 0x00, 0x85, 0x85 }, -{ 0x00, 0x86, 0x86 }, -{ 0x00, 0x87, 0x87 }, -{ 0x00, 0x88, 0x88 }, -{ 0x00, 0x89, 0x89 }, -{ 0x00, 0x8a, 0x8a }, -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, 0xeb }, -{ 0x00, 0xec, 0xec }, -{ 0x00, 0xed, 0xed }, -{ 0x00, 0xee, 0xee }, -{ 0x00, 0xef, 0xef }, -{ 0x00, 0xf0, 0xf0 }, -{ 0x00, 0xf1, 0xf1 }, -{ 0x00, 0xf2, 0xf2 }, -{ 0x00, 0xf3, 0xf3 }, -{ 0x00, 0xf4, 0xf4 }, -{ 0x00, 0xf5, 0xf5 }, -{ 0x00, 0xf6, 0xf6 }, -{ 0x00, 0xf7, 0xf7 }, -{ 0x00, 0xf8, 0xf8 }, -{ 0x00, 0xf9, 0xf9 }, -{ 0x00, 0xfa, 0xfa }, -{ 0x00, 0xfb, 0xfb }, -{ 0x00, 0xfc, 0xfc }, -{ 0x00, 0xfd, 0xfd }, -{ 0x00, 0xfe, 0xfe }, -{ 0x00, 0xff, 0xff } -}; - -static struct cs_info tis620_tbl[] = { -{ 0x00, 0x00, 0x00 }, -{ 0x00, 0x01, 0x01 }, -{ 0x00, 0x02, 0x02 }, -{ 0x00, 0x03, 0x03 }, -{ 0x00, 0x04, 0x04 }, -{ 0x00, 0x05, 0x05 }, -{ 0x00, 0x06, 0x06 }, -{ 0x00, 0x07, 0x07 }, -{ 0x00, 0x08, 0x08 }, -{ 0x00, 0x09, 0x09 }, -{ 0x00, 0x0a, 0x0a }, -{ 0x00, 0x0b, 0x0b }, -{ 0x00, 0x0c, 0x0c }, -{ 0x00, 0x0d, 0x0d }, -{ 0x00, 0x0e, 0x0e }, -{ 0x00, 0x0f, 0x0f }, -{ 0x00, 0x10, 0x10 }, -{ 0x00, 0x11, 0x11 }, -{ 0x00, 0x12, 0x12 }, -{ 0x00, 0x13, 0x13 }, -{ 0x00, 0x14, 0x14 }, -{ 0x00, 0x15, 0x15 }, -{ 0x00, 0x16, 0x16 }, -{ 0x00, 0x17, 0x17 }, -{ 0x00, 0x18, 0x18 }, -{ 0x00, 0x19, 0x19 }, -{ 0x00, 0x1a, 0x1a }, -{ 0x00, 0x1b, 0x1b }, -{ 0x00, 0x1c, 0x1c }, -{ 0x00, 0x1d, 0x1d }, -{ 0x00, 0x1e, 0x1e }, -{ 0x00, 0x1f, 0x1f }, -{ 0x00, 0x20, 0x20 }, -{ 0x00, 0x21, 0x21 }, -{ 0x00, 0x22, 0x22 }, -{ 0x00, 0x23, 0x23 }, -{ 0x00, 0x24, 0x24 }, -{ 0x00, 0x25, 0x25 }, -{ 0x00, 0x26, 0x26 }, -{ 0x00, 0x27, 0x27 }, -{ 0x00, 0x28, 0x28 }, -{ 0x00, 0x29, 0x29 }, -{ 0x00, 0x2a, 0x2a }, -{ 0x00, 0x2b, 0x2b }, -{ 0x00, 0x2c, 0x2c }, -{ 0x00, 0x2d, 0x2d }, -{ 0x00, 0x2e, 0x2e }, -{ 0x00, 0x2f, 0x2f }, -{ 0x00, 0x30, 0x30 }, -{ 0x00, 0x31, 0x31 }, -{ 0x00, 0x32, 0x32 }, -{ 0x00, 0x33, 0x33 }, -{ 0x00, 0x34, 0x34 }, -{ 0x00, 0x35, 0x35 }, -{ 0x00, 0x36, 0x36 }, -{ 0x00, 0x37, 0x37 }, -{ 0x00, 0x38, 0x38 }, -{ 0x00, 0x39, 0x39 }, -{ 0x00, 0x3a, 0x3a }, -{ 0x00, 0x3b, 0x3b }, -{ 0x00, 0x3c, 0x3c }, -{ 0x00, 0x3d, 0x3d }, -{ 0x00, 0x3e, 0x3e }, -{ 0x00, 0x3f, 0x3f }, -{ 0x00, 0x40, 0x40 }, -{ 0x01, 0x61, 0x41 }, -{ 0x01, 0x62, 0x42 }, -{ 0x01, 0x63, 0x43 }, -{ 0x01, 0x64, 0x44 }, -{ 0x01, 0x65, 0x45 }, -{ 0x01, 0x66, 0x46 }, -{ 0x01, 0x67, 0x47 }, -{ 0x01, 0x68, 0x48 }, -{ 0x01, 0x69, 0x49 }, -{ 0x01, 0x6a, 0x4a }, -{ 0x01, 0x6b, 0x4b }, -{ 0x01, 0x6c, 0x4c }, -{ 0x01, 0x6d, 0x4d }, -{ 0x01, 0x6e, 0x4e }, -{ 0x01, 0x6f, 0x4f }, -{ 0x01, 0x70, 0x50 }, -{ 0x01, 0x71, 0x51 }, -{ 0x01, 0x72, 0x52 }, -{ 0x01, 0x73, 0x53 }, -{ 0x01, 0x74, 0x54 }, -{ 0x01, 0x75, 0x55 }, -{ 0x01, 0x76, 0x56 }, -{ 0x01, 0x77, 0x57 }, -{ 0x01, 0x78, 0x58 }, -{ 0x01, 0x79, 0x59 }, -{ 0x01, 0x7a, 0x5a }, -{ 0x00, 0x5b, 0x5b }, -{ 0x00, 0x5c, 0x5c }, -{ 0x00, 0x5d, 0x5d }, -{ 0x00, 0x5e, 0x5e }, -{ 0x00, 0x5f, 0x5f }, -{ 0x00, 0x60, 0x60 }, -{ 0x00, 0x61, 0x41 }, -{ 0x00, 0x62, 0x42 }, -{ 0x00, 0x63, 0x43 }, -{ 0x00, 0x64, 0x44 }, -{ 0x00, 0x65, 0x45 }, -{ 0x00, 0x66, 0x46 }, -{ 0x00, 0x67, 0x47 }, -{ 0x00, 0x68, 0x48 }, -{ 0x00, 0x69, 0x49 }, -{ 0x00, 0x6a, 0x4a }, -{ 0x00, 0x6b, 0x4b }, -{ 0x00, 0x6c, 0x4c }, -{ 0x00, 0x6d, 0x4d }, -{ 0x00, 0x6e, 0x4e }, -{ 0x00, 0x6f, 0x4f }, -{ 0x00, 0x70, 0x50 }, -{ 0x00, 0x71, 0x51 }, -{ 0x00, 0x72, 0x52 }, -{ 0x00, 0x73, 0x53 }, -{ 0x00, 0x74, 0x54 }, -{ 0x00, 0x75, 0x55 }, -{ 0x00, 0x76, 0x56 }, -{ 0x00, 0x77, 0x57 }, -{ 0x00, 0x78, 0x58 }, -{ 0x00, 0x79, 0x59 }, -{ 0x00, 0x7a, 0x5a }, -{ 0x00, 0x7b, 0x7b }, -{ 0x00, 0x7c, 0x7c }, -{ 0x00, 0x7d, 0x7d }, -{ 0x00, 0x7e, 0x7e }, -{ 0x00, 0x7f, 0x7f }, -{ 0x00, 0x80, 0x80 }, -{ 0x00, 0x81, 0x81 }, -{ 0x00, 0x82, 0x82 }, -{ 0x00, 0x83, 0x83 }, -{ 0x00, 0x84, 0x84 }, -{ 0x00, 0x85, 0x85 }, -{ 0x00, 0x86, 0x86 }, -{ 0x00, 0x87, 0x87 }, -{ 0x00, 0x88, 0x88 }, -{ 0x00, 0x89, 0x89 }, -{ 0x00, 0x8a, 0x8a }, -{ 0x00, 0x8b, 0x8b }, -{ 0x00, 0x8c, 0x8c }, -{ 0x00, 0x8d, 0x8d }, -{ 0x00, 0x8e, 0x8e }, -{ 0x00, 0x8f, 0x8f }, -{ 0x00, 0x90, 0x90 }, -{ 0x00, 0x91, 0x91 }, -{ 0x00, 0x92, 0x92 }, -{ 0x00, 0x93, 0x93 }, -{ 0x00, 0x94, 0x94 }, -{ 0x00, 0x95, 0x95 }, -{ 0x00, 0x96, 0x96 }, -{ 0x00, 0x97, 0x97 }, -{ 0x00, 0x98, 0x98 }, -{ 0x00, 0x99, 0x99 }, -{ 0x00, 0x9a, 0x9a }, -{ 0x00, 0x9b, 0x9b }, -{ 0x00, 0x9c, 0x9c }, -{ 0x00, 0x9d, 0x9d }, -{ 0x00, 0x9e, 0x9e }, -{ 0x00, 0x9f, 0x9f }, -{ 0x00, 0xa0, 0xa0 }, -{ 0x00, 0xa1, 0xa1 }, -{ 0x00, 0xa2, 0xa2 }, -{ 0x00, 0xa3, 0xa3 }, -{ 0x00, 0xa4, 0xa4 }, -{ 0x00, 0xa5, 0xa5 }, -{ 0x00, 0xa6, 0xa6 }, -{ 0x00, 0xa7, 0xa7 }, -{ 0x00, 0xa8, 0xa8 }, -{ 0x00, 0xa9, 0xa9 }, -{ 0x00, 0xaa, 0xaa }, -{ 0x00, 0xab, 0xab }, -{ 0x00, 0xac, 0xac }, -{ 0x00, 0xad, 0xad }, -{ 0x00, 0xae, 0xae }, -{ 0x00, 0xaf, 0xaf }, -{ 0x00, 0xb0, 0xb0 }, -{ 0x00, 0xb1, 0xb1 }, -{ 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-{ 0x00, 0xe2, 0xe2 }, -{ 0x00, 0xe3, 0xe3 }, -{ 0x00, 0xe4, 0xe4 }, -{ 0x00, 0xe5, 0xe5 }, -{ 0x00, 0xe6, 0xe6 }, -{ 0x00, 0xe7, 0xe7 }, -{ 0x00, 0xe8, 0xe8 }, -{ 0x00, 0xe9, 0xe9 }, -{ 0x00, 0xea, 0xea }, -{ 0x00, 0xeb, 0xeb }, -{ 0x00, 0xec, 0xec }, -{ 0x00, 0xed, 0xed }, -{ 0x00, 0xee, 0xee }, -{ 0x00, 0xef, 0xef }, -{ 0x00, 0xf0, 0xf0 }, -{ 0x00, 0xf1, 0xf1 }, -{ 0x00, 0xf2, 0xf2 }, -{ 0x00, 0xf3, 0xf3 }, -{ 0x00, 0xf4, 0xf4 }, -{ 0x00, 0xf5, 0xf5 }, -{ 0x00, 0xf6, 0xf6 }, -{ 0x00, 0xf7, 0xf7 }, -{ 0x00, 0xf8, 0xf8 }, -{ 0x00, 0xf9, 0xf9 }, -{ 0x00, 0xfa, 0xfa }, -{ 0x00, 0xfb, 0xfb }, -{ 0x00, 0xfc, 0xfc }, -{ 0x00, 0xfd, 0xfd }, -{ 0x00, 0xfe, 0xfe }, -{ 0x00, 0xff, 0xff } -}; - -struct enc_entry { - const char * enc_name; - struct cs_info * cs_table; -}; - -static struct enc_entry encds[] = { - {"iso88591",iso1_tbl}, //ISO-8859-1 - {"iso88592",iso2_tbl}, //ISO-8859-2 - {"iso88593",iso3_tbl}, //ISO-8859-3 - {"iso88594",iso4_tbl}, //ISO-8859-4 - {"iso88595",iso5_tbl}, //ISO-8859-5 - {"iso88596",iso6_tbl}, //ISO-8859-6 - {"iso88597",iso7_tbl}, //ISO-8859-7 - {"iso88598",iso8_tbl}, //ISO-8859-8 - {"iso88599",iso9_tbl}, //ISO-8859-9 - {"iso885910",iso10_tbl}, //ISO-8859-10 - {"tis620",tis620_tbl}, //TIS-620/ISO-8859-11 - {"tis6202533",tis620_tbl}, //TIS-620/ISO-8859-11 - {"iso885911",tis620_tbl}, //TIS-620/ISO-8859-11 - {"iso885913", iso13_tbl}, //ISO-8859-13 - {"iso885914", iso14_tbl}, //ISO-8859-14 - {"iso885915", iso15_tbl}, //ISO-8859-15 - {"koi8r",koi8r_tbl}, //KOI8-R - {"koi8u",koi8u_tbl}, //KOI8-U - {"cp1251",cp1251_tbl}, //CP-1251 - {"microsoftcp1251",cp1251_tbl}, //microsoft-cp1251 - {"xisciias", iscii_devanagari_tbl}, //x-iscii-as - {"isciidevanagari", iscii_devanagari_tbl} //ISCII-DEVANAGARI -}; - -/* map to lower case and remove non alphanumeric chars */ -static void toAsciiLowerAndRemoveNonAlphanumeric( const char* pName, char* pBuf ) -{ - while ( *pName ) - { - /* A-Z */ - if ( (*pName >= 0x41) && (*pName <= 0x5A)) - { - *pBuf = (*pName)+0x20; /* toAsciiLower */ - pBuf++; - } - /* a-z, 0-9 */ - else if ( ((*pName >= 0x61) && (*pName <= 0x7A)) || - ((*pName >= 0x30) && (*pName <= 0x39))) - { - *pBuf = *pName; - pBuf++; - } - - pName++; - } - - *pBuf = '\0'; -} - -struct cs_info * get_current_cs(const char * es) { - char *normalized_encoding = new char[strlen(es)+1]; - toAsciiLowerAndRemoveNonAlphanumeric(es, normalized_encoding); - - struct cs_info * ccs = NULL; - int n = sizeof(encds) / sizeof(encds[0]); - for (int i = 0; i < n; i++) { - if (strcmp(normalized_encoding,encds[i].enc_name) == 0) { - ccs = encds[i].cs_table; - break; - } - } - - delete[] normalized_encoding; - - if (!ccs) { - HUNSPELL_WARNING(stderr, "error: unknown encoding %s: using %s as fallback\n", es, encds[0].enc_name); - ccs = encds[0].cs_table; - } - - return ccs; -} -#else -// XXX This function was rewritten for mozilla. Instead of storing the -// conversion tables static in this file, create them when needed -// with help the mozilla backend. -struct cs_info * get_current_cs(const char * es) { - struct cs_info *ccs; - - nsCOMPtr encoder; - nsCOMPtr decoder; - - nsresult rv; - nsCOMPtr ccm = do_GetService(kCharsetConverterManagerCID, &rv); - if (NS_FAILED(rv)) - return nsnull; - - rv = ccm->GetUnicodeEncoder(es, getter_AddRefs(encoder)); - if (NS_FAILED(rv)) - return nsnull; - encoder->SetOutputErrorBehavior(encoder->kOnError_Signal, nsnull, '?'); - rv = ccm->GetUnicodeDecoder(es, getter_AddRefs(decoder)); - if (NS_FAILED(rv)) - return nsnull; - decoder->SetInputErrorBehavior(decoder->kOnError_Signal); - - if (NS_FAILED(rv)) - return nsnull; - - ccs = new cs_info[256]; - - for (unsigned int i = 0; i <= 0xff; ++i) { - PRBool success = PR_FALSE; - // We want to find the upper/lowercase equivalents of each byte - // in this 1-byte character encoding. Call our encoding/decoding - // APIs separately for each byte since they may reject some of the - // bytes, and we want to handle errors separately for each byte. - char lower, upper; - do { - if (i == 0) - break; - const char source = char(i); - PRUnichar uni, uniCased; - PRInt32 charLength = 1, uniLength = 1; - - rv = decoder->Convert(&source, &charLength, &uni, &uniLength); - // Explicitly check NS_OK because we don't want to allow - // NS_OK_UDEC_MOREOUTPUT or NS_OK_UDEC_MOREINPUT. - if (rv != NS_OK || charLength != 1 || uniLength != 1) - break; - uniCased = ToLowerCase(uni); - rv = encoder->Convert(&uniCased, &uniLength, &lower, &charLength); - // Explicitly check NS_OK because we don't want to allow - // NS_OK_UDEC_MOREOUTPUT or NS_OK_UDEC_MOREINPUT. - if (rv != NS_OK || charLength != 1 || uniLength != 1) - break; - - uniCased = ToUpperCase(uni); - rv = encoder->Convert(&uniCased, &uniLength, &upper, &charLength); - // Explicitly check NS_OK because we don't want to allow - // NS_OK_UDEC_MOREOUTPUT or NS_OK_UDEC_MOREINPUT. - if (rv != NS_OK || charLength != 1 || uniLength != 1) - break; - - success = PR_TRUE; - } while (0); - - if (success) { - ccs[i].cupper = upper; - ccs[i].clower = lower; - } else { - ccs[i].cupper = i; - ccs[i].clower = i; - } - - if (ccs[i].clower != (unsigned char)i) - ccs[i].ccase = true; - else - ccs[i].ccase = false; - } - - return ccs; -} -#endif - -// primitive isalpha() replacement for tokenization -char * get_casechars(const char * enc) { - struct cs_info * csconv = get_current_cs(enc); - char expw[MAXLNLEN]; - char * p = expw; - for (int i = 0; i <= 255; i++) { - if ((csconv[i].cupper != csconv[i].clower)) { - *p = (char) i; - p++; - } - } - *p = '\0'; -#ifdef MOZILLA_CLIENT - delete [] csconv; -#endif - return mystrdup(expw); -} - -// language to encoding default map - -struct lang_map { - const char * lang; - int num; -}; - -static struct lang_map lang2enc[] = { -{"ar", LANG_ar}, -{"az", LANG_az}, -{"az_AZ", LANG_az}, // for back-compatibility -{"bg", LANG_bg}, -{"ca", LANG_ca}, -{"cs", LANG_cs}, -{"da", LANG_da}, -{"de", LANG_de}, -{"el", LANG_el}, -{"en", LANG_en}, -{"es", LANG_es}, -{"eu", LANG_eu}, -{"gl", LANG_gl}, -{"fr", LANG_fr}, -{"hr", LANG_hr}, -{"hu", LANG_hu}, -{"hu_HU", LANG_hu}, // for back-compatibility -{"it", LANG_it}, -{"la", LANG_la}, -{"lv", LANG_lv}, -{"nl", LANG_nl}, -{"pl", LANG_pl}, -{"pt", LANG_pt}, -{"sv", LANG_sv}, -{"tr", LANG_tr}, -{"tr_TR", LANG_tr}, // for back-compatibility -{"ru", LANG_ru}, -{"uk", LANG_uk} -}; - - -int get_lang_num(const char * lang) { - int n = sizeof(lang2enc) / sizeof(lang2enc[0]); - for (int i = 0; i < n; i++) { - if (strcmp(lang, lang2enc[i].lang) == 0) { - return lang2enc[i].num; - } - } - return LANG_xx; -} - -#ifndef OPENOFFICEORG -#ifndef MOZILLA_CLIENT -int initialize_utf_tbl() { - utf_tbl_count++; - if (utf_tbl) return 0; - utf_tbl = (unicode_info2 *) malloc(CONTSIZE * sizeof(unicode_info2)); - if (utf_tbl) { - size_t j; - for (j = 0; j < CONTSIZE; j++) { - utf_tbl[j].cletter = 0; - utf_tbl[j].clower = (unsigned short) j; - utf_tbl[j].cupper = (unsigned short) j; - } - for (j = 0; j < UTF_LST_LEN; j++) { - utf_tbl[utf_lst[j].c].cletter = 1; - utf_tbl[utf_lst[j].c].clower = utf_lst[j].clower; - utf_tbl[utf_lst[j].c].cupper = utf_lst[j].cupper; - } - } else return 1; - return 0; -} -#endif -#endif - -void free_utf_tbl() { - if (utf_tbl_count > 0) utf_tbl_count--; - if (utf_tbl && (utf_tbl_count == 0)) { - free(utf_tbl); - utf_tbl = NULL; - } -} - -unsigned short unicodetoupper(unsigned short c, int langnum) -{ - // In Azeri and Turkish, I and i dictinct letters: - // There are a dotless lower case i pair of upper `I', - // and an upper I with dot pair of lower `i'. - if (c == 0x0069 && ((langnum == LANG_az) || (langnum == LANG_tr))) - return 0x0130; -#ifdef OPENOFFICEORG - return u_toupper(c); -#else -#ifdef MOZILLA_CLIENT - return ToUpperCase((PRUnichar) c); -#else - return (utf_tbl) ? utf_tbl[c].cupper : c; -#endif -#endif -} - -unsigned short unicodetolower(unsigned short c, int langnum) -{ - // In Azeri and Turkish, I and i dictinct letters: - // There are a dotless lower case i pair of upper `I', - // and an upper I with dot pair of lower `i'. - if (c == 0x0049 && ((langnum == LANG_az) || (langnum == LANG_tr))) - return 0x0131; -#ifdef OPENOFFICEORG - return u_tolower(c); -#else -#ifdef MOZILLA_CLIENT - return ToLowerCase((PRUnichar) c); -#else - return (utf_tbl) ? utf_tbl[c].clower : c; -#endif -#endif -} - -int unicodeisalpha(unsigned short c) -{ -#ifdef OPENOFFICEORG - return u_isalpha(c); -#else - return (utf_tbl) ? utf_tbl[c].cletter : 0; -#endif -} - -/* get type of capitalization */ -int get_captype(char * word, int nl, cs_info * csconv) { - // now determine the capitalization type of the first nl letters - int ncap = 0; - int nneutral = 0; - int firstcap = 0; - if (csconv == NULL) return NOCAP; - for (char * q = word; *q != '\0'; q++) { - if (csconv[*((unsigned char *)q)].ccase) ncap++; - if (csconv[*((unsigned char *)q)].cupper == csconv[*((unsigned char *)q)].clower) nneutral++; - } - if (ncap) { - firstcap = csconv[*((unsigned char *) word)].ccase; - } - - // now finally set the captype - if (ncap == 0) { - return NOCAP; - } else if ((ncap == 1) && firstcap) { - return INITCAP; - } else if ((ncap == nl) || ((ncap + nneutral) == nl)) { - return ALLCAP; - } else if ((ncap > 1) && firstcap) { - return HUHINITCAP; - } - return HUHCAP; -} - -int get_captype_utf8(w_char * word, int nl, int langnum) { - // now determine the capitalization type of the first nl letters - int ncap = 0; - int nneutral = 0; - int firstcap = 0; - unsigned short idx; - // don't check too long words - if (nl >= MAXWORDLEN) return 0; - // big Unicode character (non BMP area) - if (nl == -1) return NOCAP; - for (int i = 0; i < nl; i++) { - idx = (word[i].h << 8) + word[i].l; - if (idx != unicodetolower(idx, langnum)) ncap++; - if (unicodetoupper(idx, langnum) == unicodetolower(idx, langnum)) nneutral++; - } - if (ncap) { - idx = (word[0].h << 8) + word[0].l; - firstcap = (idx != unicodetolower(idx, langnum)); - } - - // now finally set the captype - if (ncap == 0) { - return NOCAP; - } else if ((ncap == 1) && firstcap) { - return INITCAP; - } else if ((ncap == nl) || ((ncap + nneutral) == nl)) { - return ALLCAP; - } else if ((ncap > 1) && firstcap) { - return HUHINITCAP; - } - return HUHCAP; -} - - -// strip all ignored characters in the string -void remove_ignored_chars_utf(char * word, unsigned short ignored_chars[], int ignored_len) -{ - w_char w[MAXWORDLEN]; - w_char w2[MAXWORDLEN]; - int i; - int j; - int len = u8_u16(w, MAXWORDLEN, word); - for (i = 0, j = 0; i < len; i++) { - if (!flag_bsearch(ignored_chars, ((unsigned short *) w)[i], ignored_len)) { - w2[j] = w[i]; - j++; - } - } - if (j < i) u16_u8(word, MAXWORDUTF8LEN, w2, j); -} - -// strip all ignored characters in the string -void remove_ignored_chars(char * word, char * ignored_chars) -{ - for (char * p = word; *p != '\0'; p++) { - if (!strchr(ignored_chars, *p)) { - *word = *p; - word++; - } - } - *word = '\0'; -} - -int parse_string(char * line, char ** out, int ln) -{ - char * tp = line; - char * piece; - int i = 0; - int np = 0; - if (*out) { - HUNSPELL_WARNING(stderr, "error: line %d: multiple definitions\n", ln); - return 1; - } - piece = mystrsep(&tp, 0); - while (piece) { - if (*piece != '\0') { - switch(i) { - case 0: { np++; break; } - case 1: { - *out = mystrdup(piece); - if (!*out) return 1; - np++; - break; - } - default: break; - } - i++; - } - // free(piece); - piece = mystrsep(&tp, 0); - } - if (np != 2) { - HUNSPELL_WARNING(stderr, "error: line %d: missing data\n", ln); - return 1; - } - return 0; -} - -int parse_array(char * line, char ** out, unsigned short ** out_utf16, - int * out_utf16_len, int utf8, int ln) { - if (parse_string(line, out, ln)) return 1; - if (utf8) { - w_char w[MAXWORDLEN]; - int n = u8_u16(w, MAXWORDLEN, *out); - if (n > 0) { - flag_qsort((unsigned short *) w, 0, n); - *out_utf16 = (unsigned short *) malloc(n * sizeof(unsigned short)); - if (!*out_utf16) return 1; - memcpy(*out_utf16, w, n * sizeof(unsigned short)); - } - *out_utf16_len = n; - } - return 0; -} diff --git a/plugins/SpellChecker/hunspell/csutil.hxx b/plugins/SpellChecker/hunspell/csutil.hxx deleted file mode 100644 index 7bd0b919be..0000000000 --- a/plugins/SpellChecker/hunspell/csutil.hxx +++ /dev/null @@ -1,220 +0,0 @@ -#ifndef __CSUTILHXX__ -#define __CSUTILHXX__ - -#include "hunvisapi.h" - -// First some base level utility routines - -#include -#include "w_char.hxx" -#include "htypes.hxx" - -#ifdef MOZILLA_CLIENT -#include "nscore.h" // for mozalloc headers -#endif - -// casing -#define NOCAP 0 -#define INITCAP 1 -#define ALLCAP 2 -#define HUHCAP 3 -#define HUHINITCAP 4 - -// default encoding and keystring -#define SPELL_ENCODING "ISO8859-1" -#define SPELL_KEYSTRING "qwertyuiop|asdfghjkl|zxcvbnm" - -// default morphological fields -#define MORPH_STEM "st:" -#define MORPH_ALLOMORPH "al:" -#define MORPH_POS "po:" -#define MORPH_DERI_PFX "dp:" -#define MORPH_INFL_PFX "ip:" -#define MORPH_TERM_PFX "tp:" -#define MORPH_DERI_SFX "ds:" -#define MORPH_INFL_SFX "is:" -#define MORPH_TERM_SFX "ts:" -#define MORPH_SURF_PFX "sp:" -#define MORPH_FREQ "fr:" -#define MORPH_PHON "ph:" -#define MORPH_HYPH "hy:" -#define MORPH_PART "pa:" -#define MORPH_FLAG "fl:" -#define MORPH_HENTRY "_H:" -#define MORPH_TAG_LEN strlen(MORPH_STEM) - -#define MSEP_FLD ' ' -#define MSEP_REC '\n' -#define MSEP_ALT '\v' - -// default flags -#define DEFAULTFLAGS 65510 -#define FORBIDDENWORD 65510 -#define ONLYUPCASEFLAG 65511 - -// convert UTF-16 characters to UTF-8 -LIBHUNSPELL_DLL_EXPORTED char * u16_u8(char * dest, int size, const w_char * src, int srclen); - -// convert UTF-8 characters to UTF-16 -LIBHUNSPELL_DLL_EXPORTED int u8_u16(w_char * dest, int size, const char * src); - -// sort 2-byte vector -LIBHUNSPELL_DLL_EXPORTED void flag_qsort(unsigned short flags[], int begin, int end); - -// binary search in 2-byte vector -LIBHUNSPELL_DLL_EXPORTED int flag_bsearch(unsigned short flags[], unsigned short flag, int right); - -// remove end of line char(s) -LIBHUNSPELL_DLL_EXPORTED void mychomp(char * s); - -// duplicate string -LIBHUNSPELL_DLL_EXPORTED char * mystrdup(const char * s); - -// strcat for limited length destination string -LIBHUNSPELL_DLL_EXPORTED char * mystrcat(char * dest, const char * st, int max); - -// duplicate reverse of string -LIBHUNSPELL_DLL_EXPORTED char * myrevstrdup(const char * s); - -// parse into tokens with char delimiter -LIBHUNSPELL_DLL_EXPORTED char * mystrsep(char ** sptr, const char delim); -// parse into tokens with char delimiter -LIBHUNSPELL_DLL_EXPORTED char * mystrsep2(char ** sptr, const char delim); - -// parse into tokens with char delimiter -LIBHUNSPELL_DLL_EXPORTED char * mystrrep(char *, const char *, const char *); - -// append s to ends of every lines in text -LIBHUNSPELL_DLL_EXPORTED void strlinecat(char * lines, const char * s); - -// tokenize into lines with new line -LIBHUNSPELL_DLL_EXPORTED int line_tok(const char * text, char *** lines, char breakchar); - -// tokenize into lines with new line and uniq in place -LIBHUNSPELL_DLL_EXPORTED char * line_uniq(char * text, char breakchar); -LIBHUNSPELL_DLL_EXPORTED char * line_uniq_app(char ** text, char breakchar); - -// change oldchar to newchar in place -LIBHUNSPELL_DLL_EXPORTED char * tr(char * text, char oldc, char newc); - -// reverse word -LIBHUNSPELL_DLL_EXPORTED int reverseword(char *); - -// reverse word -LIBHUNSPELL_DLL_EXPORTED int reverseword_utf(char *); - -// remove duplicates -LIBHUNSPELL_DLL_EXPORTED int uniqlist(char ** list, int n); - -// free character array list -LIBHUNSPELL_DLL_EXPORTED void freelist(char *** list, int n); - -// character encoding information -struct cs_info { - unsigned char ccase; - unsigned char clower; - unsigned char cupper; -}; - -LIBHUNSPELL_DLL_EXPORTED int initialize_utf_tbl(); -LIBHUNSPELL_DLL_EXPORTED void free_utf_tbl(); -LIBHUNSPELL_DLL_EXPORTED unsigned short unicodetoupper(unsigned short c, int langnum); -LIBHUNSPELL_DLL_EXPORTED unsigned short unicodetolower(unsigned short c, int langnum); -LIBHUNSPELL_DLL_EXPORTED int unicodeisalpha(unsigned short c); - -LIBHUNSPELL_DLL_EXPORTED struct cs_info * get_current_cs(const char * es); - -// get language identifiers of language codes -LIBHUNSPELL_DLL_EXPORTED int get_lang_num(const char * lang); - -// get characters of the given 8bit encoding with lower- and uppercase forms -LIBHUNSPELL_DLL_EXPORTED char * get_casechars(const char * enc); - -// convert null terminated string to all caps using encoding -LIBHUNSPELL_DLL_EXPORTED void enmkallcap(char * d, const char * p, const char * encoding); - -// convert null terminated string to all little using encoding -LIBHUNSPELL_DLL_EXPORTED void enmkallsmall(char * d, const char * p, const char * encoding); - -// convert null terminated string to have initial capital using encoding -LIBHUNSPELL_DLL_EXPORTED void enmkinitcap(char * d, const char * p, const char * encoding); - -// convert null terminated string to all caps -LIBHUNSPELL_DLL_EXPORTED void mkallcap(char * p, const struct cs_info * csconv); - -// convert null terminated string to all little -LIBHUNSPELL_DLL_EXPORTED void mkallsmall(char * p, const struct cs_info * csconv); - -// convert null terminated string to have initial capital -LIBHUNSPELL_DLL_EXPORTED void mkinitcap(char * p, const struct cs_info * csconv); - -// convert first nc characters of UTF-8 string to little -LIBHUNSPELL_DLL_EXPORTED void mkallsmall_utf(w_char * u, int nc, int langnum); - -// convert first nc characters of UTF-8 string to capital -LIBHUNSPELL_DLL_EXPORTED void mkallcap_utf(w_char * u, int nc, int langnum); - -// get type of capitalization -LIBHUNSPELL_DLL_EXPORTED int get_captype(char * q, int nl, cs_info *); - -// get type of capitalization (UTF-8) -LIBHUNSPELL_DLL_EXPORTED int get_captype_utf8(w_char * q, int nl, int langnum); - -// strip all ignored characters in the string -LIBHUNSPELL_DLL_EXPORTED void remove_ignored_chars_utf(char * word, unsigned short ignored_chars[], int ignored_len); - -// strip all ignored characters in the string -LIBHUNSPELL_DLL_EXPORTED void remove_ignored_chars(char * word, char * ignored_chars); - -LIBHUNSPELL_DLL_EXPORTED int parse_string(char * line, char ** out, int ln); - -LIBHUNSPELL_DLL_EXPORTED int parse_array(char * line, char ** out, unsigned short ** out_utf16, - int * out_utf16_len, int utf8, int ln); - -LIBHUNSPELL_DLL_EXPORTED int fieldlen(const char * r); -LIBHUNSPELL_DLL_EXPORTED char * copy_field(char * dest, const char * morph, const char * var); - -LIBHUNSPELL_DLL_EXPORTED int morphcmp(const char * s, const char * t); - -LIBHUNSPELL_DLL_EXPORTED int get_sfxcount(const char * morph); - -// conversion function for protected memory -LIBHUNSPELL_DLL_EXPORTED void store_pointer(char * dest, char * source); - -// conversion function for protected memory -LIBHUNSPELL_DLL_EXPORTED char * get_stored_pointer(const char * s); - -// hash entry macros -LIBHUNSPELL_DLL_EXPORTED inline char* HENTRY_DATA(struct hentry *h) -{ - char *ret; - if (!h->var) - ret = NULL; - else if (h->var & H_OPT_ALIASM) - ret = get_stored_pointer(HENTRY_WORD(h) + h->blen + 1); - else - ret = HENTRY_WORD(h) + h->blen + 1; - return ret; -} - -// NULL-free version for warning-free OOo build -LIBHUNSPELL_DLL_EXPORTED inline const char* HENTRY_DATA2(const struct hentry *h) -{ - const char *ret; - if (!h->var) - ret = ""; - else if (h->var & H_OPT_ALIASM) - ret = get_stored_pointer(HENTRY_WORD(h) + h->blen + 1); - else - ret = HENTRY_WORD(h) + h->blen + 1; - return ret; -} - -LIBHUNSPELL_DLL_EXPORTED inline char* HENTRY_FIND(struct hentry *h, const char *p) -{ - return (HENTRY_DATA(h) ? strstr(HENTRY_DATA(h), p) : NULL); -} - -#define w_char_eq(a,b) (((a).l == (b).l) && ((a).h == (b).h)) - -#endif diff --git a/plugins/SpellChecker/hunspell/dictmgr.cxx b/plugins/SpellChecker/hunspell/dictmgr.cxx deleted file mode 100644 index b4a15b1a5b..0000000000 --- a/plugins/SpellChecker/hunspell/dictmgr.cxx +++ /dev/null @@ -1,180 +0,0 @@ - -#include -#include -#include -#include - -#include "dictmgr.hxx" - -DictMgr::DictMgr(const char * dictpath, const char * etype) : numdict(0) -{ - // load list of etype entries - pdentry = (dictentry *)malloc(MAXDICTIONARIES*sizeof(struct dictentry)); - if (pdentry) { - if (parse_file(dictpath, etype)) { - numdict = 0; - // no dictionary.lst found is okay - } - } -} - - -DictMgr::~DictMgr() -{ - dictentry * pdict = NULL; - if (pdentry) { - pdict = pdentry; - for (int i=0;ilang) { - free(pdict->lang); - pdict->lang = NULL; - } - if (pdict->region) { - free(pdict->region); - pdict->region=NULL; - } - if (pdict->filename) { - free(pdict->filename); - pdict->filename = NULL; - } - pdict++; - } - free(pdentry); - pdentry = NULL; - pdict = NULL; - } - numdict = 0; -} - - -// read in list of etype entries and build up structure to describe them -int DictMgr::parse_file(const char * dictpath, const char * etype) -{ - - int i; - char line[MAXDICTENTRYLEN+1]; - dictentry * pdict = pdentry; - - // open the dictionary list file - FILE * dictlst; - dictlst = fopen(dictpath,"r"); - if (!dictlst) { - return 1; - } - - // step one is to parse the dictionary list building up the - // descriptive structures - - // read in each line ignoring any that dont start with etype - while (fgets(line,MAXDICTENTRYLEN,dictlst)) { - mychomp(line); - - /* parse in a dictionary entry */ - if (strncmp(line,etype,4) == 0) { - if (numdict < MAXDICTIONARIES) { - char * tp = line; - char * piece; - i = 0; - while ((piece=mystrsep(&tp,' '))) { - if (*piece != '\0') { - switch(i) { - case 0: break; - case 1: pdict->lang = mystrdup(piece); break; - case 2: if (strcmp (piece, "ANY") == 0) - pdict->region = mystrdup(""); - else - pdict->region = mystrdup(piece); - break; - case 3: pdict->filename = mystrdup(piece); break; - default: break; - } - i++; - } - free(piece); - } - if (i == 4) { - numdict++; - pdict++; - } else { - switch (i) { - case 3: - free(pdict->region); - pdict->region=NULL; - case 2: //deliberate fallthrough - free(pdict->lang); - pdict->lang=NULL; - default: - break; - } - fprintf(stderr,"dictionary list corruption in line \"%s\"\n",line); - fflush(stderr); - } - } - } - } - fclose(dictlst); - return 0; -} - -// return text encoding of dictionary -int DictMgr::get_list(dictentry ** ppentry) -{ - *ppentry = pdentry; - return numdict; -} - - - -// strip strings into token based on single char delimiter -// acts like strsep() but only uses a delim char and not -// a delim string - -char * DictMgr::mystrsep(char ** stringp, const char delim) -{ - char * rv = NULL; - char * mp = *stringp; - size_t n = strlen(mp); - if (n > 0) { - char * dp = (char *)memchr(mp,(int)((unsigned char)delim),n); - if (dp) { - *stringp = dp+1; - size_t nc = dp - mp; - rv = (char *) malloc(nc+1); - if (rv) { - memcpy(rv,mp,nc); - *(rv+nc) = '\0'; - } - } else { - rv = (char *) malloc(n+1); - if (rv) { - memcpy(rv, mp, n); - *(rv+n) = '\0'; - *stringp = mp + n; - } - } - } - return rv; -} - - -// replaces strdup with ansi version -char * DictMgr::mystrdup(const char * s) -{ - char * d = NULL; - if (s) { - int sl = strlen(s)+1; - d = (char *) malloc(sl); - if (d) memcpy(d,s,sl); - } - return d; -} - - -// remove cross-platform text line end characters -void DictMgr:: mychomp(char * s) -{ - int k = strlen(s); - if ((k > 0) && ((*(s+k-1)=='\r') || (*(s+k-1)=='\n'))) *(s+k-1) = '\0'; - if ((k > 1) && (*(s+k-2) == '\r')) *(s+k-2) = '\0'; -} - diff --git a/plugins/SpellChecker/hunspell/dictmgr.hxx b/plugins/SpellChecker/hunspell/dictmgr.hxx deleted file mode 100644 index bb197f84fb..0000000000 --- a/plugins/SpellChecker/hunspell/dictmgr.hxx +++ /dev/null @@ -1,36 +0,0 @@ -#ifndef _DICTMGR_HXX_ -#define _DICTMGR_HXX_ - -#include "hunvisapi.h" - -#define MAXDICTIONARIES 100 -#define MAXDICTENTRYLEN 1024 - -struct dictentry { - char * filename; - char * lang; - char * region; -}; - - -class LIBHUNSPELL_DLL_EXPORTED DictMgr -{ - - int numdict; - dictentry * pdentry; - -public: - - DictMgr(const char * dictpath, const char * etype); - ~DictMgr(); - int get_list(dictentry** ppentry); - -private: - int parse_file(const char * dictpath, const char * etype); - char * mystrsep(char ** stringp, const char delim); - char * mystrdup(const char * s); - void mychomp(char * s); - -}; - -#endif diff --git a/plugins/SpellChecker/hunspell/filemgr.cxx b/plugins/SpellChecker/hunspell/filemgr.cxx deleted file mode 100644 index 5fb82bcf80..0000000000 --- a/plugins/SpellChecker/hunspell/filemgr.cxx +++ /dev/null @@ -1,49 +0,0 @@ -#include "license.hunspell" -#include "license.myspell" - -#include -#include -#include - -#include "filemgr.hxx" - -int FileMgr::fail(const char * err, const char * par) { - fprintf(stderr, err, par); - return -1; -} - -FileMgr::FileMgr(const char * file, const char * key) { - linenum = 0; - hin = NULL; - fin = fopen(file, "r"); - if (!fin) { - // check hzipped file - char * st = (char *) malloc(strlen(file) + strlen(HZIP_EXTENSION) + 1); - if (st) { - strcpy(st, file); - strcat(st, HZIP_EXTENSION); - hin = new Hunzip(st, key); - free(st); - } - } - if (!fin && !hin) fail(MSG_OPEN, file); -} - -FileMgr::~FileMgr() -{ - if (fin) fclose(fin); - if (hin) delete hin; -} - -char * FileMgr::getline() { - const char * l; - linenum++; - if (fin) return fgets(in, BUFSIZE - 1, fin); - if (hin && (l = hin->getline())) return strcpy(in, l); - linenum--; - return NULL; -} - -int FileMgr::getlinenum() { - return linenum; -} diff --git a/plugins/SpellChecker/hunspell/filemgr.hxx b/plugins/SpellChecker/hunspell/filemgr.hxx deleted file mode 100644 index 94cb7233d8..0000000000 --- a/plugins/SpellChecker/hunspell/filemgr.hxx +++ /dev/null @@ -1,25 +0,0 @@ -/* file manager class - read lines of files [filename] OR [filename.hz] */ -#ifndef _FILEMGR_HXX_ -#define _FILEMGR_HXX_ - -#include "hunvisapi.h" - -#include "hunzip.hxx" -#include - -class LIBHUNSPELL_DLL_EXPORTED FileMgr -{ -protected: - FILE * fin; - Hunzip * hin; - char in[BUFSIZE + 50]; // input buffer - int fail(const char * err, const char * par); - int linenum; - -public: - FileMgr(const char * filename, const char * key = NULL); - ~FileMgr(); - char * getline(); - int getlinenum(); -}; -#endif diff --git a/plugins/SpellChecker/hunspell/hashmgr.cxx b/plugins/SpellChecker/hunspell/hashmgr.cxx deleted file mode 100644 index ea93b8787c..0000000000 --- a/plugins/SpellChecker/hunspell/hashmgr.cxx +++ /dev/null @@ -1,928 +0,0 @@ -#include "license.hunspell" -#include "license.myspell" - -#include -#include -#include -#include - -#include "hashmgr.hxx" -#include "csutil.hxx" -#include "atypes.hxx" - -// build a hash table from a munched word list - -HashMgr::HashMgr(const char * tpath, const char * apath, const char * key) -{ - tablesize = 0; - tableptr = NULL; - flag_mode = FLAG_CHAR; - complexprefixes = 0; - utf8 = 0; - langnum = 0; - lang = NULL; - enc = NULL; - csconv = 0; - ignorechars = NULL; - ignorechars_utf16 = NULL; - ignorechars_utf16_len = 0; - numaliasf = 0; - aliasf = NULL; - numaliasm = 0; - aliasm = NULL; - forbiddenword = FORBIDDENWORD; // forbidden word signing flag - load_config(apath, key); - int ec = load_tables(tpath, key); - if (ec) { - /* error condition - what should we do here */ - HUNSPELL_WARNING(stderr, "Hash Manager Error : %d\n",ec); - if (tableptr) { - free(tableptr); - tableptr = NULL; - } - tablesize = 0; - } -} - - -HashMgr::~HashMgr() -{ - if (tableptr) { - // now pass through hash table freeing up everything - // go through column by column of the table - for (int i=0; i < tablesize; i++) { - struct hentry * pt = tableptr[i]; - struct hentry * nt = NULL; - while(pt) { - nt = pt->next; - if (pt->astr && (!aliasf || TESTAFF(pt->astr, ONLYUPCASEFLAG, pt->alen))) free(pt->astr); - free(pt); - pt = nt; - } - } - free(tableptr); - } - tablesize = 0; - - if (aliasf) { - for (int j = 0; j < (numaliasf); j++) free(aliasf[j]); - free(aliasf); - aliasf = NULL; - if (aliasflen) { - free(aliasflen); - aliasflen = NULL; - } - } - if (aliasm) { - for (int j = 0; j < (numaliasm); j++) free(aliasm[j]); - free(aliasm); - aliasm = NULL; - } - -#ifndef OPENOFFICEORG -#ifndef MOZILLA_CLIENT - if (utf8) free_utf_tbl(); -#endif -#endif - - if (enc) free(enc); - if (lang) free(lang); - - if (ignorechars) free(ignorechars); - if (ignorechars_utf16) free(ignorechars_utf16); - -#ifdef MOZILLA_CLIENT - delete [] csconv; -#endif -} - -// lookup a root word in the hashtable - -struct hentry * HashMgr::lookup(const char *word) const -{ - struct hentry * dp; - if (tableptr) { - dp = tableptr[hash(word)]; - if (!dp) return NULL; - for ( ; dp != NULL; dp = dp->next) { - if (strcmp(word, dp->word) == 0) return dp; - } - } - return NULL; -} - -// add a word to the hash table (private) -int HashMgr::add_word(const char * word, int wbl, int wcl, unsigned short * aff, - int al, const char * desc, bool onlyupcase) -{ - bool upcasehomonym = false; - int descl = desc ? (aliasm ? sizeof(short) : strlen(desc) + 1) : 0; - // variable-length hash record with word and optional fields - struct hentry* hp = - (struct hentry *) malloc (sizeof(struct hentry) + wbl + descl); - if (!hp) return 1; - char * hpw = hp->word; - strcpy(hpw, word); - if (ignorechars != NULL) { - if (utf8) { - remove_ignored_chars_utf(hpw, ignorechars_utf16, ignorechars_utf16_len); - } else { - remove_ignored_chars(hpw, ignorechars); - } - } - if (complexprefixes) { - if (utf8) reverseword_utf(hpw); else reverseword(hpw); - } - - int i = hash(hpw); - - hp->blen = (unsigned char) wbl; - hp->clen = (unsigned char) wcl; - hp->alen = (short) al; - hp->astr = aff; - hp->next = NULL; - hp->next_homonym = NULL; - - // store the description string or its pointer - if (desc) { - hp->var = H_OPT; - if (aliasm) { - hp->var += H_OPT_ALIASM; - store_pointer(hpw + wbl + 1, get_aliasm(atoi(desc))); - } else { - strcpy(hpw + wbl + 1, desc); - if (complexprefixes) { - if (utf8) reverseword_utf(HENTRY_DATA(hp)); - else reverseword(HENTRY_DATA(hp)); - } - } - if (strstr(HENTRY_DATA(hp), MORPH_PHON)) hp->var += H_OPT_PHON; - } else hp->var = 0; - - struct hentry * dp = tableptr[i]; - if (!dp) { - tableptr[i] = hp; - return 0; - } - while (dp->next != NULL) { - if ((!dp->next_homonym) && (strcmp(hp->word, dp->word) == 0)) { - // remove hidden onlyupcase homonym - if (!onlyupcase) { - if ((dp->astr) && TESTAFF(dp->astr, ONLYUPCASEFLAG, dp->alen)) { - free(dp->astr); - dp->astr = hp->astr; - dp->alen = hp->alen; - free(hp); - return 0; - } else { - dp->next_homonym = hp; - } - } else { - upcasehomonym = true; - } - } - dp=dp->next; - } - if (strcmp(hp->word, dp->word) == 0) { - // remove hidden onlyupcase homonym - if (!onlyupcase) { - if ((dp->astr) && TESTAFF(dp->astr, ONLYUPCASEFLAG, dp->alen)) { - free(dp->astr); - dp->astr = hp->astr; - dp->alen = hp->alen; - free(hp); - return 0; - } else { - dp->next_homonym = hp; - } - } else { - upcasehomonym = true; - } - } - if (!upcasehomonym) { - dp->next = hp; - } else { - // remove hidden onlyupcase homonym - if (hp->astr) free(hp->astr); - free(hp); - } - return 0; -} - -int HashMgr::add_hidden_capitalized_word(char * word, int wbl, int wcl, - unsigned short * flags, int al, char * dp, int captype) -{ - // add inner capitalized forms to handle the following allcap forms: - // Mixed caps: OpenOffice.org -> OPENOFFICE.ORG - // Allcaps with suffixes: CIA's -> CIA'S - if (((captype == HUHCAP) || (captype == HUHINITCAP) || - ((captype == ALLCAP) && (flags != NULL))) && - !((flags != NULL) && TESTAFF(flags, forbiddenword, al))) { - unsigned short * flags2 = (unsigned short *) malloc (sizeof(unsigned short) * (al+1)); - if (!flags2) return 1; - if (al) memcpy(flags2, flags, al * sizeof(unsigned short)); - flags2[al] = ONLYUPCASEFLAG; - if (utf8) { - char st[BUFSIZE]; - w_char w[BUFSIZE]; - int wlen = u8_u16(w, BUFSIZE, word); - mkallsmall_utf(w, wlen, langnum); - mkallcap_utf(w, 1, langnum); - u16_u8(st, BUFSIZE, w, wlen); - return add_word(st,wbl,wcl,flags2,al+1,dp, true); - } else { - mkallsmall(word, csconv); - mkinitcap(word, csconv); - return add_word(word,wbl,wcl,flags2,al+1,dp, true); - } - } - return 0; -} - -// detect captype and modify word length for UTF-8 encoding -int HashMgr::get_clen_and_captype(const char * word, int wbl, int * captype) { - int len; - if (utf8) { - w_char dest_utf[BUFSIZE]; - len = u8_u16(dest_utf, BUFSIZE, word); - *captype = get_captype_utf8(dest_utf, len, langnum); - } else { - len = wbl; - *captype = get_captype((char *) word, len, csconv); - } - return len; -} - -// remove word (personal dictionary function for standalone applications) -int HashMgr::remove(const char * word) -{ - struct hentry * dp = lookup(word); - while (dp) { - if (dp->alen == 0 || !TESTAFF(dp->astr, forbiddenword, dp->alen)) { - unsigned short * flags = - (unsigned short *) malloc(sizeof(short) * (dp->alen + 1)); - if (!flags) return 1; - for (int i = 0; i < dp->alen; i++) flags[i] = dp->astr[i]; - flags[dp->alen] = forbiddenword; - dp->astr = flags; - dp->alen++; - flag_qsort(flags, 0, dp->alen); - } - dp = dp->next_homonym; - } - return 0; -} - -/* remove forbidden flag to add a personal word to the hash */ -int HashMgr::remove_forbidden_flag(const char * word) { - struct hentry * dp = lookup(word); - if (!dp) return 1; - while (dp) { - if (dp->astr && TESTAFF(dp->astr, forbiddenword, dp->alen)) { - if (dp->alen == 1) dp->alen = 0; // XXX forbidden words of personal dic. - else { - unsigned short * flags2 = - (unsigned short *) malloc(sizeof(short) * (dp->alen - 1)); - if (!flags2) return 1; - int i, j = 0; - for (i = 0; i < dp->alen; i++) { - if (dp->astr[i] != forbiddenword) flags2[j++] = dp->astr[i]; - } - dp->alen--; - dp->astr = flags2; // XXX allowed forbidden words - } - } - dp = dp->next_homonym; - } - return 0; -} - -// add a custom dic. word to the hash table (public) -int HashMgr::add(const char * word) -{ - unsigned short * flags = NULL; - int al = 0; - if (remove_forbidden_flag(word)) { - int captype; - int wbl = strlen(word); - int wcl = get_clen_and_captype(word, wbl, &captype); - add_word(word, wbl, wcl, flags, al, NULL, false); - return add_hidden_capitalized_word((char *) word, wbl, wcl, flags, al, NULL, captype); - } - return 0; -} - -int HashMgr::add_with_affix(const char * word, const char * example) -{ - // detect captype and modify word length for UTF-8 encoding - struct hentry * dp = lookup(example); - remove_forbidden_flag(word); - if (dp && dp->astr) { - int captype; - int wbl = strlen(word); - int wcl = get_clen_and_captype(word, wbl, &captype); - if (aliasf) { - add_word(word, wbl, wcl, dp->astr, dp->alen, NULL, false); - } else { - unsigned short * flags = (unsigned short *) malloc (dp->alen * sizeof(short)); - if (flags) { - memcpy((void *) flags, (void *) dp->astr, dp->alen * sizeof(short)); - add_word(word, wbl, wcl, flags, dp->alen, NULL, false); - } else return 1; - } - return add_hidden_capitalized_word((char *) word, wbl, wcl, dp->astr, dp->alen, NULL, captype); - } - return 1; -} - -// walk the hash table entry by entry - null at end -// initialize: col=-1; hp = NULL; hp = walk_hashtable(&col, hp); -struct hentry * HashMgr::walk_hashtable(int &col, struct hentry * hp) const -{ - if (hp && hp->next != NULL) return hp->next; - for (col++; col < tablesize; col++) { - if (tableptr[col]) return tableptr[col]; - } - // null at end and reset to start - col = -1; - return NULL; -} - -// load a munched word list and build a hash table on the fly -int HashMgr::load_tables(const char * tpath, const char * key) -{ - int al; - char * ap; - char * dp; - char * dp2; - unsigned short * flags; - char * ts; - - // open dictionary file - FileMgr * dict = new FileMgr(tpath, key); - if (dict == NULL) return 1; - - // first read the first line of file to get hash table size */ - if (!(ts = dict->getline())) { - HUNSPELL_WARNING(stderr, "error: empty dic file\n"); - delete dict; - return 2; - } - mychomp(ts); - - /* remove byte order mark */ - if (strncmp(ts,"\xEF\xBB\xBF",3) == 0) { - memmove(ts, ts+3, strlen(ts+3)+1); - // warning: dic file begins with byte order mark: possible incompatibility with old Hunspell versions - } - - tablesize = atoi(ts); - if (tablesize == 0) { - HUNSPELL_WARNING(stderr, "error: line 1: missing or bad word count in the dic file\n"); - delete dict; - return 4; - } - tablesize = tablesize + 5 + USERWORD; - if ((tablesize %2) == 0) tablesize++; - - // allocate the hash table - tableptr = (struct hentry **) malloc(tablesize * sizeof(struct hentry *)); - if (! tableptr) { - delete dict; - return 3; - } - for (int i=0; igetline())) { - mychomp(ts); - // split each line into word and morphological description - dp = ts; - while ((dp = strchr(dp, ':'))) { - if ((dp > ts + 3) && (*(dp - 3) == ' ' || *(dp - 3) == '\t')) { - for (dp -= 4; dp >= ts && (*dp == ' ' || *dp == '\t'); dp--); - if (dp < ts) { // missing word - dp = NULL; - } else { - *(dp + 1) = '\0'; - dp = dp + 2; - } - break; - } - dp++; - } - - // tabulator is the old morphological field separator - dp2 = strchr(ts, '\t'); - if (dp2 && (!dp || dp2 < dp)) { - *dp2 = '\0'; - dp = dp2 + 1; - } - - // split each line into word and affix char strings - // "\/" signs slash in words (not affix separator) - // "/" at beginning of the line is word character (not affix separator) - ap = strchr(ts,'/'); - while (ap) { - if (ap == ts) { - ap++; - continue; - } else if (*(ap - 1) != '\\') break; - // replace "\/" with "/" - for (char * sp = ap - 1; *sp; *sp = *(sp + 1), sp++); - ap = strchr(ap,'/'); - } - - if (ap) { - *ap = '\0'; - if (aliasf) { - int index = atoi(ap + 1); - al = get_aliasf(index, &flags, dict); - if (!al) { - HUNSPELL_WARNING(stderr, "error: line %d: bad flag vector alias\n", dict->getlinenum()); - *ap = '\0'; - } - } else { - al = decode_flags(&flags, ap + 1, dict); - if (al == -1) { - HUNSPELL_WARNING(stderr, "Can't allocate memory.\n"); - delete dict; - return 6; - } - flag_qsort(flags, 0, al); - } - } else { - al = 0; - ap = NULL; - flags = NULL; - } - - int captype; - int wbl = strlen(ts); - int wcl = get_clen_and_captype(ts, wbl, &captype); - // add the word and its index plus its capitalized form optionally - if (add_word(ts,wbl,wcl,flags,al,dp, false) || - add_hidden_capitalized_word(ts, wbl, wcl, flags, al, dp, captype)) { - delete dict; - return 5; - } - } - - delete dict; - return 0; -} - -// the hash function is a simple load and rotate -// algorithm borrowed - -int HashMgr::hash(const char * word) const -{ - long hv = 0; - for (int i=0; i < 4 && *word != 0; i++) - hv = (hv << 8) | (*word++); - while (*word != 0) { - ROTATE(hv,ROTATE_LEN); - hv ^= (*word++); - } - return (unsigned long) hv % tablesize; -} - -int HashMgr::decode_flags(unsigned short ** result, char * flags, FileMgr * af) { - int len; - if (*flags == '\0') { - *result = NULL; - return 0; - } - switch (flag_mode) { - case FLAG_LONG: { // two-character flags (1x2yZz -> 1x 2y Zz) - len = strlen(flags); - if (len%2 == 1) HUNSPELL_WARNING(stderr, "error: line %d: bad flagvector\n", af->getlinenum()); - len /= 2; - *result = (unsigned short *) malloc(len * sizeof(short)); - if (!*result) return -1; - for (int i = 0; i < len; i++) { - (*result)[i] = (((unsigned short) flags[i * 2]) << 8) + (unsigned short) flags[i * 2 + 1]; - } - break; - } - case FLAG_NUM: { // decimal numbers separated by comma (4521,23,233 -> 4521 23 233) - int i; - len = 1; - char * src = flags; - unsigned short * dest; - char * p; - for (p = flags; *p; p++) { - if (*p == ',') len++; - } - *result = (unsigned short *) malloc(len * sizeof(short)); - if (!*result) return -1; - dest = *result; - for (p = flags; *p; p++) { - if (*p == ',') { - i = atoi(src); - if (i >= DEFAULTFLAGS) HUNSPELL_WARNING(stderr, "error: line %d: flag id %d is too large (max: %d)\n", - af->getlinenum(), i, DEFAULTFLAGS - 1); - *dest = (unsigned short) i; - if (*dest == 0) HUNSPELL_WARNING(stderr, "error: line %d: 0 is wrong flag id\n", af->getlinenum()); - src = p + 1; - dest++; - } - } - i = atoi(src); - if (i >= DEFAULTFLAGS) HUNSPELL_WARNING(stderr, "error: line %d: flag id %d is too large (max: %d)\n", - af->getlinenum(), i, DEFAULTFLAGS - 1); - *dest = (unsigned short) i; - if (*dest == 0) HUNSPELL_WARNING(stderr, "error: line %d: 0 is wrong flag id\n", af->getlinenum()); - break; - } - case FLAG_UNI: { // UTF-8 characters - w_char w[BUFSIZE/2]; - len = u8_u16(w, BUFSIZE/2, flags); - *result = (unsigned short *) malloc(len * sizeof(short)); - if (!*result) return -1; - memcpy(*result, w, len * sizeof(short)); - break; - } - default: { // Ispell's one-character flags (erfg -> e r f g) - unsigned short * dest; - len = strlen(flags); - *result = (unsigned short *) malloc(len * sizeof(short)); - if (!*result) return -1; - dest = *result; - for (unsigned char * p = (unsigned char *) flags; *p; p++) { - *dest = (unsigned short) *p; - dest++; - } - } - } - return len; -} - -unsigned short HashMgr::decode_flag(const char * f) { - unsigned short s = 0; - int i; - switch (flag_mode) { - case FLAG_LONG: - s = ((unsigned short) f[0] << 8) + (unsigned short) f[1]; - break; - case FLAG_NUM: - i = atoi(f); - if (i >= DEFAULTFLAGS) HUNSPELL_WARNING(stderr, "error: flag id %d is too large (max: %d)\n", i, DEFAULTFLAGS - 1); - s = (unsigned short) i; - break; - case FLAG_UNI: - u8_u16((w_char *) &s, 1, f); - break; - default: - s = (unsigned short) *((unsigned char *)f); - } - if (s == 0) HUNSPELL_WARNING(stderr, "error: 0 is wrong flag id\n"); - return s; -} - -char * HashMgr::encode_flag(unsigned short f) { - unsigned char ch[10]; - if (f==0) return mystrdup("(NULL)"); - if (flag_mode == FLAG_LONG) { - ch[0] = (unsigned char) (f >> 8); - ch[1] = (unsigned char) (f - ((f >> 8) << 8)); - ch[2] = '\0'; - } else if (flag_mode == FLAG_NUM) { - sprintf((char *) ch, "%d", f); - } else if (flag_mode == FLAG_UNI) { - u16_u8((char *) &ch, 10, (w_char *) &f, 1); - } else { - ch[0] = (unsigned char) (f); - ch[1] = '\0'; - } - return mystrdup((char *) ch); -} - -// read in aff file and set flag mode -int HashMgr::load_config(const char * affpath, const char * key) -{ - char * line; // io buffers - int firstline = 1; - - // open the affix file - FileMgr * afflst = new FileMgr(affpath, key); - if (!afflst) { - HUNSPELL_WARNING(stderr, "Error - could not open affix description file %s\n",affpath); - return 1; - } - - // read in each line ignoring any that do not - // start with a known line type indicator - - while ((line = afflst->getline())) { - mychomp(line); - - /* remove byte order mark */ - if (firstline) { - firstline = 0; - if (strncmp(line,"\xEF\xBB\xBF",3) == 0) memmove(line, line+3, strlen(line+3)+1); - } - - /* parse in the try string */ - if ((strncmp(line,"FLAG",4) == 0) && isspace(line[4])) { - if (flag_mode != FLAG_CHAR) { - HUNSPELL_WARNING(stderr, "error: line %d: multiple definitions of the FLAG affix file parameter\n", afflst->getlinenum()); - } - if (strstr(line, "long")) flag_mode = FLAG_LONG; - if (strstr(line, "num")) flag_mode = FLAG_NUM; - if (strstr(line, "UTF-8")) flag_mode = FLAG_UNI; - if (flag_mode == FLAG_CHAR) { - HUNSPELL_WARNING(stderr, "error: line %d: FLAG needs `num', `long' or `UTF-8' parameter\n", afflst->getlinenum()); - } - } - if (strncmp(line,"FORBIDDENWORD",13) == 0) { - char * st = NULL; - if (parse_string(line, &st, afflst->getlinenum())) { - delete afflst; - return 1; - } - forbiddenword = decode_flag(st); - free(st); - } - if (strncmp(line, "SET", 3) == 0) { - if (parse_string(line, &enc, afflst->getlinenum())) { - delete afflst; - return 1; - } - if (strcmp(enc, "UTF-8") == 0) { - utf8 = 1; -#ifndef OPENOFFICEORG -#ifndef MOZILLA_CLIENT - initialize_utf_tbl(); -#endif -#endif - } else csconv = get_current_cs(enc); - } - if (strncmp(line, "LANG", 4) == 0) { - if (parse_string(line, &lang, afflst->getlinenum())) { - delete afflst; - return 1; - } - langnum = get_lang_num(lang); - } - - /* parse in the ignored characters (for example, Arabic optional diacritics characters */ - if (strncmp(line,"IGNORE",6) == 0) { - if (parse_array(line, &ignorechars, &ignorechars_utf16, - &ignorechars_utf16_len, utf8, afflst->getlinenum())) { - delete afflst; - return 1; - } - } - - if ((strncmp(line,"AF",2) == 0) && isspace(line[2])) { - if (parse_aliasf(line, afflst)) { - delete afflst; - return 1; - } - } - - if ((strncmp(line,"AM",2) == 0) && isspace(line[2])) { - if (parse_aliasm(line, afflst)) { - delete afflst; - return 1; - } - } - - if (strncmp(line,"COMPLEXPREFIXES",15) == 0) complexprefixes = 1; - if (((strncmp(line,"SFX",3) == 0) || (strncmp(line,"PFX",3) == 0)) && isspace(line[3])) break; - } - if (csconv == NULL) csconv = get_current_cs(SPELL_ENCODING); - delete afflst; - return 0; -} - -/* parse in the ALIAS table */ -int HashMgr::parse_aliasf(char * line, FileMgr * af) -{ - if (numaliasf != 0) { - HUNSPELL_WARNING(stderr, "error: line %d: multiple table definitions\n", af->getlinenum()); - return 1; - } - char * tp = line; - char * piece; - int i = 0; - int np = 0; - piece = mystrsep(&tp, 0); - while (piece) { - if (*piece != '\0') { - switch(i) { - case 0: { np++; break; } - case 1: { - numaliasf = atoi(piece); - if (numaliasf < 1) { - numaliasf = 0; - aliasf = NULL; - aliasflen = NULL; - HUNSPELL_WARNING(stderr, "error: line %d: bad entry number\n", af->getlinenum()); - return 1; - } - aliasf = (unsigned short **) malloc(numaliasf * sizeof(unsigned short *)); - aliasflen = (unsigned short *) malloc(numaliasf * sizeof(short)); - if (!aliasf || !aliasflen) { - numaliasf = 0; - if (aliasf) free(aliasf); - if (aliasflen) free(aliasflen); - aliasf = NULL; - aliasflen = NULL; - return 1; - } - np++; - break; - } - default: break; - } - i++; - } - piece = mystrsep(&tp, 0); - } - if (np != 2) { - numaliasf = 0; - free(aliasf); - free(aliasflen); - aliasf = NULL; - aliasflen = NULL; - HUNSPELL_WARNING(stderr, "error: line %d: missing data\n", af->getlinenum()); - return 1; - } - - /* now parse the numaliasf lines to read in the remainder of the table */ - char * nl; - for (int j=0; j < numaliasf; j++) { - if (!(nl = af->getline())) return 1; - mychomp(nl); - tp = nl; - i = 0; - aliasf[j] = NULL; - aliasflen[j] = 0; - piece = mystrsep(&tp, 0); - while (piece) { - if (*piece != '\0') { - switch(i) { - case 0: { - if (strncmp(piece,"AF",2) != 0) { - numaliasf = 0; - free(aliasf); - free(aliasflen); - aliasf = NULL; - aliasflen = NULL; - HUNSPELL_WARNING(stderr, "error: line %d: table is corrupt\n", af->getlinenum()); - return 1; - } - break; - } - case 1: { - aliasflen[j] = (unsigned short) decode_flags(&(aliasf[j]), piece, af); - flag_qsort(aliasf[j], 0, aliasflen[j]); - break; - } - default: break; - } - i++; - } - piece = mystrsep(&tp, 0); - } - if (!aliasf[j]) { - free(aliasf); - free(aliasflen); - aliasf = NULL; - aliasflen = NULL; - numaliasf = 0; - HUNSPELL_WARNING(stderr, "error: line %d: table is corrupt\n", af->getlinenum()); - return 1; - } - } - return 0; -} - -int HashMgr::is_aliasf() { - return (aliasf != NULL); -} - -int HashMgr::get_aliasf(int index, unsigned short ** fvec, FileMgr * af) { - if ((index > 0) && (index <= numaliasf)) { - *fvec = aliasf[index - 1]; - return aliasflen[index - 1]; - } - HUNSPELL_WARNING(stderr, "error: line %d: bad flag alias index: %d\n", af->getlinenum(), index); - *fvec = NULL; - return 0; -} - -/* parse morph alias definitions */ -int HashMgr::parse_aliasm(char * line, FileMgr * af) -{ - if (numaliasm != 0) { - HUNSPELL_WARNING(stderr, "error: line %d: multiple table definitions\n", af->getlinenum()); - return 1; - } - char * tp = line; - char * piece; - int i = 0; - int np = 0; - piece = mystrsep(&tp, 0); - while (piece) { - if (*piece != '\0') { - switch(i) { - case 0: { np++; break; } - case 1: { - numaliasm = atoi(piece); - if (numaliasm < 1) { - HUNSPELL_WARNING(stderr, "error: line %d: bad entry number\n", af->getlinenum()); - return 1; - } - aliasm = (char **) malloc(numaliasm * sizeof(char *)); - if (!aliasm) { - numaliasm = 0; - return 1; - } - np++; - break; - } - default: break; - } - i++; - } - piece = mystrsep(&tp, 0); - } - if (np != 2) { - numaliasm = 0; - free(aliasm); - aliasm = NULL; - HUNSPELL_WARNING(stderr, "error: line %d: missing data\n", af->getlinenum()); - return 1; - } - - /* now parse the numaliasm lines to read in the remainder of the table */ - char * nl = line; - for (int j=0; j < numaliasm; j++) { - if (!(nl = af->getline())) return 1; - mychomp(nl); - tp = nl; - i = 0; - aliasm[j] = NULL; - piece = mystrsep(&tp, ' '); - while (piece) { - if (*piece != '\0') { - switch(i) { - case 0: { - if (strncmp(piece,"AM",2) != 0) { - HUNSPELL_WARNING(stderr, "error: line %d: table is corrupt\n", af->getlinenum()); - numaliasm = 0; - free(aliasm); - aliasm = NULL; - return 1; - } - break; - } - case 1: { - // add the remaining of the line - if (*tp) { - *(tp - 1) = ' '; - tp = tp + strlen(tp); - } - if (complexprefixes) { - if (utf8) reverseword_utf(piece); - else reverseword(piece); - } - aliasm[j] = mystrdup(piece); - if (!aliasm[j]) { - numaliasm = 0; - free(aliasm); - aliasm = NULL; - return 1; - } - break; } - default: break; - } - i++; - } - piece = mystrsep(&tp, ' '); - } - if (!aliasm[j]) { - numaliasm = 0; - free(aliasm); - aliasm = NULL; - HUNSPELL_WARNING(stderr, "error: line %d: table is corrupt\n", af->getlinenum()); - return 1; - } - } - return 0; -} - -int HashMgr::is_aliasm() { - return (aliasm != NULL); -} - -char * HashMgr::get_aliasm(int index) { - if ((index > 0) && (index <= numaliasm)) return aliasm[index - 1]; - HUNSPELL_WARNING(stderr, "error: bad morph. alias index: %d\n", index); - return NULL; -} diff --git a/plugins/SpellChecker/hunspell/hashmgr.hxx b/plugins/SpellChecker/hunspell/hashmgr.hxx deleted file mode 100644 index 341b08131c..0000000000 --- a/plugins/SpellChecker/hunspell/hashmgr.hxx +++ /dev/null @@ -1,69 +0,0 @@ -#ifndef _HASHMGR_HXX_ -#define _HASHMGR_HXX_ - -#include "hunvisapi.h" - -#include - -#include "htypes.hxx" -#include "filemgr.hxx" - -enum flag { FLAG_CHAR, FLAG_LONG, FLAG_NUM, FLAG_UNI }; - -class LIBHUNSPELL_DLL_EXPORTED HashMgr -{ - int tablesize; - struct hentry ** tableptr; - int userword; - flag flag_mode; - int complexprefixes; - int utf8; - unsigned short forbiddenword; - int langnum; - char * enc; - char * lang; - struct cs_info * csconv; - char * ignorechars; - unsigned short * ignorechars_utf16; - int ignorechars_utf16_len; - int numaliasf; // flag vector `compression' with aliases - unsigned short ** aliasf; - unsigned short * aliasflen; - int numaliasm; // morphological desciption `compression' with aliases - char ** aliasm; - - -public: - HashMgr(const char * tpath, const char * apath, const char * key = NULL); - ~HashMgr(); - - struct hentry * lookup(const char *) const; - int hash(const char *) const; - struct hentry * walk_hashtable(int & col, struct hentry * hp) const; - - int add(const char * word); - int add_with_affix(const char * word, const char * pattern); - int remove(const char * word); - int decode_flags(unsigned short ** result, char * flags, FileMgr * af); - unsigned short decode_flag(const char * flag); - char * encode_flag(unsigned short flag); - int is_aliasf(); - int get_aliasf(int index, unsigned short ** fvec, FileMgr * af); - int is_aliasm(); - char * get_aliasm(int index); - -private: - int get_clen_and_captype(const char * word, int wbl, int * captype); - int load_tables(const char * tpath, const char * key); - int add_word(const char * word, int wbl, int wcl, unsigned short * ap, - int al, const char * desc, bool onlyupcase); - int load_config(const char * affpath, const char * key); - int parse_aliasf(char * line, FileMgr * af); - int add_hidden_capitalized_word(char * word, int wbl, int wcl, - unsigned short * flags, int al, char * dp, int captype); - int parse_aliasm(char * line, FileMgr * af); - int remove_forbidden_flag(const char * word); - -}; - -#endif diff --git a/plugins/SpellChecker/hunspell/htypes.hxx b/plugins/SpellChecker/hunspell/htypes.hxx deleted file mode 100644 index 5b6c90966b..0000000000 --- a/plugins/SpellChecker/hunspell/htypes.hxx +++ /dev/null @@ -1,32 +0,0 @@ -#ifndef _HTYPES_HXX_ -#define _HTYPES_HXX_ - -#define ROTATE_LEN 5 - -#define ROTATE(v,q) \ - (v) = ((v) << (q)) | (((v) >> (32 - q)) & ((1 << (q))-1)); - -// hentry options -#define H_OPT (1 << 0) -#define H_OPT_ALIASM (1 << 1) -#define H_OPT_PHON (1 << 2) - -// see also csutil.hxx -#define HENTRY_WORD(h) &(h->word[0]) - -// approx. number of user defined words -#define USERWORD 1000 - -struct hentry -{ - unsigned char blen; // word length in bytes - unsigned char clen; // word length in characters (different for UTF-8 enc.) - short alen; // length of affix flag vector - unsigned short * astr; // affix flag vector - struct hentry * next; // next word with same hash code - struct hentry * next_homonym; // next homonym word (with same hash code) - char var; // variable fields (only for special pronounciation yet) - char word[1]; // variable-length word (8-bit or UTF-8 encoding) -}; - -#endif diff --git a/plugins/SpellChecker/hunspell/hunspell.cxx b/plugins/SpellChecker/hunspell/hunspell.cxx deleted file mode 100644 index 8e00e1b8cc..0000000000 --- a/plugins/SpellChecker/hunspell/hunspell.cxx +++ /dev/null @@ -1,2011 +0,0 @@ -#include "license.hunspell" -#include "license.myspell" - -#include -#include -#include - -#include "hunspell.hxx" -#include "hunspell.h" -#ifndef MOZILLA_CLIENT -# include "config.h" -#endif -#include "csutil.hxx" - -Hunspell::Hunspell(const char * affpath, const char * dpath, const char * key) -{ - encoding = NULL; - csconv = NULL; - utf8 = 0; - complexprefixes = 0; - affixpath = mystrdup(affpath); - maxdic = 0; - - /* first set up the hash manager */ - pHMgr[0] = new HashMgr(dpath, affpath, key); - if (pHMgr[0]) maxdic = 1; - - /* next set up the affix manager */ - /* it needs access to the hash manager lookup methods */ - pAMgr = new AffixMgr(affpath, pHMgr, &maxdic, key); - - /* get the preferred try string and the dictionary */ - /* encoding from the Affix Manager for that dictionary */ - char * try_string = pAMgr->get_try_string(); - encoding = pAMgr->get_encoding(); - langnum = pAMgr->get_langnum(); - utf8 = pAMgr->get_utf8(); - if (!utf8) - csconv = get_current_cs(encoding); - complexprefixes = pAMgr->get_complexprefixes(); - wordbreak = pAMgr->get_breaktable(); - - /* and finally set up the suggestion manager */ - pSMgr = new SuggestMgr(try_string, MAXSUGGESTION, pAMgr); - if (try_string) free(try_string); -} - -Hunspell::~Hunspell() -{ - if (pSMgr) delete pSMgr; - if (pAMgr) delete pAMgr; - for (int i = 0; i < maxdic; i++) delete pHMgr[i]; - maxdic = 0; - pSMgr = NULL; - pAMgr = NULL; -#ifdef MOZILLA_CLIENT - delete [] csconv; -#endif - csconv= NULL; - if (encoding) free(encoding); - encoding = NULL; - if (affixpath) free(affixpath); - affixpath = NULL; -} - -// load extra dictionaries -int Hunspell::add_dic(const char * dpath, const char * key) { - if (maxdic == MAXDIC || !affixpath) return 1; - pHMgr[maxdic] = new HashMgr(dpath, affixpath, key); - if (pHMgr[maxdic]) maxdic++; else return 1; - return 0; -} - -// make a copy of src at destination while removing all leading -// blanks and removing any trailing periods after recording -// their presence with the abbreviation flag -// also since already going through character by character, -// set the capitalization type -// return the length of the "cleaned" (and UTF-8 encoded) word - -int Hunspell::cleanword2(char * dest, const char * src, - w_char * dest_utf, int * nc, int * pcaptype, int * pabbrev) -{ - unsigned char * p = (unsigned char *) dest; - const unsigned char * q = (const unsigned char * ) src; - - // first skip over any leading blanks - while ((*q != '\0') && (*q == ' ')) q++; - - // now strip off any trailing periods (recording their presence) - *pabbrev = 0; - int nl = strlen((const char *)q); - while ((nl > 0) && (*(q+nl-1)=='.')) { - nl--; - (*pabbrev)++; - } - - // if no characters are left it can't be capitalized - if (nl <= 0) { - *pcaptype = NOCAP; - *p = '\0'; - return 0; - } - - strncpy(dest, (char *) q, nl); - *(dest + nl) = '\0'; - nl = strlen(dest); - if (utf8) { - *nc = u8_u16(dest_utf, MAXWORDLEN, dest); - // don't check too long words - if (*nc >= MAXWORDLEN) return 0; - if (*nc == -1) { // big Unicode character (non BMP area) - *pcaptype = NOCAP; - return nl; - } - *pcaptype = get_captype_utf8(dest_utf, *nc, langnum); - } else { - *pcaptype = get_captype(dest, nl, csconv); - *nc = nl; - } - return nl; -} - -int Hunspell::cleanword(char * dest, const char * src, - int * pcaptype, int * pabbrev) -{ - unsigned char * p = (unsigned char *) dest; - const unsigned char * q = (const unsigned char * ) src; - int firstcap = 0; - - // first skip over any leading blanks - while ((*q != '\0') && (*q == ' ')) q++; - - // now strip off any trailing periods (recording their presence) - *pabbrev = 0; - int nl = strlen((const char *)q); - while ((nl > 0) && (*(q+nl-1)=='.')) { - nl--; - (*pabbrev)++; - } - - // if no characters are left it can't be capitalized - if (nl <= 0) { - *pcaptype = NOCAP; - *p = '\0'; - return 0; - } - - // now determine the capitalization type of the first nl letters - int ncap = 0; - int nneutral = 0; - int nc = 0; - - if (!utf8) { - while (nl > 0) { - nc++; - if (csconv[(*q)].ccase) ncap++; - if (csconv[(*q)].cupper == csconv[(*q)].clower) nneutral++; - *p++ = *q++; - nl--; - } - // remember to terminate the destination string - *p = '\0'; - firstcap = csconv[(unsigned char)(*dest)].ccase; - } else { - unsigned short idx; - w_char t[MAXWORDLEN]; - nc = u8_u16(t, MAXWORDLEN, src); - for (int i = 0; i < nc; i++) { - idx = (t[i].h << 8) + t[i].l; - unsigned short low = unicodetolower(idx, langnum); - if (idx != low) ncap++; - if (unicodetoupper(idx, langnum) == low) nneutral++; - } - u16_u8(dest, MAXWORDUTF8LEN, t, nc); - if (ncap) { - idx = (t[0].h << 8) + t[0].l; - firstcap = (idx != unicodetolower(idx, langnum)); - } - } - - // now finally set the captype - if (ncap == 0) { - *pcaptype = NOCAP; - } else if ((ncap == 1) && firstcap) { - *pcaptype = INITCAP; - } else if ((ncap == nc) || ((ncap + nneutral) == nc)){ - *pcaptype = ALLCAP; - } else if ((ncap > 1) && firstcap) { - *pcaptype = HUHINITCAP; - } else { - *pcaptype = HUHCAP; - } - return strlen(dest); -} - -void Hunspell::mkallcap(char * p) -{ - if (utf8) { - w_char u[MAXWORDLEN]; - int nc = u8_u16(u, MAXWORDLEN, p); - unsigned short idx; - for (int i = 0; i < nc; i++) { - idx = (u[i].h << 8) + u[i].l; - if (idx != unicodetoupper(idx, langnum)) { - u[i].h = (unsigned char) (unicodetoupper(idx, langnum) >> 8); - u[i].l = (unsigned char) (unicodetoupper(idx, langnum) & 0x00FF); - } - } - u16_u8(p, MAXWORDUTF8LEN, u, nc); - } else { - while (*p != '\0') { - *p = csconv[((unsigned char) *p)].cupper; - p++; - } - } -} - -int Hunspell::mkallcap2(char * p, w_char * u, int nc) -{ - if (utf8) { - unsigned short idx; - for (int i = 0; i < nc; i++) { - idx = (u[i].h << 8) + u[i].l; - unsigned short up = unicodetoupper(idx, langnum); - if (idx != up) { - u[i].h = (unsigned char) (up >> 8); - u[i].l = (unsigned char) (up & 0x00FF); - } - } - u16_u8(p, MAXWORDUTF8LEN, u, nc); - return strlen(p); - } else { - while (*p != '\0') { - *p = csconv[((unsigned char) *p)].cupper; - p++; - } - } - return nc; -} - - -void Hunspell::mkallsmall(char * p) -{ - while (*p != '\0') { - *p = csconv[((unsigned char) *p)].clower; - p++; - } -} - -int Hunspell::mkallsmall2(char * p, w_char * u, int nc) -{ - if (utf8) { - unsigned short idx; - for (int i = 0; i < nc; i++) { - idx = (u[i].h << 8) + u[i].l; - unsigned short low = unicodetolower(idx, langnum); - if (idx != low) { - u[i].h = (unsigned char) (low >> 8); - u[i].l = (unsigned char) (low & 0x00FF); - } - } - u16_u8(p, MAXWORDUTF8LEN, u, nc); - return strlen(p); - } else { - while (*p != '\0') { - *p = csconv[((unsigned char) *p)].clower; - p++; - } - } - return nc; -} - -// convert UTF-8 sharp S codes to latin 1 -char * Hunspell::sharps_u8_l1(char * dest, char * source) { - char * p = dest; - *p = *source; - for (p++, source++; *(source - 1); p++, source++) { - *p = *source; - if (*source == '\x9F') *--p = '\xDF'; - } - return dest; -} - -// recursive search for right ss - sharp s permutations -hentry * Hunspell::spellsharps(char * base, char * pos, int n, - int repnum, char * tmp, int * info, char **root) { - pos = strstr(pos, "ss"); - if (pos && (n < MAXSHARPS)) { - *pos = '\xC3'; - *(pos + 1) = '\x9F'; - hentry * h = spellsharps(base, pos + 2, n + 1, repnum + 1, tmp, info, root); - if (h) return h; - *pos = 's'; - *(pos + 1) = 's'; - h = spellsharps(base, pos + 2, n + 1, repnum, tmp, info, root); - if (h) return h; - } else if (repnum > 0) { - if (utf8) return checkword(base, info, root); - return checkword(sharps_u8_l1(tmp, base), info, root); - } - return NULL; -} - -int Hunspell::is_keepcase(const hentry * rv) { - return pAMgr && rv->astr && pAMgr->get_keepcase() && - TESTAFF(rv->astr, pAMgr->get_keepcase(), rv->alen); -} - -/* insert a word to the beginning of the suggestion array and return ns */ -int Hunspell::insert_sug(char ***slst, char * word, int ns) { - char * dup = mystrdup(word); - if (!dup) return ns; - if (ns == MAXSUGGESTION) { - ns--; - free((*slst)[ns]); - } - for (int k = ns; k > 0; k--) (*slst)[k] = (*slst)[k - 1]; - (*slst)[0] = dup; - return ns + 1; -} - -int Hunspell::spell(const char * word, int * info, char ** root) -{ - struct hentry * rv=NULL; - // need larger vector. For example, Turkish capital letter I converted a - // 2-byte UTF-8 character (dotless i) by mkallsmall. - char cw[MAXWORDUTF8LEN]; - char wspace[MAXWORDUTF8LEN]; - w_char unicw[MAXWORDLEN]; - // Hunspell supports XML input of the simplified API (see manual) - if (strcmp(word, SPELL_XML) == 0) return 1; - int nc = strlen(word); - int wl2 = 0; - if (utf8) { - if (nc >= MAXWORDUTF8LEN) return 0; - } else { - if (nc >= MAXWORDLEN) return 0; - } - int captype = 0; - int abbv = 0; - int wl = 0; - - // input conversion - RepList * rl = (pAMgr) ? pAMgr->get_iconvtable() : NULL; - if (rl && rl->conv(word, wspace)) wl = cleanword2(cw, wspace, unicw, &nc, &captype, &abbv); - else wl = cleanword2(cw, word, unicw, &nc, &captype, &abbv); - - int info2 = 0; - if (wl == 0 || maxdic == 0) return 1; - if (root) *root = NULL; - - // allow numbers with dots, dashes and commas (but forbid double separators: "..", "--" etc.) - enum { NBEGIN, NNUM, NSEP }; - int nstate = NBEGIN; - int i; - - for (i = 0; (i < wl); i++) { - if ((cw[i] <= '9') && (cw[i] >= '0')) { - nstate = NNUM; - } else if ((cw[i] == ',') || (cw[i] == '.') || (cw[i] == '-')) { - if ((nstate == NSEP) || (i == 0)) break; - nstate = NSEP; - } else break; - } - if ((i == wl) && (nstate == NNUM)) return 1; - if (!info) info = &info2; else *info = 0; - - switch(captype) { - case HUHCAP: - case HUHINITCAP: - *info += SPELL_ORIGCAP; - case NOCAP: { - rv = checkword(cw, info, root); - if ((abbv) && !(rv)) { - memcpy(wspace,cw,wl); - *(wspace+wl) = '.'; - *(wspace+wl+1) = '\0'; - rv = checkword(wspace, info, root); - } - break; - } - case ALLCAP: { - *info += SPELL_ORIGCAP; - rv = checkword(cw, info, root); - if (rv) break; - if (abbv) { - memcpy(wspace,cw,wl); - *(wspace+wl) = '.'; - *(wspace+wl+1) = '\0'; - rv = checkword(wspace, info, root); - if (rv) break; - } - // Spec. prefix handling for Catalan, French, Italian: - // prefixes separated by apostrophe (SANT'ELIA -> Sant'+Elia). - if (pAMgr && strchr(cw, '\'')) { - wl = mkallsmall2(cw, unicw, nc); - //There are no really sane circumstances where this could fail, - //but anyway... - if (char * apostrophe = strchr(cw, '\'')) { - if (utf8) { - w_char tmpword[MAXWORDLEN]; - *apostrophe = '\0'; - wl2 = u8_u16(tmpword, MAXWORDLEN, cw); - *apostrophe = '\''; - if (wl2 < nc) { - mkinitcap2(apostrophe + 1, unicw + wl2 + 1, nc - wl2 - 1); - rv = checkword(cw, info, root); - if (rv) break; - } - } else { - mkinitcap2(apostrophe + 1, unicw, nc); - rv = checkword(cw, info, root); - if (rv) break; - } - } - mkinitcap2(cw, unicw, nc); - rv = checkword(cw, info, root); - if (rv) break; - } - if (pAMgr && pAMgr->get_checksharps() && strstr(cw, "SS")) { - char tmpword[MAXWORDUTF8LEN]; - wl = mkallsmall2(cw, unicw, nc); - memcpy(wspace,cw,(wl+1)); - rv = spellsharps(wspace, wspace, 0, 0, tmpword, info, root); - if (!rv) { - wl2 = mkinitcap2(cw, unicw, nc); - rv = spellsharps(cw, cw, 0, 0, tmpword, info, root); - } - if ((abbv) && !(rv)) { - *(wspace+wl) = '.'; - *(wspace+wl+1) = '\0'; - rv = spellsharps(wspace, wspace, 0, 0, tmpword, info, root); - if (!rv) { - memcpy(wspace, cw, wl2); - *(wspace+wl2) = '.'; - *(wspace+wl2+1) = '\0'; - rv = spellsharps(wspace, wspace, 0, 0, tmpword, info, root); - } - } - if (rv) break; - } - } - case INITCAP: { - *info += SPELL_ORIGCAP; - wl = mkallsmall2(cw, unicw, nc); - memcpy(wspace,cw,(wl+1)); - wl2 = mkinitcap2(cw, unicw, nc); - if (captype == INITCAP) *info += SPELL_INITCAP; - rv = checkword(cw, info, root); - if (captype == INITCAP) *info -= SPELL_INITCAP; - // forbid bad capitalization - // (for example, ijs -> Ijs instead of IJs in Dutch) - // use explicit forms in dic: Ijs/F (F = FORBIDDENWORD flag) - if (*info & SPELL_FORBIDDEN) { - rv = NULL; - break; - } - if (rv && is_keepcase(rv) && (captype == ALLCAP)) rv = NULL; - if (rv) break; - - rv = checkword(wspace, info, root); - if (abbv && !rv) { - - *(wspace+wl) = '.'; - *(wspace+wl+1) = '\0'; - rv = checkword(wspace, info, root); - if (!rv) { - memcpy(wspace, cw, wl2); - *(wspace+wl2) = '.'; - *(wspace+wl2+1) = '\0'; - if (captype == INITCAP) *info += SPELL_INITCAP; - rv = checkword(wspace, info, root); - if (captype == INITCAP) *info -= SPELL_INITCAP; - if (rv && is_keepcase(rv) && (captype == ALLCAP)) rv = NULL; - break; - } - } - if (rv && is_keepcase(rv) && - ((captype == ALLCAP) || - // if CHECKSHARPS: KEEPCASE words with \xDF are allowed - // in INITCAP form, too. - !(pAMgr->get_checksharps() && - ((utf8 && strstr(wspace, "\xC3\x9F")) || - (!utf8 && strchr(wspace, '\xDF')))))) rv = NULL; - break; - } - } - - if (rv) { - if (pAMgr && pAMgr->get_warn() && rv->astr && - TESTAFF(rv->astr, pAMgr->get_warn(), rv->alen)) { - *info += SPELL_WARN; - if (pAMgr->get_forbidwarn()) return 0; - return HUNSPELL_OK_WARN; - } - return HUNSPELL_OK; - } - - // recursive breaking at break points - if (wordbreak) { - char * s; - char r; - int nbr = 0; - wl = strlen(cw); - int numbreak = pAMgr ? pAMgr->get_numbreak() : 0; - - // calculate break points for recursion limit - for (int j = 0; j < numbreak; j++) { - s = cw; - do { - s = (char *) strstr(s, wordbreak[j]); - if (s) { - nbr++; - s++; - } - } while (s); - } - if (nbr >= 10) return 0; - - // check boundary patterns (^begin and end$) - for (int j = 0; j < numbreak; j++) { - int plen = strlen(wordbreak[j]); - if (plen == 1 || plen > wl) continue; - if (wordbreak[j][0] == '^' && strncmp(cw, wordbreak[j] + 1, plen - 1) == 0 - && spell(cw + plen - 1)) return 1; - if (wordbreak[j][plen - 1] == '$' && - strncmp(cw + wl - plen + 1, wordbreak[j], plen - 1) == 0) { - r = cw[wl - plen + 1]; - cw[wl - plen + 1] = '\0'; - if (spell(cw)) return 1; - cw[wl - plen + 1] = r; - } - } - - // other patterns - for (int j = 0; j < numbreak; j++) { - int plen = strlen(wordbreak[j]); - s=(char *) strstr(cw, wordbreak[j]); - if (s && (s > cw) && (s < cw + wl - plen)) { - if (!spell(s + plen)) continue; - r = *s; - *s = '\0'; - // examine 2 sides of the break point - if (spell(cw)) return 1; - *s = r; - - // LANG_hu: spec. dash rule - if (langnum == LANG_hu && strcmp(wordbreak[j], "-") == 0) { - r = s[1]; - s[1] = '\0'; - if (spell(cw)) return 1; // check the first part with dash - s[1] = r; - } - // end of LANG speficic region - - } - } - } - - return 0; -} - -struct hentry * Hunspell::checkword(const char * w, int * info, char ** root) -{ - struct hentry * he = NULL; - int len, i; - char w2[MAXWORDUTF8LEN]; - const char * word; - - char * ignoredchars = pAMgr->get_ignore(); - if (ignoredchars != NULL) { - strcpy(w2, w); - if (utf8) { - int ignoredchars_utf16_len; - unsigned short * ignoredchars_utf16 = pAMgr->get_ignore_utf16(&ignoredchars_utf16_len); - remove_ignored_chars_utf(w2, ignoredchars_utf16, ignoredchars_utf16_len); - } else { - remove_ignored_chars(w2,ignoredchars); - } - word = w2; - } else word = w; - - len = strlen(word); - - if (!len) - return NULL; - - // word reversing wrapper for complex prefixes - if (complexprefixes) { - if (word != w2) { - strcpy(w2, word); - word = w2; - } - if (utf8) reverseword_utf(w2); else reverseword(w2); - } - - // look word in hash table - for (i = 0; (i < maxdic) && !he; i ++) { - he = (pHMgr[i])->lookup(word); - - // check forbidden and onlyincompound words - if ((he) && (he->astr) && (pAMgr) && TESTAFF(he->astr, pAMgr->get_forbiddenword(), he->alen)) { - if (info) *info += SPELL_FORBIDDEN; - // LANG_hu section: set dash information for suggestions - if (langnum == LANG_hu) { - if (pAMgr->get_compoundflag() && - TESTAFF(he->astr, pAMgr->get_compoundflag(), he->alen)) { - if (info) *info += SPELL_COMPOUND; - } - } - return NULL; - } - - // he = next not needaffix, onlyincompound homonym or onlyupcase word - while (he && (he->astr) && - ((pAMgr->get_needaffix() && TESTAFF(he->astr, pAMgr->get_needaffix(), he->alen)) || - (pAMgr->get_onlyincompound() && TESTAFF(he->astr, pAMgr->get_onlyincompound(), he->alen)) || - (info && (*info & SPELL_INITCAP) && TESTAFF(he->astr, ONLYUPCASEFLAG, he->alen)) - )) he = he->next_homonym; - } - - // check with affixes - if (!he && pAMgr) { - // try stripping off affixes */ - he = pAMgr->affix_check(word, len, 0); - - // check compound restriction and onlyupcase - if (he && he->astr && ( - (pAMgr->get_onlyincompound() && - TESTAFF(he->astr, pAMgr->get_onlyincompound(), he->alen)) || - (info && (*info & SPELL_INITCAP) && - TESTAFF(he->astr, ONLYUPCASEFLAG, he->alen)))) { - he = NULL; - } - - if (he) { - if ((he->astr) && (pAMgr) && TESTAFF(he->astr, pAMgr->get_forbiddenword(), he->alen)) { - if (info) *info += SPELL_FORBIDDEN; - return NULL; - } - if (root) { - *root = mystrdup(he->word); - if (*root && complexprefixes) { - if (utf8) reverseword_utf(*root); else reverseword(*root); - } - } - // try check compound word - } else if (pAMgr->get_compound()) { - he = pAMgr->compound_check(word, len, 0, 0, 100, 0, NULL, 0, 0, info); - // LANG_hu section: `moving rule' with last dash - if ((!he) && (langnum == LANG_hu) && (word[len-1] == '-')) { - char * dup = mystrdup(word); - if (!dup) return NULL; - dup[len-1] = '\0'; - he = pAMgr->compound_check(dup, len-1, -5, 0, 100, 0, NULL, 1, 0, info); - free(dup); - } - // end of LANG speficic region - if (he) { - if (root) { - *root = mystrdup(he->word); - if (*root && complexprefixes) { - if (utf8) reverseword_utf(*root); else reverseword(*root); - } - } - if (info) *info += SPELL_COMPOUND; - } - } - - } - - return he; -} - -int Hunspell::suggest(char*** slst, const char * word) -{ - int onlycmpdsug = 0; - char cw[MAXWORDUTF8LEN]; - char wspace[MAXWORDUTF8LEN]; - if (!pSMgr || maxdic == 0) return 0; - w_char unicw[MAXWORDLEN]; - *slst = NULL; - // process XML input of the simplified API (see manual) - if (strncmp(word, SPELL_XML, sizeof(SPELL_XML) - 3) == 0) { - return spellml(slst, word); - } - int nc = strlen(word); - if (utf8) { - if (nc >= MAXWORDUTF8LEN) return 0; - } else { - if (nc >= MAXWORDLEN) return 0; - } - int captype = 0; - int abbv = 0; - int wl = 0; - - // input conversion - RepList * rl = (pAMgr) ? pAMgr->get_iconvtable() : NULL; - if (rl && rl->conv(word, wspace)) wl = cleanword2(cw, wspace, unicw, &nc, &captype, &abbv); - else wl = cleanword2(cw, word, unicw, &nc, &captype, &abbv); - - if (wl == 0) return 0; - int ns = 0; - int capwords = 0; - - // check capitalized form for FORCEUCASE - if (pAMgr && captype == NOCAP && pAMgr->get_forceucase()) { - int info = SPELL_ORIGCAP; - char ** wlst; - if (checkword(cw, &info, NULL)) { - if (*slst) { - wlst = *slst; - } else { - wlst = (char **) malloc(MAXSUGGESTION * sizeof(char *)); - if (wlst == NULL) return -1; - *slst = wlst; - for (int i = 0; i < MAXSUGGESTION; i++) { - wlst[i] = NULL; - } - } - wlst[0] = mystrdup(cw); - mkinitcap(wlst[0]); - return 1; - } - } - - switch(captype) { - case NOCAP: { - ns = pSMgr->suggest(slst, cw, ns, &onlycmpdsug); - break; - } - - case INITCAP: { - capwords = 1; - ns = pSMgr->suggest(slst, cw, ns, &onlycmpdsug); - if (ns == -1) break; - memcpy(wspace,cw,(wl+1)); - mkallsmall2(wspace, unicw, nc); - ns = pSMgr->suggest(slst, wspace, ns, &onlycmpdsug); - break; - } - case HUHINITCAP: - capwords = 1; - case HUHCAP: { - ns = pSMgr->suggest(slst, cw, ns, &onlycmpdsug); - if (ns != -1) { - int prevns; - // something.The -> something. The - char * dot = strchr(cw, '.'); - if (dot && (dot > cw)) { - int captype_; - if (utf8) { - w_char w_[MAXWORDLEN]; - int wl_ = u8_u16(w_, MAXWORDLEN, dot + 1); - captype_ = get_captype_utf8(w_, wl_, langnum); - } else captype_ = get_captype(dot+1, strlen(dot+1), csconv); - if (captype_ == INITCAP) { - char * st = mystrdup(cw); - if (st) st = (char *) realloc(st, wl + 2); - if (st) { - st[(dot - cw) + 1] = ' '; - strcpy(st + (dot - cw) + 2, dot + 1); - ns = insert_sug(slst, st, ns); - free(st); - } - } - } - if (captype == HUHINITCAP) { - // TheOpenOffice.org -> The OpenOffice.org - memcpy(wspace,cw,(wl+1)); - mkinitsmall2(wspace, unicw, nc); - ns = pSMgr->suggest(slst, wspace, ns, &onlycmpdsug); - } - memcpy(wspace,cw,(wl+1)); - mkallsmall2(wspace, unicw, nc); - if (spell(wspace)) ns = insert_sug(slst, wspace, ns); - prevns = ns; - ns = pSMgr->suggest(slst, wspace, ns, &onlycmpdsug); - if (captype == HUHINITCAP) { - mkinitcap2(wspace, unicw, nc); - if (spell(wspace)) ns = insert_sug(slst, wspace, ns); - ns = pSMgr->suggest(slst, wspace, ns, &onlycmpdsug); - } - // aNew -> "a New" (instead of "a new") - for (int j = prevns; j < ns; j++) { - char * space = strchr((*slst)[j],' '); - if (space) { - int slen = strlen(space + 1); - // different case after space (need capitalisation) - if ((slen < wl) && strcmp(cw + wl - slen, space + 1)) { - w_char w[MAXWORDLEN]; - int wc = 0; - char * r = (*slst)[j]; - if (utf8) wc = u8_u16(w, MAXWORDLEN, space + 1); - mkinitcap2(space + 1, w, wc); - // set as first suggestion - for (int k = j; k > 0; k--) (*slst)[k] = (*slst)[k - 1]; - (*slst)[0] = r; - } - } - } - } - break; - } - - case ALLCAP: { - memcpy(wspace, cw, (wl+1)); - mkallsmall2(wspace, unicw, nc); - ns = pSMgr->suggest(slst, wspace, ns, &onlycmpdsug); - if (ns == -1) break; - if (pAMgr && pAMgr->get_keepcase() && spell(wspace)) - ns = insert_sug(slst, wspace, ns); - mkinitcap2(wspace, unicw, nc); - ns = pSMgr->suggest(slst, wspace, ns, &onlycmpdsug); - for (int j=0; j < ns; j++) { - mkallcap((*slst)[j]); - if (pAMgr && pAMgr->get_checksharps()) { - char * pos; - if (utf8) { - pos = strstr((*slst)[j], "\xC3\x9F"); - while (pos) { - *pos = 'S'; - *(pos+1) = 'S'; - pos = strstr(pos+2, "\xC3\x9F"); - } - } else { - pos = strchr((*slst)[j], '\xDF'); - while (pos) { - (*slst)[j] = (char *) realloc((*slst)[j], strlen((*slst)[j]) + 2); - mystrrep((*slst)[j], "\xDF", "SS"); - pos = strchr((*slst)[j], '\xDF'); - } - } - } - } - break; - } - } - - // LANG_hu section: replace '-' with ' ' in Hungarian - if (langnum == LANG_hu) { - for (int j=0; j < ns; j++) { - char * pos = strchr((*slst)[j],'-'); - if (pos) { - int info; - char w[MAXWORDUTF8LEN]; - *pos = '\0'; - strcpy(w, (*slst)[j]); - strcat(w, pos + 1); - spell(w, &info, NULL); - if ((info & SPELL_COMPOUND) && (info & SPELL_FORBIDDEN)) { - *pos = ' '; - } else *pos = '-'; - } - } - } - // END OF LANG_hu section - - // try ngram approach since found nothing or only compound words - if (pAMgr && (ns == 0 || onlycmpdsug) && (pAMgr->get_maxngramsugs() != 0) && (*slst)) { - switch(captype) { - case NOCAP: { - ns = pSMgr->ngsuggest(*slst, cw, ns, pHMgr, maxdic); - break; - } - case HUHINITCAP: - capwords = 1; - case HUHCAP: { - memcpy(wspace,cw,(wl+1)); - mkallsmall2(wspace, unicw, nc); - ns = pSMgr->ngsuggest(*slst, wspace, ns, pHMgr, maxdic); - break; - } - case INITCAP: { - capwords = 1; - memcpy(wspace,cw,(wl+1)); - mkallsmall2(wspace, unicw, nc); - ns = pSMgr->ngsuggest(*slst, wspace, ns, pHMgr, maxdic); - break; - } - case ALLCAP: { - memcpy(wspace,cw,(wl+1)); - mkallsmall2(wspace, unicw, nc); - int oldns = ns; - ns = pSMgr->ngsuggest(*slst, wspace, ns, pHMgr, maxdic); - for (int j = oldns; j < ns; j++) - mkallcap((*slst)[j]); - break; - } - } - } - - // try dash suggestion (Afo-American -> Afro-American) - if (char * pos = strchr(cw, '-')) { - char * ppos = cw; - int nodashsug = 1; - char ** nlst = NULL; - int nn = 0; - int last = 0; - if (*slst) { - for (int j = 0; j < ns && nodashsug == 1; j++) { - if (strchr((*slst)[j], '-')) nodashsug = 0; - } - } - while (nodashsug && !last) { - if (*pos == '\0') last = 1; else *pos = '\0'; - if (!spell(ppos)) { - nn = suggest(&nlst, ppos); - for (int j = nn - 1; j >= 0; j--) { - strncpy(wspace, cw, ppos - cw); - strcpy(wspace + (ppos - cw), nlst[j]); - if (!last) { - strcat(wspace, "-"); - strcat(wspace, pos + 1); - } - ns = insert_sug(slst, wspace, ns); - free(nlst[j]); - } - if (nlst != NULL) free(nlst); - nodashsug = 0; - } - if (!last) { - *pos = '-'; - ppos = pos + 1; - pos = strchr(ppos, '-'); - } - if (!pos) pos = cw + strlen(cw); - } - } - - // word reversing wrapper for complex prefixes - if (complexprefixes) { - for (int j = 0; j < ns; j++) { - if (utf8) reverseword_utf((*slst)[j]); else reverseword((*slst)[j]); - } - } - - // capitalize - if (capwords) for (int j=0; j < ns; j++) { - mkinitcap((*slst)[j]); - } - - // expand suggestions with dot(s) - if (abbv && pAMgr && pAMgr->get_sugswithdots()) { - for (int j = 0; j < ns; j++) { - (*slst)[j] = (char *) realloc((*slst)[j], strlen((*slst)[j]) + 1 + abbv); - strcat((*slst)[j], word + strlen(word) - abbv); - } - } - - // remove bad capitalized and forbidden forms - if (pAMgr && (pAMgr->get_keepcase() || pAMgr->get_forbiddenword())) { - switch (captype) { - case INITCAP: - case ALLCAP: { - int l = 0; - for (int j=0; j < ns; j++) { - if (!strchr((*slst)[j],' ') && !spell((*slst)[j])) { - char s[MAXSWUTF8L]; - w_char w[MAXSWL]; - int len; - if (utf8) { - len = u8_u16(w, MAXSWL, (*slst)[j]); - } else { - strcpy(s, (*slst)[j]); - len = strlen(s); - } - mkallsmall2(s, w, len); - free((*slst)[j]); - if (spell(s)) { - (*slst)[l] = mystrdup(s); - if ((*slst)[l]) l++; - } else { - mkinitcap2(s, w, len); - if (spell(s)) { - (*slst)[l] = mystrdup(s); - if ((*slst)[l]) l++; - } - } - } else { - (*slst)[l] = (*slst)[j]; - l++; - } - } - ns = l; - } - } - } - - // remove duplications - int l = 0; - for (int j = 0; j < ns; j++) { - (*slst)[l] = (*slst)[j]; - for (int k = 0; k < l; k++) { - if (strcmp((*slst)[k], (*slst)[j]) == 0) { - free((*slst)[j]); - l--; - break; - } - } - l++; - } - ns = l; - - // output conversion - rl = (pAMgr) ? pAMgr->get_oconvtable() : NULL; - for (int j = 0; rl && j < ns; j++) { - if (rl->conv((*slst)[j], wspace)) { - free((*slst)[j]); - (*slst)[j] = mystrdup(wspace); - } - } - - // if suggestions removed by nosuggest, onlyincompound parameters - if (l == 0 && *slst) { - free(*slst); - *slst = NULL; - } - return l; -} - -void Hunspell::free_list(char *** slst, int n) { - freelist(slst, n); -} - -char * Hunspell::get_dic_encoding() -{ - return encoding; -} - -#ifdef HUNSPELL_EXPERIMENTAL -// XXX need UTF-8 support -int Hunspell::suggest_auto(char*** slst, const char * word) -{ - char cw[MAXWORDUTF8LEN]; - char wspace[MAXWORDUTF8LEN]; - if (!pSMgr || maxdic == 0) return 0; - int wl = strlen(word); - if (utf8) { - if (wl >= MAXWORDUTF8LEN) return 0; - } else { - if (wl >= MAXWORDLEN) return 0; - } - int captype = 0; - int abbv = 0; - wl = cleanword(cw, word, &captype, &abbv); - if (wl == 0) return 0; - int ns = 0; - *slst = NULL; // HU, nsug in pSMgr->suggest - - switch(captype) { - case NOCAP: { - ns = pSMgr->suggest_auto(slst, cw, ns); - if (ns>0) break; - break; - } - - case INITCAP: { - memcpy(wspace,cw,(wl+1)); - mkallsmall(wspace); - ns = pSMgr->suggest_auto(slst, wspace, ns); - for (int j=0; j < ns; j++) - mkinitcap((*slst)[j]); - ns = pSMgr->suggest_auto(slst, cw, ns); - break; - - } - - case HUHINITCAP: - case HUHCAP: { - ns = pSMgr->suggest_auto(slst, cw, ns); - if (ns == 0) { - memcpy(wspace,cw,(wl+1)); - mkallsmall(wspace); - ns = pSMgr->suggest_auto(slst, wspace, ns); - } - break; - } - - case ALLCAP: { - memcpy(wspace,cw,(wl+1)); - mkallsmall(wspace); - ns = pSMgr->suggest_auto(slst, wspace, ns); - - mkinitcap(wspace); - ns = pSMgr->suggest_auto(slst, wspace, ns); - - for (int j=0; j < ns; j++) - mkallcap((*slst)[j]); - break; - } - } - - // word reversing wrapper for complex prefixes - if (complexprefixes) { - for (int j = 0; j < ns; j++) { - if (utf8) reverseword_utf((*slst)[j]); else reverseword((*slst)[j]); - } - } - - // expand suggestions with dot(s) - if (abbv && pAMgr && pAMgr->get_sugswithdots()) { - for (int j = 0; j < ns; j++) { - (*slst)[j] = (char *) realloc((*slst)[j], strlen((*slst)[j]) + 1 + abbv); - strcat((*slst)[j], word + strlen(word) - abbv); - } - } - - // LANG_hu section: replace '-' with ' ' in Hungarian - if (langnum == LANG_hu) { - for (int j=0; j < ns; j++) { - char * pos = strchr((*slst)[j],'-'); - if (pos) { - int info; - char w[MAXWORDUTF8LEN]; - *pos = '\0'; - strcpy(w, (*slst)[j]); - strcat(w, pos + 1); - spell(w, &info, NULL); - if ((info & SPELL_COMPOUND) && (info & SPELL_FORBIDDEN)) { - *pos = ' '; - } else *pos = '-'; - } - } - } - // END OF LANG_hu section - return ns; -} -#endif - -int Hunspell::stem(char*** slst, char ** desc, int n) -{ - char result[MAXLNLEN]; - char result2[MAXLNLEN]; - *slst = NULL; - if (n == 0) return 0; - *result2 = '\0'; - for (int i = 0; i < n; i++) { - *result = '\0'; - // add compound word parts (except the last one) - char * s = (char *) desc[i]; - char * part = strstr(s, MORPH_PART); - if (part) { - char * nextpart = strstr(part + 1, MORPH_PART); - while (nextpart) { - copy_field(result + strlen(result), part, MORPH_PART); - part = nextpart; - nextpart = strstr(part + 1, MORPH_PART); - } - s = part; - } - - char **pl; - char tok[MAXLNLEN]; - strcpy(tok, s); - char * alt = strstr(tok, " | "); - while (alt) { - alt[1] = MSEP_ALT; - alt = strstr(alt, " | "); - } - int pln = line_tok(tok, &pl, MSEP_ALT); - for (int k = 0; k < pln; k++) { - // add derivational suffixes - if (strstr(pl[k], MORPH_DERI_SFX)) { - // remove inflectional suffixes - char * is = strstr(pl[k], MORPH_INFL_SFX); - if (is) *is = '\0'; - char * sg = pSMgr->suggest_gen(&(pl[k]), 1, pl[k]); - if (sg) { - char ** gen; - int genl = line_tok(sg, &gen, MSEP_REC); - free(sg); - for (int j = 0; j < genl; j++) { - sprintf(result2 + strlen(result2), "%c%s%s", - MSEP_REC, result, gen[j]); - } - freelist(&gen, genl); - } - } else { - sprintf(result2 + strlen(result2), "%c%s", MSEP_REC, result); - if (strstr(pl[k], MORPH_SURF_PFX)) { - copy_field(result2 + strlen(result2), pl[k], MORPH_SURF_PFX); - } - copy_field(result2 + strlen(result2), pl[k], MORPH_STEM); - } - } - freelist(&pl, pln); - } - int sln = line_tok(result2, slst, MSEP_REC); - return uniqlist(*slst, sln); - -} - -int Hunspell::stem(char*** slst, const char * word) -{ - char ** pl; - int pln = analyze(&pl, word); - int pln2 = stem(slst, pl, pln); - freelist(&pl, pln); - return pln2; -} - -#ifdef HUNSPELL_EXPERIMENTAL -int Hunspell::suggest_pos_stems(char*** slst, const char * word) -{ - char cw[MAXWORDUTF8LEN]; - char wspace[MAXWORDUTF8LEN]; - if (! pSMgr || maxdic == 0) return 0; - int wl = strlen(word); - if (utf8) { - if (wl >= MAXWORDUTF8LEN) return 0; - } else { - if (wl >= MAXWORDLEN) return 0; - } - int captype = 0; - int abbv = 0; - wl = cleanword(cw, word, &captype, &abbv); - if (wl == 0) return 0; - - int ns = 0; // ns=0 = normalized input - - *slst = NULL; // HU, nsug in pSMgr->suggest - - switch(captype) { - case HUHCAP: - case NOCAP: { - ns = pSMgr->suggest_pos_stems(slst, cw, ns); - - if ((abbv) && (ns == 0)) { - memcpy(wspace,cw,wl); - *(wspace+wl) = '.'; - *(wspace+wl+1) = '\0'; - ns = pSMgr->suggest_pos_stems(slst, wspace, ns); - } - - break; - } - - case INITCAP: { - - ns = pSMgr->suggest_pos_stems(slst, cw, ns); - - if (ns == 0 || ((*slst)[0][0] == '#')) { - memcpy(wspace,cw,(wl+1)); - mkallsmall(wspace); - ns = pSMgr->suggest_pos_stems(slst, wspace, ns); - } - - break; - - } - - case ALLCAP: { - ns = pSMgr->suggest_pos_stems(slst, cw, ns); - if (ns != 0) break; - - memcpy(wspace,cw,(wl+1)); - mkallsmall(wspace); - ns = pSMgr->suggest_pos_stems(slst, wspace, ns); - - if (ns == 0) { - mkinitcap(wspace); - ns = pSMgr->suggest_pos_stems(slst, wspace, ns); - } - break; - } - } - - return ns; -} -#endif // END OF HUNSPELL_EXPERIMENTAL CODE - -const char * Hunspell::get_wordchars() -{ - return pAMgr->get_wordchars(); -} - -unsigned short * Hunspell::get_wordchars_utf16(int * len) -{ - return pAMgr->get_wordchars_utf16(len); -} - -char * Hunspell::get_try_string() -{ - return pAMgr->get_try_string(); -} - -void Hunspell::mkinitcap(char * p) -{ - if (!utf8) { - if (*p != '\0') *p = csconv[((unsigned char)*p)].cupper; - } else { - int len; - w_char u[MAXWORDLEN]; - len = u8_u16(u, MAXWORDLEN, p); - unsigned short i = unicodetoupper((u[0].h << 8) + u[0].l, langnum); - u[0].h = (unsigned char) (i >> 8); - u[0].l = (unsigned char) (i & 0x00FF); - u16_u8(p, MAXWORDUTF8LEN, u, len); - } -} - -int Hunspell::mkinitcap2(char * p, w_char * u, int nc) -{ - if (!utf8) { - if (*p != '\0') *p = csconv[((unsigned char)*p)].cupper; - } else if (nc > 0) { - unsigned short i = unicodetoupper((u[0].h << 8) + u[0].l, langnum); - u[0].h = (unsigned char) (i >> 8); - u[0].l = (unsigned char) (i & 0x00FF); - u16_u8(p, MAXWORDUTF8LEN, u, nc); - return strlen(p); - } - return nc; -} - -int Hunspell::mkinitsmall2(char * p, w_char * u, int nc) -{ - if (!utf8) { - if (*p != '\0') *p = csconv[((unsigned char)*p)].clower; - } else if (nc > 0) { - unsigned short i = unicodetolower((u[0].h << 8) + u[0].l, langnum); - u[0].h = (unsigned char) (i >> 8); - u[0].l = (unsigned char) (i & 0x00FF); - u16_u8(p, MAXWORDUTF8LEN, u, nc); - return strlen(p); - } - return nc; -} - -int Hunspell::add(const char * word) -{ - if (pHMgr[0]) return (pHMgr[0])->add(word); - return 0; -} - -int Hunspell::add_with_affix(const char * word, const char * example) -{ - if (pHMgr[0]) return (pHMgr[0])->add_with_affix(word, example); - return 0; -} - -int Hunspell::remove(const char * word) -{ - if (pHMgr[0]) return (pHMgr[0])->remove(word); - return 0; -} - -const char * Hunspell::get_version() -{ - return pAMgr->get_version(); -} - -struct cs_info * Hunspell::get_csconv() -{ - return csconv; -} - -void Hunspell::cat_result(char * result, char * st) -{ - if (st) { - if (*result) mystrcat(result, "\n", MAXLNLEN); - mystrcat(result, st, MAXLNLEN); - free(st); - } -} - -int Hunspell::analyze(char*** slst, const char * word) -{ - char cw[MAXWORDUTF8LEN]; - char wspace[MAXWORDUTF8LEN]; - w_char unicw[MAXWORDLEN]; - int wl2 = 0; - *slst = NULL; - if (! pSMgr || maxdic == 0) return 0; - int nc = strlen(word); - if (utf8) { - if (nc >= MAXWORDUTF8LEN) return 0; - } else { - if (nc >= MAXWORDLEN) return 0; - } - int captype = 0; - int abbv = 0; - int wl = 0; - - // input conversion - RepList * rl = (pAMgr) ? pAMgr->get_iconvtable() : NULL; - if (rl && rl->conv(word, wspace)) wl = cleanword2(cw, wspace, unicw, &nc, &captype, &abbv); - else wl = cleanword2(cw, word, unicw, &nc, &captype, &abbv); - - if (wl == 0) { - if (abbv) { - for (wl = 0; wl < abbv; wl++) cw[wl] = '.'; - cw[wl] = '\0'; - abbv = 0; - } else return 0; - } - - char result[MAXLNLEN]; - char * st = NULL; - - *result = '\0'; - - int n = 0; - int n2 = 0; - int n3 = 0; - - // test numbers - // LANG_hu section: set dash information for suggestions - if (langnum == LANG_hu) { - while ((n < wl) && - (((cw[n] <= '9') && (cw[n] >= '0')) || (((cw[n] == '.') || (cw[n] == ',')) && (n > 0)))) { - n++; - if ((cw[n] == '.') || (cw[n] == ',')) { - if (((n2 == 0) && (n > 3)) || - ((n2 > 0) && ((cw[n-1] == '.') || (cw[n-1] == ',')))) break; - n2++; - n3 = n; - } - } - - if ((n == wl) && (n3 > 0) && (n - n3 > 3)) return 0; - if ((n == wl) || ((n>0) && ((cw[n]=='%') || (cw[n]=='\xB0')) && checkword(cw+n, NULL, NULL))) { - mystrcat(result, cw, MAXLNLEN); - result[n - 1] = '\0'; - if (n == wl) cat_result(result, pSMgr->suggest_morph(cw + n - 1)); - else { - char sign = cw[n]; - cw[n] = '\0'; - cat_result(result, pSMgr->suggest_morph(cw + n - 1)); - mystrcat(result, "+", MAXLNLEN); // XXX SPEC. MORPHCODE - cw[n] = sign; - cat_result(result, pSMgr->suggest_morph(cw + n)); - } - return line_tok(result, slst, MSEP_REC); - } - } - // END OF LANG_hu section - - switch(captype) { - case HUHCAP: - case HUHINITCAP: - case NOCAP: { - cat_result(result, pSMgr->suggest_morph(cw)); - if (abbv) { - memcpy(wspace,cw,wl); - *(wspace+wl) = '.'; - *(wspace+wl+1) = '\0'; - cat_result(result, pSMgr->suggest_morph(wspace)); - } - break; - } - case INITCAP: { - wl = mkallsmall2(cw, unicw, nc); - memcpy(wspace,cw,(wl+1)); - wl2 = mkinitcap2(cw, unicw, nc); - cat_result(result, pSMgr->suggest_morph(wspace)); - cat_result(result, pSMgr->suggest_morph(cw)); - if (abbv) { - *(wspace+wl) = '.'; - *(wspace+wl+1) = '\0'; - cat_result(result, pSMgr->suggest_morph(wspace)); - - memcpy(wspace, cw, wl2); - *(wspace+wl2) = '.'; - *(wspace+wl2+1) = '\0'; - - cat_result(result, pSMgr->suggest_morph(wspace)); - } - break; - } - case ALLCAP: { - cat_result(result, pSMgr->suggest_morph(cw)); - if (abbv) { - memcpy(wspace,cw,wl); - *(wspace+wl) = '.'; - *(wspace+wl+1) = '\0'; - cat_result(result, pSMgr->suggest_morph(cw)); - } - wl = mkallsmall2(cw, unicw, nc); - memcpy(wspace,cw,(wl+1)); - wl2 = mkinitcap2(cw, unicw, nc); - - cat_result(result, pSMgr->suggest_morph(wspace)); - cat_result(result, pSMgr->suggest_morph(cw)); - if (abbv) { - *(wspace+wl) = '.'; - *(wspace+wl+1) = '\0'; - cat_result(result, pSMgr->suggest_morph(wspace)); - - memcpy(wspace, cw, wl2); - *(wspace+wl2) = '.'; - *(wspace+wl2+1) = '\0'; - - cat_result(result, pSMgr->suggest_morph(wspace)); - } - break; - } - } - - if (*result) { - // word reversing wrapper for complex prefixes - if (complexprefixes) { - if (utf8) reverseword_utf(result); else reverseword(result); - } - return line_tok(result, slst, MSEP_REC); - } - - // compound word with dash (HU) I18n - char * dash = NULL; - int nresult = 0; - // LANG_hu section: set dash information for suggestions - if (langnum == LANG_hu) dash = (char *) strchr(cw,'-'); - if ((langnum == LANG_hu) && dash) { - *dash='\0'; - // examine 2 sides of the dash - if (dash[1] == '\0') { // base word ending with dash - if (spell(cw)) { - char * p = pSMgr->suggest_morph(cw); - if (p) { - int ret = line_tok(p, slst, MSEP_REC); - free(p); - return ret; - } - - } - } else if ((dash[1] == 'e') && (dash[2] == '\0')) { // XXX (HU) -e hat. - if (spell(cw) && (spell("-e"))) { - st = pSMgr->suggest_morph(cw); - if (st) { - mystrcat(result, st, MAXLNLEN); - free(st); - } - mystrcat(result,"+", MAXLNLEN); // XXX spec. separator in MORPHCODE - st = pSMgr->suggest_morph("-e"); - if (st) { - mystrcat(result, st, MAXLNLEN); - free(st); - } - return line_tok(result, slst, MSEP_REC); - } - } else { - // first word ending with dash: word- XXX ??? - char r2 = *(dash + 1); - dash[0]='-'; - dash[1]='\0'; - nresult = spell(cw); - dash[1] = r2; - dash[0]='\0'; - if (nresult && spell(dash+1) && ((strlen(dash+1) > 1) || - ((dash[1] > '0') && (dash[1] < '9')))) { - st = pSMgr->suggest_morph(cw); - if (st) { - mystrcat(result, st, MAXLNLEN); - free(st); - mystrcat(result,"+", MAXLNLEN); // XXX spec. separator in MORPHCODE - } - st = pSMgr->suggest_morph(dash+1); - if (st) { - mystrcat(result, st, MAXLNLEN); - free(st); - } - return line_tok(result, slst, MSEP_REC); - } - } - // affixed number in correct word - if (nresult && (dash > cw) && (((*(dash-1)<='9') && - (*(dash-1)>='0')) || (*(dash-1)=='.'))) { - *dash='-'; - n = 1; - if (*(dash - n) == '.') n++; - // search first not a number character to left from dash - while (((dash - n)>=cw) && ((*(dash - n)=='0') || (n < 3)) && (n < 6)) { - n++; - } - if ((dash - n) < cw) n--; - // numbers: valami1000000-hoz - // examine 100000-hoz, 10000-hoz 1000-hoz, 10-hoz, - // 56-hoz, 6-hoz - for(; n >= 1; n--) { - if ((*(dash - n) >= '0') && (*(dash - n) <= '9') && checkword(dash - n, NULL, NULL)) { - mystrcat(result, cw, MAXLNLEN); - result[dash - cw - n] = '\0'; - st = pSMgr->suggest_morph(dash - n); - if (st) { - mystrcat(result, st, MAXLNLEN); - free(st); - } - return line_tok(result, slst, MSEP_REC); - } - } - } - } - return 0; -} - -int Hunspell::generate(char*** slst, const char * word, char ** pl, int pln) -{ - *slst = NULL; - if (!pSMgr || !pln) return 0; - char **pl2; - int pl2n = analyze(&pl2, word); - int captype = 0; - int abbv = 0; - char cw[MAXWORDUTF8LEN]; - cleanword(cw, word, &captype, &abbv); - char result[MAXLNLEN]; - *result = '\0'; - - for (int i = 0; i < pln; i++) { - cat_result(result, pSMgr->suggest_gen(pl2, pl2n, pl[i])); - } - freelist(&pl2, pl2n); - - if (*result) { - // allcap - if (captype == ALLCAP) mkallcap(result); - - // line split - int linenum = line_tok(result, slst, MSEP_REC); - - // capitalize - if (captype == INITCAP || captype == HUHINITCAP) { - for (int j=0; j < linenum; j++) mkinitcap((*slst)[j]); - } - - // temporary filtering of prefix related errors (eg. - // generate("undrinkable", "eats") --> "undrinkables" and "*undrinks") - - int r = 0; - for (int j=0; j < linenum; j++) { - if (!spell((*slst)[j])) { - free((*slst)[j]); - (*slst)[j] = NULL; - } else { - if (r < j) (*slst)[r] = (*slst)[j]; - r++; - } - } - if (r > 0) return r; - free(*slst); - *slst = NULL; - } - return 0; -} - -int Hunspell::generate(char*** slst, const char * word, const char * pattern) -{ - char **pl; - int pln = analyze(&pl, pattern); - int n = generate(slst, word, pl, pln); - freelist(&pl, pln); - return uniqlist(*slst, n); -} - -// minimal XML parser functions -int Hunspell::get_xml_par(char * dest, const char * par, int max) -{ - char * d = dest; - if (!par) return 0; - char end = *par; - char * dmax = dest + max; - if (end == '>') end = '<'; - else if (end != '\'' && end != '"') return 0; // bad XML - for (par++; d < dmax && *par != '\0' && *par != end; par++, d++) *d = *par; - *d = '\0'; - mystrrep(dest, "<", "<"); - mystrrep(dest, "&", "&"); - return (int)(d - dest); -} - -int Hunspell::get_langnum() const -{ - return langnum; -} - -// return the beginning of the element (attr == NULL) or the attribute -const char * Hunspell::get_xml_pos(const char * s, const char * attr) -{ - const char * end = strchr(s, '>'); - const char * p = s; - if (attr == NULL) return end; - do { - p = strstr(p, attr); - if (!p || p >= end) return 0; - } while (*(p-1) != ' ' && *(p-1) != '\n'); - return p + strlen(attr); -} - -int Hunspell::check_xml_par(const char * q, const char * attr, const char * value) { - char cw[MAXWORDUTF8LEN]; - if (get_xml_par(cw, get_xml_pos(q, attr), MAXWORDUTF8LEN - 1) && - strcmp(cw, value) == 0) return 1; - return 0; -} - -int Hunspell::get_xml_list(char ***slst, char * list, const char * tag) { - int n = 0; - char * p; - if (!list) return 0; - for (p = list; (p = strstr(p, tag)); p++) n++; - if (n == 0) return 0; - *slst = (char **) malloc(sizeof(char *) * n); - if (!*slst) return 0; - for (p = list, n = 0; (p = strstr(p, tag)); p++, n++) { - int l = strlen(p); - (*slst)[n] = (char *) malloc(l + 1); - if (!(*slst)[n]) return n; - if (!get_xml_par((*slst)[n], p + strlen(tag) - 1, l)) { - free((*slst)[n]); - break; - } - } - return n; -} - -int Hunspell::spellml(char*** slst, const char * word) -{ - char *q, *q2; - char cw[MAXWORDUTF8LEN], cw2[MAXWORDUTF8LEN]; - q = (char *) strstr(word, "'); - if (!q2) return 0; // bad XML input - q2 = strstr(q2, "'), MAXWORDUTF8LEN - 10)) n = analyze(slst, cw); - if (n == 0) return 0; - // convert the result to ana1ana2 format - for (int i = 0; i < n; i++) s+= strlen((*slst)[i]); - char * r = (char *) malloc(6 + 5 * s + 7 * n + 7 + 1); // XXX 5*s->&->& - if (!r) return 0; - strcpy(r, ""); - for (int i = 0; i < n; i++) { - int l = strlen(r); - strcpy(r + l, ""); - strcpy(r + l + 3, (*slst)[i]); - mystrrep(r + l + 3, "\t", " "); - mystrrep(r + l + 3, "<", "<"); - mystrrep(r + l + 3, "&", "&"); - strcat(r, ""); - free((*slst)[i]); - } - strcat(r, ""); - (*slst)[0] = r; - return 1; - } else if (check_xml_par(q, "type=", "stem")) { - if (get_xml_par(cw, strchr(q2, '>'), MAXWORDUTF8LEN - 1)) return stem(slst, cw); - } else if (check_xml_par(q, "type=", "generate")) { - int n = get_xml_par(cw, strchr(q2, '>'), MAXWORDUTF8LEN - 1); - if (n == 0) return 0; - char * q3 = strstr(q2 + 1, "'), MAXWORDUTF8LEN - 1)) { - return generate(slst, cw, cw2); - } - } else { - if ((q2 = strstr(q2 + 1, "'), ""))) { - int n2 = generate(slst, cw, slst2, n); - freelist(&slst2, n); - return uniqlist(*slst, n2); - } - freelist(&slst2, n); - } - } - } - return 0; -} - - -#ifdef HUNSPELL_EXPERIMENTAL -// XXX need UTF-8 support -char * Hunspell::morph_with_correction(const char * word) -{ - char cw[MAXWORDUTF8LEN]; - char wspace[MAXWORDUTF8LEN]; - if (! pSMgr || maxdic == 0) return NULL; - int wl = strlen(word); - if (utf8) { - if (wl >= MAXWORDUTF8LEN) return NULL; - } else { - if (wl >= MAXWORDLEN) return NULL; - } - int captype = 0; - int abbv = 0; - wl = cleanword(cw, word, &captype, &abbv); - if (wl == 0) return NULL; - - char result[MAXLNLEN]; - char * st = NULL; - - *result = '\0'; - - - switch(captype) { - case NOCAP: { - st = pSMgr->suggest_morph_for_spelling_error(cw); - if (st) { - mystrcat(result, st, MAXLNLEN); - free(st); - } - if (abbv) { - memcpy(wspace,cw,wl); - *(wspace+wl) = '.'; - *(wspace+wl+1) = '\0'; - st = pSMgr->suggest_morph_for_spelling_error(wspace); - if (st) { - if (*result) mystrcat(result, "\n", MAXLNLEN); - mystrcat(result, st, MAXLNLEN); - free(st); - } - } - break; - } - case INITCAP: { - memcpy(wspace,cw,(wl+1)); - mkallsmall(wspace); - st = pSMgr->suggest_morph_for_spelling_error(wspace); - if (st) { - mystrcat(result, st, MAXLNLEN); - free(st); - } - st = pSMgr->suggest_morph_for_spelling_error(cw); - if (st) { - if (*result) mystrcat(result, "\n", MAXLNLEN); - mystrcat(result, st, MAXLNLEN); - free(st); - } - if (abbv) { - memcpy(wspace,cw,wl); - *(wspace+wl) = '.'; - *(wspace+wl+1) = '\0'; - mkallsmall(wspace); - st = pSMgr->suggest_morph_for_spelling_error(wspace); - if (st) { - if (*result) mystrcat(result, "\n", MAXLNLEN); - mystrcat(result, st, MAXLNLEN); - free(st); - } - mkinitcap(wspace); - st = pSMgr->suggest_morph_for_spelling_error(wspace); - if (st) { - if (*result) mystrcat(result, "\n", MAXLNLEN); - mystrcat(result, st, MAXLNLEN); - free(st); - } - } - break; - } - case HUHCAP: { - st = pSMgr->suggest_morph_for_spelling_error(cw); - if (st) { - mystrcat(result, st, MAXLNLEN); - free(st); - } - memcpy(wspace,cw,(wl+1)); - mkallsmall(wspace); - st = pSMgr->suggest_morph_for_spelling_error(wspace); - if (st) { - if (*result) mystrcat(result, "\n", MAXLNLEN); - mystrcat(result, st, MAXLNLEN); - free(st); - } - break; - } - case ALLCAP: { - memcpy(wspace,cw,(wl+1)); - st = pSMgr->suggest_morph_for_spelling_error(wspace); - if (st) { - mystrcat(result, st, MAXLNLEN); - free(st); - } - mkallsmall(wspace); - st = pSMgr->suggest_morph_for_spelling_error(wspace); - if (st) { - if (*result) mystrcat(result, "\n", MAXLNLEN); - mystrcat(result, st, MAXLNLEN); - free(st); - } - mkinitcap(wspace); - st = pSMgr->suggest_morph_for_spelling_error(wspace); - if (st) { - if (*result) mystrcat(result, "\n", MAXLNLEN); - mystrcat(result, st, MAXLNLEN); - free(st); - } - if (abbv) { - memcpy(wspace,cw,(wl+1)); - *(wspace+wl) = '.'; - *(wspace+wl+1) = '\0'; - if (*result) mystrcat(result, "\n", MAXLNLEN); - st = pSMgr->suggest_morph_for_spelling_error(wspace); - if (st) { - mystrcat(result, st, MAXLNLEN); - free(st); - } - mkallsmall(wspace); - st = pSMgr->suggest_morph_for_spelling_error(wspace); - if (st) { - if (*result) mystrcat(result, "\n", MAXLNLEN); - mystrcat(result, st, MAXLNLEN); - free(st); - } - mkinitcap(wspace); - st = pSMgr->suggest_morph_for_spelling_error(wspace); - if (st) { - if (*result) mystrcat(result, "\n", MAXLNLEN); - mystrcat(result, st, MAXLNLEN); - free(st); - } - } - break; - } - } - - if (*result) return mystrdup(result); - return NULL; -} - -#endif // END OF HUNSPELL_EXPERIMENTAL CODE - -Hunhandle *Hunspell_create(const char * affpath, const char * dpath) -{ - return (Hunhandle*)(new Hunspell(affpath, dpath)); -} - -Hunhandle *Hunspell_create_key(const char * affpath, const char * dpath, - const char * key) -{ - return (Hunhandle*)(new Hunspell(affpath, dpath, key)); -} - -void Hunspell_destroy(Hunhandle *pHunspell) -{ - delete (Hunspell*)(pHunspell); -} - -int Hunspell_spell(Hunhandle *pHunspell, const char *word) -{ - return ((Hunspell*)pHunspell)->spell(word); -} - -char *Hunspell_get_dic_encoding(Hunhandle *pHunspell) -{ - return ((Hunspell*)pHunspell)->get_dic_encoding(); -} - -int Hunspell_suggest(Hunhandle *pHunspell, char*** slst, const char * word) -{ - return ((Hunspell*)pHunspell)->suggest(slst, word); -} - -int Hunspell_analyze(Hunhandle *pHunspell, char*** slst, const char * word) -{ - return ((Hunspell*)pHunspell)->analyze(slst, word); -} - -int Hunspell_stem(Hunhandle *pHunspell, char*** slst, const char * word) -{ - return ((Hunspell*)pHunspell)->stem(slst, word); -} - -int Hunspell_stem2(Hunhandle *pHunspell, char*** slst, char** desc, int n) -{ - return ((Hunspell*)pHunspell)->stem(slst, desc, n); -} - -int Hunspell_generate(Hunhandle *pHunspell, char*** slst, const char * word, - const char * word2) -{ - return ((Hunspell*)pHunspell)->generate(slst, word, word2); -} - -int Hunspell_generate2(Hunhandle *pHunspell, char*** slst, const char * word, - char** desc, int n) -{ - return ((Hunspell*)pHunspell)->generate(slst, word, desc, n); -} - - /* functions for run-time modification of the dictionary */ - - /* add word to the run-time dictionary */ - -int Hunspell_add(Hunhandle *pHunspell, const char * word) { - return ((Hunspell*)pHunspell)->add(word); -} - - /* add word to the run-time dictionary with affix flags of - * the example (a dictionary word): Hunspell will recognize - * affixed forms of the new word, too. - */ - -int Hunspell_add_with_affix(Hunhandle *pHunspell, const char * word, - const char * example) { - return ((Hunspell*)pHunspell)->add_with_affix(word, example); -} - - /* remove word from the run-time dictionary */ - -int Hunspell_remove(Hunhandle *pHunspell, const char * word) { - return ((Hunspell*)pHunspell)->remove(word); -} - -void Hunspell_free_list(Hunhandle *, char *** slst, int n) { - freelist(slst, n); -} diff --git a/plugins/SpellChecker/hunspell/hunspell.dsp b/plugins/SpellChecker/hunspell/hunspell.dsp deleted file mode 100644 index c182621742..0000000000 --- a/plugins/SpellChecker/hunspell/hunspell.dsp +++ /dev/null @@ -1,164 +0,0 @@ -# Microsoft Developer Studio Project File - Name="hunspell" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=hunspell - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "hunspell.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "hunspell.mak" CFG="hunspell - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "hunspell - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "hunspell - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "hunspell - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "W32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /D "W32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD BASE RSC /l 0x40e /d "NDEBUG" -# ADD RSC /l 0x40e /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "hunspell - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "W32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "W32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40e /d "_DEBUG" -# ADD RSC /l 0x40e /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ENDIF - -# Begin Target - -# Name "hunspell - Win32 Release" -# Name "hunspell - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\affentry.cxx -# End Source File -# Begin Source File - -SOURCE=.\affixmgr.cxx -# End Source File -# Begin Source File - -SOURCE=.\csutil.cxx -# End Source File -# Begin Source File - -SOURCE=.\dictmgr.cxx -# End Source File -# Begin Source File - -SOURCE=.\hashmgr.cxx -# End Source File -# Begin Source File - -SOURCE=.\hunspell.cxx -# End Source File -# Begin Source File - -SOURCE=.\suggestmgr.cxx -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=.\affentry.hxx -# End Source File -# Begin Source File - -SOURCE=.\affixmgr.hxx -# End Source File -# Begin Source File - -SOURCE=.\atypes.hxx -# End Source File -# Begin Source File - -SOURCE=.\baseaffix.hxx -# End Source File -# Begin Source File - -SOURCE=.\csutil.hxx -# End Source File -# Begin Source File - -SOURCE=.\dictmgr.hxx -# End Source File -# Begin Source File - -SOURCE=.\hashmgr.hxx -# End Source File -# Begin Source File - -SOURCE=.\htypes.hxx -# End Source File -# Begin Source File - -SOURCE=.\langnum.hxx -# End Source File -# Begin Source File - -SOURCE=.\hunspell.hxx -# End Source File -# Begin Source File - -SOURCE=.\suggestmgr.hxx -# End Source File -# End Group -# End Target -# End Project diff --git a/plugins/SpellChecker/hunspell/hunspell.h b/plugins/SpellChecker/hunspell/hunspell.h deleted file mode 100644 index 627968a3da..0000000000 --- a/plugins/SpellChecker/hunspell/hunspell.h +++ /dev/null @@ -1,95 +0,0 @@ -#ifndef _MYSPELLMGR_H_ -#define _MYSPELLMGR_H_ - -#include "hunvisapi.h" - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct Hunhandle Hunhandle; - -LIBHUNSPELL_DLL_EXPORTED Hunhandle *Hunspell_create(const char * affpath, const char * dpath); - -LIBHUNSPELL_DLL_EXPORTED Hunhandle *Hunspell_create_key(const char * affpath, const char * dpath, - const char * key); - -LIBHUNSPELL_DLL_EXPORTED void Hunspell_destroy(Hunhandle *pHunspell); - -/* spell(word) - spellcheck word - * output: 0 = bad word, not 0 = good word - */ -LIBHUNSPELL_DLL_EXPORTED int Hunspell_spell(Hunhandle *pHunspell, const char *); - -LIBHUNSPELL_DLL_EXPORTED char *Hunspell_get_dic_encoding(Hunhandle *pHunspell); - -/* suggest(suggestions, word) - search suggestions - * input: pointer to an array of strings pointer and the (bad) word - * array of strings pointer (here *slst) may not be initialized - * output: number of suggestions in string array, and suggestions in - * a newly allocated array of strings (*slts will be NULL when number - * of suggestion equals 0.) - */ -LIBHUNSPELL_DLL_EXPORTED int Hunspell_suggest(Hunhandle *pHunspell, char*** slst, const char * word); - - /* morphological functions */ - - /* analyze(result, word) - morphological analysis of the word */ - -LIBHUNSPELL_DLL_EXPORTED int Hunspell_analyze(Hunhandle *pHunspell, char*** slst, const char * word); - - /* stem(result, word) - stemmer function */ - -LIBHUNSPELL_DLL_EXPORTED int Hunspell_stem(Hunhandle *pHunspell, char*** slst, const char * word); - - /* stem(result, analysis, n) - get stems from a morph. analysis - * example: - * char ** result, result2; - * int n1 = Hunspell_analyze(result, "words"); - * int n2 = Hunspell_stem2(result2, result, n1); - */ - -LIBHUNSPELL_DLL_EXPORTED int Hunspell_stem2(Hunhandle *pHunspell, char*** slst, char** desc, int n); - - /* generate(result, word, word2) - morphological generation by example(s) */ - -LIBHUNSPELL_DLL_EXPORTED int Hunspell_generate(Hunhandle *pHunspell, char*** slst, const char * word, - const char * word2); - - /* generate(result, word, desc, n) - generation by morph. description(s) - * example: - * char ** result; - * char * affix = "is:plural"; // description depends from dictionaries, too - * int n = Hunspell_generate2(result, "word", &affix, 1); - * for (int i = 0; i < n; i++) printf("%s\n", result[i]); - */ - -LIBHUNSPELL_DLL_EXPORTED int Hunspell_generate2(Hunhandle *pHunspell, char*** slst, const char * word, - char** desc, int n); - - /* functions for run-time modification of the dictionary */ - - /* add word to the run-time dictionary */ - -LIBHUNSPELL_DLL_EXPORTED int Hunspell_add(Hunhandle *pHunspell, const char * word); - - /* add word to the run-time dictionary with affix flags of - * the example (a dictionary word): Hunspell will recognize - * affixed forms of the new word, too. - */ - -LIBHUNSPELL_DLL_EXPORTED int Hunspell_add_with_affix(Hunhandle *pHunspell, const char * word, const char * example); - - /* remove word from the run-time dictionary */ - -LIBHUNSPELL_DLL_EXPORTED int Hunspell_remove(Hunhandle *pHunspell, const char * word); - - /* free suggestion lists */ - -LIBHUNSPELL_DLL_EXPORTED void Hunspell_free_list(Hunhandle *pHunspell, char *** slst, int n); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/plugins/SpellChecker/hunspell/hunspell.hxx b/plugins/SpellChecker/hunspell/hunspell.hxx deleted file mode 100644 index a25c637f0d..0000000000 --- a/plugins/SpellChecker/hunspell/hunspell.hxx +++ /dev/null @@ -1,174 +0,0 @@ -#include "hunvisapi.h" - -#include "hashmgr.hxx" -#include "affixmgr.hxx" -#include "suggestmgr.hxx" -#include "langnum.hxx" - -#define SPELL_XML "" - -#define MAXDIC 20 -#define MAXSUGGESTION 15 -#define MAXSHARPS 5 - -#define HUNSPELL_OK (1 << 0) -#define HUNSPELL_OK_WARN (1 << 1) - -#ifndef _MYSPELLMGR_HXX_ -#define _MYSPELLMGR_HXX_ - -class LIBHUNSPELL_DLL_EXPORTED Hunspell -{ - AffixMgr* pAMgr; - HashMgr* pHMgr[MAXDIC]; - int maxdic; - SuggestMgr* pSMgr; - char * affixpath; - char * encoding; - struct cs_info * csconv; - int langnum; - int utf8; - int complexprefixes; - char** wordbreak; - -public: - - /* Hunspell(aff, dic) - constructor of Hunspell class - * input: path of affix file and dictionary file - */ - - Hunspell(const char * affpath, const char * dpath, const char * key = NULL); - ~Hunspell(); - - /* load extra dictionaries (only dic files) */ - int add_dic(const char * dpath, const char * key = NULL); - - /* spell(word) - spellcheck word - * output: 0 = bad word, not 0 = good word - * - * plus output: - * info: information bit array, fields: - * SPELL_COMPOUND = a compound word - * SPELL_FORBIDDEN = an explicit forbidden word - * root: root (stem), when input is a word with affix(es) - */ - - int spell(const char * word, int * info = NULL, char ** root = NULL); - - /* suggest(suggestions, word) - search suggestions - * input: pointer to an array of strings pointer and the (bad) word - * array of strings pointer (here *slst) may not be initialized - * output: number of suggestions in string array, and suggestions in - * a newly allocated array of strings (*slts will be NULL when number - * of suggestion equals 0.) - */ - - int suggest(char*** slst, const char * word); - - /* deallocate suggestion lists */ - - void free_list(char *** slst, int n); - - char * get_dic_encoding(); - - /* morphological functions */ - - /* analyze(result, word) - morphological analysis of the word */ - - int analyze(char*** slst, const char * word); - - /* stem(result, word) - stemmer function */ - - int stem(char*** slst, const char * word); - - /* stem(result, analysis, n) - get stems from a morph. analysis - * example: - * char ** result, result2; - * int n1 = analyze(&result, "words"); - * int n2 = stem(&result2, result, n1); - */ - - int stem(char*** slst, char ** morph, int n); - - /* generate(result, word, word2) - morphological generation by example(s) */ - - int generate(char*** slst, const char * word, const char * word2); - - /* generate(result, word, desc, n) - generation by morph. description(s) - * example: - * char ** result; - * char * affix = "is:plural"; // description depends from dictionaries, too - * int n = generate(&result, "word", &affix, 1); - * for (int i = 0; i < n; i++) printf("%s\n", result[i]); - */ - - int generate(char*** slst, const char * word, char ** desc, int n); - - /* functions for run-time modification of the dictionary */ - - /* add word to the run-time dictionary */ - - int add(const char * word); - - /* add word to the run-time dictionary with affix flags of - * the example (a dictionary word): Hunspell will recognize - * affixed forms of the new word, too. - */ - - int add_with_affix(const char * word, const char * example); - - /* remove word from the run-time dictionary */ - - int remove(const char * word); - - /* other */ - - /* get extra word characters definied in affix file for tokenization */ - const char * get_wordchars(); - unsigned short * get_wordchars_utf16(int * len); - - char * get_try_string(); - - struct cs_info * get_csconv(); - const char * get_version(); - - int get_langnum() const; - - /* experimental and deprecated functions */ - -#ifdef HUNSPELL_EXPERIMENTAL - /* suffix is an affix flag string, similarly in dictionary files */ - int put_word_suffix(const char * word, const char * suffix); - char * morph_with_correction(const char * word); - - /* spec. suggestions */ - int suggest_auto(char*** slst, const char * word); - int suggest_pos_stems(char*** slst, const char * word); -#endif - -private: - int cleanword(char *, const char *, int * pcaptype, int * pabbrev); - int cleanword2(char *, const char *, w_char *, int * w_len, int * pcaptype, int * pabbrev); - void mkinitcap(char *); - int mkinitcap2(char * p, w_char * u, int nc); - int mkinitsmall2(char * p, w_char * u, int nc); - void mkallcap(char *); - int mkallcap2(char * p, w_char * u, int nc); - void mkallsmall(char *); - int mkallsmall2(char * p, w_char * u, int nc); - struct hentry * checkword(const char *, int * info, char **root); - char * sharps_u8_l1(char * dest, char * source); - hentry * spellsharps(char * base, char *, int, int, char * tmp, int * info, char **root); - int is_keepcase(const hentry * rv); - int insert_sug(char ***slst, char * word, int ns); - void cat_result(char * result, char * st); - char * stem_description(const char * desc); - int spellml(char*** slst, const char * word); - int get_xml_par(char * dest, const char * par, int maxl); - const char * get_xml_pos(const char * s, const char * attr); - int get_xml_list(char ***slst, char * list, const char * tag); - int check_xml_par(const char * q, const char * attr, const char * value); - -}; - -#endif diff --git a/plugins/SpellChecker/hunspell/hunvisapi.h b/plugins/SpellChecker/hunspell/hunvisapi.h deleted file mode 100644 index 4712280ad2..0000000000 --- a/plugins/SpellChecker/hunspell/hunvisapi.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef _HUNSPELL_VISIBILITY_H_ -#define _HUNSPELL_VISIBILITY_H_ - -#if defined(HUNSPELL_STATIC) -# define LIBHUNSPELL_DLL_EXPORTED -#elif defined(_MSC_VER) -# if defined(BUILDING_LIBHUNSPELL) -# define LIBHUNSPELL_DLL_EXPORTED __declspec(dllexport) -# else -# define LIBHUNSPELL_DLL_EXPORTED __declspec(dllimport) -# endif -#elif BUILDING_LIBHUNSPELL && 1 -# define LIBHUNSPELL_DLL_EXPORTED __attribute__((__visibility__("default"))) -#else -# define LIBHUNSPELL_DLL_EXPORTED -#endif - -#endif diff --git a/plugins/SpellChecker/hunspell/hunzip.cxx b/plugins/SpellChecker/hunspell/hunzip.cxx deleted file mode 100644 index b50599fa84..0000000000 --- a/plugins/SpellChecker/hunspell/hunzip.cxx +++ /dev/null @@ -1,193 +0,0 @@ -#include -#include -#include - -#include "hunzip.hxx" - -#define CODELEN 65536 -#define BASEBITREC 5000 - -#define UNCOMPRESSED '\002' -#define MAGIC "hz0" -#define MAGIC_ENCRYPT "hz1" -#define MAGICLEN (sizeof(MAGIC) - 1) - -int Hunzip::fail(const char * err, const char * par) { - fprintf(stderr, err, par); - return -1; -} - -Hunzip::Hunzip(const char * file, const char * key) { - bufsiz = 0; - lastbit = 0; - inc = 0; - outc = 0; - dec = NULL; - fin = NULL; - filename = (char *) malloc(strlen(file) + 1); - if (filename) strcpy(filename, file); - if (getcode(key) == -1) bufsiz = -1; - else bufsiz = getbuf(); -} - -int Hunzip::getcode(const char * key) { - unsigned char c[2]; - int i, j, n, p; - int allocatedbit = BASEBITREC; - const char * enc = key; - - if (!filename) return -1; - - fin = fopen(filename, "rb"); - if (!fin) return -1; - - // read magic number - if ((fread(in, 1, 3, fin) < MAGICLEN) - || !(strncmp(MAGIC, in, MAGICLEN) == 0 || - strncmp(MAGIC_ENCRYPT, in, MAGICLEN) == 0)) { - return fail(MSG_FORMAT, filename); - } - - // check encryption - if (strncmp(MAGIC_ENCRYPT, in, MAGICLEN) == 0) { - unsigned char cs; - if (!key) return fail(MSG_KEY, filename); - if (fread(&c, 1, 1, fin) < 1) return fail(MSG_FORMAT, filename); - for (cs = 0; *enc; enc++) cs ^= *enc; - if (cs != c[0]) return fail(MSG_KEY, filename); - enc = key; - } else key = NULL; - - // read record count - if (fread(&c, 1, 2, fin) < 2) return fail(MSG_FORMAT, filename); - - if (key) { - c[0] ^= *enc; - if (*(++enc) == '\0') enc = key; - c[1] ^= *enc; - } - - n = ((int) c[0] << 8) + c[1]; - dec = (struct bit *) malloc(BASEBITREC * sizeof(struct bit)); - if (!dec) return fail(MSG_MEMORY, filename); - dec[0].v[0] = 0; - dec[0].v[1] = 0; - - // read codes - for (i = 0; i < n; i++) { - unsigned char l; - if (fread(c, 1, 2, fin) < 2) return fail(MSG_FORMAT, filename); - if (key) { - if (*(++enc) == '\0') enc = key; - c[0] ^= *enc; - if (*(++enc) == '\0') enc = key; - c[1] ^= *enc; - } - if (fread(&l, 1, 1, fin) < 1) return fail(MSG_FORMAT, filename); - if (key) { - if (*(++enc) == '\0') enc = key; - l ^= *enc; - } - if (fread(in, 1, l/8+1, fin) < (size_t) l/8+1) return fail(MSG_FORMAT, filename); - if (key) for (j = 0; j <= l/8; j++) { - if (*(++enc) == '\0') enc = key; - in[j] ^= *enc; - } - p = 0; - for (j = 0; j < l; j++) { - int b = (in[j/8] & (1 << (7 - (j % 8)))) ? 1 : 0; - int oldp = p; - p = dec[p].v[b]; - if (p == 0) { - lastbit++; - if (lastbit == allocatedbit) { - allocatedbit += BASEBITREC; - dec = (struct bit *) realloc(dec, allocatedbit * sizeof(struct bit)); - } - dec[lastbit].v[0] = 0; - dec[lastbit].v[1] = 0; - dec[oldp].v[b] = lastbit; - p = lastbit; - } - } - dec[p].c[0] = c[0]; - dec[p].c[1] = c[1]; - } - return 0; -} - -Hunzip::~Hunzip() -{ - if (dec) free(dec); - if (fin) fclose(fin); - if (filename) free(filename); -} - -int Hunzip::getbuf() { - int p = 0; - int o = 0; - do { - if (inc == 0) inbits = fread(in, 1, BUFSIZE, fin) * 8; - for (; inc < inbits; inc++) { - int b = (in[inc / 8] & (1 << (7 - (inc % 8)))) ? 1 : 0; - int oldp = p; - p = dec[p].v[b]; - if (p == 0) { - if (oldp == lastbit) { - fclose(fin); - fin = NULL; - // add last odd byte - if (dec[lastbit].c[0]) out[o++] = dec[lastbit].c[1]; - return o; - } - out[o++] = dec[oldp].c[0]; - out[o++] = dec[oldp].c[1]; - if (o == BUFSIZE) return o; - p = dec[p].v[b]; - } - } - inc = 0; - } while (inbits == BUFSIZE * 8); - return fail(MSG_FORMAT, filename); -} - -const char * Hunzip::getline() { - char linebuf[BUFSIZE]; - int l = 0, eol = 0, left = 0, right = 0; - if (bufsiz == -1) return NULL; - while (l < bufsiz && !eol) { - linebuf[l++] = out[outc]; - switch (out[outc]) { - case '\t': break; - case 31: { // escape - if (++outc == bufsiz) { - bufsiz = getbuf(); - outc = 0; - } - linebuf[l - 1] = out[outc]; - break; - } - case ' ': break; - default: if (((unsigned char) out[outc]) < 47) { - if (out[outc] > 32) { - right = out[outc] - 31; - if (++outc == bufsiz) { - bufsiz = getbuf(); - outc = 0; - } - } - if (out[outc] == 30) left = 9; else left = out[outc]; - linebuf[l-1] = '\n'; - eol = 1; - } - } - if (++outc == bufsiz) { - outc = 0; - bufsiz = fin ? getbuf(): -1; - } - } - if (right) strcpy(linebuf + l - 1, line + strlen(line) - right - 1); - else linebuf[l] = '\0'; - strcpy(line + left, linebuf); - return line; -} diff --git a/plugins/SpellChecker/hunspell/hunzip.hxx b/plugins/SpellChecker/hunspell/hunzip.hxx deleted file mode 100644 index b58e3ab1dc..0000000000 --- a/plugins/SpellChecker/hunspell/hunzip.hxx +++ /dev/null @@ -1,45 +0,0 @@ -/* hunzip: file decompression for sorted dictionaries with optional encryption, - * algorithm: prefix-suffix encoding and 16-bit Huffman encoding */ - -#ifndef _HUNZIP_HXX_ -#define _HUNZIP_HXX_ - -#include "hunvisapi.h" - -#include - -#define BUFSIZE 65536 -#define HZIP_EXTENSION ".hz" - -#define MSG_OPEN "error: %s: cannot open\n" -#define MSG_FORMAT "error: %s: not in hzip format\n" -#define MSG_MEMORY "error: %s: missing memory\n" -#define MSG_KEY "error: %s: missing or bad password\n" - -struct bit { - unsigned char c[2]; - int v[2]; -}; - -class LIBHUNSPELL_DLL_EXPORTED Hunzip -{ - -protected: - char * filename; - FILE * fin; - int bufsiz, lastbit, inc, inbits, outc; - struct bit * dec; // code table - char in[BUFSIZE]; // input buffer - char out[BUFSIZE + 1]; // Huffman-decoded buffer - char line[BUFSIZE + 50]; // decoded line - int getcode(const char * key); - int getbuf(); - int fail(const char * err, const char * par); - -public: - Hunzip(const char * filename, const char * key = NULL); - ~Hunzip(); - const char * getline(); -}; - -#endif diff --git a/plugins/SpellChecker/hunspell/langnum.hxx b/plugins/SpellChecker/hunspell/langnum.hxx deleted file mode 100644 index 1d140a701b..0000000000 --- a/plugins/SpellChecker/hunspell/langnum.hxx +++ /dev/null @@ -1,38 +0,0 @@ -#ifndef _LANGNUM_HXX_ -#define _LANGNUM_HXX_ - -/* - language numbers for language specific codes - see http://l10n.openoffice.org/languages.html -*/ - -enum { -LANG_ar=96, -LANG_az=100, // custom number -LANG_bg=41, -LANG_ca=37, -LANG_cs=42, -LANG_da=45, -LANG_de=49, -LANG_el=30, -LANG_en=01, -LANG_es=34, -LANG_eu=10, -LANG_fr=02, -LANG_gl=38, -LANG_hr=78, -LANG_hu=36, -LANG_it=39, -LANG_la=99, // custom number -LANG_lv=101, // custom number -LANG_nl=31, -LANG_pl=48, -LANG_pt=03, -LANG_ru=07, -LANG_sv=50, -LANG_tr=90, -LANG_uk=80, -LANG_xx=999 -}; - -#endif diff --git a/plugins/SpellChecker/hunspell/license.hunspell b/plugins/SpellChecker/hunspell/license.hunspell deleted file mode 100644 index 490e440c74..0000000000 --- a/plugins/SpellChecker/hunspell/license.hunspell +++ /dev/null @@ -1,59 +0,0 @@ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is Hunspell, based on MySpell. - * - * The Initial Developers of the Original Code are - * Kevin Hendricks (MySpell) and Laszlo Nemeth (Hunspell). - * Portions created by the Initial Developers are Copyright (C) 2002-2005 - * the Initial Developers. All Rights Reserved. - * - * Contributor(s): - * David Einstein - * Davide Prina - * Giuseppe Modugno - * Gianluca Turconi - * Simon Brouwer - * Noll Janos - * Biro Arpad - * Goldman Eleonora - * Sarlos Tamas - * Bencsath Boldizsar - * Halacsy Peter - * Dvornik Laszlo - * Gefferth Andras - * Nagy Viktor - * Varga Daniel - * Chris Halls - * Rene Engelhard - * Bram Moolenaar - * Dafydd Jones - * Harri Pitkanen - * Andras Timar - * Tor Lillqvist - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ - -#include "config.h" diff --git a/plugins/SpellChecker/hunspell/license.myspell b/plugins/SpellChecker/hunspell/license.myspell deleted file mode 100644 index 2da5330750..0000000000 --- a/plugins/SpellChecker/hunspell/license.myspell +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright 2002 Kevin B. Hendricks, Stratford, Ontario, Canada - * And Contributors. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * 3. All modifications to the source code must be clearly marked as - * such. Binary redistributions based on modified source code - * must be clearly marked as modified versions in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY KEVIN B. HENDRICKS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL - * KEVIN B. HENDRICKS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * - * NOTE: A special thanks and credit goes to Geoff Kuenning - * the creator of ispell. MySpell's affix algorithms were - * based on those of ispell which should be noted is - * copyright Geoff Kuenning et.al. and now available - * under a BSD style license. For more information on ispell - * and affix compression in general, please see: - * http://www.cs.ucla.edu/ficus-members/geoff/ispell.html - * (the home page for ispell) - * - * An almost complete rewrite of MySpell for use by - * the Mozilla project has been developed by David Einstein - * (Deinst@world.std.com). David and I are now - * working on parallel development tracks to help - * our respective projects (Mozilla and OpenOffice.org - * and we will maintain full affix file and dictionary - * file compatibility and work on merging our versions - * of MySpell back into a single tree. David has been - * a significant help in improving MySpell. - * - * Special thanks also go to La'szlo' Ne'meth - * who is the author of the - * Hungarian dictionary and who developed and contributed - * the code to support compound words in MySpell - * and fixed numerous problems with the encoding - * case conversion tables. - * - */ diff --git a/plugins/SpellChecker/hunspell/phonet.cxx b/plugins/SpellChecker/hunspell/phonet.cxx deleted file mode 100644 index 3a849b4444..0000000000 --- a/plugins/SpellChecker/hunspell/phonet.cxx +++ /dev/null @@ -1,292 +0,0 @@ -/* phonetic.c - generic replacement aglogithms for phonetic transformation - Copyright (C) 2000 Bjoern Jacke - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License version 2.1 as published by the Free Software Foundation; - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; If not, see - . - - Changelog: - - 2000-01-05 Bjoern Jacke - Initial Release insprired by the article about phonetic - transformations out of c't 25/1999 - - 2007-07-26 Bjoern Jacke - Released under MPL/GPL/LGPL tri-license for Hunspell - - 2007-08-23 Laszlo Nemeth - Porting from Aspell to Hunspell using C-like structs -*/ - -#include -#include -#include -#include - -#include "csutil.hxx" -#include "phonet.hxx" - -void init_phonet_hash(phonetable & parms) - { - int i, k; - - for (i = 0; i < HASHSIZE; i++) { - parms.hash[i] = -1; - } - - for (i = 0; parms.rules[i][0] != '\0'; i += 2) { - /** set hash value **/ - k = (unsigned char) parms.rules[i][0]; - - if (parms.hash[k] < 0) { - parms.hash[k] = i; - } - } - } - -// like strcpy but safe if the strings overlap -// but only if dest < src -static inline void strmove(char * dest, char * src) { - while (*src) - *dest++ = *src++; - *dest = '\0'; -} - -static int myisalpha(char ch) { - if ((unsigned char) ch < 128) return isalpha(ch); - return 1; -} - -/* phonetic transcription algorithm */ -/* see: http://aspell.net/man-html/Phonetic-Code.html */ -/* convert string to uppercase before this call */ -int phonet (const char * inword, char * target, - int len, - phonetable & parms) - { - /** Do phonetic transformation. **/ - /** "len" = length of "inword" incl. '\0'. **/ - - /** result: >= 0: length of "target" **/ - /** otherwise: error **/ - - int i,j,k=0,n,p,z; - int k0,n0,p0=-333,z0; - char c, c0; - const char * s; - typedef unsigned char uchar; - char word[MAXPHONETUTF8LEN + 1]; - if (len == -1) len = strlen(inword); - if (len > MAXPHONETUTF8LEN) return 0; - strcpy(word, inword); - - /** check word **/ - i = j = z = 0; - while ((c = word[i]) != '\0') { - n = parms.hash[(uchar) c]; - z0 = 0; - - if (n >= 0) { - /** check all rules for the same letter **/ - while (parms.rules[n][0] == c) { - - /** check whole string **/ - k = 1; /** number of found letters **/ - p = 5; /** default priority **/ - s = parms.rules[n]; - s++; /** important for (see below) "*(s-1)" **/ - - while (*s != '\0' && word[i+k] == *s - && !isdigit ((unsigned char) *s) && strchr ("(-<^$", *s) == NULL) { - k++; - s++; - } - if (*s == '(') { - /** check letters in "(..)" **/ - if (myisalpha(word[i+k]) // ...could be implied? - && strchr(s+1, word[i+k]) != NULL) { - k++; - while (*s != ')') - s++; - s++; - } - } - p0 = (int) *s; - k0 = k; - while (*s == '-' && k > 1) { - k--; - s++; - } - if (*s == '<') - s++; - if (isdigit ((unsigned char) *s)) { - /** determine priority **/ - p = *s - '0'; - s++; - } - if (*s == '^' && *(s+1) == '^') - s++; - - if (*s == '\0' - || (*s == '^' - && (i == 0 || ! myisalpha(word[i-1])) - && (*(s+1) != '$' - || (! myisalpha(word[i+k0])))) - || (*s == '$' && i > 0 - && myisalpha(word[i-1]) - && (! myisalpha(word[i+k0])))) - { - /** search for followup rules, if: **/ - /** parms.followup and k > 1 and NO '-' in searchstring **/ - c0 = word[i+k-1]; - n0 = parms.hash[(uchar) c0]; - -// if (parms.followup && k > 1 && n0 >= 0 - if (k > 1 && n0 >= 0 - && p0 != (int) '-' && word[i+k] != '\0') { - /** test follow-up rule for "word[i+k]" **/ - while (parms.rules[n0][0] == c0) { - - /** check whole string **/ - k0 = k; - p0 = 5; - s = parms.rules[n0]; - s++; - while (*s != '\0' && word[i+k0] == *s - && ! isdigit((unsigned char) *s) && strchr("(-<^$",*s) == NULL) { - k0++; - s++; - } - if (*s == '(') { - /** check letters **/ - if (myisalpha(word[i+k0]) - && strchr (s+1, word[i+k0]) != NULL) { - k0++; - while (*s != ')' && *s != '\0') - s++; - if (*s == ')') - s++; - } - } - while (*s == '-') { - /** "k0" gets NOT reduced **/ - /** because "if (k0 == k)" **/ - s++; - } - if (*s == '<') - s++; - if (isdigit ((unsigned char) *s)) { - p0 = *s - '0'; - s++; - } - - if (*s == '\0' - /** *s == '^' cuts **/ - || (*s == '$' && ! myisalpha(word[i+k0]))) - { - if (k0 == k) { - /** this is just a piece of the string **/ - n0 += 2; - continue; - } - - if (p0 < p) { - /** priority too low **/ - n0 += 2; - continue; - } - /** rule fits; stop search **/ - break; - } - n0 += 2; - } /** End of "while (parms.rules[n0][0] == c0)" **/ - - if (p0 >= p && parms.rules[n0][0] == c0) { - n += 2; - continue; - } - } /** end of follow-up stuff **/ - - /** replace string **/ - s = parms.rules[n+1]; - p0 = (parms.rules[n][0] != '\0' - && strchr (parms.rules[n]+1,'<') != NULL) ? 1:0; - if (p0 == 1 && z == 0) { - /** rule with '<' is used **/ - if (j > 0 && *s != '\0' - && (target[j-1] == c || target[j-1] == *s)) { - j--; - } - z0 = 1; - z = 1; - k0 = 0; - while (*s != '\0' && word[i+k0] != '\0') { - word[i+k0] = *s; - k0++; - s++; - } - if (k > k0) - strmove (&word[0]+i+k0, &word[0]+i+k); - - /** new "actual letter" **/ - c = word[i]; - } - else { /** no '<' rule used **/ - i += k - 1; - z = 0; - while (*s != '\0' - && *(s+1) != '\0' && j < len) { - if (j == 0 || target[j-1] != *s) { - target[j] = *s; - j++; - } - s++; - } - /** new "actual letter" **/ - c = *s; - if (parms.rules[n][0] != '\0' - && strstr (parms.rules[n]+1, "^^") != NULL) { - if (c != '\0') { - target[j] = c; - j++; - } - strmove (&word[0], &word[0]+i+1); - i = 0; - z0 = 1; - } - } - break; - } /** end of follow-up stuff **/ - n += 2; - } /** end of while (parms.rules[n][0] == c) **/ - } /** end of if (n >= 0) **/ - if (z0 == 0) { -// if (k && (assert(p0!=-333),!p0) && j < len && c != '\0' -// && (!parms.collapse_result || j == 0 || target[j-1] != c)){ - if (k && !p0 && j < len && c != '\0' - && (1 || j == 0 || target[j-1] != c)){ - /** condense only double letters **/ - target[j] = c; - ///printf("\n setting \n"); - j++; - } - - i++; - z = 0; - k=0; - } - } /** end of while ((c = word[i]) != '\0') **/ - - target[j] = '\0'; - return (j); - - } /** end of function "phonet" **/ diff --git a/plugins/SpellChecker/hunspell/phonet.hxx b/plugins/SpellChecker/hunspell/phonet.hxx deleted file mode 100644 index f91d3b02b8..0000000000 --- a/plugins/SpellChecker/hunspell/phonet.hxx +++ /dev/null @@ -1,52 +0,0 @@ -/* phonetic.c - generic replacement aglogithms for phonetic transformation - Copyright (C) 2000 Bjoern Jacke - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License version 2.1 as published by the Free Software Foundation; - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; If not, see - . - - Changelog: - - 2000-01-05 Bjoern Jacke - Initial Release insprired by the article about phonetic - transformations out of c't 25/1999 - - 2007-07-26 Bjoern Jacke - Released under MPL/GPL/LGPL tri-license for Hunspell - - 2007-08-23 Laszlo Nemeth - Porting from Aspell to Hunspell using C-like structs -*/ - -#ifndef __PHONETHXX__ -#define __PHONETHXX__ - -#define HASHSIZE 256 -#define MAXPHONETLEN 256 -#define MAXPHONETUTF8LEN (MAXPHONETLEN * 4) - -#include "hunvisapi.h" - -struct phonetable { - char utf8; - cs_info * lang; - int num; - char * * rules; - int hash[HASHSIZE]; -}; - -LIBHUNSPELL_DLL_EXPORTED void init_phonet_hash(phonetable & parms); - -LIBHUNSPELL_DLL_EXPORTED int phonet (const char * inword, char * target, - int len, phonetable & phone); - -#endif diff --git a/plugins/SpellChecker/hunspell/replist.cxx b/plugins/SpellChecker/hunspell/replist.cxx deleted file mode 100644 index bc153733db..0000000000 --- a/plugins/SpellChecker/hunspell/replist.cxx +++ /dev/null @@ -1,87 +0,0 @@ -#include "license.hunspell" -#include "license.myspell" - -#include -#include -#include - -#include "replist.hxx" -#include "csutil.hxx" - -RepList::RepList(int n) { - dat = (replentry **) malloc(sizeof(replentry *) * n); - if (dat == 0) size = 0; else size = n; - pos = 0; -} - -RepList::~RepList() -{ - for (int i = 0; i < pos; i++) { - free(dat[i]->pattern); - free(dat[i]->pattern2); - free(dat[i]); - } - free(dat); -} - -int RepList::get_pos() { - return pos; -} - -replentry * RepList::item(int n) { - return dat[n]; -} - -int RepList::findnear(const char * word) { - int p1 = 0; - int p2 = pos; - while ((p2 - p1) > 1) { - int m = (p1 + p2) / 2; - int c = strcmp(word, dat[m]->pattern); - if (c <= 0) { - if (c < 0) p2 = m; else p1 = p2 = m; - } else p1 = m; - } - return p1; -} - -int RepList::match(const char * word, int n) { - if (strncmp(word, dat[n]->pattern, strlen(dat[n]->pattern)) == 0) return strlen(dat[n]->pattern); - return 0; -} - -int RepList::add(char * pat1, char * pat2) { - if (pos >= size || pat1 == NULL || pat2 == NULL) return 1; - replentry * r = (replentry *) malloc(sizeof(replentry)); - if (r == NULL) return 1; - r->pattern = mystrrep(pat1, "_", " "); - r->pattern2 = mystrrep(pat2, "_", " "); - r->start = false; - r->end = false; - dat[pos++] = r; - for (int i = pos - 1; i > 0; i--) { - r = dat[i]; - if (strcmp(r->pattern, dat[i - 1]->pattern) < 0) { - dat[i] = dat[i - 1]; - dat[i - 1] = r; - } else break; - } - return 0; -} - -int RepList::conv(const char * word, char * dest) { - int stl = 0; - int change = 0; - for (size_t i = 0; i < strlen(word); i++) { - int n = findnear(word + i); - int l = match(word + i, n); - if (l) { - strcpy(dest + stl, dat[n]->pattern2); - stl += strlen(dat[n]->pattern2); - i += l - 1; - change = 1; - } else dest[stl++] = word[i]; - } - dest[stl] = '\0'; - return change; -} diff --git a/plugins/SpellChecker/hunspell/replist.hxx b/plugins/SpellChecker/hunspell/replist.hxx deleted file mode 100644 index 1cc039ebeb..0000000000 --- a/plugins/SpellChecker/hunspell/replist.hxx +++ /dev/null @@ -1,27 +0,0 @@ -/* string replacement list class */ -#ifndef _REPLIST_HXX_ -#define _REPLIST_HXX_ - -#include "hunvisapi.h" - -#include "w_char.hxx" - -class LIBHUNSPELL_DLL_EXPORTED RepList -{ -protected: - replentry ** dat; - int size; - int pos; - -public: - RepList(int n); - ~RepList(); - - int get_pos(); - int add(char * pat1, char * pat2); - replentry * item(int n); - int findnear(const char * word); - int match(const char * word, int n); - int conv(const char * word, char * dest); -}; -#endif diff --git a/plugins/SpellChecker/hunspell/suggestmgr.cxx b/plugins/SpellChecker/hunspell/suggestmgr.cxx deleted file mode 100644 index d08b506b9f..0000000000 --- a/plugins/SpellChecker/hunspell/suggestmgr.cxx +++ /dev/null @@ -1,2001 +0,0 @@ -#include "license.hunspell" -#include "license.myspell" - -#include -#include -#include -#include - -#include "suggestmgr.hxx" -#include "htypes.hxx" -#include "csutil.hxx" - -const w_char W_VLINE = { '\0', '|' }; - -SuggestMgr::SuggestMgr(const char * tryme, int maxn, - AffixMgr * aptr) -{ - - // register affix manager and check in string of chars to - // try when building candidate suggestions - pAMgr = aptr; - - csconv = NULL; - - ckeyl = 0; - ckey = NULL; - ckey_utf = NULL; - - ctryl = 0; - ctry = NULL; - ctry_utf = NULL; - - utf8 = 0; - langnum = 0; - complexprefixes = 0; - - maxSug = maxn; - nosplitsugs = 0; - maxngramsugs = MAXNGRAMSUGS; - maxcpdsugs = MAXCOMPOUNDSUGS; - - if (pAMgr) { - langnum = pAMgr->get_langnum(); - ckey = pAMgr->get_key_string(); - nosplitsugs = pAMgr->get_nosplitsugs(); - if (pAMgr->get_maxngramsugs() >= 0) - maxngramsugs = pAMgr->get_maxngramsugs(); - utf8 = pAMgr->get_utf8(); - if (pAMgr->get_maxcpdsugs() >= 0) - maxcpdsugs = pAMgr->get_maxcpdsugs(); - if (!utf8) - { - char * enc = pAMgr->get_encoding(); - csconv = get_current_cs(enc); - free(enc); - } - complexprefixes = pAMgr->get_complexprefixes(); - } - - if (ckey) { - if (utf8) { - w_char t[MAXSWL]; - ckeyl = u8_u16(t, MAXSWL, ckey); - ckey_utf = (w_char *) malloc(ckeyl * sizeof(w_char)); - if (ckey_utf) memcpy(ckey_utf, t, ckeyl * sizeof(w_char)); - else ckeyl = 0; - } else { - ckeyl = strlen(ckey); - } - } - - if (tryme) { - ctry = mystrdup(tryme); - if (ctry) ctryl = strlen(ctry); - if (ctry && utf8) { - w_char t[MAXSWL]; - ctryl = u8_u16(t, MAXSWL, tryme); - ctry_utf = (w_char *) malloc(ctryl * sizeof(w_char)); - if (ctry_utf) memcpy(ctry_utf, t, ctryl * sizeof(w_char)); - else ctryl = 0; - } - } -} - - -SuggestMgr::~SuggestMgr() -{ - pAMgr = NULL; - if (ckey) free(ckey); - ckey = NULL; - if (ckey_utf) free(ckey_utf); - ckey_utf = NULL; - ckeyl = 0; - if (ctry) free(ctry); - ctry = NULL; - if (ctry_utf) free(ctry_utf); - ctry_utf = NULL; - ctryl = 0; - maxSug = 0; -#ifdef MOZILLA_CLIENT - delete [] csconv; -#endif -} - -int SuggestMgr::testsug(char** wlst, const char * candidate, int wl, int ns, int cpdsuggest, - int * timer, clock_t * timelimit) { - int cwrd = 1; - if (ns == maxSug) return maxSug; - for (int k=0; k < ns; k++) { - if (strcmp(candidate,wlst[k]) == 0) cwrd = 0; - } - if ((cwrd) && checkword(candidate, wl, cpdsuggest, timer, timelimit)) { - wlst[ns] = mystrdup(candidate); - if (wlst[ns] == NULL) { - for (int j=0; j 0) oldSug = nsug; - - // suggestions for an uppercase word (html -> HTML) - if ((nsug < maxSug) && (nsug > -1)) { - nsug = (utf8) ? capchars_utf(wlst, word_utf, wl, nsug, cpdsuggest) : - capchars(wlst, word, nsug, cpdsuggest); - } - - // perhaps we made a typical fault of spelling - if ((nsug < maxSug) && (nsug > -1) && (!cpdsuggest || (nsug < oldSug + maxcpdsugs))) { - nsug = replchars(wlst, word, nsug, cpdsuggest); - } - - // perhaps we made chose the wrong char from a related set - if ((nsug < maxSug) && (nsug > -1) && (!cpdsuggest || (nsug < oldSug + maxcpdsugs))) { - nsug = mapchars(wlst, word, nsug, cpdsuggest); - } - - // only suggest compound words when no other suggestion - if ((cpdsuggest == 0) && (nsug > nsugorig)) nocompoundtwowords=1; - - // did we swap the order of chars by mistake - if ((nsug < maxSug) && (nsug > -1) && (!cpdsuggest || (nsug < oldSug + maxcpdsugs))) { - nsug = (utf8) ? swapchar_utf(wlst, word_utf, wl, nsug, cpdsuggest) : - swapchar(wlst, word, nsug, cpdsuggest); - } - - // did we swap the order of non adjacent chars by mistake - if ((nsug < maxSug) && (nsug > -1) && (!cpdsuggest || (nsug < oldSug + maxcpdsugs))) { - nsug = (utf8) ? longswapchar_utf(wlst, word_utf, wl, nsug, cpdsuggest) : - longswapchar(wlst, word, nsug, cpdsuggest); - } - - // did we just hit the wrong key in place of a good char (case and keyboard) - if ((nsug < maxSug) && (nsug > -1) && (!cpdsuggest || (nsug < oldSug + maxcpdsugs))) { - nsug = (utf8) ? badcharkey_utf(wlst, word_utf, wl, nsug, cpdsuggest) : - badcharkey(wlst, word, nsug, cpdsuggest); - } - - // did we add a char that should not be there - if ((nsug < maxSug) && (nsug > -1) && (!cpdsuggest || (nsug < oldSug + maxcpdsugs))) { - nsug = (utf8) ? extrachar_utf(wlst, word_utf, wl, nsug, cpdsuggest) : - extrachar(wlst, word, nsug, cpdsuggest); - } - - - // did we forgot a char - if ((nsug < maxSug) && (nsug > -1) && (!cpdsuggest || (nsug < oldSug + maxcpdsugs))) { - nsug = (utf8) ? forgotchar_utf(wlst, word_utf, wl, nsug, cpdsuggest) : - forgotchar(wlst, word, nsug, cpdsuggest); - } - - // did we move a char - if ((nsug < maxSug) && (nsug > -1) && (!cpdsuggest || (nsug < oldSug + maxcpdsugs))) { - nsug = (utf8) ? movechar_utf(wlst, word_utf, wl, nsug, cpdsuggest) : - movechar(wlst, word, nsug, cpdsuggest); - } - - // did we just hit the wrong key in place of a good char - if ((nsug < maxSug) && (nsug > -1) && (!cpdsuggest || (nsug < oldSug + maxcpdsugs))) { - nsug = (utf8) ? badchar_utf(wlst, word_utf, wl, nsug, cpdsuggest) : - badchar(wlst, word, nsug, cpdsuggest); - } - - // did we double two characters - if ((nsug < maxSug) && (nsug > -1) && (!cpdsuggest || (nsug < oldSug + maxcpdsugs))) { - nsug = (utf8) ? doubletwochars_utf(wlst, word_utf, wl, nsug, cpdsuggest) : - doubletwochars(wlst, word, nsug, cpdsuggest); - } - - // perhaps we forgot to hit space and two words ran together - if (!nosplitsugs && (nsug < maxSug) && (nsug > -1) && (!cpdsuggest || (nsug < oldSug + maxcpdsugs))) { - nsug = twowords(wlst, word, nsug, cpdsuggest); - } - - } // repeating ``for'' statement compounding support - - if (nsug < 0) { - // we ran out of memory - we should free up as much as possible - for (int i = 0; i < maxSug; i++) - if (wlst[i] != NULL) free(wlst[i]); - free(wlst); - wlst = NULL; - } - - if (!nocompoundtwowords && (nsug > 0) && onlycompoundsug) *onlycompoundsug = 1; - - *slst = wlst; - return nsug; -} - -// generate suggestions for a word with typical mistake -// pass in address of array of char * pointers -#ifdef HUNSPELL_EXPERIMENTAL -int SuggestMgr::suggest_auto(char*** slst, const char * w, int nsug) -{ - int nocompoundtwowords = 0; - char ** wlst; - int oldSug; - - char w2[MAXWORDUTF8LEN]; - const char * word = w; - - // word reversing wrapper for complex prefixes - if (complexprefixes) { - strcpy(w2, w); - if (utf8) reverseword_utf(w2); else reverseword(w2); - word = w2; - } - - if (*slst) { - wlst = *slst; - } else { - wlst = (char **) malloc(maxSug * sizeof(char *)); - if (wlst == NULL) return -1; - } - - for (int cpdsuggest=0; (cpdsuggest<2) && (nocompoundtwowords==0); cpdsuggest++) { - - // limit compound suggestion - if (cpdsuggest > 0) oldSug = nsug; - - // perhaps we made a typical fault of spelling - if ((nsug < maxSug) && (nsug > -1)) - nsug = replchars(wlst, word, nsug, cpdsuggest); - - // perhaps we made chose the wrong char from a related set - if ((nsug < maxSug) && (nsug > -1) && (!cpdsuggest || (nsug < oldSug + maxcpdsugs))) - nsug = mapchars(wlst, word, nsug, cpdsuggest); - - if ((cpdsuggest==0) && (nsug>0)) nocompoundtwowords=1; - - // perhaps we forgot to hit space and two words ran together - - if ((nsug < maxSug) && (nsug > -1) && (!cpdsuggest || (nsug < oldSug + maxcpdsugs)) && check_forbidden(word, strlen(word))) { - nsug = twowords(wlst, word, nsug, cpdsuggest); - } - - } // repeating ``for'' statement compounding support - - if (nsug < 0) { - for (int i=0;i HTML) -int SuggestMgr::capchars_utf(char ** wlst, const w_char * word, int wl, int ns, int cpdsuggest) -{ - char candidate[MAXSWUTF8L]; - w_char candidate_utf[MAXSWL]; - memcpy(candidate_utf, word, wl * sizeof(w_char)); - mkallcap_utf(candidate_utf, wl, langnum); - u16_u8(candidate, MAXSWUTF8L, candidate_utf, wl); - return testsug(wlst, candidate, strlen(candidate), ns, cpdsuggest, NULL, NULL); -} - -// suggestions for an uppercase word (html -> HTML) -int SuggestMgr::capchars(char** wlst, const char * word, int ns, int cpdsuggest) -{ - char candidate[MAXSWUTF8L]; - strcpy(candidate, word); - mkallcap(candidate, csconv); - return testsug(wlst, candidate, strlen(candidate), ns, cpdsuggest, NULL, NULL); -} - -// suggestions for when chose the wrong char out of a related set -int SuggestMgr::mapchars(char** wlst, const char * word, int ns, int cpdsuggest) -{ - char candidate[MAXSWUTF8L]; - clock_t timelimit; - int timer; - candidate[0] = '\0'; - - int wl = strlen(word); - if (wl < 2 || ! pAMgr) return ns; - - int nummap = pAMgr->get_nummap(); - struct mapentry* maptable = pAMgr->get_maptable(); - if (maptable==NULL) return ns; - - timelimit = clock(); - timer = MINTIMER; - return map_related(word, (char *) &candidate, 0, 0, wlst, cpdsuggest, ns, maptable, nummap, &timer, &timelimit); -} - -int SuggestMgr::map_related(const char * word, char * candidate, int wn, int cn, - char** wlst, int cpdsuggest, int ns, - const mapentry* maptable, int nummap, int * timer, clock_t * timelimit) -{ - if (*(word + wn) == '\0') { - int cwrd = 1; - *(candidate + cn) = '\0'; - int wl = strlen(candidate); - for (int m=0; m < ns; m++) - if (strcmp(candidate, wlst[m]) == 0) cwrd = 0; - if ((cwrd) && checkword(candidate, wl, cpdsuggest, timer, timelimit)) { - if (ns < maxSug) { - wlst[ns] = mystrdup(candidate); - if (wlst[ns] == NULL) return -1; - ns++; - } - } - return ns; - } - int in_map = 0; - for (int j = 0; j < nummap; j++) { - for (int k = 0; k < maptable[j].len; k++) { - int len = strlen(maptable[j].set[k]); - if (strncmp(maptable[j].set[k], word + wn, len) == 0) { - in_map = 1; - for (int l = 0; l < maptable[j].len; l++) { - strcpy(candidate + cn, maptable[j].set[l]); - ns = map_related(word, candidate, wn + len, strlen(candidate), wlst, - cpdsuggest, ns, maptable, nummap, timer, timelimit); - if (!(*timer)) return ns; - } - } - } - } - if (!in_map) { - *(candidate + cn) = *(word + wn); - ns = map_related(word, candidate, wn + 1, cn + 1, wlst, cpdsuggest, - ns, maptable, nummap, timer, timelimit); - } - return ns; -} - -// suggestions for a typical fault of spelling, that -// differs with more, than 1 letter from the right form. -int SuggestMgr::replchars(char** wlst, const char * word, int ns, int cpdsuggest) -{ - char candidate[MAXSWUTF8L]; - const char * r; - int lenr, lenp; - int wl = strlen(word); - if (wl < 2 || ! pAMgr) return ns; - int numrep = pAMgr->get_numrep(); - struct replentry* reptable = pAMgr->get_reptable(); - if (reptable==NULL) return ns; - for (int i=0; i < numrep; i++ ) { - r = word; - lenr = strlen(reptable[i].pattern2); - lenp = strlen(reptable[i].pattern); - // search every occurence of the pattern in the word - while ((r=strstr(r, reptable[i].pattern)) != NULL && (!reptable[i].end || strlen(r) == strlen(reptable[i].pattern)) && - (!reptable[i].start || r == word)) { - strcpy(candidate, word); - if (r-word + lenr + strlen(r+lenp) >= MAXSWUTF8L) break; - strcpy(candidate+(r-word),reptable[i].pattern2); - strcpy(candidate+(r-word)+lenr, r+lenp); - ns = testsug(wlst, candidate, wl-lenp+lenr, ns, cpdsuggest, NULL, NULL); - if (ns == -1) return -1; - // check REP suggestions with space - char * sp = strchr(candidate, ' '); - if (sp) { - char * prev = candidate; - while (sp) { - *sp = '\0'; - if (checkword(prev, strlen(prev), 0, NULL, NULL)) { - int oldns = ns; - *sp = ' '; - ns = testsug(wlst, sp + 1, strlen(sp + 1), ns, cpdsuggest, NULL, NULL); - if (ns == -1) return -1; - if (oldns < ns) { - free(wlst[ns - 1]); - wlst[ns - 1] = mystrdup(candidate); - if (!wlst[ns - 1]) return -1; - } - } - *sp = ' '; - prev = sp + 1; - sp = strchr(prev, ' '); - } - } - r++; // search for the next letter - } - } - return ns; -} - -// perhaps we doubled two characters (pattern aba -> ababa, for example vacation -> vacacation) -int SuggestMgr::doubletwochars(char** wlst, const char * word, int ns, int cpdsuggest) -{ - char candidate[MAXSWUTF8L]; - int state=0; - int wl = strlen(word); - if (wl < 5 || ! pAMgr) return ns; - for (int i=2; i < wl; i++ ) { - if (word[i]==word[i-2]) { - state++; - if (state==3) { - strcpy(candidate,word); - strcpy(candidate+i-1,word+i+1); - ns = testsug(wlst, candidate, wl-2, ns, cpdsuggest, NULL, NULL); - if (ns == -1) return -1; - state=0; - } - } else { - state=0; - } - } - return ns; -} - -// perhaps we doubled two characters (pattern aba -> ababa, for example vacation -> vacacation) -int SuggestMgr::doubletwochars_utf(char ** wlst, const w_char * word, int wl, int ns, int cpdsuggest) -{ - w_char candidate_utf[MAXSWL]; - char candidate[MAXSWUTF8L]; - int state=0; - if (wl < 5 || ! pAMgr) return ns; - for (int i=2; i < wl; i++) { - if (w_char_eq(word[i], word[i-2])) { - state++; - if (state==3) { - memcpy(candidate_utf, word, (i - 1) * sizeof(w_char)); - memcpy(candidate_utf+i-1, word+i+1, (wl-i-1) * sizeof(w_char)); - u16_u8(candidate, MAXSWUTF8L, candidate_utf, wl-2); - ns = testsug(wlst, candidate, strlen(candidate), ns, cpdsuggest, NULL, NULL); - if (ns == -1) return -1; - state=0; - } - } else { - state=0; - } - } - return ns; -} - -// error is wrong char in place of correct one (case and keyboard related version) -int SuggestMgr::badcharkey(char ** wlst, const char * word, int ns, int cpdsuggest) -{ - char tmpc; - char candidate[MAXSWUTF8L]; - int wl = strlen(word); - strcpy(candidate, word); - // swap out each char one by one and try uppercase and neighbor - // keyboard chars in its place to see if that makes a good word - - for (int i=0; i < wl; i++) { - tmpc = candidate[i]; - // check with uppercase letters - candidate[i] = csconv[((unsigned char)tmpc)].cupper; - if (tmpc != candidate[i]) { - ns = testsug(wlst, candidate, wl, ns, cpdsuggest, NULL, NULL); - if (ns == -1) return -1; - candidate[i] = tmpc; - } - // check neighbor characters in keyboard string - if (!ckey) continue; - char * loc = strchr(ckey, tmpc); - while (loc) { - if ((loc > ckey) && (*(loc - 1) != '|')) { - candidate[i] = *(loc - 1); - ns = testsug(wlst, candidate, wl, ns, cpdsuggest, NULL, NULL); - if (ns == -1) return -1; - } - if ((*(loc + 1) != '|') && (*(loc + 1) != '\0')) { - candidate[i] = *(loc + 1); - ns = testsug(wlst, candidate, wl, ns, cpdsuggest, NULL, NULL); - if (ns == -1) return -1; - } - loc = strchr(loc + 1, tmpc); - } - candidate[i] = tmpc; - } - return ns; -} - -// error is wrong char in place of correct one (case and keyboard related version) -int SuggestMgr::badcharkey_utf(char ** wlst, const w_char * word, int wl, int ns, int cpdsuggest) -{ - w_char tmpc; - w_char candidate_utf[MAXSWL]; - char candidate[MAXSWUTF8L]; - memcpy(candidate_utf, word, wl * sizeof(w_char)); - // swap out each char one by one and try all the tryme - // chars in its place to see if that makes a good word - for (int i=0; i < wl; i++) { - tmpc = candidate_utf[i]; - // check with uppercase letters - mkallcap_utf(candidate_utf + i, 1, langnum); - if (!w_char_eq(tmpc, candidate_utf[i])) { - u16_u8(candidate, MAXSWUTF8L, candidate_utf, wl); - ns = testsug(wlst, candidate, strlen(candidate), ns, cpdsuggest, NULL, NULL); - if (ns == -1) return -1; - candidate_utf[i] = tmpc; - } - // check neighbor characters in keyboard string - if (!ckey) continue; - w_char * loc = ckey_utf; - while ((loc < (ckey_utf + ckeyl)) && !w_char_eq(*loc, tmpc)) loc++; - while (loc < (ckey_utf + ckeyl)) { - if ((loc > ckey_utf) && !w_char_eq(*(loc - 1), W_VLINE)) { - candidate_utf[i] = *(loc - 1); - u16_u8(candidate, MAXSWUTF8L, candidate_utf, wl); - ns = testsug(wlst, candidate, strlen(candidate), ns, cpdsuggest, NULL, NULL); - if (ns == -1) return -1; - } - if (((loc + 1) < (ckey_utf + ckeyl)) && !w_char_eq(*(loc + 1), W_VLINE)) { - candidate_utf[i] = *(loc + 1); - u16_u8(candidate, MAXSWUTF8L, candidate_utf, wl); - ns = testsug(wlst, candidate, strlen(candidate), ns, cpdsuggest, NULL, NULL); - if (ns == -1) return -1; - } - do { loc++; } while ((loc < (ckey_utf + ckeyl)) && !w_char_eq(*loc, tmpc)); - } - candidate_utf[i] = tmpc; - } - return ns; -} - -// error is wrong char in place of correct one -int SuggestMgr::badchar(char ** wlst, const char * word, int ns, int cpdsuggest) -{ - char tmpc; - char candidate[MAXSWUTF8L]; - clock_t timelimit = clock(); - int timer = MINTIMER; - int wl = strlen(word); - strcpy(candidate, word); - // swap out each char one by one and try all the tryme - // chars in its place to see if that makes a good word - for (int j=0; j < ctryl; j++) { - for (int i=wl-1; i >= 0; i--) { - tmpc = candidate[i]; - if (ctry[j] == tmpc) continue; - candidate[i] = ctry[j]; - ns = testsug(wlst, candidate, wl, ns, cpdsuggest, &timer, &timelimit); - if (ns == -1) return -1; - if (!timer) return ns; - candidate[i] = tmpc; - } - } - return ns; -} - -// error is wrong char in place of correct one -int SuggestMgr::badchar_utf(char ** wlst, const w_char * word, int wl, int ns, int cpdsuggest) -{ - w_char tmpc; - w_char candidate_utf[MAXSWL]; - char candidate[MAXSWUTF8L]; - clock_t timelimit = clock(); - int timer = MINTIMER; - memcpy(candidate_utf, word, wl * sizeof(w_char)); - // swap out each char one by one and try all the tryme - // chars in its place to see if that makes a good word - for (int j=0; j < ctryl; j++) { - for (int i=wl-1; i >= 0; i--) { - tmpc = candidate_utf[i]; - if (w_char_eq(tmpc, ctry_utf[j])) continue; - candidate_utf[i] = ctry_utf[j]; - u16_u8(candidate, MAXSWUTF8L, candidate_utf, wl); - ns = testsug(wlst, candidate, strlen(candidate), ns, cpdsuggest, &timer, &timelimit); - if (ns == -1) return -1; - if (!timer) return ns; - candidate_utf[i] = tmpc; - } - } - return ns; -} - -// error is word has an extra letter it does not need -int SuggestMgr::extrachar_utf(char** wlst, const w_char * word, int wl, int ns, int cpdsuggest) -{ - char candidate[MAXSWUTF8L]; - w_char candidate_utf[MAXSWL]; - w_char * p; - w_char tmpc = W_VLINE; // not used value, only for VCC warning message - if (wl < 2) return ns; - // try omitting one char of word at a time - memcpy(candidate_utf, word, wl * sizeof(w_char)); - for (p = candidate_utf + wl - 1; p >= candidate_utf; p--) { - w_char tmpc2 = *p; - if (p < candidate_utf + wl - 1) *p = tmpc; - u16_u8(candidate, MAXSWUTF8L, candidate_utf, wl - 1); - ns = testsug(wlst, candidate, strlen(candidate), ns, cpdsuggest, NULL, NULL); - if (ns == -1) return -1; - tmpc = tmpc2; - } - return ns; -} - -// error is word has an extra letter it does not need -int SuggestMgr::extrachar(char** wlst, const char * word, int ns, int cpdsuggest) -{ - char tmpc = '\0'; - char candidate[MAXSWUTF8L]; - char * p; - int wl = strlen(word); - if (wl < 2) return ns; - // try omitting one char of word at a time - strcpy (candidate, word); - for (p = candidate + wl - 1; p >=candidate; p--) { - char tmpc2 = *p; - *p = tmpc; - ns = testsug(wlst, candidate, wl-1, ns, cpdsuggest, NULL, NULL); - if (ns == -1) return -1; - tmpc = tmpc2; - } - return ns; -} - -// error is missing a letter it needs -int SuggestMgr::forgotchar(char ** wlst, const char * word, int ns, int cpdsuggest) -{ - char candidate[MAXSWUTF8L]; - char * p; - clock_t timelimit = clock(); - int timer = MINTIMER; - int wl = strlen(word); - // try inserting a tryme character before every letter (and the null terminator) - for (int i = 0; i < ctryl; i++) { - strcpy(candidate, word); - for (p = candidate + wl; p >= candidate; p--) { - *(p+1) = *p; - *p = ctry[i]; - ns = testsug(wlst, candidate, wl+1, ns, cpdsuggest, &timer, &timelimit); - if (ns == -1) return -1; - if (!timer) return ns; - } - } - return ns; -} - -// error is missing a letter it needs -int SuggestMgr::forgotchar_utf(char ** wlst, const w_char * word, int wl, int ns, int cpdsuggest) -{ - w_char candidate_utf[MAXSWL]; - char candidate[MAXSWUTF8L]; - w_char * p; - clock_t timelimit = clock(); - int timer = MINTIMER; - // try inserting a tryme character at the end of the word and before every letter - for (int i = 0; i < ctryl; i++) { - memcpy (candidate_utf, word, wl * sizeof(w_char)); - for (p = candidate_utf + wl; p >= candidate_utf; p--) { - *(p + 1) = *p; - *p = ctry_utf[i]; - u16_u8(candidate, MAXSWUTF8L, candidate_utf, wl + 1); - ns = testsug(wlst, candidate, strlen(candidate), ns, cpdsuggest, &timer, &timelimit); - if (ns == -1) return -1; - if (!timer) return ns; - } - } - return ns; -} - - -/* error is should have been two words */ -int SuggestMgr::twowords(char ** wlst, const char * word, int ns, int cpdsuggest) -{ - char candidate[MAXSWUTF8L]; - char * p; - int c1, c2; - int forbidden = 0; - int cwrd; - - int wl=strlen(word); - if (wl < 3) return ns; - - if (langnum == LANG_hu) forbidden = check_forbidden(word, wl); - - strcpy(candidate + 1, word); - // split the string into two pieces after every char - // if both pieces are good words make them a suggestion - for (p = candidate + 1; p[1] != '\0'; p++) { - p[-1] = *p; - // go to end of the UTF-8 character - while (utf8 && ((p[1] & 0xc0) == 0x80)) { - *p = p[1]; - p++; - } - if (utf8 && p[1] == '\0') break; // last UTF-8 character - *p = '\0'; - c1 = checkword(candidate,strlen(candidate), cpdsuggest, NULL, NULL); - if (c1) { - c2 = checkword((p+1),strlen(p+1), cpdsuggest, NULL, NULL); - if (c2) { - *p = ' '; - - // spec. Hungarian code (need a better compound word support) - if ((langnum == LANG_hu) && !forbidden && - // if 3 repeating letter, use - instead of space - (((p[-1] == p[1]) && (((p>candidate+1) && (p[-1] == p[-2])) || (p[-1] == p[2]))) || - // or multiple compounding, with more, than 6 syllables - ((c1 == 3) && (c2 >= 2)))) *p = '-'; - - cwrd = 1; - for (int k=0; k < ns; k++) - if (strcmp(candidate,wlst[k]) == 0) cwrd = 0; - if (ns < maxSug) { - if (cwrd) { - wlst[ns] = mystrdup(candidate); - if (wlst[ns] == NULL) return -1; - ns++; - } - } else return ns; - // add two word suggestion with dash, if TRY string contains - // "a" or "-" - // NOTE: cwrd doesn't modified for REP twoword sugg. - if (ctry && (strchr(ctry, 'a') || strchr(ctry, '-')) && - mystrlen(p + 1) > 1 && - mystrlen(candidate) - mystrlen(p) > 1) { - *p = '-'; - for (int k=0; k < ns; k++) - if (strcmp(candidate,wlst[k]) == 0) cwrd = 0; - if (ns < maxSug) { - if (cwrd) { - wlst[ns] = mystrdup(candidate); - if (wlst[ns] == NULL) return -1; - ns++; - } - } else return ns; - } - } - } - } - return ns; -} - - -// error is adjacent letter were swapped -int SuggestMgr::swapchar(char ** wlst, const char * word, int ns, int cpdsuggest) -{ - char candidate[MAXSWUTF8L]; - char * p; - char tmpc; - int wl=strlen(word); - // try swapping adjacent chars one by one - strcpy(candidate, word); - for (p = candidate; p[1] != 0; p++) { - tmpc = *p; - *p = p[1]; - p[1] = tmpc; - ns = testsug(wlst, candidate, wl, ns, cpdsuggest, NULL, NULL); - if (ns == -1) return -1; - p[1] = *p; - *p = tmpc; - } - // try double swaps for short words - // ahev -> have, owudl -> would - if (wl == 4 || wl == 5) { - candidate[0] = word[1]; - candidate[1] = word[0]; - candidate[2] = word[2]; - candidate[wl - 2] = word[wl - 1]; - candidate[wl - 1] = word[wl - 2]; - ns = testsug(wlst, candidate, wl, ns, cpdsuggest, NULL, NULL); - if (ns == -1) return -1; - if (wl == 5) { - candidate[0] = word[0]; - candidate[1] = word[2]; - candidate[2] = word[1]; - ns = testsug(wlst, candidate, wl, ns, cpdsuggest, NULL, NULL); - if (ns == -1) return -1; - } - } - return ns; -} - -// error is adjacent letter were swapped -int SuggestMgr::swapchar_utf(char ** wlst, const w_char * word, int wl, int ns, int cpdsuggest) -{ - w_char candidate_utf[MAXSWL]; - char candidate[MAXSWUTF8L]; - w_char * p; - w_char tmpc; - int len = 0; - // try swapping adjacent chars one by one - memcpy (candidate_utf, word, wl * sizeof(w_char)); - for (p = candidate_utf; p < (candidate_utf + wl - 1); p++) { - tmpc = *p; - *p = p[1]; - p[1] = tmpc; - u16_u8(candidate, MAXSWUTF8L, candidate_utf, wl); - if (len == 0) len = strlen(candidate); - ns = testsug(wlst, candidate, len, ns, cpdsuggest, NULL, NULL); - if (ns == -1) return -1; - p[1] = *p; - *p = tmpc; - } - // try double swaps for short words - // ahev -> have, owudl -> would, suodn -> sound - if (wl == 4 || wl == 5) { - candidate_utf[0] = word[1]; - candidate_utf[1] = word[0]; - candidate_utf[2] = word[2]; - candidate_utf[wl - 2] = word[wl - 1]; - candidate_utf[wl - 1] = word[wl - 2]; - u16_u8(candidate, MAXSWUTF8L, candidate_utf, wl); - ns = testsug(wlst, candidate, len, ns, cpdsuggest, NULL, NULL); - if (ns == -1) return -1; - if (wl == 5) { - candidate_utf[0] = word[0]; - candidate_utf[1] = word[2]; - candidate_utf[2] = word[1]; - u16_u8(candidate, MAXSWUTF8L, candidate_utf, wl); - ns = testsug(wlst, candidate, len, ns, cpdsuggest, NULL, NULL); - if (ns == -1) return -1; - } - } - return ns; -} - -// error is not adjacent letter were swapped -int SuggestMgr::longswapchar(char ** wlst, const char * word, int ns, int cpdsuggest) -{ - char candidate[MAXSWUTF8L]; - char * p; - char * q; - char tmpc; - int wl=strlen(word); - // try swapping not adjacent chars one by one - strcpy(candidate, word); - for (p = candidate; *p != 0; p++) { - for (q = candidate; *q != 0; q++) { - if (abs((int)(p-q)) > 1) { - tmpc = *p; - *p = *q; - *q = tmpc; - ns = testsug(wlst, candidate, wl, ns, cpdsuggest, NULL, NULL); - if (ns == -1) return -1; - *q = *p; - *p = tmpc; - } - } - } - return ns; -} - - -// error is adjacent letter were swapped -int SuggestMgr::longswapchar_utf(char ** wlst, const w_char * word, int wl, int ns, int cpdsuggest) -{ - w_char candidate_utf[MAXSWL]; - char candidate[MAXSWUTF8L]; - w_char * p; - w_char * q; - w_char tmpc; - // try swapping not adjacent chars - memcpy (candidate_utf, word, wl * sizeof(w_char)); - for (p = candidate_utf; p < (candidate_utf + wl); p++) { - for (q = candidate_utf; q < (candidate_utf + wl); q++) { - if (abs((int)(p-q)) > 1) { - tmpc = *p; - *p = *q; - *q = tmpc; - u16_u8(candidate, MAXSWUTF8L, candidate_utf, wl); - ns = testsug(wlst, candidate, strlen(candidate), ns, cpdsuggest, NULL, NULL); - if (ns == -1) return -1; - *q = *p; - *p = tmpc; - } - } - } - return ns; -} - -// error is a letter was moved -int SuggestMgr::movechar(char ** wlst, const char * word, int ns, int cpdsuggest) -{ - char candidate[MAXSWUTF8L]; - char * p; - char * q; - char tmpc; - - int wl=strlen(word); - // try moving a char - strcpy(candidate, word); - for (p = candidate; *p != 0; p++) { - for (q = p + 1; (*q != 0) && ((q - p) < 10); q++) { - tmpc = *(q-1); - *(q-1) = *q; - *q = tmpc; - if ((q-p) < 2) continue; // omit swap char - ns = testsug(wlst, candidate, wl, ns, cpdsuggest, NULL, NULL); - if (ns == -1) return -1; - } - strcpy(candidate, word); - } - for (p = candidate + wl - 1; p > candidate; p--) { - for (q = p - 1; (q >= candidate) && ((p - q) < 10); q--) { - tmpc = *(q+1); - *(q+1) = *q; - *q = tmpc; - if ((p-q) < 2) continue; // omit swap char - ns = testsug(wlst, candidate, wl, ns, cpdsuggest, NULL, NULL); - if (ns == -1) return -1; - } - strcpy(candidate, word); - } - return ns; -} - -// error is a letter was moved -int SuggestMgr::movechar_utf(char ** wlst, const w_char * word, int wl, int ns, int cpdsuggest) -{ - w_char candidate_utf[MAXSWL]; - char candidate[MAXSWUTF8L]; - w_char * p; - w_char * q; - w_char tmpc; - // try moving a char - memcpy (candidate_utf, word, wl * sizeof(w_char)); - for (p = candidate_utf; p < (candidate_utf + wl); p++) { - for (q = p + 1; (q < (candidate_utf + wl)) && ((q - p) < 10); q++) { - tmpc = *(q-1); - *(q-1) = *q; - *q = tmpc; - if ((q-p) < 2) continue; // omit swap char - u16_u8(candidate, MAXSWUTF8L, candidate_utf, wl); - ns = testsug(wlst, candidate, strlen(candidate), ns, cpdsuggest, NULL, NULL); - if (ns == -1) return -1; - } - memcpy (candidate_utf, word, wl * sizeof(w_char)); - } - for (p = candidate_utf + wl - 1; p > candidate_utf; p--) { - for (q = p - 1; (q >= candidate_utf) && ((p - q) < 10); q--) { - tmpc = *(q+1); - *(q+1) = *q; - *q = tmpc; - if ((p-q) < 2) continue; // omit swap char - u16_u8(candidate, MAXSWUTF8L, candidate_utf, wl); - ns = testsug(wlst, candidate, strlen(candidate), ns, cpdsuggest, NULL, NULL); - if (ns == -1) return -1; - } - memcpy (candidate_utf, word, wl * sizeof(w_char)); - } - return ns; -} - -// generate a set of suggestions for very poorly spelled words -int SuggestMgr::ngsuggest(char** wlst, char * w, int ns, HashMgr** pHMgr, int md) -{ - - int i, j; - int lval; - int sc, scphon; - int lp, lpphon; - int nonbmp = 0; - - // exhaustively search through all root words - // keeping track of the MAX_ROOTS most similar root words - struct hentry * roots[MAX_ROOTS]; - char * rootsphon[MAX_ROOTS]; - int scores[MAX_ROOTS]; - int scoresphon[MAX_ROOTS]; - for (i = 0; i < MAX_ROOTS; i++) { - roots[i] = NULL; - scores[i] = -100 * i; - rootsphon[i] = NULL; - scoresphon[i] = -100 * i; - } - lp = MAX_ROOTS - 1; - lpphon = MAX_ROOTS - 1; - scphon = -20000; - int low = NGRAM_LOWERING; - - char w2[MAXWORDUTF8LEN]; - char f[MAXSWUTF8L]; - char * word = w; - - // word reversing wrapper for complex prefixes - if (complexprefixes) { - strcpy(w2, w); - if (utf8) reverseword_utf(w2); else reverseword(w2); - word = w2; - } - - char mw[MAXSWUTF8L]; - w_char u8[MAXSWL]; - int nc = strlen(word); - int n = (utf8) ? u8_u16(u8, MAXSWL, word) : nc; - - // set character based ngram suggestion for words with non-BMP Unicode characters - if (n == -1) { - utf8 = 0; // XXX not state-free - n = nc; - nonbmp = 1; - low = 0; - } - - struct hentry* hp = NULL; - int col = -1; - phonetable * ph = (pAMgr) ? pAMgr->get_phonetable() : NULL; - char target[MAXSWUTF8L]; - char candidate[MAXSWUTF8L]; - if (ph) { - if (utf8) { - w_char _w[MAXSWL]; - int _wl = u8_u16(_w, MAXSWL, word); - mkallcap_utf(_w, _wl, langnum); - u16_u8(candidate, MAXSWUTF8L, _w, _wl); - } else { - strcpy(candidate, word); - if (!nonbmp) mkallcap(candidate, csconv); - } - phonet(candidate, target, nc, *ph); // XXX phonet() is 8-bit (nc, not n) - } - - FLAG forbiddenword = pAMgr ? pAMgr->get_forbiddenword() : FLAG_NULL; - FLAG nosuggest = pAMgr ? pAMgr->get_nosuggest() : FLAG_NULL; - FLAG nongramsuggest = pAMgr ? pAMgr->get_nongramsuggest() : FLAG_NULL; - FLAG onlyincompound = pAMgr ? pAMgr->get_onlyincompound() : FLAG_NULL; - - for (i = 0; i < md; i++) { - while (0 != (hp = (pHMgr[i])->walk_hashtable(col, hp))) { - if ((hp->astr) && (pAMgr) && - (TESTAFF(hp->astr, forbiddenword, hp->alen) || - TESTAFF(hp->astr, ONLYUPCASEFLAG, hp->alen) || - TESTAFF(hp->astr, nosuggest, hp->alen) || - TESTAFF(hp->astr, nongramsuggest, hp->alen) || - TESTAFF(hp->astr, onlyincompound, hp->alen))) continue; - - sc = ngram(3, word, HENTRY_WORD(hp), NGRAM_LONGER_WORSE + low) + - leftcommonsubstring(word, HENTRY_WORD(hp)); - - // check special pronounciation - if ((hp->var & H_OPT_PHON) && copy_field(f, HENTRY_DATA(hp), MORPH_PHON)) { - int sc2 = ngram(3, word, f, NGRAM_LONGER_WORSE + low) + - + leftcommonsubstring(word, f); - if (sc2 > sc) sc = sc2; - } - - scphon = -20000; - if (ph && (sc > 2) && (abs(n - (int) hp->clen) <= 3)) { - char target2[MAXSWUTF8L]; - if (utf8) { - w_char _w[MAXSWL]; - int _wl = u8_u16(_w, MAXSWL, HENTRY_WORD(hp)); - mkallcap_utf(_w, _wl, langnum); - u16_u8(candidate, MAXSWUTF8L, _w, _wl); - } else { - strcpy(candidate, HENTRY_WORD(hp)); - mkallcap(candidate, csconv); - } - phonet(candidate, target2, -1, *ph); - scphon = 2 * ngram(3, target, target2, NGRAM_LONGER_WORSE); - } - - if (sc > scores[lp]) { - scores[lp] = sc; - roots[lp] = hp; - lval = sc; - for (j=0; j < MAX_ROOTS; j++) - if (scores[j] < lval) { - lp = j; - lval = scores[j]; - } - } - - - if (scphon > scoresphon[lpphon]) { - scoresphon[lpphon] = scphon; - rootsphon[lpphon] = HENTRY_WORD(hp); - lval = scphon; - for (j=0; j < MAX_ROOTS; j++) - if (scoresphon[j] < lval) { - lpphon = j; - lval = scoresphon[j]; - } - } - }} - - // find minimum threshold for a passable suggestion - // mangle original word three differnt ways - // and score them to generate a minimum acceptable score - int thresh = 0; - for (int sp = 1; sp < 4; sp++) { - if (utf8) { - for (int k=sp; k < n; k+=4) *((unsigned short *) u8 + k) = '*'; - u16_u8(mw, MAXSWUTF8L, u8, n); - thresh = thresh + ngram(n, word, mw, NGRAM_ANY_MISMATCH + low); - } else { - strcpy(mw, word); - for (int k=sp; k < n; k+=4) *(mw + k) = '*'; - thresh = thresh + ngram(n, word, mw, NGRAM_ANY_MISMATCH + low); - } - } - thresh = thresh / 3; - thresh--; - - // now expand affixes on each of these root words and - // and use length adjusted ngram scores to select - // possible suggestions - char * guess[MAX_GUESS]; - char * guessorig[MAX_GUESS]; - int gscore[MAX_GUESS]; - for(i=0;iexpand_rootword(glst, MAX_WORDS, HENTRY_WORD(rp), rp->blen, - rp->astr, rp->alen, word, nc, - ((rp->var & H_OPT_PHON) ? copy_field(f, HENTRY_DATA(rp), MORPH_PHON) : NULL)); - - for (int k = 0; k < nw ; k++) { - sc = ngram(n, word, glst[k].word, NGRAM_ANY_MISMATCH + low) + - leftcommonsubstring(word, glst[k].word); - - if (sc > thresh) { - if (sc > gscore[lp]) { - if (guess[lp]) { - free (guess[lp]); - if (guessorig[lp]) { - free(guessorig[lp]); - guessorig[lp] = NULL; - } - } - gscore[lp] = sc; - guess[lp] = glst[k].word; - guessorig[lp] = glst[k].orig; - lval = sc; - for (j=0; j < MAX_GUESS; j++) - if (gscore[j] < lval) { - lp = j; - lval = gscore[j]; - } - } else { - free(glst[k].word); - if (glst[k].orig) free(glst[k].orig); - } - } else { - free(glst[k].word); - if (glst[k].orig) free(glst[k].orig); - } - } - } - } - free(glst); - - // now we are done generating guesses - // sort in order of decreasing score - - - bubblesort(&guess[0], &guessorig[0], &gscore[0], MAX_GUESS); - if (ph) bubblesort(&rootsphon[0], NULL, &scoresphon[0], MAX_ROOTS); - - // weight suggestions with a similarity index, based on - // the longest common subsequent algorithm and resort - - int is_swap = 0; - int re = 0; - double fact = 1.0; - if (pAMgr) { - int maxd = pAMgr->get_maxdiff(); - if (maxd >= 0) fact = (10.0 - maxd)/5.0; - } - - for (i=0; i < MAX_GUESS; i++) { - if (guess[i]) { - // lowering guess[i] - char gl[MAXSWUTF8L]; - int len; - if (utf8) { - w_char _w[MAXSWL]; - len = u8_u16(_w, MAXSWL, guess[i]); - mkallsmall_utf(_w, len, langnum); - u16_u8(gl, MAXSWUTF8L, _w, len); - } else { - strcpy(gl, guess[i]); - if (!nonbmp) mkallsmall(gl, csconv); - len = strlen(guess[i]); - } - - int _lcs = lcslen(word, gl); - - // same characters with different casing - if ((n == len) && (n == _lcs)) { - gscore[i] += 2000; - break; - } - // using 2-gram instead of 3, and other weightening - gscore[i] = - // length of longest common subsequent minus length difference - 2 * _lcs - abs((int) (n - len)) + - // weight length of the left common substring - leftcommonsubstring(word, gl) + - // weight equal character positions - (!nonbmp && commoncharacterpositions(word, gl, &is_swap) ? 1: 0) + - // swap character (not neighboring) - ((is_swap) ? 10 : 0) + - // ngram - ngram(4, word, gl, NGRAM_ANY_MISMATCH + low) + - // weighted ngrams - (re = ngram(2, word, gl, NGRAM_ANY_MISMATCH + low + NGRAM_WEIGHTED)) + - (re += ngram(2, gl, word, NGRAM_ANY_MISMATCH + low + NGRAM_WEIGHTED)) + - // different limit for dictionaries with PHONE rules - (ph ? (re < len * fact ? -1000 : 0) : (re < (n + len)*fact? -1000 : 0)); - } - } - - bubblesort(&guess[0], &guessorig[0], &gscore[0], MAX_GUESS); - -// phonetic version - if (ph) for (i=0; i < MAX_ROOTS; i++) { - if (rootsphon[i]) { - // lowering rootphon[i] - char gl[MAXSWUTF8L]; - int len; - if (utf8) { - w_char _w[MAXSWL]; - len = u8_u16(_w, MAXSWL, rootsphon[i]); - mkallsmall_utf(_w, len, langnum); - u16_u8(gl, MAXSWUTF8L, _w, len); - } else { - strcpy(gl, rootsphon[i]); - if (!nonbmp) mkallsmall(gl, csconv); - len = strlen(rootsphon[i]); - } - - // heuristic weigthing of ngram scores - scoresphon[i] += 2 * lcslen(word, gl) - abs((int) (n - len)) + - // weight length of the left common substring - leftcommonsubstring(word, gl); - } - } - - if (ph) bubblesort(&rootsphon[0], NULL, &scoresphon[0], MAX_ROOTS); - - // copy over - int oldns = ns; - - int same = 0; - for (i=0; i < MAX_GUESS; i++) { - if (guess[i]) { - if ((ns < oldns + maxngramsugs) && (ns < maxSug) && (!same || (gscore[i] > 1000))) { - int unique = 1; - // leave only excellent suggestions, if exists - if (gscore[i] > 1000) same = 1; else if (gscore[i] < -100) { - same = 1; - // keep the best ngram suggestions, unless in ONLYMAXDIFF mode - if (ns > oldns || (pAMgr && pAMgr->get_onlymaxdiff())) { - free(guess[i]); - if (guessorig[i]) free(guessorig[i]); - continue; - } - } - for (j = 0; j < ns; j++) { - // don't suggest previous suggestions or a previous suggestion with prefixes or affixes - if ((!guessorig[i] && strstr(guess[i], wlst[j])) || - (guessorig[i] && strstr(guessorig[i], wlst[j])) || - // check forbidden words - !checkword(guess[i], strlen(guess[i]), 0, NULL, NULL)) unique = 0; - } - if (unique) { - wlst[ns++] = guess[i]; - if (guessorig[i]) { - free(guess[i]); - wlst[ns-1] = guessorig[i]; - } - } else { - free(guess[i]); - if (guessorig[i]) free(guessorig[i]); - } - } else { - free(guess[i]); - if (guessorig[i]) free(guessorig[i]); - } - } - } - - oldns = ns; - if (ph) for (i=0; i < MAX_ROOTS; i++) { - if (rootsphon[i]) { - if ((ns < oldns + MAXPHONSUGS) && (ns < maxSug)) { - int unique = 1; - for (j = 0; j < ns; j++) { - // don't suggest previous suggestions or a previous suggestion with prefixes or affixes - if (strstr(rootsphon[i], wlst[j]) || - // check forbidden words - !checkword(rootsphon[i], strlen(rootsphon[i]), 0, NULL, NULL)) unique = 0; - } - if (unique) { - wlst[ns++] = mystrdup(rootsphon[i]); - if (!wlst[ns - 1]) return ns - 1; - } - } - } - } - - if (nonbmp) utf8 = 1; - return ns; -} - - -// see if a candidate suggestion is spelled correctly -// needs to check both root words and words with affixes - -// obsolote MySpell-HU modifications: -// return value 2 and 3 marks compounding with hyphen (-) -// `3' marks roots without suffix -int SuggestMgr::checkword(const char * word, int len, int cpdsuggest, int * timer, clock_t * timelimit) -{ - struct hentry * rv=NULL; - struct hentry * rv2=NULL; - int nosuffix = 0; - - // check time limit - if (timer) { - (*timer)--; - if (!(*timer) && timelimit) { - if ((clock() - *timelimit) > TIMELIMIT) return 0; - *timer = MAXPLUSTIMER; - } - } - - if (pAMgr) { - if (cpdsuggest==1) { - if (pAMgr->get_compound()) { - rv = pAMgr->compound_check(word, len, 0, 0, 100, 0, NULL, 0, 1, 0); //EXT - if (rv && (!(rv2 = pAMgr->lookup(word)) || !rv2->astr || - !(TESTAFF(rv2->astr,pAMgr->get_forbiddenword(),rv2->alen) || - TESTAFF(rv2->astr,pAMgr->get_nosuggest(),rv2->alen)))) return 3; // XXX obsolote categorisation + only ICONV needs affix flag check? - } - return 0; - } - - rv = pAMgr->lookup(word); - - if (rv) { - if ((rv->astr) && (TESTAFF(rv->astr,pAMgr->get_forbiddenword(),rv->alen) - || TESTAFF(rv->astr,pAMgr->get_nosuggest(),rv->alen))) return 0; - while (rv) { - if (rv->astr && (TESTAFF(rv->astr,pAMgr->get_needaffix(),rv->alen) || - TESTAFF(rv->astr, ONLYUPCASEFLAG, rv->alen) || - TESTAFF(rv->astr,pAMgr->get_onlyincompound(),rv->alen))) { - rv = rv->next_homonym; - } else break; - } - } else rv = pAMgr->prefix_check(word, len, 0); // only prefix, and prefix + suffix XXX - - if (rv) { - nosuffix=1; - } else { - rv = pAMgr->suffix_check(word, len, 0, NULL, NULL, 0, NULL); // only suffix - } - - if (!rv && pAMgr->have_contclass()) { - rv = pAMgr->suffix_check_twosfx(word, len, 0, NULL, FLAG_NULL); - if (!rv) rv = pAMgr->prefix_check_twosfx(word, len, 1, FLAG_NULL); - } - - // check forbidden words - if ((rv) && (rv->astr) && (TESTAFF(rv->astr,pAMgr->get_forbiddenword(),rv->alen) || - TESTAFF(rv->astr, ONLYUPCASEFLAG, rv->alen) || - TESTAFF(rv->astr,pAMgr->get_nosuggest(),rv->alen) || - TESTAFF(rv->astr,pAMgr->get_onlyincompound(),rv->alen))) return 0; - - if (rv) { // XXX obsolote - if ((pAMgr->get_compoundflag()) && - TESTAFF(rv->astr, pAMgr->get_compoundflag(), rv->alen)) return 2 + nosuffix; - return 1; - } - } - return 0; -} - -int SuggestMgr::check_forbidden(const char * word, int len) -{ - struct hentry * rv = NULL; - - if (pAMgr) { - rv = pAMgr->lookup(word); - if (rv && rv->astr && (TESTAFF(rv->astr,pAMgr->get_needaffix(),rv->alen) || - TESTAFF(rv->astr,pAMgr->get_onlyincompound(),rv->alen))) rv = NULL; - if (!(pAMgr->prefix_check(word,len,1))) - rv = pAMgr->suffix_check(word,len, 0, NULL, NULL, 0, NULL); // prefix+suffix, suffix - // check forbidden words - if ((rv) && (rv->astr) && TESTAFF(rv->astr,pAMgr->get_forbiddenword(),rv->alen)) return 1; - } - return 0; -} - -#ifdef HUNSPELL_EXPERIMENTAL -// suggest possible stems -int SuggestMgr::suggest_pos_stems(char*** slst, const char * w, int nsug) -{ - char ** wlst; - - struct hentry * rv = NULL; - - char w2[MAXSWUTF8L]; - const char * word = w; - - // word reversing wrapper for complex prefixes - if (complexprefixes) { - strcpy(w2, w); - if (utf8) reverseword_utf(w2); else reverseword(w2); - word = w2; - } - - int wl = strlen(word); - - - if (*slst) { - wlst = *slst; - } else { - wlst = (char **) calloc(maxSug, sizeof(char *)); - if (wlst == NULL) return -1; - } - - rv = pAMgr->suffix_check(word, wl, 0, NULL, wlst, maxSug, &nsug); - - // delete dash from end of word - if (nsug > 0) { - for (int j=0; j < nsug; j++) { - if (wlst[j][strlen(wlst[j]) - 1] == '-') wlst[j][strlen(wlst[j]) - 1] = '\0'; - } - } - - *slst = wlst; - return nsug; -} -#endif // END OF HUNSPELL_EXPERIMENTAL CODE - - -char * SuggestMgr::suggest_morph(const char * w) -{ - char result[MAXLNLEN]; - char * r = (char *) result; - char * st; - - struct hentry * rv = NULL; - - *result = '\0'; - - if (! pAMgr) return NULL; - - char w2[MAXSWUTF8L]; - const char * word = w; - - // word reversing wrapper for complex prefixes - if (complexprefixes) { - strcpy(w2, w); - if (utf8) reverseword_utf(w2); else reverseword(w2); - word = w2; - } - - rv = pAMgr->lookup(word); - - while (rv) { - if ((!rv->astr) || !(TESTAFF(rv->astr, pAMgr->get_forbiddenword(), rv->alen) || - TESTAFF(rv->astr, pAMgr->get_needaffix(), rv->alen) || - TESTAFF(rv->astr,pAMgr->get_onlyincompound(),rv->alen))) { - if (!HENTRY_FIND(rv, MORPH_STEM)) { - mystrcat(result, " ", MAXLNLEN); - mystrcat(result, MORPH_STEM, MAXLNLEN); - mystrcat(result, word, MAXLNLEN); - } - if (HENTRY_DATA(rv)) { - mystrcat(result, " ", MAXLNLEN); - mystrcat(result, HENTRY_DATA2(rv), MAXLNLEN); - } - mystrcat(result, "\n", MAXLNLEN); - } - rv = rv->next_homonym; - } - - st = pAMgr->affix_check_morph(word,strlen(word)); - if (st) { - mystrcat(result, st, MAXLNLEN); - free(st); - } - - if (pAMgr->get_compound() && (*result == '\0')) - pAMgr->compound_check_morph(word, strlen(word), - 0, 0, 100, 0,NULL, 0, &r, NULL); - - return (*result) ? mystrdup(line_uniq(result, MSEP_REC)) : NULL; -} - -#ifdef HUNSPELL_EXPERIMENTAL -char * SuggestMgr::suggest_morph_for_spelling_error(const char * word) -{ - char * p = NULL; - char ** wlst = (char **) calloc(maxSug, sizeof(char *)); - if (!**wlst) return NULL; - // we will use only the first suggestion - for (int i = 0; i < maxSug - 1; i++) wlst[i] = ""; - int ns = suggest(&wlst, word, maxSug - 1, NULL); - if (ns == maxSug) { - p = suggest_morph(wlst[maxSug - 1]); - free(wlst[maxSug - 1]); - } - if (wlst) free(wlst); - return p; -} -#endif // END OF HUNSPELL_EXPERIMENTAL CODE - -/* affixation */ -char * SuggestMgr::suggest_hentry_gen(hentry * rv, char * pattern) -{ - char result[MAXLNLEN]; - *result = '\0'; - int sfxcount = get_sfxcount(pattern); - - if (get_sfxcount(HENTRY_DATA(rv)) > sfxcount) return NULL; - - if (HENTRY_DATA(rv)) { - char * aff = pAMgr->morphgen(HENTRY_WORD(rv), rv->blen, rv->astr, rv->alen, - HENTRY_DATA(rv), pattern, 0); - if (aff) { - mystrcat(result, aff, MAXLNLEN); - mystrcat(result, "\n", MAXLNLEN); - free(aff); - } - } - - // check all allomorphs - char allomorph[MAXLNLEN]; - char * p = NULL; - if (HENTRY_DATA(rv)) p = (char *) strstr(HENTRY_DATA2(rv), MORPH_ALLOMORPH); - while (p) { - struct hentry * rv2 = NULL; - p += MORPH_TAG_LEN; - int plen = fieldlen(p); - strncpy(allomorph, p, plen); - allomorph[plen] = '\0'; - rv2 = pAMgr->lookup(allomorph); - while (rv2) { -// if (HENTRY_DATA(rv2) && get_sfxcount(HENTRY_DATA(rv2)) <= sfxcount) { - if (HENTRY_DATA(rv2)) { - char * st = (char *) strstr(HENTRY_DATA2(rv2), MORPH_STEM); - if (st && (strncmp(st + MORPH_TAG_LEN, - HENTRY_WORD(rv), fieldlen(st + MORPH_TAG_LEN)) == 0)) { - char * aff = pAMgr->morphgen(HENTRY_WORD(rv2), rv2->blen, rv2->astr, rv2->alen, - HENTRY_DATA(rv2), pattern, 0); - if (aff) { - mystrcat(result, aff, MAXLNLEN); - mystrcat(result, "\n", MAXLNLEN); - free(aff); - } - } - } - rv2 = rv2->next_homonym; - } - p = strstr(p + plen, MORPH_ALLOMORPH); - } - - return (*result) ? mystrdup(result) : NULL; -} - -char * SuggestMgr::suggest_gen(char ** desc, int n, char * pattern) { - char result[MAXLNLEN]; - char result2[MAXLNLEN]; - char newpattern[MAXLNLEN]; - *newpattern = '\0'; - if (n == 0) return 0; - *result2 = '\0'; - struct hentry * rv = NULL; - if (!pAMgr) return NULL; - -// search affixed forms with and without derivational suffixes - while(1) { - - for (int k = 0; k < n; k++) { - *result = '\0'; - // add compound word parts (except the last one) - char * s = (char *) desc[k]; - char * part = strstr(s, MORPH_PART); - if (part) { - char * nextpart = strstr(part + 1, MORPH_PART); - while (nextpart) { - copy_field(result + strlen(result), part, MORPH_PART); - part = nextpart; - nextpart = strstr(part + 1, MORPH_PART); - } - s = part; - } - - char **pl; - char tok[MAXLNLEN]; - strcpy(tok, s); - char * alt = strstr(tok, " | "); - while (alt) { - alt[1] = MSEP_ALT; - alt = strstr(alt, " | "); - } - int pln = line_tok(tok, &pl, MSEP_ALT); - for (int i = 0; i < pln; i++) { - // remove inflectional and terminal suffixes - char * is = strstr(pl[i], MORPH_INFL_SFX); - if (is) *is = '\0'; - char * ts = strstr(pl[i], MORPH_TERM_SFX); - while (ts) { - *ts = '_'; - ts = strstr(pl[i], MORPH_TERM_SFX); - } - char * st = strstr(s, MORPH_STEM); - if (st) { - copy_field(tok, st, MORPH_STEM); - rv = pAMgr->lookup(tok); - while (rv) { - char newpat[MAXLNLEN]; - strcpy(newpat, pl[i]); - strcat(newpat, pattern); - char * sg = suggest_hentry_gen(rv, newpat); - if (!sg) sg = suggest_hentry_gen(rv, pattern); - if (sg) { - char ** gen; - int genl = line_tok(sg, &gen, MSEP_REC); - free(sg); - sg = NULL; - for (int j = 0; j < genl; j++) { - if (strstr(pl[i], MORPH_SURF_PFX)) { - int r2l = strlen(result2); - result2[r2l] = MSEP_REC; - strcpy(result2 + r2l + 1, result); - copy_field(result2 + strlen(result2), pl[i], MORPH_SURF_PFX); - mystrcat(result2, gen[j], MAXLNLEN); - } else { - sprintf(result2 + strlen(result2), "%c%s%s", - MSEP_REC, result, gen[j]); - } - } - freelist(&gen, genl); - } - rv = rv->next_homonym; - } - } - } - freelist(&pl, pln); - } - - if (*result2 || !strstr(pattern, MORPH_DERI_SFX)) break; - strcpy(newpattern, pattern); - pattern = newpattern; - char * ds = strstr(pattern, MORPH_DERI_SFX); - while (ds) { - strncpy(ds, MORPH_TERM_SFX, MORPH_TAG_LEN); - ds = strstr(pattern, MORPH_DERI_SFX); - } - } - return (*result2 ? mystrdup(result2) : NULL); -} - - -// generate an n-gram score comparing s1 and s2 -int SuggestMgr::ngram(int n, char * s1, const char * s2, int opt) -{ - int nscore = 0; - int ns; - int l1; - int l2; - int test = 0; - - if (utf8) { - w_char su1[MAXSWL]; - w_char su2[MAXSWL]; - l1 = u8_u16(su1, MAXSWL, s1); - l2 = u8_u16(su2, MAXSWL, s2); - if ((l2 <= 0) || (l1 == -1)) return 0; - // lowering dictionary word - if (opt & NGRAM_LOWERING) mkallsmall_utf(su2, l2, langnum); - for (int j = 1; j <= n; j++) { - ns = 0; - for (int i = 0; i <= (l1-j); i++) { - int k = 0; - for (int l = 0; l <= (l2-j); l++) { - for (k = 0; k < j; k++) { - w_char * c1 = su1 + i + k; - w_char * c2 = su2 + l + k; - if ((c1->l != c2->l) || (c1->h != c2->h)) break; - } - if (k == j) { - ns++; - break; - } - } - if (k != j && opt & NGRAM_WEIGHTED) { - ns--; - test++; - if (i == 0 || i == l1-j) ns--; // side weight - } - } - nscore = nscore + ns; - if (ns < 2 && !(opt & NGRAM_WEIGHTED)) break; - } - } else { - l2 = strlen(s2); - if (l2 == 0) return 0; - l1 = strlen(s1); - char *t = mystrdup(s2); - if (opt & NGRAM_LOWERING) mkallsmall(t, csconv); - for (int j = 1; j <= n; j++) { - ns = 0; - for (int i = 0; i <= (l1-j); i++) { - char c = *(s1 + i + j); - *(s1 + i + j) = '\0'; - if (strstr(t,(s1+i))) { - ns++; - } else if (opt & NGRAM_WEIGHTED) { - ns--; -test++; - if (i == 0 || i == l1-j) ns--; // side weight - } - *(s1 + i + j ) = c; - } - nscore = nscore + ns; - if (ns < 2 && !(opt & NGRAM_WEIGHTED)) break; - } - free(t); - } - - ns = 0; - if (opt & NGRAM_LONGER_WORSE) ns = (l2-l1)-2; - if (opt & NGRAM_ANY_MISMATCH) ns = abs(l2-l1)-2; - ns = (nscore - ((ns > 0) ? ns : 0)); - return ns; -} - -// length of the left common substring of s1 and (decapitalised) s2 -int SuggestMgr::leftcommonsubstring(char * s1, const char * s2) { - if (utf8) { - w_char su1[MAXSWL]; - w_char su2[MAXSWL]; - su1[0].l = su2[0].l = su1[0].h = su2[0].h = 0; - // decapitalize dictionary word - if (complexprefixes) { - int l1 = u8_u16(su1, MAXSWL, s1); - int l2 = u8_u16(su2, MAXSWL, s2); - if (*((short *)su1+l1-1) == *((short *)su2+l2-1)) return 1; - } else { - int i; - u8_u16(su1, 1, s1); - u8_u16(su2, 1, s2); - unsigned short idx = (su2->h << 8) + su2->l; - unsigned short otheridx = (su1->h << 8) + su1->l; - if (otheridx != idx && - (otheridx != unicodetolower(idx, langnum))) return 0; - int l1 = u8_u16(su1, MAXSWL, s1); - int l2 = u8_u16(su2, MAXSWL, s2); - for(i = 1; (i < l1) && (i < l2) && - (su1[i].l == su2[i].l) && (su1[i].h == su2[i].h); i++); - return i; - } - } else { - if (complexprefixes) { - int l1 = strlen(s1); - int l2 = strlen(s2); - if (*(s2+l1-1) == *(s2+l2-1)) return 1; - } else { - char * olds = s1; - // decapitalise dictionary word - if ((*s1 != *s2) && (*s1 != csconv[((unsigned char)*s2)].clower)) return 0; - do { - s1++; s2++; - } while ((*s1 == *s2) && (*s1 != '\0')); - return (int)(s1 - olds); - } - } - return 0; -} - -int SuggestMgr::commoncharacterpositions(char * s1, const char * s2, int * is_swap) { - int num = 0; - int diff = 0; - int diffpos[2]; - *is_swap = 0; - if (utf8) { - w_char su1[MAXSWL]; - w_char su2[MAXSWL]; - int l1 = u8_u16(su1, MAXSWL, s1); - int l2 = u8_u16(su2, MAXSWL, s2); - // decapitalize dictionary word - if (complexprefixes) { - mkallsmall_utf(su2+l2-1, 1, langnum); - } else { - mkallsmall_utf(su2, 1, langnum); - } - for (int i = 0; (i < l1) && (i < l2); i++) { - if (((short *) su1)[i] == ((short *) su2)[i]) { - num++; - } else { - if (diff < 2) diffpos[diff] = i; - diff++; - } - } - if ((diff == 2) && (l1 == l2) && - (((short *) su1)[diffpos[0]] == ((short *) su2)[diffpos[1]]) && - (((short *) su1)[diffpos[1]] == ((short *) su2)[diffpos[0]])) *is_swap = 1; - } else { - int i; - char t[MAXSWUTF8L]; - strcpy(t, s2); - // decapitalize dictionary word - if (complexprefixes) { - int l2 = strlen(t); - *(t+l2-1) = csconv[((unsigned char)*(t+l2-1))].clower; - } else { - mkallsmall(t, csconv); - } - for (i = 0; (*(s1+i) != 0) && (*(t+i) != 0); i++) { - if (*(s1+i) == *(t+i)) { - num++; - } else { - if (diff < 2) diffpos[diff] = i; - diff++; - } - } - if ((diff == 2) && (*(s1+i) == 0) && (*(t+i) == 0) && - (*(s1+diffpos[0]) == *(t+diffpos[1])) && - (*(s1+diffpos[1]) == *(t+diffpos[0]))) *is_swap = 1; - } - return num; -} - -int SuggestMgr::mystrlen(const char * word) { - if (utf8) { - w_char w[MAXSWL]; - return u8_u16(w, MAXSWL, word); - } else return strlen(word); -} - -// sort in decreasing order of score -void SuggestMgr::bubblesort(char** rword, char** rword2, int* rsc, int n ) -{ - int m = 1; - while (m < n) { - int j = m; - while (j > 0) { - if (rsc[j-1] < rsc[j]) { - int sctmp = rsc[j-1]; - char * wdtmp = rword[j-1]; - rsc[j-1] = rsc[j]; - rword[j-1] = rword[j]; - rsc[j] = sctmp; - rword[j] = wdtmp; - if (rword2) { - wdtmp = rword2[j-1]; - rword2[j-1] = rword2[j]; - rword2[j] = wdtmp; - } - j--; - } else break; - } - m++; - } - return; -} - -// longest common subsequence -void SuggestMgr::lcs(const char * s, const char * s2, int * l1, int * l2, char ** result) { - int n, m; - w_char su[MAXSWL]; - w_char su2[MAXSWL]; - char * b; - char * c; - int i; - int j; - if (utf8) { - m = u8_u16(su, MAXSWL, s); - n = u8_u16(su2, MAXSWL, s2); - } else { - m = strlen(s); - n = strlen(s2); - } - c = (char *) malloc((m + 1) * (n + 1)); - b = (char *) malloc((m + 1) * (n + 1)); - if (!c || !b) { - if (c) free(c); - if (b) free(b); - *result = NULL; - return; - } - for (i = 1; i <= m; i++) c[i*(n+1)] = 0; - for (j = 0; j <= n; j++) c[j] = 0; - for (i = 1; i <= m; i++) { - for (j = 1; j <= n; j++) { - if ( ((utf8) && (*((short *) su+i-1) == *((short *)su2+j-1))) - || ((!utf8) && ((*(s+i-1)) == (*(s2+j-1))))) { - c[i*(n+1) + j] = c[(i-1)*(n+1) + j-1]+1; - b[i*(n+1) + j] = LCS_UPLEFT; - } else if (c[(i-1)*(n+1) + j] >= c[i*(n+1) + j-1]) { - c[i*(n+1) + j] = c[(i-1)*(n+1) + j]; - b[i*(n+1) + j] = LCS_UP; - } else { - c[i*(n+1) + j] = c[i*(n+1) + j-1]; - b[i*(n+1) + j] = LCS_LEFT; - } - } - } - *result = b; - free(c); - *l1 = m; - *l2 = n; -} - -int SuggestMgr::lcslen(const char * s, const char* s2) { - int m; - int n; - int i; - int j; - char * result; - int len = 0; - lcs(s, s2, &m, &n, &result); - if (!result) return 0; - i = m; - j = n; - while ((i != 0) && (j != 0)) { - if (result[i*(n+1) + j] == LCS_UPLEFT) { - len++; - i--; - j--; - } else if (result[i*(n+1) + j] == LCS_UP) { - i--; - } else j--; - } - free(result); - return len; -} diff --git a/plugins/SpellChecker/hunspell/suggestmgr.hxx b/plugins/SpellChecker/hunspell/suggestmgr.hxx deleted file mode 100644 index 5f043fdfd2..0000000000 --- a/plugins/SpellChecker/hunspell/suggestmgr.hxx +++ /dev/null @@ -1,111 +0,0 @@ -#ifndef _SUGGESTMGR_HXX_ -#define _SUGGESTMGR_HXX_ - -#define MAXSWL 100 -#define MAXSWUTF8L (MAXSWL * 4) -#define MAX_ROOTS 100 -#define MAX_WORDS 100 -#define MAX_GUESS 200 -#define MAXNGRAMSUGS 4 -#define MAXPHONSUGS 2 -#define MAXCOMPOUNDSUGS 3 - -// timelimit: max ~1/4 sec (process time on Linux) for a time consuming function -#define TIMELIMIT (CLOCKS_PER_SEC >> 2) -#define MINTIMER 100 -#define MAXPLUSTIMER 100 - -#define NGRAM_LONGER_WORSE (1 << 0) -#define NGRAM_ANY_MISMATCH (1 << 1) -#define NGRAM_LOWERING (1 << 2) -#define NGRAM_WEIGHTED (1 << 3) - -#include "hunvisapi.h" - -#include "atypes.hxx" -#include "affixmgr.hxx" -#include "hashmgr.hxx" -#include "langnum.hxx" -#include - -enum { LCS_UP, LCS_LEFT, LCS_UPLEFT }; - -class LIBHUNSPELL_DLL_EXPORTED SuggestMgr -{ - char * ckey; - int ckeyl; - w_char * ckey_utf; - - char * ctry; - int ctryl; - w_char * ctry_utf; - - AffixMgr* pAMgr; - int maxSug; - struct cs_info * csconv; - int utf8; - int langnum; - int nosplitsugs; - int maxngramsugs; - int maxcpdsugs; - int complexprefixes; - - -public: - SuggestMgr(const char * tryme, int maxn, AffixMgr *aptr); - ~SuggestMgr(); - - int suggest(char*** slst, const char * word, int nsug, int * onlycmpdsug); - int ngsuggest(char ** wlst, char * word, int ns, HashMgr** pHMgr, int md); - int suggest_auto(char*** slst, const char * word, int nsug); - int suggest_stems(char*** slst, const char * word, int nsug); - int suggest_pos_stems(char*** slst, const char * word, int nsug); - - char * suggest_morph(const char * word); - char * suggest_gen(char ** pl, int pln, char * pattern); - char * suggest_morph_for_spelling_error(const char * word); - -private: - int testsug(char** wlst, const char * candidate, int wl, int ns, int cpdsuggest, - int * timer, clock_t * timelimit); - int checkword(const char *, int, int, int *, clock_t *); - int check_forbidden(const char *, int); - - int capchars(char **, const char *, int, int); - int replchars(char**, const char *, int, int); - int doubletwochars(char**, const char *, int, int); - int forgotchar(char **, const char *, int, int); - int swapchar(char **, const char *, int, int); - int longswapchar(char **, const char *, int, int); - int movechar(char **, const char *, int, int); - int extrachar(char **, const char *, int, int); - int badcharkey(char **, const char *, int, int); - int badchar(char **, const char *, int, int); - int twowords(char **, const char *, int, int); - int fixstems(char **, const char *, int); - - int capchars_utf(char **, const w_char *, int wl, int, int); - int doubletwochars_utf(char**, const w_char *, int wl, int, int); - int forgotchar_utf(char**, const w_char *, int wl, int, int); - int extrachar_utf(char**, const w_char *, int wl, int, int); - int badcharkey_utf(char **, const w_char *, int wl, int, int); - int badchar_utf(char **, const w_char *, int wl, int, int); - int swapchar_utf(char **, const w_char *, int wl, int, int); - int longswapchar_utf(char **, const w_char *, int, int, int); - int movechar_utf(char **, const w_char *, int, int, int); - - int mapchars(char**, const char *, int, int); - int map_related(const char *, char *, int, int, char ** wlst, int, int, const mapentry*, int, int *, clock_t *); - int ngram(int n, char * s1, const char * s2, int opt); - int mystrlen(const char * word); - int leftcommonsubstring(char * s1, const char * s2); - int commoncharacterpositions(char * s1, const char * s2, int * is_swap); - void bubblesort( char ** rwd, char ** rwd2, int * rsc, int n); - void lcs(const char * s, const char * s2, int * l1, int * l2, char ** result); - int lcslen(const char * s, const char* s2); - char * suggest_hentry_gen(hentry * rv, char * pattern); - -}; - -#endif - diff --git a/plugins/SpellChecker/hunspell/utf_info.cxx b/plugins/SpellChecker/hunspell/utf_info.cxx deleted file mode 100644 index 4a8e203cfa..0000000000 --- a/plugins/SpellChecker/hunspell/utf_info.cxx +++ /dev/null @@ -1,19676 +0,0 @@ -#include "csutil.hxx" -/* fields: Unicode letter, toupper, tolower */ -static struct unicode_info utf_lst[] = { -{ 0x0041, 0x0041, 0x0061 }, -{ 0x0042, 0x0042, 0x0062 }, -{ 0x0043, 0x0043, 0x0063 }, -{ 0x0044, 0x0044, 0x0064 }, -{ 0x0045, 0x0045, 0x0065 }, -{ 0x0046, 0x0046, 0x0066 }, -{ 0x0047, 0x0047, 0x0067 }, -{ 0x0048, 0x0048, 0x0068 }, -{ 0x0049, 0x0049, 0x0069 }, -{ 0x004A, 0x004A, 0x006A }, -{ 0x004B, 0x004B, 0x006B }, -{ 0x004C, 0x004C, 0x006C }, -{ 0x004D, 0x004D, 0x006D }, -{ 0x004E, 0x004E, 0x006E }, -{ 0x004F, 0x004F, 0x006F }, -{ 0x0050, 0x0050, 0x0070 }, -{ 0x0051, 0x0051, 0x0071 }, -{ 0x0052, 0x0052, 0x0072 }, -{ 0x0053, 0x0053, 0x0073 }, -{ 0x0054, 0x0054, 0x0074 }, -{ 0x0055, 0x0055, 0x0075 }, -{ 0x0056, 0x0056, 0x0076 }, -{ 0x0057, 0x0057, 0x0077 }, -{ 0x0058, 0x0058, 0x0078 }, -{ 0x0059, 0x0059, 0x0079 }, -{ 0x005A, 0x005A, 0x007A }, -{ 0x0061, 0x0041, 0x0061 }, -{ 0x0062, 0x0042, 0x0062 }, -{ 0x0063, 0x0043, 0x0063 }, -{ 0x0064, 0x0044, 0x0064 }, -{ 0x0065, 0x0045, 0x0065 }, -{ 0x0066, 0x0046, 0x0066 }, -{ 0x0067, 0x0047, 0x0067 }, -{ 0x0068, 0x0048, 0x0068 }, -{ 0x0069, 0x0049, 0x0069 }, -{ 0x006A, 0x004A, 0x006A }, -{ 0x006B, 0x004B, 0x006B }, -{ 0x006C, 0x004C, 0x006C }, -{ 0x006D, 0x004D, 0x006D }, -{ 0x006E, 0x004E, 0x006E }, -{ 0x006F, 0x004F, 0x006F }, -{ 0x0070, 0x0050, 0x0070 }, -{ 0x0071, 0x0051, 0x0071 }, -{ 0x0072, 0x0052, 0x0072 }, -{ 0x0073, 0x0053, 0x0073 }, -{ 0x0074, 0x0054, 0x0074 }, -{ 0x0075, 0x0055, 0x0075 }, -{ 0x0076, 0x0056, 0x0076 }, -{ 0x0077, 0x0057, 0x0077 }, -{ 0x0078, 0x0058, 0x0078 }, -{ 0x0079, 0x0059, 0x0079 }, -{ 0x007A, 0x005A, 0x007A }, -{ 0x00AA, 0x00AA, 0x00AA }, -{ 0x00B5, 0x039C, 0x00B5 }, -{ 0x00BA, 0x00BA, 0x00BA }, -{ 0x00C0, 0x00C0, 0x00E0 }, -{ 0x00C1, 0x00C1, 0x00E1 }, -{ 0x00C2, 0x00C2, 0x00E2 }, -{ 0x00C3, 0x00C3, 0x00E3 }, -{ 0x00C4, 0x00C4, 0x00E4 }, -{ 0x00C5, 0x00C5, 0x00E5 }, -{ 0x00C6, 0x00C6, 0x00E6 }, -{ 0x00C7, 0x00C7, 0x00E7 }, -{ 0x00C8, 0x00C8, 0x00E8 }, -{ 0x00C9, 0x00C9, 0x00E9 }, -{ 0x00CA, 0x00CA, 0x00EA }, -{ 0x00CB, 0x00CB, 0x00EB }, -{ 0x00CC, 0x00CC, 0x00EC }, -{ 0x00CD, 0x00CD, 0x00ED }, -{ 0x00CE, 0x00CE, 0x00EE }, -{ 0x00CF, 0x00CF, 0x00EF }, -{ 0x00D0, 0x00D0, 0x00F0 }, -{ 0x00D1, 0x00D1, 0x00F1 }, -{ 0x00D2, 0x00D2, 0x00F2 }, -{ 0x00D3, 0x00D3, 0x00F3 }, -{ 0x00D4, 0x00D4, 0x00F4 }, -{ 0x00D5, 0x00D5, 0x00F5 }, -{ 0x00D6, 0x00D6, 0x00F6 }, -{ 0x00D8, 0x00D8, 0x00F8 }, -{ 0x00D9, 0x00D9, 0x00F9 }, -{ 0x00DA, 0x00DA, 0x00FA }, -{ 0x00DB, 0x00DB, 0x00FB }, -{ 0x00DC, 0x00DC, 0x00FC }, -{ 0x00DD, 0x00DD, 0x00FD }, -{ 0x00DE, 0x00DE, 0x00FE }, -{ 0x00DF, 0x00DF, 0x00DF }, -{ 0x00E0, 0x00C0, 0x00E0 }, -{ 0x00E1, 0x00C1, 0x00E1 }, -{ 0x00E2, 0x00C2, 0x00E2 }, -{ 0x00E3, 0x00C3, 0x00E3 }, -{ 0x00E4, 0x00C4, 0x00E4 }, -{ 0x00E5, 0x00C5, 0x00E5 }, -{ 0x00E6, 0x00C6, 0x00E6 }, -{ 0x00E7, 0x00C7, 0x00E7 }, -{ 0x00E8, 0x00C8, 0x00E8 }, -{ 0x00E9, 0x00C9, 0x00E9 }, -{ 0x00EA, 0x00CA, 0x00EA }, -{ 0x00EB, 0x00CB, 0x00EB }, -{ 0x00EC, 0x00CC, 0x00EC }, -{ 0x00ED, 0x00CD, 0x00ED }, -{ 0x00EE, 0x00CE, 0x00EE }, -{ 0x00EF, 0x00CF, 0x00EF }, -{ 0x00F0, 0x00D0, 0x00F0 }, -{ 0x00F1, 0x00D1, 0x00F1 }, -{ 0x00F2, 0x00D2, 0x00F2 }, -{ 0x00F3, 0x00D3, 0x00F3 }, -{ 0x00F4, 0x00D4, 0x00F4 }, -{ 0x00F5, 0x00D5, 0x00F5 }, -{ 0x00F6, 0x00D6, 0x00F6 }, -{ 0x00F8, 0x00D8, 0x00F8 }, -{ 0x00F9, 0x00D9, 0x00F9 }, -{ 0x00FA, 0x00DA, 0x00FA }, -{ 0x00FB, 0x00DB, 0x00FB }, -{ 0x00FC, 0x00DC, 0x00FC }, -{ 0x00FD, 0x00DD, 0x00FD }, -{ 0x00FE, 0x00DE, 0x00FE }, -{ 0x00FF, 0x0178, 0x00FF }, -{ 0x0100, 0x0100, 0x0101 }, -{ 0x0101, 0x0100, 0x0101 }, -{ 0x0102, 0x0102, 0x0103 }, -{ 0x0103, 0x0102, 0x0103 }, -{ 0x0104, 0x0104, 0x0105 }, -{ 0x0105, 0x0104, 0x0105 }, -{ 0x0106, 0x0106, 0x0107 }, -{ 0x0107, 0x0106, 0x0107 }, -{ 0x0108, 0x0108, 0x0109 }, -{ 0x0109, 0x0108, 0x0109 }, -{ 0x010A, 0x010A, 0x010B }, -{ 0x010B, 0x010A, 0x010B }, -{ 0x010C, 0x010C, 0x010D }, -{ 0x010D, 0x010C, 0x010D }, -{ 0x010E, 0x010E, 0x010F }, -{ 0x010F, 0x010E, 0x010F }, -{ 0x0110, 0x0110, 0x0111 }, -{ 0x0111, 0x0110, 0x0111 }, -{ 0x0112, 0x0112, 0x0113 }, -{ 0x0113, 0x0112, 0x0113 }, -{ 0x0114, 0x0114, 0x0115 }, -{ 0x0115, 0x0114, 0x0115 }, -{ 0x0116, 0x0116, 0x0117 }, -{ 0x0117, 0x0116, 0x0117 }, -{ 0x0118, 0x0118, 0x0119 }, -{ 0x0119, 0x0118, 0x0119 }, -{ 0x011A, 0x011A, 0x011B }, -{ 0x011B, 0x011A, 0x011B }, -{ 0x011C, 0x011C, 0x011D }, -{ 0x011D, 0x011C, 0x011D }, -{ 0x011E, 0x011E, 0x011F }, -{ 0x011F, 0x011E, 0x011F }, -{ 0x0120, 0x0120, 0x0121 }, -{ 0x0121, 0x0120, 0x0121 }, -{ 0x0122, 0x0122, 0x0123 }, -{ 0x0123, 0x0122, 0x0123 }, -{ 0x0124, 0x0124, 0x0125 }, -{ 0x0125, 0x0124, 0x0125 }, -{ 0x0126, 0x0126, 0x0127 }, -{ 0x0127, 0x0126, 0x0127 }, -{ 0x0128, 0x0128, 0x0129 }, -{ 0x0129, 0x0128, 0x0129 }, -{ 0x012A, 0x012A, 0x012B }, -{ 0x012B, 0x012A, 0x012B }, -{ 0x012C, 0x012C, 0x012D }, -{ 0x012D, 0x012C, 0x012D }, -{ 0x012E, 0x012E, 0x012F }, -{ 0x012F, 0x012E, 0x012F }, -{ 0x0130, 0x0130, 0x0069 }, -{ 0x0131, 0x0049, 0x0131 }, -{ 0x0132, 0x0132, 0x0133 }, -{ 0x0133, 0x0132, 0x0133 }, -{ 0x0134, 0x0134, 0x0135 }, -{ 0x0135, 0x0134, 0x0135 }, -{ 0x0136, 0x0136, 0x0137 }, -{ 0x0137, 0x0136, 0x0137 }, -{ 0x0138, 0x0138, 0x0138 }, -{ 0x0139, 0x0139, 0x013A }, -{ 0x013A, 0x0139, 0x013A }, -{ 0x013B, 0x013B, 0x013C }, -{ 0x013C, 0x013B, 0x013C }, -{ 0x013D, 0x013D, 0x013E }, -{ 0x013E, 0x013D, 0x013E }, -{ 0x013F, 0x013F, 0x0140 }, -{ 0x0140, 0x013F, 0x0140 }, -{ 0x0141, 0x0141, 0x0142 }, -{ 0x0142, 0x0141, 0x0142 }, -{ 0x0143, 0x0143, 0x0144 }, -{ 0x0144, 0x0143, 0x0144 }, -{ 0x0145, 0x0145, 0x0146 }, -{ 0x0146, 0x0145, 0x0146 }, -{ 0x0147, 0x0147, 0x0148 }, -{ 0x0148, 0x0147, 0x0148 }, -{ 0x0149, 0x0149, 0x0149 }, -{ 0x014A, 0x014A, 0x014B }, -{ 0x014B, 0x014A, 0x014B }, -{ 0x014C, 0x014C, 0x014D }, -{ 0x014D, 0x014C, 0x014D }, -{ 0x014E, 0x014E, 0x014F }, -{ 0x014F, 0x014E, 0x014F }, -{ 0x0150, 0x0150, 0x0151 }, -{ 0x0151, 0x0150, 0x0151 }, -{ 0x0152, 0x0152, 0x0153 }, -{ 0x0153, 0x0152, 0x0153 }, -{ 0x0154, 0x0154, 0x0155 }, -{ 0x0155, 0x0154, 0x0155 }, -{ 0x0156, 0x0156, 0x0157 }, -{ 0x0157, 0x0156, 0x0157 }, -{ 0x0158, 0x0158, 0x0159 }, -{ 0x0159, 0x0158, 0x0159 }, -{ 0x015A, 0x015A, 0x015B }, -{ 0x015B, 0x015A, 0x015B }, -{ 0x015C, 0x015C, 0x015D }, -{ 0x015D, 0x015C, 0x015D }, -{ 0x015E, 0x015E, 0x015F }, -{ 0x015F, 0x015E, 0x015F }, -{ 0x0160, 0x0160, 0x0161 }, -{ 0x0161, 0x0160, 0x0161 }, -{ 0x0162, 0x0162, 0x0163 }, -{ 0x0163, 0x0162, 0x0163 }, -{ 0x0164, 0x0164, 0x0165 }, -{ 0x0165, 0x0164, 0x0165 }, -{ 0x0166, 0x0166, 0x0167 }, -{ 0x0167, 0x0166, 0x0167 }, -{ 0x0168, 0x0168, 0x0169 }, -{ 0x0169, 0x0168, 0x0169 }, -{ 0x016A, 0x016A, 0x016B }, -{ 0x016B, 0x016A, 0x016B }, -{ 0x016C, 0x016C, 0x016D }, -{ 0x016D, 0x016C, 0x016D }, -{ 0x016E, 0x016E, 0x016F }, -{ 0x016F, 0x016E, 0x016F }, -{ 0x0170, 0x0170, 0x0171 }, -{ 0x0171, 0x0170, 0x0171 }, -{ 0x0172, 0x0172, 0x0173 }, -{ 0x0173, 0x0172, 0x0173 }, -{ 0x0174, 0x0174, 0x0175 }, -{ 0x0175, 0x0174, 0x0175 }, -{ 0x0176, 0x0176, 0x0177 }, -{ 0x0177, 0x0176, 0x0177 }, -{ 0x0178, 0x0178, 0x00FF }, -{ 0x0179, 0x0179, 0x017A }, -{ 0x017A, 0x0179, 0x017A }, -{ 0x017B, 0x017B, 0x017C }, -{ 0x017C, 0x017B, 0x017C }, -{ 0x017D, 0x017D, 0x017E }, -{ 0x017E, 0x017D, 0x017E }, -{ 0x017F, 0x0053, 0x017F }, -{ 0x0180, 0x0180, 0x0180 }, -{ 0x0181, 0x0181, 0x0253 }, -{ 0x0182, 0x0182, 0x0183 }, -{ 0x0183, 0x0182, 0x0183 }, -{ 0x0184, 0x0184, 0x0185 }, -{ 0x0185, 0x0184, 0x0185 }, -{ 0x0186, 0x0186, 0x0254 }, -{ 0x0187, 0x0187, 0x0188 }, -{ 0x0188, 0x0187, 0x0188 }, -{ 0x0189, 0x0189, 0x0256 }, -{ 0x018A, 0x018A, 0x0257 }, -{ 0x018B, 0x018B, 0x018C }, -{ 0x018C, 0x018B, 0x018C }, -{ 0x018D, 0x018D, 0x018D }, -{ 0x018E, 0x018E, 0x01DD }, -{ 0x018F, 0x018F, 0x0259 }, -{ 0x0190, 0x0190, 0x025B }, -{ 0x0191, 0x0191, 0x0192 }, -{ 0x0192, 0x0191, 0x0192 }, -{ 0x0193, 0x0193, 0x0260 }, -{ 0x0194, 0x0194, 0x0263 }, -{ 0x0195, 0x01F6, 0x0195 }, -{ 0x0196, 0x0196, 0x0269 }, -{ 0x0197, 0x0197, 0x0268 }, -{ 0x0198, 0x0198, 0x0199 }, -{ 0x0199, 0x0198, 0x0199 }, -{ 0x019A, 0x023D, 0x019A }, -{ 0x019B, 0x019B, 0x019B }, -{ 0x019C, 0x019C, 0x026F }, -{ 0x019D, 0x019D, 0x0272 }, -{ 0x019E, 0x0220, 0x019E }, -{ 0x019F, 0x019F, 0x0275 }, -{ 0x01A0, 0x01A0, 0x01A1 }, -{ 0x01A1, 0x01A0, 0x01A1 }, -{ 0x01A2, 0x01A2, 0x01A3 }, -{ 0x01A3, 0x01A2, 0x01A3 }, -{ 0x01A4, 0x01A4, 0x01A5 }, -{ 0x01A5, 0x01A4, 0x01A5 }, -{ 0x01A6, 0x01A6, 0x0280 }, -{ 0x01A7, 0x01A7, 0x01A8 }, -{ 0x01A8, 0x01A7, 0x01A8 }, -{ 0x01A9, 0x01A9, 0x0283 }, -{ 0x01AA, 0x01AA, 0x01AA }, -{ 0x01AB, 0x01AB, 0x01AB }, -{ 0x01AC, 0x01AC, 0x01AD }, -{ 0x01AD, 0x01AC, 0x01AD }, -{ 0x01AE, 0x01AE, 0x0288 }, -{ 0x01AF, 0x01AF, 0x01B0 }, -{ 0x01B0, 0x01AF, 0x01B0 }, -{ 0x01B1, 0x01B1, 0x028A }, -{ 0x01B2, 0x01B2, 0x028B }, -{ 0x01B3, 0x01B3, 0x01B4 }, -{ 0x01B4, 0x01B3, 0x01B4 }, -{ 0x01B5, 0x01B5, 0x01B6 }, -{ 0x01B6, 0x01B5, 0x01B6 }, -{ 0x01B7, 0x01B7, 0x0292 }, -{ 0x01B8, 0x01B8, 0x01B9 }, -{ 0x01B9, 0x01B8, 0x01B9 }, -{ 0x01BA, 0x01BA, 0x01BA }, -{ 0x01BB, 0x01BB, 0x01BB }, -{ 0x01BC, 0x01BC, 0x01BD }, -{ 0x01BD, 0x01BC, 0x01BD }, -{ 0x01BE, 0x01BE, 0x01BE }, -{ 0x01BF, 0x01F7, 0x01BF }, -{ 0x01C0, 0x01C0, 0x01C0 }, -{ 0x01C1, 0x01C1, 0x01C1 }, -{ 0x01C2, 0x01C2, 0x01C2 }, -{ 0x01C3, 0x01C3, 0x01C3 }, -{ 0x01C4, 0x01C4, 0x01C6 }, -{ 0x01C5, 0x01C4, 0x01C6 }, -{ 0x01C6, 0x01C4, 0x01C6 }, -{ 0x01C7, 0x01C7, 0x01C9 }, -{ 0x01C8, 0x01C7, 0x01C9 }, -{ 0x01C9, 0x01C7, 0x01C9 }, -{ 0x01CA, 0x01CA, 0x01CC }, -{ 0x01CB, 0x01CA, 0x01CC }, -{ 0x01CC, 0x01CA, 0x01CC }, -{ 0x01CD, 0x01CD, 0x01CE }, -{ 0x01CE, 0x01CD, 0x01CE }, -{ 0x01CF, 0x01CF, 0x01D0 }, -{ 0x01D0, 0x01CF, 0x01D0 }, -{ 0x01D1, 0x01D1, 0x01D2 }, -{ 0x01D2, 0x01D1, 0x01D2 }, -{ 0x01D3, 0x01D3, 0x01D4 }, -{ 0x01D4, 0x01D3, 0x01D4 }, -{ 0x01D5, 0x01D5, 0x01D6 }, -{ 0x01D6, 0x01D5, 0x01D6 }, -{ 0x01D7, 0x01D7, 0x01D8 }, -{ 0x01D8, 0x01D7, 0x01D8 }, -{ 0x01D9, 0x01D9, 0x01DA }, -{ 0x01DA, 0x01D9, 0x01DA }, -{ 0x01DB, 0x01DB, 0x01DC }, -{ 0x01DC, 0x01DB, 0x01DC }, -{ 0x01DD, 0x018E, 0x01DD }, -{ 0x01DE, 0x01DE, 0x01DF }, -{ 0x01DF, 0x01DE, 0x01DF }, -{ 0x01E0, 0x01E0, 0x01E1 }, -{ 0x01E1, 0x01E0, 0x01E1 }, -{ 0x01E2, 0x01E2, 0x01E3 }, -{ 0x01E3, 0x01E2, 0x01E3 }, -{ 0x01E4, 0x01E4, 0x01E5 }, -{ 0x01E5, 0x01E4, 0x01E5 }, -{ 0x01E6, 0x01E6, 0x01E7 }, -{ 0x01E7, 0x01E6, 0x01E7 }, -{ 0x01E8, 0x01E8, 0x01E9 }, -{ 0x01E9, 0x01E8, 0x01E9 }, -{ 0x01EA, 0x01EA, 0x01EB }, -{ 0x01EB, 0x01EA, 0x01EB }, -{ 0x01EC, 0x01EC, 0x01ED }, -{ 0x01ED, 0x01EC, 0x01ED }, -{ 0x01EE, 0x01EE, 0x01EF }, -{ 0x01EF, 0x01EE, 0x01EF }, -{ 0x01F0, 0x01F0, 0x01F0 }, -{ 0x01F1, 0x01F1, 0x01F3 }, -{ 0x01F2, 0x01F1, 0x01F3 }, -{ 0x01F3, 0x01F1, 0x01F3 }, -{ 0x01F4, 0x01F4, 0x01F5 }, -{ 0x01F5, 0x01F4, 0x01F5 }, -{ 0x01F6, 0x01F6, 0x0195 }, -{ 0x01F7, 0x01F7, 0x01BF }, -{ 0x01F8, 0x01F8, 0x01F9 }, -{ 0x01F9, 0x01F8, 0x01F9 }, -{ 0x01FA, 0x01FA, 0x01FB }, -{ 0x01FB, 0x01FA, 0x01FB }, -{ 0x01FC, 0x01FC, 0x01FD }, -{ 0x01FD, 0x01FC, 0x01FD }, -{ 0x01FE, 0x01FE, 0x01FF }, -{ 0x01FF, 0x01FE, 0x01FF }, -{ 0x0200, 0x0200, 0x0201 }, -{ 0x0201, 0x0200, 0x0201 }, -{ 0x0202, 0x0202, 0x0203 }, -{ 0x0203, 0x0202, 0x0203 }, -{ 0x0204, 0x0204, 0x0205 }, -{ 0x0205, 0x0204, 0x0205 }, -{ 0x0206, 0x0206, 0x0207 }, -{ 0x0207, 0x0206, 0x0207 }, -{ 0x0208, 0x0208, 0x0209 }, -{ 0x0209, 0x0208, 0x0209 }, -{ 0x020A, 0x020A, 0x020B }, -{ 0x020B, 0x020A, 0x020B }, -{ 0x020C, 0x020C, 0x020D }, -{ 0x020D, 0x020C, 0x020D }, -{ 0x020E, 0x020E, 0x020F }, -{ 0x020F, 0x020E, 0x020F }, -{ 0x0210, 0x0210, 0x0211 }, -{ 0x0211, 0x0210, 0x0211 }, -{ 0x0212, 0x0212, 0x0213 }, -{ 0x0213, 0x0212, 0x0213 }, -{ 0x0214, 0x0214, 0x0215 }, -{ 0x0215, 0x0214, 0x0215 }, -{ 0x0216, 0x0216, 0x0217 }, -{ 0x0217, 0x0216, 0x0217 }, -{ 0x0218, 0x0218, 0x0219 }, -{ 0x0219, 0x0218, 0x0219 }, -{ 0x021A, 0x021A, 0x021B }, -{ 0x021B, 0x021A, 0x021B }, -{ 0x021C, 0x021C, 0x021D }, -{ 0x021D, 0x021C, 0x021D }, -{ 0x021E, 0x021E, 0x021F }, -{ 0x021F, 0x021E, 0x021F }, -{ 0x0220, 0x0220, 0x019E }, -{ 0x0221, 0x0221, 0x0221 }, -{ 0x0222, 0x0222, 0x0223 }, -{ 0x0223, 0x0222, 0x0223 }, -{ 0x0224, 0x0224, 0x0225 }, -{ 0x0225, 0x0224, 0x0225 }, -{ 0x0226, 0x0226, 0x0227 }, -{ 0x0227, 0x0226, 0x0227 }, -{ 0x0228, 0x0228, 0x0229 }, -{ 0x0229, 0x0228, 0x0229 }, -{ 0x022A, 0x022A, 0x022B }, -{ 0x022B, 0x022A, 0x022B }, -{ 0x022C, 0x022C, 0x022D }, -{ 0x022D, 0x022C, 0x022D }, -{ 0x022E, 0x022E, 0x022F }, -{ 0x022F, 0x022E, 0x022F }, -{ 0x0230, 0x0230, 0x0231 }, -{ 0x0231, 0x0230, 0x0231 }, -{ 0x0232, 0x0232, 0x0233 }, -{ 0x0233, 0x0232, 0x0233 }, -{ 0x0234, 0x0234, 0x0234 }, -{ 0x0235, 0x0235, 0x0235 }, -{ 0x0236, 0x0236, 0x0236 }, -{ 0x0237, 0x0237, 0x0237 }, -{ 0x0238, 0x0238, 0x0238 }, -{ 0x0239, 0x0239, 0x0239 }, -{ 0x023A, 0x023A, 0x023A }, -{ 0x023B, 0x023B, 0x023C }, -{ 0x023C, 0x023B, 0x023C }, -{ 0x023D, 0x023D, 0x019A }, -{ 0x023E, 0x023E, 0x023E }, -{ 0x023F, 0x023F, 0x023F }, -{ 0x0240, 0x0240, 0x0240 }, -{ 0x0241, 0x0241, 0x0294 }, -{ 0x0250, 0x0250, 0x0250 }, -{ 0x0251, 0x0251, 0x0251 }, -{ 0x0252, 0x0252, 0x0252 }, -{ 0x0253, 0x0181, 0x0253 }, -{ 0x0254, 0x0186, 0x0254 }, -{ 0x0255, 0x0255, 0x0255 }, -{ 0x0256, 0x0189, 0x0256 }, -{ 0x0257, 0x018A, 0x0257 }, -{ 0x0258, 0x0258, 0x0258 }, -{ 0x0259, 0x018F, 0x0259 }, -{ 0x025A, 0x025A, 0x025A }, -{ 0x025B, 0x0190, 0x025B }, -{ 0x025C, 0x025C, 0x025C }, -{ 0x025D, 0x025D, 0x025D }, -{ 0x025E, 0x025E, 0x025E }, -{ 0x025F, 0x025F, 0x025F }, -{ 0x0260, 0x0193, 0x0260 }, -{ 0x0261, 0x0261, 0x0261 }, -{ 0x0262, 0x0262, 0x0262 }, -{ 0x0263, 0x0194, 0x0263 }, -{ 0x0264, 0x0264, 0x0264 }, -{ 0x0265, 0x0265, 0x0265 }, -{ 0x0266, 0x0266, 0x0266 }, -{ 0x0267, 0x0267, 0x0267 }, -{ 0x0268, 0x0197, 0x0268 }, -{ 0x0269, 0x0196, 0x0269 }, -{ 0x026A, 0x026A, 0x026A }, -{ 0x026B, 0x026B, 0x026B }, -{ 0x026C, 0x026C, 0x026C }, -{ 0x026D, 0x026D, 0x026D }, -{ 0x026E, 0x026E, 0x026E }, -{ 0x026F, 0x019C, 0x026F }, -{ 0x0270, 0x0270, 0x0270 }, -{ 0x0271, 0x0271, 0x0271 }, -{ 0x0272, 0x019D, 0x0272 }, -{ 0x0273, 0x0273, 0x0273 }, -{ 0x0274, 0x0274, 0x0274 }, -{ 0x0275, 0x019F, 0x0275 }, -{ 0x0276, 0x0276, 0x0276 }, -{ 0x0277, 0x0277, 0x0277 }, -{ 0x0278, 0x0278, 0x0278 }, -{ 0x0279, 0x0279, 0x0279 }, -{ 0x027A, 0x027A, 0x027A }, -{ 0x027B, 0x027B, 0x027B }, -{ 0x027C, 0x027C, 0x027C }, -{ 0x027D, 0x027D, 0x027D }, -{ 0x027E, 0x027E, 0x027E }, -{ 0x027F, 0x027F, 0x027F }, -{ 0x0280, 0x01A6, 0x0280 }, -{ 0x0281, 0x0281, 0x0281 }, -{ 0x0282, 0x0282, 0x0282 }, -{ 0x0283, 0x01A9, 0x0283 }, -{ 0x0284, 0x0284, 0x0284 }, -{ 0x0285, 0x0285, 0x0285 }, -{ 0x0286, 0x0286, 0x0286 }, -{ 0x0287, 0x0287, 0x0287 }, -{ 0x0288, 0x01AE, 0x0288 }, -{ 0x0289, 0x0289, 0x0289 }, -{ 0x028A, 0x01B1, 0x028A }, -{ 0x028B, 0x01B2, 0x028B }, -{ 0x028C, 0x028C, 0x028C }, -{ 0x028D, 0x028D, 0x028D }, -{ 0x028E, 0x028E, 0x028E }, -{ 0x028F, 0x028F, 0x028F }, -{ 0x0290, 0x0290, 0x0290 }, -{ 0x0291, 0x0291, 0x0291 }, -{ 0x0292, 0x01B7, 0x0292 }, -{ 0x0293, 0x0293, 0x0293 }, -{ 0x0294, 0x0241, 0x0294 }, -{ 0x0295, 0x0295, 0x0295 }, -{ 0x0296, 0x0296, 0x0296 }, -{ 0x0297, 0x0297, 0x0297 }, -{ 0x0298, 0x0298, 0x0298 }, -{ 0x0299, 0x0299, 0x0299 }, -{ 0x029A, 0x029A, 0x029A }, -{ 0x029B, 0x029B, 0x029B }, -{ 0x029C, 0x029C, 0x029C }, -{ 0x029D, 0x029D, 0x029D }, -{ 0x029E, 0x029E, 0x029E }, -{ 0x029F, 0x029F, 0x029F }, -{ 0x02A0, 0x02A0, 0x02A0 }, -{ 0x02A1, 0x02A1, 0x02A1 }, -{ 0x02A2, 0x02A2, 0x02A2 }, -{ 0x02A3, 0x02A3, 0x02A3 }, -{ 0x02A4, 0x02A4, 0x02A4 }, -{ 0x02A5, 0x02A5, 0x02A5 }, -{ 0x02A6, 0x02A6, 0x02A6 }, -{ 0x02A7, 0x02A7, 0x02A7 }, -{ 0x02A8, 0x02A8, 0x02A8 }, -{ 0x02A9, 0x02A9, 0x02A9 }, -{ 0x02AA, 0x02AA, 0x02AA }, -{ 0x02AB, 0x02AB, 0x02AB }, -{ 0x02AC, 0x02AC, 0x02AC }, -{ 0x02AD, 0x02AD, 0x02AD }, -{ 0x02AE, 0x02AE, 0x02AE }, -{ 0x02AF, 0x02AF, 0x02AF }, -{ 0x02B0, 0x02B0, 0x02B0 }, -{ 0x02B1, 0x02B1, 0x02B1 }, -{ 0x02B2, 0x02B2, 0x02B2 }, -{ 0x02B3, 0x02B3, 0x02B3 }, -{ 0x02B4, 0x02B4, 0x02B4 }, -{ 0x02B5, 0x02B5, 0x02B5 }, -{ 0x02B6, 0x02B6, 0x02B6 }, -{ 0x02B7, 0x02B7, 0x02B7 }, -{ 0x02B8, 0x02B8, 0x02B8 }, -{ 0x02B9, 0x02B9, 0x02B9 }, -{ 0x02BA, 0x02BA, 0x02BA }, -{ 0x02BB, 0x02BB, 0x02BB }, -{ 0x02BC, 0x02BC, 0x02BC }, -{ 0x02BD, 0x02BD, 0x02BD }, -{ 0x02BE, 0x02BE, 0x02BE }, -{ 0x02BF, 0x02BF, 0x02BF }, -{ 0x02C0, 0x02C0, 0x02C0 }, -{ 0x02C1, 0x02C1, 0x02C1 }, -{ 0x02C6, 0x02C6, 0x02C6 }, -{ 0x02C7, 0x02C7, 0x02C7 }, -{ 0x02C8, 0x02C8, 0x02C8 }, -{ 0x02C9, 0x02C9, 0x02C9 }, -{ 0x02CA, 0x02CA, 0x02CA }, -{ 0x02CB, 0x02CB, 0x02CB }, -{ 0x02CC, 0x02CC, 0x02CC }, -{ 0x02CD, 0x02CD, 0x02CD }, -{ 0x02CE, 0x02CE, 0x02CE }, -{ 0x02CF, 0x02CF, 0x02CF }, -{ 0x02D0, 0x02D0, 0x02D0 }, -{ 0x02D1, 0x02D1, 0x02D1 }, -{ 0x02E0, 0x02E0, 0x02E0 }, -{ 0x02E1, 0x02E1, 0x02E1 }, -{ 0x02E2, 0x02E2, 0x02E2 }, -{ 0x02E3, 0x02E3, 0x02E3 }, -{ 0x02E4, 0x02E4, 0x02E4 }, -{ 0x02EE, 0x02EE, 0x02EE }, -{ 0x0300, 0x0300, 0x0300 }, -{ 0x0301, 0x0301, 0x0301 }, -{ 0x0302, 0x0302, 0x0302 }, -{ 0x0303, 0x0303, 0x0303 }, -{ 0x0304, 0x0304, 0x0304 }, -{ 0x0305, 0x0305, 0x0305 }, -{ 0x0306, 0x0306, 0x0306 }, -{ 0x0307, 0x0307, 0x0307 }, -{ 0x0308, 0x0308, 0x0308 }, -{ 0x0309, 0x0309, 0x0309 }, -{ 0x030A, 0x030A, 0x030A }, -{ 0x030B, 0x030B, 0x030B }, -{ 0x030C, 0x030C, 0x030C }, -{ 0x030D, 0x030D, 0x030D }, -{ 0x030E, 0x030E, 0x030E }, -{ 0x030F, 0x030F, 0x030F }, -{ 0x0310, 0x0310, 0x0310 }, -{ 0x0311, 0x0311, 0x0311 }, -{ 0x0312, 0x0312, 0x0312 }, -{ 0x0313, 0x0313, 0x0313 }, -{ 0x0314, 0x0314, 0x0314 }, -{ 0x0315, 0x0315, 0x0315 }, -{ 0x0316, 0x0316, 0x0316 }, -{ 0x0317, 0x0317, 0x0317 }, -{ 0x0318, 0x0318, 0x0318 }, -{ 0x0319, 0x0319, 0x0319 }, -{ 0x031A, 0x031A, 0x031A }, -{ 0x031B, 0x031B, 0x031B }, -{ 0x031C, 0x031C, 0x031C }, -{ 0x031D, 0x031D, 0x031D }, -{ 0x031E, 0x031E, 0x031E }, -{ 0x031F, 0x031F, 0x031F }, -{ 0x0320, 0x0320, 0x0320 }, -{ 0x0321, 0x0321, 0x0321 }, -{ 0x0322, 0x0322, 0x0322 }, -{ 0x0323, 0x0323, 0x0323 }, -{ 0x0324, 0x0324, 0x0324 }, -{ 0x0325, 0x0325, 0x0325 }, -{ 0x0326, 0x0326, 0x0326 }, -{ 0x0327, 0x0327, 0x0327 }, -{ 0x0328, 0x0328, 0x0328 }, -{ 0x0329, 0x0329, 0x0329 }, -{ 0x032A, 0x032A, 0x032A }, -{ 0x032B, 0x032B, 0x032B }, -{ 0x032C, 0x032C, 0x032C }, -{ 0x032D, 0x032D, 0x032D }, -{ 0x032E, 0x032E, 0x032E }, -{ 0x032F, 0x032F, 0x032F }, -{ 0x0330, 0x0330, 0x0330 }, -{ 0x0331, 0x0331, 0x0331 }, -{ 0x0332, 0x0332, 0x0332 }, -{ 0x0333, 0x0333, 0x0333 }, -{ 0x0334, 0x0334, 0x0334 }, -{ 0x0335, 0x0335, 0x0335 }, -{ 0x0336, 0x0336, 0x0336 }, -{ 0x0337, 0x0337, 0x0337 }, -{ 0x0338, 0x0338, 0x0338 }, -{ 0x0339, 0x0339, 0x0339 }, -{ 0x033A, 0x033A, 0x033A }, -{ 0x033B, 0x033B, 0x033B }, -{ 0x033C, 0x033C, 0x033C }, -{ 0x033D, 0x033D, 0x033D }, -{ 0x033E, 0x033E, 0x033E }, -{ 0x033F, 0x033F, 0x033F }, -{ 0x0340, 0x0340, 0x0340 }, -{ 0x0341, 0x0341, 0x0341 }, -{ 0x0342, 0x0342, 0x0342 }, -{ 0x0343, 0x0343, 0x0343 }, -{ 0x0344, 0x0344, 0x0344 }, -{ 0x0345, 0x0399, 0x0345 }, -{ 0x0346, 0x0346, 0x0346 }, -{ 0x0347, 0x0347, 0x0347 }, -{ 0x0348, 0x0348, 0x0348 }, -{ 0x0349, 0x0349, 0x0349 }, -{ 0x034A, 0x034A, 0x034A }, -{ 0x034B, 0x034B, 0x034B }, -{ 0x034C, 0x034C, 0x034C }, -{ 0x034D, 0x034D, 0x034D }, -{ 0x034E, 0x034E, 0x034E }, -{ 0x034F, 0x034F, 0x034F }, -{ 0x0350, 0x0350, 0x0350 }, -{ 0x0351, 0x0351, 0x0351 }, -{ 0x0352, 0x0352, 0x0352 }, -{ 0x0353, 0x0353, 0x0353 }, -{ 0x0354, 0x0354, 0x0354 }, -{ 0x0355, 0x0355, 0x0355 }, -{ 0x0356, 0x0356, 0x0356 }, -{ 0x0357, 0x0357, 0x0357 }, -{ 0x0358, 0x0358, 0x0358 }, -{ 0x0359, 0x0359, 0x0359 }, -{ 0x035A, 0x035A, 0x035A }, -{ 0x035B, 0x035B, 0x035B }, -{ 0x035C, 0x035C, 0x035C }, -{ 0x035D, 0x035D, 0x035D }, -{ 0x035E, 0x035E, 0x035E }, -{ 0x035F, 0x035F, 0x035F }, -{ 0x0360, 0x0360, 0x0360 }, -{ 0x0361, 0x0361, 0x0361 }, -{ 0x0362, 0x0362, 0x0362 }, -{ 0x0363, 0x0363, 0x0363 }, -{ 0x0364, 0x0364, 0x0364 }, -{ 0x0365, 0x0365, 0x0365 }, -{ 0x0366, 0x0366, 0x0366 }, -{ 0x0367, 0x0367, 0x0367 }, -{ 0x0368, 0x0368, 0x0368 }, -{ 0x0369, 0x0369, 0x0369 }, -{ 0x036A, 0x036A, 0x036A }, -{ 0x036B, 0x036B, 0x036B }, -{ 0x036C, 0x036C, 0x036C }, -{ 0x036D, 0x036D, 0x036D }, -{ 0x036E, 0x036E, 0x036E }, -{ 0x036F, 0x036F, 0x036F }, -{ 0x037A, 0x037A, 0x037A }, -{ 0x0386, 0x0386, 0x03AC }, -{ 0x0388, 0x0388, 0x03AD }, -{ 0x0389, 0x0389, 0x03AE }, -{ 0x038A, 0x038A, 0x03AF }, -{ 0x038C, 0x038C, 0x03CC }, -{ 0x038E, 0x038E, 0x03CD }, -{ 0x038F, 0x038F, 0x03CE }, -{ 0x0390, 0x0390, 0x0390 }, -{ 0x0391, 0x0391, 0x03B1 }, -{ 0x0392, 0x0392, 0x03B2 }, -{ 0x0393, 0x0393, 0x03B3 }, -{ 0x0394, 0x0394, 0x03B4 }, -{ 0x0395, 0x0395, 0x03B5 }, -{ 0x0396, 0x0396, 0x03B6 }, -{ 0x0397, 0x0397, 0x03B7 }, -{ 0x0398, 0x0398, 0x03B8 }, -{ 0x0399, 0x0399, 0x03B9 }, -{ 0x039A, 0x039A, 0x03BA }, -{ 0x039B, 0x039B, 0x03BB }, -{ 0x039C, 0x039C, 0x03BC }, -{ 0x039D, 0x039D, 0x03BD }, -{ 0x039E, 0x039E, 0x03BE }, -{ 0x039F, 0x039F, 0x03BF }, -{ 0x03A0, 0x03A0, 0x03C0 }, -{ 0x03A1, 0x03A1, 0x03C1 }, -{ 0x03A3, 0x03A3, 0x03C3 }, -{ 0x03A4, 0x03A4, 0x03C4 }, -{ 0x03A5, 0x03A5, 0x03C5 }, -{ 0x03A6, 0x03A6, 0x03C6 }, -{ 0x03A7, 0x03A7, 0x03C7 }, -{ 0x03A8, 0x03A8, 0x03C8 }, -{ 0x03A9, 0x03A9, 0x03C9 }, -{ 0x03AA, 0x03AA, 0x03CA }, -{ 0x03AB, 0x03AB, 0x03CB }, -{ 0x03AC, 0x0386, 0x03AC }, -{ 0x03AD, 0x0388, 0x03AD }, -{ 0x03AE, 0x0389, 0x03AE }, -{ 0x03AF, 0x038A, 0x03AF }, -{ 0x03B0, 0x03B0, 0x03B0 }, -{ 0x03B1, 0x0391, 0x03B1 }, -{ 0x03B2, 0x0392, 0x03B2 }, -{ 0x03B3, 0x0393, 0x03B3 }, -{ 0x03B4, 0x0394, 0x03B4 }, -{ 0x03B5, 0x0395, 0x03B5 }, -{ 0x03B6, 0x0396, 0x03B6 }, -{ 0x03B7, 0x0397, 0x03B7 }, -{ 0x03B8, 0x0398, 0x03B8 }, -{ 0x03B9, 0x0399, 0x03B9 }, -{ 0x03BA, 0x039A, 0x03BA }, -{ 0x03BB, 0x039B, 0x03BB }, -{ 0x03BC, 0x039C, 0x03BC }, -{ 0x03BD, 0x039D, 0x03BD }, -{ 0x03BE, 0x039E, 0x03BE }, -{ 0x03BF, 0x039F, 0x03BF }, -{ 0x03C0, 0x03A0, 0x03C0 }, -{ 0x03C1, 0x03A1, 0x03C1 }, -{ 0x03C2, 0x03A3, 0x03C2 }, -{ 0x03C3, 0x03A3, 0x03C3 }, -{ 0x03C4, 0x03A4, 0x03C4 }, -{ 0x03C5, 0x03A5, 0x03C5 }, -{ 0x03C6, 0x03A6, 0x03C6 }, -{ 0x03C7, 0x03A7, 0x03C7 }, -{ 0x03C8, 0x03A8, 0x03C8 }, -{ 0x03C9, 0x03A9, 0x03C9 }, -{ 0x03CA, 0x03AA, 0x03CA }, -{ 0x03CB, 0x03AB, 0x03CB }, -{ 0x03CC, 0x038C, 0x03CC }, -{ 0x03CD, 0x038E, 0x03CD }, -{ 0x03CE, 0x038F, 0x03CE }, -{ 0x03D0, 0x0392, 0x03D0 }, -{ 0x03D1, 0x0398, 0x03D1 }, -{ 0x03D2, 0x03D2, 0x03D2 }, -{ 0x03D3, 0x03D3, 0x03D3 }, -{ 0x03D4, 0x03D4, 0x03D4 }, -{ 0x03D5, 0x03A6, 0x03D5 }, -{ 0x03D6, 0x03A0, 0x03D6 }, -{ 0x03D7, 0x03D7, 0x03D7 }, -{ 0x03D8, 0x03D8, 0x03D9 }, -{ 0x03D9, 0x03D8, 0x03D9 }, -{ 0x03DA, 0x03DA, 0x03DB }, -{ 0x03DB, 0x03DA, 0x03DB }, -{ 0x03DC, 0x03DC, 0x03DD }, -{ 0x03DD, 0x03DC, 0x03DD }, -{ 0x03DE, 0x03DE, 0x03DF }, -{ 0x03DF, 0x03DE, 0x03DF }, -{ 0x03E0, 0x03E0, 0x03E1 }, -{ 0x03E1, 0x03E0, 0x03E1 }, -{ 0x03E2, 0x03E2, 0x03E3 }, -{ 0x03E3, 0x03E2, 0x03E3 }, -{ 0x03E4, 0x03E4, 0x03E5 }, -{ 0x03E5, 0x03E4, 0x03E5 }, -{ 0x03E6, 0x03E6, 0x03E7 }, -{ 0x03E7, 0x03E6, 0x03E7 }, -{ 0x03E8, 0x03E8, 0x03E9 }, -{ 0x03E9, 0x03E8, 0x03E9 }, -{ 0x03EA, 0x03EA, 0x03EB }, -{ 0x03EB, 0x03EA, 0x03EB }, -{ 0x03EC, 0x03EC, 0x03ED }, -{ 0x03ED, 0x03EC, 0x03ED }, -{ 0x03EE, 0x03EE, 0x03EF }, -{ 0x03EF, 0x03EE, 0x03EF }, -{ 0x03F0, 0x039A, 0x03F0 }, -{ 0x03F1, 0x03A1, 0x03F1 }, -{ 0x03F2, 0x03F9, 0x03F2 }, -{ 0x03F3, 0x03F3, 0x03F3 }, -{ 0x03F4, 0x03F4, 0x03B8 }, -{ 0x03F5, 0x0395, 0x03F5 }, -{ 0x03F7, 0x03F7, 0x03F8 }, -{ 0x03F8, 0x03F7, 0x03F8 }, -{ 0x03F9, 0x03F9, 0x03F2 }, -{ 0x03FA, 0x03FA, 0x03FB }, -{ 0x03FB, 0x03FA, 0x03FB }, -{ 0x03FC, 0x03FC, 0x03FC }, -{ 0x03FD, 0x03FD, 0x03FD }, -{ 0x03FE, 0x03FE, 0x03FE }, -{ 0x03FF, 0x03FF, 0x03FF }, -{ 0x0400, 0x0400, 0x0450 }, -{ 0x0401, 0x0401, 0x0451 }, -{ 0x0402, 0x0402, 0x0452 }, -{ 0x0403, 0x0403, 0x0453 }, -{ 0x0404, 0x0404, 0x0454 }, -{ 0x0405, 0x0405, 0x0455 }, -{ 0x0406, 0x0406, 0x0456 }, -{ 0x0407, 0x0407, 0x0457 }, -{ 0x0408, 0x0408, 0x0458 }, -{ 0x0409, 0x0409, 0x0459 }, -{ 0x040A, 0x040A, 0x045A }, -{ 0x040B, 0x040B, 0x045B }, -{ 0x040C, 0x040C, 0x045C }, -{ 0x040D, 0x040D, 0x045D }, -{ 0x040E, 0x040E, 0x045E }, -{ 0x040F, 0x040F, 0x045F }, -{ 0x0410, 0x0410, 0x0430 }, -{ 0x0411, 0x0411, 0x0431 }, -{ 0x0412, 0x0412, 0x0432 }, -{ 0x0413, 0x0413, 0x0433 }, -{ 0x0414, 0x0414, 0x0434 }, -{ 0x0415, 0x0415, 0x0435 }, -{ 0x0416, 0x0416, 0x0436 }, -{ 0x0417, 0x0417, 0x0437 }, -{ 0x0418, 0x0418, 0x0438 }, -{ 0x0419, 0x0419, 0x0439 }, -{ 0x041A, 0x041A, 0x043A }, -{ 0x041B, 0x041B, 0x043B }, -{ 0x041C, 0x041C, 0x043C }, -{ 0x041D, 0x041D, 0x043D }, -{ 0x041E, 0x041E, 0x043E }, -{ 0x041F, 0x041F, 0x043F }, -{ 0x0420, 0x0420, 0x0440 }, -{ 0x0421, 0x0421, 0x0441 }, -{ 0x0422, 0x0422, 0x0442 }, -{ 0x0423, 0x0423, 0x0443 }, -{ 0x0424, 0x0424, 0x0444 }, -{ 0x0425, 0x0425, 0x0445 }, -{ 0x0426, 0x0426, 0x0446 }, -{ 0x0427, 0x0427, 0x0447 }, -{ 0x0428, 0x0428, 0x0448 }, -{ 0x0429, 0x0429, 0x0449 }, -{ 0x042A, 0x042A, 0x044A }, -{ 0x042B, 0x042B, 0x044B }, -{ 0x042C, 0x042C, 0x044C }, -{ 0x042D, 0x042D, 0x044D }, -{ 0x042E, 0x042E, 0x044E }, -{ 0x042F, 0x042F, 0x044F }, -{ 0x0430, 0x0410, 0x0430 }, -{ 0x0431, 0x0411, 0x0431 }, -{ 0x0432, 0x0412, 0x0432 }, -{ 0x0433, 0x0413, 0x0433 }, -{ 0x0434, 0x0414, 0x0434 }, -{ 0x0435, 0x0415, 0x0435 }, -{ 0x0436, 0x0416, 0x0436 }, -{ 0x0437, 0x0417, 0x0437 }, -{ 0x0438, 0x0418, 0x0438 }, -{ 0x0439, 0x0419, 0x0439 }, -{ 0x043A, 0x041A, 0x043A }, -{ 0x043B, 0x041B, 0x043B }, -{ 0x043C, 0x041C, 0x043C }, -{ 0x043D, 0x041D, 0x043D }, -{ 0x043E, 0x041E, 0x043E }, -{ 0x043F, 0x041F, 0x043F }, -{ 0x0440, 0x0420, 0x0440 }, -{ 0x0441, 0x0421, 0x0441 }, -{ 0x0442, 0x0422, 0x0442 }, -{ 0x0443, 0x0423, 0x0443 }, -{ 0x0444, 0x0424, 0x0444 }, -{ 0x0445, 0x0425, 0x0445 }, -{ 0x0446, 0x0426, 0x0446 }, -{ 0x0447, 0x0427, 0x0447 }, -{ 0x0448, 0x0428, 0x0448 }, -{ 0x0449, 0x0429, 0x0449 }, -{ 0x044A, 0x042A, 0x044A }, -{ 0x044B, 0x042B, 0x044B }, -{ 0x044C, 0x042C, 0x044C }, -{ 0x044D, 0x042D, 0x044D }, -{ 0x044E, 0x042E, 0x044E }, -{ 0x044F, 0x042F, 0x044F }, -{ 0x0450, 0x0400, 0x0450 }, -{ 0x0451, 0x0401, 0x0451 }, -{ 0x0452, 0x0402, 0x0452 }, -{ 0x0453, 0x0403, 0x0453 }, -{ 0x0454, 0x0404, 0x0454 }, -{ 0x0455, 0x0405, 0x0455 }, -{ 0x0456, 0x0406, 0x0456 }, -{ 0x0457, 0x0407, 0x0457 }, -{ 0x0458, 0x0408, 0x0458 }, -{ 0x0459, 0x0409, 0x0459 }, -{ 0x045A, 0x040A, 0x045A }, -{ 0x045B, 0x040B, 0x045B }, -{ 0x045C, 0x040C, 0x045C }, -{ 0x045D, 0x040D, 0x045D }, -{ 0x045E, 0x040E, 0x045E }, -{ 0x045F, 0x040F, 0x045F }, -{ 0x0460, 0x0460, 0x0461 }, -{ 0x0461, 0x0460, 0x0461 }, -{ 0x0462, 0x0462, 0x0463 }, -{ 0x0463, 0x0462, 0x0463 }, -{ 0x0464, 0x0464, 0x0465 }, -{ 0x0465, 0x0464, 0x0465 }, -{ 0x0466, 0x0466, 0x0467 }, -{ 0x0467, 0x0466, 0x0467 }, -{ 0x0468, 0x0468, 0x0469 }, -{ 0x0469, 0x0468, 0x0469 }, -{ 0x046A, 0x046A, 0x046B }, -{ 0x046B, 0x046A, 0x046B }, -{ 0x046C, 0x046C, 0x046D }, -{ 0x046D, 0x046C, 0x046D }, -{ 0x046E, 0x046E, 0x046F }, -{ 0x046F, 0x046E, 0x046F }, -{ 0x0470, 0x0470, 0x0471 }, -{ 0x0471, 0x0470, 0x0471 }, -{ 0x0472, 0x0472, 0x0473 }, -{ 0x0473, 0x0472, 0x0473 }, -{ 0x0474, 0x0474, 0x0475 }, -{ 0x0475, 0x0474, 0x0475 }, -{ 0x0476, 0x0476, 0x0477 }, -{ 0x0477, 0x0476, 0x0477 }, -{ 0x0478, 0x0478, 0x0479 }, -{ 0x0479, 0x0478, 0x0479 }, -{ 0x047A, 0x047A, 0x047B }, -{ 0x047B, 0x047A, 0x047B }, -{ 0x047C, 0x047C, 0x047D }, -{ 0x047D, 0x047C, 0x047D }, -{ 0x047E, 0x047E, 0x047F }, -{ 0x047F, 0x047E, 0x047F }, -{ 0x0480, 0x0480, 0x0481 }, -{ 0x0481, 0x0480, 0x0481 }, -{ 0x0483, 0x0483, 0x0483 }, -{ 0x0484, 0x0484, 0x0484 }, -{ 0x0485, 0x0485, 0x0485 }, -{ 0x0486, 0x0486, 0x0486 }, -{ 0x048A, 0x048A, 0x048B }, -{ 0x048B, 0x048A, 0x048B }, -{ 0x048C, 0x048C, 0x048D }, -{ 0x048D, 0x048C, 0x048D }, -{ 0x048E, 0x048E, 0x048F }, -{ 0x048F, 0x048E, 0x048F }, -{ 0x0490, 0x0490, 0x0491 }, -{ 0x0491, 0x0490, 0x0491 }, -{ 0x0492, 0x0492, 0x0493 }, -{ 0x0493, 0x0492, 0x0493 }, -{ 0x0494, 0x0494, 0x0495 }, -{ 0x0495, 0x0494, 0x0495 }, -{ 0x0496, 0x0496, 0x0497 }, -{ 0x0497, 0x0496, 0x0497 }, -{ 0x0498, 0x0498, 0x0499 }, -{ 0x0499, 0x0498, 0x0499 }, -{ 0x049A, 0x049A, 0x049B }, -{ 0x049B, 0x049A, 0x049B }, -{ 0x049C, 0x049C, 0x049D }, -{ 0x049D, 0x049C, 0x049D }, -{ 0x049E, 0x049E, 0x049F }, -{ 0x049F, 0x049E, 0x049F }, -{ 0x04A0, 0x04A0, 0x04A1 }, -{ 0x04A1, 0x04A0, 0x04A1 }, -{ 0x04A2, 0x04A2, 0x04A3 }, -{ 0x04A3, 0x04A2, 0x04A3 }, -{ 0x04A4, 0x04A4, 0x04A5 }, -{ 0x04A5, 0x04A4, 0x04A5 }, -{ 0x04A6, 0x04A6, 0x04A7 }, -{ 0x04A7, 0x04A6, 0x04A7 }, -{ 0x04A8, 0x04A8, 0x04A9 }, -{ 0x04A9, 0x04A8, 0x04A9 }, -{ 0x04AA, 0x04AA, 0x04AB }, -{ 0x04AB, 0x04AA, 0x04AB }, -{ 0x04AC, 0x04AC, 0x04AD }, -{ 0x04AD, 0x04AC, 0x04AD }, -{ 0x04AE, 0x04AE, 0x04AF }, -{ 0x04AF, 0x04AE, 0x04AF }, -{ 0x04B0, 0x04B0, 0x04B1 }, -{ 0x04B1, 0x04B0, 0x04B1 }, -{ 0x04B2, 0x04B2, 0x04B3 }, -{ 0x04B3, 0x04B2, 0x04B3 }, -{ 0x04B4, 0x04B4, 0x04B5 }, -{ 0x04B5, 0x04B4, 0x04B5 }, -{ 0x04B6, 0x04B6, 0x04B7 }, -{ 0x04B7, 0x04B6, 0x04B7 }, -{ 0x04B8, 0x04B8, 0x04B9 }, -{ 0x04B9, 0x04B8, 0x04B9 }, -{ 0x04BA, 0x04BA, 0x04BB }, -{ 0x04BB, 0x04BA, 0x04BB }, -{ 0x04BC, 0x04BC, 0x04BD }, -{ 0x04BD, 0x04BC, 0x04BD }, -{ 0x04BE, 0x04BE, 0x04BF }, -{ 0x04BF, 0x04BE, 0x04BF }, -{ 0x04C0, 0x04C0, 0x04C0 }, -{ 0x04C1, 0x04C1, 0x04C2 }, -{ 0x04C2, 0x04C1, 0x04C2 }, -{ 0x04C3, 0x04C3, 0x04C4 }, -{ 0x04C4, 0x04C3, 0x04C4 }, -{ 0x04C5, 0x04C5, 0x04C6 }, -{ 0x04C6, 0x04C5, 0x04C6 }, -{ 0x04C7, 0x04C7, 0x04C8 }, -{ 0x04C8, 0x04C7, 0x04C8 }, -{ 0x04C9, 0x04C9, 0x04CA }, -{ 0x04CA, 0x04C9, 0x04CA }, -{ 0x04CB, 0x04CB, 0x04CC }, -{ 0x04CC, 0x04CB, 0x04CC }, -{ 0x04CD, 0x04CD, 0x04CE }, -{ 0x04CE, 0x04CD, 0x04CE }, -{ 0x04D0, 0x04D0, 0x04D1 }, -{ 0x04D1, 0x04D0, 0x04D1 }, -{ 0x04D2, 0x04D2, 0x04D3 }, -{ 0x04D3, 0x04D2, 0x04D3 }, -{ 0x04D4, 0x04D4, 0x04D5 }, -{ 0x04D5, 0x04D4, 0x04D5 }, -{ 0x04D6, 0x04D6, 0x04D7 }, -{ 0x04D7, 0x04D6, 0x04D7 }, -{ 0x04D8, 0x04D8, 0x04D9 }, -{ 0x04D9, 0x04D8, 0x04D9 }, -{ 0x04DA, 0x04DA, 0x04DB }, -{ 0x04DB, 0x04DA, 0x04DB }, -{ 0x04DC, 0x04DC, 0x04DD }, -{ 0x04DD, 0x04DC, 0x04DD }, -{ 0x04DE, 0x04DE, 0x04DF }, -{ 0x04DF, 0x04DE, 0x04DF }, -{ 0x04E0, 0x04E0, 0x04E1 }, -{ 0x04E1, 0x04E0, 0x04E1 }, -{ 0x04E2, 0x04E2, 0x04E3 }, -{ 0x04E3, 0x04E2, 0x04E3 }, -{ 0x04E4, 0x04E4, 0x04E5 }, -{ 0x04E5, 0x04E4, 0x04E5 }, -{ 0x04E6, 0x04E6, 0x04E7 }, -{ 0x04E7, 0x04E6, 0x04E7 }, -{ 0x04E8, 0x04E8, 0x04E9 }, -{ 0x04E9, 0x04E8, 0x04E9 }, -{ 0x04EA, 0x04EA, 0x04EB }, -{ 0x04EB, 0x04EA, 0x04EB }, -{ 0x04EC, 0x04EC, 0x04ED }, -{ 0x04ED, 0x04EC, 0x04ED }, -{ 0x04EE, 0x04EE, 0x04EF }, -{ 0x04EF, 0x04EE, 0x04EF }, -{ 0x04F0, 0x04F0, 0x04F1 }, -{ 0x04F1, 0x04F0, 0x04F1 }, -{ 0x04F2, 0x04F2, 0x04F3 }, -{ 0x04F3, 0x04F2, 0x04F3 }, -{ 0x04F4, 0x04F4, 0x04F5 }, -{ 0x04F5, 0x04F4, 0x04F5 }, -{ 0x04F6, 0x04F6, 0x04F7 }, -{ 0x04F7, 0x04F6, 0x04F7 }, -{ 0x04F8, 0x04F8, 0x04F9 }, -{ 0x04F9, 0x04F8, 0x04F9 }, -{ 0x0500, 0x0500, 0x0501 }, -{ 0x0501, 0x0500, 0x0501 }, -{ 0x0502, 0x0502, 0x0503 }, -{ 0x0503, 0x0502, 0x0503 }, -{ 0x0504, 0x0504, 0x0505 }, -{ 0x0505, 0x0504, 0x0505 }, -{ 0x0506, 0x0506, 0x0507 }, -{ 0x0507, 0x0506, 0x0507 }, -{ 0x0508, 0x0508, 0x0509 }, -{ 0x0509, 0x0508, 0x0509 }, -{ 0x050A, 0x050A, 0x050B }, -{ 0x050B, 0x050A, 0x050B }, -{ 0x050C, 0x050C, 0x050D }, -{ 0x050D, 0x050C, 0x050D }, -{ 0x050E, 0x050E, 0x050F }, -{ 0x050F, 0x050E, 0x050F }, -{ 0x0531, 0x0531, 0x0561 }, -{ 0x0532, 0x0532, 0x0562 }, -{ 0x0533, 0x0533, 0x0563 }, -{ 0x0534, 0x0534, 0x0564 }, -{ 0x0535, 0x0535, 0x0565 }, -{ 0x0536, 0x0536, 0x0566 }, -{ 0x0537, 0x0537, 0x0567 }, -{ 0x0538, 0x0538, 0x0568 }, -{ 0x0539, 0x0539, 0x0569 }, -{ 0x053A, 0x053A, 0x056A }, -{ 0x053B, 0x053B, 0x056B }, -{ 0x053C, 0x053C, 0x056C }, -{ 0x053D, 0x053D, 0x056D }, -{ 0x053E, 0x053E, 0x056E }, -{ 0x053F, 0x053F, 0x056F }, -{ 0x0540, 0x0540, 0x0570 }, -{ 0x0541, 0x0541, 0x0571 }, -{ 0x0542, 0x0542, 0x0572 }, -{ 0x0543, 0x0543, 0x0573 }, -{ 0x0544, 0x0544, 0x0574 }, -{ 0x0545, 0x0545, 0x0575 }, -{ 0x0546, 0x0546, 0x0576 }, -{ 0x0547, 0x0547, 0x0577 }, -{ 0x0548, 0x0548, 0x0578 }, -{ 0x0549, 0x0549, 0x0579 }, -{ 0x054A, 0x054A, 0x057A }, -{ 0x054B, 0x054B, 0x057B }, -{ 0x054C, 0x054C, 0x057C }, -{ 0x054D, 0x054D, 0x057D }, -{ 0x054E, 0x054E, 0x057E }, -{ 0x054F, 0x054F, 0x057F }, -{ 0x0550, 0x0550, 0x0580 }, -{ 0x0551, 0x0551, 0x0581 }, -{ 0x0552, 0x0552, 0x0582 }, -{ 0x0553, 0x0553, 0x0583 }, -{ 0x0554, 0x0554, 0x0584 }, -{ 0x0555, 0x0555, 0x0585 }, -{ 0x0556, 0x0556, 0x0586 }, -{ 0x0559, 0x0559, 0x0559 }, -{ 0x0561, 0x0531, 0x0561 }, -{ 0x0562, 0x0532, 0x0562 }, -{ 0x0563, 0x0533, 0x0563 }, -{ 0x0564, 0x0534, 0x0564 }, -{ 0x0565, 0x0535, 0x0565 }, -{ 0x0566, 0x0536, 0x0566 }, -{ 0x0567, 0x0537, 0x0567 }, -{ 0x0568, 0x0538, 0x0568 }, -{ 0x0569, 0x0539, 0x0569 }, -{ 0x056A, 0x053A, 0x056A }, -{ 0x056B, 0x053B, 0x056B }, -{ 0x056C, 0x053C, 0x056C }, -{ 0x056D, 0x053D, 0x056D }, -{ 0x056E, 0x053E, 0x056E }, -{ 0x056F, 0x053F, 0x056F }, -{ 0x0570, 0x0540, 0x0570 }, -{ 0x0571, 0x0541, 0x0571 }, -{ 0x0572, 0x0542, 0x0572 }, -{ 0x0573, 0x0543, 0x0573 }, -{ 0x0574, 0x0544, 0x0574 }, -{ 0x0575, 0x0545, 0x0575 }, -{ 0x0576, 0x0546, 0x0576 }, -{ 0x0577, 0x0547, 0x0577 }, -{ 0x0578, 0x0548, 0x0578 }, -{ 0x0579, 0x0549, 0x0579 }, -{ 0x057A, 0x054A, 0x057A }, -{ 0x057B, 0x054B, 0x057B }, -{ 0x057C, 0x054C, 0x057C }, -{ 0x057D, 0x054D, 0x057D }, -{ 0x057E, 0x054E, 0x057E }, -{ 0x057F, 0x054F, 0x057F }, -{ 0x0580, 0x0550, 0x0580 }, -{ 0x0581, 0x0551, 0x0581 }, -{ 0x0582, 0x0552, 0x0582 }, -{ 0x0583, 0x0553, 0x0583 }, -{ 0x0584, 0x0554, 0x0584 }, -{ 0x0585, 0x0555, 0x0585 }, -{ 0x0586, 0x0556, 0x0586 }, -{ 0x0587, 0x0587, 0x0587 }, -{ 0x0591, 0x0591, 0x0591 }, -{ 0x0592, 0x0592, 0x0592 }, -{ 0x0593, 0x0593, 0x0593 }, -{ 0x0594, 0x0594, 0x0594 }, -{ 0x0595, 0x0595, 0x0595 }, -{ 0x0596, 0x0596, 0x0596 }, -{ 0x0597, 0x0597, 0x0597 }, -{ 0x0598, 0x0598, 0x0598 }, -{ 0x0599, 0x0599, 0x0599 }, -{ 0x059A, 0x059A, 0x059A }, -{ 0x059B, 0x059B, 0x059B }, -{ 0x059C, 0x059C, 0x059C }, -{ 0x059D, 0x059D, 0x059D }, -{ 0x059E, 0x059E, 0x059E }, -{ 0x059F, 0x059F, 0x059F }, -{ 0x05A0, 0x05A0, 0x05A0 }, -{ 0x05A1, 0x05A1, 0x05A1 }, -{ 0x05A2, 0x05A2, 0x05A2 }, -{ 0x05A3, 0x05A3, 0x05A3 }, -{ 0x05A4, 0x05A4, 0x05A4 }, -{ 0x05A5, 0x05A5, 0x05A5 }, -{ 0x05A6, 0x05A6, 0x05A6 }, -{ 0x05A7, 0x05A7, 0x05A7 }, -{ 0x05A8, 0x05A8, 0x05A8 }, -{ 0x05A9, 0x05A9, 0x05A9 }, -{ 0x05AA, 0x05AA, 0x05AA }, -{ 0x05AB, 0x05AB, 0x05AB }, -{ 0x05AC, 0x05AC, 0x05AC }, -{ 0x05AD, 0x05AD, 0x05AD }, -{ 0x05AE, 0x05AE, 0x05AE }, -{ 0x05AF, 0x05AF, 0x05AF }, -{ 0x05B0, 0x05B0, 0x05B0 }, -{ 0x05B1, 0x05B1, 0x05B1 }, -{ 0x05B2, 0x05B2, 0x05B2 }, -{ 0x05B3, 0x05B3, 0x05B3 }, -{ 0x05B4, 0x05B4, 0x05B4 }, -{ 0x05B5, 0x05B5, 0x05B5 }, -{ 0x05B6, 0x05B6, 0x05B6 }, -{ 0x05B7, 0x05B7, 0x05B7 }, -{ 0x05B8, 0x05B8, 0x05B8 }, -{ 0x05B9, 0x05B9, 0x05B9 }, -{ 0x05BB, 0x05BB, 0x05BB }, -{ 0x05BC, 0x05BC, 0x05BC }, -{ 0x05BD, 0x05BD, 0x05BD }, -{ 0x05BF, 0x05BF, 0x05BF }, -{ 0x05C1, 0x05C1, 0x05C1 }, -{ 0x05C2, 0x05C2, 0x05C2 }, -{ 0x05C4, 0x05C4, 0x05C4 }, -{ 0x05C5, 0x05C5, 0x05C5 }, -{ 0x05C7, 0x05C7, 0x05C7 }, -{ 0x05D0, 0x05D0, 0x05D0 }, -{ 0x05D1, 0x05D1, 0x05D1 }, -{ 0x05D2, 0x05D2, 0x05D2 }, -{ 0x05D3, 0x05D3, 0x05D3 }, -{ 0x05D4, 0x05D4, 0x05D4 }, -{ 0x05D5, 0x05D5, 0x05D5 }, -{ 0x05D6, 0x05D6, 0x05D6 }, -{ 0x05D7, 0x05D7, 0x05D7 }, -{ 0x05D8, 0x05D8, 0x05D8 }, -{ 0x05D9, 0x05D9, 0x05D9 }, -{ 0x05DA, 0x05DA, 0x05DA }, -{ 0x05DB, 0x05DB, 0x05DB }, -{ 0x05DC, 0x05DC, 0x05DC }, -{ 0x05DD, 0x05DD, 0x05DD }, -{ 0x05DE, 0x05DE, 0x05DE }, -{ 0x05DF, 0x05DF, 0x05DF }, -{ 0x05E0, 0x05E0, 0x05E0 }, -{ 0x05E1, 0x05E1, 0x05E1 }, -{ 0x05E2, 0x05E2, 0x05E2 }, -{ 0x05E3, 0x05E3, 0x05E3 }, -{ 0x05E4, 0x05E4, 0x05E4 }, -{ 0x05E5, 0x05E5, 0x05E5 }, -{ 0x05E6, 0x05E6, 0x05E6 }, -{ 0x05E7, 0x05E7, 0x05E7 }, -{ 0x05E8, 0x05E8, 0x05E8 }, -{ 0x05E9, 0x05E9, 0x05E9 }, -{ 0x05EA, 0x05EA, 0x05EA }, -{ 0x05F0, 0x05F0, 0x05F0 }, -{ 0x05F1, 0x05F1, 0x05F1 }, -{ 0x05F2, 0x05F2, 0x05F2 }, -{ 0x0610, 0x0610, 0x0610 }, -{ 0x0611, 0x0611, 0x0611 }, -{ 0x0612, 0x0612, 0x0612 }, -{ 0x0613, 0x0613, 0x0613 }, -{ 0x0614, 0x0614, 0x0614 }, -{ 0x0615, 0x0615, 0x0615 }, -{ 0x0621, 0x0621, 0x0621 }, -{ 0x0622, 0x0622, 0x0622 }, -{ 0x0623, 0x0623, 0x0623 }, -{ 0x0624, 0x0624, 0x0624 }, -{ 0x0625, 0x0625, 0x0625 }, -{ 0x0626, 0x0626, 0x0626 }, -{ 0x0627, 0x0627, 0x0627 }, -{ 0x0628, 0x0628, 0x0628 }, -{ 0x0629, 0x0629, 0x0629 }, -{ 0x062A, 0x062A, 0x062A }, -{ 0x062B, 0x062B, 0x062B }, -{ 0x062C, 0x062C, 0x062C }, -{ 0x062D, 0x062D, 0x062D }, -{ 0x062E, 0x062E, 0x062E }, -{ 0x062F, 0x062F, 0x062F }, -{ 0x0630, 0x0630, 0x0630 }, -{ 0x0631, 0x0631, 0x0631 }, -{ 0x0632, 0x0632, 0x0632 }, -{ 0x0633, 0x0633, 0x0633 }, -{ 0x0634, 0x0634, 0x0634 }, -{ 0x0635, 0x0635, 0x0635 }, -{ 0x0636, 0x0636, 0x0636 }, -{ 0x0637, 0x0637, 0x0637 }, -{ 0x0638, 0x0638, 0x0638 }, -{ 0x0639, 0x0639, 0x0639 }, -{ 0x063A, 0x063A, 0x063A }, -{ 0x0640, 0x0640, 0x0640 }, -{ 0x0641, 0x0641, 0x0641 }, -{ 0x0642, 0x0642, 0x0642 }, -{ 0x0643, 0x0643, 0x0643 }, -{ 0x0644, 0x0644, 0x0644 }, -{ 0x0645, 0x0645, 0x0645 }, -{ 0x0646, 0x0646, 0x0646 }, -{ 0x0647, 0x0647, 0x0647 }, -{ 0x0648, 0x0648, 0x0648 }, -{ 0x0649, 0x0649, 0x0649 }, -{ 0x064A, 0x064A, 0x064A }, -{ 0x064B, 0x064B, 0x064B }, -{ 0x064C, 0x064C, 0x064C }, -{ 0x064D, 0x064D, 0x064D }, -{ 0x064E, 0x064E, 0x064E }, -{ 0x064F, 0x064F, 0x064F }, -{ 0x0650, 0x0650, 0x0650 }, -{ 0x0651, 0x0651, 0x0651 }, -{ 0x0652, 0x0652, 0x0652 }, -{ 0x0653, 0x0653, 0x0653 }, -{ 0x0654, 0x0654, 0x0654 }, -{ 0x0655, 0x0655, 0x0655 }, -{ 0x0656, 0x0656, 0x0656 }, -{ 0x0657, 0x0657, 0x0657 }, -{ 0x0658, 0x0658, 0x0658 }, -{ 0x0659, 0x0659, 0x0659 }, -{ 0x065A, 0x065A, 0x065A }, -{ 0x065B, 0x065B, 0x065B }, -{ 0x065C, 0x065C, 0x065C }, -{ 0x065D, 0x065D, 0x065D }, -{ 0x065E, 0x065E, 0x065E }, -{ 0x066E, 0x066E, 0x066E }, -{ 0x066F, 0x066F, 0x066F }, -{ 0x0670, 0x0670, 0x0670 }, -{ 0x0671, 0x0671, 0x0671 }, -{ 0x0672, 0x0672, 0x0672 }, -{ 0x0673, 0x0673, 0x0673 }, -{ 0x0674, 0x0674, 0x0674 }, -{ 0x0675, 0x0675, 0x0675 }, -{ 0x0676, 0x0676, 0x0676 }, -{ 0x0677, 0x0677, 0x0677 }, -{ 0x0678, 0x0678, 0x0678 }, -{ 0x0679, 0x0679, 0x0679 }, -{ 0x067A, 0x067A, 0x067A }, -{ 0x067B, 0x067B, 0x067B }, -{ 0x067C, 0x067C, 0x067C }, -{ 0x067D, 0x067D, 0x067D }, -{ 0x067E, 0x067E, 0x067E }, -{ 0x067F, 0x067F, 0x067F }, -{ 0x0680, 0x0680, 0x0680 }, -{ 0x0681, 0x0681, 0x0681 }, -{ 0x0682, 0x0682, 0x0682 }, -{ 0x0683, 0x0683, 0x0683 }, -{ 0x0684, 0x0684, 0x0684 }, -{ 0x0685, 0x0685, 0x0685 }, -{ 0x0686, 0x0686, 0x0686 }, -{ 0x0687, 0x0687, 0x0687 }, -{ 0x0688, 0x0688, 0x0688 }, -{ 0x0689, 0x0689, 0x0689 }, -{ 0x068A, 0x068A, 0x068A }, -{ 0x068B, 0x068B, 0x068B }, -{ 0x068C, 0x068C, 0x068C }, -{ 0x068D, 0x068D, 0x068D }, -{ 0x068E, 0x068E, 0x068E }, -{ 0x068F, 0x068F, 0x068F }, -{ 0x0690, 0x0690, 0x0690 }, -{ 0x0691, 0x0691, 0x0691 }, -{ 0x0692, 0x0692, 0x0692 }, -{ 0x0693, 0x0693, 0x0693 }, -{ 0x0694, 0x0694, 0x0694 }, -{ 0x0695, 0x0695, 0x0695 }, -{ 0x0696, 0x0696, 0x0696 }, -{ 0x0697, 0x0697, 0x0697 }, -{ 0x0698, 0x0698, 0x0698 }, -{ 0x0699, 0x0699, 0x0699 }, -{ 0x069A, 0x069A, 0x069A }, -{ 0x069B, 0x069B, 0x069B }, -{ 0x069C, 0x069C, 0x069C }, -{ 0x069D, 0x069D, 0x069D }, -{ 0x069E, 0x069E, 0x069E }, -{ 0x069F, 0x069F, 0x069F }, -{ 0x06A0, 0x06A0, 0x06A0 }, -{ 0x06A1, 0x06A1, 0x06A1 }, -{ 0x06A2, 0x06A2, 0x06A2 }, -{ 0x06A3, 0x06A3, 0x06A3 }, -{ 0x06A4, 0x06A4, 0x06A4 }, -{ 0x06A5, 0x06A5, 0x06A5 }, -{ 0x06A6, 0x06A6, 0x06A6 }, -{ 0x06A7, 0x06A7, 0x06A7 }, -{ 0x06A8, 0x06A8, 0x06A8 }, -{ 0x06A9, 0x06A9, 0x06A9 }, -{ 0x06AA, 0x06AA, 0x06AA }, -{ 0x06AB, 0x06AB, 0x06AB }, -{ 0x06AC, 0x06AC, 0x06AC }, -{ 0x06AD, 0x06AD, 0x06AD }, -{ 0x06AE, 0x06AE, 0x06AE }, -{ 0x06AF, 0x06AF, 0x06AF }, -{ 0x06B0, 0x06B0, 0x06B0 }, -{ 0x06B1, 0x06B1, 0x06B1 }, -{ 0x06B2, 0x06B2, 0x06B2 }, -{ 0x06B3, 0x06B3, 0x06B3 }, -{ 0x06B4, 0x06B4, 0x06B4 }, -{ 0x06B5, 0x06B5, 0x06B5 }, -{ 0x06B6, 0x06B6, 0x06B6 }, -{ 0x06B7, 0x06B7, 0x06B7 }, -{ 0x06B8, 0x06B8, 0x06B8 }, -{ 0x06B9, 0x06B9, 0x06B9 }, -{ 0x06BA, 0x06BA, 0x06BA }, -{ 0x06BB, 0x06BB, 0x06BB }, -{ 0x06BC, 0x06BC, 0x06BC }, -{ 0x06BD, 0x06BD, 0x06BD }, -{ 0x06BE, 0x06BE, 0x06BE }, -{ 0x06BF, 0x06BF, 0x06BF }, -{ 0x06C0, 0x06C0, 0x06C0 }, -{ 0x06C1, 0x06C1, 0x06C1 }, -{ 0x06C2, 0x06C2, 0x06C2 }, -{ 0x06C3, 0x06C3, 0x06C3 }, -{ 0x06C4, 0x06C4, 0x06C4 }, -{ 0x06C5, 0x06C5, 0x06C5 }, -{ 0x06C6, 0x06C6, 0x06C6 }, -{ 0x06C7, 0x06C7, 0x06C7 }, -{ 0x06C8, 0x06C8, 0x06C8 }, -{ 0x06C9, 0x06C9, 0x06C9 }, -{ 0x06CA, 0x06CA, 0x06CA }, -{ 0x06CB, 0x06CB, 0x06CB }, -{ 0x06CC, 0x06CC, 0x06CC }, -{ 0x06CD, 0x06CD, 0x06CD }, -{ 0x06CE, 0x06CE, 0x06CE }, -{ 0x06CF, 0x06CF, 0x06CF }, -{ 0x06D0, 0x06D0, 0x06D0 }, -{ 0x06D1, 0x06D1, 0x06D1 }, -{ 0x06D2, 0x06D2, 0x06D2 }, -{ 0x06D3, 0x06D3, 0x06D3 }, -{ 0x06D5, 0x06D5, 0x06D5 }, -{ 0x06D6, 0x06D6, 0x06D6 }, -{ 0x06D7, 0x06D7, 0x06D7 }, -{ 0x06D8, 0x06D8, 0x06D8 }, -{ 0x06D9, 0x06D9, 0x06D9 }, -{ 0x06DA, 0x06DA, 0x06DA }, -{ 0x06DB, 0x06DB, 0x06DB }, -{ 0x06DC, 0x06DC, 0x06DC }, -{ 0x06DF, 0x06DF, 0x06DF }, -{ 0x06E0, 0x06E0, 0x06E0 }, -{ 0x06E1, 0x06E1, 0x06E1 }, -{ 0x06E2, 0x06E2, 0x06E2 }, -{ 0x06E3, 0x06E3, 0x06E3 }, -{ 0x06E4, 0x06E4, 0x06E4 }, -{ 0x06E5, 0x06E5, 0x06E5 }, -{ 0x06E6, 0x06E6, 0x06E6 }, -{ 0x06E7, 0x06E7, 0x06E7 }, -{ 0x06E8, 0x06E8, 0x06E8 }, -{ 0x06EA, 0x06EA, 0x06EA }, -{ 0x06EB, 0x06EB, 0x06EB }, -{ 0x06EC, 0x06EC, 0x06EC }, -{ 0x06ED, 0x06ED, 0x06ED }, -{ 0x06EE, 0x06EE, 0x06EE }, -{ 0x06EF, 0x06EF, 0x06EF }, -{ 0x06FA, 0x06FA, 0x06FA }, -{ 0x06FB, 0x06FB, 0x06FB }, -{ 0x06FC, 0x06FC, 0x06FC }, -{ 0x06FF, 0x06FF, 0x06FF }, -{ 0x0710, 0x0710, 0x0710 }, -{ 0x0711, 0x0711, 0x0711 }, -{ 0x0712, 0x0712, 0x0712 }, -{ 0x0713, 0x0713, 0x0713 }, -{ 0x0714, 0x0714, 0x0714 }, -{ 0x0715, 0x0715, 0x0715 }, -{ 0x0716, 0x0716, 0x0716 }, -{ 0x0717, 0x0717, 0x0717 }, -{ 0x0718, 0x0718, 0x0718 }, -{ 0x0719, 0x0719, 0x0719 }, -{ 0x071A, 0x071A, 0x071A }, -{ 0x071B, 0x071B, 0x071B }, -{ 0x071C, 0x071C, 0x071C }, -{ 0x071D, 0x071D, 0x071D }, -{ 0x071E, 0x071E, 0x071E }, -{ 0x071F, 0x071F, 0x071F }, -{ 0x0720, 0x0720, 0x0720 }, -{ 0x0721, 0x0721, 0x0721 }, -{ 0x0722, 0x0722, 0x0722 }, -{ 0x0723, 0x0723, 0x0723 }, -{ 0x0724, 0x0724, 0x0724 }, -{ 0x0725, 0x0725, 0x0725 }, -{ 0x0726, 0x0726, 0x0726 }, -{ 0x0727, 0x0727, 0x0727 }, -{ 0x0728, 0x0728, 0x0728 }, -{ 0x0729, 0x0729, 0x0729 }, -{ 0x072A, 0x072A, 0x072A }, -{ 0x072B, 0x072B, 0x072B }, -{ 0x072C, 0x072C, 0x072C }, -{ 0x072D, 0x072D, 0x072D }, -{ 0x072E, 0x072E, 0x072E }, -{ 0x072F, 0x072F, 0x072F }, -{ 0x0730, 0x0730, 0x0730 }, -{ 0x0731, 0x0731, 0x0731 }, -{ 0x0732, 0x0732, 0x0732 }, -{ 0x0733, 0x0733, 0x0733 }, -{ 0x0734, 0x0734, 0x0734 }, -{ 0x0735, 0x0735, 0x0735 }, -{ 0x0736, 0x0736, 0x0736 }, -{ 0x0737, 0x0737, 0x0737 }, -{ 0x0738, 0x0738, 0x0738 }, -{ 0x0739, 0x0739, 0x0739 }, -{ 0x073A, 0x073A, 0x073A }, -{ 0x073B, 0x073B, 0x073B }, -{ 0x073C, 0x073C, 0x073C }, -{ 0x073D, 0x073D, 0x073D }, -{ 0x073E, 0x073E, 0x073E }, -{ 0x073F, 0x073F, 0x073F }, -{ 0x0740, 0x0740, 0x0740 }, -{ 0x0741, 0x0741, 0x0741 }, -{ 0x0742, 0x0742, 0x0742 }, -{ 0x0743, 0x0743, 0x0743 }, -{ 0x0744, 0x0744, 0x0744 }, -{ 0x0745, 0x0745, 0x0745 }, -{ 0x0746, 0x0746, 0x0746 }, -{ 0x0747, 0x0747, 0x0747 }, -{ 0x0748, 0x0748, 0x0748 }, -{ 0x0749, 0x0749, 0x0749 }, -{ 0x074A, 0x074A, 0x074A }, -{ 0x074D, 0x074D, 0x074D }, -{ 0x074E, 0x074E, 0x074E }, -{ 0x074F, 0x074F, 0x074F }, -{ 0x0750, 0x0750, 0x0750 }, -{ 0x0751, 0x0751, 0x0751 }, -{ 0x0752, 0x0752, 0x0752 }, -{ 0x0753, 0x0753, 0x0753 }, -{ 0x0754, 0x0754, 0x0754 }, -{ 0x0755, 0x0755, 0x0755 }, -{ 0x0756, 0x0756, 0x0756 }, -{ 0x0757, 0x0757, 0x0757 }, -{ 0x0758, 0x0758, 0x0758 }, -{ 0x0759, 0x0759, 0x0759 }, -{ 0x075A, 0x075A, 0x075A }, -{ 0x075B, 0x075B, 0x075B }, -{ 0x075C, 0x075C, 0x075C }, -{ 0x075D, 0x075D, 0x075D }, -{ 0x075E, 0x075E, 0x075E }, -{ 0x075F, 0x075F, 0x075F }, -{ 0x0760, 0x0760, 0x0760 }, -{ 0x0761, 0x0761, 0x0761 }, -{ 0x0762, 0x0762, 0x0762 }, -{ 0x0763, 0x0763, 0x0763 }, -{ 0x0764, 0x0764, 0x0764 }, -{ 0x0765, 0x0765, 0x0765 }, -{ 0x0766, 0x0766, 0x0766 }, -{ 0x0767, 0x0767, 0x0767 }, -{ 0x0768, 0x0768, 0x0768 }, -{ 0x0769, 0x0769, 0x0769 }, -{ 0x076A, 0x076A, 0x076A }, -{ 0x076B, 0x076B, 0x076B }, -{ 0x076C, 0x076C, 0x076C }, -{ 0x076D, 0x076D, 0x076D }, -{ 0x0780, 0x0780, 0x0780 }, -{ 0x0781, 0x0781, 0x0781 }, -{ 0x0782, 0x0782, 0x0782 }, -{ 0x0783, 0x0783, 0x0783 }, -{ 0x0784, 0x0784, 0x0784 }, -{ 0x0785, 0x0785, 0x0785 }, -{ 0x0786, 0x0786, 0x0786 }, -{ 0x0787, 0x0787, 0x0787 }, -{ 0x0788, 0x0788, 0x0788 }, -{ 0x0789, 0x0789, 0x0789 }, -{ 0x078A, 0x078A, 0x078A }, -{ 0x078B, 0x078B, 0x078B }, -{ 0x078C, 0x078C, 0x078C }, -{ 0x078D, 0x078D, 0x078D }, -{ 0x078E, 0x078E, 0x078E }, -{ 0x078F, 0x078F, 0x078F }, -{ 0x0790, 0x0790, 0x0790 }, -{ 0x0791, 0x0791, 0x0791 }, -{ 0x0792, 0x0792, 0x0792 }, -{ 0x0793, 0x0793, 0x0793 }, -{ 0x0794, 0x0794, 0x0794 }, -{ 0x0795, 0x0795, 0x0795 }, -{ 0x0796, 0x0796, 0x0796 }, -{ 0x0797, 0x0797, 0x0797 }, -{ 0x0798, 0x0798, 0x0798 }, -{ 0x0799, 0x0799, 0x0799 }, -{ 0x079A, 0x079A, 0x079A }, -{ 0x079B, 0x079B, 0x079B }, -{ 0x079C, 0x079C, 0x079C }, -{ 0x079D, 0x079D, 0x079D }, -{ 0x079E, 0x079E, 0x079E }, -{ 0x079F, 0x079F, 0x079F }, -{ 0x07A0, 0x07A0, 0x07A0 }, -{ 0x07A1, 0x07A1, 0x07A1 }, -{ 0x07A2, 0x07A2, 0x07A2 }, -{ 0x07A3, 0x07A3, 0x07A3 }, -{ 0x07A4, 0x07A4, 0x07A4 }, -{ 0x07A5, 0x07A5, 0x07A5 }, -{ 0x07A6, 0x07A6, 0x07A6 }, -{ 0x07A7, 0x07A7, 0x07A7 }, -{ 0x07A8, 0x07A8, 0x07A8 }, -{ 0x07A9, 0x07A9, 0x07A9 }, -{ 0x07AA, 0x07AA, 0x07AA }, -{ 0x07AB, 0x07AB, 0x07AB }, -{ 0x07AC, 0x07AC, 0x07AC }, -{ 0x07AD, 0x07AD, 0x07AD }, -{ 0x07AE, 0x07AE, 0x07AE }, -{ 0x07AF, 0x07AF, 0x07AF }, -{ 0x07B0, 0x07B0, 0x07B0 }, -{ 0x07B1, 0x07B1, 0x07B1 }, -{ 0x0901, 0x0901, 0x0901 }, -{ 0x0902, 0x0902, 0x0902 }, -{ 0x0904, 0x0904, 0x0904 }, -{ 0x0905, 0x0905, 0x0905 }, -{ 0x0906, 0x0906, 0x0906 }, -{ 0x0907, 0x0907, 0x0907 }, -{ 0x0908, 0x0908, 0x0908 }, -{ 0x0909, 0x0909, 0x0909 }, -{ 0x090A, 0x090A, 0x090A }, -{ 0x090B, 0x090B, 0x090B }, -{ 0x090C, 0x090C, 0x090C }, -{ 0x090D, 0x090D, 0x090D }, -{ 0x090E, 0x090E, 0x090E }, -{ 0x090F, 0x090F, 0x090F }, -{ 0x0910, 0x0910, 0x0910 }, -{ 0x0911, 0x0911, 0x0911 }, -{ 0x0912, 0x0912, 0x0912 }, -{ 0x0913, 0x0913, 0x0913 }, -{ 0x0914, 0x0914, 0x0914 }, -{ 0x0915, 0x0915, 0x0915 }, -{ 0x0916, 0x0916, 0x0916 }, -{ 0x0917, 0x0917, 0x0917 }, -{ 0x0918, 0x0918, 0x0918 }, -{ 0x0919, 0x0919, 0x0919 }, -{ 0x091A, 0x091A, 0x091A }, -{ 0x091B, 0x091B, 0x091B }, -{ 0x091C, 0x091C, 0x091C }, -{ 0x091D, 0x091D, 0x091D }, -{ 0x091E, 0x091E, 0x091E }, -{ 0x091F, 0x091F, 0x091F }, -{ 0x0920, 0x0920, 0x0920 }, -{ 0x0921, 0x0921, 0x0921 }, -{ 0x0922, 0x0922, 0x0922 }, -{ 0x0923, 0x0923, 0x0923 }, -{ 0x0924, 0x0924, 0x0924 }, -{ 0x0925, 0x0925, 0x0925 }, -{ 0x0926, 0x0926, 0x0926 }, -{ 0x0927, 0x0927, 0x0927 }, -{ 0x0928, 0x0928, 0x0928 }, -{ 0x0929, 0x0929, 0x0929 }, -{ 0x092A, 0x092A, 0x092A }, -{ 0x092B, 0x092B, 0x092B }, -{ 0x092C, 0x092C, 0x092C }, -{ 0x092D, 0x092D, 0x092D }, -{ 0x092E, 0x092E, 0x092E }, -{ 0x092F, 0x092F, 0x092F }, -{ 0x0930, 0x0930, 0x0930 }, -{ 0x0931, 0x0931, 0x0931 }, -{ 0x0932, 0x0932, 0x0932 }, -{ 0x0933, 0x0933, 0x0933 }, -{ 0x0934, 0x0934, 0x0934 }, -{ 0x0935, 0x0935, 0x0935 }, -{ 0x0936, 0x0936, 0x0936 }, -{ 0x0937, 0x0937, 0x0937 }, -{ 0x0938, 0x0938, 0x0938 }, -{ 0x0939, 0x0939, 0x0939 }, -{ 0x093C, 0x093C, 0x093C }, -{ 0x093D, 0x093D, 0x093D }, -{ 0x0941, 0x0941, 0x0941 }, -{ 0x0942, 0x0942, 0x0942 }, -{ 0x0943, 0x0943, 0x0943 }, -{ 0x0944, 0x0944, 0x0944 }, -{ 0x0945, 0x0945, 0x0945 }, -{ 0x0946, 0x0946, 0x0946 }, -{ 0x0947, 0x0947, 0x0947 }, -{ 0x0948, 0x0948, 0x0948 }, -{ 0x094D, 0x094D, 0x094D }, -{ 0x0950, 0x0950, 0x0950 }, -{ 0x0951, 0x0951, 0x0951 }, -{ 0x0952, 0x0952, 0x0952 }, -{ 0x0953, 0x0953, 0x0953 }, -{ 0x0954, 0x0954, 0x0954 }, -{ 0x0958, 0x0958, 0x0958 }, -{ 0x0959, 0x0959, 0x0959 }, -{ 0x095A, 0x095A, 0x095A }, -{ 0x095B, 0x095B, 0x095B }, -{ 0x095C, 0x095C, 0x095C }, -{ 0x095D, 0x095D, 0x095D }, -{ 0x095E, 0x095E, 0x095E }, -{ 0x095F, 0x095F, 0x095F }, -{ 0x0960, 0x0960, 0x0960 }, -{ 0x0961, 0x0961, 0x0961 }, -{ 0x0962, 0x0962, 0x0962 }, -{ 0x0963, 0x0963, 0x0963 }, -{ 0x097D, 0x097D, 0x097D }, -{ 0x0981, 0x0981, 0x0981 }, -{ 0x0985, 0x0985, 0x0985 }, -{ 0x0986, 0x0986, 0x0986 }, -{ 0x0987, 0x0987, 0x0987 }, -{ 0x0988, 0x0988, 0x0988 }, -{ 0x0989, 0x0989, 0x0989 }, -{ 0x098A, 0x098A, 0x098A }, -{ 0x098B, 0x098B, 0x098B }, -{ 0x098C, 0x098C, 0x098C }, -{ 0x098F, 0x098F, 0x098F }, -{ 0x0990, 0x0990, 0x0990 }, -{ 0x0993, 0x0993, 0x0993 }, -{ 0x0994, 0x0994, 0x0994 }, -{ 0x0995, 0x0995, 0x0995 }, -{ 0x0996, 0x0996, 0x0996 }, -{ 0x0997, 0x0997, 0x0997 }, -{ 0x0998, 0x0998, 0x0998 }, -{ 0x0999, 0x0999, 0x0999 }, -{ 0x099A, 0x099A, 0x099A }, -{ 0x099B, 0x099B, 0x099B }, -{ 0x099C, 0x099C, 0x099C }, -{ 0x099D, 0x099D, 0x099D }, -{ 0x099E, 0x099E, 0x099E }, -{ 0x099F, 0x099F, 0x099F }, -{ 0x09A0, 0x09A0, 0x09A0 }, -{ 0x09A1, 0x09A1, 0x09A1 }, -{ 0x09A2, 0x09A2, 0x09A2 }, -{ 0x09A3, 0x09A3, 0x09A3 }, -{ 0x09A4, 0x09A4, 0x09A4 }, -{ 0x09A5, 0x09A5, 0x09A5 }, -{ 0x09A6, 0x09A6, 0x09A6 }, -{ 0x09A7, 0x09A7, 0x09A7 }, -{ 0x09A8, 0x09A8, 0x09A8 }, -{ 0x09AA, 0x09AA, 0x09AA }, -{ 0x09AB, 0x09AB, 0x09AB }, -{ 0x09AC, 0x09AC, 0x09AC }, -{ 0x09AD, 0x09AD, 0x09AD }, -{ 0x09AE, 0x09AE, 0x09AE }, -{ 0x09AF, 0x09AF, 0x09AF }, -{ 0x09B0, 0x09B0, 0x09B0 }, -{ 0x09B2, 0x09B2, 0x09B2 }, -{ 0x09B6, 0x09B6, 0x09B6 }, -{ 0x09B7, 0x09B7, 0x09B7 }, -{ 0x09B8, 0x09B8, 0x09B8 }, -{ 0x09B9, 0x09B9, 0x09B9 }, -{ 0x09BC, 0x09BC, 0x09BC }, -{ 0x09BD, 0x09BD, 0x09BD }, -{ 0x09C1, 0x09C1, 0x09C1 }, -{ 0x09C2, 0x09C2, 0x09C2 }, -{ 0x09C3, 0x09C3, 0x09C3 }, -{ 0x09C4, 0x09C4, 0x09C4 }, -{ 0x09CD, 0x09CD, 0x09CD }, -{ 0x09CE, 0x09CE, 0x09CE }, -{ 0x09DC, 0x09DC, 0x09DC }, -{ 0x09DD, 0x09DD, 0x09DD }, -{ 0x09DF, 0x09DF, 0x09DF }, -{ 0x09E0, 0x09E0, 0x09E0 }, -{ 0x09E1, 0x09E1, 0x09E1 }, -{ 0x09E2, 0x09E2, 0x09E2 }, -{ 0x09E3, 0x09E3, 0x09E3 }, -{ 0x09F0, 0x09F0, 0x09F0 }, -{ 0x09F1, 0x09F1, 0x09F1 }, -{ 0x0A01, 0x0A01, 0x0A01 }, -{ 0x0A02, 0x0A02, 0x0A02 }, -{ 0x0A05, 0x0A05, 0x0A05 }, -{ 0x0A06, 0x0A06, 0x0A06 }, -{ 0x0A07, 0x0A07, 0x0A07 }, -{ 0x0A08, 0x0A08, 0x0A08 }, -{ 0x0A09, 0x0A09, 0x0A09 }, -{ 0x0A0A, 0x0A0A, 0x0A0A }, -{ 0x0A0F, 0x0A0F, 0x0A0F }, -{ 0x0A10, 0x0A10, 0x0A10 }, -{ 0x0A13, 0x0A13, 0x0A13 }, -{ 0x0A14, 0x0A14, 0x0A14 }, -{ 0x0A15, 0x0A15, 0x0A15 }, -{ 0x0A16, 0x0A16, 0x0A16 }, -{ 0x0A17, 0x0A17, 0x0A17 }, -{ 0x0A18, 0x0A18, 0x0A18 }, -{ 0x0A19,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}, -{ 0x0FA8, 0x0FA8, 0x0FA8 }, -{ 0x0FA9, 0x0FA9, 0x0FA9 }, -{ 0x0FAA, 0x0FAA, 0x0FAA }, -{ 0x0FAB, 0x0FAB, 0x0FAB }, -{ 0x0FAC, 0x0FAC, 0x0FAC }, -{ 0x0FAD, 0x0FAD, 0x0FAD }, -{ 0x0FAE, 0x0FAE, 0x0FAE }, -{ 0x0FAF, 0x0FAF, 0x0FAF }, -{ 0x0FB0, 0x0FB0, 0x0FB0 }, -{ 0x0FB1, 0x0FB1, 0x0FB1 }, -{ 0x0FB2, 0x0FB2, 0x0FB2 }, -{ 0x0FB3, 0x0FB3, 0x0FB3 }, -{ 0x0FB4, 0x0FB4, 0x0FB4 }, -{ 0x0FB5, 0x0FB5, 0x0FB5 }, -{ 0x0FB6, 0x0FB6, 0x0FB6 }, -{ 0x0FB7, 0x0FB7, 0x0FB7 }, -{ 0x0FB8, 0x0FB8, 0x0FB8 }, -{ 0x0FB9, 0x0FB9, 0x0FB9 }, -{ 0x0FBA, 0x0FBA, 0x0FBA }, -{ 0x0FBB, 0x0FBB, 0x0FBB }, -{ 0x0FBC, 0x0FBC, 0x0FBC }, -{ 0x0FC6, 0x0FC6, 0x0FC6 }, -{ 0x1000, 0x1000, 0x1000 }, -{ 0x1001, 0x1001, 0x1001 }, -{ 0x1002, 0x1002, 0x1002 }, -{ 0x1003, 0x1003, 0x1003 }, -{ 0x1004, 0x1004, 0x1004 }, -{ 0x1005, 0x1005, 0x1005 }, -{ 0x1006, 0x1006, 0x1006 }, -{ 0x1007, 0x1007, 0x1007 }, -{ 0x1008, 0x1008, 0x1008 }, -{ 0x1009, 0x1009, 0x1009 }, -{ 0x100A, 0x100A, 0x100A }, -{ 0x100B, 0x100B, 0x100B }, -{ 0x100C, 0x100C, 0x100C }, -{ 0x100D, 0x100D, 0x100D }, -{ 0x100E, 0x100E, 0x100E }, -{ 0x100F, 0x100F, 0x100F }, -{ 0x1010, 0x1010, 0x1010 }, -{ 0x1011, 0x1011, 0x1011 }, -{ 0x1012, 0x1012, 0x1012 }, -{ 0x1013, 0x1013, 0x1013 }, -{ 0x1014, 0x1014, 0x1014 }, -{ 0x1015, 0x1015, 0x1015 }, -{ 0x1016, 0x1016, 0x1016 }, -{ 0x1017, 0x1017, 0x1017 }, -{ 0x1018, 0x1018, 0x1018 }, -{ 0x1019, 0x1019, 0x1019 }, -{ 0x101A, 0x101A, 0x101A }, -{ 0x101B, 0x101B, 0x101B }, -{ 0x101C, 0x101C, 0x101C }, -{ 0x101D, 0x101D, 0x101D }, -{ 0x101E, 0x101E, 0x101E }, -{ 0x101F, 0x101F, 0x101F }, -{ 0x1020, 0x1020, 0x1020 }, -{ 0x1021, 0x1021, 0x1021 }, -{ 0x1023, 0x1023, 0x1023 }, -{ 0x1024, 0x1024, 0x1024 }, -{ 0x1025, 0x1025, 0x1025 }, -{ 0x1026, 0x1026, 0x1026 }, -{ 0x1027, 0x1027, 0x1027 }, -{ 0x1029, 0x1029, 0x1029 }, -{ 0x102A, 0x102A, 0x102A }, -{ 0x102D, 0x102D, 0x102D }, -{ 0x102E, 0x102E, 0x102E }, -{ 0x102F, 0x102F, 0x102F }, -{ 0x1030, 0x1030, 0x1030 }, -{ 0x1032, 0x1032, 0x1032 }, -{ 0x1036, 0x1036, 0x1036 }, -{ 0x1037, 0x1037, 0x1037 }, -{ 0x1039, 0x1039, 0x1039 }, -{ 0x1050, 0x1050, 0x1050 }, -{ 0x1051, 0x1051, 0x1051 }, -{ 0x1052, 0x1052, 0x1052 }, -{ 0x1053, 0x1053, 0x1053 }, -{ 0x1054, 0x1054, 0x1054 }, -{ 0x1055, 0x1055, 0x1055 }, -{ 0x1058, 0x1058, 0x1058 }, -{ 0x1059, 0x1059, 0x1059 }, -{ 0x10A0, 0x10A0, 0x2D00 }, -{ 0x10A1, 0x10A1, 0x2D01 }, -{ 0x10A2, 0x10A2, 0x2D02 }, -{ 0x10A3, 0x10A3, 0x2D03 }, -{ 0x10A4, 0x10A4, 0x2D04 }, -{ 0x10A5, 0x10A5, 0x2D05 }, -{ 0x10A6, 0x10A6, 0x2D06 }, -{ 0x10A7, 0x10A7, 0x2D07 }, -{ 0x10A8, 0x10A8, 0x2D08 }, -{ 0x10A9, 0x10A9, 0x2D09 }, -{ 0x10AA, 0x10AA, 0x2D0A }, -{ 0x10AB, 0x10AB, 0x2D0B }, -{ 0x10AC, 0x10AC, 0x2D0C }, -{ 0x10AD, 0x10AD, 0x2D0D }, -{ 0x10AE, 0x10AE, 0x2D0E }, -{ 0x10AF, 0x10AF, 0x2D0F }, -{ 0x10B0, 0x10B0, 0x2D10 }, -{ 0x10B1, 0x10B1, 0x2D11 }, -{ 0x10B2, 0x10B2, 0x2D12 }, -{ 0x10B3, 0x10B3, 0x2D13 }, -{ 0x10B4, 0x10B4, 0x2D14 }, -{ 0x10B5, 0x10B5, 0x2D15 }, -{ 0x10B6, 0x10B6, 0x2D16 }, -{ 0x10B7, 0x10B7, 0x2D17 }, -{ 0x10B8, 0x10B8, 0x2D18 }, -{ 0x10B9, 0x10B9, 0x2D19 }, -{ 0x10BA, 0x10BA, 0x2D1A }, -{ 0x10BB, 0x10BB, 0x2D1B }, -{ 0x10BC, 0x10BC, 0x2D1C }, -{ 0x10BD, 0x10BD, 0x2D1D }, -{ 0x10BE, 0x10BE, 0x2D1E }, -{ 0x10BF, 0x10BF, 0x2D1F }, -{ 0x10C0, 0x10C0, 0x2D20 }, -{ 0x10C1, 0x10C1, 0x2D21 }, -{ 0x10C2, 0x10C2, 0x2D22 }, -{ 0x10C3, 0x10C3, 0x2D23 }, -{ 0x10C4, 0x10C4, 0x2D24 }, -{ 0x10C5, 0x10C5, 0x2D25 }, -{ 0x10D0, 0x10D0, 0x10D0 }, -{ 0x10D1, 0x10D1, 0x10D1 }, -{ 0x10D2, 0x10D2, 0x10D2 }, -{ 0x10D3, 0x10D3, 0x10D3 }, -{ 0x10D4, 0x10D4, 0x10D4 }, -{ 0x10D5, 0x10D5, 0x10D5 }, -{ 0x10D6, 0x10D6, 0x10D6 }, -{ 0x10D7, 0x10D7, 0x10D7 }, -{ 0x10D8, 0x10D8, 0x10D8 }, -{ 0x10D9, 0x10D9, 0x10D9 }, -{ 0x10DA, 0x10DA, 0x10DA }, -{ 0x10DB, 0x10DB, 0x10DB }, -{ 0x10DC, 0x10DC, 0x10DC }, -{ 0x10DD, 0x10DD, 0x10DD }, -{ 0x10DE, 0x10DE, 0x10DE }, -{ 0x10DF, 0x10DF, 0x10DF }, -{ 0x10E0, 0x10E0, 0x10E0 }, -{ 0x10E1, 0x10E1, 0x10E1 }, -{ 0x10E2, 0x10E2, 0x10E2 }, -{ 0x10E3, 0x10E3, 0x10E3 }, -{ 0x10E4, 0x10E4, 0x10E4 }, -{ 0x10E5, 0x10E5, 0x10E5 }, -{ 0x10E6, 0x10E6, 0x10E6 }, -{ 0x10E7, 0x10E7, 0x10E7 }, -{ 0x10E8, 0x10E8, 0x10E8 }, -{ 0x10E9, 0x10E9, 0x10E9 }, -{ 0x10EA, 0x10EA, 0x10EA }, -{ 0x10EB, 0x10EB, 0x10EB }, -{ 0x10EC, 0x10EC, 0x10EC }, -{ 0x10ED, 0x10ED, 0x10ED }, -{ 0x10EE, 0x10EE, 0x10EE }, -{ 0x10EF, 0x10EF, 0x10EF }, -{ 0x10F0, 0x10F0, 0x10F0 }, -{ 0x10F1, 0x10F1, 0x10F1 }, -{ 0x10F2, 0x10F2, 0x10F2 }, -{ 0x10F3, 0x10F3, 0x10F3 }, -{ 0x10F4, 0x10F4, 0x10F4 }, -{ 0x10F5, 0x10F5, 0x10F5 }, -{ 0x10F6, 0x10F6, 0x10F6 }, -{ 0x10F7, 0x10F7, 0x10F7 }, -{ 0x10F8, 0x10F8, 0x10F8 }, -{ 0x10F9, 0x10F9, 0x10F9 }, -{ 0x10FA, 0x10FA, 0x10FA }, -{ 0x10FC, 0x10FC, 0x10FC }, -{ 0x1100, 0x1100, 0x1100 }, -{ 0x1101, 0x1101, 0x1101 }, -{ 0x1102, 0x1102, 0x1102 }, -{ 0x1103, 0x1103, 0x1103 }, -{ 0x1104, 0x1104, 0x1104 }, -{ 0x1105, 0x1105, 0x1105 }, -{ 0x1106, 0x1106, 0x1106 }, -{ 0x1107, 0x1107, 0x1107 }, -{ 0x1108, 0x1108, 0x1108 }, -{ 0x1109, 0x1109, 0x1109 }, -{ 0x110A, 0x110A, 0x110A }, -{ 0x110B, 0x110B, 0x110B }, -{ 0x110C, 0x110C, 0x110C }, -{ 0x110D, 0x110D, 0x110D }, -{ 0x110E, 0x110E, 0x110E }, -{ 0x110F, 0x110F, 0x110F }, -{ 0x1110, 0x1110, 0x1110 }, -{ 0x1111, 0x1111, 0x1111 }, -{ 0x1112, 0x1112, 0x1112 }, -{ 0x1113, 0x1113, 0x1113 }, -{ 0x1114, 0x1114, 0x1114 }, -{ 0x1115, 0x1115, 0x1115 }, -{ 0x1116, 0x1116, 0x1116 }, -{ 0x1117, 0x1117, 0x1117 }, -{ 0x1118, 0x1118, 0x1118 }, -{ 0x1119, 0x1119, 0x1119 }, -{ 0x111A, 0x111A, 0x111A }, -{ 0x111B, 0x111B, 0x111B }, -{ 0x111C, 0x111C, 0x111C }, -{ 0x111D, 0x111D, 0x111D }, -{ 0x111E, 0x111E, 0x111E }, -{ 0x111F, 0x111F, 0x111F }, -{ 0x1120, 0x1120, 0x1120 }, -{ 0x1121, 0x1121, 0x1121 }, -{ 0x1122, 0x1122, 0x1122 }, -{ 0x1123, 0x1123, 0x1123 }, -{ 0x1124, 0x1124, 0x1124 }, -{ 0x1125, 0x1125, 0x1125 }, -{ 0x1126, 0x1126, 0x1126 }, -{ 0x1127, 0x1127, 0x1127 }, -{ 0x1128, 0x1128, 0x1128 }, -{ 0x1129, 0x1129, 0x1129 }, -{ 0x112A, 0x112A, 0x112A }, -{ 0x112B, 0x112B, 0x112B }, -{ 0x112C, 0x112C, 0x112C }, -{ 0x112D, 0x112D, 0x112D }, -{ 0x112E, 0x112E, 0x112E }, -{ 0x112F, 0x112F, 0x112F }, -{ 0x1130, 0x1130, 0x1130 }, -{ 0x1131, 0x1131, 0x1131 }, -{ 0x1132, 0x1132, 0x1132 }, -{ 0x1133, 0x1133, 0x1133 }, -{ 0x1134, 0x1134, 0x1134 }, -{ 0x1135, 0x1135, 0x1135 }, -{ 0x1136, 0x1136, 0x1136 }, -{ 0x1137, 0x1137, 0x1137 }, -{ 0x1138, 0x1138, 0x1138 }, -{ 0x1139, 0x1139, 0x1139 }, -{ 0x113A, 0x113A, 0x113A }, -{ 0x113B, 0x113B, 0x113B }, -{ 0x113C, 0x113C, 0x113C }, -{ 0x113D, 0x113D, 0x113D }, -{ 0x113E, 0x113E, 0x113E }, -{ 0x113F, 0x113F, 0x113F }, -{ 0x1140, 0x1140, 0x1140 }, -{ 0x1141, 0x1141, 0x1141 }, -{ 0x1142, 0x1142, 0x1142 }, -{ 0x1143, 0x1143, 0x1143 }, -{ 0x1144, 0x1144, 0x1144 }, -{ 0x1145, 0x1145, 0x1145 }, -{ 0x1146, 0x1146, 0x1146 }, -{ 0x1147, 0x1147, 0x1147 }, -{ 0x1148, 0x1148, 0x1148 }, -{ 0x1149, 0x1149, 0x1149 }, -{ 0x114A, 0x114A, 0x114A }, -{ 0x114B, 0x114B, 0x114B }, -{ 0x114C, 0x114C, 0x114C }, -{ 0x114D, 0x114D, 0x114D }, -{ 0x114E, 0x114E, 0x114E }, -{ 0x114F, 0x114F, 0x114F }, -{ 0x1150, 0x1150, 0x1150 }, -{ 0x1151, 0x1151, 0x1151 }, -{ 0x1152, 0x1152, 0x1152 }, -{ 0x1153, 0x1153, 0x1153 }, -{ 0x1154, 0x1154, 0x1154 }, -{ 0x1155, 0x1155, 0x1155 }, -{ 0x1156, 0x1156, 0x1156 }, -{ 0x1157, 0x1157, 0x1157 }, -{ 0x1158, 0x1158, 0x1158 }, -{ 0x1159, 0x1159, 0x1159 }, -{ 0x115F, 0x115F, 0x115F }, -{ 0x1160, 0x1160, 0x1160 }, -{ 0x1161, 0x1161, 0x1161 }, -{ 0x1162, 0x1162, 0x1162 }, -{ 0x1163, 0x1163, 0x1163 }, -{ 0x1164, 0x1164, 0x1164 }, -{ 0x1165, 0x1165, 0x1165 }, -{ 0x1166, 0x1166, 0x1166 }, -{ 0x1167, 0x1167, 0x1167 }, -{ 0x1168, 0x1168, 0x1168 }, -{ 0x1169, 0x1169, 0x1169 }, -{ 0x116A, 0x116A, 0x116A }, -{ 0x116B, 0x116B, 0x116B }, -{ 0x116C, 0x116C, 0x116C }, -{ 0x116D, 0x116D, 0x116D }, -{ 0x116E, 0x116E, 0x116E }, -{ 0x116F, 0x116F, 0x116F }, -{ 0x1170, 0x1170, 0x1170 }, -{ 0x1171, 0x1171, 0x1171 }, -{ 0x1172, 0x1172, 0x1172 }, -{ 0x1173, 0x1173, 0x1173 }, -{ 0x1174, 0x1174, 0x1174 }, -{ 0x1175, 0x1175, 0x1175 }, -{ 0x1176, 0x1176, 0x1176 }, -{ 0x1177, 0x1177, 0x1177 }, -{ 0x1178, 0x1178, 0x1178 }, -{ 0x1179, 0x1179, 0x1179 }, -{ 0x117A, 0x117A, 0x117A }, -{ 0x117B, 0x117B, 0x117B }, -{ 0x117C, 0x117C, 0x117C }, -{ 0x117D, 0x117D, 0x117D }, -{ 0x117E, 0x117E, 0x117E }, -{ 0x117F, 0x117F, 0x117F }, -{ 0x1180, 0x1180, 0x1180 }, -{ 0x1181, 0x1181, 0x1181 }, -{ 0x1182, 0x1182, 0x1182 }, -{ 0x1183, 0x1183, 0x1183 }, -{ 0x1184, 0x1184, 0x1184 }, -{ 0x1185, 0x1185, 0x1185 }, -{ 0x1186, 0x1186, 0x1186 }, -{ 0x1187, 0x1187, 0x1187 }, -{ 0x1188, 0x1188, 0x1188 }, -{ 0x1189, 0x1189, 0x1189 }, -{ 0x118A, 0x118A, 0x118A }, -{ 0x118B, 0x118B, 0x118B }, -{ 0x118C, 0x118C, 0x118C }, -{ 0x118D, 0x118D, 0x118D }, -{ 0x118E, 0x118E, 0x118E }, -{ 0x118F, 0x118F, 0x118F }, -{ 0x1190, 0x1190, 0x1190 }, -{ 0x1191, 0x1191, 0x1191 }, -{ 0x1192, 0x1192, 0x1192 }, -{ 0x1193, 0x1193, 0x1193 }, -{ 0x1194, 0x1194, 0x1194 }, -{ 0x1195, 0x1195, 0x1195 }, -{ 0x1196, 0x1196, 0x1196 }, -{ 0x1197, 0x1197, 0x1197 }, -{ 0x1198, 0x1198, 0x1198 }, -{ 0x1199, 0x1199, 0x1199 }, -{ 0x119A, 0x119A, 0x119A }, -{ 0x119B, 0x119B, 0x119B }, -{ 0x119C, 0x119C, 0x119C }, -{ 0x119D, 0x119D, 0x119D }, -{ 0x119E, 0x119E, 0x119E }, -{ 0x119F, 0x119F, 0x119F }, -{ 0x11A0, 0x11A0, 0x11A0 }, -{ 0x11A1, 0x11A1, 0x11A1 }, -{ 0x11A2, 0x11A2, 0x11A2 }, -{ 0x11A8, 0x11A8, 0x11A8 }, -{ 0x11A9, 0x11A9, 0x11A9 }, -{ 0x11AA, 0x11AA, 0x11AA }, -{ 0x11AB, 0x11AB, 0x11AB }, -{ 0x11AC, 0x11AC, 0x11AC }, -{ 0x11AD, 0x11AD, 0x11AD }, -{ 0x11AE, 0x11AE, 0x11AE }, -{ 0x11AF, 0x11AF, 0x11AF }, -{ 0x11B0, 0x11B0, 0x11B0 }, -{ 0x11B1, 0x11B1, 0x11B1 }, -{ 0x11B2, 0x11B2, 0x11B2 }, -{ 0x11B3, 0x11B3, 0x11B3 }, -{ 0x11B4, 0x11B4, 0x11B4 }, -{ 0x11B5, 0x11B5, 0x11B5 }, -{ 0x11B6, 0x11B6, 0x11B6 }, -{ 0x11B7, 0x11B7, 0x11B7 }, -{ 0x11B8, 0x11B8, 0x11B8 }, -{ 0x11B9, 0x11B9, 0x11B9 }, -{ 0x11BA, 0x11BA, 0x11BA }, -{ 0x11BB, 0x11BB, 0x11BB }, -{ 0x11BC, 0x11BC, 0x11BC }, -{ 0x11BD, 0x11BD, 0x11BD }, -{ 0x11BE, 0x11BE, 0x11BE }, -{ 0x11BF, 0x11BF, 0x11BF }, -{ 0x11C0, 0x11C0, 0x11C0 }, -{ 0x11C1, 0x11C1, 0x11C1 }, -{ 0x11C2, 0x11C2, 0x11C2 }, -{ 0x11C3, 0x11C3, 0x11C3 }, -{ 0x11C4, 0x11C4, 0x11C4 }, -{ 0x11C5, 0x11C5, 0x11C5 }, -{ 0x11C6, 0x11C6, 0x11C6 }, -{ 0x11C7, 0x11C7, 0x11C7 }, -{ 0x11C8, 0x11C8, 0x11C8 }, -{ 0x11C9, 0x11C9, 0x11C9 }, -{ 0x11CA, 0x11CA, 0x11CA }, -{ 0x11CB, 0x11CB, 0x11CB }, -{ 0x11CC, 0x11CC, 0x11CC }, -{ 0x11CD, 0x11CD, 0x11CD }, -{ 0x11CE, 0x11CE, 0x11CE }, -{ 0x11CF, 0x11CF, 0x11CF }, -{ 0x11D0, 0x11D0, 0x11D0 }, -{ 0x11D1, 0x11D1, 0x11D1 }, -{ 0x11D2, 0x11D2, 0x11D2 }, -{ 0x11D3, 0x11D3, 0x11D3 }, -{ 0x11D4, 0x11D4, 0x11D4 }, -{ 0x11D5, 0x11D5, 0x11D5 }, -{ 0x11D6, 0x11D6, 0x11D6 }, -{ 0x11D7, 0x11D7, 0x11D7 }, -{ 0x11D8, 0x11D8, 0x11D8 }, -{ 0x11D9, 0x11D9, 0x11D9 }, -{ 0x11DA, 0x11DA, 0x11DA }, -{ 0x11DB, 0x11DB, 0x11DB }, -{ 0x11DC, 0x11DC, 0x11DC }, -{ 0x11DD, 0x11DD, 0x11DD }, -{ 0x11DE, 0x11DE, 0x11DE }, -{ 0x11DF, 0x11DF, 0x11DF }, -{ 0x11E0, 0x11E0, 0x11E0 }, -{ 0x11E1, 0x11E1, 0x11E1 }, -{ 0x11E2, 0x11E2, 0x11E2 }, -{ 0x11E3, 0x11E3, 0x11E3 }, -{ 0x11E4, 0x11E4, 0x11E4 }, -{ 0x11E5, 0x11E5, 0x11E5 }, -{ 0x11E6, 0x11E6, 0x11E6 }, -{ 0x11E7, 0x11E7, 0x11E7 }, -{ 0x11E8, 0x11E8, 0x11E8 }, -{ 0x11E9, 0x11E9, 0x11E9 }, -{ 0x11EA, 0x11EA, 0x11EA }, -{ 0x11EB, 0x11EB, 0x11EB }, -{ 0x11EC, 0x11EC, 0x11EC }, -{ 0x11ED, 0x11ED, 0x11ED }, -{ 0x11EE, 0x11EE, 0x11EE }, -{ 0x11EF, 0x11EF, 0x11EF }, -{ 0x11F0, 0x11F0, 0x11F0 }, -{ 0x11F1, 0x11F1, 0x11F1 }, -{ 0x11F2, 0x11F2, 0x11F2 }, -{ 0x11F3, 0x11F3, 0x11F3 }, -{ 0x11F4, 0x11F4, 0x11F4 }, -{ 0x11F5, 0x11F5, 0x11F5 }, -{ 0x11F6, 0x11F6, 0x11F6 }, -{ 0x11F7, 0x11F7, 0x11F7 }, -{ 0x11F8, 0x11F8, 0x11F8 }, -{ 0x11F9, 0x11F9, 0x11F9 }, -{ 0x1200, 0x1200, 0x1200 }, -{ 0x1201, 0x1201, 0x1201 }, -{ 0x1202, 0x1202, 0x1202 }, -{ 0x1203, 0x1203, 0x1203 }, -{ 0x1204, 0x1204, 0x1204 }, -{ 0x1205, 0x1205, 0x1205 }, -{ 0x1206, 0x1206, 0x1206 }, -{ 0x1207, 0x1207, 0x1207 }, -{ 0x1208, 0x1208, 0x1208 }, -{ 0x1209, 0x1209, 0x1209 }, -{ 0x120A, 0x120A, 0x120A }, -{ 0x120B, 0x120B, 0x120B }, -{ 0x120C, 0x120C, 0x120C }, -{ 0x120D, 0x120D, 0x120D }, -{ 0x120E, 0x120E, 0x120E }, -{ 0x120F, 0x120F, 0x120F }, -{ 0x1210, 0x1210, 0x1210 }, -{ 0x1211, 0x1211, 0x1211 }, -{ 0x1212, 0x1212, 0x1212 }, -{ 0x1213, 0x1213, 0x1213 }, -{ 0x1214, 0x1214, 0x1214 }, -{ 0x1215, 0x1215, 0x1215 }, -{ 0x1216, 0x1216, 0x1216 }, -{ 0x1217, 0x1217, 0x1217 }, -{ 0x1218, 0x1218, 0x1218 }, -{ 0x1219, 0x1219, 0x1219 }, -{ 0x121A, 0x121A, 0x121A }, -{ 0x121B, 0x121B, 0x121B }, -{ 0x121C, 0x121C, 0x121C }, -{ 0x121D, 0x121D, 0x121D }, -{ 0x121E, 0x121E, 0x121E }, -{ 0x121F, 0x121F, 0x121F }, -{ 0x1220, 0x1220, 0x1220 }, -{ 0x1221, 0x1221, 0x1221 }, -{ 0x1222, 0x1222, 0x1222 }, -{ 0x1223, 0x1223, 0x1223 }, -{ 0x1224, 0x1224, 0x1224 }, -{ 0x1225, 0x1225, 0x1225 }, -{ 0x1226, 0x1226, 0x1226 }, -{ 0x1227, 0x1227, 0x1227 }, -{ 0x1228, 0x1228, 0x1228 }, -{ 0x1229, 0x1229, 0x1229 }, -{ 0x122A, 0x122A, 0x122A }, -{ 0x122B, 0x122B, 0x122B }, -{ 0x122C, 0x122C, 0x122C }, -{ 0x122D, 0x122D, 0x122D }, -{ 0x122E, 0x122E, 0x122E }, -{ 0x122F, 0x122F, 0x122F }, -{ 0x1230, 0x1230, 0x1230 }, -{ 0x1231, 0x1231, 0x1231 }, -{ 0x1232, 0x1232, 0x1232 }, -{ 0x1233, 0x1233, 0x1233 }, -{ 0x1234, 0x1234, 0x1234 }, -{ 0x1235, 0x1235, 0x1235 }, -{ 0x1236, 0x1236, 0x1236 }, -{ 0x1237, 0x1237, 0x1237 }, -{ 0x1238, 0x1238, 0x1238 }, -{ 0x1239, 0x1239, 0x1239 }, -{ 0x123A, 0x123A, 0x123A }, -{ 0x123B, 0x123B, 0x123B }, -{ 0x123C, 0x123C, 0x123C }, -{ 0x123D, 0x123D, 0x123D }, -{ 0x123E, 0x123E, 0x123E }, -{ 0x123F, 0x123F, 0x123F }, -{ 0x1240, 0x1240, 0x1240 }, -{ 0x1241, 0x1241, 0x1241 }, -{ 0x1242, 0x1242, 0x1242 }, -{ 0x1243, 0x1243, 0x1243 }, -{ 0x1244, 0x1244, 0x1244 }, -{ 0x1245, 0x1245, 0x1245 }, -{ 0x1246, 0x1246, 0x1246 }, -{ 0x1247, 0x1247, 0x1247 }, -{ 0x1248, 0x1248, 0x1248 }, -{ 0x124A, 0x124A, 0x124A }, -{ 0x124B, 0x124B, 0x124B }, -{ 0x124C, 0x124C, 0x124C }, -{ 0x124D, 0x124D, 0x124D }, -{ 0x1250, 0x1250, 0x1250 }, -{ 0x1251, 0x1251, 0x1251 }, -{ 0x1252, 0x1252, 0x1252 }, -{ 0x1253, 0x1253, 0x1253 }, -{ 0x1254, 0x1254, 0x1254 }, -{ 0x1255, 0x1255, 0x1255 }, -{ 0x1256, 0x1256, 0x1256 }, -{ 0x1258, 0x1258, 0x1258 }, -{ 0x125A, 0x125A, 0x125A }, -{ 0x125B, 0x125B, 0x125B }, -{ 0x125C, 0x125C, 0x125C }, -{ 0x125D, 0x125D, 0x125D }, -{ 0x1260, 0x1260, 0x1260 }, -{ 0x1261, 0x1261, 0x1261 }, -{ 0x1262, 0x1262, 0x1262 }, -{ 0x1263, 0x1263, 0x1263 }, -{ 0x1264, 0x1264, 0x1264 }, -{ 0x1265, 0x1265, 0x1265 }, -{ 0x1266, 0x1266, 0x1266 }, -{ 0x1267, 0x1267, 0x1267 }, -{ 0x1268, 0x1268, 0x1268 }, -{ 0x1269, 0x1269, 0x1269 }, -{ 0x126A, 0x126A, 0x126A }, -{ 0x126B, 0x126B, 0x126B }, -{ 0x126C, 0x126C, 0x126C }, -{ 0x126D, 0x126D, 0x126D }, -{ 0x126E, 0x126E, 0x126E }, -{ 0x126F, 0x126F, 0x126F }, -{ 0x1270, 0x1270, 0x1270 }, -{ 0x1271, 0x1271, 0x1271 }, -{ 0x1272, 0x1272, 0x1272 }, -{ 0x1273, 0x1273, 0x1273 }, -{ 0x1274, 0x1274, 0x1274 }, -{ 0x1275, 0x1275, 0x1275 }, -{ 0x1276, 0x1276, 0x1276 }, -{ 0x1277, 0x1277, 0x1277 }, -{ 0x1278, 0x1278, 0x1278 }, -{ 0x1279, 0x1279, 0x1279 }, -{ 0x127A, 0x127A, 0x127A }, -{ 0x127B, 0x127B, 0x127B }, -{ 0x127C, 0x127C, 0x127C }, -{ 0x127D, 0x127D, 0x127D }, -{ 0x127E, 0x127E, 0x127E }, -{ 0x127F, 0x127F, 0x127F }, -{ 0x1280, 0x1280, 0x1280 }, -{ 0x1281, 0x1281, 0x1281 }, -{ 0x1282, 0x1282, 0x1282 }, -{ 0x1283, 0x1283, 0x1283 }, -{ 0x1284, 0x1284, 0x1284 }, -{ 0x1285, 0x1285, 0x1285 }, -{ 0x1286, 0x1286, 0x1286 }, -{ 0x1287, 0x1287, 0x1287 }, -{ 0x1288, 0x1288, 0x1288 }, -{ 0x128A, 0x128A, 0x128A }, -{ 0x128B, 0x128B, 0x128B }, -{ 0x128C, 0x128C, 0x128C }, -{ 0x128D, 0x128D, 0x128D }, -{ 0x1290, 0x1290, 0x1290 }, -{ 0x1291, 0x1291, 0x1291 }, -{ 0x1292, 0x1292, 0x1292 }, -{ 0x1293, 0x1293, 0x1293 }, -{ 0x1294, 0x1294, 0x1294 }, -{ 0x1295, 0x1295, 0x1295 }, -{ 0x1296, 0x1296, 0x1296 }, -{ 0x1297, 0x1297, 0x1297 }, -{ 0x1298, 0x1298, 0x1298 }, -{ 0x1299, 0x1299, 0x1299 }, -{ 0x129A, 0x129A, 0x129A }, -{ 0x129B, 0x129B, 0x129B }, -{ 0x129C, 0x129C, 0x129C }, -{ 0x129D, 0x129D, 0x129D }, -{ 0x129E, 0x129E, 0x129E }, -{ 0x129F, 0x129F, 0x129F }, -{ 0x12A0, 0x12A0, 0x12A0 }, -{ 0x12A1, 0x12A1, 0x12A1 }, -{ 0x12A2, 0x12A2, 0x12A2 }, -{ 0x12A3, 0x12A3, 0x12A3 }, -{ 0x12A4, 0x12A4, 0x12A4 }, -{ 0x12A5, 0x12A5, 0x12A5 }, -{ 0x12A6, 0x12A6, 0x12A6 }, -{ 0x12A7, 0x12A7, 0x12A7 }, -{ 0x12A8, 0x12A8, 0x12A8 }, -{ 0x12A9, 0x12A9, 0x12A9 }, -{ 0x12AA, 0x12AA, 0x12AA }, -{ 0x12AB, 0x12AB, 0x12AB }, -{ 0x12AC, 0x12AC, 0x12AC }, -{ 0x12AD, 0x12AD, 0x12AD }, -{ 0x12AE, 0x12AE, 0x12AE }, -{ 0x12AF, 0x12AF, 0x12AF }, -{ 0x12B0, 0x12B0, 0x12B0 }, -{ 0x12B2, 0x12B2, 0x12B2 }, -{ 0x12B3, 0x12B3, 0x12B3 }, -{ 0x12B4, 0x12B4, 0x12B4 }, -{ 0x12B5, 0x12B5, 0x12B5 }, -{ 0x12B8, 0x12B8, 0x12B8 }, -{ 0x12B9, 0x12B9, 0x12B9 }, -{ 0x12BA, 0x12BA, 0x12BA }, -{ 0x12BB, 0x12BB, 0x12BB }, -{ 0x12BC, 0x12BC, 0x12BC }, -{ 0x12BD, 0x12BD, 0x12BD }, -{ 0x12BE, 0x12BE, 0x12BE }, -{ 0x12C0, 0x12C0, 0x12C0 }, -{ 0x12C2, 0x12C2, 0x12C2 }, -{ 0x12C3, 0x12C3, 0x12C3 }, -{ 0x12C4, 0x12C4, 0x12C4 }, -{ 0x12C5, 0x12C5, 0x12C5 }, -{ 0x12C8, 0x12C8, 0x12C8 }, -{ 0x12C9, 0x12C9, 0x12C9 }, -{ 0x12CA, 0x12CA, 0x12CA }, -{ 0x12CB, 0x12CB, 0x12CB }, -{ 0x12CC, 0x12CC, 0x12CC }, -{ 0x12CD, 0x12CD, 0x12CD }, -{ 0x12CE, 0x12CE, 0x12CE }, -{ 0x12CF, 0x12CF, 0x12CF }, -{ 0x12D0, 0x12D0, 0x12D0 }, -{ 0x12D1, 0x12D1, 0x12D1 }, -{ 0x12D2, 0x12D2, 0x12D2 }, -{ 0x12D3, 0x12D3, 0x12D3 }, -{ 0x12D4, 0x12D4, 0x12D4 }, -{ 0x12D5, 0x12D5, 0x12D5 }, -{ 0x12D6, 0x12D6, 0x12D6 }, -{ 0x12D8, 0x12D8, 0x12D8 }, -{ 0x12D9, 0x12D9, 0x12D9 }, -{ 0x12DA, 0x12DA, 0x12DA }, -{ 0x12DB, 0x12DB, 0x12DB }, -{ 0x12DC, 0x12DC, 0x12DC }, -{ 0x12DD, 0x12DD, 0x12DD }, -{ 0x12DE, 0x12DE, 0x12DE }, -{ 0x12DF, 0x12DF, 0x12DF }, -{ 0x12E0, 0x12E0, 0x12E0 }, -{ 0x12E1, 0x12E1, 0x12E1 }, -{ 0x12E2, 0x12E2, 0x12E2 }, -{ 0x12E3, 0x12E3, 0x12E3 }, -{ 0x12E4, 0x12E4, 0x12E4 }, -{ 0x12E5, 0x12E5, 0x12E5 }, -{ 0x12E6, 0x12E6, 0x12E6 }, -{ 0x12E7, 0x12E7, 0x12E7 }, -{ 0x12E8, 0x12E8, 0x12E8 }, -{ 0x12E9, 0x12E9, 0x12E9 }, -{ 0x12EA, 0x12EA, 0x12EA }, -{ 0x12EB, 0x12EB, 0x12EB }, -{ 0x12EC, 0x12EC, 0x12EC }, -{ 0x12ED, 0x12ED, 0x12ED }, -{ 0x12EE, 0x12EE, 0x12EE }, -{ 0x12EF, 0x12EF, 0x12EF }, -{ 0x12F0, 0x12F0, 0x12F0 }, -{ 0x12F1, 0x12F1, 0x12F1 }, -{ 0x12F2, 0x12F2, 0x12F2 }, -{ 0x12F3, 0x12F3, 0x12F3 }, -{ 0x12F4, 0x12F4, 0x12F4 }, -{ 0x12F5, 0x12F5, 0x12F5 }, -{ 0x12F6, 0x12F6, 0x12F6 }, -{ 0x12F7, 0x12F7, 0x12F7 }, -{ 0x12F8, 0x12F8, 0x12F8 }, -{ 0x12F9, 0x12F9, 0x12F9 }, -{ 0x12FA, 0x12FA, 0x12FA }, -{ 0x12FB, 0x12FB, 0x12FB }, -{ 0x12FC, 0x12FC, 0x12FC }, -{ 0x12FD, 0x12FD, 0x12FD }, -{ 0x12FE, 0x12FE, 0x12FE }, -{ 0x12FF, 0x12FF, 0x12FF }, -{ 0x1300, 0x1300, 0x1300 }, -{ 0x1301, 0x1301, 0x1301 }, -{ 0x1302, 0x1302, 0x1302 }, -{ 0x1303, 0x1303, 0x1303 }, -{ 0x1304, 0x1304, 0x1304 }, -{ 0x1305, 0x1305, 0x1305 }, -{ 0x1306, 0x1306, 0x1306 }, -{ 0x1307, 0x1307, 0x1307 }, -{ 0x1308, 0x1308, 0x1308 }, -{ 0x1309, 0x1309, 0x1309 }, -{ 0x130A, 0x130A, 0x130A }, -{ 0x130B, 0x130B, 0x130B }, -{ 0x130C, 0x130C, 0x130C }, -{ 0x130D, 0x130D, 0x130D }, -{ 0x130E, 0x130E, 0x130E }, -{ 0x130F, 0x130F, 0x130F }, -{ 0x1310, 0x1310, 0x1310 }, -{ 0x1312, 0x1312, 0x1312 }, -{ 0x1313, 0x1313, 0x1313 }, -{ 0x1314, 0x1314, 0x1314 }, -{ 0x1315, 0x1315, 0x1315 }, -{ 0x1318, 0x1318, 0x1318 }, -{ 0x1319, 0x1319, 0x1319 }, -{ 0x131A, 0x131A, 0x131A }, -{ 0x131B, 0x131B, 0x131B }, -{ 0x131C, 0x131C, 0x131C }, -{ 0x131D, 0x131D, 0x131D }, -{ 0x131E, 0x131E, 0x131E }, -{ 0x131F, 0x131F, 0x131F }, -{ 0x1320, 0x1320, 0x1320 }, -{ 0x1321, 0x1321, 0x1321 }, -{ 0x1322, 0x1322, 0x1322 }, -{ 0x1323, 0x1323, 0x1323 }, -{ 0x1324, 0x1324, 0x1324 }, -{ 0x1325, 0x1325, 0x1325 }, -{ 0x1326, 0x1326, 0x1326 }, -{ 0x1327, 0x1327, 0x1327 }, -{ 0x1328, 0x1328, 0x1328 }, -{ 0x1329, 0x1329, 0x1329 }, -{ 0x132A, 0x132A, 0x132A }, -{ 0x132B, 0x132B, 0x132B }, -{ 0x132C, 0x132C, 0x132C }, -{ 0x132D, 0x132D, 0x132D }, -{ 0x132E, 0x132E, 0x132E }, -{ 0x132F, 0x132F, 0x132F }, -{ 0x1330, 0x1330, 0x1330 }, -{ 0x1331, 0x1331, 0x1331 }, -{ 0x1332, 0x1332, 0x1332 }, -{ 0x1333, 0x1333, 0x1333 }, -{ 0x1334, 0x1334, 0x1334 }, -{ 0x1335, 0x1335, 0x1335 }, -{ 0x1336, 0x1336, 0x1336 }, -{ 0x1337, 0x1337, 0x1337 }, -{ 0x1338, 0x1338, 0x1338 }, -{ 0x1339, 0x1339, 0x1339 }, -{ 0x133A, 0x133A, 0x133A }, -{ 0x133B, 0x133B, 0x133B }, -{ 0x133C, 0x133C, 0x133C }, -{ 0x133D, 0x133D, 0x133D }, -{ 0x133E, 0x133E, 0x133E }, -{ 0x133F, 0x133F, 0x133F }, -{ 0x1340, 0x1340, 0x1340 }, -{ 0x1341, 0x1341, 0x1341 }, -{ 0x1342, 0x1342, 0x1342 }, -{ 0x1343, 0x1343, 0x1343 }, -{ 0x1344, 0x1344, 0x1344 }, -{ 0x1345, 0x1345, 0x1345 }, -{ 0x1346, 0x1346, 0x1346 }, -{ 0x1347, 0x1347, 0x1347 }, -{ 0x1348, 0x1348, 0x1348 }, -{ 0x1349, 0x1349, 0x1349 }, -{ 0x134A, 0x134A, 0x134A }, -{ 0x134B, 0x134B, 0x134B }, -{ 0x134C, 0x134C, 0x134C }, -{ 0x134D, 0x134D, 0x134D }, -{ 0x134E, 0x134E, 0x134E }, -{ 0x134F, 0x134F, 0x134F }, -{ 0x1350, 0x1350, 0x1350 }, -{ 0x1351, 0x1351, 0x1351 }, -{ 0x1352, 0x1352, 0x1352 }, -{ 0x1353, 0x1353, 0x1353 }, -{ 0x1354, 0x1354, 0x1354 }, -{ 0x1355, 0x1355, 0x1355 }, -{ 0x1356, 0x1356, 0x1356 }, -{ 0x1357, 0x1357, 0x1357 }, -{ 0x1358, 0x1358, 0x1358 }, -{ 0x1359, 0x1359, 0x1359 }, -{ 0x135A, 0x135A, 0x135A }, -{ 0x135F, 0x135F, 0x135F }, -{ 0x1380, 0x1380, 0x1380 }, -{ 0x1381, 0x1381, 0x1381 }, -{ 0x1382, 0x1382, 0x1382 }, -{ 0x1383, 0x1383, 0x1383 }, -{ 0x1384, 0x1384, 0x1384 }, -{ 0x1385, 0x1385, 0x1385 }, -{ 0x1386, 0x1386, 0x1386 }, -{ 0x1387, 0x1387, 0x1387 }, -{ 0x1388, 0x1388, 0x1388 }, -{ 0x1389, 0x1389, 0x1389 }, -{ 0x138A, 0x138A, 0x138A }, -{ 0x138B, 0x138B, 0x138B }, -{ 0x138C, 0x138C, 0x138C }, -{ 0x138D, 0x138D, 0x138D }, -{ 0x138E, 0x138E, 0x138E }, -{ 0x138F, 0x138F, 0x138F }, -{ 0x13A0, 0x13A0, 0x13A0 }, -{ 0x13A1, 0x13A1, 0x13A1 }, -{ 0x13A2, 0x13A2, 0x13A2 }, -{ 0x13A3, 0x13A3, 0x13A3 }, -{ 0x13A4, 0x13A4, 0x13A4 }, -{ 0x13A5, 0x13A5, 0x13A5 }, -{ 0x13A6, 0x13A6, 0x13A6 }, -{ 0x13A7, 0x13A7, 0x13A7 }, -{ 0x13A8, 0x13A8, 0x13A8 }, -{ 0x13A9, 0x13A9, 0x13A9 }, -{ 0x13AA, 0x13AA, 0x13AA }, -{ 0x13AB, 0x13AB, 0x13AB }, -{ 0x13AC, 0x13AC, 0x13AC }, -{ 0x13AD, 0x13AD, 0x13AD }, -{ 0x13AE, 0x13AE, 0x13AE }, -{ 0x13AF, 0x13AF, 0x13AF }, -{ 0x13B0, 0x13B0, 0x13B0 }, -{ 0x13B1, 0x13B1, 0x13B1 }, -{ 0x13B2, 0x13B2, 0x13B2 }, -{ 0x13B3, 0x13B3, 0x13B3 }, -{ 0x13B4, 0x13B4, 0x13B4 }, -{ 0x13B5, 0x13B5, 0x13B5 }, -{ 0x13B6, 0x13B6, 0x13B6 }, -{ 0x13B7, 0x13B7, 0x13B7 }, -{ 0x13B8, 0x13B8, 0x13B8 }, -{ 0x13B9, 0x13B9, 0x13B9 }, -{ 0x13BA, 0x13BA, 0x13BA }, -{ 0x13BB, 0x13BB, 0x13BB }, -{ 0x13BC, 0x13BC, 0x13BC }, -{ 0x13BD, 0x13BD, 0x13BD }, -{ 0x13BE, 0x13BE, 0x13BE }, -{ 0x13BF, 0x13BF, 0x13BF }, -{ 0x13C0, 0x13C0, 0x13C0 }, -{ 0x13C1, 0x13C1, 0x13C1 }, -{ 0x13C2, 0x13C2, 0x13C2 }, -{ 0x13C3, 0x13C3, 0x13C3 }, -{ 0x13C4, 0x13C4, 0x13C4 }, -{ 0x13C5, 0x13C5, 0x13C5 }, -{ 0x13C6, 0x13C6, 0x13C6 }, -{ 0x13C7, 0x13C7, 0x13C7 }, -{ 0x13C8, 0x13C8, 0x13C8 }, -{ 0x13C9, 0x13C9, 0x13C9 }, -{ 0x13CA, 0x13CA, 0x13CA }, -{ 0x13CB, 0x13CB, 0x13CB }, -{ 0x13CC, 0x13CC, 0x13CC }, -{ 0x13CD, 0x13CD, 0x13CD }, -{ 0x13CE, 0x13CE, 0x13CE }, -{ 0x13CF, 0x13CF, 0x13CF }, -{ 0x13D0, 0x13D0, 0x13D0 }, -{ 0x13D1, 0x13D1, 0x13D1 }, -{ 0x13D2, 0x13D2, 0x13D2 }, -{ 0x13D3, 0x13D3, 0x13D3 }, -{ 0x13D4, 0x13D4, 0x13D4 }, -{ 0x13D5, 0x13D5, 0x13D5 }, -{ 0x13D6, 0x13D6, 0x13D6 }, -{ 0x13D7, 0x13D7, 0x13D7 }, -{ 0x13D8, 0x13D8, 0x13D8 }, -{ 0x13D9, 0x13D9, 0x13D9 }, -{ 0x13DA, 0x13DA, 0x13DA }, -{ 0x13DB, 0x13DB, 0x13DB }, -{ 0x13DC, 0x13DC, 0x13DC }, -{ 0x13DD, 0x13DD, 0x13DD }, -{ 0x13DE, 0x13DE, 0x13DE }, -{ 0x13DF, 0x13DF, 0x13DF }, -{ 0x13E0, 0x13E0, 0x13E0 }, -{ 0x13E1, 0x13E1, 0x13E1 }, -{ 0x13E2, 0x13E2, 0x13E2 }, -{ 0x13E3, 0x13E3, 0x13E3 }, -{ 0x13E4, 0x13E4, 0x13E4 }, -{ 0x13E5, 0x13E5, 0x13E5 }, -{ 0x13E6, 0x13E6, 0x13E6 }, -{ 0x13E7, 0x13E7, 0x13E7 }, -{ 0x13E8, 0x13E8, 0x13E8 }, -{ 0x13E9, 0x13E9, 0x13E9 }, -{ 0x13EA, 0x13EA, 0x13EA }, -{ 0x13EB, 0x13EB, 0x13EB }, -{ 0x13EC, 0x13EC, 0x13EC }, -{ 0x13ED, 0x13ED, 0x13ED }, -{ 0x13EE, 0x13EE, 0x13EE }, -{ 0x13EF, 0x13EF, 0x13EF }, -{ 0x13F0, 0x13F0, 0x13F0 }, -{ 0x13F1, 0x13F1, 0x13F1 }, -{ 0x13F2, 0x13F2, 0x13F2 }, -{ 0x13F3, 0x13F3, 0x13F3 }, -{ 0x13F4, 0x13F4, 0x13F4 }, -{ 0x1401, 0x1401, 0x1401 }, -{ 0x1402, 0x1402, 0x1402 }, -{ 0x1403, 0x1403, 0x1403 }, -{ 0x1404, 0x1404, 0x1404 }, -{ 0x1405, 0x1405, 0x1405 }, -{ 0x1406, 0x1406, 0x1406 }, -{ 0x1407, 0x1407, 0x1407 }, -{ 0x1408, 0x1408, 0x1408 }, -{ 0x1409, 0x1409, 0x1409 }, -{ 0x140A, 0x140A, 0x140A }, -{ 0x140B, 0x140B, 0x140B }, -{ 0x140C, 0x140C, 0x140C }, -{ 0x140D, 0x140D, 0x140D }, -{ 0x140E, 0x140E, 0x140E }, -{ 0x140F, 0x140F, 0x140F }, -{ 0x1410, 0x1410, 0x1410 }, -{ 0x1411, 0x1411, 0x1411 }, -{ 0x1412, 0x1412, 0x1412 }, -{ 0x1413, 0x1413, 0x1413 }, -{ 0x1414, 0x1414, 0x1414 }, -{ 0x1415, 0x1415, 0x1415 }, -{ 0x1416, 0x1416, 0x1416 }, -{ 0x1417, 0x1417, 0x1417 }, -{ 0x1418, 0x1418, 0x1418 }, -{ 0x1419, 0x1419, 0x1419 }, -{ 0x141A, 0x141A, 0x141A }, -{ 0x141B, 0x141B, 0x141B }, -{ 0x141C, 0x141C, 0x141C }, -{ 0x141D, 0x141D, 0x141D }, -{ 0x141E, 0x141E, 0x141E }, -{ 0x141F, 0x141F, 0x141F }, -{ 0x1420, 0x1420, 0x1420 }, -{ 0x1421, 0x1421, 0x1421 }, -{ 0x1422, 0x1422, 0x1422 }, -{ 0x1423, 0x1423, 0x1423 }, -{ 0x1424, 0x1424, 0x1424 }, -{ 0x1425, 0x1425, 0x1425 }, -{ 0x1426, 0x1426, 0x1426 }, -{ 0x1427, 0x1427, 0x1427 }, -{ 0x1428, 0x1428, 0x1428 }, -{ 0x1429, 0x1429, 0x1429 }, -{ 0x142A, 0x142A, 0x142A }, -{ 0x142B, 0x142B, 0x142B }, -{ 0x142C, 0x142C, 0x142C }, -{ 0x142D, 0x142D, 0x142D }, -{ 0x142E, 0x142E, 0x142E }, -{ 0x142F, 0x142F, 0x142F }, -{ 0x1430, 0x1430, 0x1430 }, -{ 0x1431, 0x1431, 0x1431 }, -{ 0x1432, 0x1432, 0x1432 }, -{ 0x1433, 0x1433, 0x1433 }, -{ 0x1434, 0x1434, 0x1434 }, -{ 0x1435, 0x1435, 0x1435 }, -{ 0x1436, 0x1436, 0x1436 }, -{ 0x1437, 0x1437, 0x1437 }, -{ 0x1438, 0x1438, 0x1438 }, -{ 0x1439, 0x1439, 0x1439 }, -{ 0x143A, 0x143A, 0x143A }, -{ 0x143B, 0x143B, 0x143B }, -{ 0x143C, 0x143C, 0x143C }, -{ 0x143D, 0x143D, 0x143D }, -{ 0x143E, 0x143E, 0x143E }, -{ 0x143F, 0x143F, 0x143F }, -{ 0x1440, 0x1440, 0x1440 }, -{ 0x1441, 0x1441, 0x1441 }, -{ 0x1442, 0x1442, 0x1442 }, -{ 0x1443, 0x1443, 0x1443 }, -{ 0x1444, 0x1444, 0x1444 }, -{ 0x1445, 0x1445, 0x1445 }, -{ 0x1446, 0x1446, 0x1446 }, -{ 0x1447, 0x1447, 0x1447 }, -{ 0x1448, 0x1448, 0x1448 }, -{ 0x1449, 0x1449, 0x1449 }, -{ 0x144A, 0x144A, 0x144A }, -{ 0x144B, 0x144B, 0x144B }, -{ 0x144C, 0x144C, 0x144C }, -{ 0x144D, 0x144D, 0x144D }, -{ 0x144E, 0x144E, 0x144E }, -{ 0x144F, 0x144F, 0x144F }, -{ 0x1450, 0x1450, 0x1450 }, -{ 0x1451, 0x1451, 0x1451 }, -{ 0x1452, 0x1452, 0x1452 }, -{ 0x1453, 0x1453, 0x1453 }, -{ 0x1454, 0x1454, 0x1454 }, -{ 0x1455, 0x1455, 0x1455 }, -{ 0x1456, 0x1456, 0x1456 }, -{ 0x1457, 0x1457, 0x1457 }, -{ 0x1458, 0x1458, 0x1458 }, -{ 0x1459, 0x1459, 0x1459 }, -{ 0x145A, 0x145A, 0x145A }, -{ 0x145B, 0x145B, 0x145B }, -{ 0x145C, 0x145C, 0x145C }, -{ 0x145D, 0x145D, 0x145D }, -{ 0x145E, 0x145E, 0x145E }, -{ 0x145F, 0x145F, 0x145F }, -{ 0x1460, 0x1460, 0x1460 }, -{ 0x1461, 0x1461, 0x1461 }, -{ 0x1462, 0x1462, 0x1462 }, -{ 0x1463, 0x1463, 0x1463 }, -{ 0x1464, 0x1464, 0x1464 }, -{ 0x1465, 0x1465, 0x1465 }, -{ 0x1466, 0x1466, 0x1466 }, -{ 0x1467, 0x1467, 0x1467 }, -{ 0x1468, 0x1468, 0x1468 }, -{ 0x1469, 0x1469, 0x1469 }, -{ 0x146A, 0x146A, 0x146A }, -{ 0x146B, 0x146B, 0x146B }, -{ 0x146C, 0x146C, 0x146C }, -{ 0x146D, 0x146D, 0x146D }, -{ 0x146E, 0x146E, 0x146E }, -{ 0x146F, 0x146F, 0x146F }, -{ 0x1470, 0x1470, 0x1470 }, -{ 0x1471, 0x1471, 0x1471 }, -{ 0x1472, 0x1472, 0x1472 }, -{ 0x1473, 0x1473, 0x1473 }, -{ 0x1474, 0x1474, 0x1474 }, -{ 0x1475, 0x1475, 0x1475 }, -{ 0x1476, 0x1476, 0x1476 }, -{ 0x1477, 0x1477, 0x1477 }, -{ 0x1478, 0x1478, 0x1478 }, -{ 0x1479, 0x1479, 0x1479 }, -{ 0x147A, 0x147A, 0x147A }, -{ 0x147B, 0x147B, 0x147B }, -{ 0x147C, 0x147C, 0x147C }, -{ 0x147D, 0x147D, 0x147D }, -{ 0x147E, 0x147E, 0x147E }, -{ 0x147F, 0x147F, 0x147F }, -{ 0x1480, 0x1480, 0x1480 }, -{ 0x1481, 0x1481, 0x1481 }, -{ 0x1482, 0x1482, 0x1482 }, -{ 0x1483, 0x1483, 0x1483 }, -{ 0x1484, 0x1484, 0x1484 }, -{ 0x1485, 0x1485, 0x1485 }, -{ 0x1486, 0x1486, 0x1486 }, -{ 0x1487, 0x1487, 0x1487 }, -{ 0x1488, 0x1488, 0x1488 }, -{ 0x1489, 0x1489, 0x1489 }, -{ 0x148A, 0x148A, 0x148A }, -{ 0x148B, 0x148B, 0x148B }, -{ 0x148C, 0x148C, 0x148C }, -{ 0x148D, 0x148D, 0x148D }, -{ 0x148E, 0x148E, 0x148E }, -{ 0x148F, 0x148F, 0x148F }, -{ 0x1490, 0x1490, 0x1490 }, -{ 0x1491, 0x1491, 0x1491 }, -{ 0x1492, 0x1492, 0x1492 }, -{ 0x1493, 0x1493, 0x1493 }, -{ 0x1494, 0x1494, 0x1494 }, -{ 0x1495, 0x1495, 0x1495 }, -{ 0x1496, 0x1496, 0x1496 }, -{ 0x1497, 0x1497, 0x1497 }, -{ 0x1498, 0x1498, 0x1498 }, -{ 0x1499, 0x1499, 0x1499 }, -{ 0x149A, 0x149A, 0x149A }, -{ 0x149B, 0x149B, 0x149B }, -{ 0x149C, 0x149C, 0x149C }, -{ 0x149D, 0x149D, 0x149D }, -{ 0x149E, 0x149E, 0x149E }, -{ 0x149F, 0x149F, 0x149F }, -{ 0x14A0, 0x14A0, 0x14A0 }, -{ 0x14A1, 0x14A1, 0x14A1 }, -{ 0x14A2, 0x14A2, 0x14A2 }, -{ 0x14A3, 0x14A3, 0x14A3 }, -{ 0x14A4, 0x14A4, 0x14A4 }, -{ 0x14A5, 0x14A5, 0x14A5 }, -{ 0x14A6, 0x14A6, 0x14A6 }, -{ 0x14A7, 0x14A7, 0x14A7 }, -{ 0x14A8, 0x14A8, 0x14A8 }, -{ 0x14A9, 0x14A9, 0x14A9 }, -{ 0x14AA, 0x14AA, 0x14AA }, -{ 0x14AB, 0x14AB, 0x14AB }, -{ 0x14AC, 0x14AC, 0x14AC }, -{ 0x14AD, 0x14AD, 0x14AD }, -{ 0x14AE, 0x14AE, 0x14AE }, -{ 0x14AF, 0x14AF, 0x14AF }, -{ 0x14B0, 0x14B0, 0x14B0 }, -{ 0x14B1, 0x14B1, 0x14B1 }, -{ 0x14B2, 0x14B2, 0x14B2 }, -{ 0x14B3, 0x14B3, 0x14B3 }, -{ 0x14B4, 0x14B4, 0x14B4 }, -{ 0x14B5, 0x14B5, 0x14B5 }, -{ 0x14B6, 0x14B6, 0x14B6 }, -{ 0x14B7, 0x14B7, 0x14B7 }, -{ 0x14B8, 0x14B8, 0x14B8 }, -{ 0x14B9, 0x14B9, 0x14B9 }, -{ 0x14BA, 0x14BA, 0x14BA }, -{ 0x14BB, 0x14BB, 0x14BB }, -{ 0x14BC, 0x14BC, 0x14BC }, -{ 0x14BD, 0x14BD, 0x14BD }, -{ 0x14BE, 0x14BE, 0x14BE }, -{ 0x14BF, 0x14BF, 0x14BF }, -{ 0x14C0, 0x14C0, 0x14C0 }, -{ 0x14C1, 0x14C1, 0x14C1 }, -{ 0x14C2, 0x14C2, 0x14C2 }, -{ 0x14C3, 0x14C3, 0x14C3 }, -{ 0x14C4, 0x14C4, 0x14C4 }, -{ 0x14C5, 0x14C5, 0x14C5 }, -{ 0x14C6, 0x14C6, 0x14C6 }, -{ 0x14C7, 0x14C7, 0x14C7 }, -{ 0x14C8, 0x14C8, 0x14C8 }, -{ 0x14C9, 0x14C9, 0x14C9 }, -{ 0x14CA, 0x14CA, 0x14CA }, -{ 0x14CB, 0x14CB, 0x14CB }, -{ 0x14CC, 0x14CC, 0x14CC }, -{ 0x14CD, 0x14CD, 0x14CD }, -{ 0x14CE, 0x14CE, 0x14CE }, -{ 0x14CF, 0x14CF, 0x14CF }, -{ 0x14D0, 0x14D0, 0x14D0 }, -{ 0x14D1, 0x14D1, 0x14D1 }, -{ 0x14D2, 0x14D2, 0x14D2 }, -{ 0x14D3, 0x14D3, 0x14D3 }, -{ 0x14D4, 0x14D4, 0x14D4 }, -{ 0x14D5, 0x14D5, 0x14D5 }, -{ 0x14D6, 0x14D6, 0x14D6 }, -{ 0x14D7, 0x14D7, 0x14D7 }, -{ 0x14D8, 0x14D8, 0x14D8 }, -{ 0x14D9, 0x14D9, 0x14D9 }, -{ 0x14DA, 0x14DA, 0x14DA }, -{ 0x14DB, 0x14DB, 0x14DB }, -{ 0x14DC, 0x14DC, 0x14DC }, -{ 0x14DD, 0x14DD, 0x14DD }, -{ 0x14DE, 0x14DE, 0x14DE }, -{ 0x14DF, 0x14DF, 0x14DF }, -{ 0x14E0, 0x14E0, 0x14E0 }, -{ 0x14E1, 0x14E1, 0x14E1 }, -{ 0x14E2, 0x14E2, 0x14E2 }, -{ 0x14E3, 0x14E3, 0x14E3 }, -{ 0x14E4, 0x14E4, 0x14E4 }, -{ 0x14E5, 0x14E5, 0x14E5 }, -{ 0x14E6, 0x14E6, 0x14E6 }, -{ 0x14E7, 0x14E7, 0x14E7 }, -{ 0x14E8, 0x14E8, 0x14E8 }, -{ 0x14E9, 0x14E9, 0x14E9 }, -{ 0x14EA, 0x14EA, 0x14EA }, -{ 0x14EB, 0x14EB, 0x14EB }, -{ 0x14EC, 0x14EC, 0x14EC }, -{ 0x14ED, 0x14ED, 0x14ED }, -{ 0x14EE, 0x14EE, 0x14EE }, -{ 0x14EF, 0x14EF, 0x14EF }, -{ 0x14F0, 0x14F0, 0x14F0 }, -{ 0x14F1, 0x14F1, 0x14F1 }, -{ 0x14F2, 0x14F2, 0x14F2 }, -{ 0x14F3, 0x14F3, 0x14F3 }, -{ 0x14F4, 0x14F4, 0x14F4 }, -{ 0x14F5, 0x14F5, 0x14F5 }, -{ 0x14F6, 0x14F6, 0x14F6 }, -{ 0x14F7, 0x14F7, 0x14F7 }, -{ 0x14F8, 0x14F8, 0x14F8 }, -{ 0x14F9, 0x14F9, 0x14F9 }, -{ 0x14FA, 0x14FA, 0x14FA }, -{ 0x14FB, 0x14FB, 0x14FB }, -{ 0x14FC, 0x14FC, 0x14FC }, -{ 0x14FD, 0x14FD, 0x14FD }, -{ 0x14FE, 0x14FE, 0x14FE }, -{ 0x14FF, 0x14FF, 0x14FF }, -{ 0x1500, 0x1500, 0x1500 }, -{ 0x1501, 0x1501, 0x1501 }, -{ 0x1502, 0x1502, 0x1502 }, -{ 0x1503, 0x1503, 0x1503 }, -{ 0x1504, 0x1504, 0x1504 }, -{ 0x1505, 0x1505, 0x1505 }, -{ 0x1506, 0x1506, 0x1506 }, -{ 0x1507, 0x1507, 0x1507 }, -{ 0x1508, 0x1508, 0x1508 }, -{ 0x1509, 0x1509, 0x1509 }, -{ 0x150A, 0x150A, 0x150A }, -{ 0x150B, 0x150B, 0x150B }, -{ 0x150C, 0x150C, 0x150C }, -{ 0x150D, 0x150D, 0x150D }, -{ 0x150E, 0x150E, 0x150E }, -{ 0x150F, 0x150F, 0x150F }, -{ 0x1510, 0x1510, 0x1510 }, -{ 0x1511, 0x1511, 0x1511 }, -{ 0x1512, 0x1512, 0x1512 }, -{ 0x1513, 0x1513, 0x1513 }, -{ 0x1514, 0x1514, 0x1514 }, -{ 0x1515, 0x1515, 0x1515 }, -{ 0x1516, 0x1516, 0x1516 }, -{ 0x1517, 0x1517, 0x1517 }, -{ 0x1518, 0x1518, 0x1518 }, -{ 0x1519, 0x1519, 0x1519 }, -{ 0x151A, 0x151A, 0x151A }, -{ 0x151B, 0x151B, 0x151B }, -{ 0x151C, 0x151C, 0x151C }, -{ 0x151D, 0x151D, 0x151D }, -{ 0x151E, 0x151E, 0x151E }, -{ 0x151F, 0x151F, 0x151F }, -{ 0x1520, 0x1520, 0x1520 }, -{ 0x1521, 0x1521, 0x1521 }, -{ 0x1522, 0x1522, 0x1522 }, -{ 0x1523, 0x1523, 0x1523 }, -{ 0x1524, 0x1524, 0x1524 }, -{ 0x1525, 0x1525, 0x1525 }, -{ 0x1526, 0x1526, 0x1526 }, -{ 0x1527, 0x1527, 0x1527 }, -{ 0x1528, 0x1528, 0x1528 }, -{ 0x1529, 0x1529, 0x1529 }, -{ 0x152A, 0x152A, 0x152A }, -{ 0x152B, 0x152B, 0x152B }, -{ 0x152C, 0x152C, 0x152C }, -{ 0x152D, 0x152D, 0x152D }, -{ 0x152E, 0x152E, 0x152E }, -{ 0x152F, 0x152F, 0x152F }, -{ 0x1530, 0x1530, 0x1530 }, -{ 0x1531, 0x1531, 0x1531 }, -{ 0x1532, 0x1532, 0x1532 }, -{ 0x1533, 0x1533, 0x1533 }, -{ 0x1534, 0x1534, 0x1534 }, -{ 0x1535, 0x1535, 0x1535 }, -{ 0x1536, 0x1536, 0x1536 }, -{ 0x1537, 0x1537, 0x1537 }, -{ 0x1538, 0x1538, 0x1538 }, -{ 0x1539, 0x1539, 0x1539 }, -{ 0x153A, 0x153A, 0x153A }, -{ 0x153B, 0x153B, 0x153B }, -{ 0x153C, 0x153C, 0x153C }, -{ 0x153D, 0x153D, 0x153D }, -{ 0x153E, 0x153E, 0x153E }, -{ 0x153F, 0x153F, 0x153F }, -{ 0x1540, 0x1540, 0x1540 }, -{ 0x1541, 0x1541, 0x1541 }, -{ 0x1542, 0x1542, 0x1542 }, -{ 0x1543, 0x1543, 0x1543 }, -{ 0x1544, 0x1544, 0x1544 }, -{ 0x1545, 0x1545, 0x1545 }, -{ 0x1546, 0x1546, 0x1546 }, -{ 0x1547, 0x1547, 0x1547 }, -{ 0x1548, 0x1548, 0x1548 }, -{ 0x1549, 0x1549, 0x1549 }, -{ 0x154A, 0x154A, 0x154A }, -{ 0x154B, 0x154B, 0x154B }, -{ 0x154C, 0x154C, 0x154C }, -{ 0x154D, 0x154D, 0x154D }, -{ 0x154E, 0x154E, 0x154E }, -{ 0x154F, 0x154F, 0x154F }, -{ 0x1550, 0x1550, 0x1550 }, -{ 0x1551, 0x1551, 0x1551 }, -{ 0x1552, 0x1552, 0x1552 }, -{ 0x1553, 0x1553, 0x1553 }, -{ 0x1554, 0x1554, 0x1554 }, -{ 0x1555, 0x1555, 0x1555 }, -{ 0x1556, 0x1556, 0x1556 }, -{ 0x1557, 0x1557, 0x1557 }, -{ 0x1558, 0x1558, 0x1558 }, -{ 0x1559, 0x1559, 0x1559 }, -{ 0x155A, 0x155A, 0x155A }, -{ 0x155B, 0x155B, 0x155B }, -{ 0x155C, 0x155C, 0x155C }, -{ 0x155D, 0x155D, 0x155D }, -{ 0x155E, 0x155E, 0x155E }, -{ 0x155F, 0x155F, 0x155F }, -{ 0x1560, 0x1560, 0x1560 }, -{ 0x1561, 0x1561, 0x1561 }, -{ 0x1562, 0x1562, 0x1562 }, -{ 0x1563, 0x1563, 0x1563 }, -{ 0x1564, 0x1564, 0x1564 }, -{ 0x1565, 0x1565, 0x1565 }, -{ 0x1566, 0x1566, 0x1566 }, -{ 0x1567, 0x1567, 0x1567 }, -{ 0x1568, 0x1568, 0x1568 }, -{ 0x1569, 0x1569, 0x1569 }, -{ 0x156A, 0x156A, 0x156A }, -{ 0x156B, 0x156B, 0x156B }, -{ 0x156C, 0x156C, 0x156C }, -{ 0x156D, 0x156D, 0x156D }, -{ 0x156E, 0x156E, 0x156E }, -{ 0x156F, 0x156F, 0x156F }, -{ 0x1570, 0x1570, 0x1570 }, -{ 0x1571, 0x1571, 0x1571 }, -{ 0x1572, 0x1572, 0x1572 }, -{ 0x1573, 0x1573, 0x1573 }, -{ 0x1574, 0x1574, 0x1574 }, -{ 0x1575, 0x1575, 0x1575 }, -{ 0x1576, 0x1576, 0x1576 }, -{ 0x1577, 0x1577, 0x1577 }, -{ 0x1578, 0x1578, 0x1578 }, -{ 0x1579, 0x1579, 0x1579 }, -{ 0x157A, 0x157A, 0x157A }, -{ 0x157B, 0x157B, 0x157B }, -{ 0x157C, 0x157C, 0x157C }, -{ 0x157D, 0x157D, 0x157D }, -{ 0x157E, 0x157E, 0x157E }, -{ 0x157F, 0x157F, 0x157F }, -{ 0x1580, 0x1580, 0x1580 }, -{ 0x1581, 0x1581, 0x1581 }, -{ 0x1582, 0x1582, 0x1582 }, -{ 0x1583, 0x1583, 0x1583 }, -{ 0x1584, 0x1584, 0x1584 }, -{ 0x1585, 0x1585, 0x1585 }, -{ 0x1586, 0x1586, 0x1586 }, -{ 0x1587, 0x1587, 0x1587 }, -{ 0x1588, 0x1588, 0x1588 }, -{ 0x1589, 0x1589, 0x1589 }, -{ 0x158A, 0x158A, 0x158A }, -{ 0x158B, 0x158B, 0x158B }, -{ 0x158C, 0x158C, 0x158C }, -{ 0x158D, 0x158D, 0x158D }, -{ 0x158E, 0x158E, 0x158E }, -{ 0x158F, 0x158F, 0x158F }, -{ 0x1590, 0x1590, 0x1590 }, -{ 0x1591, 0x1591, 0x1591 }, -{ 0x1592, 0x1592, 0x1592 }, -{ 0x1593, 0x1593, 0x1593 }, -{ 0x1594, 0x1594, 0x1594 }, -{ 0x1595, 0x1595, 0x1595 }, -{ 0x1596, 0x1596, 0x1596 }, -{ 0x1597, 0x1597, 0x1597 }, -{ 0x1598, 0x1598, 0x1598 }, -{ 0x1599, 0x1599, 0x1599 }, -{ 0x159A, 0x159A, 0x159A }, -{ 0x159B, 0x159B, 0x159B }, -{ 0x159C, 0x159C, 0x159C }, -{ 0x159D, 0x159D, 0x159D }, -{ 0x159E, 0x159E, 0x159E }, -{ 0x159F, 0x159F, 0x159F }, -{ 0x15A0, 0x15A0, 0x15A0 }, -{ 0x15A1, 0x15A1, 0x15A1 }, -{ 0x15A2, 0x15A2, 0x15A2 }, -{ 0x15A3, 0x15A3, 0x15A3 }, -{ 0x15A4, 0x15A4, 0x15A4 }, -{ 0x15A5, 0x15A5, 0x15A5 }, -{ 0x15A6, 0x15A6, 0x15A6 }, -{ 0x15A7, 0x15A7, 0x15A7 }, -{ 0x15A8, 0x15A8, 0x15A8 }, -{ 0x15A9, 0x15A9, 0x15A9 }, -{ 0x15AA, 0x15AA, 0x15AA }, -{ 0x15AB, 0x15AB, 0x15AB }, -{ 0x15AC, 0x15AC, 0x15AC }, -{ 0x15AD, 0x15AD, 0x15AD }, -{ 0x15AE, 0x15AE, 0x15AE }, -{ 0x15AF, 0x15AF, 0x15AF }, -{ 0x15B0, 0x15B0, 0x15B0 }, -{ 0x15B1, 0x15B1, 0x15B1 }, -{ 0x15B2, 0x15B2, 0x15B2 }, -{ 0x15B3, 0x15B3, 0x15B3 }, -{ 0x15B4, 0x15B4, 0x15B4 }, -{ 0x15B5, 0x15B5, 0x15B5 }, -{ 0x15B6, 0x15B6, 0x15B6 }, -{ 0x15B7, 0x15B7, 0x15B7 }, -{ 0x15B8, 0x15B8, 0x15B8 }, -{ 0x15B9, 0x15B9, 0x15B9 }, -{ 0x15BA, 0x15BA, 0x15BA }, -{ 0x15BB, 0x15BB, 0x15BB }, -{ 0x15BC, 0x15BC, 0x15BC }, -{ 0x15BD, 0x15BD, 0x15BD }, -{ 0x15BE, 0x15BE, 0x15BE }, -{ 0x15BF, 0x15BF, 0x15BF }, -{ 0x15C0, 0x15C0, 0x15C0 }, -{ 0x15C1, 0x15C1, 0x15C1 }, -{ 0x15C2, 0x15C2, 0x15C2 }, -{ 0x15C3, 0x15C3, 0x15C3 }, -{ 0x15C4, 0x15C4, 0x15C4 }, -{ 0x15C5, 0x15C5, 0x15C5 }, -{ 0x15C6, 0x15C6, 0x15C6 }, -{ 0x15C7, 0x15C7, 0x15C7 }, -{ 0x15C8, 0x15C8, 0x15C8 }, -{ 0x15C9, 0x15C9, 0x15C9 }, -{ 0x15CA, 0x15CA, 0x15CA }, -{ 0x15CB, 0x15CB, 0x15CB }, -{ 0x15CC, 0x15CC, 0x15CC }, -{ 0x15CD, 0x15CD, 0x15CD }, -{ 0x15CE, 0x15CE, 0x15CE }, -{ 0x15CF, 0x15CF, 0x15CF }, -{ 0x15D0, 0x15D0, 0x15D0 }, -{ 0x15D1, 0x15D1, 0x15D1 }, -{ 0x15D2, 0x15D2, 0x15D2 }, -{ 0x15D3, 0x15D3, 0x15D3 }, -{ 0x15D4, 0x15D4, 0x15D4 }, -{ 0x15D5, 0x15D5, 0x15D5 }, -{ 0x15D6, 0x15D6, 0x15D6 }, -{ 0x15D7, 0x15D7, 0x15D7 }, -{ 0x15D8, 0x15D8, 0x15D8 }, -{ 0x15D9, 0x15D9, 0x15D9 }, -{ 0x15DA, 0x15DA, 0x15DA }, -{ 0x15DB, 0x15DB, 0x15DB }, -{ 0x15DC, 0x15DC, 0x15DC }, -{ 0x15DD, 0x15DD, 0x15DD }, -{ 0x15DE, 0x15DE, 0x15DE }, -{ 0x15DF, 0x15DF, 0x15DF }, -{ 0x15E0, 0x15E0, 0x15E0 }, -{ 0x15E1, 0x15E1, 0x15E1 }, -{ 0x15E2, 0x15E2, 0x15E2 }, -{ 0x15E3, 0x15E3, 0x15E3 }, -{ 0x15E4, 0x15E4, 0x15E4 }, -{ 0x15E5, 0x15E5, 0x15E5 }, -{ 0x15E6, 0x15E6, 0x15E6 }, -{ 0x15E7, 0x15E7, 0x15E7 }, -{ 0x15E8, 0x15E8, 0x15E8 }, -{ 0x15E9, 0x15E9, 0x15E9 }, -{ 0x15EA, 0x15EA, 0x15EA }, -{ 0x15EB, 0x15EB, 0x15EB }, -{ 0x15EC, 0x15EC, 0x15EC }, -{ 0x15ED, 0x15ED, 0x15ED }, -{ 0x15EE, 0x15EE, 0x15EE }, -{ 0x15EF, 0x15EF, 0x15EF }, -{ 0x15F0, 0x15F0, 0x15F0 }, -{ 0x15F1, 0x15F1, 0x15F1 }, -{ 0x15F2, 0x15F2, 0x15F2 }, -{ 0x15F3, 0x15F3, 0x15F3 }, -{ 0x15F4, 0x15F4, 0x15F4 }, -{ 0x15F5, 0x15F5, 0x15F5 }, -{ 0x15F6, 0x15F6, 0x15F6 }, -{ 0x15F7, 0x15F7, 0x15F7 }, -{ 0x15F8, 0x15F8, 0x15F8 }, -{ 0x15F9, 0x15F9, 0x15F9 }, -{ 0x15FA, 0x15FA, 0x15FA }, -{ 0x15FB, 0x15FB, 0x15FB }, -{ 0x15FC, 0x15FC, 0x15FC }, -{ 0x15FD, 0x15FD, 0x15FD }, -{ 0x15FE, 0x15FE, 0x15FE }, -{ 0x15FF, 0x15FF, 0x15FF }, -{ 0x1600, 0x1600, 0x1600 }, -{ 0x1601, 0x1601, 0x1601 }, -{ 0x1602, 0x1602, 0x1602 }, -{ 0x1603, 0x1603, 0x1603 }, -{ 0x1604, 0x1604, 0x1604 }, -{ 0x1605, 0x1605, 0x1605 }, -{ 0x1606, 0x1606, 0x1606 }, -{ 0x1607, 0x1607, 0x1607 }, -{ 0x1608, 0x1608, 0x1608 }, -{ 0x1609, 0x1609, 0x1609 }, -{ 0x160A, 0x160A, 0x160A }, -{ 0x160B, 0x160B, 0x160B }, -{ 0x160C, 0x160C, 0x160C }, -{ 0x160D, 0x160D, 0x160D }, -{ 0x160E, 0x160E, 0x160E }, -{ 0x160F, 0x160F, 0x160F }, -{ 0x1610, 0x1610, 0x1610 }, -{ 0x1611, 0x1611, 0x1611 }, -{ 0x1612, 0x1612, 0x1612 }, -{ 0x1613, 0x1613, 0x1613 }, -{ 0x1614, 0x1614, 0x1614 }, -{ 0x1615, 0x1615, 0x1615 }, -{ 0x1616, 0x1616, 0x1616 }, -{ 0x1617, 0x1617, 0x1617 }, -{ 0x1618, 0x1618, 0x1618 }, -{ 0x1619, 0x1619, 0x1619 }, -{ 0x161A, 0x161A, 0x161A }, -{ 0x161B, 0x161B, 0x161B }, -{ 0x161C, 0x161C, 0x161C }, -{ 0x161D, 0x161D, 0x161D }, -{ 0x161E, 0x161E, 0x161E }, -{ 0x161F, 0x161F, 0x161F }, -{ 0x1620, 0x1620, 0x1620 }, -{ 0x1621, 0x1621, 0x1621 }, -{ 0x1622, 0x1622, 0x1622 }, -{ 0x1623, 0x1623, 0x1623 }, -{ 0x1624, 0x1624, 0x1624 }, -{ 0x1625, 0x1625, 0x1625 }, -{ 0x1626, 0x1626, 0x1626 }, -{ 0x1627, 0x1627, 0x1627 }, -{ 0x1628, 0x1628, 0x1628 }, -{ 0x1629, 0x1629, 0x1629 }, -{ 0x162A, 0x162A, 0x162A }, -{ 0x162B, 0x162B, 0x162B }, -{ 0x162C, 0x162C, 0x162C }, -{ 0x162D, 0x162D, 0x162D }, -{ 0x162E, 0x162E, 0x162E }, -{ 0x162F, 0x162F, 0x162F }, -{ 0x1630, 0x1630, 0x1630 }, -{ 0x1631, 0x1631, 0x1631 }, -{ 0x1632, 0x1632, 0x1632 }, -{ 0x1633, 0x1633, 0x1633 }, -{ 0x1634, 0x1634, 0x1634 }, -{ 0x1635, 0x1635, 0x1635 }, -{ 0x1636, 0x1636, 0x1636 }, -{ 0x1637, 0x1637, 0x1637 }, -{ 0x1638, 0x1638, 0x1638 }, -{ 0x1639, 0x1639, 0x1639 }, -{ 0x163A, 0x163A, 0x163A }, -{ 0x163B, 0x163B, 0x163B }, -{ 0x163C, 0x163C, 0x163C }, -{ 0x163D, 0x163D, 0x163D }, -{ 0x163E, 0x163E, 0x163E }, -{ 0x163F, 0x163F, 0x163F }, -{ 0x1640, 0x1640, 0x1640 }, -{ 0x1641, 0x1641, 0x1641 }, -{ 0x1642, 0x1642, 0x1642 }, -{ 0x1643, 0x1643, 0x1643 }, -{ 0x1644, 0x1644, 0x1644 }, -{ 0x1645, 0x1645, 0x1645 }, -{ 0x1646, 0x1646, 0x1646 }, -{ 0x1647, 0x1647, 0x1647 }, -{ 0x1648, 0x1648, 0x1648 }, -{ 0x1649, 0x1649, 0x1649 }, -{ 0x164A, 0x164A, 0x164A }, -{ 0x164B, 0x164B, 0x164B }, -{ 0x164C, 0x164C, 0x164C }, -{ 0x164D, 0x164D, 0x164D }, -{ 0x164E, 0x164E, 0x164E }, -{ 0x164F, 0x164F, 0x164F }, -{ 0x1650, 0x1650, 0x1650 }, -{ 0x1651, 0x1651, 0x1651 }, -{ 0x1652, 0x1652, 0x1652 }, -{ 0x1653, 0x1653, 0x1653 }, -{ 0x1654, 0x1654, 0x1654 }, -{ 0x1655, 0x1655, 0x1655 }, -{ 0x1656, 0x1656, 0x1656 }, -{ 0x1657, 0x1657, 0x1657 }, -{ 0x1658, 0x1658, 0x1658 }, -{ 0x1659, 0x1659, 0x1659 }, -{ 0x165A, 0x165A, 0x165A }, -{ 0x165B, 0x165B, 0x165B }, -{ 0x165C, 0x165C, 0x165C }, -{ 0x165D, 0x165D, 0x165D }, -{ 0x165E, 0x165E, 0x165E }, -{ 0x165F, 0x165F, 0x165F }, -{ 0x1660, 0x1660, 0x1660 }, -{ 0x1661, 0x1661, 0x1661 }, -{ 0x1662, 0x1662, 0x1662 }, -{ 0x1663, 0x1663, 0x1663 }, -{ 0x1664, 0x1664, 0x1664 }, -{ 0x1665, 0x1665, 0x1665 }, -{ 0x1666, 0x1666, 0x1666 }, -{ 0x1667, 0x1667, 0x1667 }, -{ 0x1668, 0x1668, 0x1668 }, -{ 0x1669, 0x1669, 0x1669 }, -{ 0x166A, 0x166A, 0x166A }, -{ 0x166B, 0x166B, 0x166B }, -{ 0x166C, 0x166C, 0x166C }, -{ 0x166F, 0x166F, 0x166F }, -{ 0x1670, 0x1670, 0x1670 }, -{ 0x1671, 0x1671, 0x1671 }, -{ 0x1672, 0x1672, 0x1672 }, -{ 0x1673, 0x1673, 0x1673 }, -{ 0x1674, 0x1674, 0x1674 }, -{ 0x1675, 0x1675, 0x1675 }, -{ 0x1676, 0x1676, 0x1676 }, -{ 0x1681, 0x1681, 0x1681 }, -{ 0x1682, 0x1682, 0x1682 }, -{ 0x1683, 0x1683, 0x1683 }, -{ 0x1684, 0x1684, 0x1684 }, -{ 0x1685, 0x1685, 0x1685 }, -{ 0x1686, 0x1686, 0x1686 }, -{ 0x1687, 0x1687, 0x1687 }, -{ 0x1688, 0x1688, 0x1688 }, -{ 0x1689, 0x1689, 0x1689 }, -{ 0x168A, 0x168A, 0x168A }, -{ 0x168B, 0x168B, 0x168B }, -{ 0x168C, 0x168C, 0x168C }, -{ 0x168D, 0x168D, 0x168D }, -{ 0x168E, 0x168E, 0x168E }, -{ 0x168F, 0x168F, 0x168F }, -{ 0x1690, 0x1690, 0x1690 }, -{ 0x1691, 0x1691, 0x1691 }, -{ 0x1692, 0x1692, 0x1692 }, -{ 0x1693, 0x1693, 0x1693 }, -{ 0x1694, 0x1694, 0x1694 }, -{ 0x1695, 0x1695, 0x1695 }, -{ 0x1696, 0x1696, 0x1696 }, -{ 0x1697, 0x1697, 0x1697 }, -{ 0x1698, 0x1698, 0x1698 }, -{ 0x1699, 0x1699, 0x1699 }, -{ 0x169A, 0x169A, 0x169A }, -{ 0x16A0, 0x16A0, 0x16A0 }, -{ 0x16A1, 0x16A1, 0x16A1 }, -{ 0x16A2, 0x16A2, 0x16A2 }, -{ 0x16A3, 0x16A3, 0x16A3 }, -{ 0x16A4, 0x16A4, 0x16A4 }, -{ 0x16A5, 0x16A5, 0x16A5 }, -{ 0x16A6, 0x16A6, 0x16A6 }, -{ 0x16A7, 0x16A7, 0x16A7 }, -{ 0x16A8, 0x16A8, 0x16A8 }, -{ 0x16A9, 0x16A9, 0x16A9 }, -{ 0x16AA, 0x16AA, 0x16AA }, -{ 0x16AB, 0x16AB, 0x16AB }, -{ 0x16AC, 0x16AC, 0x16AC }, -{ 0x16AD, 0x16AD, 0x16AD }, -{ 0x16AE, 0x16AE, 0x16AE }, -{ 0x16AF, 0x16AF, 0x16AF }, -{ 0x16B0, 0x16B0, 0x16B0 }, -{ 0x16B1, 0x16B1, 0x16B1 }, -{ 0x16B2, 0x16B2, 0x16B2 }, -{ 0x16B3, 0x16B3, 0x16B3 }, -{ 0x16B4, 0x16B4, 0x16B4 }, -{ 0x16B5, 0x16B5, 0x16B5 }, -{ 0x16B6, 0x16B6, 0x16B6 }, -{ 0x16B7, 0x16B7, 0x16B7 }, -{ 0x16B8, 0x16B8, 0x16B8 }, -{ 0x16B9, 0x16B9, 0x16B9 }, -{ 0x16BA, 0x16BA, 0x16BA }, -{ 0x16BB, 0x16BB, 0x16BB }, -{ 0x16BC, 0x16BC, 0x16BC }, -{ 0x16BD, 0x16BD, 0x16BD }, -{ 0x16BE, 0x16BE, 0x16BE }, -{ 0x16BF, 0x16BF, 0x16BF }, -{ 0x16C0, 0x16C0, 0x16C0 }, -{ 0x16C1, 0x16C1, 0x16C1 }, -{ 0x16C2, 0x16C2, 0x16C2 }, -{ 0x16C3, 0x16C3, 0x16C3 }, -{ 0x16C4, 0x16C4, 0x16C4 }, -{ 0x16C5, 0x16C5, 0x16C5 }, -{ 0x16C6, 0x16C6, 0x16C6 }, -{ 0x16C7, 0x16C7, 0x16C7 }, -{ 0x16C8, 0x16C8, 0x16C8 }, -{ 0x16C9, 0x16C9, 0x16C9 }, -{ 0x16CA, 0x16CA, 0x16CA }, -{ 0x16CB, 0x16CB, 0x16CB }, -{ 0x16CC, 0x16CC, 0x16CC }, -{ 0x16CD, 0x16CD, 0x16CD }, -{ 0x16CE, 0x16CE, 0x16CE }, -{ 0x16CF, 0x16CF, 0x16CF }, -{ 0x16D0, 0x16D0, 0x16D0 }, -{ 0x16D1, 0x16D1, 0x16D1 }, -{ 0x16D2, 0x16D2, 0x16D2 }, -{ 0x16D3, 0x16D3, 0x16D3 }, -{ 0x16D4, 0x16D4, 0x16D4 }, -{ 0x16D5, 0x16D5, 0x16D5 }, -{ 0x16D6, 0x16D6, 0x16D6 }, -{ 0x16D7, 0x16D7, 0x16D7 }, -{ 0x16D8, 0x16D8, 0x16D8 }, -{ 0x16D9, 0x16D9, 0x16D9 }, -{ 0x16DA, 0x16DA, 0x16DA }, -{ 0x16DB, 0x16DB, 0x16DB }, -{ 0x16DC, 0x16DC, 0x16DC }, -{ 0x16DD, 0x16DD, 0x16DD }, -{ 0x16DE, 0x16DE, 0x16DE }, -{ 0x16DF, 0x16DF, 0x16DF }, -{ 0x16E0, 0x16E0, 0x16E0 }, -{ 0x16E1, 0x16E1, 0x16E1 }, -{ 0x16E2, 0x16E2, 0x16E2 }, -{ 0x16E3, 0x16E3, 0x16E3 }, -{ 0x16E4, 0x16E4, 0x16E4 }, -{ 0x16E5, 0x16E5, 0x16E5 }, -{ 0x16E6, 0x16E6, 0x16E6 }, -{ 0x16E7, 0x16E7, 0x16E7 }, -{ 0x16E8, 0x16E8, 0x16E8 }, -{ 0x16E9, 0x16E9, 0x16E9 }, -{ 0x16EA, 0x16EA, 0x16EA }, -{ 0x1700, 0x1700, 0x1700 }, -{ 0x1701, 0x1701, 0x1701 }, -{ 0x1702, 0x1702, 0x1702 }, -{ 0x1703, 0x1703, 0x1703 }, -{ 0x1704, 0x1704, 0x1704 }, -{ 0x1705, 0x1705, 0x1705 }, -{ 0x1706, 0x1706, 0x1706 }, -{ 0x1707, 0x1707, 0x1707 }, -{ 0x1708, 0x1708, 0x1708 }, -{ 0x1709, 0x1709, 0x1709 }, -{ 0x170A, 0x170A, 0x170A }, -{ 0x170B, 0x170B, 0x170B }, -{ 0x170C, 0x170C, 0x170C }, -{ 0x170E, 0x170E, 0x170E }, -{ 0x170F, 0x170F, 0x170F }, -{ 0x1710, 0x1710, 0x1710 }, -{ 0x1711, 0x1711, 0x1711 }, -{ 0x1712, 0x1712, 0x1712 }, -{ 0x1713, 0x1713, 0x1713 }, -{ 0x1714, 0x1714, 0x1714 }, -{ 0x1720, 0x1720, 0x1720 }, -{ 0x1721, 0x1721, 0x1721 }, -{ 0x1722, 0x1722, 0x1722 }, -{ 0x1723, 0x1723, 0x1723 }, -{ 0x1724, 0x1724, 0x1724 }, -{ 0x1725, 0x1725, 0x1725 }, -{ 0x1726, 0x1726, 0x1726 }, -{ 0x1727, 0x1727, 0x1727 }, -{ 0x1728, 0x1728, 0x1728 }, -{ 0x1729, 0x1729, 0x1729 }, -{ 0x172A, 0x172A, 0x172A }, -{ 0x172B, 0x172B, 0x172B }, -{ 0x172C, 0x172C, 0x172C }, -{ 0x172D, 0x172D, 0x172D }, -{ 0x172E, 0x172E, 0x172E }, -{ 0x172F, 0x172F, 0x172F }, -{ 0x1730, 0x1730, 0x1730 }, -{ 0x1731, 0x1731, 0x1731 }, -{ 0x1732, 0x1732, 0x1732 }, -{ 0x1733, 0x1733, 0x1733 }, -{ 0x1734, 0x1734, 0x1734 }, -{ 0x1740, 0x1740, 0x1740 }, -{ 0x1741, 0x1741, 0x1741 }, -{ 0x1742, 0x1742, 0x1742 }, -{ 0x1743, 0x1743, 0x1743 }, -{ 0x1744, 0x1744, 0x1744 }, -{ 0x1745, 0x1745, 0x1745 }, -{ 0x1746, 0x1746, 0x1746 }, -{ 0x1747, 0x1747, 0x1747 }, -{ 0x1748, 0x1748, 0x1748 }, -{ 0x1749, 0x1749, 0x1749 }, -{ 0x174A, 0x174A, 0x174A }, -{ 0x174B, 0x174B, 0x174B }, -{ 0x174C, 0x174C, 0x174C }, -{ 0x174D, 0x174D, 0x174D }, -{ 0x174E, 0x174E, 0x174E }, -{ 0x174F, 0x174F, 0x174F }, -{ 0x1750, 0x1750, 0x1750 }, -{ 0x1751, 0x1751, 0x1751 }, -{ 0x1752, 0x1752, 0x1752 }, -{ 0x1753, 0x1753, 0x1753 }, -{ 0x1760, 0x1760, 0x1760 }, -{ 0x1761, 0x1761, 0x1761 }, -{ 0x1762, 0x1762, 0x1762 }, -{ 0x1763, 0x1763, 0x1763 }, -{ 0x1764, 0x1764, 0x1764 }, -{ 0x1765, 0x1765, 0x1765 }, -{ 0x1766, 0x1766, 0x1766 }, -{ 0x1767, 0x1767, 0x1767 }, -{ 0x1768, 0x1768, 0x1768 }, -{ 0x1769, 0x1769, 0x1769 }, -{ 0x176A, 0x176A, 0x176A }, -{ 0x176B, 0x176B, 0x176B }, -{ 0x176C, 0x176C, 0x176C }, -{ 0x176E, 0x176E, 0x176E }, -{ 0x176F, 0x176F, 0x176F }, -{ 0x1770, 0x1770, 0x1770 }, -{ 0x1772, 0x1772, 0x1772 }, -{ 0x1773, 0x1773, 0x1773 }, -{ 0x1780, 0x1780, 0x1780 }, -{ 0x1781, 0x1781, 0x1781 }, -{ 0x1782, 0x1782, 0x1782 }, -{ 0x1783, 0x1783, 0x1783 }, -{ 0x1784, 0x1784, 0x1784 }, -{ 0x1785, 0x1785, 0x1785 }, -{ 0x1786, 0x1786, 0x1786 }, -{ 0x1787, 0x1787, 0x1787 }, -{ 0x1788, 0x1788, 0x1788 }, -{ 0x1789, 0x1789, 0x1789 }, -{ 0x178A, 0x178A, 0x178A }, -{ 0x178B, 0x178B, 0x178B }, -{ 0x178C, 0x178C, 0x178C }, -{ 0x178D, 0x178D, 0x178D }, -{ 0x178E, 0x178E, 0x178E }, -{ 0x178F, 0x178F, 0x178F }, -{ 0x1790, 0x1790, 0x1790 }, -{ 0x1791, 0x1791, 0x1791 }, -{ 0x1792, 0x1792, 0x1792 }, -{ 0x1793, 0x1793, 0x1793 }, -{ 0x1794, 0x1794, 0x1794 }, -{ 0x1795, 0x1795, 0x1795 }, -{ 0x1796, 0x1796, 0x1796 }, -{ 0x1797, 0x1797, 0x1797 }, -{ 0x1798, 0x1798, 0x1798 }, -{ 0x1799, 0x1799, 0x1799 }, -{ 0x179A, 0x179A, 0x179A }, -{ 0x179B, 0x179B, 0x179B }, -{ 0x179C, 0x179C, 0x179C }, -{ 0x179D, 0x179D, 0x179D }, -{ 0x179E, 0x179E, 0x179E }, -{ 0x179F, 0x179F, 0x179F }, -{ 0x17A0, 0x17A0, 0x17A0 }, -{ 0x17A1, 0x17A1, 0x17A1 }, -{ 0x17A2, 0x17A2, 0x17A2 }, -{ 0x17A3, 0x17A3, 0x17A3 }, -{ 0x17A4, 0x17A4, 0x17A4 }, -{ 0x17A5, 0x17A5, 0x17A5 }, -{ 0x17A6, 0x17A6, 0x17A6 }, -{ 0x17A7, 0x17A7, 0x17A7 }, -{ 0x17A8, 0x17A8, 0x17A8 }, -{ 0x17A9, 0x17A9, 0x17A9 }, -{ 0x17AA, 0x17AA, 0x17AA }, -{ 0x17AB, 0x17AB, 0x17AB }, -{ 0x17AC, 0x17AC, 0x17AC }, -{ 0x17AD, 0x17AD, 0x17AD }, -{ 0x17AE, 0x17AE, 0x17AE }, -{ 0x17AF, 0x17AF, 0x17AF }, -{ 0x17B0, 0x17B0, 0x17B0 }, -{ 0x17B1, 0x17B1, 0x17B1 }, -{ 0x17B2, 0x17B2, 0x17B2 }, -{ 0x17B3, 0x17B3, 0x17B3 }, -{ 0x17B7, 0x17B7, 0x17B7 }, -{ 0x17B8, 0x17B8, 0x17B8 }, -{ 0x17B9, 0x17B9, 0x17B9 }, -{ 0x17BA, 0x17BA, 0x17BA }, -{ 0x17BB, 0x17BB, 0x17BB }, -{ 0x17BC, 0x17BC, 0x17BC }, -{ 0x17BD, 0x17BD, 0x17BD }, -{ 0x17C6, 0x17C6, 0x17C6 }, -{ 0x17C9, 0x17C9, 0x17C9 }, -{ 0x17CA, 0x17CA, 0x17CA }, -{ 0x17CB, 0x17CB, 0x17CB }, -{ 0x17CC, 0x17CC, 0x17CC }, -{ 0x17CD, 0x17CD, 0x17CD }, -{ 0x17CE, 0x17CE, 0x17CE }, -{ 0x17CF, 0x17CF, 0x17CF }, -{ 0x17D0, 0x17D0, 0x17D0 }, -{ 0x17D1, 0x17D1, 0x17D1 }, -{ 0x17D2, 0x17D2, 0x17D2 }, -{ 0x17D3, 0x17D3, 0x17D3 }, -{ 0x17D7, 0x17D7, 0x17D7 }, -{ 0x17DC, 0x17DC, 0x17DC }, -{ 0x17DD, 0x17DD, 0x17DD }, -{ 0x180B, 0x180B, 0x180B }, -{ 0x180C, 0x180C, 0x180C }, -{ 0x180D, 0x180D, 0x180D }, -{ 0x1820, 0x1820, 0x1820 }, -{ 0x1821, 0x1821, 0x1821 }, -{ 0x1822, 0x1822, 0x1822 }, -{ 0x1823, 0x1823, 0x1823 }, -{ 0x1824, 0x1824, 0x1824 }, -{ 0x1825, 0x1825, 0x1825 }, -{ 0x1826, 0x1826, 0x1826 }, -{ 0x1827, 0x1827, 0x1827 }, -{ 0x1828, 0x1828, 0x1828 }, -{ 0x1829, 0x1829, 0x1829 }, -{ 0x182A, 0x182A, 0x182A }, -{ 0x182B, 0x182B, 0x182B }, -{ 0x182C, 0x182C, 0x182C }, -{ 0x182D, 0x182D, 0x182D }, -{ 0x182E, 0x182E, 0x182E }, -{ 0x182F, 0x182F, 0x182F }, -{ 0x1830, 0x1830, 0x1830 }, -{ 0x1831, 0x1831, 0x1831 }, -{ 0x1832, 0x1832, 0x1832 }, -{ 0x1833, 0x1833, 0x1833 }, -{ 0x1834, 0x1834, 0x1834 }, -{ 0x1835, 0x1835, 0x1835 }, -{ 0x1836, 0x1836, 0x1836 }, -{ 0x1837, 0x1837, 0x1837 }, -{ 0x1838, 0x1838, 0x1838 }, -{ 0x1839, 0x1839, 0x1839 }, -{ 0x183A, 0x183A, 0x183A }, -{ 0x183B, 0x183B, 0x183B }, -{ 0x183C, 0x183C, 0x183C }, -{ 0x183D, 0x183D, 0x183D }, -{ 0x183E, 0x183E, 0x183E }, -{ 0x183F, 0x183F, 0x183F }, -{ 0x1840, 0x1840, 0x1840 }, -{ 0x1841, 0x1841, 0x1841 }, -{ 0x1842, 0x1842, 0x1842 }, -{ 0x1843, 0x1843, 0x1843 }, -{ 0x1844, 0x1844, 0x1844 }, -{ 0x1845, 0x1845, 0x1845 }, -{ 0x1846, 0x1846, 0x1846 }, -{ 0x1847, 0x1847, 0x1847 }, -{ 0x1848, 0x1848, 0x1848 }, -{ 0x1849, 0x1849, 0x1849 }, -{ 0x184A, 0x184A, 0x184A }, -{ 0x184B, 0x184B, 0x184B }, -{ 0x184C, 0x184C, 0x184C }, -{ 0x184D, 0x184D, 0x184D }, -{ 0x184E, 0x184E, 0x184E }, -{ 0x184F, 0x184F, 0x184F }, -{ 0x1850, 0x1850, 0x1850 }, -{ 0x1851, 0x1851, 0x1851 }, -{ 0x1852, 0x1852, 0x1852 }, -{ 0x1853, 0x1853, 0x1853 }, -{ 0x1854, 0x1854, 0x1854 }, -{ 0x1855, 0x1855, 0x1855 }, -{ 0x1856, 0x1856, 0x1856 }, -{ 0x1857, 0x1857, 0x1857 }, -{ 0x1858, 0x1858, 0x1858 }, -{ 0x1859, 0x1859, 0x1859 }, -{ 0x185A, 0x185A, 0x185A }, -{ 0x185B, 0x185B, 0x185B }, -{ 0x185C, 0x185C, 0x185C }, -{ 0x185D, 0x185D, 0x185D }, -{ 0x185E, 0x185E, 0x185E }, -{ 0x185F, 0x185F, 0x185F }, -{ 0x1860, 0x1860, 0x1860 }, -{ 0x1861, 0x1861, 0x1861 }, -{ 0x1862, 0x1862, 0x1862 }, -{ 0x1863, 0x1863, 0x1863 }, -{ 0x1864, 0x1864, 0x1864 }, -{ 0x1865, 0x1865, 0x1865 }, -{ 0x1866, 0x1866, 0x1866 }, -{ 0x1867, 0x1867, 0x1867 }, -{ 0x1868, 0x1868, 0x1868 }, -{ 0x1869, 0x1869, 0x1869 }, -{ 0x186A, 0x186A, 0x186A }, -{ 0x186B, 0x186B, 0x186B }, -{ 0x186C, 0x186C, 0x186C }, -{ 0x186D, 0x186D, 0x186D }, -{ 0x186E, 0x186E, 0x186E }, -{ 0x186F, 0x186F, 0x186F }, -{ 0x1870, 0x1870, 0x1870 }, -{ 0x1871, 0x1871, 0x1871 }, -{ 0x1872, 0x1872, 0x1872 }, -{ 0x1873, 0x1873, 0x1873 }, -{ 0x1874, 0x1874, 0x1874 }, -{ 0x1875, 0x1875, 0x1875 }, -{ 0x1876, 0x1876, 0x1876 }, -{ 0x1877, 0x1877, 0x1877 }, -{ 0x1880, 0x1880, 0x1880 }, -{ 0x1881, 0x1881, 0x1881 }, -{ 0x1882, 0x1882, 0x1882 }, -{ 0x1883, 0x1883, 0x1883 }, -{ 0x1884, 0x1884, 0x1884 }, -{ 0x1885, 0x1885, 0x1885 }, -{ 0x1886, 0x1886, 0x1886 }, -{ 0x1887, 0x1887, 0x1887 }, -{ 0x1888, 0x1888, 0x1888 }, -{ 0x1889, 0x1889, 0x1889 }, -{ 0x188A, 0x188A, 0x188A }, -{ 0x188B, 0x188B, 0x188B }, -{ 0x188C, 0x188C, 0x188C }, -{ 0x188D, 0x188D, 0x188D }, -{ 0x188E, 0x188E, 0x188E }, -{ 0x188F, 0x188F, 0x188F }, -{ 0x1890, 0x1890, 0x1890 }, -{ 0x1891, 0x1891, 0x1891 }, -{ 0x1892, 0x1892, 0x1892 }, -{ 0x1893, 0x1893, 0x1893 }, -{ 0x1894, 0x1894, 0x1894 }, -{ 0x1895, 0x1895, 0x1895 }, -{ 0x1896, 0x1896, 0x1896 }, -{ 0x1897, 0x1897, 0x1897 }, -{ 0x1898, 0x1898, 0x1898 }, -{ 0x1899, 0x1899, 0x1899 }, -{ 0x189A, 0x189A, 0x189A }, -{ 0x189B, 0x189B, 0x189B }, -{ 0x189C, 0x189C, 0x189C }, -{ 0x189D, 0x189D, 0x189D }, -{ 0x189E, 0x189E, 0x189E }, -{ 0x189F, 0x189F, 0x189F }, -{ 0x18A0, 0x18A0, 0x18A0 }, -{ 0x18A1, 0x18A1, 0x18A1 }, -{ 0x18A2, 0x18A2, 0x18A2 }, -{ 0x18A3, 0x18A3, 0x18A3 }, -{ 0x18A4, 0x18A4, 0x18A4 }, -{ 0x18A5, 0x18A5, 0x18A5 }, -{ 0x18A6, 0x18A6, 0x18A6 }, -{ 0x18A7, 0x18A7, 0x18A7 }, -{ 0x18A8, 0x18A8, 0x18A8 }, -{ 0x18A9, 0x18A9, 0x18A9 }, -{ 0x1900, 0x1900, 0x1900 }, -{ 0x1901, 0x1901, 0x1901 }, -{ 0x1902, 0x1902, 0x1902 }, -{ 0x1903, 0x1903, 0x1903 }, -{ 0x1904, 0x1904, 0x1904 }, -{ 0x1905, 0x1905, 0x1905 }, -{ 0x1906, 0x1906, 0x1906 }, -{ 0x1907, 0x1907, 0x1907 }, -{ 0x1908, 0x1908, 0x1908 }, -{ 0x1909, 0x1909, 0x1909 }, -{ 0x190A, 0x190A, 0x190A }, -{ 0x190B, 0x190B, 0x190B }, -{ 0x190C, 0x190C, 0x190C }, -{ 0x190D, 0x190D, 0x190D }, -{ 0x190E, 0x190E, 0x190E }, -{ 0x190F, 0x190F, 0x190F }, -{ 0x1910, 0x1910, 0x1910 }, -{ 0x1911, 0x1911, 0x1911 }, -{ 0x1912, 0x1912, 0x1912 }, -{ 0x1913, 0x1913, 0x1913 }, -{ 0x1914, 0x1914, 0x1914 }, -{ 0x1915, 0x1915, 0x1915 }, -{ 0x1916, 0x1916, 0x1916 }, -{ 0x1917, 0x1917, 0x1917 }, -{ 0x1918, 0x1918, 0x1918 }, -{ 0x1919, 0x1919, 0x1919 }, -{ 0x191A, 0x191A, 0x191A }, -{ 0x191B, 0x191B, 0x191B }, -{ 0x191C, 0x191C, 0x191C }, -{ 0x1920, 0x1920, 0x1920 }, -{ 0x1921, 0x1921, 0x1921 }, -{ 0x1922, 0x1922, 0x1922 }, -{ 0x1927, 0x1927, 0x1927 }, -{ 0x1928, 0x1928, 0x1928 }, -{ 0x1932, 0x1932, 0x1932 }, -{ 0x1939, 0x1939, 0x1939 }, -{ 0x193A, 0x193A, 0x193A }, -{ 0x193B, 0x193B, 0x193B }, -{ 0x1950, 0x1950, 0x1950 }, -{ 0x1951, 0x1951, 0x1951 }, -{ 0x1952, 0x1952, 0x1952 }, -{ 0x1953, 0x1953, 0x1953 }, -{ 0x1954, 0x1954, 0x1954 }, -{ 0x1955, 0x1955, 0x1955 }, -{ 0x1956, 0x1956, 0x1956 }, -{ 0x1957, 0x1957, 0x1957 }, -{ 0x1958, 0x1958, 0x1958 }, -{ 0x1959, 0x1959, 0x1959 }, -{ 0x195A, 0x195A, 0x195A }, -{ 0x195B, 0x195B, 0x195B }, -{ 0x195C, 0x195C, 0x195C }, -{ 0x195D, 0x195D, 0x195D }, -{ 0x195E, 0x195E, 0x195E }, -{ 0x195F, 0x195F, 0x195F }, -{ 0x1960, 0x1960, 0x1960 }, -{ 0x1961, 0x1961, 0x1961 }, -{ 0x1962, 0x1962, 0x1962 }, -{ 0x1963, 0x1963, 0x1963 }, -{ 0x1964, 0x1964, 0x1964 }, -{ 0x1965, 0x1965, 0x1965 }, -{ 0x1966, 0x1966, 0x1966 }, -{ 0x1967, 0x1967, 0x1967 }, -{ 0x1968, 0x1968, 0x1968 }, -{ 0x1969, 0x1969, 0x1969 }, -{ 0x196A, 0x196A, 0x196A }, -{ 0x196B, 0x196B, 0x196B }, -{ 0x196C, 0x196C, 0x196C }, -{ 0x196D, 0x196D, 0x196D }, -{ 0x1970, 0x1970, 0x1970 }, -{ 0x1971, 0x1971, 0x1971 }, -{ 0x1972, 0x1972, 0x1972 }, -{ 0x1973, 0x1973, 0x1973 }, -{ 0x1974, 0x1974, 0x1974 }, -{ 0x1980, 0x1980, 0x1980 }, -{ 0x1981, 0x1981, 0x1981 }, -{ 0x1982, 0x1982, 0x1982 }, -{ 0x1983, 0x1983, 0x1983 }, -{ 0x1984, 0x1984, 0x1984 }, -{ 0x1985, 0x1985, 0x1985 }, -{ 0x1986, 0x1986, 0x1986 }, -{ 0x1987, 0x1987, 0x1987 }, -{ 0x1988, 0x1988, 0x1988 }, -{ 0x1989, 0x1989, 0x1989 }, -{ 0x198A, 0x198A, 0x198A }, -{ 0x198B, 0x198B, 0x198B }, -{ 0x198C, 0x198C, 0x198C }, -{ 0x198D, 0x198D, 0x198D }, -{ 0x198E, 0x198E, 0x198E }, -{ 0x198F, 0x198F, 0x198F }, -{ 0x1990, 0x1990, 0x1990 }, -{ 0x1991, 0x1991, 0x1991 }, -{ 0x1992, 0x1992, 0x1992 }, -{ 0x1993, 0x1993, 0x1993 }, -{ 0x1994, 0x1994, 0x1994 }, -{ 0x1995, 0x1995, 0x1995 }, -{ 0x1996, 0x1996, 0x1996 }, -{ 0x1997, 0x1997, 0x1997 }, -{ 0x1998, 0x1998, 0x1998 }, -{ 0x1999, 0x1999, 0x1999 }, -{ 0x199A, 0x199A, 0x199A }, -{ 0x199B, 0x199B, 0x199B }, -{ 0x199C, 0x199C, 0x199C }, -{ 0x199D, 0x199D, 0x199D }, -{ 0x199E, 0x199E, 0x199E }, -{ 0x199F, 0x199F, 0x199F }, -{ 0x19A0, 0x19A0, 0x19A0 }, -{ 0x19A1, 0x19A1, 0x19A1 }, -{ 0x19A2, 0x19A2, 0x19A2 }, -{ 0x19A3, 0x19A3, 0x19A3 }, -{ 0x19A4, 0x19A4, 0x19A4 }, -{ 0x19A5, 0x19A5, 0x19A5 }, -{ 0x19A6, 0x19A6, 0x19A6 }, -{ 0x19A7, 0x19A7, 0x19A7 }, -{ 0x19A8, 0x19A8, 0x19A8 }, -{ 0x19A9, 0x19A9, 0x19A9 }, -{ 0x19C1, 0x19C1, 0x19C1 }, -{ 0x19C2, 0x19C2, 0x19C2 }, -{ 0x19C3, 0x19C3, 0x19C3 }, -{ 0x19C4, 0x19C4, 0x19C4 }, -{ 0x19C5, 0x19C5, 0x19C5 }, -{ 0x19C6, 0x19C6, 0x19C6 }, -{ 0x19C7, 0x19C7, 0x19C7 }, -{ 0x1A00, 0x1A00, 0x1A00 }, -{ 0x1A01, 0x1A01, 0x1A01 }, -{ 0x1A02, 0x1A02, 0x1A02 }, -{ 0x1A03, 0x1A03, 0x1A03 }, -{ 0x1A04, 0x1A04, 0x1A04 }, -{ 0x1A05, 0x1A05, 0x1A05 }, -{ 0x1A06, 0x1A06, 0x1A06 }, -{ 0x1A07, 0x1A07, 0x1A07 }, -{ 0x1A08, 0x1A08, 0x1A08 }, -{ 0x1A09, 0x1A09, 0x1A09 }, -{ 0x1A0A, 0x1A0A, 0x1A0A }, -{ 0x1A0B, 0x1A0B, 0x1A0B }, -{ 0x1A0C, 0x1A0C, 0x1A0C }, -{ 0x1A0D, 0x1A0D, 0x1A0D }, -{ 0x1A0E, 0x1A0E, 0x1A0E }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091 }, -{ 0x2092, 0x2092, 0x2092 }, -{ 0x2093, 0x2093, 0x2093 }, -{ 0x2094, 0x2094, 0x2094 }, -{ 0x20D0, 0x20D0, 0x20D0 }, -{ 0x20D1, 0x20D1, 0x20D1 }, -{ 0x20D2, 0x20D2, 0x20D2 }, -{ 0x20D3, 0x20D3, 0x20D3 }, -{ 0x20D4, 0x20D4, 0x20D4 }, -{ 0x20D5, 0x20D5, 0x20D5 }, -{ 0x20D6, 0x20D6, 0x20D6 }, -{ 0x20D7, 0x20D7, 0x20D7 }, -{ 0x20D8, 0x20D8, 0x20D8 }, -{ 0x20D9, 0x20D9, 0x20D9 }, -{ 0x20DA, 0x20DA, 0x20DA }, -{ 0x20DB, 0x20DB, 0x20DB }, -{ 0x20DC, 0x20DC, 0x20DC }, -{ 0x20E1, 0x20E1, 0x20E1 }, -{ 0x20E5, 0x20E5, 0x20E5 }, -{ 0x20E6, 0x20E6, 0x20E6 }, -{ 0x20E7, 0x20E7, 0x20E7 }, -{ 0x20E8, 0x20E8, 0x20E8 }, -{ 0x20E9, 0x20E9, 0x20E9 }, -{ 0x20EA, 0x20EA, 0x20EA }, -{ 0x20EB, 0x20EB, 0x20EB }, -{ 0x2102, 0x2102, 0x2102 }, -{ 0x2107, 0x2107, 0x2107 }, -{ 0x210A, 0x210A, 0x210A }, -{ 0x210B, 0x210B, 0x210B }, -{ 0x210C, 0x210C, 0x210C }, -{ 0x210D, 0x210D, 0x210D }, -{ 0x210E, 0x210E, 0x210E }, -{ 0x210F, 0x210F, 0x210F }, -{ 0x2110, 0x2110, 0x2110 }, -{ 0x2111, 0x2111, 0x2111 }, -{ 0x2112, 0x2112, 0x2112 }, -{ 0x2113, 0x2113, 0x2113 }, -{ 0x2115, 0x2115, 0x2115 }, -{ 0x2119, 0x2119, 0x2119 }, -{ 0x211A, 0x211A, 0x211A }, -{ 0x211B, 0x211B, 0x211B }, -{ 0x211C, 0x211C, 0x211C }, -{ 0x211D, 0x211D, 0x211D }, -{ 0x2124, 0x2124, 0x2124 }, -{ 0x2126, 0x2126, 0x03C9 }, -{ 0x2128, 0x2128, 0x2128 }, -{ 0x212A, 0x212A, 0x006B }, -{ 0x212B, 0x212B, 0x00E5 }, -{ 0x212C, 0x212C, 0x212C }, -{ 0x212D, 0x212D, 0x212D }, -{ 0x212F, 0x212F, 0x212F }, -{ 0x2130, 0x2130, 0x2130 }, -{ 0x2131, 0x2131, 0x2131 }, -{ 0x2133, 0x2133, 0x2133 }, -{ 0x2134, 0x2134, 0x2134 }, -{ 0x2135, 0x2135, 0x2135 }, -{ 0x2136, 0x2136, 0x2136 }, -{ 0x2137, 0x2137, 0x2137 }, -{ 0x2138, 0x2138, 0x2138 }, -{ 0x2139, 0x2139, 0x2139 }, -{ 0x213C, 0x213C, 0x213C }, -{ 0x213D, 0x213D, 0x213D }, -{ 0x213E, 0x213E, 0x213E }, -{ 0x213F, 0x213F, 0x213F }, -{ 0x2145, 0x2145, 0x2145 }, -{ 0x2146, 0x2146, 0x2146 }, -{ 0x2147, 0x2147, 0x2147 }, -{ 0x2148, 0x2148, 0x2148 }, -{ 0x2149, 0x2149, 0x2149 }, -{ 0x2C00, 0x2C00, 0x2C30 }, -{ 0x2C01, 0x2C01, 0x2C31 }, -{ 0x2C02, 0x2C02, 0x2C32 }, -{ 0x2C03, 0x2C03, 0x2C33 }, -{ 0x2C04, 0x2C04, 0x2C34 }, -{ 0x2C05, 0x2C05, 0x2C35 }, -{ 0x2C06, 0x2C06, 0x2C36 }, -{ 0x2C07, 0x2C07, 0x2C37 }, -{ 0x2C08, 0x2C08, 0x2C38 }, -{ 0x2C09, 0x2C09, 0x2C39 }, -{ 0x2C0A, 0x2C0A, 0x2C3A }, -{ 0x2C0B, 0x2C0B, 0x2C3B }, -{ 0x2C0C, 0x2C0C, 0x2C3C }, -{ 0x2C0D, 0x2C0D, 0x2C3D }, -{ 0x2C0E, 0x2C0E, 0x2C3E }, -{ 0x2C0F, 0x2C0F, 0x2C3F }, -{ 0x2C10,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x2D08, 0x10A8, 0x2D08 }, -{ 0x2D09, 0x10A9, 0x2D09 }, -{ 0x2D0A, 0x10AA, 0x2D0A }, -{ 0x2D0B, 0x10AB, 0x2D0B }, -{ 0x2D0C, 0x10AC, 0x2D0C }, -{ 0x2D0D, 0x10AD, 0x2D0D }, -{ 0x2D0E, 0x10AE, 0x2D0E }, -{ 0x2D0F, 0x10AF, 0x2D0F }, -{ 0x2D10, 0x10B0, 0x2D10 }, -{ 0x2D11, 0x10B1, 0x2D11 }, -{ 0x2D12, 0x10B2, 0x2D12 }, -{ 0x2D13, 0x10B3, 0x2D13 }, -{ 0x2D14, 0x10B4, 0x2D14 }, -{ 0x2D15, 0x10B5, 0x2D15 }, -{ 0x2D16, 0x10B6, 0x2D16 }, -{ 0x2D17, 0x10B7, 0x2D17 }, -{ 0x2D18, 0x10B8, 0x2D18 }, -{ 0x2D19, 0x10B9, 0x2D19 }, -{ 0x2D1A, 0x10BA, 0x2D1A }, -{ 0x2D1B, 0x10BB, 0x2D1B }, -{ 0x2D1C, 0x10BC, 0x2D1C }, -{ 0x2D1D, 0x10BD, 0x2D1D }, -{ 0x2D1E, 0x10BE, 0x2D1E }, -{ 0x2D1F, 0x10BF, 0x2D1F }, -{ 0x2D20, 0x10C0, 0x2D20 }, -{ 0x2D21, 0x10C1, 0x2D21 }, -{ 0x2D22, 0x10C2, 0x2D22 }, -{ 0x2D23, 0x10C3, 0x2D23 }, -{ 0x2D24, 0x10C4, 0x2D24 }, -{ 0x2D25, 0x10C5, 0x2D25 }, -{ 0x2D30, 0x2D30, 0x2D30 }, -{ 0x2D31, 0x2D31, 0x2D31 }, -{ 0x2D32, 0x2D32, 0x2D32 }, -{ 0x2D33, 0x2D33, 0x2D33 }, -{ 0x2D34, 0x2D34, 0x2D34 }, -{ 0x2D35, 0x2D35, 0x2D35 }, -{ 0x2D36, 0x2D36, 0x2D36 }, -{ 0x2D37, 0x2D37, 0x2D37 }, -{ 0x2D38, 0x2D38, 0x2D38 }, -{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, -{ 0x2DD1, 0x2DD1, 0x2DD1 }, -{ 0x2DD2, 0x2DD2, 0x2DD2 }, -{ 0x2DD3, 0x2DD3, 0x2DD3 }, -{ 0x2DD4, 0x2DD4, 0x2DD4 }, -{ 0x2DD5, 0x2DD5, 0x2DD5 }, -{ 0x2DD6, 0x2DD6, 0x2DD6 }, -{ 0x2DD8, 0x2DD8, 0x2DD8 }, -{ 0x2DD9, 0x2DD9, 0x2DD9 }, -{ 0x2DDA, 0x2DDA, 0x2DDA }, -{ 0x2DDB, 0x2DDB, 0x2DDB }, -{ 0x2DDC, 0x2DDC, 0x2DDC }, -{ 0x2DDD, 0x2DDD, 0x2DDD }, -{ 0x2DDE, 0x2DDE, 0x2DDE }, -{ 0x3005, 0x3005, 0x3005 }, -{ 0x3006, 0x3006, 0x3006 }, -{ 0x302A, 0x302A, 0x302A }, -{ 0x302B, 0x302B, 0x302B }, -{ 0x302C, 0x302C, 0x302C }, -{ 0x302D, 0x302D, 0x302D }, -{ 0x302E, 0x302E, 0x302E }, -{ 0x302F, 0x302F, 0x302F }, -{ 0x3031, 0x3031, 0x3031 }, -{ 0x3032, 0x3032, 0x3032 }, -{ 0x3033, 0x3033, 0x3033 }, -{ 0x3034, 0x3034, 0x3034 }, -{ 0x3035, 0x3035, 0x3035 }, -{ 0x303B, 0x303B, 0x303B }, -{ 0x303C, 0x303C, 0x303C }, -{ 0x3041, 0x3041, 0x3041 }, -{ 0x3042, 0x3042, 0x3042 }, -{ 0x3043, 0x3043, 0x3043 }, -{ 0x3044, 0x3044, 0x3044 }, -{ 0x3045, 0x3045, 0x3045 }, -{ 0x3046, 0x3046, 0x3046 }, -{ 0x3047, 0x3047, 0x3047 }, -{ 0x3048, 0x3048, 0x3048 }, -{ 0x3049, 0x3049, 0x3049 }, -{ 0x304A, 0x304A, 0x304A }, -{ 0x304B, 0x304B, 0x304B }, -{ 0x304C, 0x304C, 0x304C }, -{ 0x304D, 0x304D, 0x304D }, -{ 0x304E, 0x304E, 0x304E }, -{ 0x304F, 0x304F, 0x304F }, -{ 0x3050, 0x3050, 0x3050 }, -{ 0x3051, 0x3051, 0x3051 }, -{ 0x3052, 0x3052, 0x3052 }, -{ 0x3053, 0x3053, 0x3053 }, -{ 0x3054, 0x3054, 0x3054 }, -{ 0x3055, 0x3055, 0x3055 }, -{ 0x3056, 0x3056, 0x3056 }, -{ 0x3057, 0x3057, 0x3057 }, -{ 0x3058, 0x3058, 0x3058 }, -{ 0x3059, 0x3059, 0x3059 }, -{ 0x305A, 0x305A, 0x305A }, -{ 0x305B, 0x305B, 0x305B }, -{ 0x305C, 0x305C, 0x305C }, -{ 0x305D, 0x305D, 0x305D }, -{ 0x305E, 0x305E, 0x305E }, -{ 0x305F, 0x305F, 0x305F }, -{ 0x3060, 0x3060, 0x3060 }, -{ 0x3061, 0x3061, 0x3061 }, -{ 0x3062, 0x3062, 0x3062 }, -{ 0x3063, 0x3063, 0x3063 }, -{ 0x3064, 0x3064, 0x3064 }, -{ 0x3065, 0x3065, 0x3065 }, -{ 0x3066, 0x3066, 0x3066 }, -{ 0x3067, 0x3067, 0x3067 }, -{ 0x3068, 0x3068, 0x3068 }, -{ 0x3069, 0x3069, 0x3069 }, -{ 0x306A, 0x306A, 0x306A }, -{ 0x306B, 0x306B, 0x306B }, -{ 0x306C, 0x306C, 0x306C }, -{ 0x306D, 0x306D, 0x306D }, -{ 0x306E, 0x306E, 0x306E }, -{ 0x306F, 0x306F, 0x306F }, -{ 0x3070, 0x3070, 0x3070 }, -{ 0x3071, 0x3071, 0x3071 }, -{ 0x3072, 0x3072, 0x3072 }, -{ 0x3073, 0x3073, 0x3073 }, -{ 0x3074, 0x3074, 0x3074 }, -{ 0x3075, 0x3075, 0x3075 }, -{ 0x3076, 0x3076, 0x3076 }, -{ 0x3077, 0x3077, 0x3077 }, -{ 0x3078, 0x3078, 0x3078 }, -{ 0x3079, 0x3079, 0x3079 }, -{ 0x307A, 0x307A, 0x307A }, -{ 0x307B, 0x307B, 0x307B }, -{ 0x307C, 0x307C, 0x307C }, -{ 0x307D, 0x307D, 0x307D }, -{ 0x307E, 0x307E, 0x307E }, -{ 0x307F, 0x307F, 0x307F }, -{ 0x3080, 0x3080, 0x3080 }, -{ 0x3081, 0x3081, 0x3081 }, -{ 0x3082, 0x3082, 0x3082 }, -{ 0x3083, 0x3083, 0x3083 }, -{ 0x3084, 0x3084, 0x3084 }, -{ 0x3085, 0x3085, 0x3085 }, -{ 0x3086, 0x3086, 0x3086 }, -{ 0x3087, 0x3087, 0x3087 }, -{ 0x3088, 0x3088, 0x3088 }, -{ 0x3089, 0x3089, 0x3089 }, -{ 0x308A, 0x308A, 0x308A }, -{ 0x308B, 0x308B, 0x308B }, -{ 0x308C, 0x308C, 0x308C }, -{ 0x308D, 0x308D, 0x308D }, -{ 0x308E, 0x308E, 0x308E }, -{ 0x308F, 0x308F, 0x308F }, -{ 0x3090, 0x3090, 0x3090 }, -{ 0x3091, 0x3091, 0x3091 }, -{ 0x3092, 0x3092, 0x3092 }, -{ 0x3093, 0x3093, 0x3093 }, -{ 0x3094, 0x3094, 0x3094 }, -{ 0x3095, 0x3095, 0x3095 }, -{ 0x3096, 0x3096, 0x3096 }, -{ 0x3099, 0x3099, 0x3099 }, -{ 0x309A, 0x309A, 0x309A }, -{ 0x309D, 0x309D, 0x309D }, -{ 0x309E, 0x309E, 0x309E }, -{ 0x309F, 0x309F, 0x309F }, -{ 0x30A1, 0x30A1, 0x30A1 }, -{ 0x30A2, 0x30A2, 0x30A2 }, -{ 0x30A3, 0x30A3, 0x30A3 }, -{ 0x30A4, 0x30A4, 0x30A4 }, -{ 0x30A5, 0x30A5, 0x30A5 }, -{ 0x30A6, 0x30A6, 0x30A6 }, -{ 0x30A7, 0x30A7, 0x30A7 }, -{ 0x30A8, 0x30A8, 0x30A8 }, -{ 0x30A9, 0x30A9, 0x30A9 }, -{ 0x30AA, 0x30AA, 0x30AA }, -{ 0x30AB, 0x30AB, 0x30AB }, -{ 0x30AC, 0x30AC, 0x30AC }, -{ 0x30AD, 0x30AD, 0x30AD }, -{ 0x30AE, 0x30AE, 0x30AE }, -{ 0x30AF, 0x30AF, 0x30AF }, -{ 0x30B0, 0x30B0, 0x30B0 }, -{ 0x30B1, 0x30B1, 0x30B1 }, -{ 0x30B2, 0x30B2, 0x30B2 }, -{ 0x30B3, 0x30B3, 0x30B3 }, -{ 0x30B4, 0x30B4, 0x30B4 }, -{ 0x30B5, 0x30B5, 0x30B5 }, -{ 0x30B6, 0x30B6, 0x30B6 }, -{ 0x30B7, 0x30B7, 0x30B7 }, -{ 0x30B8, 0x30B8, 0x30B8 }, -{ 0x30B9, 0x30B9, 0x30B9 }, -{ 0x30BA, 0x30BA, 0x30BA }, -{ 0x30BB, 0x30BB, 0x30BB }, -{ 0x30BC, 0x30BC, 0x30BC }, -{ 0x30BD, 0x30BD, 0x30BD }, -{ 0x30BE, 0x30BE, 0x30BE }, -{ 0x30BF, 0x30BF, 0x30BF }, -{ 0x30C0, 0x30C0, 0x30C0 }, -{ 0x30C1, 0x30C1, 0x30C1 }, -{ 0x30C2, 0x30C2, 0x30C2 }, -{ 0x30C3, 0x30C3, 0x30C3 }, -{ 0x30C4, 0x30C4, 0x30C4 }, -{ 0x30C5, 0x30C5, 0x30C5 }, -{ 0x30C6, 0x30C6, 0x30C6 }, -{ 0x30C7, 0x30C7, 0x30C7 }, -{ 0x30C8, 0x30C8, 0x30C8 }, -{ 0x30C9, 0x30C9, 0x30C9 }, -{ 0x30CA, 0x30CA, 0x30CA }, -{ 0x30CB, 0x30CB, 0x30CB }, -{ 0x30CC, 0x30CC, 0x30CC }, -{ 0x30CD, 0x30CD, 0x30CD }, -{ 0x30CE, 0x30CE, 0x30CE }, -{ 0x30CF, 0x30CF, 0x30CF }, -{ 0x30D0, 0x30D0, 0x30D0 }, -{ 0x30D1, 0x30D1, 0x30D1 }, -{ 0x30D2, 0x30D2, 0x30D2 }, -{ 0x30D3, 0x30D3, 0x30D3 }, -{ 0x30D4, 0x30D4, 0x30D4 }, -{ 0x30D5, 0x30D5, 0x30D5 }, -{ 0x30D6, 0x30D6, 0x30D6 }, -{ 0x30D7, 0x30D7, 0x30D7 }, -{ 0x30D8, 0x30D8, 0x30D8 }, -{ 0x30D9, 0x30D9, 0x30D9 }, -{ 0x30DA, 0x30DA, 0x30DA }, -{ 0x30DB, 0x30DB, 0x30DB }, -{ 0x30DC, 0x30DC, 0x30DC }, -{ 0x30DD, 0x30DD, 0x30DD }, -{ 0x30DE, 0x30DE, 0x30DE }, -{ 0x30DF, 0x30DF, 0x30DF }, -{ 0x30E0, 0x30E0, 0x30E0 }, -{ 0x30E1, 0x30E1, 0x30E1 }, -{ 0x30E2, 0x30E2, 0x30E2 }, -{ 0x30E3, 0x30E3, 0x30E3 }, -{ 0x30E4, 0x30E4, 0x30E4 }, -{ 0x30E5, 0x30E5, 0x30E5 }, -{ 0x30E6, 0x30E6, 0x30E6 }, -{ 0x30E7, 0x30E7, 0x30E7 }, -{ 0x30E8, 0x30E8, 0x30E8 }, -{ 0x30E9, 0x30E9, 0x30E9 }, -{ 0x30EA, 0x30EA, 0x30EA }, -{ 0x30EB, 0x30EB, 0x30EB }, -{ 0x30EC, 0x30EC, 0x30EC }, -{ 0x30ED, 0x30ED, 0x30ED }, -{ 0x30EE, 0x30EE, 0x30EE }, -{ 0x30EF, 0x30EF, 0x30EF }, -{ 0x30F0, 0x30F0, 0x30F0 }, -{ 0x30F1, 0x30F1, 0x30F1 }, -{ 0x30F2, 0x30F2, 0x30F2 }, -{ 0x30F3, 0x30F3, 0x30F3 }, -{ 0x30F4, 0x30F4, 0x30F4 }, -{ 0x30F5, 0x30F5, 0x30F5 }, -{ 0x30F6, 0x30F6, 0x30F6 }, -{ 0x30F7, 0x30F7, 0x30F7 }, -{ 0x30F8, 0x30F8, 0x30F8 }, -{ 0x30F9, 0x30F9, 0x30F9 }, -{ 0x30FA, 0x30FA, 0x30FA }, -{ 0x30FC, 0x30FC, 0x30FC }, -{ 0x30FD, 0x30FD, 0x30FD }, -{ 0x30FE, 0x30FE, 0x30FE }, -{ 0x30FF, 0x30FF, 0x30FF }, -{ 0x3105, 0x3105, 0x3105 }, -{ 0x3106, 0x3106, 0x3106 }, -{ 0x3107, 0x3107, 0x3107 }, -{ 0x3108, 0x3108, 0x3108 }, -{ 0x3109, 0x3109, 0x3109 }, -{ 0x310A, 0x310A, 0x310A }, -{ 0x310B, 0x310B, 0x310B }, -{ 0x310C, 0x310C, 0x310C }, -{ 0x310D, 0x310D, 0x310D }, -{ 0x310E, 0x310E, 0x310E }, -{ 0x310F, 0x310F, 0x310F }, -{ 0x3110, 0x3110, 0x3110 }, -{ 0x3111, 0x3111, 0x3111 }, -{ 0x3112, 0x3112, 0x3112 }, -{ 0x3113, 0x3113, 0x3113 }, -{ 0x3114, 0x3114, 0x3114 }, -{ 0x3115, 0x3115, 0x3115 }, -{ 0x3116, 0x3116, 0x3116 }, -{ 0x3117, 0x3117, 0x3117 }, -{ 0x3118, 0x3118, 0x3118 }, -{ 0x3119, 0x3119, 0x3119 }, -{ 0x311A, 0x311A, 0x311A }, -{ 0x311B, 0x311B, 0x311B }, -{ 0x311C, 0x311C, 0x311C }, -{ 0x311D, 0x311D, 0x311D }, -{ 0x311E, 0x311E, 0x311E }, -{ 0x311F, 0x311F, 0x311F }, -{ 0x3120, 0x3120, 0x3120 }, -{ 0x3121, 0x3121, 0x3121 }, -{ 0x3122, 0x3122, 0x3122 }, -{ 0x3123, 0x3123, 0x3123 }, -{ 0x3124, 0x3124, 0x3124 }, -{ 0x3125, 0x3125, 0x3125 }, -{ 0x3126, 0x3126, 0x3126 }, -{ 0x3127, 0x3127, 0x3127 }, -{ 0x3128, 0x3128, 0x3128 }, -{ 0x3129, 0x3129, 0x3129 }, -{ 0x312A, 0x312A, 0x312A }, -{ 0x312B, 0x312B, 0x312B }, -{ 0x312C, 0x312C, 0x312C }, -{ 0x3131, 0x3131, 0x3131 }, -{ 0x3132, 0x3132, 0x3132 }, -{ 0x3133, 0x3133, 0x3133 }, -{ 0x3134, 0x3134, 0x3134 }, -{ 0x3135, 0x3135, 0x3135 }, -{ 0x3136, 0x3136, 0x3136 }, -{ 0x3137, 0x3137, 0x3137 }, -{ 0x3138, 0x3138, 0x3138 }, -{ 0x3139, 0x3139, 0x3139 }, -{ 0x313A, 0x313A, 0x313A }, -{ 0x313B, 0x313B, 0x313B }, -{ 0x313C, 0x313C, 0x313C }, -{ 0x313D, 0x313D, 0x313D }, -{ 0x313E, 0x313E, 0x313E }, -{ 0x313F, 0x313F, 0x313F }, -{ 0x3140, 0x3140, 0x3140 }, -{ 0x3141, 0x3141, 0x3141 }, -{ 0x3142, 0x3142, 0x3142 }, -{ 0x3143, 0x3143, 0x3143 }, -{ 0x3144, 0x3144, 0x3144 }, -{ 0x3145, 0x3145, 0x3145 }, -{ 0x3146, 0x3146, 0x3146 }, -{ 0x3147, 0x3147, 0x3147 }, -{ 0x3148, 0x3148, 0x3148 }, -{ 0x3149, 0x3149, 0x3149 }, -{ 0x314A, 0x314A, 0x314A }, -{ 0x314B, 0x314B, 0x314B }, -{ 0x314C, 0x314C, 0x314C }, -{ 0x314D, 0x314D, 0x314D }, -{ 0x314E, 0x314E, 0x314E }, -{ 0x314F, 0x314F, 0x314F }, -{ 0x3150, 0x3150, 0x3150 }, -{ 0x3151, 0x3151, 0x3151 }, -{ 0x3152, 0x3152, 0x3152 }, -{ 0x3153, 0x3153, 0x3153 }, -{ 0x3154, 0x3154, 0x3154 }, -{ 0x3155, 0x3155, 0x3155 }, -{ 0x3156, 0x3156, 0x3156 }, -{ 0x3157, 0x3157, 0x3157 }, -{ 0x3158, 0x3158, 0x3158 }, -{ 0x3159, 0x3159, 0x3159 }, -{ 0x315A, 0x315A, 0x315A }, -{ 0x315B, 0x315B, 0x315B }, -{ 0x315C, 0x315C, 0x315C }, -{ 0x315D, 0x315D, 0x315D }, -{ 0x315E, 0x315E, 0x315E }, -{ 0x315F, 0x315F, 0x315F }, -{ 0x3160, 0x3160, 0x3160 }, -{ 0x3161, 0x3161, 0x3161 }, -{ 0x3162, 0x3162, 0x3162 }, -{ 0x3163, 0x3163, 0x3163 }, -{ 0x3164, 0x3164, 0x3164 }, -{ 0x3165, 0x3165, 0x3165 }, -{ 0x3166, 0x3166, 0x3166 }, -{ 0x3167, 0x3167, 0x3167 }, -{ 0x3168, 0x3168, 0x3168 }, -{ 0x3169, 0x3169, 0x3169 }, -{ 0x316A, 0x316A, 0x316A }, -{ 0x316B, 0x316B, 0x316B }, -{ 0x316C, 0x316C, 0x316C }, -{ 0x316D, 0x316D, 0x316D }, -{ 0x316E, 0x316E, 0x316E }, -{ 0x316F, 0x316F, 0x316F }, -{ 0x3170, 0x3170, 0x3170 }, -{ 0x3171, 0x3171, 0x3171 }, -{ 0x3172, 0x3172, 0x3172 }, -{ 0x3173, 0x3173, 0x3173 }, -{ 0x3174, 0x3174, 0x3174 }, -{ 0x3175, 0x3175, 0x3175 }, -{ 0x3176, 0x3176, 0x3176 }, -{ 0x3177, 0x3177, 0x3177 }, -{ 0x3178, 0x3178, 0x3178 }, -{ 0x3179, 0x3179, 0x3179 }, -{ 0x317A, 0x317A, 0x317A }, -{ 0x317B, 0x317B, 0x317B }, -{ 0x317C, 0x317C, 0x317C }, -{ 0x317D, 0x317D, 0x317D }, -{ 0x317E, 0x317E, 0x317E }, -{ 0x317F, 0x317F, 0x317F }, -{ 0x3180, 0x3180, 0x3180 }, -{ 0x3181, 0x3181, 0x3181 }, -{ 0x3182, 0x3182, 0x3182 }, -{ 0x3183, 0x3183, 0x3183 }, -{ 0x3184, 0x3184, 0x3184 }, -{ 0x3185, 0x3185, 0x3185 }, -{ 0x3186, 0x3186, 0x3186 }, -{ 0x3187, 0x3187, 0x3187 }, -{ 0x3188, 0x3188, 0x3188 }, -{ 0x3189, 0x3189, 0x3189 }, -{ 0x318A, 0x318A, 0x318A }, -{ 0x318B, 0x318B, 0x318B }, -{ 0x318C, 0x318C, 0x318C }, -{ 0x318D, 0x318D, 0x318D }, -{ 0x318E, 0x318E, 0x318E }, -{ 0x31A0, 0x31A0, 0x31A0 }, -{ 0x31A1, 0x31A1, 0x31A1 }, -{ 0x31A2, 0x31A2, 0x31A2 }, -{ 0x31A3, 0x31A3, 0x31A3 }, -{ 0x31A4, 0x31A4, 0x31A4 }, -{ 0x31A5, 0x31A5, 0x31A5 }, -{ 0x31A6, 0x31A6, 0x31A6 }, -{ 0x31A7, 0x31A7, 0x31A7 }, -{ 0x31A8, 0x31A8, 0x31A8 }, -{ 0x31A9, 0x31A9, 0x31A9 }, -{ 0x31AA, 0x31AA, 0x31AA }, -{ 0x31AB, 0x31AB, 0x31AB }, -{ 0x31AC, 0x31AC, 0x31AC }, -{ 0x31AD, 0x31AD, 0x31AD }, -{ 0x31AE, 0x31AE, 0x31AE }, -{ 0x31AF, 0x31AF, 0x31AF }, -{ 0x31B0, 0x31B0, 0x31B0 }, -{ 0x31B1, 0x31B1, 0x31B1 }, -{ 0x31B2, 0x31B2, 0x31B2 }, -{ 0x31B3, 0x31B3, 0x31B3 }, -{ 0x31B4, 0x31B4, 0x31B4 }, -{ 0x31B5, 0x31B5, 0x31B5 }, -{ 0x31B6, 0x31B6, 0x31B6 }, -{ 0x31B7, 0x31B7, 0x31B7 }, -{ 0x31F0, 0x31F0, 0x31F0 }, -{ 0x31F1, 0x31F1, 0x31F1 }, -{ 0x31F2, 0x31F2, 0x31F2 }, -{ 0x31F3, 0x31F3, 0x31F3 }, -{ 0x31F4, 0x31F4, 0x31F4 }, -{ 0x31F5, 0x31F5, 0x31F5 }, -{ 0x31F6, 0x31F6, 0x31F6 }, -{ 0x31F7, 0x31F7, 0x31F7 }, -{ 0x31F8, 0x31F8, 0x31F8 }, -{ 0x31F9, 0x31F9, 0x31F9 }, -{ 0x31FA, 0x31FA, 0x31FA }, -{ 0x31FB, 0x31FB, 0x31FB }, -{ 0x31FC, 0x31FC, 0x31FC }, -{ 0x31FD, 0x31FD, 0x31FD }, -{ 0x31FE, 0x31FE, 0x31FE }, -{ 0x31FF, 0x31FF, 0x31FF }, -{ 0x3400, 0x3400, 0x3400 }, -{ 0x4DB5, 0x4DB5, 0x4DB5 }, -{ 0x4E00, 0x4E00, 0x4E00 }, -{ 0x9FBB, 0x9FBB, 0x9FBB }, -{ 0xA000, 0xA000, 0xA000 }, -{ 0xA001, 0xA001, 0xA001 }, -{ 0xA002, 0xA002, 0xA002 }, -{ 0xA003, 0xA003, 0xA003 }, -{ 0xA004, 0xA004, 0xA004 }, -{ 0xA005, 0xA005, 0xA005 }, -{ 0xA006, 0xA006, 0xA006 }, -{ 0xA007, 0xA007, 0xA007 }, -{ 0xA008, 0xA008, 0xA008 }, -{ 0xA009, 0xA009, 0xA009 }, -{ 0xA00A, 0xA00A, 0xA00A }, -{ 0xA00B, 0xA00B, 0xA00B }, -{ 0xA00C, 0xA00C, 0xA00C }, -{ 0xA00D, 0xA00D, 0xA00D }, -{ 0xA00E, 0xA00E, 0xA00E }, -{ 0xA00F, 0xA00F, 0xA00F }, -{ 0xA010, 0xA010, 0xA010 }, -{ 0xA011, 0xA011, 0xA011 }, -{ 0xA012, 0xA012, 0xA012 }, -{ 0xA013, 0xA013, 0xA013 }, -{ 0xA014, 0xA014, 0xA014 }, -{ 0xA015, 0xA015, 0xA015 }, -{ 0xA016, 0xA016, 0xA016 }, -{ 0xA017, 0xA017, 0xA017 }, -{ 0xA018, 0xA018, 0xA018 }, -{ 0xA019, 0xA019, 0xA019 }, -{ 0xA01A, 0xA01A, 0xA01A }, -{ 0xA01B, 0xA01B, 0xA01B }, -{ 0xA01C, 0xA01C, 0xA01C }, -{ 0xA01D, 0xA01D, 0xA01D }, -{ 0xA01E, 0xA01E, 0xA01E }, -{ 0xA01F, 0xA01F, 0xA01F }, -{ 0xA020, 0xA020, 0xA020 }, -{ 0xA021, 0xA021, 0xA021 }, -{ 0xA022, 0xA022, 0xA022 }, -{ 0xA023, 0xA023, 0xA023 }, -{ 0xA024, 0xA024, 0xA024 }, -{ 0xA025, 0xA025, 0xA025 }, -{ 0xA026, 0xA026, 0xA026 }, -{ 0xA027, 0xA027, 0xA027 }, -{ 0xA028, 0xA028, 0xA028 }, -{ 0xA029, 0xA029, 0xA029 }, -{ 0xA02A, 0xA02A, 0xA02A }, -{ 0xA02B, 0xA02B, 0xA02B }, -{ 0xA02C, 0xA02C, 0xA02C }, -{ 0xA02D, 0xA02D, 0xA02D }, -{ 0xA02E, 0xA02E, 0xA02E }, -{ 0xA02F, 0xA02F, 0xA02F }, -{ 0xA030, 0xA030, 0xA030 }, -{ 0xA031, 0xA031, 0xA031 }, -{ 0xA032, 0xA032, 0xA032 }, -{ 0xA033, 0xA033, 0xA033 }, -{ 0xA034, 0xA034, 0xA034 }, -{ 0xA035, 0xA035, 0xA035 }, -{ 0xA036, 0xA036, 0xA036 }, -{ 0xA037, 0xA037, 0xA037 }, -{ 0xA038, 0xA038, 0xA038 }, -{ 0xA039, 0xA039, 0xA039 }, -{ 0xA03A, 0xA03A, 0xA03A }, -{ 0xA03B, 0xA03B, 0xA03B }, -{ 0xA03C, 0xA03C, 0xA03C }, -{ 0xA03D, 0xA03D, 0xA03D }, -{ 0xA03E, 0xA03E, 0xA03E }, -{ 0xA03F, 0xA03F, 0xA03F }, -{ 0xA040, 0xA040, 0xA040 }, -{ 0xA041, 0xA041, 0xA041 }, -{ 0xA042, 0xA042, 0xA042 }, -{ 0xA043, 0xA043, 0xA043 }, -{ 0xA044, 0xA044, 0xA044 }, -{ 0xA045, 0xA045, 0xA045 }, -{ 0xA046, 0xA046, 0xA046 }, -{ 0xA047, 0xA047, 0xA047 }, -{ 0xA048, 0xA048, 0xA048 }, -{ 0xA049, 0xA049, 0xA049 }, -{ 0xA04A, 0xA04A, 0xA04A }, -{ 0xA04B, 0xA04B, 0xA04B }, -{ 0xA04C, 0xA04C, 0xA04C }, -{ 0xA04D, 0xA04D, 0xA04D }, -{ 0xA04E, 0xA04E, 0xA04E }, -{ 0xA04F, 0xA04F, 0xA04F }, -{ 0xA050, 0xA050, 0xA050 }, -{ 0xA051, 0xA051, 0xA051 }, -{ 0xA052, 0xA052, 0xA052 }, -{ 0xA053, 0xA053, 0xA053 }, -{ 0xA054, 0xA054, 0xA054 }, -{ 0xA055, 0xA055, 0xA055 }, -{ 0xA056, 0xA056, 0xA056 }, -{ 0xA057, 0xA057, 0xA057 }, -{ 0xA058, 0xA058, 0xA058 }, -{ 0xA059, 0xA059, 0xA059 }, -{ 0xA05A, 0xA05A, 0xA05A }, -{ 0xA05B, 0xA05B, 0xA05B }, -{ 0xA05C, 0xA05C, 0xA05C }, -{ 0xA05D, 0xA05D, 0xA05D }, -{ 0xA05E, 0xA05E, 0xA05E }, -{ 0xA05F, 0xA05F, 0xA05F }, -{ 0xA060, 0xA060, 0xA060 }, -{ 0xA061, 0xA061, 0xA061 }, -{ 0xA062, 0xA062, 0xA062 }, -{ 0xA063, 0xA063, 0xA063 }, -{ 0xA064, 0xA064, 0xA064 }, -{ 0xA065, 0xA065, 0xA065 }, -{ 0xA066, 0xA066, 0xA066 }, -{ 0xA067, 0xA067, 0xA067 }, -{ 0xA068, 0xA068, 0xA068 }, -{ 0xA069, 0xA069, 0xA069 }, -{ 0xA06A, 0xA06A, 0xA06A }, -{ 0xA06B, 0xA06B, 0xA06B }, -{ 0xA06C, 0xA06C, 0xA06C }, -{ 0xA06D, 0xA06D, 0xA06D }, -{ 0xA06E, 0xA06E, 0xA06E }, -{ 0xA06F, 0xA06F, 0xA06F }, -{ 0xA070, 0xA070, 0xA070 }, -{ 0xA071, 0xA071, 0xA071 }, -{ 0xA072, 0xA072, 0xA072 }, -{ 0xA073, 0xA073, 0xA073 }, -{ 0xA074, 0xA074, 0xA074 }, -{ 0xA075, 0xA075, 0xA075 }, -{ 0xA076, 0xA076, 0xA076 }, -{ 0xA077, 0xA077, 0xA077 }, -{ 0xA078, 0xA078, 0xA078 }, -{ 0xA079, 0xA079, 0xA079 }, -{ 0xA07A, 0xA07A, 0xA07A }, -{ 0xA07B, 0xA07B, 0xA07B }, -{ 0xA07C, 0xA07C, 0xA07C }, -{ 0xA07D, 0xA07D, 0xA07D }, -{ 0xA07E, 0xA07E, 0xA07E }, -{ 0xA07F, 0xA07F, 0xA07F }, -{ 0xA080, 0xA080, 0xA080 }, -{ 0xA081, 0xA081, 0xA081 }, -{ 0xA082, 0xA082, 0xA082 }, -{ 0xA083, 0xA083, 0xA083 }, -{ 0xA084, 0xA084, 0xA084 }, -{ 0xA085, 0xA085, 0xA085 }, -{ 0xA086, 0xA086, 0xA086 }, -{ 0xA087, 0xA087, 0xA087 }, -{ 0xA088, 0xA088, 0xA088 }, -{ 0xA089, 0xA089, 0xA089 }, -{ 0xA08A, 0xA08A, 0xA08A }, -{ 0xA08B, 0xA08B, 0xA08B }, -{ 0xA08C, 0xA08C, 0xA08C }, -{ 0xA08D, 0xA08D, 0xA08D }, -{ 0xA08E, 0xA08E, 0xA08E }, -{ 0xA08F, 0xA08F, 0xA08F }, -{ 0xA090, 0xA090, 0xA090 }, -{ 0xA091, 0xA091, 0xA091 }, -{ 0xA092, 0xA092, 0xA092 }, -{ 0xA093, 0xA093, 0xA093 }, -{ 0xA094, 0xA094, 0xA094 }, -{ 0xA095, 0xA095, 0xA095 }, -{ 0xA096, 0xA096, 0xA096 }, -{ 0xA097, 0xA097, 0xA097 }, -{ 0xA098, 0xA098, 0xA098 }, -{ 0xA099, 0xA099, 0xA099 }, -{ 0xA09A, 0xA09A, 0xA09A }, -{ 0xA09B, 0xA09B, 0xA09B }, -{ 0xA09C, 0xA09C, 0xA09C }, -{ 0xA09D, 0xA09D, 0xA09D }, -{ 0xA09E, 0xA09E, 0xA09E }, -{ 0xA09F, 0xA09F, 0xA09F }, -{ 0xA0A0, 0xA0A0, 0xA0A0 }, -{ 0xA0A1, 0xA0A1, 0xA0A1 }, -{ 0xA0A2, 0xA0A2, 0xA0A2 }, -{ 0xA0A3, 0xA0A3, 0xA0A3 }, -{ 0xA0A4, 0xA0A4, 0xA0A4 }, -{ 0xA0A5, 0xA0A5, 0xA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, 0xA0ED, 0xA0ED }, -{ 0xA0EE, 0xA0EE, 0xA0EE }, -{ 0xA0EF, 0xA0EF, 0xA0EF }, -{ 0xA0F0, 0xA0F0, 0xA0F0 }, -{ 0xA0F1, 0xA0F1, 0xA0F1 }, -{ 0xA0F2, 0xA0F2, 0xA0F2 }, -{ 0xA0F3, 0xA0F3, 0xA0F3 }, -{ 0xA0F4, 0xA0F4, 0xA0F4 }, -{ 0xA0F5, 0xA0F5, 0xA0F5 }, -{ 0xA0F6, 0xA0F6, 0xA0F6 }, -{ 0xA0F7, 0xA0F7, 0xA0F7 }, -{ 0xA0F8, 0xA0F8, 0xA0F8 }, -{ 0xA0F9, 0xA0F9, 0xA0F9 }, -{ 0xA0FA, 0xA0FA, 0xA0FA }, -{ 0xA0FB, 0xA0FB, 0xA0FB }, -{ 0xA0FC, 0xA0FC, 0xA0FC }, -{ 0xA0FD, 0xA0FD, 0xA0FD }, -{ 0xA0FE, 0xA0FE, 0xA0FE }, -{ 0xA0FF, 0xA0FF, 0xA0FF }, -{ 0xA100, 0xA100, 0xA100 }, -{ 0xA101, 0xA101, 0xA101 }, -{ 0xA102, 0xA102, 0xA102 }, -{ 0xA103, 0xA103, 0xA103 }, -{ 0xA104, 0xA104, 0xA104 }, -{ 0xA105, 0xA105, 0xA105 }, -{ 0xA106, 0xA106, 0xA106 }, -{ 0xA107, 0xA107, 0xA107 }, -{ 0xA108, 0xA108, 0xA108 }, -{ 0xA109, 0xA109, 0xA109 }, -{ 0xA10A, 0xA10A, 0xA10A }, -{ 0xA10B, 0xA10B, 0xA10B }, -{ 0xA10C, 0xA10C, 0xA10C }, -{ 0xA10D, 0xA10D, 0xA10D }, -{ 0xA10E, 0xA10E, 0xA10E }, -{ 0xA10F, 0xA10F, 0xA10F }, -{ 0xA110, 0xA110, 0xA110 }, -{ 0xA111, 0xA111, 0xA111 }, -{ 0xA112, 0xA112, 0xA112 }, -{ 0xA113, 0xA113, 0xA113 }, -{ 0xA114, 0xA114, 0xA114 }, -{ 0xA115, 0xA115, 0xA115 }, -{ 0xA116, 0xA116, 0xA116 }, -{ 0xA117, 0xA117, 0xA117 }, -{ 0xA118, 0xA118, 0xA118 }, -{ 0xA119, 0xA119, 0xA119 }, -{ 0xA11A, 0xA11A, 0xA11A }, -{ 0xA11B, 0xA11B, 0xA11B }, -{ 0xA11C, 0xA11C, 0xA11C }, -{ 0xA11D, 0xA11D, 0xA11D }, -{ 0xA11E, 0xA11E, 0xA11E }, -{ 0xA11F, 0xA11F, 0xA11F }, -{ 0xA120, 0xA120, 0xA120 }, -{ 0xA121, 0xA121, 0xA121 }, -{ 0xA122, 0xA122, 0xA122 }, -{ 0xA123, 0xA123, 0xA123 }, -{ 0xA124, 0xA124, 0xA124 }, -{ 0xA125, 0xA125, 0xA125 }, -{ 0xA126, 0xA126, 0xA126 }, -{ 0xA127, 0xA127, 0xA127 }, -{ 0xA128, 0xA128, 0xA128 }, -{ 0xA129, 0xA129, 0xA129 }, -{ 0xA12A, 0xA12A, 0xA12A }, -{ 0xA12B, 0xA12B, 0xA12B }, -{ 0xA12C, 0xA12C, 0xA12C }, -{ 0xA12D, 0xA12D, 0xA12D }, -{ 0xA12E, 0xA12E, 0xA12E }, -{ 0xA12F, 0xA12F, 0xA12F }, -{ 0xA130, 0xA130, 0xA130 }, -{ 0xA131, 0xA131, 0xA131 }, -{ 0xA132, 0xA132, 0xA132 }, -{ 0xA133, 0xA133, 0xA133 }, -{ 0xA134, 0xA134, 0xA134 }, -{ 0xA135, 0xA135, 0xA135 }, -{ 0xA136, 0xA136, 0xA136 }, -{ 0xA137, 0xA137, 0xA137 }, -{ 0xA138, 0xA138, 0xA138 }, -{ 0xA139, 0xA139, 0xA139 }, -{ 0xA13A, 0xA13A, 0xA13A }, -{ 0xA13B, 0xA13B, 0xA13B }, -{ 0xA13C, 0xA13C, 0xA13C }, -{ 0xA13D, 0xA13D, 0xA13D }, -{ 0xA13E, 0xA13E, 0xA13E }, -{ 0xA13F, 0xA13F, 0xA13F }, -{ 0xA140, 0xA140, 0xA140 }, -{ 0xA141, 0xA141, 0xA141 }, -{ 0xA142, 0xA142, 0xA142 }, -{ 0xA143, 0xA143, 0xA143 }, -{ 0xA144, 0xA144, 0xA144 }, -{ 0xA145, 0xA145, 0xA145 }, -{ 0xA146, 0xA146, 0xA146 }, -{ 0xA147, 0xA147, 0xA147 }, -{ 0xA148, 0xA148, 0xA148 }, -{ 0xA149, 0xA149, 0xA149 }, -{ 0xA14A, 0xA14A, 0xA14A }, -{ 0xA14B, 0xA14B, 0xA14B }, -{ 0xA14C, 0xA14C, 0xA14C }, -{ 0xA14D, 0xA14D, 0xA14D }, -{ 0xA14E, 0xA14E, 0xA14E }, -{ 0xA14F, 0xA14F, 0xA14F }, -{ 0xA150, 0xA150, 0xA150 }, -{ 0xA151, 0xA151, 0xA151 }, -{ 0xA152, 0xA152, 0xA152 }, -{ 0xA153, 0xA153, 0xA153 }, -{ 0xA154, 0xA154, 0xA154 }, -{ 0xA155, 0xA155, 0xA155 }, -{ 0xA156, 0xA156, 0xA156 }, -{ 0xA157, 0xA157, 0xA157 }, -{ 0xA158, 0xA158, 0xA158 }, -{ 0xA159, 0xA159, 0xA159 }, -{ 0xA15A, 0xA15A, 0xA15A }, -{ 0xA15B, 0xA15B, 0xA15B }, -{ 0xA15C, 0xA15C, 0xA15C }, -{ 0xA15D, 0xA15D, 0xA15D }, -{ 0xA15E, 0xA15E, 0xA15E }, -{ 0xA15F, 0xA15F, 0xA15F }, -{ 0xA160, 0xA160, 0xA160 }, -{ 0xA161, 0xA161, 0xA161 }, -{ 0xA162, 0xA162, 0xA162 }, -{ 0xA163, 0xA163, 0xA163 }, -{ 0xA164, 0xA164, 0xA164 }, -{ 0xA165, 0xA165, 0xA165 }, -{ 0xA166, 0xA166, 0xA166 }, -{ 0xA167, 0xA167, 0xA167 }, -{ 0xA168, 0xA168, 0xA168 }, -{ 0xA169, 0xA169, 0xA169 }, -{ 0xA16A, 0xA16A, 0xA16A }, -{ 0xA16B, 0xA16B, 0xA16B }, -{ 0xA16C, 0xA16C, 0xA16C }, -{ 0xA16D, 0xA16D, 0xA16D }, -{ 0xA16E, 0xA16E, 0xA16E }, -{ 0xA16F, 0xA16F, 0xA16F }, -{ 0xA170, 0xA170, 0xA170 }, -{ 0xA171, 0xA171, 0xA171 }, -{ 0xA172, 0xA172, 0xA172 }, -{ 0xA173, 0xA173, 0xA173 }, -{ 0xA174, 0xA174, 0xA174 }, -{ 0xA175, 0xA175, 0xA175 }, -{ 0xA176, 0xA176, 0xA176 }, -{ 0xA177, 0xA177, 0xA177 }, -{ 0xA178, 0xA178, 0xA178 }, -{ 0xA179, 0xA179, 0xA179 }, -{ 0xA17A, 0xA17A, 0xA17A }, -{ 0xA17B, 0xA17B, 0xA17B }, -{ 0xA17C, 0xA17C, 0xA17C }, -{ 0xA17D, 0xA17D, 0xA17D }, -{ 0xA17E, 0xA17E, 0xA17E }, -{ 0xA17F, 0xA17F, 0xA17F }, -{ 0xA180, 0xA180, 0xA180 }, -{ 0xA181, 0xA181, 0xA181 }, -{ 0xA182, 0xA182, 0xA182 }, -{ 0xA183, 0xA183, 0xA183 }, -{ 0xA184, 0xA184, 0xA184 }, -{ 0xA185, 0xA185, 0xA185 }, -{ 0xA186, 0xA186, 0xA186 }, -{ 0xA187, 0xA187, 0xA187 }, -{ 0xA188, 0xA188, 0xA188 }, -{ 0xA189, 0xA189, 0xA189 }, -{ 0xA18A, 0xA18A, 0xA18A }, -{ 0xA18B, 0xA18B, 0xA18B }, -{ 0xA18C, 0xA18C, 0xA18C }, -{ 0xA18D, 0xA18D, 0xA18D }, -{ 0xA18E, 0xA18E, 0xA18E }, -{ 0xA18F, 0xA18F, 0xA18F }, -{ 0xA190, 0xA190, 0xA190 }, -{ 0xA191, 0xA191, 0xA191 }, -{ 0xA192, 0xA192, 0xA192 }, -{ 0xA193, 0xA193, 0xA193 }, -{ 0xA194, 0xA194, 0xA194 }, -{ 0xA195, 0xA195, 0xA195 }, -{ 0x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203 }, -{ 0xA204, 0xA204, 0xA204 }, -{ 0xA205, 0xA205, 0xA205 }, -{ 0xA206, 0xA206, 0xA206 }, -{ 0xA207, 0xA207, 0xA207 }, -{ 0xA208, 0xA208, 0xA208 }, -{ 0xA209, 0xA209, 0xA209 }, -{ 0xA20A, 0xA20A, 0xA20A }, -{ 0xA20B, 0xA20B, 0xA20B }, -{ 0xA20C, 0xA20C, 0xA20C }, -{ 0xA20D, 0xA20D, 0xA20D }, -{ 0xA20E, 0xA20E, 0xA20E }, -{ 0xA20F, 0xA20F, 0xA20F }, -{ 0xA210, 0xA210, 0xA210 }, -{ 0xA211, 0xA211, 0xA211 }, -{ 0xA212, 0xA212, 0xA212 }, -{ 0xA213, 0xA213, 0xA213 }, -{ 0xA214, 0xA214, 0xA214 }, -{ 0xA215, 0xA215, 0xA215 }, -{ 0xA216, 0xA216, 0xA216 }, -{ 0xA217, 0xA217, 0xA217 }, -{ 0xA218, 0xA218, 0xA218 }, -{ 0xA219, 0xA219, 0xA219 }, -{ 0xA21A, 0xA21A, 0xA21A }, -{ 0xA21B, 0xA21B, 0xA21B }, -{ 0xA21C, 0xA21C, 0xA21C }, -{ 0xA21D, 0xA21D, 0xA21D }, -{ 0xA21E, 0xA21E, 0xA21E }, -{ 0xA21F, 0xA21F, 0xA21F }, -{ 0xA220, 0xA220, 0xA220 }, -{ 0xA221, 0xA221, 0xA221 }, -{ 0xA222, 0xA222, 0xA222 }, -{ 0xA223, 0xA223, 0xA223 }, -{ 0xA224, 0xA224, 0xA224 }, -{ 0xA225, 0xA225, 0xA225 }, -{ 0xA226, 0xA226, 0xA226 }, -{ 0xA227, 0xA227, 0xA227 }, -{ 0xA228, 0xA228, 0xA228 }, -{ 0xA229, 0xA229, 0xA229 }, -{ 0xA22A, 0xA22A, 0xA22A }, -{ 0xA22B, 0xA22B, 0xA22B }, -{ 0xA22C, 0xA22C, 0xA22C }, -{ 0xA22D, 0xA22D, 0xA22D }, -{ 0xA22E, 0xA22E, 0xA22E }, -{ 0xA22F, 0xA22F, 0xA22F }, -{ 0xA230, 0xA230, 0xA230 }, -{ 0xA231, 0xA231, 0xA231 }, -{ 0xA232, 0xA232, 0xA232 }, -{ 0xA233, 0xA233, 0xA233 }, -{ 0xA234, 0xA234, 0xA234 }, -{ 0xA235, 0xA235, 0xA235 }, -{ 0xA236, 0xA236, 0xA236 }, -{ 0xA237, 0xA237, 0xA237 }, -{ 0xA238, 0xA238, 0xA238 }, -{ 0xA239, 0xA239, 0xA239 }, -{ 0xA23A, 0xA23A, 0xA23A }, -{ 0xA23B, 0xA23B, 0xA23B }, -{ 0xA23C, 0xA23C, 0xA23C }, -{ 0xA23D, 0xA23D, 0xA23D }, -{ 0xA23E, 0xA23E, 0xA23E }, -{ 0xA23F, 0xA23F, 0xA23F }, -{ 0xA240, 0xA240, 0xA240 }, -{ 0xA241, 0xA241, 0xA241 }, -{ 0xA242, 0xA242, 0xA242 }, -{ 0xA243, 0xA243, 0xA243 }, -{ 0xA244, 0xA244, 0xA244 }, -{ 0xA245, 0xA245, 0xA245 }, -{ 0xA246, 0xA246, 0xA246 }, -{ 0xA247, 0xA247, 0xA247 }, -{ 0xA248, 0xA248, 0xA248 }, -{ 0xA249, 0xA249, 0xA249 }, -{ 0xA24A, 0xA24A, 0xA24A }, -{ 0xA24B, 0xA24B, 0xA24B }, -{ 0xA24C, 0xA24C, 0xA24C }, -{ 0xA24D, 0xA24D, 0xA24D }, -{ 0xA24E, 0xA24E, 0xA24E }, -{ 0xA24F, 0xA24F, 0xA24F }, -{ 0xA250, 0xA250, 0xA250 }, -{ 0xA251, 0xA251, 0xA251 }, -{ 0xA252, 0xA252, 0xA252 }, -{ 0xA253, 0xA253, 0xA253 }, -{ 0xA254, 0xA254, 0xA254 }, -{ 0xA255, 0xA255, 0xA255 }, -{ 0xA256, 0xA256, 0xA256 }, -{ 0xA257, 0xA257, 0xA257 }, -{ 0xA258, 0xA258, 0xA258 }, -{ 0xA259, 0xA259, 0xA259 }, -{ 0xA25A, 0xA25A, 0xA25A }, -{ 0xA25B, 0xA25B, 0xA25B }, -{ 0xA25C, 0xA25C, 0xA25C }, -{ 0xA25D, 0xA25D, 0xA25D }, -{ 0xA25E, 0xA25E, 0xA25E }, -{ 0xA25F, 0xA25F, 0xA25F }, -{ 0xA260, 0xA260, 0xA260 }, -{ 0xA261, 0xA261, 0xA261 }, -{ 0xA262, 0xA262, 0xA262 }, -{ 0xA263, 0xA263, 0xA263 }, -{ 0xA264, 0xA264, 0xA264 }, -{ 0xA265, 0xA265, 0xA265 }, -{ 0xA266, 0xA266, 0xA266 }, -{ 0xA267, 0xA267, 0xA267 }, -{ 0xA268, 0xA268, 0xA268 }, -{ 0xA269, 0xA269, 0xA269 }, -{ 0xA26A, 0xA26A, 0xA26A }, -{ 0xA26B, 0xA26B, 0xA26B }, -{ 0xA26C, 0xA26C, 0xA26C }, -{ 0xA26D, 0xA26D, 0xA26D }, -{ 0xA26E, 0xA26E, 0xA26E }, -{ 0xA26F, 0xA26F, 0xA26F }, -{ 0xA270, 0xA270, 0xA270 }, -{ 0xA271, 0xA271, 0xA271 }, -{ 0xA272, 0xA272, 0xA272 }, -{ 0xA273, 0xA273, 0xA273 }, -{ 0xA274, 0xA274, 0xA274 }, -{ 0xA275, 0xA275, 0xA275 }, -{ 0xA276, 0xA276, 0xA276 }, -{ 0xA277, 0xA277, 0xA277 }, -{ 0xA278, 0xA278, 0xA278 }, -{ 0xA279, 0xA279, 0xA279 }, -{ 0xA27A, 0xA27A, 0xA27A }, -{ 0xA27B, 0xA27B, 0xA27B }, -{ 0xA27C, 0xA27C, 0xA27C }, -{ 0xA27D, 0xA27D, 0xA27D }, -{ 0xA27E, 0xA27E, 0xA27E }, -{ 0xA27F, 0xA27F, 0xA27F }, -{ 0xA280, 0xA280, 0xA280 }, -{ 0xA281, 0xA281, 0xA281 }, -{ 0xA282, 0xA282, 0xA282 }, -{ 0xA283, 0xA283, 0xA283 }, -{ 0xA284, 0xA284, 0xA284 }, -{ 0xA285, 0xA285, 0xA285 }, -{ 0xA286, 0xA286, 0xA286 }, -{ 0xA287, 0xA287, 0xA287 }, -{ 0xA288, 0xA288, 0xA288 }, -{ 0xA289, 0xA289, 0xA289 }, -{ 0xA28A, 0xA28A, 0xA28A }, -{ 0xA28B, 0xA28B, 0xA28B }, -{ 0xA28C, 0xA28C, 0xA28C }, -{ 0xA28D, 0xA28D, 0xA28D }, -{ 0xA28E, 0xA28E, 0xA28E }, -{ 0xA28F, 0xA28F, 0xA28F }, -{ 0xA290, 0xA290, 0xA290 }, -{ 0xA291, 0xA291, 0xA291 }, -{ 0xA292, 0xA292, 0xA292 }, -{ 0xA293, 0xA293, 0xA293 }, -{ 0xA294, 0xA294, 0xA294 }, -{ 0xA295, 0xA295, 0xA295 }, -{ 0xA296, 0xA296, 0xA296 }, -{ 0xA297, 0xA297, 0xA297 }, -{ 0xA298, 0xA298, 0xA298 }, -{ 0xA299, 0xA299, 0xA299 }, -{ 0xA29A, 0xA29A, 0xA29A }, -{ 0xA29B, 0xA29B, 0xA29B }, -{ 0xA29C, 0xA29C, 0xA29C }, -{ 0xA29D, 0xA29D, 0xA29D }, -{ 0xA29E, 0xA29E, 0xA29E }, -{ 0xA29F, 0xA29F, 0xA29F }, -{ 0xA2A0, 0xA2A0, 0xA2A0 }, -{ 0xA2A1, 0xA2A1, 0xA2A1 }, -{ 0xA2A2, 0xA2A2, 0xA2A2 }, -{ 0xA2A3, 0xA2A3, 0xA2A3 }, -{ 0xA2A4, 0xA2A4, 0xA2A4 }, -{ 0xA2A5, 0xA2A5, 0xA2A5 }, -{ 0xA2A6, 0xA2A6, 0xA2A6 }, -{ 0xA2A7, 0xA2A7, 0xA2A7 }, -{ 0xA2A8, 0xA2A8, 0xA2A8 }, -{ 0xA2A9, 0xA2A9, 0xA2A9 }, -{ 0xA2AA, 0xA2AA, 0xA2AA }, -{ 0xA2AB, 0xA2AB, 0xA2AB }, -{ 0xA2AC, 0xA2AC, 0xA2AC }, -{ 0xA2AD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 }, -{ 0xA2F5, 0xA2F5, 0xA2F5 }, -{ 0xA2F6, 0xA2F6, 0xA2F6 }, -{ 0xA2F7, 0xA2F7, 0xA2F7 }, -{ 0xA2F8, 0xA2F8, 0xA2F8 }, -{ 0xA2F9, 0xA2F9, 0xA2F9 }, -{ 0xA2FA, 0xA2FA, 0xA2FA }, -{ 0xA2FB, 0xA2FB, 0xA2FB }, -{ 0xA2FC, 0xA2FC, 0xA2FC }, -{ 0xA2FD, 0xA2FD, 0xA2FD }, -{ 0xA2FE, 0xA2FE, 0xA2FE }, -{ 0xA2FF, 0xA2FF, 0xA2FF }, -{ 0xA300, 0xA300, 0xA300 }, -{ 0xA301, 0xA301, 0xA301 }, -{ 0xA302, 0xA302, 0xA302 }, -{ 0xA303, 0xA303, 0xA303 }, -{ 0xA304, 0xA304, 0xA304 }, -{ 0xA305, 0xA305, 0xA305 }, -{ 0xA306, 0xA306, 0xA306 }, -{ 0xA307, 0xA307, 0xA307 }, -{ 0xA308, 0xA308, 0xA308 }, -{ 0xA309, 0xA309, 0xA309 }, -{ 0xA30A, 0xA30A, 0xA30A }, -{ 0xA30B, 0xA30B, 0xA30B }, -{ 0xA30C, 0xA30C, 0xA30C }, -{ 0xA30D, 0xA30D, 0xA30D }, -{ 0xA30E, 0xA30E, 0xA30E }, -{ 0xA30F, 0xA30F, 0xA30F }, -{ 0xA310, 0xA310, 0xA310 }, -{ 0xA311, 0xA311, 0xA311 }, -{ 0xA312, 0xA312, 0xA312 }, -{ 0xA313, 0xA313, 0xA313 }, -{ 0xA314, 0xA314, 0xA314 }, -{ 0xA315, 0xA315, 0xA315 }, -{ 0xA316, 0xA316, 0xA316 }, -{ 0xA317, 0xA317, 0xA317 }, -{ 0xA318, 0xA318, 0xA318 }, -{ 0xA319, 0xA319, 0xA319 }, -{ 0xA31A, 0xA31A, 0xA31A }, -{ 0xA31B, 0xA31B, 0xA31B }, -{ 0xA31C, 0xA31C, 0xA31C }, -{ 0xA31D, 0xA31D, 0xA31D }, -{ 0xA31E, 0xA31E, 0xA31E }, -{ 0xA31F, 0xA31F, 0xA31F }, -{ 0xA320, 0xA320, 0xA320 }, -{ 0xA321, 0xA321, 0xA321 }, -{ 0xA322, 0xA322, 0xA322 }, -{ 0xA323, 0xA323, 0xA323 }, -{ 0xA324, 0xA324, 0xA324 }, -{ 0xA325, 0xA325, 0xA325 }, -{ 0xA326, 0xA326, 0xA326 }, -{ 0xA327, 0xA327, 0xA327 }, -{ 0xA328, 0xA328, 0xA328 }, -{ 0xA329, 0xA329, 0xA329 }, -{ 0xA32A, 0xA32A, 0xA32A }, -{ 0xA32B, 0xA32B, 0xA32B }, -{ 0xA32C, 0xA32C, 0xA32C }, -{ 0xA32D, 0xA32D, 0xA32D }, -{ 0xA32E, 0xA32E, 0xA32E }, -{ 0xA32F, 0xA32F, 0xA32F }, -{ 0xA330, 0xA330, 0xA330 }, -{ 0xA331, 0xA331, 0xA331 }, -{ 0xA332, 0xA332, 0xA332 }, -{ 0xA333, 0xA333, 0xA333 }, -{ 0xA334, 0xA334, 0xA334 }, -{ 0xA335, 0xA335, 0xA335 }, -{ 0xA336, 0xA336, 0xA336 }, -{ 0xA337, 0xA337, 0xA337 }, -{ 0xA338, 0xA338, 0xA338 }, -{ 0xA339, 0xA339, 0xA339 }, -{ 0xA33A, 0xA33A, 0xA33A }, -{ 0xA33B, 0xA33B, 0xA33B }, -{ 0xA33C, 0xA33C, 0xA33C }, -{ 0xA33D, 0xA33D, 0xA33D }, -{ 0xA33E, 0xA33E, 0xA33E }, -{ 0xA33F, 0xA33F, 0xA33F }, -{ 0xA340, 0xA340, 0xA340 }, -{ 0xA341, 0xA341, 0xA341 }, -{ 0xA342, 0xA342, 0xA342 }, -{ 0xA343, 0xA343, 0xA343 }, -{ 0xA344, 0xA344, 0xA344 }, -{ 0xA345, 0xA345, 0xA345 }, -{ 0xA346, 0xA346, 0xA346 }, -{ 0xA347, 0xA347, 0xA347 }, -{ 0xA348, 0xA348, 0xA348 }, -{ 0xA349, 0xA349, 0xA349 }, -{ 0xA34A, 0xA34A, 0xA34A }, -{ 0xA34B, 0xA34B, 0xA34B }, -{ 0xA34C, 0xA34C, 0xA34C }, -{ 0xA34D, 0xA34D, 0xA34D }, -{ 0xA34E, 0xA34E, 0xA34E }, -{ 0xA34F, 0xA34F, 0xA34F }, -{ 0xA350, 0xA350, 0xA350 }, -{ 0xA351, 0xA351, 0xA351 }, -{ 0xA352, 0xA352, 0xA352 }, -{ 0xA353, 0xA353, 0xA353 }, -{ 0xA354, 0xA354, 0xA354 }, -{ 0xA355, 0xA355, 0xA355 }, -{ 0xA356, 0xA356, 0xA356 }, -{ 0xA357, 0xA357, 0xA357 }, -{ 0xA358, 0xA358, 0xA358 }, -{ 0xA359, 0xA359, 0xA359 }, -{ 0xA35A, 0xA35A, 0xA35A }, -{ 0xA35B, 0xA35B, 0xA35B }, -{ 0xA35C, 0xA35C, 0xA35C }, -{ 0xA35D, 0xA35D, 0xA35D }, -{ 0xA35E, 0xA35E, 0xA35E }, -{ 0xA35F, 0xA35F, 0xA35F }, -{ 0xA360, 0xA360, 0xA360 }, -{ 0xA361, 0xA361, 0xA361 }, -{ 0xA362, 0xA362, 0xA362 }, -{ 0xA363, 0xA363, 0xA363 }, -{ 0xA364, 0xA364, 0xA364 }, -{ 0xA365, 0xA365, 0xA365 }, -{ 0xA366, 0xA366, 0xA366 }, -{ 0xA367, 0xA367, 0xA367 }, -{ 0xA368, 0xA368, 0xA368 }, -{ 0xA369, 0xA369, 0xA369 }, -{ 0xA36A, 0xA36A, 0xA36A }, -{ 0xA36B, 0xA36B, 0xA36B }, -{ 0xA36C, 0xA36C, 0xA36C }, -{ 0xA36D, 0xA36D, 0xA36D }, -{ 0xA36E, 0xA36E, 0xA36E }, -{ 0xA36F, 0xA36F, 0xA36F }, -{ 0xA370, 0xA370, 0xA370 }, -{ 0xA371, 0xA371, 0xA371 }, -{ 0xA372, 0xA372, 0xA372 }, -{ 0xA373, 0xA373, 0xA373 }, -{ 0xA374, 0xA374, 0xA374 }, -{ 0xA375, 0xA375, 0xA375 }, -{ 0xA376, 0xA376, 0xA376 }, -{ 0xA377, 0xA377, 0xA377 }, -{ 0xA378, 0xA378, 0xA378 }, -{ 0xA379, 0xA379, 0xA379 }, -{ 0xA37A, 0xA37A, 0xA37A }, -{ 0xA37B, 0xA37B, 0xA37B }, -{ 0xA37C, 0xA37C, 0xA37C }, -{ 0xA37D, 0xA37D, 0xA37D }, -{ 0xA37E, 0xA37E, 0xA37E }, -{ 0xA37F, 0xA37F, 0xA37F }, -{ 0xA380, 0xA380, 0xA380 }, -{ 0xA381, 0xA381, 0xA381 }, -{ 0xA382, 0xA382, 0xA382 }, -{ 0xA383, 0xA383, 0xA383 }, -{ 0xA384, 0xA384, 0xA384 }, -{ 0xA385, 0xA385, 0xA385 }, -{ 0xA386, 0xA386, 0xA386 }, -{ 0xA387, 0xA387, 0xA387 }, -{ 0xA388, 0xA388, 0xA388 }, -{ 0xA389, 0xA389, 0xA389 }, -{ 0xA38A, 0xA38A, 0xA38A }, -{ 0xA38B, 0xA38B, 0xA38B }, -{ 0xA38C, 0xA38C, 0xA38C }, -{ 0xA38D, 0xA38D, 0xA38D }, -{ 0xA38E, 0xA38E, 0xA38E }, -{ 0xA38F, 0xA38F, 0xA38F }, -{ 0xA390, 0xA390, 0xA390 }, -{ 0xA391, 0xA391, 0xA391 }, -{ 0xA392, 0xA392, 0xA392 }, -{ 0xA393, 0xA393, 0xA393 }, -{ 0xA394, 0xA394, 0xA394 }, -{ 0xA395, 0xA395, 0xA395 }, -{ 0xA396, 0xA396, 0xA396 }, -{ 0xA397, 0xA397, 0xA397 }, -{ 0xA398, 0xA398, 0xA398 }, -{ 0xA399, 0xA399, 0xA399 }, -{ 0xA39A, 0xA39A, 0xA39A }, -{ 0xA39B, 0xA39B, 0xA39B }, -{ 0xA39C, 0xA39C, 0xA39C }, -{ 0xA39D, 0xA39D, 0xA39D }, -{ 0xA39E, 0xA39E, 0xA39E }, -{ 0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, -{ 0xA40D, 0xA40D, 0xA40D }, -{ 0xA40E, 0xA40E, 0xA40E }, -{ 0xA40F, 0xA40F, 0xA40F }, -{ 0xA410, 0xA410, 0xA410 }, -{ 0xA411, 0xA411, 0xA411 }, -{ 0xA412, 0xA412, 0xA412 }, -{ 0xA413, 0xA413, 0xA413 }, -{ 0xA414, 0xA414, 0xA414 }, -{ 0xA415, 0xA415, 0xA415 }, -{ 0xA416, 0xA416, 0xA416 }, -{ 0xA417, 0xA417, 0xA417 }, -{ 0xA418, 0xA418, 0xA418 }, -{ 0xA419, 0xA419, 0xA419 }, -{ 0xA41A, 0xA41A, 0xA41A }, -{ 0xA41B, 0xA41B, 0xA41B }, -{ 0xA41C, 0xA41C, 0xA41C }, -{ 0xA41D, 0xA41D, 0xA41D }, -{ 0xA41E, 0xA41E, 0xA41E }, -{ 0xA41F, 0xA41F, 0xA41F }, -{ 0xA420, 0xA420, 0xA420 }, -{ 0xA421, 0xA421, 0xA421 }, -{ 0xA422, 0xA422, 0xA422 }, -{ 0xA423, 0xA423, 0xA423 }, -{ 0xA424, 0xA424, 0xA424 }, -{ 0xA425, 0xA425, 0xA425 }, -{ 0xA426, 0xA426, 0xA426 }, -{ 0xA427, 0xA427, 0xA427 }, -{ 0xA428, 0xA428, 0xA428 }, -{ 0xA429, 0xA429, 0xA429 }, -{ 0xA42A, 0xA42A, 0xA42A }, -{ 0xA42B, 0xA42B, 0xA42B }, -{ 0xA42C, 0xA42C, 0xA42C }, -{ 0xA42D, 0xA42D, 0xA42D }, -{ 0xA42E, 0xA42E, 0xA42E }, -{ 0xA42F, 0xA42F, 0xA42F }, -{ 0xA430, 0xA430, 0xA430 }, -{ 0xA431, 0xA431, 0xA431 }, -{ 0xA432, 0xA432, 0xA432 }, -{ 0xA433, 0xA433, 0xA433 }, -{ 0xA434, 0xA434, 0xA434 }, -{ 0xA435, 0xA435, 0xA435 }, -{ 0xA436, 0xA436, 0xA436 }, -{ 0xA437, 0xA437, 0xA437 }, -{ 0xA438, 0xA438, 0xA438 }, -{ 0xA439, 0xA439, 0xA439 }, -{ 0xA43A, 0xA43A, 0xA43A }, -{ 0xA43B, 0xA43B, 0xA43B }, -{ 0xA43C, 0xA43C, 0xA43C }, -{ 0xA43D, 0xA43D, 0xA43D }, -{ 0xA43E, 0xA43E, 0xA43E }, -{ 0xA43F, 0xA43F, 0xA43F }, -{ 0xA440, 0xA440, 0xA440 }, -{ 0xA441, 0xA441, 0xA441 }, -{ 0xA442, 0xA442, 0xA442 }, -{ 0xA443, 0xA443, 0xA443 }, -{ 0xA444, 0xA444, 0xA444 }, -{ 0xA445, 0xA445, 0xA445 }, -{ 0xA446, 0xA446, 0xA446 }, -{ 0xA447, 0xA447, 0xA447 }, -{ 0xA448, 0xA448, 0xA448 }, -{ 0xA449, 0xA449, 0xA449 }, -{ 0xA44A, 0xA44A, 0xA44A }, -{ 0xA44B, 0xA44B, 0xA44B }, -{ 0xA44C, 0xA44C, 0xA44C }, -{ 0xA44D, 0xA44D, 0xA44D }, -{ 0xA44E, 0xA44E, 0xA44E }, -{ 0xA44F, 0xA44F, 0xA44F }, -{ 0xA450, 0xA450, 0xA450 }, -{ 0xA451, 0xA451, 0xA451 }, -{ 0xA452, 0xA452, 0xA452 }, -{ 0xA453, 0xA453, 0xA453 }, -{ 0xA454, 0xA454, 0xA454 }, -{ 0xA455, 0xA455, 0xA455 }, -{ 0xA456, 0xA456, 0xA456 }, -{ 0xA457, 0xA457, 0xA457 }, -{ 0xA458, 0xA458, 0xA458 }, -{ 0xA459, 0xA459, 0xA459 }, -{ 0xA45A, 0xA45A, 0xA45A }, -{ 0xA45B, 0xA45B, 0xA45B }, -{ 0xA45C, 0xA45C, 0xA45C }, -{ 0xA45D, 0xA45D, 0xA45D }, -{ 0xA45E, 0xA45E, 0xA45E }, -{ 0xA45F, 0xA45F, 0xA45F }, -{ 0xA460, 0xA460, 0xA460 }, -{ 0xA461, 0xA461, 0xA461 }, -{ 0xA462, 0xA462, 0xA462 }, -{ 0xA463, 0xA463, 0xA463 }, -{ 0xA464, 0xA464, 0xA464 }, -{ 0xA465, 0xA465, 0xA465 }, -{ 0xA466, 0xA466, 0xA466 }, -{ 0xA467, 0xA467, 0xA467 }, -{ 0xA468, 0xA468, 0xA468 }, -{ 0xA469, 0xA469, 0xA469 }, -{ 0xA46A, 0xA46A, 0xA46A }, -{ 0xA46B, 0xA46B, 0xA46B }, -{ 0xA46C, 0xA46C, 0xA46C }, -{ 0xA46D, 0xA46D, 0xA46D }, -{ 0xA46E, 0xA46E, 0xA46E }, -{ 0xA46F, 0xA46F, 0xA46F }, -{ 0xA470, 0xA470, 0xA470 }, -{ 0xA471, 0xA471, 0xA471 }, -{ 0xA472, 0xA472, 0xA472 }, -{ 0xA473, 0xA473, 0xA473 }, -{ 0xA474, 0xA474, 0xA474 }, -{ 0xA475, 0xA475, 0xA475 }, -{ 0xA476, 0xA476, 0xA476 }, -{ 0xA477, 0xA477, 0xA477 }, -{ 0xA478, 0xA478, 0xA478 }, -{ 0xA479, 0xA479, 0xA479 }, -{ 0xA47A, 0xA47A, 0xA47A }, -{ 0xA47B, 0xA47B, 0xA47B }, -{ 0xA47C, 0xA47C, 0xA47C }, -{ 0xA47D, 0xA47D, 0xA47D }, -{ 0xA47E, 0xA47E, 0xA47E }, -{ 0xA47F, 0xA47F, 0xA47F }, -{ 0xA480, 0xA480, 0xA480 }, -{ 0xA481, 0xA481, 0xA481 }, -{ 0xA482, 0xA482, 0xA482 }, -{ 0xA483, 0xA483, 0xA483 }, -{ 0xA484, 0xA484, 0xA484 }, -{ 0xA485, 0xA485, 0xA485 }, -{ 0xA486, 0xA486, 0xA486 }, -{ 0xA487, 0xA487, 0xA487 }, -{ 0xA488, 0xA488, 0xA488 }, -{ 0xA489, 0xA489, 0xA489 }, -{ 0xA48A, 0xA48A, 0xA48A }, -{ 0xA48B, 0xA48B, 0xA48B }, -{ 0xA48C, 0xA48C, 0xA48C }, -{ 0xA800, 0xA800, 0xA800 }, -{ 0xA801, 0xA801, 0xA801 }, -{ 0xA803, 0xA803, 0xA803 }, -{ 0xA804, 0xA804, 0xA804 }, -{ 0xA805, 0xA805, 0xA805 }, -{ 0xA806, 0xA806, 0xA806 }, -{ 0xA807, 0xA807, 0xA807 }, -{ 0xA808, 0xA808, 0xA808 }, -{ 0xA809, 0xA809, 0xA809 }, -{ 0xA80A, 0xA80A, 0xA80A }, -{ 0xA80B, 0xA80B, 0xA80B }, -{ 0xA80C, 0xA80C, 0xA80C }, -{ 0xA80D, 0xA80D, 0xA80D }, -{ 0xA80E, 0xA80E, 0xA80E }, -{ 0xA80F, 0xA80F, 0xA80F }, -{ 0xA810, 0xA810, 0xA810 }, -{ 0xA811, 0xA811, 0xA811 }, -{ 0xA812, 0xA812, 0xA812 }, -{ 0xA813, 0xA813, 0xA813 }, -{ 0xA814, 0xA814, 0xA814 }, -{ 0xA815, 0xA815, 0xA815 }, -{ 0xA816, 0xA816, 0xA816 }, -{ 0xA817, 0xA817, 0xA817 }, -{ 0xA818, 0xA818, 0xA818 }, -{ 0xA819, 0xA819, 0xA819 }, -{ 0xA81A, 0xA81A, 0xA81A }, -{ 0xA81B, 0xA81B, 0xA81B }, -{ 0xA81C, 0xA81C, 0xA81C }, -{ 0xA81D, 0xA81D, 0xA81D }, -{ 0xA81E, 0xA81E, 0xA81E }, -{ 0xA81F, 0xA81F, 0xA81F }, -{ 0xA820, 0xA820, 0xA820 }, -{ 0xA821, 0xA821, 0xA821 }, -{ 0xA822, 0xA822, 0xA822 }, -{ 0xA825, 0xA825, 0xA825 }, -{ 0xA826, 0xA826, 0xA826 }, -{ 0xAC00, 0xAC00, 0xAC00 }, -{ 0xAC01, 0xAC01, 0xAC01 }, -{ 0xAC02, 0xAC02, 0xAC02 }, -{ 0xAC03, 0xAC03, 0xAC03 }, -{ 0xAC04, 0xAC04, 0xAC04 }, -{ 0xAC05, 0xAC05, 0xAC05 }, -{ 0xAC06, 0xAC06, 0xAC06 }, -{ 0xAC07, 0xAC07, 0xA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xACA0 }, -{ 0xACA1, 0xACA1, 0xACA1 }, -{ 0xACA2, 0xACA2, 0xACA2 }, -{ 0xACA3, 0xACA3, 0xACA3 }, -{ 0xACA4, 0xACA4, 0xACA4 }, -{ 0xACA5, 0xACA5, 0xACA5 }, -{ 0xACA6, 0xACA6, 0xACA6 }, -{ 0xACA7, 0xACA7, 0xACA7 }, -{ 0xACA8, 0xACA8, 0xACA8 }, -{ 0xACA9, 0xACA9, 0xACA9 }, -{ 0xACAA, 0xACAA, 0xACAA }, -{ 0xACAB, 0xACAB, 0xACAB }, -{ 0xACAC, 0xACAC, 0xACAC }, -{ 0xACAD, 0xACAD, 0xACAD }, -{ 0xACAE, 0xACAE, 0xACAE }, -{ 0xACAF, 0xACAF, 0xACAF }, -{ 0xACB0, 0xACB0, 0xACB0 }, -{ 0xACB1, 0xACB1, 0xACB1 }, -{ 0xACB2, 0xACB2, 0xACB2 }, -{ 0xACB3, 0xACB3, 0xACB3 }, -{ 0xACB4, 0xACB4, 0xACB4 }, -{ 0xACB5, 0xACB5, 0xACB5 }, -{ 0xACB6, 0xACB6, 0xACB6 }, -{ 0xACB7, 0xACB7, 0xACB7 }, -{ 0xACB8, 0xACB8, 0xACB8 }, -{ 0xACB9, 0xACB9, 0xACB9 }, -{ 0xACBA, 0xACBA, 0xACBA }, -{ 0xACBB, 0xACBB, 0xACBB }, -{ 0xACBC, 0xACBC, 0xACBC }, -{ 0xACBD, 0xACBD, 0xACBD }, -{ 0xACBE, 0xACBE, 0xACBE }, -{ 0xACBF, 0xACBF, 0xACBF }, -{ 0xACC0, 0xACC0, 0xACC0 }, -{ 0xACC1, 0xACC1, 0xACC1 }, -{ 0xACC2, 0xACC2, 0xACC2 }, -{ 0xACC3, 0xACC3, 0xACC3 }, -{ 0xACC4, 0xACC4, 0xACC4 }, -{ 0xACC5, 0xACC5, 0xACC5 }, -{ 0xACC6, 0xACC6, 0xACC6 }, -{ 0xACC7, 0xACC7, 0xACC7 }, -{ 0xACC8, 0xACC8, 0xACC8 }, -{ 0xACC9, 0xACC9, 0xACC9 }, -{ 0xACCA, 0xACCA, 0xACCA }, -{ 0xACCB, 0xACCB, 0xACCB }, -{ 0xACCC, 0xACCC, 0xACCC }, -{ 0xACCD, 0xACCD, 0xACCD }, -{ 0xACCE, 0xACCE, 0xACCE }, -{ 0xACCF, 0xACCF, 0xACCF }, -{ 0xACD0, 0xACD0, 0xACD0 }, -{ 0xACD1, 0xACD1, 0xACD1 }, -{ 0xACD2, 0xACD2, 0xACD2 }, -{ 0xACD3, 0xACD3, 0xACD3 }, -{ 0xACD4, 0xACD4, 0xACD4 }, -{ 0xACD5, 0xACD5, 0xACD5 }, -{ 0xACD6, 0xACD6, 0xACD6 }, -{ 0xACD7, 0xACD7, 0xACD7 }, -{ 0xACD8, 0xACD8, 0xACD8 }, -{ 0xACD9, 0xACD9, 0xACD9 }, -{ 0xACDA, 0xACDA, 0xACDA }, -{ 0xACDB, 0xACDB, 0xACDB }, -{ 0xACDC, 0xACDC, 0xACDC }, -{ 0xACDD, 0xACDD, 0xACDD }, -{ 0xACDE, 0xACDE, 0xACDE }, -{ 0xACDF, 0xACDF, 0xACDF }, -{ 0xACE0, 0xACE0, 0xACE0 }, -{ 0xACE1, 0xACE1, 0xACE1 }, -{ 0xACE2, 0xACE2, 0xACE2 }, -{ 0xACE3, 0xACE3, 0xACE3 }, -{ 0xACE4, 0xACE4, 0xACE4 }, -{ 0xACE5, 0xACE5, 0xACE5 }, -{ 0xACE6, 0xACE6, 0xACE6 }, -{ 0xACE7, 0xACE7, 0xACE7 }, -{ 0xACE8, 0xACE8, 0xACE8 }, -{ 0xACE9, 0xACE9, 0xACE9 }, -{ 0xACEA, 0xACEA, 0xACEA }, -{ 0xACEB, 0xACEB, 0xACEB }, -{ 0xACEC, 0xACEC, 0xACEC }, -{ 0xACED, 0xACED, 0xACED }, -{ 0xACEE, 0xACEE, 0xACEE }, -{ 0xACEF, 0xACEF, 0xACEF }, -{ 0xACF0, 0xACF0, 0xACF0 }, -{ 0xACF1, 0xACF1, 0xACF1 }, -{ 0xACF2, 0xACF2, 0xACF2 }, -{ 0xACF3, 0xACF3, 0xACF3 }, -{ 0xACF4, 0xACF4, 0xACF4 }, -{ 0xACF5, 0xACF5, 0xACF5 }, -{ 0xACF6, 0xACF6, 0xACF6 }, -{ 0xACF7, 0xACF7, 0xACF7 }, -{ 0xACF8, 0xACF8, 0xACF8 }, -{ 0xACF9, 0xACF9, 0xACF9 }, -{ 0xACFA, 0xACFA, 0xACFA }, -{ 0xACFB, 0xACFB, 0xACFB }, -{ 0xACFC, 0xACFC, 0xACFC }, -{ 0xACFD, 0xACFD, 0xACFD }, -{ 0xACFE, 0xACFE, 0xACFE }, -{ 0xACFF, 0xACFF, 0xACFF }, -{ 0xAD00, 0xAD00, 0xAD00 }, -{ 0xAD01, 0xAD01, 0xAD01 }, -{ 0xAD02, 0xAD02, 0xAD02 }, -{ 0xAD03, 0xAD03, 0xAD03 }, -{ 0xAD04, 0xAD04, 0xAD04 }, -{ 0xAD05, 0xAD05, 0xAD05 }, -{ 0xAD06, 0xAD06, 0xAD06 }, -{ 0xAD07, 0xAD07, 0xAD07 }, -{ 0xAD08, 0xAD08, 0xAD08 }, -{ 0xAD09, 0xAD09, 0xAD09 }, -{ 0xAD0A, 0xAD0A, 0xAD0A }, -{ 0xAD0B, 0xAD0B, 0xAD0B }, -{ 0xAD0C, 0xAD0C, 0xAD0C }, -{ 0xAD0D, 0xAD0D, 0xAD0D }, -{ 0xAD0E, 0xAD0E, 0xAD0E }, -{ 0xAD0F, 0xAD0F, 0xAD0F }, -{ 0xAD10, 0xAD10, 0xAD10 }, -{ 0xAD11, 0xAD11, 0xAD11 }, -{ 0xAD12, 0xAD12, 0xAD12 }, -{ 0xAD13, 0xAD13, 0xAD13 }, -{ 0xAD14, 0xAD14, 0xAD14 }, -{ 0xAD15, 0xAD15, 0xAD15 }, -{ 0xAD16, 0xAD16, 0xAD16 }, -{ 0xAD17, 0xAD17, 0xAD17 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B1, 0xADB1 }, -{ 0xADB2, 0xADB2, 0xADB2 }, -{ 0xADB3, 0xADB3, 0xADB3 }, -{ 0xADB4, 0xADB4, 0xADB4 }, -{ 0xADB5, 0xADB5, 0xADB5 }, -{ 0xADB6, 0xADB6, 0xADB6 }, -{ 0xADB7, 0xADB7, 0xADB7 }, -{ 0xADB8, 0xADB8, 0xADB8 }, -{ 0xADB9, 0xADB9, 0xADB9 }, -{ 0xADBA, 0xADBA, 0xADBA }, -{ 0xADBB, 0xADBB, 0xADBB }, -{ 0xADBC, 0xADBC, 0xADBC }, -{ 0xADBD, 0xADBD, 0xADBD }, -{ 0xADBE, 0xADBE, 0xADBE }, -{ 0xADBF, 0xADBF, 0xADBF }, -{ 0xADC0, 0xADC0, 0xADC0 }, -{ 0xADC1, 0xADC1, 0xADC1 }, -{ 0xADC2, 0xADC2, 0xADC2 }, -{ 0xADC3, 0xADC3, 0xADC3 }, -{ 0xADC4, 0xADC4, 0xADC4 }, -{ 0xADC5, 0xADC5, 0xADC5 }, -{ 0xADC6, 0xADC6, 0xADC6 }, -{ 0xADC7, 0xADC7, 0xADC7 }, -{ 0xADC8, 0xADC8, 0xADC8 }, -{ 0xADC9, 0xADC9, 0xADC9 }, -{ 0xADCA, 0xADCA, 0xADCA }, -{ 0xADCB, 0xADCB, 0xADCB }, -{ 0xADCC, 0xADCC, 0xADCC }, -{ 0xADCD, 0xADCD, 0xADCD }, -{ 0xADCE, 0xADCE, 0xADCE }, -{ 0xADCF, 0xADCF, 0xADCF }, -{ 0xADD0, 0xADD0, 0xADD0 }, -{ 0xADD1, 0xADD1, 0xADD1 }, -{ 0xADD2, 0xADD2, 0xADD2 }, -{ 0xADD3, 0xADD3, 0xADD3 }, -{ 0xADD4, 0xADD4, 0xADD4 }, -{ 0xADD5, 0xADD5, 0xADD5 }, -{ 0xADD6, 0xADD6, 0xADD6 }, -{ 0xADD7, 0xADD7, 0xADD7 }, -{ 0xADD8, 0xADD8, 0xADD8 }, -{ 0xADD9, 0xADD9, 0xADD9 }, -{ 0xADDA, 0xADDA, 0xADDA }, -{ 0xADDB, 0xADDB, 0xADDB }, -{ 0xADDC, 0xADDC, 0xADDC }, -{ 0xADDD, 0xADDD, 0xADDD }, -{ 0xADDE, 0xADDE, 0xADDE }, -{ 0xADDF, 0xADDF, 0xADDF }, -{ 0xADE0, 0xADE0, 0xADE0 }, -{ 0xADE1, 0xADE1, 0xADE1 }, -{ 0xADE2, 0xADE2, 0xADE2 }, -{ 0xADE3, 0xADE3, 0xADE3 }, -{ 0xADE4, 0xADE4, 0xADE4 }, -{ 0xADE5, 0xADE5, 0xADE5 }, -{ 0xADE6, 0xADE6, 0xADE6 }, -{ 0xADE7, 0xADE7, 0xADE7 }, -{ 0xADE8, 0xADE8, 0xADE8 }, -{ 0xADE9, 0xADE9, 0xADE9 }, -{ 0xADEA, 0xADEA, 0xADEA }, -{ 0xADEB, 0xADEB, 0xADEB }, -{ 0xADEC, 0xADEC, 0xADEC }, -{ 0xADED, 0xADED, 0xADED }, -{ 0xADEE, 0xADEE, 0xADEE }, -{ 0xADEF, 0xADEF, 0xADEF }, -{ 0xADF0, 0xADF0, 0xADF0 }, -{ 0xADF1, 0xADF1, 0xADF1 }, -{ 0xADF2, 0xADF2, 0xADF2 }, -{ 0xADF3, 0xADF3, 0xADF3 }, -{ 0xADF4, 0xADF4, 0xADF4 }, -{ 0xADF5, 0xADF5, 0xADF5 }, -{ 0xADF6, 0xADF6, 0xADF6 }, -{ 0xADF7, 0xADF7, 0xADF7 }, -{ 0xADF8, 0xADF8, 0xADF8 }, -{ 0xADF9, 0xADF9, 0xADF9 }, -{ 0xADFA, 0xADFA, 0xADFA }, -{ 0xADFB, 0xADFB, 0xADFB }, -{ 0xADFC, 0xADFC, 0xADFC }, -{ 0xADFD, 0xADFD, 0xADFD }, -{ 0xADFE, 0xADFE, 0xADFE }, -{ 0xADFF, 0xADFF, 0xADFF }, -{ 0xAE00, 0xAE00, 0xAE00 }, -{ 0xAE01, 0xAE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B00F }, -{ 0xB010, 0xB010, 0xB010 }, -{ 0xB011, 0xB011, 0xB011 }, -{ 0xB012, 0xB012, 0xB012 }, -{ 0xB013, 0xB013, 0xB013 }, -{ 0xB014, 0xB014, 0xB014 }, -{ 0xB015, 0xB015, 0xB015 }, -{ 0xB016, 0xB016, 0xB016 }, -{ 0xB017, 0xB017, 0xB017 }, -{ 0xB018, 0xB018, 0xB018 }, -{ 0xB019, 0xB019, 0xB019 }, -{ 0xB01A, 0xB01A, 0xB01A }, -{ 0xB01B, 0xB01B, 0xB01B }, -{ 0xB01C, 0xB01C, 0xB01C }, -{ 0xB01D, 0xB01D, 0xB01D }, -{ 0xB01E, 0xB01E, 0xB01E }, -{ 0xB01F, 0xB01F, 0xB01F }, -{ 0xB020, 0xB020, 0xB020 }, -{ 0xB021, 0xB021, 0xB021 }, -{ 0xB022, 0xB022, 0xB022 }, -{ 0xB023, 0xB023, 0xB023 }, -{ 0xB024, 0xB024, 0xB024 }, -{ 0xB025, 0xB025, 0xB025 }, -{ 0xB026, 0xB026, 0xB026 }, -{ 0xB027, 0xB027, 0xB027 }, -{ 0xB028, 0xB028, 0xB028 }, -{ 0xB029, 0xB029, 0xB029 }, -{ 0xB02A, 0xB02A, 0xB02A }, -{ 0xB02B, 0xB02B, 0xB02B }, -{ 0xB02C, 0xB02C, 0xB02C }, -{ 0xB02D, 0xB02D, 0xB02D }, -{ 0xB02E, 0xB02E, 0xB02E }, -{ 0xB02F, 0xB02F, 0xB02F }, -{ 0xB030, 0xB030, 0xB030 }, -{ 0xB031, 0xB031, 0xB031 }, -{ 0xB032, 0xB032, 0xB032 }, -{ 0xB033, 0xB033, 0xB033 }, -{ 0xB034, 0xB034, 0xB034 }, -{ 0xB035, 0xB035, 0xB035 }, -{ 0xB036, 0xB036, 0xB036 }, -{ 0xB037, 0xB037, 0xB037 }, -{ 0xB038, 0xB038, 0xB038 }, -{ 0xB039, 0xB039, 0xB039 }, -{ 0xB03A, 0xB03A, 0xB03A }, -{ 0xB03B, 0xB03B, 0xB03B }, -{ 0xB03C, 0xB03C, 0xB03C }, -{ 0xB03D, 0xB03D, 0xB03D }, -{ 0xB03E, 0xB03E, 0xB03E }, -{ 0xB03F, 0xB03F, 0xB03F }, -{ 0xB040, 0xB040, 0xB040 }, -{ 0xB041, 0xB041, 0xB041 }, -{ 0xB042, 0xB042, 0xB042 }, -{ 0xB043, 0xB043, 0xB043 }, -{ 0xB044, 0xB044, 0xB044 }, -{ 0xB045, 0xB045, 0xB045 }, -{ 0xB046, 0xB046, 0xB046 }, -{ 0xB047, 0xB047, 0xB047 }, -{ 0xB048, 0xB048, 0xB048 }, -{ 0xB049, 0xB049, 0xB049 }, -{ 0xB04A, 0xB04A, 0xB04A }, -{ 0xB04B, 0xB04B, 0xB04B }, -{ 0xB04C, 0xB04C, 0xB04C }, -{ 0xB04D, 0xB04D, 0xB04D }, -{ 0xB04E, 0xB04E, 0xB04E }, -{ 0xB04F, 0xB04F, 0xB04F }, -{ 0xB050, 0xB050, 0xB050 }, -{ 0xB051, 0xB051, 0xB051 }, -{ 0xB052, 0xB052, 0xB052 }, -{ 0xB053, 0xB053, 0xB053 }, -{ 0xB054, 0xB054, 0xB054 }, -{ 0xB055, 0xB055, 0xB055 }, -{ 0xB056, 0xB056, 0xB056 }, -{ 0xB057, 0xB057, 0xB057 }, -{ 0xB058, 0xB058, 0xB058 }, -{ 0xB059, 0xB059, 0xB059 }, -{ 0xB05A, 0xB05A, 0xB05A }, -{ 0xB05B, 0xB05B, 0xB05B }, -{ 0xB05C, 0xB05C, 0xB05C }, -{ 0xB05D, 0xB05D, 0xB05D }, -{ 0xB05E, 0xB05E, 0xB05E }, -{ 0xB05F, 0xB05F, 0xB05F }, -{ 0xB060, 0xB060, 0xB060 }, -{ 0xB061, 0xB061, 0xB061 }, -{ 0xB062, 0xB062, 0xB062 }, -{ 0xB063, 0xB063, 0xB063 }, -{ 0xB064, 0xB064, 0xB064 }, -{ 0xB065, 0xB065, 0xB065 }, -{ 0xB066, 0xB066, 0xB066 }, -{ 0xB067, 0xB067, 0xB067 }, -{ 0xB068, 0xB068, 0xB068 }, -{ 0xB069, 0xB069, 0xB069 }, -{ 0xB06A, 0xB06A, 0xB06A }, -{ 0xB06B, 0xB06B, 0xB06B }, -{ 0xB06C, 0xB06C, 0xB06C }, -{ 0xB06D, 0xB06D, 0xB06D }, -{ 0xB06E, 0xB06E, 0xB06E }, -{ 0xB06F, 0xB06F, 0xB06F }, -{ 0xB070, 0xB070, 0xB070 }, -{ 0xB071, 0xB071, 0xB071 }, -{ 0xB072, 0xB072, 0xB072 }, -{ 0xB073, 0xB073, 0xB073 }, -{ 0xB074, 0xB074, 0xB074 }, -{ 0xB075, 0xB075, 0xB075 }, -{ 0xB076, 0xB076, 0xB076 }, -{ 0xB077, 0xB077, 0xB077 }, -{ 0xB078, 0xB078, 0xB078 }, -{ 0xB079, 0xB079, 0xB079 }, -{ 0xB07A, 0xB07A, 0xB07A }, -{ 0xB07B, 0xB07B, 0xB07B }, -{ 0xB07C, 0xB07C, 0xB07C }, -{ 0xB07D, 0xB07D, 0xB07D }, -{ 0xB07E, 0xB07E, 0xB07E }, -{ 0xB07F, 0xB07F, 0xB07F }, -{ 0xB080, 0xB080, 0xB080 }, -{ 0xB081, 0xB081, 0xB081 }, -{ 0xB082, 0xB082, 0xB082 }, -{ 0xB083, 0xB083, 0xB083 }, -{ 0xB084, 0xB084, 0xB084 }, -{ 0xB085, 0xB085, 0xB085 }, -{ 0xB086, 0xB086, 0xB086 }, -{ 0xB087, 0xB087, 0xB087 }, -{ 0xB088, 0xB088, 0xB088 }, -{ 0xB089, 0xB089, 0xB089 }, -{ 0xB08A, 0xB08A, 0xB08A }, -{ 0xB08B, 0xB08B, 0xB08B }, -{ 0xB08C, 0xB08C, 0xB08C }, -{ 0xB08D, 0xB08D, 0xB08D }, -{ 0xB08E, 0xB08E, 0xB08E }, -{ 0xB08F, 0xB08F, 0xB08F }, -{ 0xB090, 0xB090, 0xB090 }, -{ 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, -{ 0xB0FF, 0xB0FF, 0xB0FF }, -{ 0xB100, 0xB100, 0xB100 }, -{ 0xB101, 0xB101, 0xB101 }, -{ 0xB102, 0xB102, 0xB102 }, -{ 0xB103, 0xB103, 0xB103 }, -{ 0xB104, 0xB104, 0xB104 }, -{ 0xB105, 0xB105, 0xB105 }, -{ 0xB106, 0xB106, 0xB106 }, -{ 0xB107, 0xB107, 0xB107 }, -{ 0xB108, 0xB108, 0xB108 }, -{ 0xB109, 0xB109, 0xB109 }, -{ 0xB10A, 0xB10A, 0xB10A }, -{ 0xB10B, 0xB10B, 0xB10B }, -{ 0xB10C, 0xB10C, 0xB10C }, -{ 0xB10D, 0xB10D, 0xB10D }, -{ 0xB10E, 0xB10E, 0xB10E }, -{ 0xB10F, 0xB10F, 0xB10F }, -{ 0xB110, 0xB110, 0xB110 }, -{ 0xB111, 0xB111, 0xB111 }, -{ 0xB112, 0xB112, 0xB112 }, -{ 0xB113, 0xB113, 0xB113 }, -{ 0xB114, 0xB114, 0xB114 }, -{ 0xB115, 0xB115, 0xB115 }, -{ 0xB116, 0xB116, 0xB116 }, -{ 0xB117, 0xB117, 0xB117 }, -{ 0xB118, 0xB118, 0xB118 }, -{ 0xB119, 0xB119, 0xB119 }, -{ 0xB11A, 0xB11A, 0xB11A }, -{ 0xB11B, 0xB11B, 0xB11B }, -{ 0xB11C, 0xB11C, 0xB11C }, -{ 0xB11D, 0xB11D, 0xB11D }, -{ 0xB11E, 0xB11E, 0xB11E }, -{ 0xB11F, 0xB11F, 0xB11F }, -{ 0xB120, 0xB120, 0xB120 }, -{ 0xB121, 0xB121, 0xB121 }, -{ 0xB122, 0xB122, 0xB122 }, -{ 0xB123, 0xB123, 0xB123 }, -{ 0xB124, 0xB124, 0xB124 }, -{ 0xB125, 0xB125, 0xB125 }, -{ 0xB126, 0xB126, 0xB126 }, -{ 0xB127, 0xB127, 0xB127 }, -{ 0xB128, 0xB128, 0xB128 }, -{ 0xB129, 0xB129, 0xB129 }, -{ 0xB12A, 0xB12A, 0xB12A }, -{ 0xB12B, 0xB12B, 0xB12B }, -{ 0xB12C, 0xB12C, 0xB12C }, -{ 0xB12D, 0xB12D, 0xB12D }, -{ 0xB12E, 0xB12E, 0xB12E }, -{ 0xB12F, 0xB12F, 0xB12F }, -{ 0xB130, 0xB130, 0xB130 }, -{ 0xB131, 0xB131, 0xB131 }, -{ 0xB132, 0xB132, 0xB132 }, -{ 0xB133, 0xB133, 0xB133 }, -{ 0xB134, 0xB134, 0xB134 }, -{ 0xB135, 0xB135, 0xB135 }, -{ 0xB136, 0xB136, 0xB136 }, -{ 0xB137, 0xB137, 0xB137 }, -{ 0xB138, 0xB138, 0xB138 }, -{ 0xB139, 0xB139, 0xB139 }, -{ 0xB13A, 0xB13A, 0xB13A }, -{ 0xB13B, 0xB13B, 0xB13B }, -{ 0xB13C, 0xB13C, 0xB13C }, -{ 0xB13D, 0xB13D, 0xB13D }, -{ 0xB13E, 0xB13E, 0xB13E }, -{ 0xB13F, 0xB13F, 0xB13F }, -{ 0xB140, 0xB140, 0xB140 }, -{ 0xB141, 0xB141, 0xB141 }, -{ 0xB142, 0xB142, 0xB142 }, -{ 0xB143, 0xB143, 0xB143 }, -{ 0xB144, 0xB144, 0xB144 }, -{ 0xB145, 0xB145, 0xB145 }, -{ 0xB146, 0xB146, 0xB146 }, -{ 0xB147, 0xB147, 0xB147 }, -{ 0xB148, 0xB148, 0xB148 }, -{ 0xB149, 0xB149, 0xB149 }, -{ 0xB14A, 0xB14A, 0xB14A }, -{ 0xB14B, 0xB14B, 0xB14B }, -{ 0xB14C, 0xB14C, 0xB14C }, -{ 0xB14D, 0xB14D, 0xB14D }, -{ 0xB14E, 0xB14E, 0xB14E }, -{ 0xB14F, 0xB14F, 0xB14F }, -{ 0xB150, 0xB150, 0xB150 }, -{ 0xB151, 0xB151, 0xB151 }, -{ 0xB152, 0xB152, 0xB152 }, -{ 0xB153, 0xB153, 0xB153 }, -{ 0xB154, 0xB154, 0xB154 }, -{ 0xB155, 0xB155, 0xB155 }, -{ 0xB156, 0xB156, 0xB156 }, -{ 0xB157, 0xB157, 0xB157 }, -{ 0xB158, 0xB158, 0xB158 }, -{ 0xB159, 0xB159, 0xB159 }, -{ 0xB15A, 0xB15A, 0xB15A }, -{ 0xB15B, 0xB15B, 0xB15B }, -{ 0xB15C, 0xB15C, 0xB15C }, -{ 0xB15D, 0xB15D, 0xB15D }, -{ 0xB15E, 0xB15E, 0xB15E }, -{ 0xB15F, 0xB15F, 0xB15F }, -{ 0xB160, 0xB160, 0xB160 }, -{ 0xB161, 0xB161, 0xB161 }, -{ 0xB162, 0xB162, 0xB162 }, -{ 0xB163, 0xB163, 0xB163 }, -{ 0xB164, 0xB164, 0xB164 }, -{ 0xB165, 0xB165, 0xB165 }, -{ 0xB166, 0xB166, 0xB166 }, -{ 0xB167, 0xB167, 0xB167 }, -{ 0xB168, 0xB168, 0xB168 }, -{ 0xB169, 0xB169, 0xB169 }, -{ 0xB16A, 0xB16A, 0xB16A }, -{ 0xB16B, 0xB16B, 0xB16B }, -{ 0xB16C, 0xB16C, 0xB16C }, -{ 0xB16D, 0xB16D, 0xB16D }, -{ 0xB16E, 0xB16E, 0xB16E }, -{ 0xB16F, 0xB16F, 0xB16F }, -{ 0xB170, 0xB170, 0xB170 }, -{ 0xB171, 0xB171, 0xB171 }, -{ 0xB172, 0xB172, 0xB172 }, -{ 0xB173, 0xB173, 0xB173 }, -{ 0xB174, 0xB174, 0xB174 }, -{ 0xB175, 0xB175, 0xB175 }, -{ 0xB176, 0xB176, 0xB176 }, -{ 0xB177, 0xB177, 0xB177 }, -{ 0xB178, 0xB178, 0xB178 }, -{ 0xB179, 0xB179, 0xB179 }, -{ 0xB17A, 0xB17A, 0xB17A }, -{ 0xB17B, 0xB17B, 0xB17B }, -{ 0xB17C, 0xB17C, 0xB17C }, -{ 0xB17D, 0xB17D, 0xB17D }, -{ 0xB17E, 0xB17E, 0xB17E }, -{ 0xB17F, 0xB17F, 0xB17F }, -{ 0xB180, 0xB180, 0xB180 }, -{ 0xB181, 0xB181, 0xB181 }, -{ 0xB182, 0xB182, 0xB182 }, -{ 0xB183, 0xB183, 0xB183 }, -{ 0xB184, 0xB184, 0xB184 }, -{ 0xB185, 0xB185, 0xB185 }, -{ 0xB186, 0xB186, 0xB186 }, -{ 0xB187, 0xB187, 0xB187 }, -{ 0xB188, 0xB188, 0xB188 }, -{ 0xB189, 0xB189, 0xB189 }, -{ 0xB18A, 0xB18A, 0xB18A }, -{ 0xB18B, 0xB18B, 0xB18B }, -{ 0xB18C, 0xB18C, 0xB18C }, -{ 0xB18D, 0xB18D, 0xB18D }, -{ 0xB18E, 0xB18E, 0xB18E }, -{ 0xB18F, 0xB18F, 0xB18F }, -{ 0xB190, 0xB190, 0xB190 }, -{ 0xB191, 0xB191, 0xB191 }, -{ 0xB192, 0xB192, 0xB192 }, -{ 0xB193, 0xB193, 0xB193 }, -{ 0xB194, 0xB194, 0xB194 }, -{ 0xB195, 0xB195, 0xB195 }, -{ 0xB196, 0xB196, 0xB196 }, -{ 0xB197, 0xB197, 0xB197 }, -{ 0xB198, 0xB198, 0xB198 }, -{ 0xB199, 0xB199, 0xB199 }, -{ 0xB19A, 0xB19A, 0xB19A }, -{ 0xB19B, 0xB19B, 0xB19B }, -{ 0xB19C, 0xB19C, 0xB19C }, -{ 0xB19D, 0xB19D, 0xB19D }, -{ 0xB19E, 0xB19E, 0xB19E }, -{ 0xB19F, 0xB19F, 0xB19F }, -{ 0xB1A0, 0xB1A0, 0xB1A0 }, -{ 0xB1A1, 0xB1A1, 0xB1A1 }, -{ 0xB1A2, 0xB1A2, 0xB1A2 }, -{ 0xB1A3, 0xB1A3, 0xB1A3 }, -{ 0xB1A4, 0xB1A4, 0xB1A4 }, -{ 0xB1A5, 0xB1A5, 0xB1A5 }, -{ 0xB1A6, 0xB1A6, 0xB1A6 }, -{ 0xB1A7, 0xB1A7, 0xB1A7 }, -{ 0xB1A8, 0xB1A8, 0xB1A8 }, -{ 0x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0 }, -{ 0xB1F1, 0xB1F1, 0xB1F1 }, -{ 0xB1F2, 0xB1F2, 0xB1F2 }, -{ 0xB1F3, 0xB1F3, 0xB1F3 }, -{ 0xB1F4, 0xB1F4, 0xB1F4 }, -{ 0xB1F5, 0xB1F5, 0xB1F5 }, -{ 0xB1F6, 0xB1F6, 0xB1F6 }, -{ 0xB1F7, 0xB1F7, 0xB1F7 }, -{ 0xB1F8, 0xB1F8, 0xB1F8 }, -{ 0xB1F9, 0xB1F9, 0xB1F9 }, -{ 0xB1FA, 0xB1FA, 0xB1FA }, -{ 0xB1FB, 0xB1FB, 0xB1FB }, -{ 0xB1FC, 0xB1FC, 0xB1FC }, -{ 0xB1FD, 0xB1FD, 0xB1FD }, -{ 0xB1FE, 0xB1FE, 0xB1FE }, -{ 0xB1FF, 0xB1FF, 0xB1FF }, -{ 0xB200, 0xB200, 0xB200 }, -{ 0xB201, 0xB201, 0xB201 }, -{ 0xB202, 0xB202, 0xB202 }, -{ 0xB203, 0xB203, 0xB203 }, -{ 0xB204, 0xB204, 0xB204 }, -{ 0xB205, 0xB205, 0xB205 }, -{ 0xB206, 0xB206, 0xB206 }, -{ 0xB207, 0xB207, 0xB207 }, -{ 0xB208, 0xB208, 0xB208 }, -{ 0xB209, 0xB209, 0xB209 }, -{ 0xB20A, 0xB20A, 0xB20A }, -{ 0xB20B, 0xB20B, 0xB20B }, -{ 0xB20C, 0xB20C, 0xB20C }, -{ 0xB20D, 0xB20D, 0xB20D }, -{ 0xB20E, 0xB20E, 0xB20E }, -{ 0xB20F, 0xB20F, 0xB20F }, -{ 0xB210, 0xB210, 0xB210 }, -{ 0xB211, 0xB211, 0xB211 }, -{ 0xB212, 0xB212, 0xB212 }, -{ 0xB213, 0xB213, 0xB213 }, -{ 0xB214, 0xB214, 0xB214 }, -{ 0xB215, 0xB215, 0xB215 }, -{ 0xB216, 0xB216, 0xB216 }, -{ 0xB217, 0xB217, 0xB217 }, -{ 0xB218, 0xB218, 0xB218 }, -{ 0xB219, 0xB219, 0xB219 }, -{ 0xB21A, 0xB21A, 0xB21A }, -{ 0xB21B, 0xB21B, 0xB21B }, -{ 0xB21C, 0xB21C, 0xB21C }, -{ 0xB21D, 0xB21D, 0xB21D }, -{ 0xB21E, 0xB21E, 0xB21E }, -{ 0xB21F, 0xB21F, 0xB21F }, -{ 0xB220, 0xB220, 0xB220 }, -{ 0xB221, 0xB221, 0xB221 }, -{ 0xB222, 0xB222, 0xB222 }, -{ 0xB223, 0xB223, 0xB223 }, -{ 0xB224, 0xB224, 0xB224 }, -{ 0xB225, 0xB225, 0xB225 }, -{ 0xB226, 0xB226, 0xB226 }, -{ 0xB227, 0xB227, 0xB227 }, -{ 0xB228, 0xB228, 0xB228 }, -{ 0xB229, 0xB229, 0xB229 }, -{ 0xB22A, 0xB22A, 0xB22A }, -{ 0xB22B, 0xB22B, 0xB22B }, -{ 0xB22C, 0xB22C, 0xB22C }, -{ 0xB22D, 0xB22D, 0xB22D }, -{ 0xB22E, 0xB22E, 0xB22E }, -{ 0xB22F, 0xB22F, 0xB22F }, -{ 0xB230, 0xB230, 0xB230 }, -{ 0xB231, 0xB231, 0xB231 }, -{ 0xB232, 0xB232, 0xB232 }, -{ 0xB233, 0xB233, 0xB233 }, -{ 0xB234, 0xB234, 0xB234 }, -{ 0xB235, 0xB235, 0xB235 }, -{ 0xB236, 0xB236, 0xB236 }, -{ 0xB237, 0xB237, 0xB237 }, -{ 0xB238, 0xB238, 0xB238 }, -{ 0xB239, 0xB239, 0xB239 }, -{ 0xB23A, 0xB23A, 0xB23A }, -{ 0xB23B, 0xB23B, 0xB23B }, -{ 0xB23C, 0xB23C, 0xB23C }, -{ 0xB23D, 0xB23D, 0xB23D }, -{ 0xB23E, 0xB23E, 0xB23E }, -{ 0xB23F, 0xB23F, 0xB23F }, -{ 0xB240, 0xB240, 0xB240 }, -{ 0xB241, 0xB241, 0xB241 }, -{ 0xB242, 0xB242, 0xB242 }, -{ 0xB243, 0xB243, 0xB243 }, -{ 0xB244, 0xB244, 0xB244 }, -{ 0xB245, 0xB245, 0xB245 }, -{ 0xB246, 0xB246, 0xB246 }, -{ 0xB247, 0xB247, 0xB247 }, -{ 0xB248, 0xB248, 0xB248 }, -{ 0xB249, 0xB249, 0xB249 }, -{ 0xB24A, 0xB24A, 0xB24A }, -{ 0xB24B, 0xB24B, 0xB24B }, -{ 0xB24C, 0xB24C, 0xB24C }, -{ 0xB24D, 0xB24D, 0xB24D }, -{ 0xB24E, 0xB24E, 0xB24E }, -{ 0xB24F, 0xB24F, 0xB24F }, -{ 0xB250, 0xB250, 0xB250 }, -{ 0xB251, 0xB251, 0xB251 }, -{ 0xB252, 0xB252, 0xB252 }, -{ 0xB253, 0xB253, 0xB253 }, -{ 0xB254, 0xB254, 0xB254 }, -{ 0xB255, 0xB255, 0xB255 }, -{ 0xB256, 0xB256, 0xB256 }, -{ 0xB257, 0xB257, 0xB257 }, -{ 0xB258, 0xB258, 0xB258 }, -{ 0xB259, 0xB259, 0xB259 }, -{ 0xB25A, 0xB25A, 0xB25A }, -{ 0xB25B, 0xB25B, 0xB25B }, -{ 0xB25C, 0xB25C, 0xB25C }, -{ 0xB25D, 0xB25D, 0xB25D }, -{ 0xB25E, 0xB25E, 0xB25E }, -{ 0xB25F, 0xB25F, 0xB25F }, -{ 0xB260, 0xB260, 0xB260 }, -{ 0xB261, 0xB261, 0xB261 }, -{ 0xB262, 0xB262, 0xB262 }, -{ 0xB263, 0xB263, 0xB263 }, -{ 0xB264, 0xB264, 0xB264 }, -{ 0xB265, 0xB265, 0xB265 }, -{ 0xB266, 0xB266, 0xB266 }, -{ 0xB267, 0xB267, 0xB267 }, -{ 0xB268, 0xB268, 0xB268 }, -{ 0xB269, 0xB269, 0xB269 }, -{ 0xB26A, 0xB26A, 0xB26A }, -{ 0xB26B, 0xB26B, 0xB26B }, -{ 0xB26C, 0xB26C, 0xB26C }, -{ 0xB26D, 0xB26D, 0xB26D }, -{ 0xB26E, 0xB26E, 0xB26E }, -{ 0xB26F, 0xB26F, 0xB26F }, -{ 0xB270, 0xB270, 0xB270 }, -{ 0xB271, 0xB271, 0xB271 }, -{ 0xB272, 0xB272, 0xB272 }, -{ 0xB273, 0xB273, 0xB273 }, -{ 0xB274, 0xB274, 0xB274 }, -{ 0xB275, 0xB275, 0xB275 }, -{ 0xB276, 0xB276, 0xB276 }, -{ 0xB277, 0xB277, 0xB277 }, -{ 0xB278, 0xB278, 0xB278 }, -{ 0xB279, 0xB279, 0xB279 }, -{ 0xB27A, 0xB27A, 0xB27A }, -{ 0xB27B, 0xB27B, 0xB27B }, -{ 0xB27C, 0xB27C, 0xB27C }, -{ 0xB27D, 0xB27D, 0xB27D }, -{ 0xB27E, 0xB27E, 0xB27E }, -{ 0xB27F, 0xB27F, 0xB27F }, -{ 0xB280, 0xB280, 0xB280 }, -{ 0xB281, 0xB281, 0xB281 }, -{ 0xB282, 0xB282, 0xB282 }, -{ 0xB283, 0xB283, 0xB283 }, -{ 0xB284, 0xB284, 0xB284 }, -{ 0xB285, 0xB285, 0xB285 }, -{ 0xB286, 0xB286, 0xB286 }, -{ 0xB287, 0xB287, 0xB287 }, -{ 0xB288, 0xB288, 0xB288 }, -{ 0xB289, 0xB289, 0xB289 }, -{ 0xB28A, 0xB28A, 0xB28A }, -{ 0xB28B, 0xB28B, 0xB28B }, -{ 0xB28C, 0xB28C, 0xB28C }, -{ 0xB28D, 0xB28D, 0xB28D }, -{ 0xB28E, 0xB28E, 0xB28E }, -{ 0xB28F, 0xB28F, 0xB28F }, -{ 0xB290, 0xB290, 0xB290 }, -{ 0xB291, 0xB291, 0xB291 }, -{ 0xB292, 0xB292, 0xB292 }, -{ 0xB293, 0xB293, 0xB293 }, -{ 0xB294, 0xB294, 0xB294 }, -{ 0xB295, 0xB295, 0xB295 }, -{ 0xB296, 0xB296, 0xB296 }, -{ 0xB297, 0xB297, 0xB297 }, -{ 0xB298, 0xB298, 0xB298 }, -{ 0xB299, 0xB299, 0xB299 }, -{ 0xB29A, 0x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 0xB308, 0xB308, 0xB308 }, -{ 0xB309, 0xB309, 0xB309 }, -{ 0xB30A, 0xB30A, 0xB30A }, -{ 0xB30B, 0xB30B, 0xB30B }, -{ 0xB30C, 0xB30C, 0xB30C }, -{ 0xB30D, 0xB30D, 0xB30D }, -{ 0xB30E, 0xB30E, 0xB30E }, -{ 0xB30F, 0xB30F, 0xB30F }, -{ 0xB310, 0xB310, 0xB310 }, -{ 0xB311, 0xB311, 0xB311 }, -{ 0xB312, 0xB312, 0xB312 }, -{ 0xB313, 0xB313, 0xB313 }, -{ 0xB314, 0xB314, 0xB314 }, -{ 0xB315, 0xB315, 0xB315 }, -{ 0xB316, 0xB316, 0xB316 }, -{ 0xB317, 0xB317, 0xB317 }, -{ 0xB318, 0xB318, 0xB318 }, -{ 0xB319, 0xB319, 0xB319 }, -{ 0xB31A, 0xB31A, 0xB31A }, -{ 0xB31B, 0xB31B, 0xB31B }, -{ 0xB31C, 0xB31C, 0xB31C }, -{ 0xB31D, 0xB31D, 0xB31D }, -{ 0xB31E, 0xB31E, 0xB31E }, -{ 0xB31F, 0xB31F, 0xB31F }, -{ 0xB320, 0xB320, 0xB320 }, -{ 0xB321, 0xB321, 0xB321 }, -{ 0xB322, 0xB322, 0xB322 }, -{ 0xB323, 0xB323, 0xB323 }, -{ 0xB324, 0xB324, 0xB324 }, -{ 0xB325, 0xB325, 0xB325 }, -{ 0xB326, 0xB326, 0xB326 }, -{ 0xB327, 0xB327, 0xB327 }, -{ 0xB328, 0xB328, 0xB328 }, -{ 0xB329, 0xB329, 0xB329 }, -{ 0xB32A, 0xB32A, 0xB32A }, -{ 0xB32B, 0xB32B, 0xB32B }, -{ 0xB32C, 0xB32C, 0xB32C }, -{ 0xB32D, 0xB32D, 0xB32D }, -{ 0xB32E, 0xB32E, 0xB32E }, -{ 0xB32F, 0xB32F, 0xB32F }, -{ 0xB330, 0xB330, 0xB330 }, -{ 0xB331, 0xB331, 0xB331 }, -{ 0xB332, 0xB332, 0xB332 }, -{ 0xB333, 0xB333, 0xB333 }, -{ 0xB334, 0xB334, 0xB334 }, -{ 0xB335, 0xB335, 0xB335 }, -{ 0xB336, 0xB336, 0xB336 }, -{ 0xB337, 0xB337, 0xB337 }, -{ 0xB338, 0xB338, 0xB338 }, -{ 0xB339, 0xB339, 0xB339 }, -{ 0xB33A, 0xB33A, 0xB33A }, -{ 0xB33B, 0xB33B, 0xB33B }, -{ 0xB33C, 0xB33C, 0xB33C }, -{ 0xB33D, 0xB33D, 0xB33D }, -{ 0xB33E, 0xB33E, 0xB33E }, -{ 0xB33F, 0xB33F, 0xB33F }, -{ 0xB340, 0xB340, 0xB340 }, -{ 0xB341, 0xB341, 0xB341 }, -{ 0xB342, 0xB342, 0xB342 }, -{ 0xB343, 0xB343, 0xB343 }, -{ 0xB344, 0xB344, 0xB344 }, -{ 0xB345, 0xB345, 0xB345 }, -{ 0xB346, 0xB346, 0xB346 }, -{ 0xB347, 0xB347, 0xB347 }, -{ 0xB348, 0xB348, 0xB348 }, -{ 0xB349, 0xB349, 0xB349 }, -{ 0xB34A, 0xB34A, 0xB34A }, -{ 0xB34B, 0xB34B, 0xB34B }, -{ 0xB34C, 0xB34C, 0xB34C }, -{ 0xB34D, 0xB34D, 0xB34D }, -{ 0xB34E, 0xB34E, 0xB34E }, -{ 0xB34F, 0xB34F, 0xB34F }, -{ 0xB350, 0xB350, 0xB350 }, -{ 0xB351, 0xB351, 0xB351 }, -{ 0xB352, 0xB352, 0xB352 }, -{ 0xB353, 0xB353, 0xB353 }, -{ 0xB354, 0xB354, 0xB354 }, -{ 0xB355, 0xB355, 0xB355 }, -{ 0xB356, 0xB356, 0xB356 }, -{ 0xB357, 0xB357, 0xB357 }, -{ 0xB358, 0xB358, 0xB358 }, -{ 0xB359, 0xB359, 0xB359 }, -{ 0xB35A, 0xB35A, 0xB35A }, -{ 0xB35B, 0xB35B, 0xB35B }, -{ 0xB35C, 0xB35C, 0xB35C }, -{ 0xB35D, 0xB35D, 0xB35D }, -{ 0xB35E, 0xB35E, 0xB35E }, -{ 0xB35F, 0xB35F, 0xB35F }, -{ 0xB360, 0xB360, 0xB360 }, -{ 0xB361, 0xB361, 0xB361 }, -{ 0xB362, 0xB362, 0xB362 }, -{ 0xB363, 0xB363, 0xB363 }, -{ 0xB364, 0xB364, 0xB364 }, -{ 0xB365, 0xB365, 0xB365 }, -{ 0xB366, 0xB366, 0xB366 }, -{ 0xB367, 0xB367, 0xB367 }, -{ 0xB368, 0xB368, 0xB368 }, -{ 0xB369, 0xB369, 0xB369 }, -{ 0xB36A, 0xB36A, 0xB36A }, -{ 0xB36B, 0xB36B, 0xB36B }, -{ 0xB36C, 0xB36C, 0xB36C }, -{ 0xB36D, 0xB36D, 0xB36D }, -{ 0xB36E, 0xB36E, 0xB36E }, -{ 0xB36F, 0xB36F, 0xB36F }, -{ 0xB370, 0xB370, 0xB370 }, -{ 0xB371, 0xB371, 0xB371 }, -{ 0xB372, 0xB372, 0xB372 }, -{ 0xB373, 0xB373, 0xB373 }, -{ 0xB374, 0xB374, 0xB374 }, -{ 0xB375, 0xB375, 0xB375 }, -{ 0xB376, 0xB376, 0xB376 }, -{ 0xB377, 0xB377, 0xB377 }, -{ 0xB378, 0xB378, 0xB378 }, -{ 0xB379, 0xB379, 0xB379 }, -{ 0xB37A, 0xB37A, 0xB37A }, -{ 0xB37B, 0xB37B, 0xB37B }, -{ 0xB37C, 0xB37C, 0xB37C }, -{ 0xB37D, 0xB37D, 0xB37D }, -{ 0xB37E, 0xB37E, 0xB37E }, -{ 0xB37F, 0xB37F, 0xB37F }, -{ 0xB380, 0xB380, 0xB380 }, -{ 0xB381, 0xB381, 0xB381 }, -{ 0xB382, 0xB382, 0xB382 }, -{ 0xB383, 0xB383, 0xB383 }, -{ 0xB384, 0xB384, 0xB384 }, -{ 0xB385, 0xB385, 0xB385 }, -{ 0xB386, 0xB386, 0xB386 }, -{ 0xB387, 0xB387, 0xB387 }, -{ 0xB388, 0xB388, 0xB388 }, -{ 0xB389, 0xB389, 0xB389 }, -{ 0xB38A, 0xB38A, 0xB38A }, -{ 0xB38B, 0xB38B, 0xB38B }, -{ 0xB38C, 0xB38C, 0xB38C }, -{ 0xB38D, 0xB38D, 0xB38D }, -{ 0xB38E, 0xB38E, 0xB38E }, -{ 0xB38F, 0xB38F, 0xB38F }, -{ 0xB390, 0xB390, 0xB390 }, -{ 0xB391, 0xB391, 0xB391 }, -{ 0xB392, 0xB392, 0xB392 }, -{ 0xB393, 0xB393, 0xB393 }, -{ 0xB394, 0xB394, 0xB394 }, -{ 0xB395, 0xB395, 0xB395 }, -{ 0xB396, 0xB396, 0xB396 }, -{ 0xB397, 0xB397, 0xB397 }, -{ 0xB398, 0xB398, 0xB398 }, -{ 0xB399, 0xB399, 0xB399 }, -{ 0xB39A, 0xB39A, 0xB39A }, -{ 0xB39B, 0xB39B, 0xB39B }, -{ 0xB39C, 0xB39C, 0xB39C }, -{ 0xB39D, 0xB39D, 0xB39D }, -{ 0xB39E, 0xB39E, 0xB39E }, -{ 0xB39F, 0xB39F, 0xB39F }, -{ 0xB3A0, 0xB3A0, 0xB3A0 }, -{ 0xB3A1, 0xB3A1, 0xB3A1 }, -{ 0xB3A2, 0xB3A2, 0xB3A2 }, -{ 0xB3A3, 0xB3A3, 0xB3A3 }, -{ 0xB3A4, 0xB3A4, 0xB3A4 }, -{ 0xB3A5, 0xB3A5, 0xB3A5 }, -{ 0xB3A6, 0xB3A6, 0xB3A6 }, -{ 0xB3A7, 0xB3A7, 0xB3A7 }, -{ 0xB3A8, 0xB3A8, 0xB3A8 }, -{ 0xB3A9, 0xB3A9, 0xB3A9 }, -{ 0xB3AA, 0xB3AA, 0xB3AA }, -{ 0xB3AB, 0xB3AB, 0xB3AB }, -{ 0xB3AC, 0xB3AC, 0xB3AC }, -{ 0xB3AD, 0xB3AD, 0xB3AD }, -{ 0xB3AE, 0xB3AE, 0xB3AE }, -{ 0xB3AF, 0xB3AF, 0xB3AF }, -{ 0xB3B0, 0xB3B0, 0xB3B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8, 0xB3F8, 0xB3F8 }, -{ 0xB3F9, 0xB3F9, 0xB3F9 }, -{ 0xB3FA, 0xB3FA, 0xB3FA }, -{ 0xB3FB, 0xB3FB, 0xB3FB }, -{ 0xB3FC, 0xB3FC, 0xB3FC }, -{ 0xB3FD, 0xB3FD, 0xB3FD }, -{ 0xB3FE, 0xB3FE, 0xB3FE }, -{ 0xB3FF, 0xB3FF, 0xB3FF }, -{ 0xB400, 0xB400, 0xB400 }, -{ 0xB401, 0xB401, 0xB401 }, -{ 0xB402, 0xB402, 0xB402 }, -{ 0xB403, 0xB403, 0xB403 }, -{ 0xB404, 0xB404, 0xB404 }, -{ 0xB405, 0xB405, 0xB405 }, -{ 0xB406, 0xB406, 0xB406 }, -{ 0xB407, 0xB407, 0xB407 }, -{ 0xB408, 0xB408, 0xB408 }, -{ 0xB409, 0xB409, 0xB409 }, -{ 0xB40A, 0xB40A, 0xB40A }, -{ 0xB40B, 0xB40B, 0xB40B }, -{ 0xB40C, 0xB40C, 0xB40C }, -{ 0xB40D, 0xB40D, 0xB40D }, -{ 0xB40E, 0xB40E, 0xB40E }, -{ 0xB40F, 0xB40F, 0xB40F }, -{ 0xB410, 0xB410, 0xB410 }, -{ 0xB411, 0xB411, 0xB411 }, -{ 0xB412, 0xB412, 0xB412 }, -{ 0xB413, 0xB413, 0xB413 }, -{ 0xB414, 0xB414, 0xB414 }, -{ 0xB415, 0xB415, 0xB415 }, -{ 0xB416, 0xB416, 0xB416 }, -{ 0xB417, 0xB417, 0xB417 }, -{ 0xB418, 0xB418, 0xB418 }, -{ 0xB419, 0xB419, 0xB419 }, -{ 0xB41A, 0xB41A, 0xB41A }, -{ 0xB41B, 0xB41B, 0xB41B }, -{ 0xB41C, 0xB41C, 0xB41C }, -{ 0xB41D, 0xB41D, 0xB41D }, -{ 0xB41E, 0xB41E, 0xB41E }, -{ 0xB41F, 0xB41F, 0xB41F }, -{ 0xB420, 0xB420, 0xB420 }, -{ 0xB421, 0xB421, 0xB421 }, -{ 0xB422, 0xB422, 0xB422 }, -{ 0xB423, 0xB423, 0xB423 }, -{ 0xB424, 0xB424, 0xB424 }, -{ 0xB425, 0xB425, 0xB425 }, -{ 0xB426, 0xB426, 0xB426 }, -{ 0xB427, 0xB427, 0xB427 }, -{ 0xB428, 0xB428, 0xB428 }, -{ 0xB429, 0xB429, 0xB429 }, -{ 0xB42A, 0xB42A, 0xB42A }, -{ 0xB42B, 0xB42B, 0xB42B }, -{ 0xB42C, 0xB42C, 0xB42C }, -{ 0xB42D, 0xB42D, 0xB42D }, -{ 0xB42E, 0xB42E, 0xB42E }, -{ 0xB42F, 0xB42F, 0xB42F }, -{ 0xB430, 0xB430, 0xB430 }, -{ 0xB431, 0xB431, 0xB431 }, -{ 0xB432, 0xB432, 0xB432 }, -{ 0xB433, 0xB433, 0xB433 }, -{ 0xB434, 0xB434, 0xB434 }, -{ 0xB435, 0xB435, 0xB435 }, -{ 0xB436, 0xB436, 0xB436 }, -{ 0xB437, 0xB437, 0xB437 }, -{ 0xB438, 0xB438, 0xB438 }, -{ 0xB439, 0xB439, 0xB439 }, -{ 0xB43A, 0xB43A, 0xB43A }, -{ 0xB43B, 0xB43B, 0xB43B }, -{ 0xB43C, 0xB43C, 0xB43C }, -{ 0xB43D, 0xB43D, 0xB43D }, -{ 0xB43E, 0xB43E, 0xB43E }, -{ 0xB43F, 0xB43F, 0xB43F }, -{ 0xB440, 0xB440, 0xB440 }, -{ 0xB441, 0xB441, 0xB441 }, -{ 0xB442, 0xB442, 0xB442 }, -{ 0xB443, 0xB443, 0xB443 }, -{ 0xB444, 0xB444, 0xB444 }, -{ 0xB445, 0xB445, 0xB445 }, -{ 0xB446, 0xB446, 0xB446 }, -{ 0xB447, 0xB447, 0xB447 }, -{ 0xB448, 0xB448, 0xB448 }, -{ 0xB449, 0xB449, 0xB449 }, -{ 0xB44A, 0xB44A, 0xB44A }, -{ 0xB44B, 0xB44B, 0xB44B }, -{ 0xB44C, 0xB44C, 0xB44C }, -{ 0xB44D, 0xB44D, 0xB44D }, -{ 0xB44E, 0xB44E, 0xB44E }, -{ 0xB44F, 0xB44F, 0xB44F }, -{ 0xB450, 0xB450, 0xB450 }, -{ 0xB451, 0xB451, 0xB451 }, -{ 0xB452, 0xB452, 0xB452 }, -{ 0xB453, 0xB453, 0xB453 }, -{ 0xB454, 0xB454, 0xB454 }, -{ 0xB455, 0xB455, 0xB455 }, -{ 0xB456, 0xB456, 0xB456 }, -{ 0xB457, 0xB457, 0xB457 }, -{ 0xB458, 0xB458, 0xB458 }, -{ 0xB459, 0xB459, 0xB459 }, -{ 0xB45A, 0xB45A, 0xB45A }, -{ 0xB45B, 0xB45B, 0xB45B }, -{ 0xB45C, 0xB45C, 0xB45C }, -{ 0xB45D, 0xB45D, 0xB45D }, -{ 0xB45E, 0xB45E, 0xB45E }, -{ 0xB45F, 0xB45F, 0xB45F }, -{ 0xB460, 0xB460, 0xB460 }, -{ 0xB461, 0xB461, 0xB461 }, -{ 0xB462, 0xB462, 0xB462 }, -{ 0xB463, 0xB463, 0xB463 }, -{ 0xB464, 0xB464, 0xB464 }, -{ 0xB465, 0xB465, 0xB465 }, -{ 0xB466, 0xB466, 0xB466 }, -{ 0xB467, 0xB467, 0xB467 }, -{ 0xB468, 0xB468, 0xB468 }, -{ 0xB469, 0xB469, 0xB469 }, -{ 0xB46A, 0xB46A, 0xB46A }, -{ 0xB46B, 0xB46B, 0xB46B }, -{ 0xB46C, 0xB46C, 0xB46C }, -{ 0xB46D, 0xB46D, 0xB46D }, -{ 0xB46E, 0xB46E, 0xB46E }, -{ 0xB46F, 0xB46F, 0xB46F }, -{ 0xB470, 0xB470, 0xB470 }, -{ 0xB471, 0xB471, 0xB471 }, -{ 0xB472, 0xB472, 0xB472 }, -{ 0xB473, 0xB473, 0xB473 }, -{ 0xB474, 0xB474, 0xB474 }, -{ 0xB475, 0xB475, 0xB475 }, -{ 0xB476, 0xB476, 0xB476 }, -{ 0xB477, 0xB477, 0xB477 }, -{ 0xB478, 0xB478, 0xB478 }, -{ 0xB479, 0xB479, 0xB479 }, -{ 0xB47A, 0xB47A, 0xB47A }, -{ 0xB47B, 0xB47B, 0xB47B }, -{ 0xB47C, 0xB47C, 0xB47C }, -{ 0xB47D, 0xB47D, 0xB47D }, -{ 0xB47E, 0xB47E, 0xB47E }, -{ 0xB47F, 0xB47F, 0xB47F }, -{ 0xB480, 0xB480, 0xB480 }, -{ 0xB481, 0xB481, 0xB481 }, -{ 0xB482, 0xB482, 0xB482 }, -{ 0xB483, 0xB483, 0xB483 }, -{ 0xB484, 0xB484, 0xB484 }, -{ 0xB485, 0xB485, 0xB485 }, -{ 0xB486, 0xB486, 0xB486 }, -{ 0xB487, 0xB487, 0xB487 }, -{ 0xB488, 0xB488, 0xB488 }, -{ 0xB489, 0xB489, 0xB489 }, -{ 0xB48A, 0xB48A, 0xB48A }, -{ 0xB48B, 0xB48B, 0xB48B }, -{ 0xB48C, 0xB48C, 0xB48C }, -{ 0xB48D, 0xB48D, 0xB48D }, -{ 0xB48E, 0xB48E, 0xB48E }, -{ 0xB48F, 0xB48F, 0xB48F }, -{ 0xB490, 0xB490, 0xB490 }, -{ 0xB491, 0xB491, 0xB491 }, -{ 0xB492, 0xB492, 0xB492 }, -{ 0xB493, 0xB493, 0xB493 }, -{ 0xB494, 0xB494, 0xB494 }, -{ 0xB495, 0xB495, 0xB495 }, -{ 0xB496, 0xB496, 0xB496 }, -{ 0xB497, 0xB497, 0xB497 }, -{ 0xB498, 0xB498, 0xB498 }, -{ 0xB499, 0xB499, 0xB499 }, -{ 0xB49A, 0xB49A, 0xB49A }, -{ 0xB49B, 0xB49B, 0xB49B }, -{ 0xB49C, 0xB49C, 0xB49C }, -{ 0xB49D, 0xB49D, 0xB49D }, -{ 0xB49E, 0xB49E, 0xB49E }, -{ 0xB49F, 0xB49F, 0xB49F }, -{ 0xB4A0, 0xB4A0, 0xB4A0 }, -{ 0xB4A1, 0xB4A1, 0xB4A1 }, -{ 0xB4A2, 0xB4A2, 0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-{ 0xB511, 0xB511, 0xB511 }, -{ 0xB512, 0xB512, 0xB512 }, -{ 0xB513, 0xB513, 0xB513 }, -{ 0xB514, 0xB514, 0xB514 }, -{ 0xB515, 0xB515, 0xB515 }, -{ 0xB516, 0xB516, 0xB516 }, -{ 0xB517, 0xB517, 0xB517 }, -{ 0xB518, 0xB518, 0xB518 }, -{ 0xB519, 0xB519, 0xB519 }, -{ 0xB51A, 0xB51A, 0xB51A }, -{ 0xB51B, 0xB51B, 0xB51B }, -{ 0xB51C, 0xB51C, 0xB51C }, -{ 0xB51D, 0xB51D, 0xB51D }, -{ 0xB51E, 0xB51E, 0xB51E }, -{ 0xB51F, 0xB51F, 0xB51F }, -{ 0xB520, 0xB520, 0xB520 }, -{ 0xB521, 0xB521, 0xB521 }, -{ 0xB522, 0xB522, 0xB522 }, -{ 0xB523, 0xB523, 0xB523 }, -{ 0xB524, 0xB524, 0xB524 }, -{ 0xB525, 0xB525, 0xB525 }, -{ 0xB526, 0xB526, 0xB526 }, -{ 0xB527, 0xB527, 0xB527 }, -{ 0xB528, 0xB528, 0xB528 }, -{ 0xB529, 0xB529, 0xB529 }, -{ 0xB52A, 0xB52A, 0xB52A }, -{ 0xB52B, 0xB52B, 0xB52B }, -{ 0xB52C, 0xB52C, 0xB52C }, -{ 0xB52D, 0xB52D, 0xB52D }, -{ 0xB52E, 0xB52E, 0xB52E }, -{ 0xB52F, 0xB52F, 0xB52F }, -{ 0xB530, 0xB530, 0xB530 }, -{ 0xB531, 0xB531, 0xB531 }, -{ 0xB532, 0xB532, 0xB532 }, -{ 0xB533, 0xB533, 0xB533 }, -{ 0xB534, 0xB534, 0xB534 }, -{ 0xB535, 0xB535, 0xB535 }, -{ 0xB536, 0xB536, 0xB536 }, -{ 0xB537, 0xB537, 0xB537 }, -{ 0xB538, 0xB538, 0xB538 }, -{ 0xB539, 0xB539, 0xB539 }, -{ 0xB53A, 0xB53A, 0xB53A }, -{ 0xB53B, 0xB53B, 0xB53B }, -{ 0xB53C, 0xB53C, 0xB53C }, -{ 0xB53D, 0xB53D, 0xB53D }, -{ 0xB53E, 0xB53E, 0xB53E }, -{ 0xB53F, 0xB53F, 0xB53F }, -{ 0xB540, 0xB540, 0xB540 }, -{ 0xB541, 0xB541, 0xB541 }, -{ 0xB542, 0xB542, 0xB542 }, -{ 0xB543, 0xB543, 0xB543 }, -{ 0xB544, 0xB544, 0xB544 }, -{ 0xB545, 0xB545, 0xB545 }, -{ 0xB546, 0xB546, 0xB546 }, -{ 0xB547, 0xB547, 0xB547 }, -{ 0xB548, 0xB548, 0xB548 }, -{ 0xB549, 0xB549, 0xB549 }, -{ 0xB54A, 0xB54A, 0xB54A }, -{ 0xB54B, 0xB54B, 0xB54B }, -{ 0xB54C, 0xB54C, 0xB54C }, -{ 0xB54D, 0xB54D, 0xB54D }, -{ 0xB54E, 0xB54E, 0xB54E }, -{ 0xB54F, 0xB54F, 0xB54F }, -{ 0xB550, 0xB550, 0xB550 }, -{ 0xB551, 0xB551, 0xB551 }, -{ 0xB552, 0xB552, 0xB552 }, -{ 0xB553, 0xB553, 0xB553 }, -{ 0xB554, 0xB554, 0xB554 }, -{ 0xB555, 0xB555, 0xB555 }, -{ 0xB556, 0xB556, 0xB556 }, -{ 0xB557, 0xB557, 0xB557 }, -{ 0xB558, 0xB558, 0xB558 }, -{ 0xB559, 0xB559, 0xB559 }, -{ 0xB55A, 0xB55A, 0xB55A }, -{ 0xB55B, 0xB55B, 0xB55B }, -{ 0xB55C, 0xB55C, 0xB55C }, -{ 0xB55D, 0xB55D, 0xB55D }, -{ 0xB55E, 0xB55E, 0xB55E }, -{ 0xB55F, 0xB55F, 0xB55F }, -{ 0xB560, 0xB560, 0xB560 }, -{ 0xB561, 0xB561, 0xB561 }, -{ 0xB562, 0xB562, 0xB562 }, -{ 0xB563, 0xB563, 0xB563 }, -{ 0xB564, 0xB564, 0xB564 }, -{ 0xB565, 0xB565, 0xB565 }, -{ 0xB566, 0xB566, 0xB566 }, -{ 0xB567, 0xB567, 0xB567 }, -{ 0xB568, 0xB568, 0xB568 }, -{ 0xB569, 0xB569, 0xB569 }, -{ 0xB56A, 0xB56A, 0xB56A }, -{ 0xB56B, 0xB56B, 0xB56B }, -{ 0xB56C, 0xB56C, 0xB56C }, -{ 0xB56D, 0xB56D, 0xB56D }, -{ 0xB56E, 0xB56E, 0xB56E }, -{ 0xB56F, 0xB56F, 0xB56F }, -{ 0xB570, 0xB570, 0xB570 }, -{ 0xB571, 0xB571, 0xB571 }, -{ 0xB572, 0xB572, 0xB572 }, -{ 0xB573, 0xB573, 0xB573 }, -{ 0xB574, 0xB574, 0xB574 }, -{ 0xB575, 0xB575, 0xB575 }, -{ 0xB576, 0xB576, 0xB576 }, -{ 0xB577, 0xB577, 0xB577 }, -{ 0xB578, 0xB578, 0xB578 }, -{ 0xB579, 0xB579, 0xB579 }, -{ 0xB57A, 0xB57A, 0xB57A }, -{ 0xB57B, 0xB57B, 0xB57B }, -{ 0xB57C, 0xB57C, 0xB57C }, -{ 0xB57D, 0xB57D, 0xB57D }, -{ 0xB57E, 0xB57E, 0xB57E }, -{ 0xB57F, 0xB57F, 0xB57F }, -{ 0xB580, 0xB580, 0xB580 }, -{ 0xB581, 0xB581, 0xB581 }, -{ 0xB582, 0xB582, 0xB582 }, -{ 0xB583, 0xB583, 0xB583 }, -{ 0xB584, 0xB584, 0xB584 }, -{ 0xB585, 0xB585, 0xB585 }, -{ 0xB586, 0xB586, 0xB586 }, -{ 0xB587, 0xB587, 0xB587 }, -{ 0xB588, 0xB588, 0xB588 }, -{ 0xB589, 0xB589, 0xB589 }, -{ 0xB58A, 0xB58A, 0xB58A }, -{ 0xB58B, 0xB58B, 0xB58B }, -{ 0xB58C, 0xB58C, 0xB58C }, -{ 0xB58D, 0xB58D, 0xB58D }, -{ 0xB58E, 0xB58E, 0xB58E }, -{ 0xB58F, 0xB58F, 0xB58F }, -{ 0xB590, 0xB590, 0xB590 }, -{ 0xB591, 0xB591, 0xB591 }, -{ 0xB592,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, -{ 0xB600, 0xB600, 0xB600 }, -{ 0xB601, 0xB601, 0xB601 }, -{ 0xB602, 0xB602, 0xB602 }, -{ 0xB603, 0xB603, 0xB603 }, -{ 0xB604, 0xB604, 0xB604 }, -{ 0xB605, 0xB605, 0xB605 }, -{ 0xB606, 0xB606, 0xB606 }, -{ 0xB607, 0xB607, 0xB607 }, -{ 0xB608, 0xB608, 0xB608 }, -{ 0xB609, 0xB609, 0xB609 }, -{ 0xB60A, 0xB60A, 0xB60A }, -{ 0xB60B, 0xB60B, 0xB60B }, -{ 0xB60C, 0xB60C, 0xB60C }, -{ 0xB60D, 0xB60D, 0xB60D }, -{ 0xB60E, 0xB60E, 0xB60E }, -{ 0xB60F, 0xB60F, 0xB60F }, -{ 0xB610, 0xB610, 0xB610 }, -{ 0xB611, 0xB611, 0xB611 }, -{ 0xB612, 0xB612, 0xB612 }, -{ 0xB613, 0xB613, 0xB613 }, -{ 0xB614, 0xB614, 0xB614 }, -{ 0xB615, 0xB615, 0xB615 }, -{ 0xB616, 0xB616, 0xB616 }, -{ 0xB617, 0xB617, 0xB617 }, -{ 0xB618, 0xB618, 0xB618 }, -{ 0xB619, 0xB619, 0xB619 }, -{ 0xB61A, 0xB61A, 0xB61A }, -{ 0xB61B, 0xB61B, 0xB61B }, -{ 0xB61C, 0xB61C, 0xB61C }, -{ 0xB61D, 0xB61D, 0xB61D }, -{ 0xB61E, 0xB61E, 0xB61E }, -{ 0xB61F, 0xB61F, 0xB61F }, -{ 0xB620, 0xB620, 0xB620 }, -{ 0xB621, 0xB621, 0xB621 }, -{ 0xB622, 0xB622, 0xB622 }, -{ 0xB623, 0xB623, 0xB623 }, -{ 0xB624, 0xB624, 0xB624 }, -{ 0xB625, 0xB625, 0xB625 }, -{ 0xB626, 0xB626, 0xB626 }, -{ 0xB627, 0xB627, 0xB627 }, -{ 0xB628, 0xB628, 0xB628 }, -{ 0xB629, 0xB629, 0xB629 }, -{ 0xB62A, 0xB62A, 0xB62A }, -{ 0xB62B, 0xB62B, 0xB62B }, -{ 0xB62C, 0xB62C, 0xB62C }, -{ 0xB62D, 0xB62D, 0xB62D }, -{ 0xB62E, 0xB62E, 0xB62E }, -{ 0xB62F, 0xB62F, 0xB62F }, -{ 0xB630, 0xB630, 0xB630 }, -{ 0xB631, 0xB631, 0xB631 }, -{ 0xB632, 0xB632, 0xB632 }, -{ 0xB633, 0xB633, 0xB633 }, -{ 0xB634, 0xB634, 0xB634 }, -{ 0xB635, 0xB635, 0xB635 }, -{ 0xB636, 0xB636, 0xB636 }, -{ 0xB637, 0xB637, 0xB637 }, -{ 0xB638, 0xB638, 0xB638 }, -{ 0xB639, 0xB639, 0xB639 }, -{ 0xB63A, 0xB63A, 0xB63A }, -{ 0xB63B, 0xB63B, 0xB63B }, -{ 0xB63C, 0xB63C, 0xB63C }, -{ 0xB63D, 0xB63D, 0xB63D }, -{ 0xB63E, 0xB63E, 0xB63E }, -{ 0xB63F, 0xB63F, 0xB63F }, -{ 0xB640, 0xB640, 0xB640 }, -{ 0xB641, 0xB641, 0xB641 }, -{ 0xB642, 0xB642, 0xB642 }, -{ 0xB643, 0xB643, 0xB643 }, -{ 0xB644, 0xB644, 0xB644 }, -{ 0xB645, 0xB645, 0xB645 }, -{ 0xB646, 0xB646, 0xB646 }, -{ 0xB647, 0xB647, 0xB647 }, -{ 0xB648, 0xB648, 0xB648 }, -{ 0xB649, 0xB649, 0xB649 }, -{ 0xB64A, 0xB64A, 0xB64A }, -{ 0xB64B, 0xB64B, 0xB64B }, -{ 0xB64C, 0xB64C, 0xB64C }, -{ 0xB64D, 0xB64D, 0xB64D }, -{ 0xB64E, 0xB64E, 0xB64E }, -{ 0xB64F, 0xB64F, 0xB64F }, -{ 0xB650, 0xB650, 0xB650 }, -{ 0xB651, 0xB651, 0xB651 }, -{ 0xB652, 0xB652, 0xB652 }, -{ 0xB653, 0xB653, 0xB653 }, -{ 0xB654, 0xB654, 0xB654 }, -{ 0xB655, 0xB655, 0xB655 }, -{ 0xB656, 0xB656, 0xB656 }, -{ 0xB657, 0xB657, 0xB657 }, -{ 0xB658, 0xB658, 0xB658 }, -{ 0xB659, 0xB659, 0xB659 }, -{ 0xB65A, 0xB65A, 0xB65A }, -{ 0xB65B, 0xB65B, 0xB65B }, -{ 0xB65C, 0xB65C, 0xB65C }, -{ 0xB65D, 0xB65D, 0xB65D }, -{ 0xB65E, 0xB65E, 0xB65E }, -{ 0xB65F, 0xB65F, 0xB65F }, -{ 0xB660, 0xB660, 0xB660 }, -{ 0xB661, 0xB661, 0xB661 }, -{ 0xB662, 0xB662, 0xB662 }, -{ 0xB663, 0xB663, 0xB663 }, -{ 0xB664, 0xB664, 0xB664 }, -{ 0xB665, 0xB665, 0xB665 }, -{ 0xB666, 0xB666, 0xB666 }, -{ 0xB667, 0xB667, 0xB667 }, -{ 0xB668, 0xB668, 0xB668 }, -{ 0xB669, 0xB669, 0xB669 }, -{ 0xB66A, 0xB66A, 0xB66A }, -{ 0xB66B, 0xB66B, 0xB66B }, -{ 0xB66C, 0xB66C, 0xB66C }, -{ 0xB66D, 0xB66D, 0xB66D }, -{ 0xB66E, 0xB66E, 0xB66E }, -{ 0xB66F, 0xB66F, 0xB66F }, -{ 0xB670, 0xB670, 0xB670 }, -{ 0xB671, 0xB671, 0xB671 }, -{ 0xB672, 0xB672, 0xB672 }, -{ 0xB673, 0xB673, 0xB673 }, -{ 0xB674, 0xB674, 0xB674 }, -{ 0xB675, 0xB675, 0xB675 }, -{ 0xB676, 0xB676, 0xB676 }, -{ 0xB677, 0xB677, 0xB677 }, -{ 0xB678, 0xB678, 0xB678 }, -{ 0xB679, 0xB679, 0xB679 }, -{ 0xB67A, 0xB67A, 0xB67A }, -{ 0xB67B, 0xB67B, 0xB67B }, -{ 0xB67C, 0xB67C, 0xB67C }, -{ 0xB67D, 0xB67D, 0xB67D }, -{ 0xB67E, 0xB67E, 0xB67E }, -{ 0xB67F, 0xB67F, 0xB67F }, -{ 0xB680, 0xB680, 0xB680 }, -{ 0xB681, 0xB681, 0xB681 }, -{ 0xB682, 0xB682, 0xB682 }, -{ 0xB683, 0xB683, 0xB683 }, -{ 0xB684, 0xB684, 0xB684 }, -{ 0xB685, 0xB685, 0xB685 }, -{ 0xB686, 0xB686, 0xB686 }, -{ 0xB687, 0xB687, 0xB687 }, -{ 0xB688, 0xB688, 0xB688 }, -{ 0xB689, 0xB689, 0xB689 }, -{ 0xB68A, 0xB68A, 0xB68A }, -{ 0xB68B, 0xB68B, 0xB68B }, -{ 0xB68C, 0xB68C, 0xB68C }, -{ 0xB68D, 0xB68D, 0xB68D }, -{ 0xB68E, 0xB68E, 0xB68E }, -{ 0xB68F, 0xB68F, 0xB68F }, -{ 0xB690, 0xB690, 0xB690 }, -{ 0xB691, 0xB691, 0xB691 }, -{ 0xB692, 0xB692, 0xB692 }, -{ 0xB693, 0xB693, 0xB693 }, -{ 0xB694, 0xB694, 0xB694 }, -{ 0xB695, 0xB695, 0xB695 }, -{ 0xB696, 0xB696, 0xB696 }, -{ 0xB697, 0xB697, 0xB697 }, -{ 0xB698, 0xB698, 0xB698 }, -{ 0xB699, 0xB699, 0xB699 }, -{ 0xB69A, 0xB69A, 0xB69A }, -{ 0xB69B, 0xB69B, 0xB69B }, -{ 0xB69C, 0xB69C, 0xB69C }, -{ 0xB69D, 0xB69D, 0xB69D }, -{ 0xB69E, 0xB69E, 0xB69E }, -{ 0xB69F, 0xB69F, 0xB69F }, -{ 0xB6A0, 0xB6A0, 0xB6A0 }, -{ 0xB6A1, 0xB6A1, 0xB6A1 }, -{ 0xB6A2, 0xB6A2, 0xB6A2 }, -{ 0xB6A3, 0xB6A3, 0xB6A3 }, -{ 0xB6A4, 0xB6A4, 0xB6A4 }, -{ 0xB6A5, 0xB6A5, 0xB6A5 }, -{ 0xB6A6, 0xB6A6, 0xB6A6 }, -{ 0xB6A7, 0xB6A7, 0xB6A7 }, -{ 0xB6A8, 0xB6A8, 0xB6A8 }, -{ 0xB6A9, 0xB6A9, 0xB6A9 }, -{ 0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F1 }, -{ 0xB6F2, 0xB6F2, 0xB6F2 }, -{ 0xB6F3, 0xB6F3, 0xB6F3 }, -{ 0xB6F4, 0xB6F4, 0xB6F4 }, -{ 0xB6F5, 0xB6F5, 0xB6F5 }, -{ 0xB6F6, 0xB6F6, 0xB6F6 }, -{ 0xB6F7, 0xB6F7, 0xB6F7 }, -{ 0xB6F8, 0xB6F8, 0xB6F8 }, -{ 0xB6F9, 0xB6F9, 0xB6F9 }, -{ 0xB6FA, 0xB6FA, 0xB6FA }, -{ 0xB6FB, 0xB6FB, 0xB6FB }, -{ 0xB6FC, 0xB6FC, 0xB6FC }, -{ 0xB6FD, 0xB6FD, 0xB6FD }, -{ 0xB6FE, 0xB6FE, 0xB6FE }, -{ 0xB6FF, 0xB6FF, 0xB6FF }, -{ 0xB700, 0xB700, 0xB700 }, -{ 0xB701, 0xB701, 0xB701 }, -{ 0xB702, 0xB702, 0xB702 }, -{ 0xB703, 0xB703, 0xB703 }, -{ 0xB704, 0xB704, 0xB704 }, -{ 0xB705, 0xB705, 0xB705 }, -{ 0xB706, 0xB706, 0xB706 }, -{ 0xB707, 0xB707, 0xB707 }, -{ 0xB708, 0xB708, 0xB708 }, -{ 0xB709, 0xB709, 0xB709 }, -{ 0xB70A, 0xB70A, 0xB70A }, -{ 0xB70B, 0xB70B, 0xB70B }, -{ 0xB70C, 0xB70C, 0xB70C }, -{ 0xB70D, 0xB70D, 0xB70D }, -{ 0xB70E, 0xB70E, 0xB70E }, -{ 0xB70F, 0xB70F, 0xB70F }, -{ 0xB710, 0xB710, 0xB710 }, -{ 0xB711, 0xB711, 0xB711 }, -{ 0xB712, 0xB712, 0xB712 }, -{ 0xB713, 0xB713, 0xB713 }, -{ 0xB714, 0xB714, 0xB714 }, -{ 0xB715, 0xB715, 0xB715 }, -{ 0xB716, 0xB716, 0xB716 }, -{ 0xB717, 0xB717, 0xB717 }, -{ 0xB718, 0xB718, 0xB718 }, -{ 0xB719, 0xB719, 0xB719 }, -{ 0xB71A, 0xB71A, 0xB71A }, -{ 0xB71B, 0xB71B, 0xB71B }, -{ 0xB71C, 0xB71C, 0xB71C }, -{ 0xB71D, 0xB71D, 0xB71D }, -{ 0xB71E, 0xB71E, 0xB71E }, -{ 0xB71F, 0xB71F, 0xB71F }, -{ 0xB720, 0xB720, 0xB720 }, -{ 0xB721, 0xB721, 0xB721 }, -{ 0xB722, 0xB722, 0xB722 }, -{ 0xB723, 0xB723, 0xB723 }, -{ 0xB724, 0xB724, 0xB724 }, -{ 0xB725, 0xB725, 0xB725 }, -{ 0xB726, 0xB726, 0xB726 }, -{ 0xB727, 0xB727, 0xB727 }, -{ 0xB728, 0xB728, 0xB728 }, -{ 0xB729, 0xB729, 0xB729 }, -{ 0xB72A, 0xB72A, 0xB72A }, -{ 0xB72B, 0xB72B, 0xB72B }, -{ 0xB72C, 0xB72C, 0xB72C }, -{ 0xB72D, 0xB72D, 0xB72D }, -{ 0xB72E, 0xB72E, 0xB72E }, -{ 0xB72F, 0xB72F, 0xB72F }, -{ 0xB730, 0xB730, 0xB730 }, -{ 0xB731, 0xB731, 0xB731 }, -{ 0xB732, 0xB732, 0xB732 }, -{ 0xB733, 0xB733, 0xB733 }, -{ 0xB734, 0xB734, 0xB734 }, -{ 0xB735, 0xB735, 0xB735 }, -{ 0xB736, 0xB736, 0xB736 }, -{ 0xB737, 0xB737, 0xB737 }, -{ 0xB738, 0xB738, 0xB738 }, -{ 0xB739, 0xB739, 0xB739 }, -{ 0xB73A, 0xB73A, 0xB73A }, -{ 0xB73B, 0xB73B, 0xB73B }, -{ 0xB73C, 0xB73C, 0xB73C }, -{ 0xB73D, 0xB73D, 0xB73D }, -{ 0xB73E, 0xB73E, 0xB73E }, -{ 0xB73F, 0xB73F, 0xB73F }, -{ 0xB740, 0xB740, 0xB740 }, -{ 0xB741, 0xB741, 0xB741 }, -{ 0xB742, 0xB742, 0xB742 }, -{ 0xB743, 0xB743, 0xB743 }, -{ 0xB744, 0xB744, 0xB744 }, -{ 0xB745, 0xB745, 0xB745 }, -{ 0xB746, 0xB746, 0xB746 }, -{ 0xB747, 0xB747, 0xB747 }, -{ 0xB748, 0xB748, 0xB748 }, -{ 0xB749, 0xB749, 0xB749 }, -{ 0xB74A, 0xB74A, 0xB74A }, -{ 0xB74B, 0xB74B, 0xB74B }, -{ 0xB74C, 0xB74C, 0xB74C }, -{ 0xB74D, 0xB74D, 0xB74D }, -{ 0xB74E, 0xB74E, 0xB74E }, -{ 0xB74F, 0xB74F, 0xB74F }, -{ 0xB750, 0xB750, 0xB750 }, -{ 0xB751, 0xB751, 0xB751 }, -{ 0xB752, 0xB752, 0xB752 }, -{ 0xB753, 0xB753, 0xB753 }, -{ 0xB754, 0xB754, 0xB754 }, -{ 0xB755, 0xB755, 0xB755 }, -{ 0xB756, 0xB756, 0xB756 }, -{ 0xB757, 0xB757, 0xB757 }, -{ 0xB758, 0xB758, 0xB758 }, -{ 0xB759, 0xB759, 0xB759 }, -{ 0xB75A, 0xB75A, 0xB75A }, -{ 0xB75B, 0xB75B, 0xB75B }, -{ 0xB75C, 0xB75C, 0xB75C }, -{ 0xB75D, 0xB75D, 0xB75D }, -{ 0xB75E, 0xB75E, 0xB75E }, -{ 0xB75F, 0xB75F, 0xB75F }, -{ 0xB760, 0xB760, 0xB760 }, -{ 0xB761, 0xB761, 0xB761 }, -{ 0xB762, 0xB762, 0xB762 }, -{ 0xB763, 0xB763, 0xB763 }, -{ 0xB764, 0xB764, 0xB764 }, -{ 0xB765, 0xB765, 0xB765 }, -{ 0xB766, 0xB766, 0xB766 }, -{ 0xB767, 0xB767, 0xB767 }, -{ 0xB768, 0xB768, 0xB768 }, -{ 0xB769, 0xB769, 0xB769 }, -{ 0xB76A, 0xB76A, 0xB76A }, -{ 0xB76B, 0xB76B, 0xB76B }, -{ 0xB76C, 0xB76C, 0xB76C }, -{ 0xB76D, 0xB76D, 0xB76D }, -{ 0xB76E, 0xB76E, 0xB76E }, -{ 0xB76F, 0xB76F, 0xB76F }, -{ 0xB770, 0xB770, 0xB770 }, -{ 0xB771, 0xB771, 0xB771 }, -{ 0xB772, 0xB772, 0xB772 }, -{ 0xB773, 0xB773, 0xB773 }, -{ 0xB774, 0xB774, 0xB774 }, -{ 0xB775, 0xB775, 0xB775 }, -{ 0xB776, 0xB776, 0xB776 }, -{ 0xB777, 0xB777, 0xB777 }, -{ 0xB778, 0xB778, 0xB778 }, -{ 0xB779, 0xB779, 0xB779 }, -{ 0xB77A, 0xB77A, 0xB77A }, -{ 0xB77B, 0xB77B, 0xB77B }, -{ 0xB77C, 0xB77C, 0xB77C }, -{ 0xB77D, 0xB77D, 0xB77D }, -{ 0xB77E, 0xB77E, 0xB77E }, -{ 0xB77F, 0xB77F, 0xB77F }, -{ 0xB780, 0xB780, 0xB780 }, -{ 0xB781, 0xB781, 0xB781 }, -{ 0xB782, 0xB782, 0xB782 }, -{ 0xB783, 0xB783, 0xB783 }, -{ 0xB784, 0xB784, 0xB784 }, -{ 0xB785, 0xB785, 0xB785 }, -{ 0xB786, 0xB786, 0xB786 }, -{ 0xB787, 0xB787, 0xB787 }, -{ 0xB788, 0xB788, 0xB788 }, -{ 0xB789, 0xB789, 0xB789 }, -{ 0xB78A, 0xB78A, 0xB78A }, -{ 0xB78B, 0xB78B, 0xB78B }, -{ 0xB78C, 0xB78C, 0xB78C }, -{ 0xB78D, 0xB78D, 0xB78D }, -{ 0xB78E, 0xB78E, 0xB78E }, -{ 0xB78F, 0xB78F, 0xB78F }, -{ 0xB790, 0xB790, 0xB790 }, -{ 0xB791, 0xB791, 0xB791 }, -{ 0xB792, 0xB792, 0xB792 }, -{ 0xB793, 0xB793, 0xB793 }, -{ 0xB794, 0xB794, 0xB794 }, -{ 0xB795, 0xB795, 0xB795 }, -{ 0xB796, 0xB796, 0xB796 }, -{ 0xB797, 0xB797, 0xB797 }, -{ 0xB798, 0xB798, 0xB798 }, -{ 0xB799, 0xB799, 0xB799 }, -{ 0xB79A, 0xB79A, 0xB79A }, -{ 0xB79B, 0xB79B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, 0xB809, 0xB809 }, -{ 0xB80A, 0xB80A, 0xB80A }, -{ 0xB80B, 0xB80B, 0xB80B }, -{ 0xB80C, 0xB80C, 0xB80C }, -{ 0xB80D, 0xB80D, 0xB80D }, -{ 0xB80E, 0xB80E, 0xB80E }, -{ 0xB80F, 0xB80F, 0xB80F }, -{ 0xB810, 0xB810, 0xB810 }, -{ 0xB811, 0xB811, 0xB811 }, -{ 0xB812, 0xB812, 0xB812 }, -{ 0xB813, 0xB813, 0xB813 }, -{ 0xB814, 0xB814, 0xB814 }, -{ 0xB815, 0xB815, 0xB815 }, -{ 0xB816, 0xB816, 0xB816 }, -{ 0xB817, 0xB817, 0xB817 }, -{ 0xB818, 0xB818, 0xB818 }, -{ 0xB819, 0xB819, 0xB819 }, -{ 0xB81A, 0xB81A, 0xB81A }, -{ 0xB81B, 0xB81B, 0xB81B }, -{ 0xB81C, 0xB81C, 0xB81C }, -{ 0xB81D, 0xB81D, 0xB81D }, -{ 0xB81E, 0xB81E, 0xB81E }, -{ 0xB81F, 0xB81F, 0xB81F }, -{ 0xB820, 0xB820, 0xB820 }, -{ 0xB821, 0xB821, 0xB821 }, -{ 0xB822, 0xB822, 0xB822 }, -{ 0xB823, 0xB823, 0xB823 }, -{ 0xB824, 0xB824, 0xB824 }, -{ 0xB825, 0xB825, 0xB825 }, -{ 0xB826, 0xB826, 0xB826 }, -{ 0xB827, 0xB827, 0xB827 }, -{ 0xB828, 0xB828, 0xB828 }, -{ 0xB829, 0xB829, 0xB829 }, -{ 0xB82A, 0xB82A, 0xB82A }, -{ 0xB82B, 0xB82B, 0xB82B }, -{ 0xB82C, 0xB82C, 0xB82C }, -{ 0xB82D, 0xB82D, 0xB82D }, -{ 0xB82E, 0xB82E, 0xB82E }, -{ 0xB82F, 0xB82F, 0xB82F }, -{ 0xB830, 0xB830, 0xB830 }, -{ 0xB831, 0xB831, 0xB831 }, -{ 0xB832, 0xB832, 0xB832 }, -{ 0xB833, 0xB833, 0xB833 }, -{ 0xB834, 0xB834, 0xB834 }, -{ 0xB835, 0xB835, 0xB835 }, -{ 0xB836, 0xB836, 0xB836 }, -{ 0xB837, 0xB837, 0xB837 }, -{ 0xB838, 0xB838, 0xB838 }, -{ 0xB839, 0xB839, 0xB839 }, -{ 0xB83A, 0xB83A, 0xB83A }, -{ 0xB83B, 0xB83B, 0xB83B }, -{ 0xB83C, 0xB83C, 0xB83C }, -{ 0xB83D, 0xB83D, 0xB83D }, -{ 0xB83E, 0xB83E, 0xB83E }, -{ 0xB83F, 0xB83F, 0xB83F }, -{ 0xB840, 0xB840, 0xB840 }, -{ 0xB841, 0xB841, 0xB841 }, -{ 0xB842, 0xB842, 0xB842 }, -{ 0xB843, 0xB843, 0xB843 }, -{ 0xB844, 0xB844, 0xB844 }, -{ 0xB845, 0xB845, 0xB845 }, -{ 0xB846, 0xB846, 0xB846 }, -{ 0xB847, 0xB847, 0xB847 }, -{ 0xB848, 0xB848, 0xB848 }, -{ 0xB849, 0xB849, 0xB849 }, -{ 0xB84A, 0xB84A, 0xB84A }, -{ 0xB84B, 0xB84B, 0xB84B }, -{ 0xB84C, 0xB84C, 0xB84C }, -{ 0xB84D, 0xB84D, 0xB84D }, -{ 0xB84E, 0xB84E, 0xB84E }, -{ 0xB84F, 0xB84F, 0xB84F }, -{ 0xB850, 0xB850, 0xB850 }, -{ 0xB851, 0xB851, 0xB851 }, -{ 0xB852, 0xB852, 0xB852 }, -{ 0xB853, 0xB853, 0xB853 }, -{ 0xB854, 0xB854, 0xB854 }, -{ 0xB855, 0xB855, 0xB855 }, -{ 0xB856, 0xB856, 0xB856 }, -{ 0xB857, 0xB857, 0xB857 }, -{ 0xB858, 0xB858, 0xB858 }, -{ 0xB859, 0xB859, 0xB859 }, -{ 0xB85A, 0xB85A, 0xB85A }, -{ 0xB85B, 0xB85B, 0xB85B }, -{ 0xB85C, 0xB85C, 0xB85C }, -{ 0xB85D, 0xB85D, 0xB85D }, -{ 0xB85E, 0xB85E, 0xB85E }, -{ 0xB85F, 0xB85F, 0xB85F }, -{ 0xB860, 0xB860, 0xB860 }, -{ 0xB861, 0xB861, 0xB861 }, -{ 0xB862, 0xB862, 0xB862 }, -{ 0xB863, 0xB863, 0xB863 }, -{ 0xB864, 0xB864, 0xB864 }, -{ 0xB865, 0xB865, 0xB865 }, -{ 0xB866, 0xB866, 0xB866 }, -{ 0xB867, 0xB867, 0xB867 }, -{ 0xB868, 0xB868, 0xB868 }, -{ 0xB869, 0xB869, 0xB869 }, -{ 0xB86A, 0xB86A, 0xB86A }, -{ 0xB86B, 0xB86B, 0xB86B }, -{ 0xB86C, 0xB86C, 0xB86C }, -{ 0xB86D, 0xB86D, 0xB86D }, -{ 0xB86E, 0xB86E, 0xB86E }, -{ 0xB86F, 0xB86F, 0xB86F }, -{ 0xB870, 0xB870, 0xB870 }, -{ 0xB871, 0xB871, 0xB871 }, -{ 0xB872, 0xB872, 0xB872 }, -{ 0xB873, 0xB873, 0xB873 }, -{ 0xB874, 0xB874, 0xB874 }, -{ 0xB875, 0xB875, 0xB875 }, -{ 0xB876, 0xB876, 0xB876 }, -{ 0xB877, 0xB877, 0xB877 }, -{ 0xB878, 0xB878, 0xB878 }, -{ 0xB879, 0xB879, 0xB879 }, -{ 0xB87A, 0xB87A, 0xB87A }, -{ 0xB87B, 0xB87B, 0xB87B }, -{ 0xB87C, 0xB87C, 0xB87C }, -{ 0xB87D, 0xB87D, 0xB87D }, -{ 0xB87E, 0xB87E, 0xB87E }, -{ 0xB87F, 0xB87F, 0xB87F }, -{ 0xB880, 0xB880, 0xB880 }, -{ 0xB881, 0xB881, 0xB881 }, -{ 0xB882, 0xB882, 0xB882 }, -{ 0xB883, 0xB883, 0xB883 }, -{ 0xB884, 0xB884, 0xB884 }, -{ 0xB885, 0xB885, 0xB885 }, -{ 0xB886, 0xB886, 0xB886 }, -{ 0xB887, 0xB887, 0xB887 }, -{ 0xB888, 0xB888, 0xB888 }, -{ 0xB889, 0xB889, 0xB889 }, -{ 0xB88A, 0xB88A, 0xB88A }, -{ 0xB88B, 0xB88B, 0xB88B }, -{ 0xB88C, 0xB88C, 0xB88C }, -{ 0xB88D, 0xB88D, 0xB88D }, -{ 0xB88E, 0xB88E, 0xB88E }, -{ 0xB88F, 0xB88F, 0xB88F }, -{ 0xB890, 0xB890, 0xB890 }, -{ 0xB891, 0xB891, 0xB891 }, -{ 0xB892, 0xB892, 0xB892 }, -{ 0xB893, 0xB893, 0xB893 }, -{ 0xB894, 0xB894, 0xB894 }, -{ 0xB895, 0xB895, 0xB895 }, -{ 0xB896, 0xB896, 0xB896 }, -{ 0xB897, 0xB897, 0xB897 }, -{ 0xB898, 0xB898, 0xB898 }, -{ 0xB899, 0xB899, 0xB899 }, -{ 0xB89A, 0xB89A, 0xB89A }, -{ 0xB89B, 0xB89B, 0xB89B }, -{ 0xB89C, 0xB89C, 0xB89C }, -{ 0xB89D, 0xB89D, 0xB89D }, -{ 0xB89E, 0xB89E, 0xB89E }, -{ 0xB89F, 0xB89F, 0xB89F }, -{ 0xB8A0, 0xB8A0, 0xB8A0 }, -{ 0xB8A1, 0xB8A1, 0xB8A1 }, -{ 0xB8A2, 0xB8A2, 0xB8A2 }, -{ 0xB8A3, 0xB8A3, 0xB8A3 }, -{ 0xB8A4, 0xB8A4, 0xB8A4 }, -{ 0xB8A5, 0xB8A5, 0xB8A5 }, -{ 0xB8A6, 0xB8A6, 0xB8A6 }, -{ 0xB8A7, 0xB8A7, 0xB8A7 }, -{ 0xB8A8, 0xB8A8, 0xB8A8 }, -{ 0xB8A9, 0xB8A9, 0xB8A9 }, -{ 0xB8AA, 0xB8AA, 0xB8AA }, -{ 0xB8AB, 0xB8AB, 0xB8AB }, -{ 0xB8AC, 0xB8AC, 0xB8AC }, -{ 0xB8AD, 0xB8AD, 0xB8AD }, -{ 0xB8AE, 0xB8AE, 0xB8AE }, -{ 0xB8AF, 0xB8AF, 0xB8AF }, -{ 0xB8B0, 0xB8B0, 0xB8B0 }, -{ 0xB8B1, 0xB8B1, 0xB8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F9, 0xB8F9, 0xB8F9 }, -{ 0xB8FA, 0xB8FA, 0xB8FA }, -{ 0xB8FB, 0xB8FB, 0xB8FB }, -{ 0xB8FC, 0xB8FC, 0xB8FC }, -{ 0xB8FD, 0xB8FD, 0xB8FD }, -{ 0xB8FE, 0xB8FE, 0xB8FE }, -{ 0xB8FF, 0xB8FF, 0xB8FF }, -{ 0xB900, 0xB900, 0xB900 }, -{ 0xB901, 0xB901, 0xB901 }, -{ 0xB902, 0xB902, 0xB902 }, -{ 0xB903, 0xB903, 0xB903 }, -{ 0xB904, 0xB904, 0xB904 }, -{ 0xB905, 0xB905, 0xB905 }, -{ 0xB906, 0xB906, 0xB906 }, -{ 0xB907, 0xB907, 0xB907 }, -{ 0xB908, 0xB908, 0xB908 }, -{ 0xB909, 0xB909, 0xB909 }, -{ 0xB90A, 0xB90A, 0xB90A }, -{ 0xB90B, 0xB90B, 0xB90B }, -{ 0xB90C, 0xB90C, 0xB90C }, -{ 0xB90D, 0xB90D, 0xB90D }, -{ 0xB90E, 0xB90E, 0xB90E }, -{ 0xB90F, 0xB90F, 0xB90F }, -{ 0xB910, 0xB910, 0xB910 }, -{ 0xB911, 0xB911, 0xB911 }, -{ 0xB912, 0xB912, 0xB912 }, -{ 0xB913, 0xB913, 0xB913 }, -{ 0xB914, 0xB914, 0xB914 }, -{ 0xB915, 0xB915, 0xB915 }, -{ 0xB916, 0xB916, 0xB916 }, -{ 0xB917, 0xB917, 0xB917 }, -{ 0xB918, 0xB918, 0xB918 }, -{ 0xB919, 0xB919, 0xB919 }, -{ 0xB91A, 0xB91A, 0xB91A }, -{ 0xB91B, 0xB91B, 0xB91B }, -{ 0xB91C, 0xB91C, 0xB91C }, -{ 0xB91D, 0xB91D, 0xB91D }, -{ 0xB91E, 0xB91E, 0xB91E }, -{ 0xB91F, 0xB91F, 0xB91F }, -{ 0xB920, 0xB920, 0xB920 }, -{ 0xB921, 0xB921, 0xB921 }, -{ 0xB922, 0xB922, 0xB922 }, -{ 0xB923, 0xB923, 0xB923 }, -{ 0xB924, 0xB924, 0xB924 }, -{ 0xB925, 0xB925, 0xB925 }, -{ 0xB926, 0xB926, 0xB926 }, -{ 0xB927, 0xB927, 0xB927 }, -{ 0xB928, 0xB928, 0xB928 }, -{ 0xB929, 0xB929, 0xB929 }, -{ 0xB92A, 0xB92A, 0xB92A }, -{ 0xB92B, 0xB92B, 0xB92B }, -{ 0xB92C, 0xB92C, 0xB92C }, -{ 0xB92D, 0xB92D, 0xB92D }, -{ 0xB92E, 0xB92E, 0xB92E }, -{ 0xB92F, 0xB92F, 0xB92F }, -{ 0xB930, 0xB930, 0xB930 }, -{ 0xB931, 0xB931, 0xB931 }, -{ 0xB932, 0xB932, 0xB932 }, -{ 0xB933, 0xB933, 0xB933 }, -{ 0xB934, 0xB934, 0xB934 }, -{ 0xB935, 0xB935, 0xB935 }, -{ 0xB936, 0xB936, 0xB936 }, -{ 0xB937, 0xB937, 0xB937 }, -{ 0xB938, 0xB938, 0xB938 }, -{ 0xB939, 0xB939, 0xB939 }, -{ 0xB93A, 0xB93A, 0xB93A }, -{ 0xB93B, 0xB93B, 0xB93B }, -{ 0xB93C, 0xB93C, 0xB93C }, -{ 0xB93D, 0xB93D, 0xB93D }, -{ 0xB93E, 0xB93E, 0xB93E }, -{ 0xB93F, 0xB93F, 0xB93F }, -{ 0xB940, 0xB940, 0xB940 }, -{ 0xB941, 0xB941, 0xB941 }, -{ 0xB942, 0xB942, 0xB942 }, -{ 0xB943, 0xB943, 0xB943 }, -{ 0xB944, 0xB944, 0xB944 }, -{ 0xB945, 0xB945, 0xB945 }, -{ 0xB946, 0xB946, 0xB946 }, -{ 0xB947, 0xB947, 0xB947 }, -{ 0xB948, 0xB948, 0xB948 }, -{ 0xB949, 0xB949, 0xB949 }, -{ 0xB94A, 0xB94A, 0xB94A }, -{ 0xB94B, 0xB94B, 0xB94B }, -{ 0xB94C, 0xB94C, 0xB94C }, -{ 0xB94D, 0xB94D, 0xB94D }, -{ 0xB94E, 0xB94E, 0xB94E }, -{ 0xB94F, 0xB94F, 0xB94F }, -{ 0xB950, 0xB950, 0xB950 }, -{ 0xB951, 0xB951, 0xB951 }, -{ 0xB952, 0xB952, 0xB952 }, -{ 0xB953, 0xB953, 0xB953 }, -{ 0xB954, 0xB954, 0xB954 }, -{ 0xB955, 0xB955, 0xB955 }, -{ 0xB956, 0xB956, 0xB956 }, -{ 0xB957, 0xB957, 0xB957 }, -{ 0xB958, 0xB958, 0xB958 }, -{ 0xB959, 0xB959, 0xB959 }, -{ 0xB95A, 0xB95A, 0xB95A }, -{ 0xB95B, 0xB95B, 0xB95B }, -{ 0xB95C, 0xB95C, 0xB95C }, -{ 0xB95D, 0xB95D, 0xB95D }, -{ 0xB95E, 0xB95E, 0xB95E }, -{ 0xB95F, 0xB95F, 0xB95F }, -{ 0xB960, 0xB960, 0xB960 }, -{ 0xB961, 0xB961, 0xB961 }, -{ 0xB962, 0xB962, 0xB962 }, -{ 0xB963, 0xB963, 0xB963 }, -{ 0xB964, 0xB964, 0xB964 }, -{ 0xB965, 0xB965, 0xB965 }, -{ 0xB966, 0xB966, 0xB966 }, -{ 0xB967, 0xB967, 0xB967 }, -{ 0xB968, 0xB968, 0xB968 }, -{ 0xB969, 0xB969, 0xB969 }, -{ 0xB96A, 0xB96A, 0xB96A }, -{ 0xB96B, 0xB96B, 0xB96B }, -{ 0xB96C, 0xB96C, 0xB96C }, -{ 0xB96D, 0xB96D, 0xB96D }, -{ 0xB96E, 0xB96E, 0xB96E }, -{ 0xB96F, 0xB96F, 0xB96F }, -{ 0xB970, 0xB970, 0xB970 }, -{ 0xB971, 0xB971, 0xB971 }, -{ 0xB972, 0xB972, 0xB972 }, -{ 0xB973, 0xB973, 0xB973 }, -{ 0xB974, 0xB974, 0xB974 }, -{ 0xB975, 0xB975, 0xB975 }, -{ 0xB976, 0xB976, 0xB976 }, -{ 0xB977, 0xB977, 0xB977 }, -{ 0xB978, 0xB978, 0xB978 }, -{ 0xB979, 0xB979, 0xB979 }, -{ 0xB97A, 0xB97A, 0xB97A }, -{ 0xB97B, 0xB97B, 0xB97B }, -{ 0xB97C, 0xB97C, 0xB97C }, -{ 0xB97D, 0xB97D, 0xB97D }, -{ 0xB97E, 0xB97E, 0xB97E }, -{ 0xB97F, 0xB97F, 0xB97F }, -{ 0xB980, 0xB980, 0xB980 }, -{ 0xB981, 0xB981, 0xB981 }, -{ 0xB982, 0xB982, 0xB982 }, -{ 0xB983, 0xB983, 0xB983 }, -{ 0xB984, 0xB984, 0xB984 }, -{ 0xB985, 0xB985, 0xB985 }, -{ 0xB986, 0xB986, 0xB986 }, -{ 0xB987, 0xB987, 0xB987 }, -{ 0xB988, 0xB988, 0xB988 }, -{ 0xB989, 0xB989, 0xB989 }, -{ 0xB98A, 0xB98A, 0xB98A }, -{ 0xB98B, 0xB98B, 0xB98B }, -{ 0xB98C, 0xB98C, 0xB98C }, -{ 0xB98D, 0xB98D, 0xB98D }, -{ 0xB98E, 0xB98E, 0xB98E }, -{ 0xB98F, 0xB98F, 0xB98F }, -{ 0xB990, 0xB990, 0xB990 }, -{ 0xB991, 0xB991, 0xB991 }, -{ 0xB992, 0xB992, 0xB992 }, -{ 0xB993, 0xB993, 0xB993 }, -{ 0xB994, 0xB994, 0xB994 }, -{ 0xB995, 0xB995, 0xB995 }, -{ 0xB996, 0xB996, 0xB996 }, -{ 0xB997, 0xB997, 0xB997 }, -{ 0xB998, 0xB998, 0xB998 }, -{ 0xB999, 0xB999, 0xB999 }, -{ 0xB99A, 0xB99A, 0xB99A }, -{ 0xB99B, 0xB99B, 0xB99B }, -{ 0xB99C, 0xB99C, 0xB99C }, -{ 0xB99D, 0xB99D, 0xB99D }, -{ 0xB99E, 0xB99E, 0xB99E }, -{ 0xB99F, 0xB99F, 0xB99F }, -{ 0xB9A0, 0xB9A0, 0xB9A0 }, -{ 0xB9A1, 0xB9A1, 0xB9A1 }, -{ 0xB9A2, 0xB9A2, 0xB9A2 }, -{ 0xB9A3, 0xB9A3, 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xC00F, 0xC00F }, -{ 0xC010, 0xC010, 0xC010 }, -{ 0xC011, 0xC011, 0xC011 }, -{ 0xC012, 0xC012, 0xC012 }, -{ 0xC013, 0xC013, 0xC013 }, -{ 0xC014, 0xC014, 0xC014 }, -{ 0xC015, 0xC015, 0xC015 }, -{ 0xC016, 0xC016, 0xC016 }, -{ 0xC017, 0xC017, 0xC017 }, -{ 0xC018, 0xC018, 0xC018 }, -{ 0xC019, 0xC019, 0xC019 }, -{ 0xC01A, 0xC01A, 0xC01A }, -{ 0xC01B, 0xC01B, 0xC01B }, -{ 0xC01C, 0xC01C, 0xC01C }, -{ 0xC01D, 0xC01D, 0xC01D }, -{ 0xC01E, 0xC01E, 0xC01E }, -{ 0xC01F, 0xC01F, 0xC01F }, -{ 0xC020, 0xC020, 0xC020 }, -{ 0xC021, 0xC021, 0xC021 }, -{ 0xC022, 0xC022, 0xC022 }, -{ 0xC023, 0xC023, 0xC023 }, -{ 0xC024, 0xC024, 0xC024 }, -{ 0xC025, 0xC025, 0xC025 }, -{ 0xC026, 0xC026, 0xC026 }, -{ 0xC027, 0xC027, 0xC027 }, -{ 0xC028, 0xC028, 0xC028 }, -{ 0xC029, 0xC029, 0xC029 }, -{ 0xC02A, 0xC02A, 0xC02A }, -{ 0xC02B, 0xC02B, 0xC02B }, -{ 0xC02C, 0xC02C, 0xC02C }, -{ 0xC02D, 0xC02D, 0xC02D }, -{ 0xC02E, 0xC02E, 0xC02E }, -{ 0xC02F, 0xC02F, 0xC02F }, -{ 0xC030, 0xC030, 0xC030 }, -{ 0xC031, 0xC031, 0xC031 }, -{ 0xC032, 0xC032, 0xC032 }, -{ 0xC033, 0xC033, 0xC033 }, -{ 0xC034, 0xC034, 0xC034 }, -{ 0xC035, 0xC035, 0xC035 }, -{ 0xC036, 0xC036, 0xC036 }, -{ 0xC037, 0xC037, 0xC037 }, -{ 0xC038, 0xC038, 0xC038 }, -{ 0xC039, 0xC039, 0xC039 }, -{ 0xC03A, 0xC03A, 0xC03A }, -{ 0xC03B, 0xC03B, 0xC03B }, -{ 0xC03C, 0xC03C, 0xC03C }, -{ 0xC03D, 0xC03D, 0xC03D }, -{ 0xC03E, 0xC03E, 0xC03E }, -{ 0xC03F, 0xC03F, 0xC03F }, -{ 0xC040, 0xC040, 0xC040 }, -{ 0xC041, 0xC041, 0xC041 }, -{ 0xC042, 0xC042, 0xC042 }, -{ 0xC043, 0xC043, 0xC043 }, -{ 0xC044, 0xC044, 0xC044 }, -{ 0xC045, 0xC045, 0xC045 }, -{ 0xC046, 0xC046, 0xC046 }, -{ 0xC047, 0xC047, 0xC047 }, -{ 0xC048, 0xC048, 0xC048 }, -{ 0xC049, 0xC049, 0xC049 }, -{ 0xC04A, 0xC04A, 0xC04A }, -{ 0xC04B, 0xC04B, 0xC04B }, -{ 0xC04C, 0xC04C, 0xC04C }, -{ 0xC04D, 0xC04D, 0xC04D }, -{ 0xC04E, 0xC04E, 0xC04E }, -{ 0xC04F, 0xC04F, 0xC04F }, -{ 0xC050, 0xC050, 0xC050 }, -{ 0xC051, 0xC051, 0xC051 }, -{ 0xC052, 0xC052, 0xC052 }, -{ 0xC053, 0xC053, 0xC053 }, -{ 0xC054, 0xC054, 0xC054 }, -{ 0xC055, 0xC055, 0xC055 }, -{ 0xC056, 0xC056, 0xC056 }, -{ 0xC057, 0xC057, 0xC057 }, -{ 0xC058, 0xC058, 0xC058 }, -{ 0xC059, 0xC059, 0xC059 }, -{ 0xC05A, 0xC05A, 0xC05A }, -{ 0xC05B, 0xC05B, 0xC05B }, -{ 0xC05C, 0xC05C, 0xC05C }, -{ 0xC05D, 0xC05D, 0xC05D }, -{ 0xC05E, 0xC05E, 0xC05E }, -{ 0xC05F, 0xC05F, 0xC05F }, -{ 0xC060, 0xC060, 0xC060 }, -{ 0xC061, 0xC061, 0xC061 }, -{ 0xC062, 0xC062, 0xC062 }, -{ 0xC063, 0xC063, 0xC063 }, -{ 0xC064, 0xC064, 0xC064 }, -{ 0xC065, 0xC065, 0xC065 }, -{ 0xC066, 0xC066, 0xC066 }, -{ 0xC067, 0xC067, 0xC067 }, -{ 0xC068, 0xC068, 0xC068 }, -{ 0xC069, 0xC069, 0xC069 }, -{ 0xC06A, 0xC06A, 0xC06A }, -{ 0xC06B, 0xC06B, 0xC06B }, -{ 0xC06C, 0xC06C, 0xC06C }, -{ 0xC06D, 0xC06D, 0xC06D }, -{ 0xC06E, 0xC06E, 0xC06E }, -{ 0xC06F, 0xC06F, 0xC06F }, -{ 0xC070, 0xC070, 0xC070 }, -{ 0xC071, 0xC071, 0xC071 }, -{ 0xC072, 0xC072, 0xC072 }, -{ 0xC073, 0xC073, 0xC073 }, -{ 0xC074, 0xC074, 0xC074 }, -{ 0xC075, 0xC075, 0xC075 }, -{ 0xC076, 0xC076, 0xC076 }, -{ 0xC077, 0xC077, 0xC077 }, -{ 0xC078, 0xC078, 0xC078 }, -{ 0xC079, 0xC079, 0xC079 }, -{ 0xC07A, 0xC07A, 0xC07A }, -{ 0xC07B, 0xC07B, 0xC07B }, -{ 0xC07C, 0xC07C, 0xC07C }, -{ 0xC07D, 0xC07D, 0xC07D }, -{ 0xC07E, 0xC07E, 0xC07E }, -{ 0xC07F, 0xC07F, 0xC07F }, -{ 0xC080, 0xC080, 0xC080 }, -{ 0xC081, 0xC081, 0xC081 }, -{ 0xC082, 0xC082, 0xC082 }, -{ 0xC083, 0xC083, 0xC083 }, -{ 0xC084, 0xC084, 0xC084 }, -{ 0xC085, 0xC085, 0xC085 }, -{ 0xC086, 0xC086, 0xC086 }, -{ 0xC087, 0xC087, 0xC087 }, -{ 0xC088, 0xC088, 0xC088 }, -{ 0xC089, 0xC089, 0xC089 }, -{ 0xC08A, 0xC08A, 0xC08A }, -{ 0xC08B, 0xC08B, 0xC08B }, -{ 0xC08C, 0xC08C, 0xC08C }, -{ 0xC08D, 0xC08D, 0xC08D }, -{ 0xC08E, 0xC08E, 0xC08E }, -{ 0xC08F, 0xC08F, 0xC08F }, -{ 0xC090, 0xC090, 0xC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 0xC0FE }, -{ 0xC0FF, 0xC0FF, 0xC0FF }, -{ 0xC100, 0xC100, 0xC100 }, -{ 0xC101, 0xC101, 0xC101 }, -{ 0xC102, 0xC102, 0xC102 }, -{ 0xC103, 0xC103, 0xC103 }, -{ 0xC104, 0xC104, 0xC104 }, -{ 0xC105, 0xC105, 0xC105 }, -{ 0xC106, 0xC106, 0xC106 }, -{ 0xC107, 0xC107, 0xC107 }, -{ 0xC108, 0xC108, 0xC108 }, -{ 0xC109, 0xC109, 0xC109 }, -{ 0xC10A, 0xC10A, 0xC10A }, -{ 0xC10B, 0xC10B, 0xC10B }, -{ 0xC10C, 0xC10C, 0xC10C }, -{ 0xC10D, 0xC10D, 0xC10D }, -{ 0xC10E, 0xC10E, 0xC10E }, -{ 0xC10F, 0xC10F, 0xC10F }, -{ 0xC110, 0xC110, 0xC110 }, -{ 0xC111, 0xC111, 0xC111 }, -{ 0xC112, 0xC112, 0xC112 }, -{ 0xC113, 0xC113, 0xC113 }, -{ 0xC114, 0xC114, 0xC114 }, -{ 0xC115, 0xC115, 0xC115 }, -{ 0xC116, 0xC116, 0xC116 }, -{ 0xC117, 0xC117, 0xC117 }, -{ 0xC118, 0xC118, 0xC118 }, -{ 0xC119, 0xC119, 0xC119 }, -{ 0xC11A, 0xC11A, 0xC11A }, -{ 0xC11B, 0xC11B, 0xC11B }, -{ 0xC11C, 0xC11C, 0xC11C }, -{ 0xC11D, 0xC11D, 0xC11D }, -{ 0xC11E, 0xC11E, 0xC11E }, -{ 0xC11F, 0xC11F, 0xC11F }, -{ 0xC120, 0xC120, 0xC120 }, -{ 0xC121, 0xC121, 0xC121 }, -{ 0xC122, 0xC122, 0xC122 }, -{ 0xC123, 0xC123, 0xC123 }, -{ 0xC124, 0xC124, 0xC124 }, -{ 0xC125, 0xC125, 0xC125 }, -{ 0xC126, 0xC126, 0xC126 }, -{ 0xC127, 0xC127, 0xC127 }, -{ 0xC128, 0xC128, 0xC128 }, -{ 0xC129, 0xC129, 0xC129 }, -{ 0xC12A, 0xC12A, 0xC12A }, -{ 0xC12B, 0xC12B, 0xC12B }, -{ 0xC12C, 0xC12C, 0xC12C }, -{ 0xC12D, 0xC12D, 0xC12D }, -{ 0xC12E, 0xC12E, 0xC12E }, -{ 0xC12F, 0xC12F, 0xC12F }, -{ 0xC130, 0xC130, 0xC130 }, -{ 0xC131, 0xC131, 0xC131 }, -{ 0xC132, 0xC132, 0xC132 }, -{ 0xC133, 0xC133, 0xC133 }, -{ 0xC134, 0xC134, 0xC134 }, -{ 0xC135, 0xC135, 0xC135 }, -{ 0xC136, 0xC136, 0xC136 }, -{ 0xC137, 0xC137, 0xC137 }, -{ 0xC138, 0xC138, 0xC138 }, -{ 0xC139, 0xC139, 0xC139 }, -{ 0xC13A, 0xC13A, 0xC13A }, -{ 0xC13B, 0xC13B, 0xC13B }, -{ 0xC13C, 0xC13C, 0xC13C }, -{ 0xC13D, 0xC13D, 0xC13D }, -{ 0xC13E, 0xC13E, 0xC13E }, -{ 0xC13F, 0xC13F, 0xC13F }, -{ 0xC140, 0xC140, 0xC140 }, -{ 0xC141, 0xC141, 0xC141 }, -{ 0xC142, 0xC142, 0xC142 }, -{ 0xC143, 0xC143, 0xC143 }, -{ 0xC144, 0xC144, 0xC144 }, -{ 0xC145, 0xC145, 0xC145 }, -{ 0xC146, 0xC146, 0xC146 }, -{ 0xC147, 0xC147, 0xC147 }, -{ 0xC148, 0xC148, 0xC148 }, -{ 0xC149, 0xC149, 0xC149 }, -{ 0xC14A, 0xC14A, 0xC14A }, -{ 0xC14B, 0xC14B, 0xC14B }, -{ 0xC14C, 0xC14C, 0xC14C }, -{ 0xC14D, 0xC14D, 0xC14D }, -{ 0xC14E, 0xC14E, 0xC14E }, -{ 0xC14F, 0xC14F, 0xC14F }, -{ 0xC150, 0xC150, 0xC150 }, -{ 0xC151, 0xC151, 0xC151 }, -{ 0xC152, 0xC152, 0xC152 }, -{ 0xC153, 0xC153, 0xC153 }, -{ 0xC154, 0xC154, 0xC154 }, -{ 0xC155, 0xC155, 0xC155 }, -{ 0xC156, 0xC156, 0xC156 }, -{ 0xC157, 0xC157, 0xC157 }, -{ 0xC158, 0xC158, 0xC158 }, -{ 0xC159, 0xC159, 0xC159 }, -{ 0xC15A, 0xC15A, 0xC15A }, -{ 0xC15B, 0xC15B, 0xC15B }, -{ 0xC15C, 0xC15C, 0xC15C }, -{ 0xC15D, 0xC15D, 0xC15D }, -{ 0xC15E, 0xC15E, 0xC15E }, -{ 0xC15F, 0xC15F, 0xC15F }, -{ 0xC160, 0xC160, 0xC160 }, -{ 0xC161, 0xC161, 0xC161 }, -{ 0xC162, 0xC162, 0xC162 }, -{ 0xC163, 0xC163, 0xC163 }, -{ 0xC164, 0xC164, 0xC164 }, -{ 0xC165, 0xC165, 0xC165 }, -{ 0xC166, 0xC166, 0xC166 }, -{ 0xC167, 0xC167, 0xC167 }, -{ 0xC168, 0xC168, 0xC168 }, -{ 0xC169, 0xC169, 0xC169 }, -{ 0xC16A, 0xC16A, 0xC16A }, -{ 0xC16B, 0xC16B, 0xC16B }, -{ 0xC16C, 0xC16C, 0xC16C }, -{ 0xC16D, 0xC16D, 0xC16D }, -{ 0xC16E, 0xC16E, 0xC16E }, -{ 0xC16F, 0xC16F, 0xC16F }, -{ 0xC170, 0xC170, 0xC170 }, -{ 0xC171, 0xC171, 0xC171 }, -{ 0xC172, 0xC172, 0xC172 }, -{ 0xC173, 0xC173, 0xC173 }, -{ 0xC174, 0xC174, 0xC174 }, -{ 0xC175, 0xC175, 0xC175 }, -{ 0xC176, 0xC176, 0xC176 }, -{ 0xC177, 0xC177, 0xC177 }, -{ 0xC178, 0xC178, 0xC178 }, -{ 0xC179, 0xC179, 0xC179 }, -{ 0xC17A, 0xC17A, 0xC17A }, -{ 0xC17B, 0xC17B, 0xC17B }, -{ 0xC17C, 0xC17C, 0xC17C }, -{ 0xC17D, 0xC17D, 0xC17D }, -{ 0xC17E, 0xC17E, 0xC17E }, -{ 0xC17F, 0xC17F, 0xC17F }, -{ 0xC180, 0xC180, 0xC180 }, -{ 0xC181, 0xC181, 0xC181 }, -{ 0xC182, 0xC182, 0xC182 }, -{ 0xC183, 0xC183, 0xC183 }, -{ 0xC184, 0xC184, 0xC184 }, -{ 0xC185, 0xC185, 0xC185 }, -{ 0xC186, 0xC186, 0xC186 }, -{ 0xC187, 0xC187, 0xC187 }, -{ 0xC188, 0xC188, 0xC188 }, -{ 0xC189, 0xC189, 0xC189 }, -{ 0xC18A, 0xC18A, 0xC18A }, -{ 0xC18B, 0xC18B, 0xC18B }, -{ 0xC18C, 0xC18C, 0xC18C }, -{ 0xC18D, 0xC18D, 0xC18D }, -{ 0xC18E, 0xC18E, 0xC18E }, -{ 0xC18F, 0xC18F, 0xC18F }, -{ 0xC190, 0xC190, 0xC190 }, -{ 0xC191, 0xC191, 0xC191 }, -{ 0xC192, 0xC192, 0xC192 }, -{ 0xC193, 0xC193, 0xC193 }, -{ 0xC194, 0xC194, 0xC194 }, -{ 0xC195, 0xC195, 0xC195 }, -{ 0xC196, 0xC196, 0xC196 }, -{ 0xC197, 0xC197, 0xC197 }, -{ 0xC198, 0xC198, 0xC198 }, -{ 0xC199, 0xC199, 0xC199 }, -{ 0xC19A, 0xC19A, 0xC19A }, -{ 0xC19B, 0xC19B, 0xC19B }, -{ 0xC19C, 0xC19C, 0xC19C }, -{ 0xC19D, 0xC19D, 0xC19D }, -{ 0xC19E, 0xC19E, 0xC19E }, -{ 0xC19F, 0xC19F, 0xC19F }, -{ 0xC1A0, 0xC1A0, 0xC1A0 }, -{ 0xC1A1, 0xC1A1, 0xC1A1 }, -{ 0xC1A2, 0xC1A2, 0xC1A2 }, -{ 0xC1A3, 0xC1A3, 0xC1A3 }, -{ 0xC1A4, 0xC1A4, 0xC1A4 }, -{ 0xC1A5, 0xC1A5, 0xC1A5 }, -{ 0xC1A6, 0xC1A6, 0xC1A6 }, -{ 0xC1A7, 0xC1A7, 0xC1A7 }, -{ 0xC1A8, 0xC1A8, 0xC1A8 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0, 0xC1F0 }, -{ 0xC1F1, 0xC1F1, 0xC1F1 }, -{ 0xC1F2, 0xC1F2, 0xC1F2 }, -{ 0xC1F3, 0xC1F3, 0xC1F3 }, -{ 0xC1F4, 0xC1F4, 0xC1F4 }, -{ 0xC1F5, 0xC1F5, 0xC1F5 }, -{ 0xC1F6, 0xC1F6, 0xC1F6 }, -{ 0xC1F7, 0xC1F7, 0xC1F7 }, -{ 0xC1F8, 0xC1F8, 0xC1F8 }, -{ 0xC1F9, 0xC1F9, 0xC1F9 }, -{ 0xC1FA, 0xC1FA, 0xC1FA }, -{ 0xC1FB, 0xC1FB, 0xC1FB }, -{ 0xC1FC, 0xC1FC, 0xC1FC }, -{ 0xC1FD, 0xC1FD, 0xC1FD }, -{ 0xC1FE, 0xC1FE, 0xC1FE }, -{ 0xC1FF, 0xC1FF, 0xC1FF }, -{ 0xC200, 0xC200, 0xC200 }, -{ 0xC201, 0xC201, 0xC201 }, -{ 0xC202, 0xC202, 0xC202 }, -{ 0xC203, 0xC203, 0xC203 }, -{ 0xC204, 0xC204, 0xC204 }, -{ 0xC205, 0xC205, 0xC205 }, -{ 0xC206, 0xC206, 0xC206 }, -{ 0xC207, 0xC207, 0xC207 }, -{ 0xC208, 0xC208, 0xC208 }, -{ 0xC209, 0xC209, 0xC209 }, -{ 0xC20A, 0xC20A, 0xC20A }, -{ 0xC20B, 0xC20B, 0xC20B }, -{ 0xC20C, 0xC20C, 0xC20C }, -{ 0xC20D, 0xC20D, 0xC20D }, -{ 0xC20E, 0xC20E, 0xC20E }, -{ 0xC20F, 0xC20F, 0xC20F }, -{ 0xC210, 0xC210, 0xC210 }, -{ 0xC211, 0xC211, 0xC211 }, -{ 0xC212, 0xC212, 0xC212 }, -{ 0xC213, 0xC213, 0xC213 }, -{ 0xC214, 0xC214, 0xC214 }, -{ 0xC215, 0xC215, 0xC215 }, -{ 0xC216, 0xC216, 0xC216 }, -{ 0xC217, 0xC217, 0xC217 }, -{ 0xC218, 0xC218, 0xC218 }, -{ 0xC219, 0xC219, 0xC219 }, -{ 0xC21A, 0xC21A, 0xC21A }, -{ 0xC21B, 0xC21B, 0xC21B }, -{ 0xC21C, 0xC21C, 0xC21C }, -{ 0xC21D, 0xC21D, 0xC21D }, -{ 0xC21E, 0xC21E, 0xC21E }, -{ 0xC21F, 0xC21F, 0xC21F }, -{ 0xC220, 0xC220, 0xC220 }, -{ 0xC221, 0xC221, 0xC221 }, -{ 0xC222, 0xC222, 0xC222 }, -{ 0xC223, 0xC223, 0xC223 }, -{ 0xC224, 0xC224, 0xC224 }, -{ 0xC225, 0xC225, 0xC225 }, -{ 0xC226, 0xC226, 0xC226 }, -{ 0xC227, 0xC227, 0xC227 }, -{ 0xC228, 0xC228, 0xC228 }, -{ 0xC229, 0xC229, 0xC229 }, -{ 0xC22A, 0xC22A, 0xC22A }, -{ 0xC22B, 0xC22B, 0xC22B }, -{ 0xC22C, 0xC22C, 0xC22C }, -{ 0xC22D, 0xC22D, 0xC22D }, -{ 0xC22E, 0xC22E, 0xC22E }, -{ 0xC22F, 0xC22F, 0xC22F }, -{ 0xC230, 0xC230, 0xC230 }, -{ 0xC231, 0xC231, 0xC231 }, -{ 0xC232, 0xC232, 0xC232 }, -{ 0xC233, 0xC233, 0xC233 }, -{ 0xC234, 0xC234, 0xC234 }, -{ 0xC235, 0xC235, 0xC235 }, -{ 0xC236, 0xC236, 0xC236 }, -{ 0xC237, 0xC237, 0xC237 }, -{ 0xC238, 0xC238, 0xC238 }, -{ 0xC239, 0xC239, 0xC239 }, -{ 0xC23A, 0xC23A, 0xC23A }, -{ 0xC23B, 0xC23B, 0xC23B }, -{ 0xC23C, 0xC23C, 0xC23C }, -{ 0xC23D, 0xC23D, 0xC23D }, -{ 0xC23E, 0xC23E, 0xC23E }, -{ 0xC23F, 0xC23F, 0xC23F }, -{ 0xC240, 0xC240, 0xC240 }, -{ 0xC241, 0xC241, 0xC241 }, -{ 0xC242, 0xC242, 0xC242 }, -{ 0xC243, 0xC243, 0xC243 }, -{ 0xC244, 0xC244, 0xC244 }, -{ 0xC245, 0xC245, 0xC245 }, -{ 0xC246, 0xC246, 0xC246 }, -{ 0xC247, 0xC247, 0xC247 }, -{ 0xC248, 0xC248, 0xC248 }, -{ 0xC249, 0xC249, 0xC249 }, -{ 0xC24A, 0xC24A, 0xC24A }, -{ 0xC24B, 0xC24B, 0xC24B }, -{ 0xC24C, 0xC24C, 0xC24C }, -{ 0xC24D, 0xC24D, 0xC24D }, -{ 0xC24E, 0xC24E, 0xC24E }, -{ 0xC24F, 0xC24F, 0xC24F }, -{ 0xC250, 0xC250, 0xC250 }, -{ 0xC251, 0xC251, 0xC251 }, -{ 0xC252, 0xC252, 0xC252 }, -{ 0xC253, 0xC253, 0xC253 }, -{ 0xC254, 0xC254, 0xC254 }, -{ 0xC255, 0xC255, 0xC255 }, -{ 0xC256, 0xC256, 0xC256 }, -{ 0xC257, 0xC257, 0xC257 }, -{ 0xC258, 0xC258, 0xC258 }, -{ 0xC259, 0xC259, 0xC259 }, -{ 0xC25A, 0xC25A, 0xC25A }, -{ 0xC25B, 0xC25B, 0xC25B }, -{ 0xC25C, 0xC25C, 0xC25C }, -{ 0xC25D, 0xC25D, 0xC25D }, -{ 0xC25E, 0xC25E, 0xC25E }, -{ 0xC25F, 0xC25F, 0xC25F }, -{ 0xC260, 0xC260, 0xC260 }, -{ 0xC261, 0xC261, 0xC261 }, -{ 0xC262, 0xC262, 0xC262 }, -{ 0xC263, 0xC263, 0xC263 }, -{ 0xC264, 0xC264, 0xC264 }, -{ 0xC265, 0xC265, 0xC265 }, -{ 0xC266, 0xC266, 0xC266 }, -{ 0xC267, 0xC267, 0xC267 }, -{ 0xC268, 0xC268, 0xC268 }, -{ 0xC269, 0xC269, 0xC269 }, -{ 0xC26A, 0xC26A, 0xC26A }, -{ 0xC26B, 0xC26B, 0xC26B }, -{ 0xC26C, 0xC26C, 0xC26C }, -{ 0xC26D, 0xC26D, 0xC26D }, -{ 0xC26E, 0xC26E, 0xC26E }, -{ 0xC26F, 0xC26F, 0xC26F }, -{ 0xC270, 0xC270, 0xC270 }, -{ 0xC271, 0xC271, 0xC271 }, -{ 0xC272, 0xC272, 0xC272 }, -{ 0xC273, 0xC273, 0xC273 }, -{ 0xC274, 0xC274, 0xC274 }, -{ 0xC275, 0xC275, 0xC275 }, -{ 0xC276, 0xC276, 0xC276 }, -{ 0xC277, 0xC277, 0xC277 }, -{ 0xC278, 0xC278, 0xC278 }, -{ 0xC279, 0xC279, 0xC279 }, -{ 0xC27A, 0xC27A, 0xC27A }, -{ 0xC27B, 0xC27B, 0xC27B }, -{ 0xC27C, 0xC27C, 0xC27C }, -{ 0xC27D, 0xC27D, 0xC27D }, -{ 0xC27E, 0xC27E, 0xC27E }, -{ 0xC27F, 0xC27F, 0xC27F }, -{ 0xC280, 0xC280, 0xC280 }, -{ 0xC281, 0xC281, 0xC281 }, -{ 0xC282, 0xC282, 0xC282 }, -{ 0xC283, 0xC283, 0xC283 }, -{ 0xC284, 0xC284, 0xC284 }, -{ 0xC285, 0xC285, 0xC285 }, -{ 0xC286, 0xC286, 0xC286 }, -{ 0xC287, 0xC287, 0xC287 }, -{ 0xC288, 0xC288, 0xC288 }, -{ 0xC289, 0xC289, 0xC289 }, -{ 0xC28A, 0xC28A, 0xC28A }, -{ 0xC28B, 0xC28B, 0xC28B }, -{ 0xC28C, 0xC28C, 0xC28C }, -{ 0xC28D, 0xC28D, 0xC28D }, -{ 0xC28E, 0xC28E, 0xC28E }, -{ 0xC28F, 0xC28F, 0xC28F }, -{ 0xC290, 0xC290, 0xC290 }, -{ 0xC291, 0xC291, 0xC291 }, -{ 0xC292, 0xC292, 0xC292 }, -{ 0xC293, 0xC293, 0xC293 }, -{ 0xC294, 0xC294, 0xC294 }, -{ 0xC295, 0xC295, 0xC295 }, -{ 0xC296, 0xC296, 0xC296 }, -{ 0xC297, 0xC297, 0xC297 }, -{ 0xC298, 0xC298, 0xC298 }, -{ 0xC299, 0xC299, 0xC299 }, -{ 0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C307 }, -{ 0xC308, 0xC308, 0xC308 }, -{ 0xC309, 0xC309, 0xC309 }, -{ 0xC30A, 0xC30A, 0xC30A }, -{ 0xC30B, 0xC30B, 0xC30B }, -{ 0xC30C, 0xC30C, 0xC30C }, -{ 0xC30D, 0xC30D, 0xC30D }, -{ 0xC30E, 0xC30E, 0xC30E }, -{ 0xC30F, 0xC30F, 0xC30F }, -{ 0xC310, 0xC310, 0xC310 }, -{ 0xC311, 0xC311, 0xC311 }, -{ 0xC312, 0xC312, 0xC312 }, -{ 0xC313, 0xC313, 0xC313 }, -{ 0xC314, 0xC314, 0xC314 }, -{ 0xC315, 0xC315, 0xC315 }, -{ 0xC316, 0xC316, 0xC316 }, -{ 0xC317, 0xC317, 0xC317 }, -{ 0xC318, 0xC318, 0xC318 }, -{ 0xC319, 0xC319, 0xC319 }, -{ 0xC31A, 0xC31A, 0xC31A }, -{ 0xC31B, 0xC31B, 0xC31B }, -{ 0xC31C, 0xC31C, 0xC31C }, -{ 0xC31D, 0xC31D, 0xC31D }, -{ 0xC31E, 0xC31E, 0xC31E }, -{ 0xC31F, 0xC31F, 0xC31F }, -{ 0xC320, 0xC320, 0xC320 }, -{ 0xC321, 0xC321, 0xC321 }, -{ 0xC322, 0xC322, 0xC322 }, -{ 0xC323, 0xC323, 0xC323 }, -{ 0xC324, 0xC324, 0xC324 }, -{ 0xC325, 0xC325, 0xC325 }, -{ 0xC326, 0xC326, 0xC326 }, -{ 0xC327, 0xC327, 0xC327 }, -{ 0xC328, 0xC328, 0xC328 }, -{ 0xC329, 0xC329, 0xC329 }, -{ 0xC32A, 0xC32A, 0xC32A }, -{ 0xC32B, 0xC32B, 0xC32B }, -{ 0xC32C, 0xC32C, 0xC32C }, -{ 0xC32D, 0xC32D, 0xC32D }, -{ 0xC32E, 0xC32E, 0xC32E }, -{ 0xC32F, 0xC32F, 0xC32F }, -{ 0xC330, 0xC330, 0xC330 }, -{ 0xC331, 0xC331, 0xC331 }, -{ 0xC332, 0xC332, 0xC332 }, -{ 0xC333, 0xC333, 0xC333 }, -{ 0xC334, 0xC334, 0xC334 }, -{ 0xC335, 0xC335, 0xC335 }, -{ 0xC336, 0xC336, 0xC336 }, -{ 0xC337, 0xC337, 0xC337 }, -{ 0xC338, 0xC338, 0xC338 }, -{ 0xC339, 0xC339, 0xC339 }, -{ 0xC33A, 0xC33A, 0xC33A }, -{ 0xC33B, 0xC33B, 0xC33B }, -{ 0xC33C, 0xC33C, 0xC33C }, -{ 0xC33D, 0xC33D, 0xC33D }, -{ 0xC33E, 0xC33E, 0xC33E }, -{ 0xC33F, 0xC33F, 0xC33F }, -{ 0xC340, 0xC340, 0xC340 }, -{ 0xC341, 0xC341, 0xC341 }, -{ 0xC342, 0xC342, 0xC342 }, -{ 0xC343, 0xC343, 0xC343 }, -{ 0xC344, 0xC344, 0xC344 }, -{ 0xC345, 0xC345, 0xC345 }, -{ 0xC346, 0xC346, 0xC346 }, -{ 0xC347, 0xC347, 0xC347 }, -{ 0xC348, 0xC348, 0xC348 }, -{ 0xC349, 0xC349, 0xC349 }, -{ 0xC34A, 0xC34A, 0xC34A }, -{ 0xC34B, 0xC34B, 0xC34B }, -{ 0xC34C, 0xC34C, 0xC34C }, -{ 0xC34D, 0xC34D, 0xC34D }, -{ 0xC34E, 0xC34E, 0xC34E }, -{ 0xC34F, 0xC34F, 0xC34F }, -{ 0xC350, 0xC350, 0xC350 }, -{ 0xC351, 0xC351, 0xC351 }, -{ 0xC352, 0xC352, 0xC352 }, -{ 0xC353, 0xC353, 0xC353 }, -{ 0xC354, 0xC354, 0xC354 }, -{ 0xC355, 0xC355, 0xC355 }, -{ 0xC356, 0xC356, 0xC356 }, -{ 0xC357, 0xC357, 0xC357 }, -{ 0xC358, 0xC358, 0xC358 }, -{ 0xC359, 0xC359, 0xC359 }, -{ 0xC35A, 0xC35A, 0xC35A }, -{ 0xC35B, 0xC35B, 0xC35B }, -{ 0xC35C, 0xC35C, 0xC35C }, -{ 0xC35D, 0xC35D, 0xC35D }, -{ 0xC35E, 0xC35E, 0xC35E }, -{ 0xC35F, 0xC35F, 0xC35F }, -{ 0xC360, 0xC360, 0xC360 }, -{ 0xC361, 0xC361, 0xC361 }, -{ 0xC362, 0xC362, 0xC362 }, -{ 0xC363, 0xC363, 0xC363 }, -{ 0xC364, 0xC364, 0xC364 }, -{ 0xC365, 0xC365, 0xC365 }, -{ 0xC366, 0xC366, 0xC366 }, -{ 0xC367, 0xC367, 0xC367 }, -{ 0xC368, 0xC368, 0xC368 }, -{ 0xC369, 0xC369, 0xC369 }, -{ 0xC36A, 0xC36A, 0xC36A }, -{ 0xC36B, 0xC36B, 0xC36B }, -{ 0xC36C, 0xC36C, 0xC36C }, -{ 0xC36D, 0xC36D, 0xC36D }, -{ 0xC36E, 0xC36E, 0xC36E }, -{ 0xC36F, 0xC36F, 0xC36F }, -{ 0xC370, 0xC370, 0xC370 }, -{ 0xC371, 0xC371, 0xC371 }, -{ 0xC372, 0xC372, 0xC372 }, -{ 0xC373, 0xC373, 0xC373 }, -{ 0xC374, 0xC374, 0xC374 }, -{ 0xC375, 0xC375, 0xC375 }, -{ 0xC376, 0xC376, 0xC376 }, -{ 0xC377, 0xC377, 0xC377 }, -{ 0xC378, 0xC378, 0xC378 }, -{ 0xC379, 0xC379, 0xC379 }, -{ 0xC37A, 0xC37A, 0xC37A }, -{ 0xC37B, 0xC37B, 0xC37B }, -{ 0xC37C, 0xC37C, 0xC37C }, -{ 0xC37D, 0xC37D, 0xC37D }, -{ 0xC37E, 0xC37E, 0xC37E }, -{ 0xC37F, 0xC37F, 0xC37F }, -{ 0xC380, 0xC380, 0xC380 }, -{ 0xC381, 0xC381, 0xC381 }, -{ 0xC382, 0xC382, 0xC382 }, -{ 0xC383, 0xC383, 0xC383 }, -{ 0xC384, 0xC384, 0xC384 }, -{ 0xC385, 0xC385, 0xC385 }, -{ 0xC386, 0xC386, 0xC386 }, -{ 0xC387, 0xC387, 0xC387 }, -{ 0xC388, 0xC388, 0xC388 }, -{ 0xC389, 0xC389, 0xC389 }, -{ 0xC38A, 0xC38A, 0xC38A }, -{ 0xC38B, 0xC38B, 0xC38B }, -{ 0xC38C, 0xC38C, 0xC38C }, -{ 0xC38D, 0xC38D, 0xC38D }, -{ 0xC38E, 0xC38E, 0xC38E }, -{ 0xC38F, 0xC38F, 0xC38F }, -{ 0xC390, 0xC390, 0xC390 }, -{ 0xC391, 0xC391, 0xC391 }, -{ 0xC392, 0xC392, 0xC392 }, -{ 0xC393, 0xC393, 0xC393 }, -{ 0xC394, 0xC394, 0xC394 }, -{ 0xC395, 0xC395, 0xC395 }, -{ 0xC396, 0xC396, 0xC396 }, -{ 0xC397, 0xC397, 0xC397 }, -{ 0xC398, 0xC398, 0xC398 }, -{ 0xC399, 0xC399, 0xC399 }, -{ 0xC39A, 0xC39A, 0xC39A }, -{ 0xC39B, 0xC39B, 0xC39B }, -{ 0xC39C, 0xC39C, 0xC39C }, -{ 0xC39D, 0xC39D, 0xC39D }, -{ 0xC39E, 0xC39E, 0xC39E }, -{ 0xC39F, 0xC39F, 0xC39F }, -{ 0xC3A0, 0xC3A0, 0xC3A0 }, -{ 0xC3A1, 0xC3A1, 0xC3A1 }, -{ 0xC3A2, 0xC3A2, 0xC3A2 }, -{ 0xC3A3, 0xC3A3, 0xC3A3 }, -{ 0xC3A4, 0xC3A4, 0xC3A4 }, -{ 0xC3A5, 0xC3A5, 0xC3A5 }, -{ 0xC3A6, 0xC3A6, 0xC3A6 }, -{ 0xC3A7, 0xC3A7, 0xC3A7 }, -{ 0xC3A8, 0xC3A8, 0xC3A8 }, -{ 0xC3A9, 0xC3A9, 0xC3A9 }, -{ 0xC3AA, 0xC3AA, 0xC3AA }, -{ 0xC3AB, 0xC3AB, 0xC3AB }, -{ 0xC3AC, 0xC3AC, 0xC3AC }, -{ 0xC3AD, 0xC3AD, 0xC3AD }, -{ 0xC3AE, 0xC3AE, 0xC3AE }, -{ 0xC3AF, 0xC3AF, 0xC3AF }, -{ 0xC3B0, 0xC3B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{ 0xC3F8, 0xC3F8, 0xC3F8 }, -{ 0xC3F9, 0xC3F9, 0xC3F9 }, -{ 0xC3FA, 0xC3FA, 0xC3FA }, -{ 0xC3FB, 0xC3FB, 0xC3FB }, -{ 0xC3FC, 0xC3FC, 0xC3FC }, -{ 0xC3FD, 0xC3FD, 0xC3FD }, -{ 0xC3FE, 0xC3FE, 0xC3FE }, -{ 0xC3FF, 0xC3FF, 0xC3FF }, -{ 0xC400, 0xC400, 0xC400 }, -{ 0xC401, 0xC401, 0xC401 }, -{ 0xC402, 0xC402, 0xC402 }, -{ 0xC403, 0xC403, 0xC403 }, -{ 0xC404, 0xC404, 0xC404 }, -{ 0xC405, 0xC405, 0xC405 }, -{ 0xC406, 0xC406, 0xC406 }, -{ 0xC407, 0xC407, 0xC407 }, -{ 0xC408, 0xC408, 0xC408 }, -{ 0xC409, 0xC409, 0xC409 }, -{ 0xC40A, 0xC40A, 0xC40A }, -{ 0xC40B, 0xC40B, 0xC40B }, -{ 0xC40C, 0xC40C, 0xC40C }, -{ 0xC40D, 0xC40D, 0xC40D }, -{ 0xC40E, 0xC40E, 0xC40E }, -{ 0xC40F, 0xC40F, 0xC40F }, -{ 0xC410, 0xC410, 0xC410 }, -{ 0xC411, 0xC411, 0xC411 }, -{ 0xC412, 0xC412, 0xC412 }, -{ 0xC413, 0xC413, 0xC413 }, -{ 0xC414, 0xC414, 0xC414 }, -{ 0xC415, 0xC415, 0xC415 }, -{ 0xC416, 0xC416, 0xC416 }, -{ 0xC417, 0xC417, 0xC417 }, -{ 0xC418, 0xC418, 0xC418 }, -{ 0xC419, 0xC419, 0xC419 }, -{ 0xC41A, 0xC41A, 0xC41A }, -{ 0xC41B, 0xC41B, 0xC41B }, -{ 0xC41C, 0xC41C, 0xC41C }, -{ 0xC41D, 0xC41D, 0xC41D }, -{ 0xC41E, 0xC41E, 0xC41E }, -{ 0xC41F, 0xC41F, 0xC41F }, -{ 0xC420, 0xC420, 0xC420 }, -{ 0xC421, 0xC421, 0xC421 }, -{ 0xC422, 0xC422, 0xC422 }, -{ 0xC423, 0xC423, 0xC423 }, -{ 0xC424, 0xC424, 0xC424 }, -{ 0xC425, 0xC425, 0xC425 }, -{ 0xC426, 0xC426, 0xC426 }, -{ 0xC427, 0xC427, 0xC427 }, -{ 0xC428, 0xC428, 0xC428 }, -{ 0xC429, 0xC429, 0xC429 }, -{ 0xC42A, 0xC42A, 0xC42A }, -{ 0xC42B, 0xC42B, 0xC42B }, -{ 0xC42C, 0xC42C, 0xC42C }, -{ 0xC42D, 0xC42D, 0xC42D }, -{ 0xC42E, 0xC42E, 0xC42E }, -{ 0xC42F, 0xC42F, 0xC42F }, -{ 0xC430, 0xC430, 0xC430 }, -{ 0xC431, 0xC431, 0xC431 }, -{ 0xC432, 0xC432, 0xC432 }, -{ 0xC433, 0xC433, 0xC433 }, -{ 0xC434, 0xC434, 0xC434 }, -{ 0xC435, 0xC435, 0xC435 }, -{ 0xC436, 0xC436, 0xC436 }, -{ 0xC437, 0xC437, 0xC437 }, -{ 0xC438, 0xC438, 0xC438 }, -{ 0xC439, 0xC439, 0xC439 }, -{ 0xC43A, 0xC43A, 0xC43A }, -{ 0xC43B, 0xC43B, 0xC43B }, -{ 0xC43C, 0xC43C, 0xC43C }, -{ 0xC43D, 0xC43D, 0xC43D }, -{ 0xC43E, 0xC43E, 0xC43E }, -{ 0xC43F, 0xC43F, 0xC43F }, -{ 0xC440, 0xC440, 0xC440 }, -{ 0xC441, 0xC441, 0xC441 }, -{ 0xC442, 0xC442, 0xC442 }, -{ 0xC443, 0xC443, 0xC443 }, -{ 0xC444, 0xC444, 0xC444 }, -{ 0xC445, 0xC445, 0xC445 }, -{ 0xC446, 0xC446, 0xC446 }, -{ 0xC447, 0xC447, 0xC447 }, -{ 0xC448, 0xC448, 0xC448 }, -{ 0xC449, 0xC449, 0xC449 }, -{ 0xC44A, 0xC44A, 0xC44A }, -{ 0xC44B, 0xC44B, 0xC44B }, -{ 0xC44C, 0xC44C, 0xC44C }, -{ 0xC44D, 0xC44D, 0xC44D }, -{ 0xC44E, 0xC44E, 0xC44E }, -{ 0xC44F, 0xC44F, 0xC44F }, -{ 0xC450, 0xC450, 0xC450 }, -{ 0xC451, 0xC451, 0xC451 }, -{ 0xC452, 0xC452, 0xC452 }, -{ 0xC453, 0xC453, 0xC453 }, -{ 0xC454, 0xC454, 0xC454 }, -{ 0xC455, 0xC455, 0xC455 }, -{ 0xC456, 0xC456, 0xC456 }, -{ 0xC457, 0xC457, 0xC457 }, -{ 0xC458, 0xC458, 0xC458 }, -{ 0xC459, 0xC459, 0xC459 }, -{ 0xC45A, 0xC45A, 0xC45A }, -{ 0xC45B, 0xC45B, 0xC45B }, -{ 0xC45C, 0xC45C, 0xC45C }, -{ 0xC45D, 0xC45D, 0xC45D }, -{ 0xC45E, 0xC45E, 0xC45E }, -{ 0xC45F, 0xC45F, 0xC45F }, -{ 0xC460, 0xC460, 0xC460 }, -{ 0xC461, 0xC461, 0xC461 }, -{ 0xC462, 0xC462, 0xC462 }, -{ 0xC463, 0xC463, 0xC463 }, -{ 0xC464, 0xC464, 0xC464 }, -{ 0xC465, 0xC465, 0xC465 }, -{ 0xC466, 0xC466, 0xC466 }, -{ 0xC467, 0xC467, 0xC467 }, -{ 0xC468, 0xC468, 0xC468 }, -{ 0xC469, 0xC469, 0xC469 }, -{ 0xC46A, 0xC46A, 0xC46A }, -{ 0xC46B, 0xC46B, 0xC46B }, -{ 0xC46C, 0xC46C, 0xC46C }, -{ 0xC46D, 0xC46D, 0xC46D }, -{ 0xC46E, 0xC46E, 0xC46E }, -{ 0xC46F, 0xC46F, 0xC46F }, -{ 0xC470, 0xC470, 0xC470 }, -{ 0xC471, 0xC471, 0xC471 }, -{ 0xC472, 0xC472, 0xC472 }, -{ 0xC473, 0xC473, 0xC473 }, -{ 0xC474, 0xC474, 0xC474 }, -{ 0xC475, 0xC475, 0xC475 }, -{ 0xC476, 0xC476, 0xC476 }, -{ 0xC477, 0xC477, 0xC477 }, -{ 0xC478, 0xC478, 0xC478 }, -{ 0xC479, 0xC479, 0xC479 }, -{ 0xC47A, 0xC47A, 0xC47A }, -{ 0xC47B, 0xC47B, 0xC47B }, -{ 0xC47C, 0xC47C, 0xC47C }, -{ 0xC47D, 0xC47D, 0xC47D }, -{ 0xC47E, 0xC47E, 0xC47E }, -{ 0xC47F, 0xC47F, 0xC47F }, -{ 0xC480, 0xC480, 0xC480 }, -{ 0xC481, 0xC481, 0xC481 }, -{ 0xC482, 0xC482, 0xC482 }, -{ 0xC483, 0xC483, 0xC483 }, -{ 0xC484, 0xC484, 0xC484 }, -{ 0xC485, 0xC485, 0xC485 }, -{ 0xC486, 0xC486, 0xC486 }, -{ 0xC487, 0xC487, 0xC487 }, -{ 0xC488, 0xC488, 0xC488 }, -{ 0xC489, 0xC489, 0xC489 }, -{ 0xC48A, 0xC48A, 0xC48A }, -{ 0xC48B, 0xC48B, 0xC48B }, -{ 0xC48C, 0xC48C, 0xC48C }, -{ 0xC48D, 0xC48D, 0xC48D }, -{ 0xC48E, 0xC48E, 0xC48E }, -{ 0xC48F, 0xC48F, 0xC48F }, -{ 0xC490, 0xC490, 0xC490 }, -{ 0xC491, 0xC491, 0xC491 }, -{ 0xC492, 0xC492, 0xC492 }, -{ 0xC493, 0xC493, 0xC493 }, -{ 0xC494, 0xC494, 0xC494 }, -{ 0xC495, 0xC495, 0xC495 }, -{ 0xC496, 0xC496, 0xC496 }, -{ 0xC497, 0xC497, 0xC497 }, -{ 0xC498, 0xC498, 0xC498 }, -{ 0xC499, 0xC499, 0xC499 }, -{ 0xC49A, 0xC49A, 0xC49A }, -{ 0xC49B, 0xC49B, 0xC49B }, -{ 0xC49C, 0xC49C, 0xC49C }, -{ 0xC49D, 0xC49D, 0xC49D }, -{ 0xC49E, 0xC49E, 0xC49E }, -{ 0xC49F, 0xC49F, 0xC49F }, -{ 0xC4A0, 0xC4A0, 0xC4A0 }, -{ 0xC4A1, 0xC4A1, 0xC4A1 }, -{ 0xC4A2, 0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 0xC510 }, -{ 0xC511, 0xC511, 0xC511 }, -{ 0xC512, 0xC512, 0xC512 }, -{ 0xC513, 0xC513, 0xC513 }, -{ 0xC514, 0xC514, 0xC514 }, -{ 0xC515, 0xC515, 0xC515 }, -{ 0xC516, 0xC516, 0xC516 }, -{ 0xC517, 0xC517, 0xC517 }, -{ 0xC518, 0xC518, 0xC518 }, -{ 0xC519, 0xC519, 0xC519 }, -{ 0xC51A, 0xC51A, 0xC51A }, -{ 0xC51B, 0xC51B, 0xC51B }, -{ 0xC51C, 0xC51C, 0xC51C }, -{ 0xC51D, 0xC51D, 0xC51D }, -{ 0xC51E, 0xC51E, 0xC51E }, -{ 0xC51F, 0xC51F, 0xC51F }, -{ 0xC520, 0xC520, 0xC520 }, -{ 0xC521, 0xC521, 0xC521 }, -{ 0xC522, 0xC522, 0xC522 }, -{ 0xC523, 0xC523, 0xC523 }, -{ 0xC524, 0xC524, 0xC524 }, -{ 0xC525, 0xC525, 0xC525 }, -{ 0xC526, 0xC526, 0xC526 }, -{ 0xC527, 0xC527, 0xC527 }, -{ 0xC528, 0xC528, 0xC528 }, -{ 0xC529, 0xC529, 0xC529 }, -{ 0xC52A, 0xC52A, 0xC52A }, -{ 0xC52B, 0xC52B, 0xC52B }, -{ 0xC52C, 0xC52C, 0xC52C }, -{ 0xC52D, 0xC52D, 0xC52D }, -{ 0xC52E, 0xC52E, 0xC52E }, -{ 0xC52F, 0xC52F, 0xC52F }, -{ 0xC530, 0xC530, 0xC530 }, -{ 0xC531, 0xC531, 0xC531 }, -{ 0xC532, 0xC532, 0xC532 }, -{ 0xC533, 0xC533, 0xC533 }, -{ 0xC534, 0xC534, 0xC534 }, -{ 0xC535, 0xC535, 0xC535 }, -{ 0xC536, 0xC536, 0xC536 }, -{ 0xC537, 0xC537, 0xC537 }, -{ 0xC538, 0xC538, 0xC538 }, -{ 0xC539, 0xC539, 0xC539 }, -{ 0xC53A, 0xC53A, 0xC53A }, -{ 0xC53B, 0xC53B, 0xC53B }, -{ 0xC53C, 0xC53C, 0xC53C }, -{ 0xC53D, 0xC53D, 0xC53D }, -{ 0xC53E, 0xC53E, 0xC53E }, -{ 0xC53F, 0xC53F, 0xC53F }, -{ 0xC540, 0xC540, 0xC540 }, -{ 0xC541, 0xC541, 0xC541 }, -{ 0xC542, 0xC542, 0xC542 }, -{ 0xC543, 0xC543, 0xC543 }, -{ 0xC544, 0xC544, 0xC544 }, -{ 0xC545, 0xC545, 0xC545 }, -{ 0xC546, 0xC546, 0xC546 }, -{ 0xC547, 0xC547, 0xC547 }, -{ 0xC548, 0xC548, 0xC548 }, -{ 0xC549, 0xC549, 0xC549 }, -{ 0xC54A, 0xC54A, 0xC54A }, -{ 0xC54B, 0xC54B, 0xC54B }, -{ 0xC54C, 0xC54C, 0xC54C }, -{ 0xC54D, 0xC54D, 0xC54D }, -{ 0xC54E, 0xC54E, 0xC54E }, -{ 0xC54F, 0xC54F, 0xC54F }, -{ 0xC550, 0xC550, 0xC550 }, -{ 0xC551, 0xC551, 0xC551 }, -{ 0xC552, 0xC552, 0xC552 }, -{ 0xC553, 0xC553, 0xC553 }, -{ 0xC554, 0xC554, 0xC554 }, -{ 0xC555, 0xC555, 0xC555 }, -{ 0xC556, 0xC556, 0xC556 }, -{ 0xC557, 0xC557, 0xC557 }, -{ 0xC558, 0xC558, 0xC558 }, -{ 0xC559, 0xC559, 0xC559 }, -{ 0xC55A, 0xC55A, 0xC55A }, -{ 0xC55B, 0xC55B, 0xC55B }, -{ 0xC55C, 0xC55C, 0xC55C }, -{ 0xC55D, 0xC55D, 0xC55D }, -{ 0xC55E, 0xC55E, 0xC55E }, -{ 0xC55F, 0xC55F, 0xC55F }, -{ 0xC560, 0xC560, 0xC560 }, -{ 0xC561, 0xC561, 0xC561 }, -{ 0xC562, 0xC562, 0xC562 }, -{ 0xC563, 0xC563, 0xC563 }, -{ 0xC564, 0xC564, 0xC564 }, -{ 0xC565, 0xC565, 0xC565 }, -{ 0xC566, 0xC566, 0xC566 }, -{ 0xC567, 0xC567, 0xC567 }, -{ 0xC568, 0xC568, 0xC568 }, -{ 0xC569, 0xC569, 0xC569 }, -{ 0xC56A, 0xC56A, 0xC56A }, -{ 0xC56B, 0xC56B, 0xC56B }, -{ 0xC56C, 0xC56C, 0xC56C }, -{ 0xC56D, 0xC56D, 0xC56D }, -{ 0xC56E, 0xC56E, 0xC56E }, -{ 0xC56F, 0xC56F, 0xC56F }, -{ 0xC570, 0xC570, 0xC570 }, -{ 0xC571, 0xC571, 0xC571 }, -{ 0xC572, 0xC572, 0xC572 }, -{ 0xC573, 0xC573, 0xC573 }, -{ 0xC574, 0xC574, 0xC574 }, -{ 0xC575, 0xC575, 0xC575 }, -{ 0xC576, 0xC576, 0xC576 }, -{ 0xC577, 0xC577, 0xC577 }, -{ 0xC578, 0xC578, 0xC578 }, -{ 0xC579, 0xC579, 0xC579 }, -{ 0xC57A, 0xC57A, 0xC57A }, -{ 0xC57B, 0xC57B, 0xC57B }, -{ 0xC57C, 0xC57C, 0xC57C }, -{ 0xC57D, 0xC57D, 0xC57D }, -{ 0xC57E, 0xC57E, 0xC57E }, -{ 0xC57F, 0xC57F, 0xC57F }, -{ 0xC580, 0xC580, 0xC580 }, -{ 0xC581, 0xC581, 0xC581 }, -{ 0xC582, 0xC582, 0xC582 }, -{ 0xC583, 0xC583, 0xC583 }, -{ 0xC584, 0xC584, 0xC584 }, -{ 0xC585, 0xC585, 0xC585 }, -{ 0xC586, 0xC586, 0xC586 }, -{ 0xC587, 0xC587, 0xC587 }, -{ 0xC588, 0xC588, 0xC588 }, -{ 0xC589, 0xC589, 0xC589 }, -{ 0xC58A, 0xC58A, 0xC58A }, -{ 0xC58B, 0xC58B, 0xC58B }, -{ 0xC58C, 0xC58C, 0xC58C }, -{ 0xC58D, 0xC58D, 0xC58D }, -{ 0xC58E, 0xC58E, 0xC58E }, -{ 0xC58F, 0xC58F, 0xC58F }, -{ 0xC590, 0xC590, 0xC590 }, -{ 0xC591, 0xC591, 0xC591 }, -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 0xC5FF }, -{ 0xC600, 0xC600, 0xC600 }, -{ 0xC601, 0xC601, 0xC601 }, -{ 0xC602, 0xC602, 0xC602 }, -{ 0xC603, 0xC603, 0xC603 }, -{ 0xC604, 0xC604, 0xC604 }, -{ 0xC605, 0xC605, 0xC605 }, -{ 0xC606, 0xC606, 0xC606 }, -{ 0xC607, 0xC607, 0xC607 }, -{ 0xC608, 0xC608, 0xC608 }, -{ 0xC609, 0xC609, 0xC609 }, -{ 0xC60A, 0xC60A, 0xC60A }, -{ 0xC60B, 0xC60B, 0xC60B }, -{ 0xC60C, 0xC60C, 0xC60C }, -{ 0xC60D, 0xC60D, 0xC60D }, -{ 0xC60E, 0xC60E, 0xC60E }, -{ 0xC60F, 0xC60F, 0xC60F }, -{ 0xC610, 0xC610, 0xC610 }, -{ 0xC611, 0xC611, 0xC611 }, -{ 0xC612, 0xC612, 0xC612 }, -{ 0xC613, 0xC613, 0xC613 }, -{ 0xC614, 0xC614, 0xC614 }, -{ 0xC615, 0xC615, 0xC615 }, -{ 0xC616, 0xC616, 0xC616 }, -{ 0xC617, 0xC617, 0xC617 }, -{ 0xC618, 0xC618, 0xC618 }, -{ 0xC619, 0xC619, 0xC619 }, -{ 0xC61A, 0xC61A, 0xC61A }, -{ 0xC61B, 0xC61B, 0xC61B }, -{ 0xC61C, 0xC61C, 0xC61C }, -{ 0xC61D, 0xC61D, 0xC61D }, -{ 0xC61E, 0xC61E, 0xC61E }, -{ 0xC61F, 0xC61F, 0xC61F }, -{ 0xC620, 0xC620, 0xC620 }, -{ 0xC621, 0xC621, 0xC621 }, -{ 0xC622, 0xC622, 0xC622 }, -{ 0xC623, 0xC623, 0xC623 }, -{ 0xC624, 0xC624, 0xC624 }, -{ 0xC625, 0xC625, 0xC625 }, -{ 0xC626, 0xC626, 0xC626 }, -{ 0xC627, 0xC627, 0xC627 }, -{ 0xC628, 0xC628, 0xC628 }, -{ 0xC629, 0xC629, 0xC629 }, -{ 0xC62A, 0xC62A, 0xC62A }, -{ 0xC62B, 0xC62B, 0xC62B }, -{ 0xC62C, 0xC62C, 0xC62C }, -{ 0xC62D, 0xC62D, 0xC62D }, -{ 0xC62E, 0xC62E, 0xC62E }, -{ 0xC62F, 0xC62F, 0xC62F }, -{ 0xC630, 0xC630, 0xC630 }, -{ 0xC631, 0xC631, 0xC631 }, -{ 0xC632, 0xC632, 0xC632 }, -{ 0xC633, 0xC633, 0xC633 }, -{ 0xC634, 0xC634, 0xC634 }, -{ 0xC635, 0xC635, 0xC635 }, -{ 0xC636, 0xC636, 0xC636 }, -{ 0xC637, 0xC637, 0xC637 }, -{ 0xC638, 0xC638, 0xC638 }, -{ 0xC639, 0xC639, 0xC639 }, -{ 0xC63A, 0xC63A, 0xC63A }, -{ 0xC63B, 0xC63B, 0xC63B }, -{ 0xC63C, 0xC63C, 0xC63C }, -{ 0xC63D, 0xC63D, 0xC63D }, -{ 0xC63E, 0xC63E, 0xC63E }, -{ 0xC63F, 0xC63F, 0xC63F }, -{ 0xC640, 0xC640, 0xC640 }, -{ 0xC641, 0xC641, 0xC641 }, -{ 0xC642, 0xC642, 0xC642 }, -{ 0xC643, 0xC643, 0xC643 }, -{ 0xC644, 0xC644, 0xC644 }, -{ 0xC645, 0xC645, 0xC645 }, -{ 0xC646, 0xC646, 0xC646 }, -{ 0xC647, 0xC647, 0xC647 }, -{ 0xC648, 0xC648, 0xC648 }, -{ 0xC649, 0xC649, 0xC649 }, -{ 0xC64A, 0xC64A, 0xC64A }, -{ 0xC64B, 0xC64B, 0xC64B }, -{ 0xC64C, 0xC64C, 0xC64C }, -{ 0xC64D, 0xC64D, 0xC64D }, -{ 0xC64E, 0xC64E, 0xC64E }, -{ 0xC64F, 0xC64F, 0xC64F }, -{ 0xC650, 0xC650, 0xC650 }, -{ 0xC651, 0xC651, 0xC651 }, -{ 0xC652, 0xC652, 0xC652 }, -{ 0xC653, 0xC653, 0xC653 }, -{ 0xC654, 0xC654, 0xC654 }, -{ 0xC655, 0xC655, 0xC655 }, -{ 0xC656, 0xC656, 0xC656 }, -{ 0xC657, 0xC657, 0xC657 }, -{ 0xC658, 0xC658, 0xC658 }, -{ 0xC659, 0xC659, 0xC659 }, -{ 0xC65A, 0xC65A, 0xC65A }, -{ 0xC65B, 0xC65B, 0xC65B }, -{ 0xC65C, 0xC65C, 0xC65C }, -{ 0xC65D, 0xC65D, 0xC65D }, -{ 0xC65E, 0xC65E, 0xC65E }, -{ 0xC65F, 0xC65F, 0xC65F }, -{ 0xC660, 0xC660, 0xC660 }, -{ 0xC661, 0xC661, 0xC661 }, -{ 0xC662, 0xC662, 0xC662 }, -{ 0xC663, 0xC663, 0xC663 }, -{ 0xC664, 0xC664, 0xC664 }, -{ 0xC665, 0xC665, 0xC665 }, -{ 0xC666, 0xC666, 0xC666 }, -{ 0xC667, 0xC667, 0xC667 }, -{ 0xC668, 0xC668, 0xC668 }, -{ 0xC669, 0xC669, 0xC669 }, -{ 0xC66A, 0xC66A, 0xC66A }, -{ 0xC66B, 0xC66B, 0xC66B }, -{ 0xC66C, 0xC66C, 0xC66C }, -{ 0xC66D, 0xC66D, 0xC66D }, -{ 0xC66E, 0xC66E, 0xC66E }, -{ 0xC66F, 0xC66F, 0xC66F }, -{ 0xC670, 0xC670, 0xC670 }, -{ 0xC671, 0xC671, 0xC671 }, -{ 0xC672, 0xC672, 0xC672 }, -{ 0xC673, 0xC673, 0xC673 }, -{ 0xC674, 0xC674, 0xC674 }, -{ 0xC675, 0xC675, 0xC675 }, -{ 0xC676, 0xC676, 0xC676 }, -{ 0xC677, 0xC677, 0xC677 }, -{ 0xC678, 0xC678, 0xC678 }, -{ 0xC679, 0xC679, 0xC679 }, -{ 0xC67A, 0xC67A, 0xC67A }, -{ 0xC67B, 0xC67B, 0xC67B }, -{ 0xC67C, 0xC67C, 0xC67C }, -{ 0xC67D, 0xC67D, 0xC67D }, -{ 0xC67E, 0xC67E, 0xC67E }, -{ 0xC67F, 0xC67F, 0xC67F }, -{ 0xC680, 0xC680, 0xC680 }, -{ 0xC681, 0xC681, 0xC681 }, -{ 0xC682, 0xC682, 0xC682 }, -{ 0xC683, 0xC683, 0xC683 }, -{ 0xC684, 0xC684, 0xC684 }, -{ 0xC685, 0xC685, 0xC685 }, -{ 0xC686, 0xC686, 0xC686 }, -{ 0xC687, 0xC687, 0xC687 }, -{ 0xC688, 0xC688, 0xC688 }, -{ 0xC689, 0xC689, 0xC689 }, -{ 0xC68A, 0xC68A, 0xC68A }, -{ 0xC68B, 0xC68B, 0xC68B }, -{ 0xC68C, 0xC68C, 0xC68C }, -{ 0xC68D, 0xC68D, 0xC68D }, -{ 0xC68E, 0xC68E, 0xC68E }, -{ 0xC68F, 0xC68F, 0xC68F }, -{ 0xC690, 0xC690, 0xC690 }, -{ 0xC691, 0xC691, 0xC691 }, -{ 0xC692, 0xC692, 0xC692 }, -{ 0xC693, 0xC693, 0xC693 }, -{ 0xC694, 0xC694, 0xC694 }, -{ 0xC695, 0xC695, 0xC695 }, -{ 0xC696, 0xC696, 0xC696 }, -{ 0xC697, 0xC697, 0xC697 }, -{ 0xC698, 0xC698, 0xC698 }, -{ 0xC699, 0xC699, 0xC699 }, -{ 0xC69A, 0xC69A, 0xC69A }, -{ 0xC69B, 0xC69B, 0xC69B }, -{ 0xC69C, 0xC69C, 0xC69C }, -{ 0xC69D, 0xC69D, 0xC69D }, -{ 0xC69E, 0xC69E, 0xC69E }, -{ 0xC69F, 0xC69F, 0xC69F }, -{ 0xC6A0, 0xC6A0, 0xC6A0 }, -{ 0xC6A1, 0xC6A1, 0xC6A1 }, -{ 0xC6A2, 0xC6A2, 0xC6A2 }, -{ 0xC6A3, 0xC6A3, 0xC6A3 }, -{ 0xC6A4, 0xC6A4, 0xC6A4 }, -{ 0xC6A5, 0xC6A5, 0xC6A5 }, -{ 0xC6A6, 0xC6A6, 0xC6A6 }, -{ 0xC6A7, 0xC6A7, 0xC6A7 }, -{ 0xC6A8, 0xC6A8, 0xC6A8 }, -{ 0xC6A9, 0xC6A9, 0xC6A9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F1, 0xC6F1 }, -{ 0xC6F2, 0xC6F2, 0xC6F2 }, -{ 0xC6F3, 0xC6F3, 0xC6F3 }, -{ 0xC6F4, 0xC6F4, 0xC6F4 }, -{ 0xC6F5, 0xC6F5, 0xC6F5 }, -{ 0xC6F6, 0xC6F6, 0xC6F6 }, -{ 0xC6F7, 0xC6F7, 0xC6F7 }, -{ 0xC6F8, 0xC6F8, 0xC6F8 }, -{ 0xC6F9, 0xC6F9, 0xC6F9 }, -{ 0xC6FA, 0xC6FA, 0xC6FA }, -{ 0xC6FB, 0xC6FB, 0xC6FB }, -{ 0xC6FC, 0xC6FC, 0xC6FC }, -{ 0xC6FD, 0xC6FD, 0xC6FD }, -{ 0xC6FE, 0xC6FE, 0xC6FE }, -{ 0xC6FF, 0xC6FF, 0xC6FF }, -{ 0xC700, 0xC700, 0xC700 }, -{ 0xC701, 0xC701, 0xC701 }, -{ 0xC702, 0xC702, 0xC702 }, -{ 0xC703, 0xC703, 0xC703 }, -{ 0xC704, 0xC704, 0xC704 }, -{ 0xC705, 0xC705, 0xC705 }, -{ 0xC706, 0xC706, 0xC706 }, -{ 0xC707, 0xC707, 0xC707 }, -{ 0xC708, 0xC708, 0xC708 }, -{ 0xC709, 0xC709, 0xC709 }, -{ 0xC70A, 0xC70A, 0xC70A }, -{ 0xC70B, 0xC70B, 0xC70B }, -{ 0xC70C, 0xC70C, 0xC70C }, -{ 0xC70D, 0xC70D, 0xC70D }, -{ 0xC70E, 0xC70E, 0xC70E }, -{ 0xC70F, 0xC70F, 0xC70F }, -{ 0xC710, 0xC710, 0xC710 }, -{ 0xC711, 0xC711, 0xC711 }, -{ 0xC712, 0xC712, 0xC712 }, -{ 0xC713, 0xC713, 0xC713 }, -{ 0xC714, 0xC714, 0xC714 }, -{ 0xC715, 0xC715, 0xC715 }, -{ 0xC716, 0xC716, 0xC716 }, -{ 0xC717, 0xC717, 0xC717 }, -{ 0xC718, 0xC718, 0xC718 }, -{ 0xC719, 0xC719, 0xC719 }, -{ 0xC71A, 0xC71A, 0xC71A }, -{ 0xC71B, 0xC71B, 0xC71B }, -{ 0xC71C, 0xC71C, 0xC71C }, -{ 0xC71D, 0xC71D, 0xC71D }, -{ 0xC71E, 0xC71E, 0xC71E }, -{ 0xC71F, 0xC71F, 0xC71F }, -{ 0xC720, 0xC720, 0xC720 }, -{ 0xC721, 0xC721, 0xC721 }, -{ 0xC722, 0xC722, 0xC722 }, -{ 0xC723, 0xC723, 0xC723 }, -{ 0xC724, 0xC724, 0xC724 }, -{ 0xC725, 0xC725, 0xC725 }, -{ 0xC726, 0xC726, 0xC726 }, -{ 0xC727, 0xC727, 0xC727 }, -{ 0xC728, 0xC728, 0xC728 }, -{ 0xC729, 0xC729, 0xC729 }, -{ 0xC72A, 0xC72A, 0xC72A }, -{ 0xC72B, 0xC72B, 0xC72B }, -{ 0xC72C, 0xC72C, 0xC72C }, -{ 0xC72D, 0xC72D, 0xC72D }, -{ 0xC72E, 0xC72E, 0xC72E }, -{ 0xC72F, 0xC72F, 0xC72F }, -{ 0xC730, 0xC730, 0xC730 }, -{ 0xC731, 0xC731, 0xC731 }, -{ 0xC732, 0xC732, 0xC732 }, -{ 0xC733, 0xC733, 0xC733 }, -{ 0xC734, 0xC734, 0xC734 }, -{ 0xC735, 0xC735, 0xC735 }, -{ 0xC736, 0xC736, 0xC736 }, -{ 0xC737, 0xC737, 0xC737 }, -{ 0xC738, 0xC738, 0xC738 }, -{ 0xC739, 0xC739, 0xC739 }, -{ 0xC73A, 0xC73A, 0xC73A }, -{ 0xC73B, 0xC73B, 0xC73B }, -{ 0xC73C, 0xC73C, 0xC73C }, -{ 0xC73D, 0xC73D, 0xC73D }, -{ 0xC73E, 0xC73E, 0xC73E }, -{ 0xC73F, 0xC73F, 0xC73F }, -{ 0xC740, 0xC740, 0xC740 }, -{ 0xC741, 0xC741, 0xC741 }, -{ 0xC742, 0xC742, 0xC742 }, -{ 0xC743, 0xC743, 0xC743 }, -{ 0xC744, 0xC744, 0xC744 }, -{ 0xC745, 0xC745, 0xC745 }, -{ 0xC746, 0xC746, 0xC746 }, -{ 0xC747, 0xC747, 0xC747 }, -{ 0xC748, 0xC748, 0xC748 }, -{ 0xC749, 0xC749, 0xC749 }, -{ 0xC74A, 0xC74A, 0xC74A }, -{ 0xC74B, 0xC74B, 0xC74B }, -{ 0xC74C, 0xC74C, 0xC74C }, -{ 0xC74D, 0xC74D, 0xC74D }, -{ 0xC74E, 0xC74E, 0xC74E }, -{ 0xC74F, 0xC74F, 0xC74F }, -{ 0xC750, 0xC750, 0xC750 }, -{ 0xC751, 0xC751, 0xC751 }, -{ 0xC752, 0xC752, 0xC752 }, -{ 0xC753, 0xC753, 0xC753 }, -{ 0xC754, 0xC754, 0xC754 }, -{ 0xC755, 0xC755, 0xC755 }, -{ 0xC756, 0xC756, 0xC756 }, -{ 0xC757, 0xC757, 0xC757 }, -{ 0xC758, 0xC758, 0xC758 }, -{ 0xC759, 0xC759, 0xC759 }, -{ 0xC75A, 0xC75A, 0xC75A }, -{ 0xC75B, 0xC75B, 0xC75B }, -{ 0xC75C, 0xC75C, 0xC75C }, -{ 0xC75D, 0xC75D, 0xC75D }, -{ 0xC75E, 0xC75E, 0xC75E }, -{ 0xC75F, 0xC75F, 0xC75F }, -{ 0xC760, 0xC760, 0xC760 }, -{ 0xC761, 0xC761, 0xC761 }, -{ 0xC762, 0xC762, 0xC762 }, -{ 0xC763, 0xC763, 0xC763 }, -{ 0xC764, 0xC764, 0xC764 }, -{ 0xC765, 0xC765, 0xC765 }, -{ 0xC766, 0xC766, 0xC766 }, -{ 0xC767, 0xC767, 0xC767 }, -{ 0xC768, 0xC768, 0xC768 }, -{ 0xC769, 0xC769, 0xC769 }, -{ 0xC76A, 0xC76A, 0xC76A }, -{ 0xC76B, 0xC76B, 0xC76B }, -{ 0xC76C, 0xC76C, 0xC76C }, -{ 0xC76D, 0xC76D, 0xC76D }, -{ 0xC76E, 0xC76E, 0xC76E }, -{ 0xC76F, 0xC76F, 0xC76F }, -{ 0xC770, 0xC770, 0xC770 }, -{ 0xC771, 0xC771, 0xC771 }, -{ 0xC772, 0xC772, 0xC772 }, -{ 0xC773, 0xC773, 0xC773 }, -{ 0xC774, 0xC774, 0xC774 }, -{ 0xC775, 0xC775, 0xC775 }, -{ 0xC776, 0xC776, 0xC776 }, -{ 0xC777, 0xC777, 0xC777 }, -{ 0xC778, 0xC778, 0xC778 }, -{ 0xC779, 0xC779, 0xC779 }, -{ 0xC77A, 0xC77A, 0xC77A }, -{ 0xC77B, 0xC77B, 0xC77B }, -{ 0xC77C, 0xC77C, 0xC77C }, -{ 0xC77D, 0xC77D, 0xC77D }, -{ 0xC77E, 0xC77E, 0xC77E }, -{ 0xC77F, 0xC77F, 0xC77F }, -{ 0xC780, 0xC780, 0xC780 }, -{ 0xC781, 0xC781, 0xC781 }, -{ 0xC782, 0xC782, 0xC782 }, -{ 0xC783, 0xC783, 0xC783 }, -{ 0xC784, 0xC784, 0xC784 }, -{ 0xC785, 0xC785, 0xC785 }, -{ 0xC786, 0xC786, 0xC786 }, -{ 0xC787, 0xC787, 0xC787 }, -{ 0xC788, 0xC788, 0xC788 }, -{ 0xC789, 0xC789, 0xC789 }, -{ 0xC78A, 0xC78A, 0xC78A }, -{ 0xC78B, 0xC78B, 0xC78B }, -{ 0xC78C, 0xC78C, 0xC78C }, -{ 0xC78D, 0xC78D, 0xC78D }, -{ 0xC78E, 0xC78E, 0xC78E }, -{ 0xC78F, 0xC78F, 0xC78F }, -{ 0xC790, 0xC790, 0xC790 }, -{ 0xC791, 0xC791, 0xC791 }, -{ 0xC792, 0xC792, 0xC792 }, -{ 0xC793, 0xC793, 0xC793 }, -{ 0xC794, 0xC794, 0xC794 }, -{ 0xC795, 0xC795, 0xC795 }, -{ 0xC796, 0xC796, 0xC796 }, -{ 0xC797, 0xC797, 0xC797 }, -{ 0xC798, 0xC798, 0xC798 }, -{ 0xC799, 0xC799, 0xC799 }, -{ 0xC79A, 0xC79A, 0xC79A }, -{ 0xC79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-{ 0xC809, 0xC809, 0xC809 }, -{ 0xC80A, 0xC80A, 0xC80A }, -{ 0xC80B, 0xC80B, 0xC80B }, -{ 0xC80C, 0xC80C, 0xC80C }, -{ 0xC80D, 0xC80D, 0xC80D }, -{ 0xC80E, 0xC80E, 0xC80E }, -{ 0xC80F, 0xC80F, 0xC80F }, -{ 0xC810, 0xC810, 0xC810 }, -{ 0xC811, 0xC811, 0xC811 }, -{ 0xC812, 0xC812, 0xC812 }, -{ 0xC813, 0xC813, 0xC813 }, -{ 0xC814, 0xC814, 0xC814 }, -{ 0xC815, 0xC815, 0xC815 }, -{ 0xC816, 0xC816, 0xC816 }, -{ 0xC817, 0xC817, 0xC817 }, -{ 0xC818, 0xC818, 0xC818 }, -{ 0xC819, 0xC819, 0xC819 }, -{ 0xC81A, 0xC81A, 0xC81A }, -{ 0xC81B, 0xC81B, 0xC81B }, -{ 0xC81C, 0xC81C, 0xC81C }, -{ 0xC81D, 0xC81D, 0xC81D }, -{ 0xC81E, 0xC81E, 0xC81E }, -{ 0xC81F, 0xC81F, 0xC81F }, -{ 0xC820, 0xC820, 0xC820 }, -{ 0xC821, 0xC821, 0xC821 }, -{ 0xC822, 0xC822, 0xC822 }, -{ 0xC823, 0xC823, 0xC823 }, -{ 0xC824, 0xC824, 0xC824 }, -{ 0xC825, 0xC825, 0xC825 }, -{ 0xC826, 0xC826, 0xC826 }, -{ 0xC827, 0xC827, 0xC827 }, -{ 0xC828, 0xC828, 0xC828 }, -{ 0xC829, 0xC829, 0xC829 }, -{ 0xC82A, 0xC82A, 0xC82A }, -{ 0xC82B, 0xC82B, 0xC82B }, -{ 0xC82C, 0xC82C, 0xC82C }, -{ 0xC82D, 0xC82D, 0xC82D }, -{ 0xC82E, 0xC82E, 0xC82E }, -{ 0xC82F, 0xC82F, 0xC82F }, -{ 0xC830, 0xC830, 0xC830 }, -{ 0xC831, 0xC831, 0xC831 }, -{ 0xC832, 0xC832, 0xC832 }, -{ 0xC833, 0xC833, 0xC833 }, -{ 0xC834, 0xC834, 0xC834 }, -{ 0xC835, 0xC835, 0xC835 }, -{ 0xC836, 0xC836, 0xC836 }, -{ 0xC837, 0xC837, 0xC837 }, -{ 0xC838, 0xC838, 0xC838 }, -{ 0xC839, 0xC839, 0xC839 }, -{ 0xC83A, 0xC83A, 0xC83A }, -{ 0xC83B, 0xC83B, 0xC83B }, -{ 0xC83C, 0xC83C, 0xC83C }, -{ 0xC83D, 0xC83D, 0xC83D }, -{ 0xC83E, 0xC83E, 0xC83E }, -{ 0xC83F, 0xC83F, 0xC83F }, -{ 0xC840, 0xC840, 0xC840 }, -{ 0xC841, 0xC841, 0xC841 }, -{ 0xC842, 0xC842, 0xC842 }, -{ 0xC843, 0xC843, 0xC843 }, -{ 0xC844, 0xC844, 0xC844 }, -{ 0xC845, 0xC845, 0xC845 }, -{ 0xC846, 0xC846, 0xC846 }, -{ 0xC847, 0xC847, 0xC847 }, -{ 0xC848, 0xC848, 0xC848 }, -{ 0xC849, 0xC849, 0xC849 }, -{ 0xC84A, 0xC84A, 0xC84A }, -{ 0xC84B, 0xC84B, 0xC84B }, -{ 0xC84C, 0xC84C, 0xC84C }, -{ 0xC84D, 0xC84D, 0xC84D }, -{ 0xC84E, 0xC84E, 0xC84E }, -{ 0xC84F, 0xC84F, 0xC84F }, -{ 0xC850, 0xC850, 0xC850 }, -{ 0xC851, 0xC851, 0xC851 }, -{ 0xC852, 0xC852, 0xC852 }, -{ 0xC853, 0xC853, 0xC853 }, -{ 0xC854, 0xC854, 0xC854 }, -{ 0xC855, 0xC855, 0xC855 }, -{ 0xC856, 0xC856, 0xC856 }, -{ 0xC857, 0xC857, 0xC857 }, -{ 0xC858, 0xC858, 0xC858 }, -{ 0xC859, 0xC859, 0xC859 }, -{ 0xC85A, 0xC85A, 0xC85A }, -{ 0xC85B, 0xC85B, 0xC85B }, -{ 0xC85C, 0xC85C, 0xC85C }, -{ 0xC85D, 0xC85D, 0xC85D }, -{ 0xC85E, 0xC85E, 0xC85E }, -{ 0xC85F, 0xC85F, 0xC85F }, -{ 0xC860, 0xC860, 0xC860 }, -{ 0xC861, 0xC861, 0xC861 }, -{ 0xC862, 0xC862, 0xC862 }, -{ 0xC863, 0xC863, 0xC863 }, -{ 0xC864, 0xC864, 0xC864 }, -{ 0xC865, 0xC865, 0xC865 }, -{ 0xC866, 0xC866, 0xC866 }, -{ 0xC867, 0xC867, 0xC867 }, -{ 0xC868, 0xC868, 0xC868 }, -{ 0xC869, 0xC869, 0xC869 }, -{ 0xC86A, 0xC86A, 0xC86A }, -{ 0xC86B, 0xC86B, 0xC86B }, -{ 0xC86C, 0xC86C, 0xC86C }, -{ 0xC86D, 0xC86D, 0xC86D }, -{ 0xC86E, 0xC86E, 0xC86E }, -{ 0xC86F, 0xC86F, 0xC86F }, -{ 0xC870, 0xC870, 0xC870 }, -{ 0xC871, 0xC871, 0xC871 }, -{ 0xC872, 0xC872, 0xC872 }, -{ 0xC873, 0xC873, 0xC873 }, -{ 0xC874, 0xC874, 0xC874 }, -{ 0xC875, 0xC875, 0xC875 }, -{ 0xC876, 0xC876, 0xC876 }, -{ 0xC877, 0xC877, 0xC877 }, -{ 0xC878, 0xC878, 0xC878 }, -{ 0xC879, 0xC879, 0xC879 }, -{ 0xC87A, 0xC87A, 0xC87A }, -{ 0xC87B, 0xC87B, 0xC87B }, -{ 0xC87C, 0xC87C, 0xC87C }, -{ 0xC87D, 0xC87D, 0xC87D }, -{ 0xC87E, 0xC87E, 0xC87E }, -{ 0xC87F, 0xC87F, 0xC87F }, -{ 0xC880, 0xC880, 0xC880 }, -{ 0xC881, 0xC881, 0xC881 }, -{ 0xC882, 0xC882, 0xC882 }, -{ 0xC883, 0xC883, 0xC883 }, -{ 0xC884, 0xC884, 0xC884 }, -{ 0xC885, 0xC885, 0xC885 }, -{ 0xC886, 0xC886, 0xC886 }, -{ 0xC887, 0xC887, 0xC887 }, -{ 0xC888, 0xC888, 0xC888 }, -{ 0xC889, 0xC889, 0xC889 }, -{ 0xC88A, 0xC88A, 0xC88A }, -{ 0xC88B, 0xC88B, 0xC88B }, -{ 0xC88C, 0xC88C, 0xC88C }, -{ 0xC88D, 0xC88D, 0xC88D }, -{ 0xC88E, 0xC88E, 0xC88E }, -{ 0xC88F, 0xC88F, 0xC88F }, -{ 0xC890, 0xC890, 0xC890 }, -{ 0xC891, 0xC891, 0xC891 }, -{ 0xC892, 0xC892, 0xC892 }, -{ 0xC893, 0xC893, 0xC893 }, -{ 0xC894, 0xC894, 0xC894 }, -{ 0xC895, 0xC895, 0xC895 }, -{ 0xC896, 0xC896, 0xC896 }, -{ 0xC897, 0xC897, 0xC897 }, -{ 0xC898, 0xC898, 0xC898 }, -{ 0xC899, 0xC899, 0xC899 }, -{ 0xC89A, 0xC89A, 0xC89A }, -{ 0xC89B, 0xC89B, 0xC89B }, -{ 0xC89C, 0xC89C, 0xC89C }, -{ 0xC89D, 0xC89D, 0xC89D }, -{ 0xC89E, 0xC89E, 0xC89E }, -{ 0xC89F, 0xC89F, 0xC89F }, -{ 0xC8A0, 0xC8A0, 0xC8A0 }, -{ 0xC8A1, 0xC8A1, 0xC8A1 }, -{ 0xC8A2, 0xC8A2, 0xC8A2 }, -{ 0xC8A3, 0xC8A3, 0xC8A3 }, -{ 0xC8A4, 0xC8A4, 0xC8A4 }, -{ 0xC8A5, 0xC8A5, 0xC8A5 }, -{ 0xC8A6, 0xC8A6, 0xC8A6 }, -{ 0xC8A7, 0xC8A7, 0xC8A7 }, -{ 0xC8A8, 0xC8A8, 0xC8A8 }, -{ 0xC8A9, 0xC8A9, 0xC8A9 }, -{ 0xC8AA, 0xC8AA, 0xC8AA }, -{ 0xC8AB, 0xC8AB, 0xC8AB }, -{ 0xC8AC, 0xC8AC, 0xC8AC }, -{ 0xC8AD, 0xC8AD, 0xC8AD }, -{ 0xC8AE, 0xC8AE, 0xC8AE }, -{ 0xC8AF, 0xC8AF, 0xC8AF }, -{ 0xC8B0, 0xC8B0, 0xC8B0 }, -{ 0xC8B1, 0xC8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-{ 0xC8F9, 0xC8F9, 0xC8F9 }, -{ 0xC8FA, 0xC8FA, 0xC8FA }, -{ 0xC8FB, 0xC8FB, 0xC8FB }, -{ 0xC8FC, 0xC8FC, 0xC8FC }, -{ 0xC8FD, 0xC8FD, 0xC8FD }, -{ 0xC8FE, 0xC8FE, 0xC8FE }, -{ 0xC8FF, 0xC8FF, 0xC8FF }, -{ 0xC900, 0xC900, 0xC900 }, -{ 0xC901, 0xC901, 0xC901 }, -{ 0xC902, 0xC902, 0xC902 }, -{ 0xC903, 0xC903, 0xC903 }, -{ 0xC904, 0xC904, 0xC904 }, -{ 0xC905, 0xC905, 0xC905 }, -{ 0xC906, 0xC906, 0xC906 }, -{ 0xC907, 0xC907, 0xC907 }, -{ 0xC908, 0xC908, 0xC908 }, -{ 0xC909, 0xC909, 0xC909 }, -{ 0xC90A, 0xC90A, 0xC90A }, -{ 0xC90B, 0xC90B, 0xC90B }, -{ 0xC90C, 0xC90C, 0xC90C }, -{ 0xC90D, 0xC90D, 0xC90D }, -{ 0xC90E, 0xC90E, 0xC90E }, -{ 0xC90F, 0xC90F, 0xC90F }, -{ 0xC910, 0xC910, 0xC910 }, -{ 0xC911, 0xC911, 0xC911 }, -{ 0xC912, 0xC912, 0xC912 }, -{ 0xC913, 0xC913, 0xC913 }, -{ 0xC914, 0xC914, 0xC914 }, -{ 0xC915, 0xC915, 0xC915 }, -{ 0xC916, 0xC916, 0xC916 }, -{ 0xC917, 0xC917, 0xC917 }, -{ 0xC918, 0xC918, 0xC918 }, -{ 0xC919, 0xC919, 0xC919 }, -{ 0xC91A, 0xC91A, 0xC91A }, -{ 0xC91B, 0xC91B, 0xC91B }, -{ 0xC91C, 0xC91C, 0xC91C }, -{ 0xC91D, 0xC91D, 0xC91D }, -{ 0xC91E, 0xC91E, 0xC91E }, -{ 0xC91F, 0xC91F, 0xC91F }, -{ 0xC920, 0xC920, 0xC920 }, -{ 0xC921, 0xC921, 0xC921 }, -{ 0xC922, 0xC922, 0xC922 }, -{ 0xC923, 0xC923, 0xC923 }, -{ 0xC924, 0xC924, 0xC924 }, -{ 0xC925, 0xC925, 0xC925 }, -{ 0xC926, 0xC926, 0xC926 }, -{ 0xC927, 0xC927, 0xC927 }, -{ 0xC928, 0xC928, 0xC928 }, -{ 0xC929, 0xC929, 0xC929 }, -{ 0xC92A, 0xC92A, 0xC92A }, -{ 0xC92B, 0xC92B, 0xC92B }, -{ 0xC92C, 0xC92C, 0xC92C }, -{ 0xC92D, 0xC92D, 0xC92D }, -{ 0xC92E, 0xC92E, 0xC92E }, -{ 0xC92F, 0xC92F, 0xC92F }, -{ 0xC930, 0xC930, 0xC930 }, -{ 0xC931, 0xC931, 0xC931 }, -{ 0xC932, 0xC932, 0xC932 }, -{ 0xC933, 0xC933, 0xC933 }, -{ 0xC934, 0xC934, 0xC934 }, -{ 0xC935, 0xC935, 0xC935 }, -{ 0xC936, 0xC936, 0xC936 }, -{ 0xC937, 0xC937, 0xC937 }, -{ 0xC938, 0xC938, 0xC938 }, -{ 0xC939, 0xC939, 0xC939 }, -{ 0xC93A, 0xC93A, 0xC93A }, -{ 0xC93B, 0xC93B, 0xC93B }, -{ 0xC93C, 0xC93C, 0xC93C }, -{ 0xC93D, 0xC93D, 0xC93D }, -{ 0xC93E, 0xC93E, 0xC93E }, -{ 0xC93F, 0xC93F, 0xC93F }, -{ 0xC940, 0xC940, 0xC940 }, -{ 0xC941, 0xC941, 0xC941 }, -{ 0xC942, 0xC942, 0xC942 }, -{ 0xC943, 0xC943, 0xC943 }, -{ 0xC944, 0xC944, 0xC944 }, -{ 0xC945, 0xC945, 0xC945 }, -{ 0xC946, 0xC946, 0xC946 }, -{ 0xC947, 0xC947, 0xC947 }, -{ 0xC948, 0xC948, 0xC948 }, -{ 0xC949, 0xC949, 0xC949 }, -{ 0xC94A, 0xC94A, 0xC94A }, -{ 0xC94B, 0xC94B, 0xC94B }, -{ 0xC94C, 0xC94C, 0xC94C }, -{ 0xC94D, 0xC94D, 0xC94D }, -{ 0xC94E, 0xC94E, 0xC94E }, -{ 0xC94F, 0xC94F, 0xC94F }, -{ 0xC950, 0xC950, 0xC950 }, -{ 0xC951, 0xC951, 0xC951 }, -{ 0xC952, 0xC952, 0xC952 }, -{ 0xC953, 0xC953, 0xC953 }, -{ 0xC954, 0xC954, 0xC954 }, -{ 0xC955, 0xC955, 0xC955 }, -{ 0xC956, 0xC956, 0xC956 }, -{ 0xC957, 0xC957, 0xC957 }, -{ 0xC958, 0xC958, 0xC958 }, -{ 0xC959, 0xC959, 0xC959 }, -{ 0xC95A, 0xC95A, 0xC95A }, -{ 0xC95B, 0xC95B, 0xC95B }, -{ 0xC95C, 0xC95C, 0xC95C }, -{ 0xC95D, 0xC95D, 0xC95D }, -{ 0xC95E, 0xC95E, 0xC95E }, -{ 0xC95F, 0xC95F, 0xC95F }, -{ 0xC960, 0xC960, 0xC960 }, -{ 0xC961, 0xC961, 0xC961 }, -{ 0xC962, 0xC962, 0xC962 }, -{ 0xC963, 0xC963, 0xC963 }, -{ 0xC964, 0xC964, 0xC964 }, -{ 0xC965, 0xC965, 0xC965 }, -{ 0xC966, 0xC966, 0xC966 }, -{ 0xC967, 0xC967, 0xC967 }, -{ 0xC968, 0xC968, 0xC968 }, -{ 0xC969, 0xC969, 0xC969 }, -{ 0xC96A, 0xC96A, 0xC96A }, -{ 0xC96B, 0xC96B, 0xC96B }, -{ 0xC96C, 0xC96C, 0xC96C }, -{ 0xC96D, 0xC96D, 0xC96D }, -{ 0xC96E, 0xC96E, 0xC96E }, -{ 0xC96F, 0xC96F, 0xC96F }, -{ 0xC970, 0xC970, 0xC970 }, -{ 0xC971, 0xC971, 0xC971 }, -{ 0xC972, 0xC972, 0xC972 }, -{ 0xC973, 0xC973, 0xC973 }, -{ 0xC974, 0xC974, 0xC974 }, -{ 0xC975, 0xC975, 0xC975 }, -{ 0xC976, 0xC976, 0xC976 }, -{ 0xC977, 0xC977, 0xC977 }, -{ 0xC978, 0xC978, 0xC978 }, -{ 0xC979, 0xC979, 0xC979 }, -{ 0xC97A, 0xC97A, 0xC97A }, -{ 0xC97B, 0xC97B, 0xC97B }, -{ 0xC97C, 0xC97C, 0xC97C }, -{ 0xC97D, 0xC97D, 0xC97D }, -{ 0xC97E, 0xC97E, 0xC97E }, -{ 0xC97F, 0xC97F, 0xC97F }, -{ 0xC980, 0xC980, 0xC980 }, -{ 0xC981, 0xC981, 0xC981 }, -{ 0xC982, 0xC982, 0xC982 }, -{ 0xC983, 0xC983, 0xC983 }, -{ 0xC984, 0xC984, 0xC984 }, -{ 0xC985, 0xC985, 0xC985 }, -{ 0xC986, 0xC986, 0xC986 }, -{ 0xC987, 0xC987, 0xC987 }, -{ 0xC988, 0xC988, 0xC988 }, -{ 0xC989, 0xC989, 0xC989 }, -{ 0xC98A, 0xC98A, 0xC98A }, -{ 0xC98B, 0xC98B, 0xC98B }, -{ 0xC98C, 0xC98C, 0xC98C }, -{ 0xC98D, 0xC98D, 0xC98D }, -{ 0xC98E, 0xC98E, 0xC98E }, -{ 0xC98F, 0xC98F, 0xC98F }, -{ 0xC990, 0xC990, 0xC990 }, -{ 0xC991, 0xC991, 0xC991 }, -{ 0xC992, 0xC992, 0xC992 }, -{ 0xC993, 0xC993, 0xC993 }, -{ 0xC994, 0xC994, 0xC994 }, -{ 0xC995, 0xC995, 0xC995 }, -{ 0xC996, 0xC996, 0xC996 }, -{ 0xC997, 0xC997, 0xC997 }, -{ 0xC998, 0xC998, 0xC998 }, -{ 0xC999, 0xC999, 0xC999 }, -{ 0xC99A, 0xC99A, 0xC99A }, -{ 0xC99B, 0xC99B, 0xC99B }, -{ 0xC99C, 0xC99C, 0xC99C }, -{ 0xC99D, 0xC99D, 0xC99D }, -{ 0xC99E, 0xC99E, 0xC99E }, -{ 0xC99F, 0xC99F, 0xC99F }, -{ 0xC9A0, 0xC9A0, 0xC9A0 }, -{ 0xC9A1, 0xC9A1, 0xC9A1 }, -{ 0xC9A2, 0xC9A2, 0xC9A2 }, -{ 0xC9A3, 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0xD00F, 0xD00F, 0xD00F }, -{ 0xD010, 0xD010, 0xD010 }, -{ 0xD011, 0xD011, 0xD011 }, -{ 0xD012, 0xD012, 0xD012 }, -{ 0xD013, 0xD013, 0xD013 }, -{ 0xD014, 0xD014, 0xD014 }, -{ 0xD015, 0xD015, 0xD015 }, -{ 0xD016, 0xD016, 0xD016 }, -{ 0xD017, 0xD017, 0xD017 }, -{ 0xD018, 0xD018, 0xD018 }, -{ 0xD019, 0xD019, 0xD019 }, -{ 0xD01A, 0xD01A, 0xD01A }, -{ 0xD01B, 0xD01B, 0xD01B }, -{ 0xD01C, 0xD01C, 0xD01C }, -{ 0xD01D, 0xD01D, 0xD01D }, -{ 0xD01E, 0xD01E, 0xD01E }, -{ 0xD01F, 0xD01F, 0xD01F }, -{ 0xD020, 0xD020, 0xD020 }, -{ 0xD021, 0xD021, 0xD021 }, -{ 0xD022, 0xD022, 0xD022 }, -{ 0xD023, 0xD023, 0xD023 }, -{ 0xD024, 0xD024, 0xD024 }, -{ 0xD025, 0xD025, 0xD025 }, -{ 0xD026, 0xD026, 0xD026 }, -{ 0xD027, 0xD027, 0xD027 }, -{ 0xD028, 0xD028, 0xD028 }, -{ 0xD029, 0xD029, 0xD029 }, -{ 0xD02A, 0xD02A, 0xD02A }, -{ 0xD02B, 0xD02B, 0xD02B }, -{ 0xD02C, 0xD02C, 0xD02C }, -{ 0xD02D, 0xD02D, 0xD02D }, -{ 0xD02E, 0xD02E, 0xD02E }, -{ 0xD02F, 0xD02F, 0xD02F }, -{ 0xD030, 0xD030, 0xD030 }, -{ 0xD031, 0xD031, 0xD031 }, -{ 0xD032, 0xD032, 0xD032 }, -{ 0xD033, 0xD033, 0xD033 }, -{ 0xD034, 0xD034, 0xD034 }, -{ 0xD035, 0xD035, 0xD035 }, -{ 0xD036, 0xD036, 0xD036 }, -{ 0xD037, 0xD037, 0xD037 }, -{ 0xD038, 0xD038, 0xD038 }, -{ 0xD039, 0xD039, 0xD039 }, -{ 0xD03A, 0xD03A, 0xD03A }, -{ 0xD03B, 0xD03B, 0xD03B }, -{ 0xD03C, 0xD03C, 0xD03C }, -{ 0xD03D, 0xD03D, 0xD03D }, -{ 0xD03E, 0xD03E, 0xD03E }, -{ 0xD03F, 0xD03F, 0xD03F }, -{ 0xD040, 0xD040, 0xD040 }, -{ 0xD041, 0xD041, 0xD041 }, -{ 0xD042, 0xD042, 0xD042 }, -{ 0xD043, 0xD043, 0xD043 }, -{ 0xD044, 0xD044, 0xD044 }, -{ 0xD045, 0xD045, 0xD045 }, -{ 0xD046, 0xD046, 0xD046 }, -{ 0xD047, 0xD047, 0xD047 }, -{ 0xD048, 0xD048, 0xD048 }, -{ 0xD049, 0xD049, 0xD049 }, -{ 0xD04A, 0xD04A, 0xD04A }, -{ 0xD04B, 0xD04B, 0xD04B }, -{ 0xD04C, 0xD04C, 0xD04C }, -{ 0xD04D, 0xD04D, 0xD04D }, -{ 0xD04E, 0xD04E, 0xD04E }, -{ 0xD04F, 0xD04F, 0xD04F }, -{ 0xD050, 0xD050, 0xD050 }, -{ 0xD051, 0xD051, 0xD051 }, -{ 0xD052, 0xD052, 0xD052 }, -{ 0xD053, 0xD053, 0xD053 }, -{ 0xD054, 0xD054, 0xD054 }, -{ 0xD055, 0xD055, 0xD055 }, -{ 0xD056, 0xD056, 0xD056 }, -{ 0xD057, 0xD057, 0xD057 }, -{ 0xD058, 0xD058, 0xD058 }, -{ 0xD059, 0xD059, 0xD059 }, -{ 0xD05A, 0xD05A, 0xD05A }, -{ 0xD05B, 0xD05B, 0xD05B }, -{ 0xD05C, 0xD05C, 0xD05C }, -{ 0xD05D, 0xD05D, 0xD05D }, -{ 0xD05E, 0xD05E, 0xD05E }, -{ 0xD05F, 0xD05F, 0xD05F }, -{ 0xD060, 0xD060, 0xD060 }, -{ 0xD061, 0xD061, 0xD061 }, -{ 0xD062, 0xD062, 0xD062 }, -{ 0xD063, 0xD063, 0xD063 }, -{ 0xD064, 0xD064, 0xD064 }, -{ 0xD065, 0xD065, 0xD065 }, -{ 0xD066, 0xD066, 0xD066 }, -{ 0xD067, 0xD067, 0xD067 }, -{ 0xD068, 0xD068, 0xD068 }, -{ 0xD069, 0xD069, 0xD069 }, -{ 0xD06A, 0xD06A, 0xD06A }, -{ 0xD06B, 0xD06B, 0xD06B }, -{ 0xD06C, 0xD06C, 0xD06C }, -{ 0xD06D, 0xD06D, 0xD06D }, -{ 0xD06E, 0xD06E, 0xD06E }, -{ 0xD06F, 0xD06F, 0xD06F }, -{ 0xD070, 0xD070, 0xD070 }, -{ 0xD071, 0xD071, 0xD071 }, -{ 0xD072, 0xD072, 0xD072 }, -{ 0xD073, 0xD073, 0xD073 }, -{ 0xD074, 0xD074, 0xD074 }, -{ 0xD075, 0xD075, 0xD075 }, -{ 0xD076, 0xD076, 0xD076 }, -{ 0xD077, 0xD077, 0xD077 }, -{ 0xD078, 0xD078, 0xD078 }, -{ 0xD079, 0xD079, 0xD079 }, -{ 0xD07A, 0xD07A, 0xD07A }, -{ 0xD07B, 0xD07B, 0xD07B }, -{ 0xD07C, 0xD07C, 0xD07C }, -{ 0xD07D, 0xD07D, 0xD07D }, -{ 0xD07E, 0xD07E, 0xD07E }, -{ 0xD07F, 0xD07F, 0xD07F }, -{ 0xD080, 0xD080, 0xD080 }, -{ 0xD081, 0xD081, 0xD081 }, -{ 0xD082, 0xD082, 0xD082 }, -{ 0xD083, 0xD083, 0xD083 }, -{ 0xD084, 0xD084, 0xD084 }, -{ 0xD085, 0xD085, 0xD085 }, -{ 0xD086, 0xD086, 0xD086 }, -{ 0xD087, 0xD087, 0xD087 }, -{ 0xD088, 0xD088, 0xD088 }, -{ 0xD089, 0xD089, 0xD089 }, -{ 0xD08A, 0xD08A, 0xD08A }, -{ 0xD08B, 0xD08B, 0xD08B }, -{ 0xD08C, 0xD08C, 0xD08C }, -{ 0xD08D, 0xD08D, 0xD08D }, -{ 0xD08E, 0xD08E, 0xD08E }, -{ 0xD08F, 0xD08F, 0xD08F }, -{ 0xD090, 0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 0xD0FE, 0xD0FE }, -{ 0xD0FF, 0xD0FF, 0xD0FF }, -{ 0xD100, 0xD100, 0xD100 }, -{ 0xD101, 0xD101, 0xD101 }, -{ 0xD102, 0xD102, 0xD102 }, -{ 0xD103, 0xD103, 0xD103 }, -{ 0xD104, 0xD104, 0xD104 }, -{ 0xD105, 0xD105, 0xD105 }, -{ 0xD106, 0xD106, 0xD106 }, -{ 0xD107, 0xD107, 0xD107 }, -{ 0xD108, 0xD108, 0xD108 }, -{ 0xD109, 0xD109, 0xD109 }, -{ 0xD10A, 0xD10A, 0xD10A }, -{ 0xD10B, 0xD10B, 0xD10B }, -{ 0xD10C, 0xD10C, 0xD10C }, -{ 0xD10D, 0xD10D, 0xD10D }, -{ 0xD10E, 0xD10E, 0xD10E }, -{ 0xD10F, 0xD10F, 0xD10F }, -{ 0xD110, 0xD110, 0xD110 }, -{ 0xD111, 0xD111, 0xD111 }, -{ 0xD112, 0xD112, 0xD112 }, -{ 0xD113, 0xD113, 0xD113 }, -{ 0xD114, 0xD114, 0xD114 }, -{ 0xD115, 0xD115, 0xD115 }, -{ 0xD116, 0xD116, 0xD116 }, -{ 0xD117, 0xD117, 0xD117 }, -{ 0xD118, 0xD118, 0xD118 }, -{ 0xD119, 0xD119, 0xD119 }, -{ 0xD11A, 0xD11A, 0xD11A }, -{ 0xD11B, 0xD11B, 0xD11B }, -{ 0xD11C, 0xD11C, 0xD11C }, -{ 0xD11D, 0xD11D, 0xD11D }, -{ 0xD11E, 0xD11E, 0xD11E }, -{ 0xD11F, 0xD11F, 0xD11F }, -{ 0xD120, 0xD120, 0xD120 }, -{ 0xD121, 0xD121, 0xD121 }, -{ 0xD122, 0xD122, 0xD122 }, -{ 0xD123, 0xD123, 0xD123 }, -{ 0xD124, 0xD124, 0xD124 }, -{ 0xD125, 0xD125, 0xD125 }, -{ 0xD126, 0xD126, 0xD126 }, -{ 0xD127, 0xD127, 0xD127 }, -{ 0xD128, 0xD128, 0xD128 }, -{ 0xD129, 0xD129, 0xD129 }, -{ 0xD12A, 0xD12A, 0xD12A }, -{ 0xD12B, 0xD12B, 0xD12B }, -{ 0xD12C, 0xD12C, 0xD12C }, -{ 0xD12D, 0xD12D, 0xD12D }, -{ 0xD12E, 0xD12E, 0xD12E }, -{ 0xD12F, 0xD12F, 0xD12F }, -{ 0xD130, 0xD130, 0xD130 }, -{ 0xD131, 0xD131, 0xD131 }, -{ 0xD132, 0xD132, 0xD132 }, -{ 0xD133, 0xD133, 0xD133 }, -{ 0xD134, 0xD134, 0xD134 }, -{ 0xD135, 0xD135, 0xD135 }, -{ 0xD136, 0xD136, 0xD136 }, -{ 0xD137, 0xD137, 0xD137 }, -{ 0xD138, 0xD138, 0xD138 }, -{ 0xD139, 0xD139, 0xD139 }, -{ 0xD13A, 0xD13A, 0xD13A }, -{ 0xD13B, 0xD13B, 0xD13B }, -{ 0xD13C, 0xD13C, 0xD13C }, -{ 0xD13D, 0xD13D, 0xD13D }, -{ 0xD13E, 0xD13E, 0xD13E }, -{ 0xD13F, 0xD13F, 0xD13F }, -{ 0xD140, 0xD140, 0xD140 }, -{ 0xD141, 0xD141, 0xD141 }, -{ 0xD142, 0xD142, 0xD142 }, -{ 0xD143, 0xD143, 0xD143 }, -{ 0xD144, 0xD144, 0xD144 }, -{ 0xD145, 0xD145, 0xD145 }, -{ 0xD146, 0xD146, 0xD146 }, -{ 0xD147, 0xD147, 0xD147 }, -{ 0xD148, 0xD148, 0xD148 }, -{ 0xD149, 0xD149, 0xD149 }, -{ 0xD14A, 0xD14A, 0xD14A }, -{ 0xD14B, 0xD14B, 0xD14B }, -{ 0xD14C, 0xD14C, 0xD14C }, -{ 0xD14D, 0xD14D, 0xD14D }, -{ 0xD14E, 0xD14E, 0xD14E }, -{ 0xD14F, 0xD14F, 0xD14F }, -{ 0xD150, 0xD150, 0xD150 }, -{ 0xD151, 0xD151, 0xD151 }, -{ 0xD152, 0xD152, 0xD152 }, -{ 0xD153, 0xD153, 0xD153 }, -{ 0xD154, 0xD154, 0xD154 }, -{ 0xD155, 0xD155, 0xD155 }, -{ 0xD156, 0xD156, 0xD156 }, -{ 0xD157, 0xD157, 0xD157 }, -{ 0xD158, 0xD158, 0xD158 }, -{ 0xD159, 0xD159, 0xD159 }, -{ 0xD15A, 0xD15A, 0xD15A }, -{ 0xD15B, 0xD15B, 0xD15B }, -{ 0xD15C, 0xD15C, 0xD15C }, -{ 0xD15D, 0xD15D, 0xD15D }, -{ 0xD15E, 0xD15E, 0xD15E }, -{ 0xD15F, 0xD15F, 0xD15F }, -{ 0xD160, 0xD160, 0xD160 }, -{ 0xD161, 0xD161, 0xD161 }, -{ 0xD162, 0xD162, 0xD162 }, -{ 0xD163, 0xD163, 0xD163 }, -{ 0xD164, 0xD164, 0xD164 }, -{ 0xD165, 0xD165, 0xD165 }, -{ 0xD166, 0xD166, 0xD166 }, -{ 0xD167, 0xD167, 0xD167 }, -{ 0xD168, 0xD168, 0xD168 }, -{ 0xD169, 0xD169, 0xD169 }, -{ 0xD16A, 0xD16A, 0xD16A }, -{ 0xD16B, 0xD16B, 0xD16B }, -{ 0xD16C, 0xD16C, 0xD16C }, -{ 0xD16D, 0xD16D, 0xD16D }, -{ 0xD16E, 0xD16E, 0xD16E }, -{ 0xD16F, 0xD16F, 0xD16F }, -{ 0xD170, 0xD170, 0xD170 }, -{ 0xD171, 0xD171, 0xD171 }, -{ 0xD172, 0xD172, 0xD172 }, -{ 0xD173, 0xD173, 0xD173 }, -{ 0xD174, 0xD174, 0xD174 }, -{ 0xD175, 0xD175, 0xD175 }, -{ 0xD176, 0xD176, 0xD176 }, -{ 0xD177, 0xD177, 0xD177 }, -{ 0xD178, 0xD178, 0xD178 }, -{ 0xD179, 0xD179, 0xD179 }, -{ 0xD17A, 0xD17A, 0xD17A }, -{ 0xD17B, 0xD17B, 0xD17B }, -{ 0xD17C, 0xD17C, 0xD17C }, -{ 0xD17D, 0xD17D, 0xD17D }, -{ 0xD17E, 0xD17E, 0xD17E }, -{ 0xD17F, 0xD17F, 0xD17F }, -{ 0xD180, 0xD180, 0xD180 }, -{ 0xD181, 0xD181, 0xD181 }, -{ 0xD182, 0xD182, 0xD182 }, -{ 0xD183, 0xD183, 0xD183 }, -{ 0xD184, 0xD184, 0xD184 }, -{ 0xD185, 0xD185, 0xD185 }, -{ 0xD186, 0xD186, 0xD186 }, -{ 0xD187, 0xD187, 0xD187 }, -{ 0xD188, 0xD188, 0xD188 }, -{ 0xD189, 0xD189, 0xD189 }, -{ 0xD18A, 0xD18A, 0xD18A }, -{ 0xD18B, 0xD18B, 0xD18B }, -{ 0xD18C, 0xD18C, 0xD18C }, -{ 0xD18D, 0xD18D, 0xD18D }, -{ 0xD18E, 0xD18E, 0xD18E }, -{ 0xD18F, 0xD18F, 0xD18F }, -{ 0xD190, 0xD190, 0xD190 }, -{ 0xD191, 0xD191, 0xD191 }, -{ 0xD192, 0xD192, 0xD192 }, -{ 0xD193, 0xD193, 0xD193 }, -{ 0xD194, 0xD194, 0xD194 }, -{ 0xD195, 0xD195, 0xD195 }, -{ 0xD196, 0xD196, 0xD196 }, -{ 0xD197, 0xD197, 0xD197 }, -{ 0xD198, 0xD198, 0xD198 }, -{ 0xD199, 0xD199, 0xD199 }, -{ 0xD19A, 0xD19A, 0xD19A }, -{ 0xD19B, 0xD19B, 0xD19B }, -{ 0xD19C, 0xD19C, 0xD19C }, -{ 0xD19D, 0xD19D, 0xD19D }, -{ 0xD19E, 0xD19E, 0xD19E }, -{ 0xD19F, 0xD19F, 0xD19F }, -{ 0xD1A0, 0xD1A0, 0xD1A0 }, -{ 0xD1A1, 0xD1A1, 0xD1A1 }, -{ 0xD1A2, 0xD1A2, 0xD1A2 }, -{ 0xD1A3, 0xD1A3, 0xD1A3 }, -{ 0xD1A4, 0xD1A4, 0xD1A4 }, -{ 0xD1A5, 0xD1A5, 0xD1A5 }, -{ 0xD1A6, 0xD1A6, 0xD1A6 }, -{ 0xD1A7, 0xD1A7, 0xD1A7 }, -{ 0xD1A8, 0xD1A8,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0, 0xD1F0, 0xD1F0 }, -{ 0xD1F1, 0xD1F1, 0xD1F1 }, -{ 0xD1F2, 0xD1F2, 0xD1F2 }, -{ 0xD1F3, 0xD1F3, 0xD1F3 }, -{ 0xD1F4, 0xD1F4, 0xD1F4 }, -{ 0xD1F5, 0xD1F5, 0xD1F5 }, -{ 0xD1F6, 0xD1F6, 0xD1F6 }, -{ 0xD1F7, 0xD1F7, 0xD1F7 }, -{ 0xD1F8, 0xD1F8, 0xD1F8 }, -{ 0xD1F9, 0xD1F9, 0xD1F9 }, -{ 0xD1FA, 0xD1FA, 0xD1FA }, -{ 0xD1FB, 0xD1FB, 0xD1FB }, -{ 0xD1FC, 0xD1FC, 0xD1FC }, -{ 0xD1FD, 0xD1FD, 0xD1FD }, -{ 0xD1FE, 0xD1FE, 0xD1FE }, -{ 0xD1FF, 0xD1FF, 0xD1FF }, -{ 0xD200, 0xD200, 0xD200 }, -{ 0xD201, 0xD201, 0xD201 }, -{ 0xD202, 0xD202, 0xD202 }, -{ 0xD203, 0xD203, 0xD203 }, -{ 0xD204, 0xD204, 0xD204 }, -{ 0xD205, 0xD205, 0xD205 }, -{ 0xD206, 0xD206, 0xD206 }, -{ 0xD207, 0xD207, 0xD207 }, -{ 0xD208, 0xD208, 0xD208 }, -{ 0xD209, 0xD209, 0xD209 }, -{ 0xD20A, 0xD20A, 0xD20A }, -{ 0xD20B, 0xD20B, 0xD20B }, -{ 0xD20C, 0xD20C, 0xD20C }, -{ 0xD20D, 0xD20D, 0xD20D }, -{ 0xD20E, 0xD20E, 0xD20E }, -{ 0xD20F, 0xD20F, 0xD20F }, -{ 0xD210, 0xD210, 0xD210 }, -{ 0xD211, 0xD211, 0xD211 }, -{ 0xD212, 0xD212, 0xD212 }, -{ 0xD213, 0xD213, 0xD213 }, -{ 0xD214, 0xD214, 0xD214 }, -{ 0xD215, 0xD215, 0xD215 }, -{ 0xD216, 0xD216, 0xD216 }, -{ 0xD217, 0xD217, 0xD217 }, -{ 0xD218, 0xD218, 0xD218 }, -{ 0xD219, 0xD219, 0xD219 }, -{ 0xD21A, 0xD21A, 0xD21A }, -{ 0xD21B, 0xD21B, 0xD21B }, -{ 0xD21C, 0xD21C, 0xD21C }, -{ 0xD21D, 0xD21D, 0xD21D }, -{ 0xD21E, 0xD21E, 0xD21E }, -{ 0xD21F, 0xD21F, 0xD21F }, -{ 0xD220, 0xD220, 0xD220 }, -{ 0xD221, 0xD221, 0xD221 }, -{ 0xD222, 0xD222, 0xD222 }, -{ 0xD223, 0xD223, 0xD223 }, -{ 0xD224, 0xD224, 0xD224 }, -{ 0xD225, 0xD225, 0xD225 }, -{ 0xD226, 0xD226, 0xD226 }, -{ 0xD227, 0xD227, 0xD227 }, -{ 0xD228, 0xD228, 0xD228 }, -{ 0xD229, 0xD229, 0xD229 }, -{ 0xD22A, 0xD22A, 0xD22A }, -{ 0xD22B, 0xD22B, 0xD22B }, -{ 0xD22C, 0xD22C, 0xD22C }, -{ 0xD22D, 0xD22D, 0xD22D }, -{ 0xD22E, 0xD22E, 0xD22E }, -{ 0xD22F, 0xD22F, 0xD22F }, -{ 0xD230, 0xD230, 0xD230 }, -{ 0xD231, 0xD231, 0xD231 }, -{ 0xD232, 0xD232, 0xD232 }, -{ 0xD233, 0xD233, 0xD233 }, -{ 0xD234, 0xD234, 0xD234 }, -{ 0xD235, 0xD235, 0xD235 }, -{ 0xD236, 0xD236, 0xD236 }, -{ 0xD237, 0xD237, 0xD237 }, -{ 0xD238, 0xD238, 0xD238 }, -{ 0xD239, 0xD239, 0xD239 }, -{ 0xD23A, 0xD23A, 0xD23A }, -{ 0xD23B, 0xD23B, 0xD23B }, -{ 0xD23C, 0xD23C, 0xD23C }, -{ 0xD23D, 0xD23D, 0xD23D }, -{ 0xD23E, 0xD23E, 0xD23E }, -{ 0xD23F, 0xD23F, 0xD23F }, -{ 0xD240, 0xD240, 0xD240 }, -{ 0xD241, 0xD241, 0xD241 }, -{ 0xD242, 0xD242, 0xD242 }, -{ 0xD243, 0xD243, 0xD243 }, -{ 0xD244, 0xD244, 0xD244 }, -{ 0xD245, 0xD245, 0xD245 }, -{ 0xD246, 0xD246, 0xD246 }, -{ 0xD247, 0xD247, 0xD247 }, -{ 0xD248, 0xD248, 0xD248 }, -{ 0xD249, 0xD249, 0xD249 }, -{ 0xD24A, 0xD24A, 0xD24A }, -{ 0xD24B, 0xD24B, 0xD24B }, -{ 0xD24C, 0xD24C, 0xD24C }, -{ 0xD24D, 0xD24D, 0xD24D }, -{ 0xD24E, 0xD24E, 0xD24E }, -{ 0xD24F, 0xD24F, 0xD24F }, -{ 0xD250, 0xD250, 0xD250 }, -{ 0xD251, 0xD251, 0xD251 }, -{ 0xD252, 0xD252, 0xD252 }, -{ 0xD253, 0xD253, 0xD253 }, -{ 0xD254, 0xD254, 0xD254 }, -{ 0xD255, 0xD255, 0xD255 }, -{ 0xD256, 0xD256, 0xD256 }, -{ 0xD257, 0xD257, 0xD257 }, -{ 0xD258, 0xD258, 0xD258 }, -{ 0xD259, 0xD259, 0xD259 }, -{ 0xD25A, 0xD25A, 0xD25A }, -{ 0xD25B, 0xD25B, 0xD25B }, -{ 0xD25C, 0xD25C, 0xD25C }, -{ 0xD25D, 0xD25D, 0xD25D }, -{ 0xD25E, 0xD25E, 0xD25E }, -{ 0xD25F, 0xD25F, 0xD25F }, -{ 0xD260, 0xD260, 0xD260 }, -{ 0xD261, 0xD261, 0xD261 }, -{ 0xD262, 0xD262, 0xD262 }, -{ 0xD263, 0xD263, 0xD263 }, -{ 0xD264, 0xD264, 0xD264 }, -{ 0xD265, 0xD265, 0xD265 }, -{ 0xD266, 0xD266, 0xD266 }, -{ 0xD267, 0xD267, 0xD267 }, -{ 0xD268, 0xD268, 0xD268 }, -{ 0xD269, 0xD269, 0xD269 }, -{ 0xD26A, 0xD26A, 0xD26A }, -{ 0xD26B, 0xD26B, 0xD26B }, -{ 0xD26C, 0xD26C, 0xD26C }, -{ 0xD26D, 0xD26D, 0xD26D }, -{ 0xD26E, 0xD26E, 0xD26E }, -{ 0xD26F, 0xD26F, 0xD26F }, -{ 0xD270, 0xD270, 0xD270 }, -{ 0xD271, 0xD271, 0xD271 }, -{ 0xD272, 0xD272, 0xD272 }, -{ 0xD273, 0xD273, 0xD273 }, -{ 0xD274, 0xD274, 0xD274 }, -{ 0xD275, 0xD275, 0xD275 }, -{ 0xD276, 0xD276, 0xD276 }, -{ 0xD277, 0xD277, 0xD277 }, -{ 0xD278, 0xD278, 0xD278 }, -{ 0xD279, 0xD279, 0xD279 }, -{ 0xD27A, 0xD27A, 0xD27A }, -{ 0xD27B, 0xD27B, 0xD27B }, -{ 0xD27C, 0xD27C, 0xD27C }, -{ 0xD27D, 0xD27D, 0xD27D }, -{ 0xD27E, 0xD27E, 0xD27E }, -{ 0xD27F, 0xD27F, 0xD27F }, -{ 0xD280, 0xD280, 0xD280 }, -{ 0xD281, 0xD281, 0xD281 }, -{ 0xD282, 0xD282, 0xD282 }, -{ 0xD283, 0xD283, 0xD283 }, -{ 0xD284, 0xD284, 0xD284 }, -{ 0xD285, 0xD285, 0xD285 }, -{ 0xD286, 0xD286, 0xD286 }, -{ 0xD287, 0xD287, 0xD287 }, -{ 0xD288, 0xD288, 0xD288 }, -{ 0xD289, 0xD289, 0xD289 }, -{ 0xD28A, 0xD28A, 0xD28A }, -{ 0xD28B, 0xD28B, 0xD28B }, -{ 0xD28C, 0xD28C, 0xD28C }, -{ 0xD28D, 0xD28D, 0xD28D }, -{ 0xD28E, 0xD28E, 0xD28E }, -{ 0xD28F, 0xD28F, 0xD28F }, -{ 0xD290, 0xD290, 0xD290 }, -{ 0xD291, 0xD291, 0xD291 }, -{ 0xD292, 0xD292, 0xD292 }, -{ 0xD293, 0xD293, 0xD293 }, -{ 0xD294, 0xD294, 0xD294 }, -{ 0xD295, 0xD295, 0xD295 }, -{ 0xD296, 0xD296, 0xD296 }, -{ 0xD297, 0xD297, 0xD297 }, -{ 0xD298, 0xD298, 0xD298 }, -{ 0xD299, 0xD299, 0xD299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0xD307, 0xD307 }, -{ 0xD308, 0xD308, 0xD308 }, -{ 0xD309, 0xD309, 0xD309 }, -{ 0xD30A, 0xD30A, 0xD30A }, -{ 0xD30B, 0xD30B, 0xD30B }, -{ 0xD30C, 0xD30C, 0xD30C }, -{ 0xD30D, 0xD30D, 0xD30D }, -{ 0xD30E, 0xD30E, 0xD30E }, -{ 0xD30F, 0xD30F, 0xD30F }, -{ 0xD310, 0xD310, 0xD310 }, -{ 0xD311, 0xD311, 0xD311 }, -{ 0xD312, 0xD312, 0xD312 }, -{ 0xD313, 0xD313, 0xD313 }, -{ 0xD314, 0xD314, 0xD314 }, -{ 0xD315, 0xD315, 0xD315 }, -{ 0xD316, 0xD316, 0xD316 }, -{ 0xD317, 0xD317, 0xD317 }, -{ 0xD318, 0xD318, 0xD318 }, -{ 0xD319, 0xD319, 0xD319 }, -{ 0xD31A, 0xD31A, 0xD31A }, -{ 0xD31B, 0xD31B, 0xD31B }, -{ 0xD31C, 0xD31C, 0xD31C }, -{ 0xD31D, 0xD31D, 0xD31D }, -{ 0xD31E, 0xD31E, 0xD31E }, -{ 0xD31F, 0xD31F, 0xD31F }, -{ 0xD320, 0xD320, 0xD320 }, -{ 0xD321, 0xD321, 0xD321 }, -{ 0xD322, 0xD322, 0xD322 }, -{ 0xD323, 0xD323, 0xD323 }, -{ 0xD324, 0xD324, 0xD324 }, -{ 0xD325, 0xD325, 0xD325 }, -{ 0xD326, 0xD326, 0xD326 }, -{ 0xD327, 0xD327, 0xD327 }, -{ 0xD328, 0xD328, 0xD328 }, -{ 0xD329, 0xD329, 0xD329 }, -{ 0xD32A, 0xD32A, 0xD32A }, -{ 0xD32B, 0xD32B, 0xD32B }, -{ 0xD32C, 0xD32C, 0xD32C }, -{ 0xD32D, 0xD32D, 0xD32D }, -{ 0xD32E, 0xD32E, 0xD32E }, -{ 0xD32F, 0xD32F, 0xD32F }, -{ 0xD330, 0xD330, 0xD330 }, -{ 0xD331, 0xD331, 0xD331 }, -{ 0xD332, 0xD332, 0xD332 }, -{ 0xD333, 0xD333, 0xD333 }, -{ 0xD334, 0xD334, 0xD334 }, -{ 0xD335, 0xD335, 0xD335 }, -{ 0xD336, 0xD336, 0xD336 }, -{ 0xD337, 0xD337, 0xD337 }, -{ 0xD338, 0xD338, 0xD338 }, -{ 0xD339, 0xD339, 0xD339 }, -{ 0xD33A, 0xD33A, 0xD33A }, -{ 0xD33B, 0xD33B, 0xD33B }, -{ 0xD33C, 0xD33C, 0xD33C }, -{ 0xD33D, 0xD33D, 0xD33D }, -{ 0xD33E, 0xD33E, 0xD33E }, -{ 0xD33F, 0xD33F, 0xD33F }, -{ 0xD340, 0xD340, 0xD340 }, -{ 0xD341, 0xD341, 0xD341 }, -{ 0xD342, 0xD342, 0xD342 }, -{ 0xD343, 0xD343, 0xD343 }, -{ 0xD344, 0xD344, 0xD344 }, -{ 0xD345, 0xD345, 0xD345 }, -{ 0xD346, 0xD346, 0xD346 }, -{ 0xD347, 0xD347, 0xD347 }, -{ 0xD348, 0xD348, 0xD348 }, -{ 0xD349, 0xD349, 0xD349 }, -{ 0xD34A, 0xD34A, 0xD34A }, -{ 0xD34B, 0xD34B, 0xD34B }, -{ 0xD34C, 0xD34C, 0xD34C }, -{ 0xD34D, 0xD34D, 0xD34D }, -{ 0xD34E, 0xD34E, 0xD34E }, -{ 0xD34F, 0xD34F, 0xD34F }, -{ 0xD350, 0xD350, 0xD350 }, -{ 0xD351, 0xD351, 0xD351 }, -{ 0xD352, 0xD352, 0xD352 }, -{ 0xD353, 0xD353, 0xD353 }, -{ 0xD354, 0xD354, 0xD354 }, -{ 0xD355, 0xD355, 0xD355 }, -{ 0xD356, 0xD356, 0xD356 }, -{ 0xD357, 0xD357, 0xD357 }, -{ 0xD358, 0xD358, 0xD358 }, -{ 0xD359, 0xD359, 0xD359 }, -{ 0xD35A, 0xD35A, 0xD35A }, -{ 0xD35B, 0xD35B, 0xD35B }, -{ 0xD35C, 0xD35C, 0xD35C }, -{ 0xD35D, 0xD35D, 0xD35D }, -{ 0xD35E, 0xD35E, 0xD35E }, -{ 0xD35F, 0xD35F, 0xD35F }, -{ 0xD360, 0xD360, 0xD360 }, -{ 0xD361, 0xD361, 0xD361 }, -{ 0xD362, 0xD362, 0xD362 }, -{ 0xD363, 0xD363, 0xD363 }, -{ 0xD364, 0xD364, 0xD364 }, -{ 0xD365, 0xD365, 0xD365 }, -{ 0xD366, 0xD366, 0xD366 }, -{ 0xD367, 0xD367, 0xD367 }, -{ 0xD368, 0xD368, 0xD368 }, -{ 0xD369, 0xD369, 0xD369 }, -{ 0xD36A, 0xD36A, 0xD36A }, -{ 0xD36B, 0xD36B, 0xD36B }, -{ 0xD36C, 0xD36C, 0xD36C }, -{ 0xD36D, 0xD36D, 0xD36D }, -{ 0xD36E, 0xD36E, 0xD36E }, -{ 0xD36F, 0xD36F, 0xD36F }, -{ 0xD370, 0xD370, 0xD370 }, -{ 0xD371, 0xD371, 0xD371 }, -{ 0xD372, 0xD372, 0xD372 }, -{ 0xD373, 0xD373, 0xD373 }, -{ 0xD374, 0xD374, 0xD374 }, -{ 0xD375, 0xD375, 0xD375 }, -{ 0xD376, 0xD376, 0xD376 }, -{ 0xD377, 0xD377, 0xD377 }, -{ 0xD378, 0xD378, 0xD378 }, -{ 0xD379, 0xD379, 0xD379 }, -{ 0xD37A, 0xD37A, 0xD37A }, -{ 0xD37B, 0xD37B, 0xD37B }, -{ 0xD37C, 0xD37C, 0xD37C }, -{ 0xD37D, 0xD37D, 0xD37D }, -{ 0xD37E, 0xD37E, 0xD37E }, -{ 0xD37F, 0xD37F, 0xD37F }, -{ 0xD380, 0xD380, 0xD380 }, -{ 0xD381, 0xD381, 0xD381 }, -{ 0xD382, 0xD382, 0xD382 }, -{ 0xD383, 0xD383, 0xD383 }, -{ 0xD384, 0xD384, 0xD384 }, -{ 0xD385, 0xD385, 0xD385 }, -{ 0xD386, 0xD386, 0xD386 }, -{ 0xD387, 0xD387, 0xD387 }, -{ 0xD388, 0xD388, 0xD388 }, -{ 0xD389, 0xD389, 0xD389 }, -{ 0xD38A, 0xD38A, 0xD38A }, -{ 0xD38B, 0xD38B, 0xD38B }, -{ 0xD38C, 0xD38C, 0xD38C }, -{ 0xD38D, 0xD38D, 0xD38D }, -{ 0xD38E, 0xD38E, 0xD38E }, -{ 0xD38F, 0xD38F, 0xD38F }, -{ 0xD390, 0xD390, 0xD390 }, -{ 0xD391, 0xD391, 0xD391 }, -{ 0xD392, 0xD392, 0xD392 }, -{ 0xD393, 0xD393, 0xD393 }, -{ 0xD394, 0xD394, 0xD394 }, -{ 0xD395, 0xD395, 0xD395 }, -{ 0xD396, 0xD396, 0xD396 }, -{ 0xD397, 0xD397, 0xD397 }, -{ 0xD398, 0xD398, 0xD398 }, -{ 0xD399, 0xD399, 0xD399 }, -{ 0xD39A, 0xD39A, 0xD39A }, -{ 0xD39B, 0xD39B, 0xD39B }, -{ 0xD39C, 0xD39C, 0xD39C }, -{ 0xD39D, 0xD39D, 0xD39D }, -{ 0xD39E, 0xD39E, 0xD39E }, -{ 0xD39F, 0xD39F, 0xD39F }, -{ 0xD3A0, 0xD3A0, 0xD3A0 }, -{ 0xD3A1, 0xD3A1, 0xD3A1 }, -{ 0xD3A2, 0xD3A2, 0xD3A2 }, -{ 0xD3A3, 0xD3A3, 0xD3A3 }, -{ 0xD3A4, 0xD3A4, 0xD3A4 }, -{ 0xD3A5, 0xD3A5, 0xD3A5 }, -{ 0xD3A6, 0xD3A6, 0xD3A6 }, -{ 0xD3A7, 0xD3A7, 0xD3A7 }, -{ 0xD3A8, 0xD3A8, 0xD3A8 }, -{ 0xD3A9, 0xD3A9, 0xD3A9 }, -{ 0xD3AA, 0xD3AA, 0xD3AA }, -{ 0xD3AB, 0xD3AB, 0xD3AB }, -{ 0xD3AC, 0xD3AC, 0xD3AC }, -{ 0xD3AD, 0xD3AD, 0xD3AD }, -{ 0xD3AE, 0xD3AE, 0xD3AE }, -{ 0xD3AF, 0xD3AF, 0xD3AF }, -{ 0xD3B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D3F7 }, -{ 0xD3F8, 0xD3F8, 0xD3F8 }, -{ 0xD3F9, 0xD3F9, 0xD3F9 }, -{ 0xD3FA, 0xD3FA, 0xD3FA }, -{ 0xD3FB, 0xD3FB, 0xD3FB }, -{ 0xD3FC, 0xD3FC, 0xD3FC }, -{ 0xD3FD, 0xD3FD, 0xD3FD }, -{ 0xD3FE, 0xD3FE, 0xD3FE }, -{ 0xD3FF, 0xD3FF, 0xD3FF }, -{ 0xD400, 0xD400, 0xD400 }, -{ 0xD401, 0xD401, 0xD401 }, -{ 0xD402, 0xD402, 0xD402 }, -{ 0xD403, 0xD403, 0xD403 }, -{ 0xD404, 0xD404, 0xD404 }, -{ 0xD405, 0xD405, 0xD405 }, -{ 0xD406, 0xD406, 0xD406 }, -{ 0xD407, 0xD407, 0xD407 }, -{ 0xD408, 0xD408, 0xD408 }, -{ 0xD409, 0xD409, 0xD409 }, -{ 0xD40A, 0xD40A, 0xD40A }, -{ 0xD40B, 0xD40B, 0xD40B }, -{ 0xD40C, 0xD40C, 0xD40C }, -{ 0xD40D, 0xD40D, 0xD40D }, -{ 0xD40E, 0xD40E, 0xD40E }, -{ 0xD40F, 0xD40F, 0xD40F }, -{ 0xD410, 0xD410, 0xD410 }, -{ 0xD411, 0xD411, 0xD411 }, -{ 0xD412, 0xD412, 0xD412 }, -{ 0xD413, 0xD413, 0xD413 }, -{ 0xD414, 0xD414, 0xD414 }, -{ 0xD415, 0xD415, 0xD415 }, -{ 0xD416, 0xD416, 0xD416 }, -{ 0xD417, 0xD417, 0xD417 }, -{ 0xD418, 0xD418, 0xD418 }, -{ 0xD419, 0xD419, 0xD419 }, -{ 0xD41A, 0xD41A, 0xD41A }, -{ 0xD41B, 0xD41B, 0xD41B }, -{ 0xD41C, 0xD41C, 0xD41C }, -{ 0xD41D, 0xD41D, 0xD41D }, -{ 0xD41E, 0xD41E, 0xD41E }, -{ 0xD41F, 0xD41F, 0xD41F }, -{ 0xD420, 0xD420, 0xD420 }, -{ 0xD421, 0xD421, 0xD421 }, -{ 0xD422, 0xD422, 0xD422 }, -{ 0xD423, 0xD423, 0xD423 }, -{ 0xD424, 0xD424, 0xD424 }, -{ 0xD425, 0xD425, 0xD425 }, -{ 0xD426, 0xD426, 0xD426 }, -{ 0xD427, 0xD427, 0xD427 }, -{ 0xD428, 0xD428, 0xD428 }, -{ 0xD429, 0xD429, 0xD429 }, -{ 0xD42A, 0xD42A, 0xD42A }, -{ 0xD42B, 0xD42B, 0xD42B }, -{ 0xD42C, 0xD42C, 0xD42C }, -{ 0xD42D, 0xD42D, 0xD42D }, -{ 0xD42E, 0xD42E, 0xD42E }, -{ 0xD42F, 0xD42F, 0xD42F }, -{ 0xD430, 0xD430, 0xD430 }, -{ 0xD431, 0xD431, 0xD431 }, -{ 0xD432, 0xD432, 0xD432 }, -{ 0xD433, 0xD433, 0xD433 }, -{ 0xD434, 0xD434, 0xD434 }, -{ 0xD435, 0xD435, 0xD435 }, -{ 0xD436, 0xD436, 0xD436 }, -{ 0xD437, 0xD437, 0xD437 }, -{ 0xD438, 0xD438, 0xD438 }, -{ 0xD439, 0xD439, 0xD439 }, -{ 0xD43A, 0xD43A, 0xD43A }, -{ 0xD43B, 0xD43B, 0xD43B }, -{ 0xD43C, 0xD43C, 0xD43C }, -{ 0xD43D, 0xD43D, 0xD43D }, -{ 0xD43E, 0xD43E, 0xD43E }, -{ 0xD43F, 0xD43F, 0xD43F }, -{ 0xD440, 0xD440, 0xD440 }, -{ 0xD441, 0xD441, 0xD441 }, -{ 0xD442, 0xD442, 0xD442 }, -{ 0xD443, 0xD443, 0xD443 }, -{ 0xD444, 0xD444, 0xD444 }, -{ 0xD445, 0xD445, 0xD445 }, -{ 0xD446, 0xD446, 0xD446 }, -{ 0xD447, 0xD447, 0xD447 }, -{ 0xD448, 0xD448, 0xD448 }, -{ 0xD449, 0xD449, 0xD449 }, -{ 0xD44A, 0xD44A, 0xD44A }, -{ 0xD44B, 0xD44B, 0xD44B }, -{ 0xD44C, 0xD44C, 0xD44C }, -{ 0xD44D, 0xD44D, 0xD44D }, -{ 0xD44E, 0xD44E, 0xD44E }, -{ 0xD44F, 0xD44F, 0xD44F }, -{ 0xD450, 0xD450, 0xD450 }, -{ 0xD451, 0xD451, 0xD451 }, -{ 0xD452, 0xD452, 0xD452 }, -{ 0xD453, 0xD453, 0xD453 }, -{ 0xD454, 0xD454, 0xD454 }, -{ 0xD455, 0xD455, 0xD455 }, -{ 0xD456, 0xD456, 0xD456 }, -{ 0xD457, 0xD457, 0xD457 }, -{ 0xD458, 0xD458, 0xD458 }, -{ 0xD459, 0xD459, 0xD459 }, -{ 0xD45A, 0xD45A, 0xD45A }, -{ 0xD45B, 0xD45B, 0xD45B }, -{ 0xD45C, 0xD45C, 0xD45C }, -{ 0xD45D, 0xD45D, 0xD45D }, -{ 0xD45E, 0xD45E, 0xD45E }, -{ 0xD45F, 0xD45F, 0xD45F }, -{ 0xD460, 0xD460, 0xD460 }, -{ 0xD461, 0xD461, 0xD461 }, -{ 0xD462, 0xD462, 0xD462 }, -{ 0xD463, 0xD463, 0xD463 }, -{ 0xD464, 0xD464, 0xD464 }, -{ 0xD465, 0xD465, 0xD465 }, -{ 0xD466, 0xD466, 0xD466 }, -{ 0xD467, 0xD467, 0xD467 }, -{ 0xD468, 0xD468, 0xD468 }, -{ 0xD469, 0xD469, 0xD469 }, -{ 0xD46A, 0xD46A, 0xD46A }, -{ 0xD46B, 0xD46B, 0xD46B }, -{ 0xD46C, 0xD46C, 0xD46C }, -{ 0xD46D, 0xD46D, 0xD46D }, -{ 0xD46E, 0xD46E, 0xD46E }, -{ 0xD46F, 0xD46F, 0xD46F }, -{ 0xD470, 0xD470, 0xD470 }, -{ 0xD471, 0xD471, 0xD471 }, -{ 0xD472, 0xD472, 0xD472 }, -{ 0xD473, 0xD473, 0xD473 }, -{ 0xD474, 0xD474, 0xD474 }, -{ 0xD475, 0xD475, 0xD475 }, -{ 0xD476, 0xD476, 0xD476 }, -{ 0xD477, 0xD477, 0xD477 }, -{ 0xD478, 0xD478, 0xD478 }, -{ 0xD479, 0xD479, 0xD479 }, -{ 0xD47A, 0xD47A, 0xD47A }, -{ 0xD47B, 0xD47B, 0xD47B }, -{ 0xD47C, 0xD47C, 0xD47C }, -{ 0xD47D, 0xD47D, 0xD47D }, -{ 0xD47E, 0xD47E, 0xD47E }, -{ 0xD47F, 0xD47F, 0xD47F }, -{ 0xD480, 0xD480, 0xD480 }, -{ 0xD481, 0xD481, 0xD481 }, -{ 0xD482, 0xD482, 0xD482 }, -{ 0xD483, 0xD483, 0xD483 }, -{ 0xD484, 0xD484, 0xD484 }, -{ 0xD485, 0xD485, 0xD485 }, -{ 0xD486, 0xD486, 0xD486 }, -{ 0xD487, 0xD487, 0xD487 }, -{ 0xD488, 0xD488, 0xD488 }, -{ 0xD489, 0xD489, 0xD489 }, -{ 0xD48A, 0xD48A, 0xD48A }, -{ 0xD48B, 0xD48B, 0xD48B }, -{ 0xD48C, 0xD48C, 0xD48C }, -{ 0xD48D, 0xD48D, 0xD48D }, -{ 0xD48E, 0xD48E, 0xD48E }, -{ 0xD48F, 0xD48F, 0xD48F }, -{ 0xD490, 0xD490, 0xD490 }, -{ 0xD491, 0xD491, 0xD491 }, -{ 0xD492, 0xD492, 0xD492 }, -{ 0xD493, 0xD493, 0xD493 }, -{ 0xD494, 0xD494, 0xD494 }, -{ 0xD495, 0xD495, 0xD495 }, -{ 0xD496, 0xD496, 0xD496 }, -{ 0xD497, 0xD497, 0xD497 }, -{ 0xD498, 0xD498, 0xD498 }, -{ 0xD499, 0xD499, 0xD499 }, -{ 0xD49A, 0xD49A, 0xD49A }, -{ 0xD49B, 0xD49B, 0xD49B }, -{ 0xD49C, 0xD49C, 0xD49C }, -{ 0xD49D, 0xD49D, 0xD49D }, -{ 0xD49E, 0xD49E, 0xD49E }, -{ 0xD49F, 0xD49F, 0xD49F }, -{ 0xD4A0, 0xD4A0, 0xD4A0 }, -{ 0xD4A1, 0xD4A1, 0xD4A1 }, -{ 0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510, 0xD510, 0xD510 }, -{ 0xD511, 0xD511, 0xD511 }, -{ 0xD512, 0xD512, 0xD512 }, -{ 0xD513, 0xD513, 0xD513 }, -{ 0xD514, 0xD514, 0xD514 }, -{ 0xD515, 0xD515, 0xD515 }, -{ 0xD516, 0xD516, 0xD516 }, -{ 0xD517, 0xD517, 0xD517 }, -{ 0xD518, 0xD518, 0xD518 }, -{ 0xD519, 0xD519, 0xD519 }, -{ 0xD51A, 0xD51A, 0xD51A }, -{ 0xD51B, 0xD51B, 0xD51B }, -{ 0xD51C, 0xD51C, 0xD51C }, -{ 0xD51D, 0xD51D, 0xD51D }, -{ 0xD51E, 0xD51E, 0xD51E }, -{ 0xD51F, 0xD51F, 0xD51F }, -{ 0xD520, 0xD520, 0xD520 }, -{ 0xD521, 0xD521, 0xD521 }, -{ 0xD522, 0xD522, 0xD522 }, -{ 0xD523, 0xD523, 0xD523 }, -{ 0xD524, 0xD524, 0xD524 }, -{ 0xD525, 0xD525, 0xD525 }, -{ 0xD526, 0xD526, 0xD526 }, -{ 0xD527, 0xD527, 0xD527 }, -{ 0xD528, 0xD528, 0xD528 }, -{ 0xD529, 0xD529, 0xD529 }, -{ 0xD52A, 0xD52A, 0xD52A }, -{ 0xD52B, 0xD52B, 0xD52B }, -{ 0xD52C, 0xD52C, 0xD52C }, -{ 0xD52D, 0xD52D, 0xD52D }, -{ 0xD52E, 0xD52E, 0xD52E }, -{ 0xD52F, 0xD52F, 0xD52F }, -{ 0xD530, 0xD530, 0xD530 }, -{ 0xD531, 0xD531, 0xD531 }, -{ 0xD532, 0xD532, 0xD532 }, -{ 0xD533, 0xD533, 0xD533 }, -{ 0xD534, 0xD534, 0xD534 }, -{ 0xD535, 0xD535, 0xD535 }, -{ 0xD536, 0xD536, 0xD536 }, -{ 0xD537, 0xD537, 0xD537 }, -{ 0xD538, 0xD538, 0xD538 }, -{ 0xD539, 0xD539, 0xD539 }, -{ 0xD53A, 0xD53A, 0xD53A }, -{ 0xD53B, 0xD53B, 0xD53B }, -{ 0xD53C, 0xD53C, 0xD53C }, -{ 0xD53D, 0xD53D, 0xD53D }, -{ 0xD53E, 0xD53E, 0xD53E }, -{ 0xD53F, 0xD53F, 0xD53F }, -{ 0xD540, 0xD540, 0xD540 }, -{ 0xD541, 0xD541, 0xD541 }, -{ 0xD542, 0xD542, 0xD542 }, -{ 0xD543, 0xD543, 0xD543 }, -{ 0xD544, 0xD544, 0xD544 }, -{ 0xD545, 0xD545, 0xD545 }, -{ 0xD546, 0xD546, 0xD546 }, -{ 0xD547, 0xD547, 0xD547 }, -{ 0xD548, 0xD548, 0xD548 }, -{ 0xD549, 0xD549, 0xD549 }, -{ 0xD54A, 0xD54A, 0xD54A }, -{ 0xD54B, 0xD54B, 0xD54B }, -{ 0xD54C, 0xD54C, 0xD54C }, -{ 0xD54D, 0xD54D, 0xD54D }, -{ 0xD54E, 0xD54E, 0xD54E }, -{ 0xD54F, 0xD54F, 0xD54F }, -{ 0xD550, 0xD550, 0xD550 }, -{ 0xD551, 0xD551, 0xD551 }, -{ 0xD552, 0xD552, 0xD552 }, -{ 0xD553, 0xD553, 0xD553 }, -{ 0xD554, 0xD554, 0xD554 }, -{ 0xD555, 0xD555, 0xD555 }, -{ 0xD556, 0xD556, 0xD556 }, -{ 0xD557, 0xD557, 0xD557 }, -{ 0xD558, 0xD558, 0xD558 }, -{ 0xD559, 0xD559, 0xD559 }, -{ 0xD55A, 0xD55A, 0xD55A }, -{ 0xD55B, 0xD55B, 0xD55B }, -{ 0xD55C, 0xD55C, 0xD55C }, -{ 0xD55D, 0xD55D, 0xD55D }, -{ 0xD55E, 0xD55E, 0xD55E }, -{ 0xD55F, 0xD55F, 0xD55F }, -{ 0xD560, 0xD560, 0xD560 }, -{ 0xD561, 0xD561, 0xD561 }, -{ 0xD562, 0xD562, 0xD562 }, -{ 0xD563, 0xD563, 0xD563 }, -{ 0xD564, 0xD564, 0xD564 }, -{ 0xD565, 0xD565, 0xD565 }, -{ 0xD566, 0xD566, 0xD566 }, -{ 0xD567, 0xD567, 0xD567 }, -{ 0xD568, 0xD568, 0xD568 }, -{ 0xD569, 0xD569, 0xD569 }, -{ 0xD56A, 0xD56A, 0xD56A }, -{ 0xD56B, 0xD56B, 0xD56B }, -{ 0xD56C, 0xD56C, 0xD56C }, -{ 0xD56D, 0xD56D, 0xD56D }, -{ 0xD56E, 0xD56E, 0xD56E }, -{ 0xD56F, 0xD56F, 0xD56F }, -{ 0xD570, 0xD570, 0xD570 }, -{ 0xD571, 0xD571, 0xD571 }, -{ 0xD572, 0xD572, 0xD572 }, -{ 0xD573, 0xD573, 0xD573 }, -{ 0xD574, 0xD574, 0xD574 }, -{ 0xD575, 0xD575, 0xD575 }, -{ 0xD576, 0xD576, 0xD576 }, -{ 0xD577, 0xD577, 0xD577 }, -{ 0xD578, 0xD578, 0xD578 }, -{ 0xD579, 0xD579, 0xD579 }, -{ 0xD57A, 0xD57A, 0xD57A }, -{ 0xD57B, 0xD57B, 0xD57B }, -{ 0xD57C, 0xD57C, 0xD57C }, -{ 0xD57D, 0xD57D, 0xD57D }, -{ 0xD57E, 0xD57E, 0xD57E }, -{ 0xD57F, 0xD57F, 0xD57F }, -{ 0xD580, 0xD580, 0xD580 }, -{ 0xD581, 0xD581, 0xD581 }, -{ 0xD582, 0xD582, 0xD582 }, -{ 0xD583, 0xD583, 0xD583 }, -{ 0xD584, 0xD584, 0xD584 }, -{ 0xD585, 0xD585, 0xD585 }, -{ 0xD586, 0xD586, 0xD586 }, -{ 0xD587, 0xD587, 0xD587 }, -{ 0xD588, 0xD588, 0xD588 }, -{ 0xD589, 0xD589, 0xD589 }, -{ 0xD58A, 0xD58A, 0xD58A }, -{ 0xD58B, 0xD58B, 0xD58B }, -{ 0xD58C, 0xD58C, 0xD58C }, -{ 0xD58D, 0xD58D, 0xD58D }, -{ 0xD58E, 0xD58E, 0xD58E }, -{ 0xD58F, 0xD58F, 0xD58F }, -{ 0xD590, 0xD590, 0xD590 }, -{ 0xD591, 0xD591, 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 0xD5FF, 0xD5FF }, -{ 0xD600, 0xD600, 0xD600 }, -{ 0xD601, 0xD601, 0xD601 }, -{ 0xD602, 0xD602, 0xD602 }, -{ 0xD603, 0xD603, 0xD603 }, -{ 0xD604, 0xD604, 0xD604 }, -{ 0xD605, 0xD605, 0xD605 }, -{ 0xD606, 0xD606, 0xD606 }, -{ 0xD607, 0xD607, 0xD607 }, -{ 0xD608, 0xD608, 0xD608 }, -{ 0xD609, 0xD609, 0xD609 }, -{ 0xD60A, 0xD60A, 0xD60A }, -{ 0xD60B, 0xD60B, 0xD60B }, -{ 0xD60C, 0xD60C, 0xD60C }, -{ 0xD60D, 0xD60D, 0xD60D }, -{ 0xD60E, 0xD60E, 0xD60E }, -{ 0xD60F, 0xD60F, 0xD60F }, -{ 0xD610, 0xD610, 0xD610 }, -{ 0xD611, 0xD611, 0xD611 }, -{ 0xD612, 0xD612, 0xD612 }, -{ 0xD613, 0xD613, 0xD613 }, -{ 0xD614, 0xD614, 0xD614 }, -{ 0xD615, 0xD615, 0xD615 }, -{ 0xD616, 0xD616, 0xD616 }, -{ 0xD617, 0xD617, 0xD617 }, -{ 0xD618, 0xD618, 0xD618 }, -{ 0xD619, 0xD619, 0xD619 }, -{ 0xD61A, 0xD61A, 0xD61A }, -{ 0xD61B, 0xD61B, 0xD61B }, -{ 0xD61C, 0xD61C, 0xD61C }, -{ 0xD61D, 0xD61D, 0xD61D }, -{ 0xD61E, 0xD61E, 0xD61E }, -{ 0xD61F, 0xD61F, 0xD61F }, -{ 0xD620, 0xD620, 0xD620 }, -{ 0xD621, 0xD621, 0xD621 }, -{ 0xD622, 0xD622, 0xD622 }, -{ 0xD623, 0xD623, 0xD623 }, -{ 0xD624, 0xD624, 0xD624 }, -{ 0xD625, 0xD625, 0xD625 }, -{ 0xD626, 0xD626, 0xD626 }, -{ 0xD627, 0xD627, 0xD627 }, -{ 0xD628, 0xD628, 0xD628 }, -{ 0xD629, 0xD629, 0xD629 }, -{ 0xD62A, 0xD62A, 0xD62A }, -{ 0xD62B, 0xD62B, 0xD62B }, -{ 0xD62C, 0xD62C, 0xD62C }, -{ 0xD62D, 0xD62D, 0xD62D }, -{ 0xD62E, 0xD62E, 0xD62E }, -{ 0xD62F, 0xD62F, 0xD62F }, -{ 0xD630, 0xD630, 0xD630 }, -{ 0xD631, 0xD631, 0xD631 }, -{ 0xD632, 0xD632, 0xD632 }, -{ 0xD633, 0xD633, 0xD633 }, -{ 0xD634, 0xD634, 0xD634 }, -{ 0xD635, 0xD635, 0xD635 }, -{ 0xD636, 0xD636, 0xD636 }, -{ 0xD637, 0xD637, 0xD637 }, -{ 0xD638, 0xD638, 0xD638 }, -{ 0xD639, 0xD639, 0xD639 }, -{ 0xD63A, 0xD63A, 0xD63A }, -{ 0xD63B, 0xD63B, 0xD63B }, -{ 0xD63C, 0xD63C, 0xD63C }, -{ 0xD63D, 0xD63D, 0xD63D }, -{ 0xD63E, 0xD63E, 0xD63E }, -{ 0xD63F, 0xD63F, 0xD63F }, -{ 0xD640, 0xD640, 0xD640 }, -{ 0xD641, 0xD641, 0xD641 }, -{ 0xD642, 0xD642, 0xD642 }, -{ 0xD643, 0xD643, 0xD643 }, -{ 0xD644, 0xD644, 0xD644 }, -{ 0xD645, 0xD645, 0xD645 }, -{ 0xD646, 0xD646, 0xD646 }, -{ 0xD647, 0xD647, 0xD647 }, -{ 0xD648, 0xD648, 0xD648 }, -{ 0xD649, 0xD649, 0xD649 }, -{ 0xD64A, 0xD64A, 0xD64A }, -{ 0xD64B, 0xD64B, 0xD64B }, -{ 0xD64C, 0xD64C, 0xD64C }, -{ 0xD64D, 0xD64D, 0xD64D }, -{ 0xD64E, 0xD64E, 0xD64E }, -{ 0xD64F, 0xD64F, 0xD64F }, -{ 0xD650, 0xD650, 0xD650 }, -{ 0xD651, 0xD651, 0xD651 }, -{ 0xD652, 0xD652, 0xD652 }, -{ 0xD653, 0xD653, 0xD653 }, -{ 0xD654, 0xD654, 0xD654 }, -{ 0xD655, 0xD655, 0xD655 }, -{ 0xD656, 0xD656, 0xD656 }, -{ 0xD657, 0xD657, 0xD657 }, -{ 0xD658, 0xD658, 0xD658 }, -{ 0xD659, 0xD659, 0xD659 }, -{ 0xD65A, 0xD65A, 0xD65A }, -{ 0xD65B, 0xD65B, 0xD65B }, -{ 0xD65C, 0xD65C, 0xD65C }, -{ 0xD65D, 0xD65D, 0xD65D }, -{ 0xD65E, 0xD65E, 0xD65E }, -{ 0xD65F, 0xD65F, 0xD65F }, -{ 0xD660, 0xD660, 0xD660 }, -{ 0xD661, 0xD661, 0xD661 }, -{ 0xD662, 0xD662, 0xD662 }, -{ 0xD663, 0xD663, 0xD663 }, -{ 0xD664, 0xD664, 0xD664 }, -{ 0xD665, 0xD665, 0xD665 }, -{ 0xD666, 0xD666, 0xD666 }, -{ 0xD667, 0xD667, 0xD667 }, -{ 0xD668, 0xD668, 0xD668 }, -{ 0xD669, 0xD669, 0xD669 }, -{ 0xD66A, 0xD66A, 0xD66A }, -{ 0xD66B, 0xD66B, 0xD66B }, -{ 0xD66C, 0xD66C, 0xD66C }, -{ 0xD66D, 0xD66D, 0xD66D }, -{ 0xD66E, 0xD66E, 0xD66E }, -{ 0xD66F, 0xD66F, 0xD66F }, -{ 0xD670, 0xD670, 0xD670 }, -{ 0xD671, 0xD671, 0xD671 }, -{ 0xD672, 0xD672, 0xD672 }, -{ 0xD673, 0xD673, 0xD673 }, -{ 0xD674, 0xD674, 0xD674 }, -{ 0xD675, 0xD675, 0xD675 }, -{ 0xD676, 0xD676, 0xD676 }, -{ 0xD677, 0xD677, 0xD677 }, -{ 0xD678, 0xD678, 0xD678 }, -{ 0xD679, 0xD679, 0xD679 }, -{ 0xD67A, 0xD67A, 0xD67A }, -{ 0xD67B, 0xD67B, 0xD67B }, -{ 0xD67C, 0xD67C, 0xD67C }, -{ 0xD67D, 0xD67D, 0xD67D }, -{ 0xD67E, 0xD67E, 0xD67E }, -{ 0xD67F, 0xD67F, 0xD67F }, -{ 0xD680, 0xD680, 0xD680 }, -{ 0xD681, 0xD681, 0xD681 }, -{ 0xD682, 0xD682, 0xD682 }, -{ 0xD683, 0xD683, 0xD683 }, -{ 0xD684, 0xD684, 0xD684 }, -{ 0xD685, 0xD685, 0xD685 }, -{ 0xD686, 0xD686, 0xD686 }, -{ 0xD687, 0xD687, 0xD687 }, -{ 0xD688, 0xD688, 0xD688 }, -{ 0xD689, 0xD689, 0xD689 }, -{ 0xD68A, 0xD68A, 0xD68A }, -{ 0xD68B, 0xD68B, 0xD68B }, -{ 0xD68C, 0xD68C, 0xD68C }, -{ 0xD68D, 0xD68D, 0xD68D }, -{ 0xD68E, 0xD68E, 0xD68E }, -{ 0xD68F, 0xD68F, 0xD68F }, -{ 0xD690, 0xD690, 0xD690 }, -{ 0xD691, 0xD691, 0xD691 }, -{ 0xD692, 0xD692, 0xD692 }, -{ 0xD693, 0xD693, 0xD693 }, -{ 0xD694, 0xD694, 0xD694 }, -{ 0xD695, 0xD695, 0xD695 }, -{ 0xD696, 0xD696, 0xD696 }, -{ 0xD697, 0xD697, 0xD697 }, -{ 0xD698, 0xD698, 0xD698 }, -{ 0xD699, 0xD699, 0xD699 }, -{ 0xD69A, 0xD69A, 0xD69A }, -{ 0xD69B, 0xD69B, 0xD69B }, -{ 0xD69C, 0xD69C, 0xD69C }, -{ 0xD69D, 0xD69D, 0xD69D }, -{ 0xD69E, 0xD69E, 0xD69E }, -{ 0xD69F, 0xD69F, 0xD69F }, -{ 0xD6A0, 0xD6A0, 0xD6A0 }, -{ 0xD6A1, 0xD6A1, 0xD6A1 }, -{ 0xD6A2, 0xD6A2, 0xD6A2 }, -{ 0xD6A3, 0xD6A3, 0xD6A3 }, -{ 0xD6A4, 0xD6A4, 0xD6A4 }, -{ 0xD6A5, 0xD6A5, 0xD6A5 }, -{ 0xD6A6, 0xD6A6, 0xD6A6 }, -{ 0xD6A7, 0xD6A7, 0xD6A7 }, -{ 0xD6A8, 0xD6A8, 0xD6A8 }, -{ 0xD6A9, 0xD6A9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F1, 0xD6F1, 0xD6F1 }, -{ 0xD6F2, 0xD6F2, 0xD6F2 }, -{ 0xD6F3, 0xD6F3, 0xD6F3 }, -{ 0xD6F4, 0xD6F4, 0xD6F4 }, -{ 0xD6F5, 0xD6F5, 0xD6F5 }, -{ 0xD6F6, 0xD6F6, 0xD6F6 }, -{ 0xD6F7, 0xD6F7, 0xD6F7 }, -{ 0xD6F8, 0xD6F8, 0xD6F8 }, -{ 0xD6F9, 0xD6F9, 0xD6F9 }, -{ 0xD6FA, 0xD6FA, 0xD6FA }, -{ 0xD6FB, 0xD6FB, 0xD6FB }, -{ 0xD6FC, 0xD6FC, 0xD6FC }, -{ 0xD6FD, 0xD6FD, 0xD6FD }, -{ 0xD6FE, 0xD6FE, 0xD6FE }, -{ 0xD6FF, 0xD6FF, 0xD6FF }, -{ 0xD700, 0xD700, 0xD700 }, -{ 0xD701, 0xD701, 0xD701 }, -{ 0xD702, 0xD702, 0xD702 }, -{ 0xD703, 0xD703, 0xD703 }, -{ 0xD704, 0xD704, 0xD704 }, -{ 0xD705, 0xD705, 0xD705 }, -{ 0xD706, 0xD706, 0xD706 }, -{ 0xD707, 0xD707, 0xD707 }, -{ 0xD708, 0xD708, 0xD708 }, -{ 0xD709, 0xD709, 0xD709 }, -{ 0xD70A, 0xD70A, 0xD70A }, -{ 0xD70B, 0xD70B, 0xD70B }, -{ 0xD70C, 0xD70C, 0xD70C }, -{ 0xD70D, 0xD70D, 0xD70D }, -{ 0xD70E, 0xD70E, 0xD70E }, -{ 0xD70F, 0xD70F, 0xD70F }, -{ 0xD710, 0xD710, 0xD710 }, -{ 0xD711, 0xD711, 0xD711 }, -{ 0xD712, 0xD712, 0xD712 }, -{ 0xD713, 0xD713, 0xD713 }, -{ 0xD714, 0xD714, 0xD714 }, -{ 0xD715, 0xD715, 0xD715 }, -{ 0xD716, 0xD716, 0xD716 }, -{ 0xD717, 0xD717, 0xD717 }, -{ 0xD718, 0xD718, 0xD718 }, -{ 0xD719, 0xD719, 0xD719 }, -{ 0xD71A, 0xD71A, 0xD71A }, -{ 0xD71B, 0xD71B, 0xD71B }, -{ 0xD71C, 0xD71C, 0xD71C }, -{ 0xD71D, 0xD71D, 0xD71D }, -{ 0xD71E, 0xD71E, 0xD71E }, -{ 0xD71F, 0xD71F, 0xD71F }, -{ 0xD720, 0xD720, 0xD720 }, -{ 0xD721, 0xD721, 0xD721 }, -{ 0xD722, 0xD722, 0xD722 }, -{ 0xD723, 0xD723, 0xD723 }, -{ 0xD724, 0xD724, 0xD724 }, -{ 0xD725, 0xD725, 0xD725 }, -{ 0xD726, 0xD726, 0xD726 }, -{ 0xD727, 0xD727, 0xD727 }, -{ 0xD728, 0xD728, 0xD728 }, -{ 0xD729, 0xD729, 0xD729 }, -{ 0xD72A, 0xD72A, 0xD72A }, -{ 0xD72B, 0xD72B, 0xD72B }, -{ 0xD72C, 0xD72C, 0xD72C }, -{ 0xD72D, 0xD72D, 0xD72D }, -{ 0xD72E, 0xD72E, 0xD72E }, -{ 0xD72F, 0xD72F, 0xD72F }, -{ 0xD730, 0xD730, 0xD730 }, -{ 0xD731, 0xD731, 0xD731 }, -{ 0xD732, 0xD732, 0xD732 }, -{ 0xD733, 0xD733, 0xD733 }, -{ 0xD734, 0xD734, 0xD734 }, -{ 0xD735, 0xD735, 0xD735 }, -{ 0xD736, 0xD736, 0xD736 }, -{ 0xD737, 0xD737, 0xD737 }, -{ 0xD738, 0xD738, 0xD738 }, -{ 0xD739, 0xD739, 0xD739 }, -{ 0xD73A, 0xD73A, 0xD73A }, -{ 0xD73B, 0xD73B, 0xD73B }, -{ 0xD73C, 0xD73C, 0xD73C }, -{ 0xD73D, 0xD73D, 0xD73D }, -{ 0xD73E, 0xD73E, 0xD73E }, -{ 0xD73F, 0xD73F, 0xD73F }, -{ 0xD740, 0xD740, 0xD740 }, -{ 0xD741, 0xD741, 0xD741 }, -{ 0xD742, 0xD742, 0xD742 }, -{ 0xD743, 0xD743, 0xD743 }, -{ 0xD744, 0xD744, 0xD744 }, -{ 0xD745, 0xD745, 0xD745 }, -{ 0xD746, 0xD746, 0xD746 }, -{ 0xD747, 0xD747, 0xD747 }, -{ 0xD748, 0xD748, 0xD748 }, -{ 0xD749, 0xD749, 0xD749 }, -{ 0xD74A, 0xD74A, 0xD74A }, -{ 0xD74B, 0xD74B, 0xD74B }, -{ 0xD74C, 0xD74C, 0xD74C }, -{ 0xD74D, 0xD74D, 0xD74D }, -{ 0xD74E, 0xD74E, 0xD74E }, -{ 0xD74F, 0xD74F, 0xD74F }, -{ 0xD750, 0xD750, 0xD750 }, -{ 0xD751, 0xD751, 0xD751 }, -{ 0xD752, 0xD752, 0xD752 }, -{ 0xD753, 0xD753, 0xD753 }, -{ 0xD754, 0xD754, 0xD754 }, -{ 0xD755, 0xD755, 0xD755 }, -{ 0xD756, 0xD756, 0xD756 }, -{ 0xD757, 0xD757, 0xD757 }, -{ 0xD758, 0xD758, 0xD758 }, -{ 0xD759, 0xD759, 0xD759 }, -{ 0xD75A, 0xD75A, 0xD75A }, -{ 0xD75B, 0xD75B, 0xD75B }, -{ 0xD75C, 0xD75C, 0xD75C }, -{ 0xD75D, 0xD75D, 0xD75D }, -{ 0xD75E, 0xD75E, 0xD75E }, -{ 0xD75F, 0xD75F, 0xD75F }, -{ 0xD760, 0xD760, 0xD760 }, -{ 0xD761, 0xD761, 0xD761 }, -{ 0xD762, 0xD762, 0xD762 }, -{ 0xD763, 0xD763, 0xD763 }, -{ 0xD764, 0xD764, 0xD764 }, -{ 0xD765, 0xD765, 0xD765 }, -{ 0xD766, 0xD766, 0xD766 }, -{ 0xD767, 0xD767, 0xD767 }, -{ 0xD768, 0xD768, 0xD768 }, -{ 0xD769, 0xD769, 0xD769 }, -{ 0xD76A, 0xD76A, 0xD76A }, -{ 0xD76B, 0xD76B, 0xD76B }, -{ 0xD76C, 0xD76C, 0xD76C }, -{ 0xD76D, 0xD76D, 0xD76D }, -{ 0xD76E, 0xD76E, 0xD76E }, -{ 0xD76F, 0xD76F, 0xD76F }, -{ 0xD770, 0xD770, 0xD770 }, -{ 0xD771, 0xD771, 0xD771 }, -{ 0xD772, 0xD772, 0xD772 }, -{ 0xD773, 0xD773, 0xD773 }, -{ 0xD774, 0xD774, 0xD774 }, -{ 0xD775, 0xD775, 0xD775 }, -{ 0xD776, 0xD776, 0xD776 }, -{ 0xD777, 0xD777, 0xD777 }, -{ 0xD778, 0xD778, 0xD778 }, -{ 0xD779, 0xD779, 0xD779 }, -{ 0xD77A, 0xD77A, 0xD77A }, -{ 0xD77B, 0xD77B, 0xD77B }, -{ 0xD77C, 0xD77C, 0xD77C }, -{ 0xD77D, 0xD77D, 0xD77D }, -{ 0xD77E, 0xD77E, 0xD77E }, -{ 0xD77F, 0xD77F, 0xD77F }, -{ 0xD780, 0xD780, 0xD780 }, -{ 0xD781, 0xD781, 0xD781 }, -{ 0xD782, 0xD782, 0xD782 }, -{ 0xD783, 0xD783, 0xD783 }, -{ 0xD784, 0xD784, 0xD784 }, -{ 0xD785, 0xD785, 0xD785 }, -{ 0xD786, 0xD786, 0xD786 }, -{ 0xD787, 0xD787, 0xD787 }, -{ 0xD788, 0xD788, 0xD788 }, -{ 0xD789, 0xD789, 0xD789 }, -{ 0xD78A, 0xD78A, 0xD78A }, -{ 0xD78B, 0xD78B, 0xD78B }, -{ 0xD78C, 0xD78C, 0xD78C }, -{ 0xD78D, 0xD78D, 0xD78D }, -{ 0xD78E, 0xD78E, 0xD78E }, -{ 0xD78F, 0xD78F, 0xD78F }, -{ 0xD790, 0xD790, 0xD790 }, -{ 0xD791, 0xD791, 0xD791 }, -{ 0xD792, 0xD792, 0xD792 }, -{ 0xD793, 0xD793, 0xD793 }, -{ 0xD794, 0xD794, 0xD794 }, -{ 0xD795, 0xD795, 0xD795 }, -{ 0xD796, 0xD796, 0xD796 }, -{ 0xD797, 0xD797, 0xD797 }, -{ 0xD798, 0xD798, 0xD798 }, -{ 0xD799, 0xD799, 0xD799 }, -{ 0xD79A, 0xD79A, 0xD79A }, -{ 0xD79B, 0xD79B, 0xD79B }, -{ 0xD79C, 0xD79C, 0xD79C }, -{ 0xD79D, 0xD79D, 0xD79D }, -{ 0xD79E, 0xD79E, 0xD79E }, -{ 0xD79F, 0xD79F, 0xD79F }, -{ 0xD7A0, 0xD7A0, 0xD7A0 }, -{ 0xD7A1, 0xD7A1, 0xD7A1 }, -{ 0xD7A2, 0xD7A2, 0xD7A2 }, -{ 0xD7A3, 0xD7A3, 0xD7A3 }, -{ 0xF900, 0xF900, 0xF900 }, -{ 0xF901, 0xF901, 0xF901 }, -{ 0xF902, 0xF902, 0xF902 }, -{ 0xF903, 0xF903, 0xF903 }, -{ 0xF904, 0xF904, 0xF904 }, -{ 0xF905, 0xF905, 0xF905 }, -{ 0xF906, 0xF906, 0xF906 }, -{ 0xF907, 0xF907, 0xF907 }, -{ 0xF908, 0xF908, 0xF908 }, -{ 0xF909, 0xF909, 0xF909 }, -{ 0xF90A, 0xF90A, 0xF90A }, -{ 0xF90B, 0xF90B, 0xF90B }, -{ 0xF90C, 0xF90C, 0xF90C }, -{ 0xF90D, 0xF90D, 0xF90D }, -{ 0xF90E, 0xF90E, 0xF90E }, -{ 0xF90F, 0xF90F, 0xF90F }, -{ 0xF910, 0xF910, 0xF910 }, -{ 0xF911, 0xF911, 0xF911 }, -{ 0xF912, 0xF912, 0xF912 }, -{ 0xF913, 0xF913, 0xF913 }, -{ 0xF914, 0xF914, 0xF914 }, -{ 0xF915, 0xF915, 0xF915 }, -{ 0xF916, 0xF916, 0xF916 }, -{ 0xF917, 0xF917, 0xF917 }, -{ 0xF918, 0xF918, 0xF918 }, -{ 0xF919, 0xF919, 0xF919 }, -{ 0xF91A, 0xF91A, 0xF91A }, -{ 0xF91B, 0xF91B, 0xF91B }, -{ 0xF91C, 0xF91C, 0xF91C }, -{ 0xF91D, 0xF91D, 0xF91D }, -{ 0xF91E, 0xF91E, 0xF91E }, -{ 0xF91F, 0xF91F, 0xF91F }, -{ 0xF920, 0xF920, 0xF920 }, -{ 0xF921, 0xF921, 0xF921 }, -{ 0xF922, 0xF922, 0xF922 }, -{ 0xF923, 0xF923, 0xF923 }, -{ 0xF924, 0xF924, 0xF924 }, -{ 0xF925, 0xF925, 0xF925 }, -{ 0xF926, 0xF926, 0xF926 }, -{ 0xF927, 0xF927, 0xF927 }, -{ 0xF928, 0xF928, 0xF928 }, -{ 0xF929, 0xF929, 0xF929 }, -{ 0xF92A, 0xF92A, 0xF92A }, -{ 0xF92B, 0xF92B, 0xF92B }, -{ 0xF92C, 0xF92C, 0xF92C }, -{ 0xF92D, 0xF92D, 0xF92D }, -{ 0xF92E, 0xF92E, 0xF92E }, -{ 0xF92F, 0xF92F, 0xF92F }, -{ 0xF930, 0xF930, 0xF930 }, -{ 0xF931, 0xF931, 0xF931 }, -{ 0xF932, 0xF932, 0xF932 }, -{ 0xF933, 0xF933, 0xF933 }, -{ 0xF934, 0xF934, 0xF934 }, -{ 0xF935, 0xF935, 0xF935 }, -{ 0xF936, 0xF936, 0xF936 }, -{ 0xF937, 0xF937, 0xF937 }, -{ 0xF938, 0xF938, 0xF938 }, -{ 0xF939, 0xF939, 0xF939 }, -{ 0xF93A, 0xF93A, 0xF93A }, -{ 0xF93B, 0xF93B, 0xF93B }, -{ 0xF93C, 0xF93C, 0xF93C }, -{ 0xF93D, 0xF93D, 0xF93D }, -{ 0xF93E, 0xF93E, 0xF93E }, -{ 0xF93F, 0xF93F, 0xF93F }, -{ 0xF940, 0xF940, 0xF940 }, -{ 0xF941, 0xF941, 0xF941 }, -{ 0xF942, 0xF942, 0xF942 }, -{ 0xF943, 0xF943, 0xF943 }, -{ 0xF944, 0xF944, 0xF944 }, -{ 0xF945, 0xF945, 0xF945 }, -{ 0xF946, 0xF946, 0xF946 }, -{ 0xF947, 0xF947, 0xF947 }, -{ 0xF948, 0xF948, 0xF948 }, -{ 0xF949, 0xF949, 0xF949 }, -{ 0xF94A, 0xF94A, 0xF94A }, -{ 0xF94B, 0xF94B, 0xF94B }, -{ 0xF94C, 0xF94C, 0xF94C }, -{ 0xF94D, 0xF94D, 0xF94D }, -{ 0xF94E, 0xF94E, 0xF94E }, -{ 0xF94F, 0xF94F, 0xF94F }, -{ 0xF950, 0xF950, 0xF950 }, -{ 0xF951, 0xF951, 0xF951 }, -{ 0xF952, 0xF952, 0xF952 }, -{ 0xF953, 0xF953, 0xF953 }, -{ 0xF954, 0xF954, 0xF954 }, -{ 0xF955, 0xF955, 0xF955 }, -{ 0xF956, 0xF956, 0xF956 }, -{ 0xF957, 0xF957, 0xF957 }, -{ 0xF958, 0xF958, 0xF958 }, -{ 0xF959, 0xF959, 0xF959 }, -{ 0xF95A, 0xF95A, 0xF95A }, -{ 0xF95B, 0xF95B, 0xF95B }, -{ 0xF95C, 0xF95C, 0xF95C }, -{ 0xF95D, 0xF95D, 0xF95D }, -{ 0xF95E, 0xF95E, 0xF95E }, -{ 0xF95F, 0xF95F, 0xF95F }, -{ 0xF960, 0xF960, 0xF960 }, -{ 0xF961, 0xF961, 0xF961 }, -{ 0xF962, 0xF962, 0xF962 }, -{ 0xF963, 0xF963, 0xF963 }, -{ 0xF964, 0xF964, 0xF964 }, -{ 0xF965, 0xF965, 0xF965 }, -{ 0xF966, 0xF966, 0xF966 }, -{ 0xF967, 0xF967, 0xF967 }, -{ 0xF968, 0xF968, 0xF968 }, -{ 0xF969, 0xF969, 0xF969 }, -{ 0xF96A, 0xF96A, 0xF96A }, -{ 0xF96B, 0xF96B, 0xF96B }, -{ 0xF96C, 0xF96C, 0xF96C }, -{ 0xF96D, 0xF96D, 0xF96D }, -{ 0xF96E, 0xF96E, 0xF96E }, -{ 0xF96F, 0xF96F, 0xF96F }, -{ 0xF970, 0xF970, 0xF970 }, -{ 0xF971, 0xF971, 0xF971 }, -{ 0xF972, 0xF972, 0xF972 }, -{ 0xF973, 0xF973, 0xF973 }, -{ 0xF974, 0xF974, 0xF974 }, -{ 0xF975, 0xF975, 0xF975 }, -{ 0xF976, 0xF976, 0xF976 }, -{ 0xF977, 0xF977, 0xF977 }, -{ 0xF978, 0xF978, 0xF978 }, -{ 0xF979, 0xF979, 0xF979 }, -{ 0xF97A, 0xF97A, 0xF97A }, -{ 0xF97B, 0xF97B, 0xF97B }, -{ 0xF97C, 0xF97C, 0xF97C }, -{ 0xF97D, 0xF97D, 0xF97D }, -{ 0xF97E, 0xF97E, 0xF97E }, -{ 0xF97F, 0xF97F, 0xF97F }, -{ 0xF980, 0xF980, 0xF980 }, -{ 0xF981, 0xF981, 0xF981 }, -{ 0xF982, 0xF982, 0xF982 }, -{ 0xF983, 0xF983, 0xF983 }, -{ 0xF984, 0xF984, 0xF984 }, -{ 0xF985, 0xF985, 0xF985 }, -{ 0xF986, 0xF986, 0xF986 }, -{ 0xF987, 0xF987, 0xF987 }, -{ 0xF988, 0xF988, 0xF988 }, -{ 0xF989, 0xF989, 0xF989 }, -{ 0xF98A, 0xF98A, 0xF98A }, -{ 0xF98B, 0xF98B, 0xF98B }, -{ 0xF98C, 0xF98C, 0xF98C }, -{ 0xF98D, 0xF98D, 0xF98D }, -{ 0xF98E, 0xF98E, 0xF98E }, -{ 0xF98F, 0xF98F, 0xF98F }, -{ 0xF990, 0xF990, 0xF990 }, -{ 0xF991, 0xF991, 0xF991 }, -{ 0xF992, 0xF992, 0xF992 }, -{ 0xF993, 0xF993, 0xF993 }, -{ 0xF994, 0xF994, 0xF994 }, -{ 0xF995, 0xF995, 0xF995 }, -{ 0xF996, 0xF996, 0xF996 }, -{ 0xF997, 0xF997, 0xF997 }, -{ 0xF998, 0xF998, 0xF998 }, -{ 0xF999, 0xF999, 0xF999 }, -{ 0xF99A, 0xF99A, 0xF99A }, -{ 0xF99B, 0xF99B, 0xF99B }, -{ 0xF99C, 0xF99C, 0xF99C }, -{ 0xF99D, 0xF99D, 0xF99D }, -{ 0xF99E, 0xF99E, 0xF99E }, -{ 0xF99F, 0xF99F, 0xF99F }, -{ 0xF9A0, 0xF9A0, 0xF9A0 }, -{ 0xF9A1, 0xF9A1, 0xF9A1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 0xFFD6, 0xFFD6, 0xFFD6 }, -{ 0xFFD7, 0xFFD7, 0xFFD7 }, -{ 0xFFDA, 0xFFDA, 0xFFDA }, -{ 0xFFDB, 0xFFDB, 0xFFDB }, -{ 0xFFDC, 0xFFDC, 0xFFDC } -}; diff --git a/plugins/SpellChecker/hunspell/w_char.hxx b/plugins/SpellChecker/hunspell/w_char.hxx deleted file mode 100644 index 3719dd3b77..0000000000 --- a/plugins/SpellChecker/hunspell/w_char.hxx +++ /dev/null @@ -1,21 +0,0 @@ -#ifndef __WCHARHXX__ -#define __WCHARHXX__ - -#ifndef GCC -typedef struct { -#else -typedef struct __attribute__ ((packed)) { -#endif - unsigned char l; - unsigned char h; -} w_char; - -// two character arrays -struct replentry { - char * pattern; - char * pattern2; - bool start; - bool end; -}; - -#endif diff --git a/plugins/SpellChecker/options.cpp b/plugins/SpellChecker/options.cpp deleted file mode 100644 index 28886b1126..0000000000 --- a/plugins/SpellChecker/options.cpp +++ /dev/null @@ -1,605 +0,0 @@ -/* -Copyright (C) 2006-2010 Ricardo Pescuma Domenecci - -This is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public -License as published by the Free Software Foundation; either -version 2 of the License, or (at your option) any later version. - -This is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with this file; see the file license.txt. If -not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -Boston, MA 02111-1307, USA. -*/ - - -#include "commons.h" - - - -// Prototypes ///////////////////////////////////////////////////////////////////////////////////// - -HANDLE hOptHook = NULL; - -Options opts; - - -static INT_PTR CALLBACK OptionsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam); -static INT_PTR CALLBACK AutoreplaceDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam); - - -static OptPageControl optionsControls[] = { - { &opts.auto_replace_dict, CONTROL_CHECKBOX, IDC_AUTO_DICT, "AutoReplaceDict", FALSE }, - { &opts.ignore_with_numbers, CONTROL_CHECKBOX, IDC_IGNORE_NUMBERS, "IgnoreWithNumbers", FALSE }, - { &opts.ignore_uppercase, CONTROL_CHECKBOX, IDC_IGNORE_UPPERCASE, "IgnoreUppercase", FALSE }, - { &opts.ask_when_sending_with_error, CONTROL_CHECKBOX, IDC_ASK_ON_ERROR, "AskWhenSendingWithError", FALSE }, - { &opts.underline_type, CONTROL_COMBO, IDC_UNDERLINE_TYPE, "UnderlineType", CFU_UNDERLINEWAVE - CFU_UNDERLINEDOUBLE }, - { &opts.cascade_corrections, CONTROL_CHECKBOX, IDC_CASCADE_CORRECTIONS, "CascadeCorrections", FALSE }, - { &opts.show_all_corrections, CONTROL_CHECKBOX, IDC_SHOW_ALL_CORRECTIONS, "ShowAllCorrections", FALSE }, - { &opts.show_wrong_word, CONTROL_CHECKBOX, IDC_SHOW_WRONG_WORD, "ShowWrongWord", TRUE }, - { &opts.use_flags, CONTROL_CHECKBOX, IDC_USE_FLAGS, "UseFlags", TRUE }, - { &opts.auto_locale, CONTROL_CHECKBOX, IDC_AUTO_LOCALE, "AutoLocale", FALSE }, - { &opts.use_other_apps_dicts, CONTROL_CHECKBOX, IDC_OTHER_PROGS, "UseOtherAppsDicts", TRUE }, - { &opts.handle_underscore, CONTROL_CHECKBOX, IDC_HANDLE_UNDERSCORE, "HandleUnderscore", FALSE }, -}; - -static UINT optionsExpertControls[] = { - IDC_ADVANCED, IDC_UNDERLINE_TYPE_L, IDC_UNDERLINE_TYPE, IDC_CASCADE_CORRECTIONS, IDC_SHOW_ALL_CORRECTIONS, - IDC_SHOW_WRONG_WORD, IDC_USE_FLAGS, IDC_AUTO_LOCALE, IDC_OTHER_PROGS, IDC_HANDLE_UNDERSCORE -}; - - -static OptPageControl autoReplaceControls[] = { - { &opts.auto_replace_user, CONTROL_CHECKBOX, IDC_AUTO_USER, "AutoReplaceUser", TRUE }, -}; - - -// Functions ////////////////////////////////////////////////////////////////////////////////////// - - -int InitOptionsCallback(WPARAM wParam,LPARAM lParam) -{ - OPTIONSDIALOGPAGE odp = { 0 }; - odp.cbSize = sizeof(odp); - odp.hInstance = hInst; - odp.pszGroup = LPGEN("Message Sessions"); - odp.pszTitle = LPGEN("Spell Checker"); - odp.pfnDlgProc = OptionsDlgProc; - odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONS); - odp.flags = ODPF_BOLDGROUPS; - odp.nIDBottomSimpleControl = IDC_SPELL_CHECKER; - odp.expertOnlyControls = optionsExpertControls; - odp.nExpertOnlyControls = MAX_REGS(optionsExpertControls); - Options_AddPage(wParam, &odp); - - ZeroMemory(&odp,sizeof(odp)); - odp.cbSize = sizeof(odp); - odp.hInstance = hInst; - odp.pszGroup = LPGEN("Message Sessions"); - odp.pszTitle = LPGEN("Auto-replacements"); - odp.pfnDlgProc = AutoreplaceDlgProc; - odp.pszTemplate = MAKEINTRESOURCEA(IDD_REPLACEMENTS); - odp.flags = ODPF_BOLDGROUPS; - Options_AddPage(wParam, &odp); - - return 0; -} - -void InitOptions() -{ - LoadOptions(); - - hOptHook = HookEvent(ME_OPT_INITIALISE, InitOptionsCallback); -} - - -void DeInitOptions() -{ - UnhookEvent(hOptHook); -} - - -void LoadOptions() -{ - LoadOpts(optionsControls, MAX_REGS(optionsControls), MODULE_NAME); - LoadOpts(autoReplaceControls, MAX_REGS(autoReplaceControls), MODULE_NAME); - - if (languages.getCount() <= 0) - { - opts.default_language[0] = _T('\0'); - return; - } - - DBVARIANT dbv; - if (!DBGetContactSettingTString(NULL, MODULE_NAME, "DefaultLanguage", &dbv)) - { - lstrcpyn(opts.default_language, dbv.ptszVal, MAX_REGS(opts.default_language)); - DBFreeVariant(&dbv); - } - - int i; - for(i = 0; i < languages.getCount(); i++) - if (lstrcmp(languages[i]->language, opts.default_language) == 0) - break; - - if (i >= languages.getCount()) - lstrcpy(opts.default_language, languages[0]->language); -} - - -static void DrawItem(HWND hwndDlg, LPDRAWITEMSTRUCT lpdis, Dictionary *dict) -{ - TEXTMETRIC tm; - RECT rc; - - GetTextMetrics(lpdis->hDC, &tm); - - - int foreIndex, backIndex; - - if (lpdis->itemState & ODS_DISABLED) - { - foreIndex = COLOR_GRAYTEXT; - backIndex = COLOR_BTNFACE; - } - else if (lpdis->itemState & ODS_SELECTED) - { - foreIndex = COLOR_HIGHLIGHTTEXT; - backIndex = COLOR_HIGHLIGHT; - } - else - { - foreIndex = COLOR_WINDOWTEXT; - backIndex = COLOR_WINDOW; - } - - COLORREF clrfore = SetTextColor(lpdis->hDC,GetSysColor(foreIndex)); - COLORREF clrback = SetBkColor(lpdis->hDC,GetSysColor(backIndex)); - - FillRect(lpdis->hDC, &lpdis->rcItem, GetSysColorBrush(backIndex)); - - rc.left = lpdis->rcItem.left + 2; - - // Draw icon - if (opts.use_flags) - { - HICON hFlag = IcoLib_LoadIcon(dict); - - rc.top = (lpdis->rcItem.bottom + lpdis->rcItem.top - ICON_SIZE) / 2; - DrawIconEx(lpdis->hDC, rc.left, rc.top, hFlag, 16, 16, 0, NULL, DI_NORMAL); - - rc.left += ICON_SIZE + 4; - - Skin_ReleaseIcon(hFlag); - } - - // Draw text - rc.right = lpdis->rcItem.right - 2; - rc.top = (lpdis->rcItem.bottom + lpdis->rcItem.top - tm.tmHeight) / 2; - rc.bottom = rc.top + tm.tmHeight; - DrawText(lpdis->hDC, dict->full_name, lstrlen(dict->full_name), &rc, DT_END_ELLIPSIS | DT_NOPREFIX | DT_SINGLELINE); - - // Restore old colors - SetTextColor(lpdis->hDC, clrfore); - SetBkColor(lpdis->hDC, clrback); -} - - -static void MeasureItem(HWND hwndDlg, LPMEASUREITEMSTRUCT lpmis) -{ - TEXTMETRIC tm; - GetTextMetrics(GetDC(hwndDlg), &tm); - - if (opts.use_flags) - lpmis->itemHeight = max(ICON_SIZE, tm.tmHeight); - else - lpmis->itemHeight = tm.tmHeight; -} - - -static INT_PTR CALLBACK OptionsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) -{ - switch (msg) - { - case WM_INITDIALOG: - { - int i, sel = -1; - for(i = 0; i < languages.getCount(); i++) - { - SendDlgItemMessage(hwndDlg, IDC_DEF_LANG, CB_ADDSTRING, 0, (LONG) languages[i]->full_name); - SendDlgItemMessage(hwndDlg, IDC_DEF_LANG, CB_SETITEMDATA, i, (DWORD) languages[i]); - - if (lstrcmp(opts.default_language, languages[i]->language) == 0) - sel = i; - } - SendDlgItemMessage(hwndDlg, IDC_DEF_LANG, CB_SETCURSEL, sel, 0); - - SendDlgItemMessage(hwndDlg, IDC_UNDERLINE_TYPE, CB_ADDSTRING, 0, (LONG) TranslateT("Line")); - SendDlgItemMessage(hwndDlg, IDC_UNDERLINE_TYPE, CB_ADDSTRING, 0, (LONG) TranslateT("Dotted")); - SendDlgItemMessage(hwndDlg, IDC_UNDERLINE_TYPE, CB_ADDSTRING, 0, (LONG) TranslateT("Dash")); - SendDlgItemMessage(hwndDlg, IDC_UNDERLINE_TYPE, CB_ADDSTRING, 0, (LONG) TranslateT("Dash dot")); - SendDlgItemMessage(hwndDlg, IDC_UNDERLINE_TYPE, CB_ADDSTRING, 0, (LONG) TranslateT("Dash dot dot")); - SendDlgItemMessage(hwndDlg, IDC_UNDERLINE_TYPE, CB_ADDSTRING, 0, (LONG) TranslateT("Wave")); - SendDlgItemMessage(hwndDlg, IDC_UNDERLINE_TYPE, CB_ADDSTRING, 0, (LONG) TranslateT("Thick")); - - break; - } - - case WM_COMMAND: - { - if(LOWORD(wParam) == IDC_GETMORE) - CallService(MS_UTILS_OPENURL, 1, (LPARAM) "http://wiki.services.openoffice.org/wiki/Dictionaries"); - - if (LOWORD(wParam) == IDC_DEF_LANG - && (HIWORD(wParam) == CBN_SELCHANGE && (HWND)lParam == GetFocus())) - { - SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0); - return 0; - } - - break; - } - - case WM_NOTIFY: - { - LPNMHDR lpnmhdr = (LPNMHDR)lParam; - - if (lpnmhdr->idFrom == 0 && lpnmhdr->code == PSN_APPLY && languages.getCount() > 0) - { - int sel = SendDlgItemMessage(hwndDlg, IDC_DEF_LANG, CB_GETCURSEL, 0, 0); - if (sel >= languages.getCount()) - sel = 0; - DBWriteContactSettingTString(NULL, MODULE_NAME, "DefaultLanguage", - (TCHAR *) languages[sel]->language); - lstrcpy(opts.default_language, languages[sel]->language); - } - - break; - } - - case WM_DRAWITEM: - { - LPDRAWITEMSTRUCT lpdis = (LPDRAWITEMSTRUCT)lParam; - if(lpdis->CtlID != IDC_DEF_LANG) - break; - if(lpdis->itemID == -1) - break; - - Dictionary *dict = (Dictionary *) lpdis->itemData; - - DrawItem(hwndDlg, lpdis, dict); - - return TRUE; - } - - case WM_MEASUREITEM: - { - LPMEASUREITEMSTRUCT lpmis = (LPMEASUREITEMSTRUCT)lParam; - if(lpmis->CtlID != IDC_DEF_LANG) - break; - - MeasureItem(hwndDlg, lpmis); - - - return TRUE; - } - } - - return SaveOptsDlgProc(optionsControls, MAX_REGS(optionsControls), MODULE_NAME, hwndDlg, msg, wParam, lParam); -} - - -struct AutoreplaceData -{ - Dictionary *dict; - map autoReplaceMap; - BOOL initialized; - BOOL changed; - - AutoreplaceData(Dictionary *dict) : dict(dict), initialized(FALSE), changed(FALSE) {} - - void RemoveWord(const TCHAR *aWord) - { - map::iterator it = autoReplaceMap.find(aWord); - if (it != autoReplaceMap.end()) - autoReplaceMap.erase(it); - changed = TRUE; - } - - void AddWord(const TCHAR *find, const TCHAR *replace, BOOL useVars) - { - autoReplaceMap[find] = AutoReplacement(replace, useVars); - changed = TRUE; - } -}; - - -static void EnableDisableCtrls(HWND hwndDlg) -{ - BOOL enabled = IsDlgButtonChecked(hwndDlg, IDC_AUTO_USER); - EnableWindow(GetDlgItem(hwndDlg, IDC_LANGUAGE_L), enabled); - EnableWindow(GetDlgItem(hwndDlg, IDC_LANGUAGE), enabled); - EnableWindow(GetDlgItem(hwndDlg, IDC_REPLACEMENTS), enabled); - EnableWindow(GetDlgItem(hwndDlg, IDC_ADD), enabled); - EnableWindow(GetDlgItem(hwndDlg, IDC_EDIT), enabled); - EnableWindow(GetDlgItem(hwndDlg, IDC_REMOVE), enabled); - if (!enabled) - return; - - HWND hList = GetDlgItem(hwndDlg, IDC_REPLACEMENTS); - EnableWindow(GetDlgItem(hwndDlg, IDC_EDIT), ListView_GetSelectedCount(hList) == 1); - EnableWindow(GetDlgItem(hwndDlg, IDC_REMOVE), ListView_GetSelectedCount(hList) > 0); - - -} - - -static void LoadReplacements(HWND hwndDlg) -{ - HWND hList = GetDlgItem(hwndDlg, IDC_REPLACEMENTS); - - ListView_DeleteAllItems(hList); - ListView_SetItemCount(hList, 0); - - int sel = SendDlgItemMessage(hwndDlg, IDC_LANGUAGE, CB_GETCURSEL, 0, 0); - if (sel < 0) - return; - - AutoreplaceData *data = (AutoreplaceData *) SendDlgItemMessage(hwndDlg, IDC_LANGUAGE, CB_GETITEMDATA, sel, 0); - if (!data->initialized) - { - data->dict->autoReplace->copyMap(&data->autoReplaceMap); - data->initialized = TRUE; - } - - map::iterator it = data->autoReplaceMap.begin(); - for(int i = 0; it != data->autoReplaceMap.end(); it++, i++) - { - LVITEM item = {0}; - item.mask = LVIF_TEXT | LVIF_PARAM; - item.iItem = i; - item.iSubItem = 0; - item.pszText = (TCHAR *) it->first.c_str(); - item.cchTextMax = it->first.length(); - item.lParam = i; - - ListView_InsertItem(hList, &item); - - ListView_SetItemText(hList, i, 1, (TCHAR *) it->second.replace.c_str()); - } - - EnableDisableCtrls(hwndDlg); -} - - -static void SaveNewReplacements(BOOL canceled, Dictionary *dict, - const TCHAR *find, const TCHAR *replace, BOOL useVariables, - const TCHAR *original_find, void *param) -{ - if (canceled) - return; - - AutoreplaceData *data = (AutoreplaceData *) param; - - if (lstrlen(original_find) > 0) - data->RemoveWord(original_find); - - data->AddWord(find, replace, useVariables); -} - - -static void ShowAddReplacement(HWND hwndDlg, int item = -1) -{ - int sel = SendDlgItemMessage(hwndDlg, IDC_LANGUAGE, CB_GETCURSEL, 0, 0); - if (sel < 0) - return; - - AutoreplaceData *data = (AutoreplaceData *) SendDlgItemMessage(hwndDlg, IDC_LANGUAGE, CB_GETITEMDATA, sel, 0); - - TCHAR find[256]; - const TCHAR *replace = NULL; - BOOL useVariables = FALSE; - - if (item < 0) - { - find[0] = 0; - } - else - { - ListView_GetItemText(GetDlgItem(hwndDlg, IDC_REPLACEMENTS), item, 0, find, MAX_REGS(find)); - } - - if (lstrlen(find) > 0) - { - AutoReplacement &ar = data->autoReplaceMap[find]; - replace = ar.replace.c_str(); - useVariables = ar.useVariables; - } - - if (ShowAutoReplaceDialog(hwndDlg, TRUE, data->dict, find, replace, useVariables, - FALSE, &SaveNewReplacements, data)) - { - LoadReplacements(hwndDlg); - SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0); - } - - EnableDisableCtrls(hwndDlg); -} - - -static INT_PTR CALLBACK AutoreplaceDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) -{ - switch (msg) - { - case WM_INITDIALOG: - { - BOOL ret = SaveOptsDlgProc(autoReplaceControls, MAX_REGS(autoReplaceControls), MODULE_NAME, hwndDlg, msg, wParam, lParam); - - int sel = -1; - for(int i = 0; i < languages.getCount(); i++) - { - SendDlgItemMessage(hwndDlg, IDC_LANGUAGE, CB_ADDSTRING, 0, (LONG) languages[i]->full_name); - SendDlgItemMessage(hwndDlg, IDC_LANGUAGE, CB_SETITEMDATA, i, (DWORD) new AutoreplaceData(languages[i])); - - if (lstrcmp(opts.default_language, languages[i]->language) == 0) - sel = i; - } - SendDlgItemMessage(hwndDlg, IDC_LANGUAGE, CB_SETCURSEL, sel, 0); - - HWND hList = GetDlgItem(hwndDlg, IDC_REPLACEMENTS); - - ListView_SetExtendedListViewStyle(hList, ListView_GetExtendedListViewStyle(hList) | LVS_EX_FULLROWSELECT); - - LVCOLUMN col = {0}; - col.mask = LVCF_FMT | LVCF_WIDTH | LVCF_TEXT ; - col.fmt = LVCFMT_LEFT; - col.cx = 175; - col.pszText = TranslateT("Wrong word"); - col.cchTextMax = lstrlen(col.pszText); - ListView_InsertColumn(hList, 0, &col); - - col.pszText = TranslateT("Correction"); - col.cchTextMax = lstrlen(col.pszText); - ListView_InsertColumn(hList, 1, &col); - - LoadReplacements(hwndDlg); - - return ret; - } - - case WM_COMMAND: - { - if (LOWORD(wParam) == IDC_LANGUAGE && HIWORD(wParam) == CBN_SELCHANGE) - { - LoadReplacements(hwndDlg); - } - else if (LOWORD(wParam) == IDC_ADD) - { - ShowAddReplacement(hwndDlg); - } - else if (LOWORD(wParam) == IDC_EDIT) - { - HWND hList = GetDlgItem(hwndDlg, IDC_REPLACEMENTS); - if (ListView_GetSelectedCount(hList) != 1) - break; - - int sel = SendMessage(hList, LVM_GETNEXTITEM, -1, LVNI_SELECTED); - if (sel < 0) - break; - - ShowAddReplacement(hwndDlg, sel); - } - else if (LOWORD(wParam) == IDC_REMOVE) - { - HWND hList = GetDlgItem(hwndDlg, IDC_REPLACEMENTS); - - int sel = SendDlgItemMessage(hwndDlg, IDC_LANGUAGE, CB_GETCURSEL, 0, 0); - if (sel < 0) - break; - - AutoreplaceData *data = (AutoreplaceData *) SendDlgItemMessage(hwndDlg, IDC_LANGUAGE, CB_GETITEMDATA, sel, 0); - - BOOL changed = FALSE; - - sel = SendMessage(hList, LVM_GETNEXTITEM, -1, LVNI_SELECTED); - while(sel >= 0) - { - TCHAR tmp[256]; - ListView_GetItemText(hList, sel, 0, tmp, MAX_REGS(tmp)); - - data->RemoveWord(tmp); - changed = TRUE; - - sel = SendMessage(hList, LVM_GETNEXTITEM, sel, LVNI_SELECTED); - } - - if (changed) - { - LoadReplacements(hwndDlg); - SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0); - } - } - - break; - } - - case WM_NOTIFY: - { - LPNMHDR lpnmhdr = (LPNMHDR)lParam; - - if (lpnmhdr->idFrom == 0 && lpnmhdr->code == PSN_APPLY && languages.getCount() > 0) - { - for(int i = 0; i < languages.getCount(); i++) - { - AutoreplaceData *data = (AutoreplaceData *) SendDlgItemMessage(hwndDlg, IDC_LANGUAGE, CB_GETITEMDATA, i, 0); - if (data->changed) - { - data->dict->autoReplace->setMap(data->autoReplaceMap); - data->changed = FALSE; - } - } - } - else if (lpnmhdr->idFrom == IDC_REPLACEMENTS) - { - HWND hList = GetDlgItem(hwndDlg, IDC_REPLACEMENTS); - - switch(lpnmhdr->code) - { - case LVN_ITEMCHANGED: - case NM_CLICK: - EnableDisableCtrls(hwndDlg); - break; - - case NM_DBLCLK: - LPNMITEMACTIVATE lpnmitem = (LPNMITEMACTIVATE) lParam; - if (lpnmitem->iItem >= 0) - ShowAddReplacement(hwndDlg, lpnmitem->iItem); - break; - } - } - else if (lpnmhdr->idFrom == IDC_AUTO_USER) - { - EnableDisableCtrls(hwndDlg); - } - - break; - } - - case WM_DRAWITEM: - { - LPDRAWITEMSTRUCT lpdis = (LPDRAWITEMSTRUCT)lParam; - if(lpdis->CtlID != IDC_LANGUAGE) - break; - if(lpdis->itemID == -1) - break; - - AutoreplaceData *data = (AutoreplaceData *) lpdis->itemData; - - DrawItem(hwndDlg, lpdis, data->dict); - - return TRUE; - } - - case WM_MEASUREITEM: - { - LPMEASUREITEMSTRUCT lpmis = (LPMEASUREITEMSTRUCT)lParam; - if(lpmis->CtlID != IDC_LANGUAGE) - break; - - MeasureItem(hwndDlg, lpmis); - - - return TRUE; - } - } - - - return SaveOptsDlgProc(autoReplaceControls, MAX_REGS(autoReplaceControls), MODULE_NAME, hwndDlg, msg, wParam, lParam); -} - - diff --git a/plugins/SpellChecker/options.h b/plugins/SpellChecker/options.h deleted file mode 100644 index 70710fdb9d..0000000000 --- a/plugins/SpellChecker/options.h +++ /dev/null @@ -1,68 +0,0 @@ -/* -Copyright (C) 2006-2010 Ricardo Pescuma Domenecci - -This is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public -License as published by the Free Software Foundation; either -version 2 of the License, or (at your option) any later version. - -This is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with this file; see the file license.txt. If -not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -Boston, MA 02111-1307, USA. -*/ - - -#ifndef __OPTIONS_H__ -# define __OPTIONS_H__ - - -#define POPUP_ACTION_DONOTHING 0 -#define POPUP_ACTION_CLOSEPOPUP 1 -#define POPUP_ACTION_OPENHISTORY 2 - -#define POPUP_DELAY_DEFAULT 0 -#define POPUP_DELAY_CUSTOM 1 -#define POPUP_DELAY_PERMANENT 2 - - -struct Options { - TCHAR default_language[32]; - BOOL auto_replace_dict; - BOOL auto_replace_user; - BOOL ignore_uppercase; - BOOL ignore_with_numbers; - BOOL ask_when_sending_with_error; - - WORD underline_type; - BOOL cascade_corrections; - BOOL show_all_corrections; - BOOL show_wrong_word; - BOOL use_flags; - BOOL auto_locale; - BOOL use_other_apps_dicts; - BOOL handle_underscore; -}; - -extern Options opts; - - -// Initializations needed by options -void InitOptions(); - -// Deinitializations needed by options -void DeInitOptions(); - - -// Loads the options from DB -// It don't need to be called, except in some rare cases -void LoadOptions(); - - - -#endif // __OPTIONS_H__ diff --git a/plugins/SpellChecker/res/Flags-Angelika/Unknown.ico b/plugins/SpellChecker/res/Flags-Angelika/Unknown.ico new file mode 100644 index 0000000000..11bfae597f Binary files /dev/null and b/plugins/SpellChecker/res/Flags-Angelika/Unknown.ico differ diff --git a/plugins/SpellChecker/res/Flags-Angelika/af_ZA.ico b/plugins/SpellChecker/res/Flags-Angelika/af_ZA.ico new file mode 100644 index 0000000000..1031738ba5 Binary files /dev/null and b/plugins/SpellChecker/res/Flags-Angelika/af_ZA.ico differ diff --git a/plugins/SpellChecker/res/Flags-Angelika/ar_AR.ico b/plugins/SpellChecker/res/Flags-Angelika/ar_AR.ico new file mode 100644 index 0000000000..52e72a60a7 Binary files /dev/null and b/plugins/SpellChecker/res/Flags-Angelika/ar_AR.ico differ diff --git a/plugins/SpellChecker/res/Flags-Angelika/az_AZ.ico b/plugins/SpellChecker/res/Flags-Angelika/az_AZ.ico new file mode 100644 index 0000000000..444d85e2b3 Binary files /dev/null and b/plugins/SpellChecker/res/Flags-Angelika/az_AZ.ico differ diff --git a/plugins/SpellChecker/res/Flags-Angelika/bg_BG.ico b/plugins/SpellChecker/res/Flags-Angelika/bg_BG.ico new file mode 100644 index 0000000000..2bac2a3f55 Binary files /dev/null and b/plugins/SpellChecker/res/Flags-Angelika/bg_BG.ico differ diff --git a/plugins/SpellChecker/res/Flags-Angelika/bn_IN.ico b/plugins/SpellChecker/res/Flags-Angelika/bn_IN.ico new file mode 100644 index 0000000000..1ac90d703b Binary files /dev/null and b/plugins/SpellChecker/res/Flags-Angelika/bn_IN.ico differ diff --git a/plugins/SpellChecker/res/Flags-Angelika/ca_ES.ico b/plugins/SpellChecker/res/Flags-Angelika/ca_ES.ico new file mode 100644 index 0000000000..dd167237fd Binary files /dev/null and b/plugins/SpellChecker/res/Flags-Angelika/ca_ES.ico differ diff --git a/plugins/SpellChecker/res/Flags-Angelika/cs_CZ.ico b/plugins/SpellChecker/res/Flags-Angelika/cs_CZ.ico new file mode 100644 index 0000000000..de6f2e3328 Binary files /dev/null and b/plugins/SpellChecker/res/Flags-Angelika/cs_CZ.ico differ diff --git a/plugins/SpellChecker/res/Flags-Angelika/csb_PO.ico b/plugins/SpellChecker/res/Flags-Angelika/csb_PO.ico new file mode 100644 index 0000000000..5727503fb4 Binary files /dev/null and b/plugins/SpellChecker/res/Flags-Angelika/csb_PO.ico differ diff --git a/plugins/SpellChecker/res/Flags-Angelika/cy_GB.ico b/plugins/SpellChecker/res/Flags-Angelika/cy_GB.ico new file mode 100644 index 0000000000..f0df97b38e Binary files /dev/null and b/plugins/SpellChecker/res/Flags-Angelika/cy_GB.ico differ diff --git a/plugins/SpellChecker/res/Flags-Angelika/da_DK.ico b/plugins/SpellChecker/res/Flags-Angelika/da_DK.ico new file mode 100644 index 0000000000..321eb69dbb Binary files /dev/null and b/plugins/SpellChecker/res/Flags-Angelika/da_DK.ico differ diff --git a/plugins/SpellChecker/res/Flags-Angelika/de_AT.ico b/plugins/SpellChecker/res/Flags-Angelika/de_AT.ico new file mode 100644 index 0000000000..c603271c5b Binary files /dev/null and b/plugins/SpellChecker/res/Flags-Angelika/de_AT.ico differ diff --git a/plugins/SpellChecker/res/Flags-Angelika/de_CH.ico b/plugins/SpellChecker/res/Flags-Angelika/de_CH.ico new file mode 100644 index 0000000000..d6cf941425 Binary files /dev/null and b/plugins/SpellChecker/res/Flags-Angelika/de_CH.ico differ diff --git a/plugins/SpellChecker/res/Flags-Angelika/de_DE.ico b/plugins/SpellChecker/res/Flags-Angelika/de_DE.ico new file mode 100644 index 0000000000..eb32452346 Binary files /dev/null and b/plugins/SpellChecker/res/Flags-Angelika/de_DE.ico differ diff --git a/plugins/SpellChecker/res/Flags-Angelika/el_GR.ico b/plugins/SpellChecker/res/Flags-Angelika/el_GR.ico new file mode 100644 index 0000000000..64e3b4b05d Binary files /dev/null and b/plugins/SpellChecker/res/Flags-Angelika/el_GR.ico differ diff --git a/plugins/SpellChecker/res/Flags-Angelika/em_ET.ico b/plugins/SpellChecker/res/Flags-Angelika/em_ET.ico new file mode 100644 index 0000000000..e836d74819 Binary files /dev/null and b/plugins/SpellChecker/res/Flags-Angelika/em_ET.ico differ diff --git a/plugins/SpellChecker/res/Flags-Angelika/en_AU.ico b/plugins/SpellChecker/res/Flags-Angelika/en_AU.ico new file mode 100644 index 0000000000..1580a68162 Binary files /dev/null and b/plugins/SpellChecker/res/Flags-Angelika/en_AU.ico differ diff --git a/plugins/SpellChecker/res/Flags-Angelika/en_CA.ico b/plugins/SpellChecker/res/Flags-Angelika/en_CA.ico new file mode 100644 index 0000000000..4e61a0bf91 Binary files /dev/null and b/plugins/SpellChecker/res/Flags-Angelika/en_CA.ico differ diff --git a/plugins/SpellChecker/res/Flags-Angelika/en_GB.ico b/plugins/SpellChecker/res/Flags-Angelika/en_GB.ico new file mode 100644 index 0000000000..0a3461376b Binary files /dev/null and b/plugins/SpellChecker/res/Flags-Angelika/en_GB.ico differ diff --git a/plugins/SpellChecker/res/Flags-Angelika/en_NZ.ico b/plugins/SpellChecker/res/Flags-Angelika/en_NZ.ico new file mode 100644 index 0000000000..10ed20ff61 Binary files /dev/null and b/plugins/SpellChecker/res/Flags-Angelika/en_NZ.ico differ diff --git a/plugins/SpellChecker/res/Flags-Angelika/en_US.ico b/plugins/SpellChecker/res/Flags-Angelika/en_US.ico new file mode 100644 index 0000000000..4274317e66 Binary files /dev/null and b/plugins/SpellChecker/res/Flags-Angelika/en_US.ico differ diff --git a/plugins/SpellChecker/res/Flags-Angelika/en_ZA.ico b/plugins/SpellChecker/res/Flags-Angelika/en_ZA.ico new file mode 100644 index 0000000000..1031738ba5 Binary files /dev/null and b/plugins/SpellChecker/res/Flags-Angelika/en_ZA.ico differ diff --git a/plugins/SpellChecker/res/Flags-Angelika/es_ES.ico b/plugins/SpellChecker/res/Flags-Angelika/es_ES.ico new file mode 100644 index 0000000000..3e1d263951 Binary files /dev/null and b/plugins/SpellChecker/res/Flags-Angelika/es_ES.ico differ diff --git a/plugins/SpellChecker/res/Flags-Angelika/es_MX.ico b/plugins/SpellChecker/res/Flags-Angelika/es_MX.ico new file mode 100644 index 0000000000..f13b9a172a Binary files /dev/null and b/plugins/SpellChecker/res/Flags-Angelika/es_MX.ico differ diff --git a/plugins/SpellChecker/res/Flags-Angelika/et_EE.ico b/plugins/SpellChecker/res/Flags-Angelika/et_EE.ico new file mode 100644 index 0000000000..bb844d3fa1 Binary files /dev/null and b/plugins/SpellChecker/res/Flags-Angelika/et_EE.ico differ diff --git a/plugins/SpellChecker/res/Flags-Angelika/fa_IR.ico b/plugins/SpellChecker/res/Flags-Angelika/fa_IR.ico new file mode 100644 index 0000000000..22ad9ffc5c Binary files /dev/null and b/plugins/SpellChecker/res/Flags-Angelika/fa_IR.ico differ diff --git a/plugins/SpellChecker/res/Flags-Angelika/fi_FI.ico b/plugins/SpellChecker/res/Flags-Angelika/fi_FI.ico new file mode 100644 index 0000000000..c3a329928c Binary files /dev/null and b/plugins/SpellChecker/res/Flags-Angelika/fi_FI.ico differ diff --git a/plugins/SpellChecker/res/Flags-Angelika/fj_FJ.ico b/plugins/SpellChecker/res/Flags-Angelika/fj_FJ.ico new file mode 100644 index 0000000000..93ccf587c0 Binary files /dev/null and b/plugins/SpellChecker/res/Flags-Angelika/fj_FJ.ico differ diff --git a/plugins/SpellChecker/res/Flags-Angelika/fo_FO.ico b/plugins/SpellChecker/res/Flags-Angelika/fo_FO.ico new file mode 100644 index 0000000000..a5e0e766e3 Binary files /dev/null and b/plugins/SpellChecker/res/Flags-Angelika/fo_FO.ico differ diff --git a/plugins/SpellChecker/res/Flags-Angelika/fr_BE.ico b/plugins/SpellChecker/res/Flags-Angelika/fr_BE.ico new file mode 100644 index 0000000000..62d4fb61c6 Binary files /dev/null and b/plugins/SpellChecker/res/Flags-Angelika/fr_BE.ico differ diff --git a/plugins/SpellChecker/res/Flags-Angelika/fr_FR.ico b/plugins/SpellChecker/res/Flags-Angelika/fr_FR.ico new file mode 100644 index 0000000000..4010cf5f55 Binary files /dev/null and b/plugins/SpellChecker/res/Flags-Angelika/fr_FR.ico differ diff --git a/plugins/SpellChecker/res/Flags-Angelika/ga_IE.ico b/plugins/SpellChecker/res/Flags-Angelika/ga_IE.ico new file mode 100644 index 0000000000..18eac04b82 Binary files /dev/null and b/plugins/SpellChecker/res/Flags-Angelika/ga_IE.ico differ diff --git a/plugins/SpellChecker/res/Flags-Angelika/gd_GB.ico b/plugins/SpellChecker/res/Flags-Angelika/gd_GB.ico new file mode 100644 index 0000000000..9c1953a1c2 Binary files /dev/null and b/plugins/SpellChecker/res/Flags-Angelika/gd_GB.ico differ diff --git a/plugins/SpellChecker/res/Flags-Angelika/gl_ES.ico b/plugins/SpellChecker/res/Flags-Angelika/gl_ES.ico new file mode 100644 index 0000000000..d40ef552fe Binary files /dev/null and b/plugins/SpellChecker/res/Flags-Angelika/gl_ES.ico differ diff --git a/plugins/SpellChecker/res/Flags-Angelika/he_IL.ico b/plugins/SpellChecker/res/Flags-Angelika/he_IL.ico new file mode 100644 index 0000000000..5153d8779b Binary files /dev/null and b/plugins/SpellChecker/res/Flags-Angelika/he_IL.ico differ diff --git a/plugins/SpellChecker/res/Flags-Angelika/hi_IN.ico b/plugins/SpellChecker/res/Flags-Angelika/hi_IN.ico new file mode 100644 index 0000000000..44d2239ada Binary files /dev/null and b/plugins/SpellChecker/res/Flags-Angelika/hi_IN.ico differ diff --git a/plugins/SpellChecker/res/Flags-Angelika/hr_Hr.ico b/plugins/SpellChecker/res/Flags-Angelika/hr_Hr.ico new file mode 100644 index 0000000000..ce46932656 Binary files /dev/null and b/plugins/SpellChecker/res/Flags-Angelika/hr_Hr.ico differ diff --git a/plugins/SpellChecker/res/Flags-Angelika/hu_HU.ico b/plugins/SpellChecker/res/Flags-Angelika/hu_HU.ico new file mode 100644 index 0000000000..ce95ae6bc1 Binary files /dev/null and b/plugins/SpellChecker/res/Flags-Angelika/hu_HU.ico differ diff --git a/plugins/SpellChecker/res/Flags-Angelika/id_ID.ico b/plugins/SpellChecker/res/Flags-Angelika/id_ID.ico new file mode 100644 index 0000000000..f454edcb71 Binary files /dev/null and b/plugins/SpellChecker/res/Flags-Angelika/id_ID.ico differ diff --git a/plugins/SpellChecker/res/Flags-Angelika/is_IS.ico b/plugins/SpellChecker/res/Flags-Angelika/is_IS.ico new file mode 100644 index 0000000000..6c4110eab2 Binary files /dev/null and b/plugins/SpellChecker/res/Flags-Angelika/is_IS.ico differ diff --git a/plugins/SpellChecker/res/Flags-Angelika/it_IT.ico b/plugins/SpellChecker/res/Flags-Angelika/it_IT.ico new file mode 100644 index 0000000000..850ce77ea1 Binary files /dev/null and b/plugins/SpellChecker/res/Flags-Angelika/it_IT.ico differ diff --git a/plugins/SpellChecker/res/Flags-Angelika/km_KH.ico b/plugins/SpellChecker/res/Flags-Angelika/km_KH.ico new file mode 100644 index 0000000000..ae92b1a17d Binary files /dev/null and b/plugins/SpellChecker/res/Flags-Angelika/km_KH.ico differ diff --git a/plugins/SpellChecker/res/Flags-Angelika/ku_TR.ico b/plugins/SpellChecker/res/Flags-Angelika/ku_TR.ico new file mode 100644 index 0000000000..d6d9ab41f9 Binary files /dev/null and b/plugins/SpellChecker/res/Flags-Angelika/ku_TR.ico differ diff --git a/plugins/SpellChecker/res/Flags-Angelika/lt_LT.ico b/plugins/SpellChecker/res/Flags-Angelika/lt_LT.ico new file mode 100644 index 0000000000..4d4a6c6629 Binary files /dev/null and b/plugins/SpellChecker/res/Flags-Angelika/lt_LT.ico differ diff --git a/plugins/SpellChecker/res/Flags-Angelika/lu_LU.ico b/plugins/SpellChecker/res/Flags-Angelika/lu_LU.ico new file mode 100644 index 0000000000..c701560f2d Binary files /dev/null and b/plugins/SpellChecker/res/Flags-Angelika/lu_LU.ico differ diff --git a/plugins/SpellChecker/res/Flags-Angelika/lv_LV.ico b/plugins/SpellChecker/res/Flags-Angelika/lv_LV.ico new file mode 100644 index 0000000000..ca51d2e88b Binary files /dev/null and b/plugins/SpellChecker/res/Flags-Angelika/lv_LV.ico differ diff --git a/plugins/SpellChecker/res/Flags-Angelika/mg_MG.ico b/plugins/SpellChecker/res/Flags-Angelika/mg_MG.ico new file mode 100644 index 0000000000..2b334e6517 Binary files /dev/null and b/plugins/SpellChecker/res/Flags-Angelika/mg_MG.ico differ diff --git a/plugins/SpellChecker/res/Flags-Angelika/mi_NZ.ico b/plugins/SpellChecker/res/Flags-Angelika/mi_NZ.ico new file mode 100644 index 0000000000..10ed20ff61 Binary files /dev/null and b/plugins/SpellChecker/res/Flags-Angelika/mi_NZ.ico differ diff --git a/plugins/SpellChecker/res/Flags-Angelika/mn_MN.ico b/plugins/SpellChecker/res/Flags-Angelika/mn_MN.ico new file mode 100644 index 0000000000..6479314720 Binary files /dev/null and b/plugins/SpellChecker/res/Flags-Angelika/mn_MN.ico differ diff --git a/plugins/SpellChecker/res/Flags-Angelika/mo_BF.ico b/plugins/SpellChecker/res/Flags-Angelika/mo_BF.ico new file mode 100644 index 0000000000..49ce981336 Binary files /dev/null and b/plugins/SpellChecker/res/Flags-Angelika/mo_BF.ico differ diff --git a/plugins/SpellChecker/res/Flags-Angelika/mr_IN.ico b/plugins/SpellChecker/res/Flags-Angelika/mr_IN.ico new file mode 100644 index 0000000000..44d2239ada Binary files /dev/null and b/plugins/SpellChecker/res/Flags-Angelika/mr_IN.ico differ diff --git a/plugins/SpellChecker/res/Flags-Angelika/ms_MY.ico b/plugins/SpellChecker/res/Flags-Angelika/ms_MY.ico new file mode 100644 index 0000000000..a0a4be2a8c Binary files /dev/null and b/plugins/SpellChecker/res/Flags-Angelika/ms_MY.ico differ diff --git a/plugins/SpellChecker/res/Flags-Angelika/nb_NO.ico b/plugins/SpellChecker/res/Flags-Angelika/nb_NO.ico new file mode 100644 index 0000000000..66ca4eac03 Binary files /dev/null and b/plugins/SpellChecker/res/Flags-Angelika/nb_NO.ico differ diff --git a/plugins/SpellChecker/res/Flags-Angelika/ne_NP.ico b/plugins/SpellChecker/res/Flags-Angelika/ne_NP.ico new file mode 100644 index 0000000000..21801370d7 Binary files /dev/null and b/plugins/SpellChecker/res/Flags-Angelika/ne_NP.ico differ diff --git a/plugins/SpellChecker/res/Flags-Angelika/nl_NL.ico b/plugins/SpellChecker/res/Flags-Angelika/nl_NL.ico new file mode 100644 index 0000000000..f3280bbdf3 Binary files /dev/null and b/plugins/SpellChecker/res/Flags-Angelika/nl_NL.ico differ diff --git a/plugins/SpellChecker/res/Flags-Angelika/nn_NO.ico b/plugins/SpellChecker/res/Flags-Angelika/nn_NO.ico new file mode 100644 index 0000000000..66ca4eac03 Binary files /dev/null and b/plugins/SpellChecker/res/Flags-Angelika/nn_NO.ico differ diff --git a/plugins/SpellChecker/res/Flags-Angelika/nr_ZA.ico b/plugins/SpellChecker/res/Flags-Angelika/nr_ZA.ico new file mode 100644 index 0000000000..1031738ba5 Binary files /dev/null and b/plugins/SpellChecker/res/Flags-Angelika/nr_ZA.ico differ diff --git a/plugins/SpellChecker/res/Flags-Angelika/ns_ZA.ico b/plugins/SpellChecker/res/Flags-Angelika/ns_ZA.ico new file mode 100644 index 0000000000..1031738ba5 Binary files /dev/null and b/plugins/SpellChecker/res/Flags-Angelika/ns_ZA.ico differ diff --git a/plugins/SpellChecker/res/Flags-Angelika/or_IN.ico b/plugins/SpellChecker/res/Flags-Angelika/or_IN.ico new file mode 100644 index 0000000000..44d2239ada Binary files /dev/null and b/plugins/SpellChecker/res/Flags-Angelika/or_IN.ico differ diff --git a/plugins/SpellChecker/res/Flags-Angelika/pl_PL.ico b/plugins/SpellChecker/res/Flags-Angelika/pl_PL.ico new file mode 100644 index 0000000000..d85aa5b0b0 Binary files /dev/null and b/plugins/SpellChecker/res/Flags-Angelika/pl_PL.ico differ diff --git a/plugins/SpellChecker/res/Flags-Angelika/pt_BR.ico b/plugins/SpellChecker/res/Flags-Angelika/pt_BR.ico new file mode 100644 index 0000000000..c7d93382db Binary files /dev/null and b/plugins/SpellChecker/res/Flags-Angelika/pt_BR.ico differ diff --git a/plugins/SpellChecker/res/Flags-Angelika/pt_PT.ico b/plugins/SpellChecker/res/Flags-Angelika/pt_PT.ico new file mode 100644 index 0000000000..af073daf2b Binary files /dev/null and b/plugins/SpellChecker/res/Flags-Angelika/pt_PT.ico differ diff --git a/plugins/SpellChecker/res/Flags-Angelika/qu_BO.ico b/plugins/SpellChecker/res/Flags-Angelika/qu_BO.ico new file mode 100644 index 0000000000..663586e6f6 Binary files /dev/null and b/plugins/SpellChecker/res/Flags-Angelika/qu_BO.ico differ diff --git a/plugins/SpellChecker/res/Flags-Angelika/ro_RO.ico b/plugins/SpellChecker/res/Flags-Angelika/ro_RO.ico new file mode 100644 index 0000000000..9623b07eee Binary files /dev/null and b/plugins/SpellChecker/res/Flags-Angelika/ro_RO.ico differ diff --git a/plugins/SpellChecker/res/Flags-Angelika/ru_RU.ico b/plugins/SpellChecker/res/Flags-Angelika/ru_RU.ico new file mode 100644 index 0000000000..60d08c198e Binary files /dev/null and b/plugins/SpellChecker/res/Flags-Angelika/ru_RU.ico differ diff --git a/plugins/SpellChecker/res/Flags-Angelika/rw_RW.ico b/plugins/SpellChecker/res/Flags-Angelika/rw_RW.ico new file mode 100644 index 0000000000..a424d1cc0a Binary files /dev/null and b/plugins/SpellChecker/res/Flags-Angelika/rw_RW.ico differ diff --git a/plugins/SpellChecker/res/Flags-Angelika/sk_SK.ico b/plugins/SpellChecker/res/Flags-Angelika/sk_SK.ico new file mode 100644 index 0000000000..05e16ef646 Binary files /dev/null and b/plugins/SpellChecker/res/Flags-Angelika/sk_SK.ico differ diff --git a/plugins/SpellChecker/res/Flags-Angelika/sl_SI.ico b/plugins/SpellChecker/res/Flags-Angelika/sl_SI.ico new file mode 100644 index 0000000000..c23a66e574 Binary files /dev/null and b/plugins/SpellChecker/res/Flags-Angelika/sl_SI.ico differ diff --git a/plugins/SpellChecker/res/Flags-Angelika/ss_ZA.ico b/plugins/SpellChecker/res/Flags-Angelika/ss_ZA.ico new file mode 100644 index 0000000000..1031738ba5 Binary files /dev/null and b/plugins/SpellChecker/res/Flags-Angelika/ss_ZA.ico differ diff --git a/plugins/SpellChecker/res/Flags-Angelika/st_ZA.ico b/plugins/SpellChecker/res/Flags-Angelika/st_ZA.ico new file mode 100644 index 0000000000..1031738ba5 Binary files /dev/null and b/plugins/SpellChecker/res/Flags-Angelika/st_ZA.ico differ diff --git a/plugins/SpellChecker/res/Flags-Angelika/sv_SE.ico b/plugins/SpellChecker/res/Flags-Angelika/sv_SE.ico new file mode 100644 index 0000000000..c6e1964edb Binary files /dev/null and b/plugins/SpellChecker/res/Flags-Angelika/sv_SE.ico differ diff --git a/plugins/SpellChecker/res/Flags-Angelika/ta_IN.ico b/plugins/SpellChecker/res/Flags-Angelika/ta_IN.ico new file mode 100644 index 0000000000..44d2239ada Binary files /dev/null and b/plugins/SpellChecker/res/Flags-Angelika/ta_IN.ico differ diff --git a/plugins/SpellChecker/res/Flags-Angelika/tet_ID.ico b/plugins/SpellChecker/res/Flags-Angelika/tet_ID.ico new file mode 100644 index 0000000000..f454edcb71 Binary files /dev/null and b/plugins/SpellChecker/res/Flags-Angelika/tet_ID.ico differ diff --git a/plugins/SpellChecker/res/Flags-Angelika/tl_PH.ico b/plugins/SpellChecker/res/Flags-Angelika/tl_PH.ico new file mode 100644 index 0000000000..30772bfa49 Binary files /dev/null and b/plugins/SpellChecker/res/Flags-Angelika/tl_PH.ico differ diff --git a/plugins/SpellChecker/res/Flags-Angelika/tn_ZA.ico b/plugins/SpellChecker/res/Flags-Angelika/tn_ZA.ico new file mode 100644 index 0000000000..1031738ba5 Binary files /dev/null and b/plugins/SpellChecker/res/Flags-Angelika/tn_ZA.ico differ diff --git a/plugins/SpellChecker/res/Flags-Angelika/ts_ZA.ico b/plugins/SpellChecker/res/Flags-Angelika/ts_ZA.ico new file mode 100644 index 0000000000..1031738ba5 Binary files /dev/null and b/plugins/SpellChecker/res/Flags-Angelika/ts_ZA.ico differ diff --git a/plugins/SpellChecker/res/Flags-Angelika/uk_UA.ico b/plugins/SpellChecker/res/Flags-Angelika/uk_UA.ico new file mode 100644 index 0000000000..765681033c Binary files /dev/null and b/plugins/SpellChecker/res/Flags-Angelika/uk_UA.ico differ diff --git a/plugins/SpellChecker/res/Flags-Angelika/uz_UZ.ico b/plugins/SpellChecker/res/Flags-Angelika/uz_UZ.ico new file mode 100644 index 0000000000..573c4aee84 Binary files /dev/null and b/plugins/SpellChecker/res/Flags-Angelika/uz_UZ.ico differ diff --git a/plugins/SpellChecker/res/Flags-Angelika/ve_ZA.ico b/plugins/SpellChecker/res/Flags-Angelika/ve_ZA.ico new file mode 100644 index 0000000000..1031738ba5 Binary files /dev/null and b/plugins/SpellChecker/res/Flags-Angelika/ve_ZA.ico differ diff --git a/plugins/SpellChecker/res/Flags-Angelika/vi_VI.ico b/plugins/SpellChecker/res/Flags-Angelika/vi_VI.ico new file mode 100644 index 0000000000..999d0622fc Binary files /dev/null and b/plugins/SpellChecker/res/Flags-Angelika/vi_VI.ico differ diff --git a/plugins/SpellChecker/res/Flags-Angelika/xh_ZA.ico b/plugins/SpellChecker/res/Flags-Angelika/xh_ZA.ico new file mode 100644 index 0000000000..1031738ba5 Binary files /dev/null and b/plugins/SpellChecker/res/Flags-Angelika/xh_ZA.ico differ diff --git a/plugins/SpellChecker/res/Flags-Angelika/zu_ZA.ico b/plugins/SpellChecker/res/Flags-Angelika/zu_ZA.ico new file mode 100644 index 0000000000..1031738ba5 Binary files /dev/null and b/plugins/SpellChecker/res/Flags-Angelika/zu_ZA.ico differ diff --git a/plugins/SpellChecker/res/Flags/ad.ico b/plugins/SpellChecker/res/Flags/ad.ico new file mode 100644 index 0000000000..041939a95d Binary files /dev/null and b/plugins/SpellChecker/res/Flags/ad.ico differ diff --git a/plugins/SpellChecker/res/Flags/ae.ico b/plugins/SpellChecker/res/Flags/ae.ico new file mode 100644 index 0000000000..dbf70eeccb Binary files /dev/null and b/plugins/SpellChecker/res/Flags/ae.ico differ diff --git a/plugins/SpellChecker/res/Flags/af_ZA.ico b/plugins/SpellChecker/res/Flags/af_ZA.ico new file mode 100644 index 0000000000..80019f3dfd Binary files /dev/null and b/plugins/SpellChecker/res/Flags/af_ZA.ico differ diff --git a/plugins/SpellChecker/res/Flags/ag.ico b/plugins/SpellChecker/res/Flags/ag.ico new file mode 100644 index 0000000000..aa362f81dc Binary files /dev/null and b/plugins/SpellChecker/res/Flags/ag.ico differ diff --git a/plugins/SpellChecker/res/Flags/ai.ico b/plugins/SpellChecker/res/Flags/ai.ico new file mode 100644 index 0000000000..a066e8d6f2 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/ai.ico differ diff --git a/plugins/SpellChecker/res/Flags/al.ico b/plugins/SpellChecker/res/Flags/al.ico new file mode 100644 index 0000000000..33c2aeee17 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/al.ico differ diff --git a/plugins/SpellChecker/res/Flags/am.ico b/plugins/SpellChecker/res/Flags/am.ico new file mode 100644 index 0000000000..c9caba18d4 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/am.ico differ diff --git a/plugins/SpellChecker/res/Flags/an.ico b/plugins/SpellChecker/res/Flags/an.ico new file mode 100644 index 0000000000..865d4bb997 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/an.ico differ diff --git a/plugins/SpellChecker/res/Flags/ao.ico b/plugins/SpellChecker/res/Flags/ao.ico new file mode 100644 index 0000000000..12f6fc55d1 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/ao.ico differ diff --git a/plugins/SpellChecker/res/Flags/ar.ico b/plugins/SpellChecker/res/Flags/ar.ico new file mode 100644 index 0000000000..c62bddfaae Binary files /dev/null and b/plugins/SpellChecker/res/Flags/ar.ico differ diff --git a/plugins/SpellChecker/res/Flags/as.ico b/plugins/SpellChecker/res/Flags/as.ico new file mode 100644 index 0000000000..e721fcac5d Binary files /dev/null and b/plugins/SpellChecker/res/Flags/as.ico differ diff --git a/plugins/SpellChecker/res/Flags/aw.ico b/plugins/SpellChecker/res/Flags/aw.ico new file mode 100644 index 0000000000..6ffae09f21 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/aw.ico differ diff --git a/plugins/SpellChecker/res/Flags/ax.ico b/plugins/SpellChecker/res/Flags/ax.ico new file mode 100644 index 0000000000..201d72d95e Binary files /dev/null and b/plugins/SpellChecker/res/Flags/ax.ico differ diff --git a/plugins/SpellChecker/res/Flags/az_AZ.ico b/plugins/SpellChecker/res/Flags/az_AZ.ico new file mode 100644 index 0000000000..5a89d0a23d Binary files /dev/null and b/plugins/SpellChecker/res/Flags/az_AZ.ico differ diff --git a/plugins/SpellChecker/res/Flags/ba.ico b/plugins/SpellChecker/res/Flags/ba.ico new file mode 100644 index 0000000000..c8e1c91686 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/ba.ico differ diff --git a/plugins/SpellChecker/res/Flags/bb.ico b/plugins/SpellChecker/res/Flags/bb.ico new file mode 100644 index 0000000000..e726c725fd Binary files /dev/null and b/plugins/SpellChecker/res/Flags/bb.ico differ diff --git a/plugins/SpellChecker/res/Flags/bg_BG.ico b/plugins/SpellChecker/res/Flags/bg_BG.ico new file mode 100644 index 0000000000..64b732fbf2 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/bg_BG.ico differ diff --git a/plugins/SpellChecker/res/Flags/bh.ico b/plugins/SpellChecker/res/Flags/bh.ico new file mode 100644 index 0000000000..c9e20c8ceb Binary files /dev/null and b/plugins/SpellChecker/res/Flags/bh.ico differ diff --git a/plugins/SpellChecker/res/Flags/bi.ico b/plugins/SpellChecker/res/Flags/bi.ico new file mode 100644 index 0000000000..a383e617b1 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/bi.ico differ diff --git a/plugins/SpellChecker/res/Flags/bj.ico b/plugins/SpellChecker/res/Flags/bj.ico new file mode 100644 index 0000000000..25392dbec4 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/bj.ico differ diff --git a/plugins/SpellChecker/res/Flags/bm.ico b/plugins/SpellChecker/res/Flags/bm.ico new file mode 100644 index 0000000000..5eb9f7d8e2 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/bm.ico differ diff --git a/plugins/SpellChecker/res/Flags/bn.ico b/plugins/SpellChecker/res/Flags/bn.ico new file mode 100644 index 0000000000..42117c3ee6 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/bn.ico differ diff --git a/plugins/SpellChecker/res/Flags/bn_IN.ico b/plugins/SpellChecker/res/Flags/bn_IN.ico new file mode 100644 index 0000000000..ed15c62073 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/bn_IN.ico differ diff --git a/plugins/SpellChecker/res/Flags/bs.ico b/plugins/SpellChecker/res/Flags/bs.ico new file mode 100644 index 0000000000..e26f72af06 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/bs.ico differ diff --git a/plugins/SpellChecker/res/Flags/bt.ico b/plugins/SpellChecker/res/Flags/bt.ico new file mode 100644 index 0000000000..a319583d07 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/bt.ico differ diff --git a/plugins/SpellChecker/res/Flags/bv.ico b/plugins/SpellChecker/res/Flags/bv.ico new file mode 100644 index 0000000000..f0b648deba Binary files /dev/null and b/plugins/SpellChecker/res/Flags/bv.ico differ diff --git a/plugins/SpellChecker/res/Flags/by.ico b/plugins/SpellChecker/res/Flags/by.ico new file mode 100644 index 0000000000..5c90057d8e Binary files /dev/null and b/plugins/SpellChecker/res/Flags/by.ico differ diff --git a/plugins/SpellChecker/res/Flags/bz.ico b/plugins/SpellChecker/res/Flags/bz.ico new file mode 100644 index 0000000000..08a2217321 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/bz.ico differ diff --git a/plugins/SpellChecker/res/Flags/cc.ico b/plugins/SpellChecker/res/Flags/cc.ico new file mode 100644 index 0000000000..f03d802d49 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/cc.ico differ diff --git a/plugins/SpellChecker/res/Flags/cd.ico b/plugins/SpellChecker/res/Flags/cd.ico new file mode 100644 index 0000000000..440f4eb4da Binary files /dev/null and b/plugins/SpellChecker/res/Flags/cd.ico differ diff --git a/plugins/SpellChecker/res/Flags/cf.ico b/plugins/SpellChecker/res/Flags/cf.ico new file mode 100644 index 0000000000..4b7d5f74f1 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/cf.ico differ diff --git a/plugins/SpellChecker/res/Flags/cg.ico b/plugins/SpellChecker/res/Flags/cg.ico new file mode 100644 index 0000000000..66f15bbda7 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/cg.ico differ diff --git a/plugins/SpellChecker/res/Flags/ci.ico b/plugins/SpellChecker/res/Flags/ci.ico new file mode 100644 index 0000000000..76fde54963 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/ci.ico differ diff --git a/plugins/SpellChecker/res/Flags/ck.ico b/plugins/SpellChecker/res/Flags/ck.ico new file mode 100644 index 0000000000..65851243f7 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/ck.ico differ diff --git a/plugins/SpellChecker/res/Flags/cl.ico b/plugins/SpellChecker/res/Flags/cl.ico new file mode 100644 index 0000000000..fb695e480f Binary files /dev/null and b/plugins/SpellChecker/res/Flags/cl.ico differ diff --git a/plugins/SpellChecker/res/Flags/cm.ico b/plugins/SpellChecker/res/Flags/cm.ico new file mode 100644 index 0000000000..cb79701891 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/cm.ico differ diff --git a/plugins/SpellChecker/res/Flags/cn.ico b/plugins/SpellChecker/res/Flags/cn.ico new file mode 100644 index 0000000000..0ceb0866f3 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/cn.ico differ diff --git a/plugins/SpellChecker/res/Flags/co.ico b/plugins/SpellChecker/res/Flags/co.ico new file mode 100644 index 0000000000..1cc69eac57 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/co.ico differ diff --git a/plugins/SpellChecker/res/Flags/cr.ico b/plugins/SpellChecker/res/Flags/cr.ico new file mode 100644 index 0000000000..193b961d34 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/cr.ico differ diff --git a/plugins/SpellChecker/res/Flags/cs_CZ.ico b/plugins/SpellChecker/res/Flags/cs_CZ.ico new file mode 100644 index 0000000000..f0c14bc3e1 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/cs_CZ.ico differ diff --git a/plugins/SpellChecker/res/Flags/cu.ico b/plugins/SpellChecker/res/Flags/cu.ico new file mode 100644 index 0000000000..7f1ad5b202 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/cu.ico differ diff --git a/plugins/SpellChecker/res/Flags/cv.ico b/plugins/SpellChecker/res/Flags/cv.ico new file mode 100644 index 0000000000..349d4e9675 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/cv.ico differ diff --git a/plugins/SpellChecker/res/Flags/cx.ico b/plugins/SpellChecker/res/Flags/cx.ico new file mode 100644 index 0000000000..363cef2396 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/cx.ico differ diff --git a/plugins/SpellChecker/res/Flags/cy.ico b/plugins/SpellChecker/res/Flags/cy.ico new file mode 100644 index 0000000000..546f1a7697 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/cy.ico differ diff --git a/plugins/SpellChecker/res/Flags/cy_GB.ico b/plugins/SpellChecker/res/Flags/cy_GB.ico new file mode 100644 index 0000000000..021c4cbb7f Binary files /dev/null and b/plugins/SpellChecker/res/Flags/cy_GB.ico differ diff --git a/plugins/SpellChecker/res/Flags/da_DK.ico b/plugins/SpellChecker/res/Flags/da_DK.ico new file mode 100644 index 0000000000..eebf7f90ec Binary files /dev/null and b/plugins/SpellChecker/res/Flags/da_DK.ico differ diff --git a/plugins/SpellChecker/res/Flags/de_AT.ico b/plugins/SpellChecker/res/Flags/de_AT.ico new file mode 100644 index 0000000000..aa0ebc231c Binary files /dev/null and b/plugins/SpellChecker/res/Flags/de_AT.ico differ diff --git a/plugins/SpellChecker/res/Flags/de_CH.ico b/plugins/SpellChecker/res/Flags/de_CH.ico new file mode 100644 index 0000000000..c272204278 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/de_CH.ico differ diff --git a/plugins/SpellChecker/res/Flags/de_DE.ico b/plugins/SpellChecker/res/Flags/de_DE.ico new file mode 100644 index 0000000000..ed1ce66d22 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/de_DE.ico differ diff --git a/plugins/SpellChecker/res/Flags/dj.ico b/plugins/SpellChecker/res/Flags/dj.ico new file mode 100644 index 0000000000..146e62a083 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/dj.ico differ diff --git a/plugins/SpellChecker/res/Flags/dm.ico b/plugins/SpellChecker/res/Flags/dm.ico new file mode 100644 index 0000000000..585ad1dca7 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/dm.ico differ diff --git a/plugins/SpellChecker/res/Flags/do.ico b/plugins/SpellChecker/res/Flags/do.ico new file mode 100644 index 0000000000..0602e9f03b Binary files /dev/null and b/plugins/SpellChecker/res/Flags/do.ico differ diff --git a/plugins/SpellChecker/res/Flags/dz.ico b/plugins/SpellChecker/res/Flags/dz.ico new file mode 100644 index 0000000000..23fe39b5ec Binary files /dev/null and b/plugins/SpellChecker/res/Flags/dz.ico differ diff --git a/plugins/SpellChecker/res/Flags/ec.ico b/plugins/SpellChecker/res/Flags/ec.ico new file mode 100644 index 0000000000..93689ca917 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/ec.ico differ diff --git a/plugins/SpellChecker/res/Flags/eg.ico b/plugins/SpellChecker/res/Flags/eg.ico new file mode 100644 index 0000000000..ce231de10f Binary files /dev/null and b/plugins/SpellChecker/res/Flags/eg.ico differ diff --git a/plugins/SpellChecker/res/Flags/eh.ico b/plugins/SpellChecker/res/Flags/eh.ico new file mode 100644 index 0000000000..1ac030fa6f Binary files /dev/null and b/plugins/SpellChecker/res/Flags/eh.ico differ diff --git a/plugins/SpellChecker/res/Flags/el_GR.ico b/plugins/SpellChecker/res/Flags/el_GR.ico new file mode 100644 index 0000000000..b7d70e74c6 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/el_GR.ico differ diff --git a/plugins/SpellChecker/res/Flags/em_ET.ico b/plugins/SpellChecker/res/Flags/em_ET.ico new file mode 100644 index 0000000000..aef5354dcb Binary files /dev/null and b/plugins/SpellChecker/res/Flags/em_ET.ico differ diff --git a/plugins/SpellChecker/res/Flags/en_AU.ico b/plugins/SpellChecker/res/Flags/en_AU.ico new file mode 100644 index 0000000000..4c042925aa Binary files /dev/null and b/plugins/SpellChecker/res/Flags/en_AU.ico differ diff --git a/plugins/SpellChecker/res/Flags/en_CA.ico b/plugins/SpellChecker/res/Flags/en_CA.ico new file mode 100644 index 0000000000..ab30abbf43 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/en_CA.ico differ diff --git a/plugins/SpellChecker/res/Flags/en_GB.ico b/plugins/SpellChecker/res/Flags/en_GB.ico new file mode 100644 index 0000000000..14fcae20a7 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/en_GB.ico differ diff --git a/plugins/SpellChecker/res/Flags/en_NZ.ico b/plugins/SpellChecker/res/Flags/en_NZ.ico new file mode 100644 index 0000000000..9c4cac8f15 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/en_NZ.ico differ diff --git a/plugins/SpellChecker/res/Flags/en_US.ico b/plugins/SpellChecker/res/Flags/en_US.ico new file mode 100644 index 0000000000..793e92678e Binary files /dev/null and b/plugins/SpellChecker/res/Flags/en_US.ico differ diff --git a/plugins/SpellChecker/res/Flags/en_ZA.ico b/plugins/SpellChecker/res/Flags/en_ZA.ico new file mode 100644 index 0000000000..a786459654 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/en_ZA.ico differ diff --git a/plugins/SpellChecker/res/Flags/england.ico b/plugins/SpellChecker/res/Flags/england.ico new file mode 100644 index 0000000000..94cd4a75a8 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/england.ico differ diff --git a/plugins/SpellChecker/res/Flags/er.ico b/plugins/SpellChecker/res/Flags/er.ico new file mode 100644 index 0000000000..baff122729 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/er.ico differ diff --git a/plugins/SpellChecker/res/Flags/es_ES.ico b/plugins/SpellChecker/res/Flags/es_ES.ico new file mode 100644 index 0000000000..007ca2558b Binary files /dev/null and b/plugins/SpellChecker/res/Flags/es_ES.ico differ diff --git a/plugins/SpellChecker/res/Flags/es_MX.ico b/plugins/SpellChecker/res/Flags/es_MX.ico new file mode 100644 index 0000000000..086ed39da7 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/es_MX.ico differ diff --git a/plugins/SpellChecker/res/Flags/et_EE.ico b/plugins/SpellChecker/res/Flags/et_EE.ico new file mode 100644 index 0000000000..5e2a142d1d Binary files /dev/null and b/plugins/SpellChecker/res/Flags/et_EE.ico differ diff --git a/plugins/SpellChecker/res/Flags/fa_IR.ico b/plugins/SpellChecker/res/Flags/fa_IR.ico new file mode 100644 index 0000000000..35d952abb7 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/fa_IR.ico differ diff --git a/plugins/SpellChecker/res/Flags/fi_FI.ico b/plugins/SpellChecker/res/Flags/fi_FI.ico new file mode 100644 index 0000000000..f333f5a92c Binary files /dev/null and b/plugins/SpellChecker/res/Flags/fi_FI.ico differ diff --git a/plugins/SpellChecker/res/Flags/fj_FJ.ico b/plugins/SpellChecker/res/Flags/fj_FJ.ico new file mode 100644 index 0000000000..8f1b309652 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/fj_FJ.ico differ diff --git a/plugins/SpellChecker/res/Flags/fk.ico b/plugins/SpellChecker/res/Flags/fk.ico new file mode 100644 index 0000000000..bbb36896a8 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/fk.ico differ diff --git a/plugins/SpellChecker/res/Flags/fm.ico b/plugins/SpellChecker/res/Flags/fm.ico new file mode 100644 index 0000000000..d9f5cd1fe8 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/fm.ico differ diff --git a/plugins/SpellChecker/res/Flags/fo_FO.ico b/plugins/SpellChecker/res/Flags/fo_FO.ico new file mode 100644 index 0000000000..dc4835e413 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/fo_FO.ico differ diff --git a/plugins/SpellChecker/res/Flags/fr_BE.ico b/plugins/SpellChecker/res/Flags/fr_BE.ico new file mode 100644 index 0000000000..e5d92e1753 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/fr_BE.ico differ diff --git a/plugins/SpellChecker/res/Flags/fr_FR.ico b/plugins/SpellChecker/res/Flags/fr_FR.ico new file mode 100644 index 0000000000..503ab0040c Binary files /dev/null and b/plugins/SpellChecker/res/Flags/fr_FR.ico differ diff --git a/plugins/SpellChecker/res/Flags/ga.ico b/plugins/SpellChecker/res/Flags/ga.ico new file mode 100644 index 0000000000..46ba42d82e Binary files /dev/null and b/plugins/SpellChecker/res/Flags/ga.ico differ diff --git a/plugins/SpellChecker/res/Flags/ga_IE.ico b/plugins/SpellChecker/res/Flags/ga_IE.ico new file mode 100644 index 0000000000..6cd8a7d7a6 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/ga_IE.ico differ diff --git a/plugins/SpellChecker/res/Flags/gd.ico b/plugins/SpellChecker/res/Flags/gd.ico new file mode 100644 index 0000000000..72bd001826 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/gd.ico differ diff --git a/plugins/SpellChecker/res/Flags/gd_GB.ico b/plugins/SpellChecker/res/Flags/gd_GB.ico new file mode 100644 index 0000000000..f29d98cc06 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/gd_GB.ico differ diff --git a/plugins/SpellChecker/res/Flags/ge.ico b/plugins/SpellChecker/res/Flags/ge.ico new file mode 100644 index 0000000000..7d6897c9fc Binary files /dev/null and b/plugins/SpellChecker/res/Flags/ge.ico differ diff --git a/plugins/SpellChecker/res/Flags/gi.ico b/plugins/SpellChecker/res/Flags/gi.ico new file mode 100644 index 0000000000..b4455ec2e6 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/gi.ico differ diff --git a/plugins/SpellChecker/res/Flags/gl.ico b/plugins/SpellChecker/res/Flags/gl.ico new file mode 100644 index 0000000000..e60f0d69f6 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/gl.ico differ diff --git a/plugins/SpellChecker/res/Flags/gm.ico b/plugins/SpellChecker/res/Flags/gm.ico new file mode 100644 index 0000000000..355587c4ca Binary files /dev/null and b/plugins/SpellChecker/res/Flags/gm.ico differ diff --git a/plugins/SpellChecker/res/Flags/gn.ico b/plugins/SpellChecker/res/Flags/gn.ico new file mode 100644 index 0000000000..2af4a63e46 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/gn.ico differ diff --git a/plugins/SpellChecker/res/Flags/gp.ico b/plugins/SpellChecker/res/Flags/gp.ico new file mode 100644 index 0000000000..25ed546c2f Binary files /dev/null and b/plugins/SpellChecker/res/Flags/gp.ico differ diff --git a/plugins/SpellChecker/res/Flags/gq.ico b/plugins/SpellChecker/res/Flags/gq.ico new file mode 100644 index 0000000000..1ee063a8fd Binary files /dev/null and b/plugins/SpellChecker/res/Flags/gq.ico differ diff --git a/plugins/SpellChecker/res/Flags/gs.ico b/plugins/SpellChecker/res/Flags/gs.ico new file mode 100644 index 0000000000..15ec1b2bf5 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/gs.ico differ diff --git a/plugins/SpellChecker/res/Flags/gt.ico b/plugins/SpellChecker/res/Flags/gt.ico new file mode 100644 index 0000000000..64530c8ccd Binary files /dev/null and b/plugins/SpellChecker/res/Flags/gt.ico differ diff --git a/plugins/SpellChecker/res/Flags/gu.ico b/plugins/SpellChecker/res/Flags/gu.ico new file mode 100644 index 0000000000..2b235cf8f9 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/gu.ico differ diff --git a/plugins/SpellChecker/res/Flags/gw.ico b/plugins/SpellChecker/res/Flags/gw.ico new file mode 100644 index 0000000000..ffb060551c Binary files /dev/null and b/plugins/SpellChecker/res/Flags/gw.ico differ diff --git a/plugins/SpellChecker/res/Flags/gy.ico b/plugins/SpellChecker/res/Flags/gy.ico new file mode 100644 index 0000000000..a20415d615 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/gy.ico differ diff --git a/plugins/SpellChecker/res/Flags/he_IL.ico b/plugins/SpellChecker/res/Flags/he_IL.ico new file mode 100644 index 0000000000..fdd3ea10bc Binary files /dev/null and b/plugins/SpellChecker/res/Flags/he_IL.ico differ diff --git a/plugins/SpellChecker/res/Flags/hi_IN.ico b/plugins/SpellChecker/res/Flags/hi_IN.ico new file mode 100644 index 0000000000..b1a927d872 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/hi_IN.ico differ diff --git a/plugins/SpellChecker/res/Flags/hk.ico b/plugins/SpellChecker/res/Flags/hk.ico new file mode 100644 index 0000000000..ad16f068e9 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/hk.ico differ diff --git a/plugins/SpellChecker/res/Flags/hn.ico b/plugins/SpellChecker/res/Flags/hn.ico new file mode 100644 index 0000000000..12e2ab08b7 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/hn.ico differ diff --git a/plugins/SpellChecker/res/Flags/hr_HR.ico b/plugins/SpellChecker/res/Flags/hr_HR.ico new file mode 100644 index 0000000000..c6efff9bb0 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/hr_HR.ico differ diff --git a/plugins/SpellChecker/res/Flags/ht.ico b/plugins/SpellChecker/res/Flags/ht.ico new file mode 100644 index 0000000000..51fb8a6b40 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/ht.ico differ diff --git a/plugins/SpellChecker/res/Flags/hu_HU.ico b/plugins/SpellChecker/res/Flags/hu_HU.ico new file mode 100644 index 0000000000..73ddd2df6a Binary files /dev/null and b/plugins/SpellChecker/res/Flags/hu_HU.ico differ diff --git a/plugins/SpellChecker/res/Flags/id_ID.ico b/plugins/SpellChecker/res/Flags/id_ID.ico new file mode 100644 index 0000000000..9432e87f95 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/id_ID.ico differ diff --git a/plugins/SpellChecker/res/Flags/io.ico b/plugins/SpellChecker/res/Flags/io.ico new file mode 100644 index 0000000000..a2eaba74e3 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/io.ico differ diff --git a/plugins/SpellChecker/res/Flags/iq.ico b/plugins/SpellChecker/res/Flags/iq.ico new file mode 100644 index 0000000000..8501e2588a Binary files /dev/null and b/plugins/SpellChecker/res/Flags/iq.ico differ diff --git a/plugins/SpellChecker/res/Flags/is_IS.ico b/plugins/SpellChecker/res/Flags/is_IS.ico new file mode 100644 index 0000000000..6dbbcef47f Binary files /dev/null and b/plugins/SpellChecker/res/Flags/is_IS.ico differ diff --git a/plugins/SpellChecker/res/Flags/it_IT.ico b/plugins/SpellChecker/res/Flags/it_IT.ico new file mode 100644 index 0000000000..11d08ed51f Binary files /dev/null and b/plugins/SpellChecker/res/Flags/it_IT.ico differ diff --git a/plugins/SpellChecker/res/Flags/jm.ico b/plugins/SpellChecker/res/Flags/jm.ico new file mode 100644 index 0000000000..c4d76a5778 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/jm.ico differ diff --git a/plugins/SpellChecker/res/Flags/jo.ico b/plugins/SpellChecker/res/Flags/jo.ico new file mode 100644 index 0000000000..a80478f787 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/jo.ico differ diff --git a/plugins/SpellChecker/res/Flags/jp.ico b/plugins/SpellChecker/res/Flags/jp.ico new file mode 100644 index 0000000000..a415342ab2 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/jp.ico differ diff --git a/plugins/SpellChecker/res/Flags/ke.ico b/plugins/SpellChecker/res/Flags/ke.ico new file mode 100644 index 0000000000..554ecbb433 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/ke.ico differ diff --git a/plugins/SpellChecker/res/Flags/kg.ico b/plugins/SpellChecker/res/Flags/kg.ico new file mode 100644 index 0000000000..81b33aa1a0 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/kg.ico differ diff --git a/plugins/SpellChecker/res/Flags/ki.ico b/plugins/SpellChecker/res/Flags/ki.ico new file mode 100644 index 0000000000..93b225df0e Binary files /dev/null and b/plugins/SpellChecker/res/Flags/ki.ico differ diff --git a/plugins/SpellChecker/res/Flags/km.ico b/plugins/SpellChecker/res/Flags/km.ico new file mode 100644 index 0000000000..3bf56839d9 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/km.ico differ diff --git a/plugins/SpellChecker/res/Flags/km_KH.ico b/plugins/SpellChecker/res/Flags/km_KH.ico new file mode 100644 index 0000000000..69d08fbd86 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/km_KH.ico differ diff --git a/plugins/SpellChecker/res/Flags/kn.ico b/plugins/SpellChecker/res/Flags/kn.ico new file mode 100644 index 0000000000..c959493d47 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/kn.ico differ diff --git a/plugins/SpellChecker/res/Flags/kp.ico b/plugins/SpellChecker/res/Flags/kp.ico new file mode 100644 index 0000000000..4dc460f2c7 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/kp.ico differ diff --git a/plugins/SpellChecker/res/Flags/kr.ico b/plugins/SpellChecker/res/Flags/kr.ico new file mode 100644 index 0000000000..b2c8f19dce Binary files /dev/null and b/plugins/SpellChecker/res/Flags/kr.ico differ diff --git a/plugins/SpellChecker/res/Flags/ku_TR.ico b/plugins/SpellChecker/res/Flags/ku_TR.ico new file mode 100644 index 0000000000..024d3838f9 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/ku_TR.ico differ diff --git a/plugins/SpellChecker/res/Flags/kw.ico b/plugins/SpellChecker/res/Flags/kw.ico new file mode 100644 index 0000000000..a7382b28ab Binary files /dev/null and b/plugins/SpellChecker/res/Flags/kw.ico differ diff --git a/plugins/SpellChecker/res/Flags/ky.ico b/plugins/SpellChecker/res/Flags/ky.ico new file mode 100644 index 0000000000..a0f44c16dc Binary files /dev/null and b/plugins/SpellChecker/res/Flags/ky.ico differ diff --git a/plugins/SpellChecker/res/Flags/kz.ico b/plugins/SpellChecker/res/Flags/kz.ico new file mode 100644 index 0000000000..e18579c25a Binary files /dev/null and b/plugins/SpellChecker/res/Flags/kz.ico differ diff --git a/plugins/SpellChecker/res/Flags/la.ico b/plugins/SpellChecker/res/Flags/la.ico new file mode 100644 index 0000000000..1b5762786f Binary files /dev/null and b/plugins/SpellChecker/res/Flags/la.ico differ diff --git a/plugins/SpellChecker/res/Flags/lb.ico b/plugins/SpellChecker/res/Flags/lb.ico new file mode 100644 index 0000000000..7221f195a4 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/lb.ico differ diff --git a/plugins/SpellChecker/res/Flags/lc.ico b/plugins/SpellChecker/res/Flags/lc.ico new file mode 100644 index 0000000000..d3e57d6b3e Binary files /dev/null and b/plugins/SpellChecker/res/Flags/lc.ico differ diff --git a/plugins/SpellChecker/res/Flags/li.ico b/plugins/SpellChecker/res/Flags/li.ico new file mode 100644 index 0000000000..2431ff8222 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/li.ico differ diff --git a/plugins/SpellChecker/res/Flags/lk.ico b/plugins/SpellChecker/res/Flags/lk.ico new file mode 100644 index 0000000000..b39b1fd2cf Binary files /dev/null and b/plugins/SpellChecker/res/Flags/lk.ico differ diff --git a/plugins/SpellChecker/res/Flags/lr.ico b/plugins/SpellChecker/res/Flags/lr.ico new file mode 100644 index 0000000000..cfab48057d Binary files /dev/null and b/plugins/SpellChecker/res/Flags/lr.ico differ diff --git a/plugins/SpellChecker/res/Flags/ls.ico b/plugins/SpellChecker/res/Flags/ls.ico new file mode 100644 index 0000000000..874b1626aa Binary files /dev/null and b/plugins/SpellChecker/res/Flags/ls.ico differ diff --git a/plugins/SpellChecker/res/Flags/lt_LT.ico b/plugins/SpellChecker/res/Flags/lt_LT.ico new file mode 100644 index 0000000000..a115a7da55 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/lt_LT.ico differ diff --git a/plugins/SpellChecker/res/Flags/lu_LU.ico b/plugins/SpellChecker/res/Flags/lu_LU.ico new file mode 100644 index 0000000000..c509c39988 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/lu_LU.ico differ diff --git a/plugins/SpellChecker/res/Flags/lv_LV.ico b/plugins/SpellChecker/res/Flags/lv_LV.ico new file mode 100644 index 0000000000..eafbc01a21 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/lv_LV.ico differ diff --git a/plugins/SpellChecker/res/Flags/ly.ico b/plugins/SpellChecker/res/Flags/ly.ico new file mode 100644 index 0000000000..00bdab1183 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/ly.ico differ diff --git a/plugins/SpellChecker/res/Flags/ma.ico b/plugins/SpellChecker/res/Flags/ma.ico new file mode 100644 index 0000000000..7ac31f210b Binary files /dev/null and b/plugins/SpellChecker/res/Flags/ma.ico differ diff --git a/plugins/SpellChecker/res/Flags/mc.ico b/plugins/SpellChecker/res/Flags/mc.ico new file mode 100644 index 0000000000..14ab0d4851 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/mc.ico differ diff --git a/plugins/SpellChecker/res/Flags/md.ico b/plugins/SpellChecker/res/Flags/md.ico new file mode 100644 index 0000000000..238890dfd2 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/md.ico differ diff --git a/plugins/SpellChecker/res/Flags/mg_MG.ico b/plugins/SpellChecker/res/Flags/mg_MG.ico new file mode 100644 index 0000000000..c4bd13e6ca Binary files /dev/null and b/plugins/SpellChecker/res/Flags/mg_MG.ico differ diff --git a/plugins/SpellChecker/res/Flags/mh.ico b/plugins/SpellChecker/res/Flags/mh.ico new file mode 100644 index 0000000000..d82482fb09 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/mh.ico differ diff --git a/plugins/SpellChecker/res/Flags/mi_NZ.ico b/plugins/SpellChecker/res/Flags/mi_NZ.ico new file mode 100644 index 0000000000..9c4cac8f15 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/mi_NZ.ico differ diff --git a/plugins/SpellChecker/res/Flags/mk.ico b/plugins/SpellChecker/res/Flags/mk.ico new file mode 100644 index 0000000000..1c032d9a9a Binary files /dev/null and b/plugins/SpellChecker/res/Flags/mk.ico differ diff --git a/plugins/SpellChecker/res/Flags/ml.ico b/plugins/SpellChecker/res/Flags/ml.ico new file mode 100644 index 0000000000..d05c5bede3 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/ml.ico differ diff --git a/plugins/SpellChecker/res/Flags/mm.ico b/plugins/SpellChecker/res/Flags/mm.ico new file mode 100644 index 0000000000..f8257e6132 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/mm.ico differ diff --git a/plugins/SpellChecker/res/Flags/mn_MN.ico b/plugins/SpellChecker/res/Flags/mn_MN.ico new file mode 100644 index 0000000000..2ad366dae2 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/mn_MN.ico differ diff --git a/plugins/SpellChecker/res/Flags/mo.ico b/plugins/SpellChecker/res/Flags/mo.ico new file mode 100644 index 0000000000..0d1d78aed1 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/mo.ico differ diff --git a/plugins/SpellChecker/res/Flags/mo_BF.ico b/plugins/SpellChecker/res/Flags/mo_BF.ico new file mode 100644 index 0000000000..cadd8be169 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/mo_BF.ico differ diff --git a/plugins/SpellChecker/res/Flags/mp.ico b/plugins/SpellChecker/res/Flags/mp.ico new file mode 100644 index 0000000000..6df1f656d1 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/mp.ico differ diff --git a/plugins/SpellChecker/res/Flags/mq.ico b/plugins/SpellChecker/res/Flags/mq.ico new file mode 100644 index 0000000000..f42c7d13e0 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/mq.ico differ diff --git a/plugins/SpellChecker/res/Flags/mr.ico b/plugins/SpellChecker/res/Flags/mr.ico new file mode 100644 index 0000000000..e2617fd5b4 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/mr.ico differ diff --git a/plugins/SpellChecker/res/Flags/mr_IN.ico b/plugins/SpellChecker/res/Flags/mr_IN.ico new file mode 100644 index 0000000000..b1a927d872 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/mr_IN.ico differ diff --git a/plugins/SpellChecker/res/Flags/ms.ico b/plugins/SpellChecker/res/Flags/ms.ico new file mode 100644 index 0000000000..700e4f5478 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/ms.ico differ diff --git a/plugins/SpellChecker/res/Flags/ms_MY.ico b/plugins/SpellChecker/res/Flags/ms_MY.ico new file mode 100644 index 0000000000..b6ddded2d5 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/ms_MY.ico differ diff --git a/plugins/SpellChecker/res/Flags/mt.ico b/plugins/SpellChecker/res/Flags/mt.ico new file mode 100644 index 0000000000..d8b5ad2c41 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/mt.ico differ diff --git a/plugins/SpellChecker/res/Flags/mu.ico b/plugins/SpellChecker/res/Flags/mu.ico new file mode 100644 index 0000000000..09b4103584 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/mu.ico differ diff --git a/plugins/SpellChecker/res/Flags/mv.ico b/plugins/SpellChecker/res/Flags/mv.ico new file mode 100644 index 0000000000..ca77f768ef Binary files /dev/null and b/plugins/SpellChecker/res/Flags/mv.ico differ diff --git a/plugins/SpellChecker/res/Flags/mz.ico b/plugins/SpellChecker/res/Flags/mz.ico new file mode 100644 index 0000000000..803e62cde4 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/mz.ico differ diff --git a/plugins/SpellChecker/res/Flags/na.ico b/plugins/SpellChecker/res/Flags/na.ico new file mode 100644 index 0000000000..09ae908448 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/na.ico differ diff --git a/plugins/SpellChecker/res/Flags/nb_NO.ico b/plugins/SpellChecker/res/Flags/nb_NO.ico new file mode 100644 index 0000000000..f0b648deba Binary files /dev/null and b/plugins/SpellChecker/res/Flags/nb_NO.ico differ diff --git a/plugins/SpellChecker/res/Flags/nc.ico b/plugins/SpellChecker/res/Flags/nc.ico new file mode 100644 index 0000000000..f8c8695c00 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/nc.ico differ diff --git a/plugins/SpellChecker/res/Flags/ne.ico b/plugins/SpellChecker/res/Flags/ne.ico new file mode 100644 index 0000000000..45b61121ca Binary files /dev/null and b/plugins/SpellChecker/res/Flags/ne.ico differ diff --git a/plugins/SpellChecker/res/Flags/ne_NP.ico b/plugins/SpellChecker/res/Flags/ne_NP.ico new file mode 100644 index 0000000000..cc7954f1ad Binary files /dev/null and b/plugins/SpellChecker/res/Flags/ne_NP.ico differ diff --git a/plugins/SpellChecker/res/Flags/nf.ico b/plugins/SpellChecker/res/Flags/nf.ico new file mode 100644 index 0000000000..49e50f9478 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/nf.ico differ diff --git a/plugins/SpellChecker/res/Flags/ng.ico b/plugins/SpellChecker/res/Flags/ng.ico new file mode 100644 index 0000000000..250fc73fa2 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/ng.ico differ diff --git a/plugins/SpellChecker/res/Flags/ni.ico b/plugins/SpellChecker/res/Flags/ni.ico new file mode 100644 index 0000000000..f0795cec7f Binary files /dev/null and b/plugins/SpellChecker/res/Flags/ni.ico differ diff --git a/plugins/SpellChecker/res/Flags/nl_NL.ico b/plugins/SpellChecker/res/Flags/nl_NL.ico new file mode 100644 index 0000000000..ea2d4c64d4 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/nl_NL.ico differ diff --git a/plugins/SpellChecker/res/Flags/nn_NO.ico b/plugins/SpellChecker/res/Flags/nn_NO.ico new file mode 100644 index 0000000000..f0b648deba Binary files /dev/null and b/plugins/SpellChecker/res/Flags/nn_NO.ico differ diff --git a/plugins/SpellChecker/res/Flags/nr.ico b/plugins/SpellChecker/res/Flags/nr.ico new file mode 100644 index 0000000000..995a00a79a Binary files /dev/null and b/plugins/SpellChecker/res/Flags/nr.ico differ diff --git a/plugins/SpellChecker/res/Flags/nr_ZA.ico b/plugins/SpellChecker/res/Flags/nr_ZA.ico new file mode 100644 index 0000000000..a786459654 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/nr_ZA.ico differ diff --git a/plugins/SpellChecker/res/Flags/ns_ZA.ico b/plugins/SpellChecker/res/Flags/ns_ZA.ico new file mode 100644 index 0000000000..a786459654 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/ns_ZA.ico differ diff --git a/plugins/SpellChecker/res/Flags/nu.ico b/plugins/SpellChecker/res/Flags/nu.ico new file mode 100644 index 0000000000..98675192de Binary files /dev/null and b/plugins/SpellChecker/res/Flags/nu.ico differ diff --git a/plugins/SpellChecker/res/Flags/ny_MW.ico b/plugins/SpellChecker/res/Flags/ny_MW.ico new file mode 100644 index 0000000000..dce539f90d Binary files /dev/null and b/plugins/SpellChecker/res/Flags/ny_MW.ico differ diff --git a/plugins/SpellChecker/res/Flags/om.ico b/plugins/SpellChecker/res/Flags/om.ico new file mode 100644 index 0000000000..98d735bcc9 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/om.ico differ diff --git a/plugins/SpellChecker/res/Flags/or_IN.ico b/plugins/SpellChecker/res/Flags/or_IN.ico new file mode 100644 index 0000000000..b1a927d872 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/or_IN.ico differ diff --git a/plugins/SpellChecker/res/Flags/pa.ico b/plugins/SpellChecker/res/Flags/pa.ico new file mode 100644 index 0000000000..a0b4d344fe Binary files /dev/null and b/plugins/SpellChecker/res/Flags/pa.ico differ diff --git a/plugins/SpellChecker/res/Flags/pe.ico b/plugins/SpellChecker/res/Flags/pe.ico new file mode 100644 index 0000000000..1e3d1a7339 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/pe.ico differ diff --git a/plugins/SpellChecker/res/Flags/pf.ico b/plugins/SpellChecker/res/Flags/pf.ico new file mode 100644 index 0000000000..2b2acef214 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/pf.ico differ diff --git a/plugins/SpellChecker/res/Flags/pg.ico b/plugins/SpellChecker/res/Flags/pg.ico new file mode 100644 index 0000000000..324ba8e192 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/pg.ico differ diff --git a/plugins/SpellChecker/res/Flags/pk.ico b/plugins/SpellChecker/res/Flags/pk.ico new file mode 100644 index 0000000000..d979e9decc Binary files /dev/null and b/plugins/SpellChecker/res/Flags/pk.ico differ diff --git a/plugins/SpellChecker/res/Flags/pl_PL.ico b/plugins/SpellChecker/res/Flags/pl_PL.ico new file mode 100644 index 0000000000..9b3bfd1fbc Binary files /dev/null and b/plugins/SpellChecker/res/Flags/pl_PL.ico differ diff --git a/plugins/SpellChecker/res/Flags/pm.ico b/plugins/SpellChecker/res/Flags/pm.ico new file mode 100644 index 0000000000..0de10e26f5 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/pm.ico differ diff --git a/plugins/SpellChecker/res/Flags/pn.ico b/plugins/SpellChecker/res/Flags/pn.ico new file mode 100644 index 0000000000..566b7facbc Binary files /dev/null and b/plugins/SpellChecker/res/Flags/pn.ico differ diff --git a/plugins/SpellChecker/res/Flags/pr.ico b/plugins/SpellChecker/res/Flags/pr.ico new file mode 100644 index 0000000000..890e131d11 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/pr.ico differ diff --git a/plugins/SpellChecker/res/Flags/ps.ico b/plugins/SpellChecker/res/Flags/ps.ico new file mode 100644 index 0000000000..773c066649 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/ps.ico differ diff --git a/plugins/SpellChecker/res/Flags/pt_BR.ico b/plugins/SpellChecker/res/Flags/pt_BR.ico new file mode 100644 index 0000000000..9d015e3614 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/pt_BR.ico differ diff --git a/plugins/SpellChecker/res/Flags/pt_PT.ico b/plugins/SpellChecker/res/Flags/pt_PT.ico new file mode 100644 index 0000000000..d322f99767 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/pt_PT.ico differ diff --git a/plugins/SpellChecker/res/Flags/pw.ico b/plugins/SpellChecker/res/Flags/pw.ico new file mode 100644 index 0000000000..cd5b828bc6 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/pw.ico differ diff --git a/plugins/SpellChecker/res/Flags/py.ico b/plugins/SpellChecker/res/Flags/py.ico new file mode 100644 index 0000000000..a0cc19e81a Binary files /dev/null and b/plugins/SpellChecker/res/Flags/py.ico differ diff --git a/plugins/SpellChecker/res/Flags/qa.ico b/plugins/SpellChecker/res/Flags/qa.ico new file mode 100644 index 0000000000..dbd700f008 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/qa.ico differ diff --git a/plugins/SpellChecker/res/Flags/qu_BO.ico b/plugins/SpellChecker/res/Flags/qu_BO.ico new file mode 100644 index 0000000000..315825c47e Binary files /dev/null and b/plugins/SpellChecker/res/Flags/qu_BO.ico differ diff --git a/plugins/SpellChecker/res/Flags/readme.txt b/plugins/SpellChecker/res/Flags/readme.txt new file mode 100644 index 0000000000..d20182b7c2 --- /dev/null +++ b/plugins/SpellChecker/res/Flags/readme.txt @@ -0,0 +1,8 @@ +flag icons - famfamfam.com + +Free for any use. If you use these flags in your software or +on your website, an email with a link or a screenshot would be nice. :) + +- Thanks to Christian Cook for splitting it all up into separate images + +Contact: mjames@gmail.com \ No newline at end of file diff --git a/plugins/SpellChecker/res/Flags/ro_BO.ico b/plugins/SpellChecker/res/Flags/ro_BO.ico new file mode 100644 index 0000000000..149a031893 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/ro_BO.ico differ diff --git a/plugins/SpellChecker/res/Flags/ro_RO.ico b/plugins/SpellChecker/res/Flags/ro_RO.ico new file mode 100644 index 0000000000..1345d5166f Binary files /dev/null and b/plugins/SpellChecker/res/Flags/ro_RO.ico differ diff --git a/plugins/SpellChecker/res/Flags/ru_RU.ico b/plugins/SpellChecker/res/Flags/ru_RU.ico new file mode 100644 index 0000000000..ecbe640578 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/ru_RU.ico differ diff --git a/plugins/SpellChecker/res/Flags/rw_RW.ico b/plugins/SpellChecker/res/Flags/rw_RW.ico new file mode 100644 index 0000000000..77d8c8b8c1 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/rw_RW.ico differ diff --git a/plugins/SpellChecker/res/Flags/sa.ico b/plugins/SpellChecker/res/Flags/sa.ico new file mode 100644 index 0000000000..9d10c250a0 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/sa.ico differ diff --git a/plugins/SpellChecker/res/Flags/sb.ico b/plugins/SpellChecker/res/Flags/sb.ico new file mode 100644 index 0000000000..5937333372 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/sb.ico differ diff --git a/plugins/SpellChecker/res/Flags/sc.ico b/plugins/SpellChecker/res/Flags/sc.ico new file mode 100644 index 0000000000..770967b5a0 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/sc.ico differ diff --git a/plugins/SpellChecker/res/Flags/sd.ico b/plugins/SpellChecker/res/Flags/sd.ico new file mode 100644 index 0000000000..6545b0e3f6 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/sd.ico differ diff --git a/plugins/SpellChecker/res/Flags/sg.ico b/plugins/SpellChecker/res/Flags/sg.ico new file mode 100644 index 0000000000..f6ec180a53 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/sg.ico differ diff --git a/plugins/SpellChecker/res/Flags/sh.ico b/plugins/SpellChecker/res/Flags/sh.ico new file mode 100644 index 0000000000..b6acb4008d Binary files /dev/null and b/plugins/SpellChecker/res/Flags/sh.ico differ diff --git a/plugins/SpellChecker/res/Flags/sk_SK.ico b/plugins/SpellChecker/res/Flags/sk_SK.ico new file mode 100644 index 0000000000..b1fac30bea Binary files /dev/null and b/plugins/SpellChecker/res/Flags/sk_SK.ico differ diff --git a/plugins/SpellChecker/res/Flags/sl.ico b/plugins/SpellChecker/res/Flags/sl.ico new file mode 100644 index 0000000000..e9159c16a0 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/sl.ico differ diff --git a/plugins/SpellChecker/res/Flags/sl_SI.ico b/plugins/SpellChecker/res/Flags/sl_SI.ico new file mode 100644 index 0000000000..833fbec207 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/sl_SI.ico differ diff --git a/plugins/SpellChecker/res/Flags/sm.ico b/plugins/SpellChecker/res/Flags/sm.ico new file mode 100644 index 0000000000..5a7423c178 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/sm.ico differ diff --git a/plugins/SpellChecker/res/Flags/sn.ico b/plugins/SpellChecker/res/Flags/sn.ico new file mode 100644 index 0000000000..f8501d7e77 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/sn.ico differ diff --git a/plugins/SpellChecker/res/Flags/so.ico b/plugins/SpellChecker/res/Flags/so.ico new file mode 100644 index 0000000000..27ea026ebe Binary files /dev/null and b/plugins/SpellChecker/res/Flags/so.ico differ diff --git a/plugins/SpellChecker/res/Flags/sr.ico b/plugins/SpellChecker/res/Flags/sr.ico new file mode 100644 index 0000000000..e32ebd74e5 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/sr.ico differ diff --git a/plugins/SpellChecker/res/Flags/sr_CS.ico b/plugins/SpellChecker/res/Flags/sr_CS.ico new file mode 100644 index 0000000000..82e104a81c Binary files /dev/null and b/plugins/SpellChecker/res/Flags/sr_CS.ico differ diff --git a/plugins/SpellChecker/res/Flags/ss_ZA.ico b/plugins/SpellChecker/res/Flags/ss_ZA.ico new file mode 100644 index 0000000000..c5dcd88737 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/ss_ZA.ico differ diff --git a/plugins/SpellChecker/res/Flags/st.ico b/plugins/SpellChecker/res/Flags/st.ico new file mode 100644 index 0000000000..d4dda8a626 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/st.ico differ diff --git a/plugins/SpellChecker/res/Flags/st_ZA.ico b/plugins/SpellChecker/res/Flags/st_ZA.ico new file mode 100644 index 0000000000..a786459654 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/st_ZA.ico differ diff --git a/plugins/SpellChecker/res/Flags/sv.ico b/plugins/SpellChecker/res/Flags/sv.ico new file mode 100644 index 0000000000..00bb86086f Binary files /dev/null and b/plugins/SpellChecker/res/Flags/sv.ico differ diff --git a/plugins/SpellChecker/res/Flags/sv_SE.ico b/plugins/SpellChecker/res/Flags/sv_SE.ico new file mode 100644 index 0000000000..7a58adf63b Binary files /dev/null and b/plugins/SpellChecker/res/Flags/sv_SE.ico differ diff --git a/plugins/SpellChecker/res/Flags/sy.ico b/plugins/SpellChecker/res/Flags/sy.ico new file mode 100644 index 0000000000..d022ebcd57 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/sy.ico differ diff --git a/plugins/SpellChecker/res/Flags/tc.ico b/plugins/SpellChecker/res/Flags/tc.ico new file mode 100644 index 0000000000..750323d0a6 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/tc.ico differ diff --git a/plugins/SpellChecker/res/Flags/td.ico b/plugins/SpellChecker/res/Flags/td.ico new file mode 100644 index 0000000000..c02ef93595 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/td.ico differ diff --git a/plugins/SpellChecker/res/Flags/tet_ID.ico b/plugins/SpellChecker/res/Flags/tet_ID.ico new file mode 100644 index 0000000000..9432e87f95 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/tet_ID.ico differ diff --git a/plugins/SpellChecker/res/Flags/tf.ico b/plugins/SpellChecker/res/Flags/tf.ico new file mode 100644 index 0000000000..334b7f0086 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/tf.ico differ diff --git a/plugins/SpellChecker/res/Flags/tg.ico b/plugins/SpellChecker/res/Flags/tg.ico new file mode 100644 index 0000000000..2ab28c0d06 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/tg.ico differ diff --git a/plugins/SpellChecker/res/Flags/th.ico b/plugins/SpellChecker/res/Flags/th.ico new file mode 100644 index 0000000000..522dd9e1ed Binary files /dev/null and b/plugins/SpellChecker/res/Flags/th.ico differ diff --git a/plugins/SpellChecker/res/Flags/tj.ico b/plugins/SpellChecker/res/Flags/tj.ico new file mode 100644 index 0000000000..fd17d8a87e Binary files /dev/null and b/plugins/SpellChecker/res/Flags/tj.ico differ diff --git a/plugins/SpellChecker/res/Flags/tk.ico b/plugins/SpellChecker/res/Flags/tk.ico new file mode 100644 index 0000000000..f76b1979a6 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/tk.ico differ diff --git a/plugins/SpellChecker/res/Flags/tl.ico b/plugins/SpellChecker/res/Flags/tl.ico new file mode 100644 index 0000000000..e9956a86e5 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/tl.ico differ diff --git a/plugins/SpellChecker/res/Flags/tl_PH.ico b/plugins/SpellChecker/res/Flags/tl_PH.ico new file mode 100644 index 0000000000..d4369474b5 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/tl_PH.ico differ diff --git a/plugins/SpellChecker/res/Flags/tm.ico b/plugins/SpellChecker/res/Flags/tm.ico new file mode 100644 index 0000000000..676fa75bf2 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/tm.ico differ diff --git a/plugins/SpellChecker/res/Flags/tn.ico b/plugins/SpellChecker/res/Flags/tn.ico new file mode 100644 index 0000000000..4427d36fb3 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/tn.ico differ diff --git a/plugins/SpellChecker/res/Flags/tn_ZA.ico b/plugins/SpellChecker/res/Flags/tn_ZA.ico new file mode 100644 index 0000000000..efa797a715 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/tn_ZA.ico differ diff --git a/plugins/SpellChecker/res/Flags/to.ico b/plugins/SpellChecker/res/Flags/to.ico new file mode 100644 index 0000000000..ce677d90df Binary files /dev/null and b/plugins/SpellChecker/res/Flags/to.ico differ diff --git a/plugins/SpellChecker/res/Flags/ts_ZA.ico b/plugins/SpellChecker/res/Flags/ts_ZA.ico new file mode 100644 index 0000000000..a786459654 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/ts_ZA.ico differ diff --git a/plugins/SpellChecker/res/Flags/tt.ico b/plugins/SpellChecker/res/Flags/tt.ico new file mode 100644 index 0000000000..a737128efb Binary files /dev/null and b/plugins/SpellChecker/res/Flags/tt.ico differ diff --git a/plugins/SpellChecker/res/Flags/tv.ico b/plugins/SpellChecker/res/Flags/tv.ico new file mode 100644 index 0000000000..9778da18b2 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/tv.ico differ diff --git a/plugins/SpellChecker/res/Flags/tw.ico b/plugins/SpellChecker/res/Flags/tw.ico new file mode 100644 index 0000000000..4f44eeaf70 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/tw.ico differ diff --git a/plugins/SpellChecker/res/Flags/tz.ico b/plugins/SpellChecker/res/Flags/tz.ico new file mode 100644 index 0000000000..961587b265 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/tz.ico differ diff --git a/plugins/SpellChecker/res/Flags/ug.ico b/plugins/SpellChecker/res/Flags/ug.ico new file mode 100644 index 0000000000..91b92fd2c9 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/ug.ico differ diff --git a/plugins/SpellChecker/res/Flags/uk_UA.ico b/plugins/SpellChecker/res/Flags/uk_UA.ico new file mode 100644 index 0000000000..be541024cb Binary files /dev/null and b/plugins/SpellChecker/res/Flags/uk_UA.ico differ diff --git a/plugins/SpellChecker/res/Flags/um.ico b/plugins/SpellChecker/res/Flags/um.ico new file mode 100644 index 0000000000..0979678e62 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/um.ico differ diff --git a/plugins/SpellChecker/res/Flags/uy.ico b/plugins/SpellChecker/res/Flags/uy.ico new file mode 100644 index 0000000000..9b8203065f Binary files /dev/null and b/plugins/SpellChecker/res/Flags/uy.ico differ diff --git a/plugins/SpellChecker/res/Flags/uz_UZ.ico b/plugins/SpellChecker/res/Flags/uz_UZ.ico new file mode 100644 index 0000000000..1665b26caa Binary files /dev/null and b/plugins/SpellChecker/res/Flags/uz_UZ.ico differ diff --git a/plugins/SpellChecker/res/Flags/va.ico b/plugins/SpellChecker/res/Flags/va.ico new file mode 100644 index 0000000000..0f7e081c83 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/va.ico differ diff --git a/plugins/SpellChecker/res/Flags/vc.ico b/plugins/SpellChecker/res/Flags/vc.ico new file mode 100644 index 0000000000..65e26263ee Binary files /dev/null and b/plugins/SpellChecker/res/Flags/vc.ico differ diff --git a/plugins/SpellChecker/res/Flags/ve.ico b/plugins/SpellChecker/res/Flags/ve.ico new file mode 100644 index 0000000000..45ffac8262 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/ve.ico differ diff --git a/plugins/SpellChecker/res/Flags/ve_ZA.ico b/plugins/SpellChecker/res/Flags/ve_ZA.ico new file mode 100644 index 0000000000..a786459654 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/ve_ZA.ico differ diff --git a/plugins/SpellChecker/res/Flags/vg.ico b/plugins/SpellChecker/res/Flags/vg.ico new file mode 100644 index 0000000000..e41c589f6f Binary files /dev/null and b/plugins/SpellChecker/res/Flags/vg.ico differ diff --git a/plugins/SpellChecker/res/Flags/vi.ico b/plugins/SpellChecker/res/Flags/vi.ico new file mode 100644 index 0000000000..df3a8c1215 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/vi.ico differ diff --git a/plugins/SpellChecker/res/Flags/vi_VI.ico b/plugins/SpellChecker/res/Flags/vi_VI.ico new file mode 100644 index 0000000000..eb767d01a4 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/vi_VI.ico differ diff --git a/plugins/SpellChecker/res/Flags/vu.ico b/plugins/SpellChecker/res/Flags/vu.ico new file mode 100644 index 0000000000..71d877f03d Binary files /dev/null and b/plugins/SpellChecker/res/Flags/vu.ico differ diff --git a/plugins/SpellChecker/res/Flags/wf.ico b/plugins/SpellChecker/res/Flags/wf.ico new file mode 100644 index 0000000000..48364346ae Binary files /dev/null and b/plugins/SpellChecker/res/Flags/wf.ico differ diff --git a/plugins/SpellChecker/res/Flags/ws.ico b/plugins/SpellChecker/res/Flags/ws.ico new file mode 100644 index 0000000000..468ec949c1 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/ws.ico differ diff --git a/plugins/SpellChecker/res/Flags/xh_ZA.ico b/plugins/SpellChecker/res/Flags/xh_ZA.ico new file mode 100644 index 0000000000..a786459654 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/xh_ZA.ico differ diff --git a/plugins/SpellChecker/res/Flags/ye.ico b/plugins/SpellChecker/res/Flags/ye.ico new file mode 100644 index 0000000000..049c38c1c4 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/ye.ico differ diff --git a/plugins/SpellChecker/res/Flags/yt.ico b/plugins/SpellChecker/res/Flags/yt.ico new file mode 100644 index 0000000000..7bec05ff9e Binary files /dev/null and b/plugins/SpellChecker/res/Flags/yt.ico differ diff --git a/plugins/SpellChecker/res/Flags/zm.ico b/plugins/SpellChecker/res/Flags/zm.ico new file mode 100644 index 0000000000..d8ea9873eb Binary files /dev/null and b/plugins/SpellChecker/res/Flags/zm.ico differ diff --git a/plugins/SpellChecker/res/Flags/zu_ZA.ico b/plugins/SpellChecker/res/Flags/zu_ZA.ico new file mode 100644 index 0000000000..a786459654 Binary files /dev/null and b/plugins/SpellChecker/res/Flags/zu_ZA.ico differ diff --git a/plugins/SpellChecker/res/Flags/zw.ico b/plugins/SpellChecker/res/Flags/zw.ico new file mode 100644 index 0000000000..aa7b042fae Binary files /dev/null and b/plugins/SpellChecker/res/Flags/zw.ico differ diff --git a/plugins/SpellChecker/res/Version.rc b/plugins/SpellChecker/res/Version.rc new file mode 100644 index 0000000000..d741488c4f --- /dev/null +++ b/plugins/SpellChecker/res/Version.rc @@ -0,0 +1,42 @@ +// Microsoft Visual C++ generated resource script. +// +#ifdef APSTUDIO_INVOKED +#error this file is not editable by Microsoft Visual C++ +#endif //APSTUDIO_INVOKED + +#include "afxres.h" +#include "..\src\version.h" + +#ifdef _WIN32 +LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL +#endif //_WIN32 + +VS_VERSION_INFO VERSIONINFO + FILEVERSION __FILEVERSION_STRING + PRODUCTVERSION __FILEVERSION_STRING + FILEFLAGSMASK 0x17L +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x4L + FILETYPE 0x0L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "000004b0" + BEGIN + VALUE "FileDescription", __DESCRIPTION + VALUE "InternalName", __PLUGIN_NAME + VALUE "LegalCopyright", __COPYRIGHT + VALUE "OriginalFilename", __FILENAME + VALUE "ProductName", __PLUGIN_NAME + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x0, 1200 + END +END diff --git a/plugins/SpellChecker/res/flags-angelika.rc b/plugins/SpellChecker/res/flags-angelika.rc new file mode 100644 index 0000000000..72bb120971 --- /dev/null +++ b/plugins/SpellChecker/res/flags-angelika.rc @@ -0,0 +1,118 @@ +af ICON "Flags-Angelika\\af_ZA.ico" +af_ZA ICON "Flags-Angelika\\af_ZA.ico" +ar ICON "Flags-Angelika\\ar_AR.ico" +ar_AR ICON "Flags-Angelika\\ar_AR.ico" +az ICON "Flags-Angelika\\az_AZ.ico" +az_AZ ICON "Flags-Angelika\\az_AZ.ico" +bg ICON "Flags-Angelika\\bg_BG.ico" +bg_BG ICON "Flags-Angelika\\bg_BG.ico" +bn_IN ICON "Flags-Angelika\\bn_IN.ico" +ca_ES ICON "Flags-Angelika\\ca_ES.ico" +cs ICON "Flags-Angelika\\cs_CZ.ico" +cs_CZ ICON "Flags-Angelika\\cs_CZ.ico" +csb_PO ICON "Flags-Angelika\\csb_PO.ico" +cy ICON "Flags-Angelika\\cy_GB.ico" +cy_GB ICON "Flags-Angelika\\cy_GB.ico" +da_DK ICON "Flags-Angelika\\da_DK.ico" +de ICON "Flags-Angelika\\de_DE.ico" +de_AT ICON "Flags-Angelika\\de_AT.ico" +de_CH ICON "Flags-Angelika\\de_CH.ico" +de_DE ICON "Flags-Angelika\\de_DE.ico" +el ICON "Flags-Angelika\\el_GR.ico" +el_GR ICON "Flags-Angelika\\el_GR.ico" +em_ET ICON "Flags-Angelika\\em_ET.ico" +en_AU ICON "Flags-Angelika\\en_AU.ico" +en_CA ICON "Flags-Angelika\\en_CA.ico" +en_GB ICON "Flags-Angelika\\en_GB.ico" +en_UK ICON "Flags-Angelika\\en_GB.ico" +en_NZ ICON "Flags-Angelika\\en_NZ.ico" +en_US ICON "Flags-Angelika\\en_US.ico" +en_ZA ICON "Flags-Angelika\\en_ZA.ico" +es ICON "Flags-Angelika\\es_ES.ico" +es_ES ICON "Flags-Angelika\\es_ES.ico" +es_MX ICON "Flags-Angelika\\es_MX.ico" +et_EE ICON "Flags-Angelika\\et_EE.ico" +fa_IR ICON "Flags-Angelika\\fa_IR.ico" +fi ICON "Flags-Angelika\\fi_FI.ico" +fi_FI ICON "Flags-Angelika\\fi_FI.ico" +fj ICON "Flags-Angelika\\fj_FJ.ico" +fj_FJ ICON "Flags-Angelika\\fj_FJ.ico" +fo ICON "Flags-Angelika\\fo_FO.ico" +fo_FO ICON "Flags-Angelika\\fo_FO.ico" +fr ICON "Flags-Angelika\\fr_FR.ico" +fr_BE ICON "Flags-Angelika\\fr_BE.ico" +fr_FR ICON "Flags-Angelika\\fr_FR.ico" +ga_IE ICON "Flags-Angelika\\ga_IE.ico" +gd_GB ICON "Flags-Angelika\\gd_GB.ico" +gl_ES ICON "Flags-Angelika\\gl_ES.ico" +he_IL ICON "Flags-Angelika\\he_IL.ico" +hi ICON "Flags-Angelika\\hi_IN.ico" +hi_IN ICON "Flags-Angelika\\hi_IN.ico" +hr ICON "Flags-Angelika\\hr_Hr.ico" +hr_Hr ICON "Flags-Angelika\\hr_Hr.ico" +hu ICON "Flags-Angelika\\hu_HU.ico" +hu_HU ICON "Flags-Angelika\\hu_HU.ico" +id ICON "Flags-Angelika\\id_ID.ico" +id_ID ICON "Flags-Angelika\\id_ID.ico" +is ICON "Flags-Angelika\\is_IS.ico" +is_IS ICON "Flags-Angelika\\is_IS.ico" +it ICON "Flags-Angelika\\it_IT.ico" +it_IT ICON "Flags-Angelika\\it_IT.ico" +km_KH ICON "Flags-Angelika\\km_KH.ico" +ku_TR ICON "Flags-Angelika\\ku_TR.ico" +lt ICON "Flags-Angelika\\lt_LT.ico" +lt_LT ICON "Flags-Angelika\\lt_LT.ico" +lu ICON "Flags-Angelika\\lu_LU.ico" +lu_LU ICON "Flags-Angelika\\lu_LU.ico" +lv ICON "Flags-Angelika\\lv_LV.ico" +lv_LV ICON "Flags-Angelika\\lv_LV.ico" +mg ICON "Flags-Angelika\\mg_MG.ico" +mg_MG ICON "Flags-Angelika\\mg_MG.ico" +mi_NZ ICON "Flags-Angelika\\mi_NZ.ico" +mn ICON "Flags-Angelika\\mn_MN.ico" +mn_MN ICON "Flags-Angelika\\mn_MN.ico" +mo_BF ICON "Flags-Angelika\\mo_BF.ico" +mr_IN ICON "Flags-Angelika\\mr_IN.ico" +ms_MY ICON "Flags-Angelika\\ms_MY.ico" +nb ICON "Flags-Angelika\\nb_NO.ico" +nb_NO ICON "Flags-Angelika\\nb_NO.ico" +ne_NP ICON "Flags-Angelika\\ne_NP.ico" +nl ICON "Flags-Angelika\\nl_NL.ico" +nl_NL ICON "Flags-Angelika\\nl_NL.ico" +nn_NO ICON "Flags-Angelika\\nn_NO.ico" +no ICON "Flags-Angelika\\nb_NO.ico" +nr_ZA ICON "Flags-Angelika\\nr_ZA.ico" +ns_ZA ICON "Flags-Angelika\\ns_ZA.ico" +or_IN ICON "Flags-Angelika\\or_IN.ico" +pl ICON "Flags-Angelika\\pl_PL.ico" +pl_PL ICON "Flags-Angelika\\pl_PL.ico" +pt ICON "Flags-Angelika\\pt_PT.ico" +pt_BR ICON "Flags-Angelika\\pt_BR.ico" +pt_PT ICON "Flags-Angelika\\pt_PT.ico" +qu_BO ICON "Flags-Angelika\\qu_BO.ico" +ro ICON "Flags-Angelika\\ro_RO.ico" +ro_RO ICON "Flags-Angelika\\ro_RO.ico" +ru ICON "Flags-Angelika\\ru_RU.ico" +ru_RU ICON "Flags-Angelika\\ru_RU.ico" +rw ICON "Flags-Angelika\\rw_RW.ico" +rw_RW ICON "Flags-Angelika\\rw_RW.ico" +sk ICON "Flags-Angelika\\sk_SK.ico" +sk_SK ICON "Flags-Angelika\\sk_SK.ico" +sl_SI ICON "Flags-Angelika\\sl_SI.ico" +ss_ZA ICON "Flags-Angelika\\ss_ZA.ico" +st_ZA ICON "Flags-Angelika\\st_ZA.ico" +sv ICON "Flags-Angelika\\sv_SE.ico" +sv_SE ICON "Flags-Angelika\\sv_SE.ico" +ta_IN ICON "Flags-Angelika\\ta_IN.ico" +tet_ID ICON "Flags-Angelika\\tet_ID.ico" +tl_PH ICON "Flags-Angelika\\tl_PH.ico" +tn_ZA ICON "Flags-Angelika\\tn_ZA.ico" +ts_ZA ICON "Flags-Angelika\\ts_ZA.ico" +uk_UA ICON "Flags-Angelika\\uk_UA.ico" +uz ICON "Flags-Angelika\\uz_UZ.ico" +uz_UZ ICON "Flags-Angelika\\uz_UZ.ico" +ve_ZA ICON "Flags-Angelika\\ve_ZA.ico" +vi ICON "Flags-Angelika\\vi_VI.ico" +vi_VI ICON "Flags-Angelika\\vi_VI.ico" +xh_ZA ICON "Flags-Angelika\\xh_ZA.ico" +zu_ZA ICON "Flags-Angelika\\zu_ZA.ico" diff --git a/plugins/SpellChecker/res/flags.rc b/plugins/SpellChecker/res/flags.rc new file mode 100644 index 0000000000..247c550764 --- /dev/null +++ b/plugins/SpellChecker/res/flags.rc @@ -0,0 +1,119 @@ +af ICON "Flags\\af_ZA.ico" +af_ZA ICON "Flags\\af_ZA.ico" +az ICON "Flags\\az_AZ.ico" +az_AZ ICON "Flags\\az_AZ.ico" +bg ICON "Flags\\bg_BG.ico" +bg_BG ICON "Flags\\bg_BG.ico" +bn_IN ICON "Flags\\bn_IN.ico" +cs ICON "Flags\\cs_CZ.ico" +cs_CZ ICON "Flags\\cs_CZ.ico" +cy ICON "Flags\\cy_GB.ico" +cy_GB ICON "Flags\\cy_GB.ico" +da_DK ICON "Flags\\da_DK.ico" +de ICON "Flags\\de_DE.ico" +de_AT ICON "Flags\\de_AT.ico" +de_CH ICON "Flags\\de_CH.ico" +de_DE ICON "Flags\\de_DE.ico" +el ICON "Flags\\el_GR.ico" +el_GR ICON "Flags\\el_GR.ico" +em_ET ICON "Flags\\em_ET.ico" +en_AU ICON "Flags\\en_AU.ico" +en_CA ICON "Flags\\en_CA.ico" +en_GB ICON "Flags\\en_GB.ico" +en_UK ICON "Flags\\en_GB.ico" +en_NZ ICON "Flags\\en_NZ.ico" +en_US ICON "Flags\\en_US.ico" +en_ZA ICON "Flags\\en_ZA.ico" +es ICON "Flags\\es_ES.ico" +es_ES ICON "Flags\\es_ES.ico" +es_MX ICON "Flags\\es_MX.ico" +et_EE ICON "Flags\\et_EE.ico" +fa_IR ICON "Flags\\fa_IR.ico" +fi ICON "Flags\\fi_FI.ico" +fi_FI ICON "Flags\\fi_FI.ico" +fj ICON "Flags\\fj_FJ.ico" +fj_FJ ICON "Flags\\fj_FJ.ico" +fo ICON "Flags\\fo_FO.ico" +fo_FO ICON "Flags\\fo_FO.ico" +fr ICON "Flags\\fr_FR.ico" +fr_BE ICON "Flags\\fr_BE.ico" +fr_FR ICON "Flags\\fr_FR.ico" +ga_IE ICON "Flags\\ga_IE.ico" +gd_GB ICON "Flags\\gd_GB.ico" +he_IL ICON "Flags\\he_IL.ico" +hi ICON "Flags\\hi_IN.ico" +hi_IN ICON "Flags\\hi_IN.ico" +hr ICON "Flags\\hr_HR.ico" +hr_HR ICON "Flags\\hr_HR.ico" +hu ICON "Flags\\hu_HU.ico" +hu_HU ICON "Flags\\hu_HU.ico" +id ICON "Flags\\id_ID.ico" +id_ID ICON "Flags\\id_ID.ico" +is ICON "Flags\\is_IS.ico" +is_IS ICON "Flags\\is_IS.ico" +it ICON "Flags\\it_IT.ico" +it_IT ICON "Flags\\it_IT.ico" +km_KH ICON "Flags\\km_KH.ico" +ku_TR ICON "Flags\\ku_TR.ico" +lt ICON "Flags\\lt_LT.ico" +lt_LT ICON "Flags\\lt_LT.ico" +lu ICON "Flags\\lu_LU.ico" +lu_LU ICON "Flags\\lu_LU.ico" +lv ICON "Flags\\lv_LV.ico" +lv_LV ICON "Flags\\lv_LV.ico" +mg ICON "Flags\\mg_MG.ico" +mg_MG ICON "Flags\\mg_MG.ico" +mi_NZ ICON "Flags\\mi_NZ.ico" +mn ICON "Flags\\mn_MN.ico" +mn_MN ICON "Flags\\mn_MN.ico" +mo_BF ICON "Flags\\mo_BF.ico" +mr_IN ICON "Flags\\mr_IN.ico" +ms_MY ICON "Flags\\ms_MY.ico" +nb ICON "Flags\\nb_NO.ico" +nb_NO ICON "Flags\\nb_NO.ico" +ne_NP ICON "Flags\\ne_NP.ico" +nl ICON "Flags\\nl_NL.ico" +nl_NL ICON "Flags\\nl_NL.ico" +nn_NO ICON "Flags\\nn_NO.ico" +no ICON "Flags\\nb_NO.ico" +nr_ZA ICON "Flags\\nr_ZA.ico" +ns_ZA ICON "Flags\\ns_ZA.ico" +ny_MW ICON "Flags\\ny_MW.ico" +or_IN ICON "Flags\\or_IN.ico" +pl ICON "Flags\\pl_PL.ico" +pl_PL ICON "Flags\\pl_PL.ico" +pt ICON "Flags\\pt_PT.ico" +pt_BR ICON "Flags\\pt_BR.ico" +pt_PT ICON "Flags\\pt_PT.ico" +qu_BO ICON "Flags\\qu_BO.ico" +ro ICON "Flags\\ro_RO.ico" +ro_BO ICON "Flags\\ro_BO.ico" +ro_RO ICON "Flags\\ro_RO.ico" +ru ICON "Flags\\ru_RU.ico" +ru_RU ICON "Flags\\ru_RU.ico" +rw ICON "Flags\\rw_RW.ico" +rw_RW ICON "Flags\\rw_RW.ico" +sk ICON "Flags\\sk_SK.ico" +sk_SK ICON "Flags\\sk_SK.ico" +sl_SI ICON "Flags\\sl_SI.ico" +sr_CS ICON "Flags\\sr_CS.ico" +ss_ZA ICON "Flags\\ss_ZA.ico" +st_ZA ICON "Flags\\st_ZA.ico" +sv ICON "Flags\\sv_SE.ico" +sv_SE ICON "Flags\\sv_SE.ico" +tet_ID ICON "Flags\\tet_ID.ico" +tl_PH ICON "Flags\\tl_PH.ico" +tn_ZA ICON "Flags\\tn_ZA.ico" +ts_ZA ICON "Flags\\ts_ZA.ico" +uk_UA ICON "Flags\\uk_UA.ico" +uz ICON "Flags\\uz_UZ.ico" +uz_UZ ICON "Flags\\uz_UZ.ico" +ve_ZA ICON "Flags\\ve_ZA.ico" +vi ICON "Flags\\vi_VI.ico" +vi_VI ICON "Flags\\vi_VI.ico" +xh_ZA ICON "Flags\\xh_ZA.ico" +zu_ZA ICON "Flags\\zu_ZA.ico" +mk ICON "Flags\\mk.ico" +bs ICON "Flags\\ba.ico" +zh ICON "Flags\\cn.ico" +en ICON "Flags\\england.ico" diff --git a/plugins/SpellChecker/res/resource.rc b/plugins/SpellChecker/res/resource.rc new file mode 100644 index 0000000000..e3dd3fd55b --- /dev/null +++ b/plugins/SpellChecker/res/resource.rc @@ -0,0 +1,198 @@ +// Microsoft Visual C++ generated resource script. +// +#include "..\src\resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "winresrc.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// Neutral resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NEU) +LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL +#pragma code_page(1252) + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_REPLACEMENTS DIALOGEX 0, 0, 276, 229 +STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_VISIBLE +EXSTYLE WS_EX_CONTROLPARENT +FONT 8, "MS Shell Dlg", 0, 0, 0x1 +BEGIN + GROUPBOX "Replacements",IDC_STATIC,1,5,274,216 + CONTROL "Enable auto-replacements",IDC_AUTO_USER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,20,256,10 + LTEXT "Language:",IDC_LANGUAGE_L,11,37,82,8 + COMBOBOX IDC_LANGUAGE,95,35,173,60,CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP + CONTROL "List1",IDC_REPLACEMENTS,"SysListView32",LVS_REPORT | LVS_SHOWSELALWAYS | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,10,55,258,139 + PUSHBUTTON "Add...",IDC_ADD,68,199,60,15 + PUSHBUTTON "Edit...",IDC_EDIT,137,199,60,15 + PUSHBUTTON "Remove",IDC_REMOVE,205,199,60,15 +END + +IDD_ADD_REPLACEMENT DIALOG 0, 0, 282, 98 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Add auto-replace word" +FONT 8, "MS Shell Dlg" +BEGIN + RTEXT "Wrong word:",IDC_STATIC,7,9,67,11 + EDITTEXT IDC_OLD,77,7,198,13,ES_AUTOHSCROLL + LTEXT "No separators and all lowercase chars",IDC_OLD_PS,77,22,198,11 + RTEXT "Correction:",IDC_STATIC,7,40,67,11 + EDITTEXT IDC_NEW,77,38,180,13,ES_AUTOHSCROLL + CONTROL "",IDC_VAR_HELP,"MButtonClass",WS_TABSTOP,259,38,16,14,WS_EX_NOACTIVATE | 0x10000000L + CONTROL "Use variables in correction",IDC_VARIABLES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,77,55,198,10 + DEFPUSHBUTTON "OK",IDOK,88,77,50,14 + PUSHBUTTON "Cancel",IDCANCEL,142,77,50,14 +END + +IDD_OPTIONS DIALOGEX 0, 0, 284, 247 +STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_VISIBLE +EXSTYLE WS_EX_CONTROLPARENT +FONT 8, "MS Shell Dlg", 0, 0, 0x1 +BEGIN + GROUPBOX "Spell Checker",IDC_SPELL_CHECKER,1,5,282,109 + LTEXT "Default language:",IDC_STATIC,11,20,82,8 + COMBOBOX IDC_DEF_LANG,95,18,173,60,CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP + CONTROL "Auto-replace words with dictionary suggestions",IDC_AUTO_DICT, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,40,266,10 + CONTROL "Ignore words with numbers",IDC_IGNORE_NUMBERS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,52,266,10 + CONTROL "Ignore words in UPPER CASE",IDC_IGNORE_UPPERCASE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,64,266,10 + CONTROL "Ask before sending a message with spelling errors",IDC_ASK_ON_ERROR, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,76,266,10 + CONTROL "Download more dictionaries",IDC_GETMORE,"Hyperlink",WS_TABSTOP | 0x1,10,96,266,12 + GROUPBOX "Advanced",IDC_ADVANCED,1,118,282,125 + LTEXT "Underline type:",IDC_UNDERLINE_TYPE_L,10,134,92,8 + COMBOBOX IDC_UNDERLINE_TYPE,110,132,158,60,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + CONTROL "Show corrections in submenu",IDC_CASCADE_CORRECTIONS, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,154,266,10 + CONTROL "Show all corrections in context menu (takes more time to show)",IDC_SHOW_ALL_CORRECTIONS, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,166,266,10 + CONTROL "Show wrong word",IDC_SHOW_WRONG_WORD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,178,266,10 + CONTROL "Use flags",IDC_USE_FLAGS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,190,266,10 + CONTROL "Use input language to select dictionary",IDC_AUTO_LOCALE, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,202,266,10 + CONTROL "Use dictionaries from other programs",IDC_OTHER_PROGS, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,214,266,10 + CONTROL "Avoid removing underscores (slows down checking of long texts)",IDC_HANDLE_UNDERSCORE, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,226,266,10 +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO +BEGIN + IDD_REPLACEMENTS, DIALOG + BEGIN + LEFTMARGIN, 1 + RIGHTMARGIN, 275 + TOPMARGIN, 1 + BOTTOMMARGIN, 227 + HORZGUIDE, 199 + END + + IDD_ADD_REPLACEMENT, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 275 + TOPMARGIN, 7 + BOTTOMMARGIN, 91 + END + + IDD_OPTIONS, DIALOG + BEGIN + LEFTMARGIN, 1 + RIGHTMARGIN, 283 + VERTGUIDE, 10 + VERTGUIDE, 276 + TOPMARGIN, 1 + BOTTOMMARGIN, 243 + END +END +#endif // APSTUDIO_INVOKED + +#endif // Neutral resources +///////////////////////////////////////////////////////////////////////////// + + +///////////////////////////////////////////////////////////////////////////// +// English (United States) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDI_NO_CHECK ICON "no_spellcheck.ico" +IDI_CHECK ICON "spellcheck.ico" +IDI_UNKNOWN_FLAG ICON "unknown.ico" +#endif // English (United States) resources +///////////////////////////////////////////////////////////////////////////// + + +///////////////////////////////////////////////////////////////////////////// +// English (Canada) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENC) +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_CAN +#pragma code_page(1252) + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "..\\src\\resource.h\0" +END + +2 TEXTINCLUDE +BEGIN + "#include ""winresrc.h""\r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + +#endif // English (Canada) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED \ No newline at end of file diff --git a/plugins/SpellChecker/resource.h b/plugins/SpellChecker/resource.h deleted file mode 100644 index bcb28008fb..0000000000 --- a/plugins/SpellChecker/resource.h +++ /dev/null @@ -1,93 +0,0 @@ -//{{NO_DEPENDENCIES}} -// Microsoft Developer Studio generated include file. -// Used by resource.rc -// -#define IDD_OPTIONS 119 -#define IDD_POPUPS 120 -#define IDR_CONTEXT 120 -#define IDI_NO_CHECK 122 -#define IDI_CHECK 123 -#define IDI_UNKNOWN_FLAG 124 -#define IDD_ADD_REPLACEMENT 125 -#define IDD_REPLACEMENTS 126 -#define IDC_DELAY 1001 -#define IDC_WINCOLORS 1002 -#define IDC_DEFAULTCOLORS 1003 -#define IDC_BGCOLOR 1004 -#define IDC_TEXTCOLOR 1005 -#define IDC_PREV 1006 -#define IDC_DELAYFROMPU 1007 -#define IDC_DELAYCUSTOM 1008 -#define IDC_DELAYPERMANENT 1009 -#define IDC_RIGHT_ACTION 1022 -#define IDC_LEFT_ACTION 1023 -#define IDC_PROTOCOLS 1041 -#define IDC_CHANGED 1058 -#define IDC_REMOVED 1059 -#define IDC_CHECK1 1060 -#define IDC_POPUPS 1060 -#define IDC_AUTOCORRECT 1060 -#define IDC_AUTO_DICT 1060 -#define IDC_VARIABLES 1060 -#define IDC_CHECK2 1061 -#define IDC_DELAY_SPIN 1061 -#define IDC_HISTORY 1061 -#define IDC_SIMULATE_SUPPORT 1061 -#define IDC_USE_LOCALE 1061 -#define IDC_CASCADE_CORRECTIONS 1061 -#define IDC_ANSI 1062 -#define IDC_SHOW_ALL_CORRECTIONS 1062 -#define IDC_TRACK_G 1063 -#define IDC_USE_FLAGS 1063 -#define IDC_CHANGED_L 1064 -#define IDC_SHOW_WRONG_WORD 1064 -#define IDC_REMOVED_L 1065 -#define IDC_IGNORE_UPPERCASE 1065 -#define IDC_PROTOCOLS_G 1066 -#define IDC_AUTO_USER 1066 -#define IDC_ASK_ON_ERROR 1066 -#define IDC_PROTOCOLS_L 1067 -#define IDC_AUTO_LOCALE 1067 -#define IDC_COLOURS_G 1068 -#define IDC_TRACK_CHANGE 1068 -#define IDC_OTHER_PROGS 1068 -#define IDC_BGCOLOR_L 1069 -#define IDC_TRACK_REMOVE 1069 -#define IDC_HANDLE_UNDERSCORE 1069 -#define IDC_TEXTCOLOR_L 1070 -#define IDC_ONLY_NOT_OFFLINE 1070 -#define IDC_DELAY_G 1071 -#define IDC_ACTIONS_G 1072 -#define IDC_RIGHT_ACTION_L 1073 -#define IDC_LEFT_ACTION_L 1074 -#define IDC_DEF_LANG 1075 -#define IDC_GETMORE 1076 -#define IDC_ADVANCED 1077 -#define IDC_UNDERLINE_TYPE 1078 -#define IDC_UNDERLINE_TYPE_L 1079 -#define IDC_SPELL_CHECKER 1080 -#define IDC_NEW 1082 -#define IDC_OLD 1083 -#define IDC_REPLACEMENTS 1084 -#define IDC_REMOVE 1085 -#define IDC_ADD 1086 -#define IDC_LANGUAGE 1087 -#define IDC_EDIT 1088 -#define IDC_VAR_HELP 1088 -#define IDC_OLD_PS 1089 -#define IDC_LANGUAGE_L 1090 -#define IDC_IGNORE_NUMBERS 1091 -#define IDC_STATIC -1 - -// Next default values for new objects -// -#ifdef APSTUDIO_INVOKED -#ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_NO_MFC 1 -#define _APS_3D_CONTROLS 1 -#define _APS_NEXT_RESOURCE_VALUE 126 -#define _APS_NEXT_COMMAND_VALUE 40005 -#define _APS_NEXT_CONTROL_VALUE 1092 -#define _APS_NEXT_SYMED_VALUE 101 -#endif -#endif diff --git a/plugins/SpellChecker/resource.rc b/plugins/SpellChecker/resource.rc deleted file mode 100644 index 4316c607bc..0000000000 --- a/plugins/SpellChecker/resource.rc +++ /dev/null @@ -1,200 +0,0 @@ -// Microsoft Visual C++ generated resource script. -// -#include "resource.h" - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -#include "resource.h" -#include "winresrc.h" - -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// Neutral resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NEU) -LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL -#pragma code_page(1252) - -///////////////////////////////////////////////////////////////////////////// -// -// Dialog -// - -IDD_REPLACEMENTS DIALOGEX 0, 0, 276, 229 -STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_VISIBLE -EXSTYLE WS_EX_CONTROLPARENT -FONT 8, "MS Shell Dlg", 0, 0, 0x1 -BEGIN - GROUPBOX "Replacements",IDC_STATIC,1,5,274,216 - CONTROL "Enable auto-replacements",IDC_AUTO_USER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,20,256,10 - LTEXT "Language:",IDC_LANGUAGE_L,11,37,82,8 - COMBOBOX IDC_LANGUAGE,95,35,173,60,CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP - CONTROL "List1",IDC_REPLACEMENTS,"SysListView32",LVS_REPORT | LVS_SHOWSELALWAYS | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,10,55,258,139 - PUSHBUTTON "Add...",IDC_ADD,68,199,60,15 - PUSHBUTTON "Edit...",IDC_EDIT,137,199,60,15 - PUSHBUTTON "Remove",IDC_REMOVE,205,199,60,15 -END - -IDD_ADD_REPLACEMENT DIALOG 0, 0, 282, 98 -STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Add auto-replace word" -FONT 8, "MS Shell Dlg" -BEGIN - RTEXT "Wrong word:",IDC_STATIC,7,9,67,11 - EDITTEXT IDC_OLD,77,7,198,13,ES_AUTOHSCROLL - LTEXT "No separators and all lowercase chars",IDC_OLD_PS,77,22,198,11 - RTEXT "Correction:",IDC_STATIC,7,40,67,11 - EDITTEXT IDC_NEW,77,38,180,13,ES_AUTOHSCROLL - CONTROL "",IDC_VAR_HELP,"MButtonClass",WS_TABSTOP,259,38,16,14,WS_EX_NOACTIVATE | 0x10000000L - CONTROL "Use variables in correction",IDC_VARIABLES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,77,55,198,10 - DEFPUSHBUTTON "OK",IDOK,88,77,50,14 - PUSHBUTTON "Cancel",IDCANCEL,142,77,50,14 -END - -IDD_OPTIONS DIALOGEX 0, 0, 284, 247 -STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_VISIBLE -EXSTYLE WS_EX_CONTROLPARENT -FONT 8, "MS Shell Dlg", 0, 0, 0x1 -BEGIN - GROUPBOX "Spell Checker",IDC_SPELL_CHECKER,1,5,282,109 - LTEXT "Default language:",IDC_STATIC,11,20,82,8 - COMBOBOX IDC_DEF_LANG,95,18,173,60,CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP - CONTROL "Auto-replace words with dictionary suggestions",IDC_AUTO_DICT, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,40,266,10 - CONTROL "Ignore words with numbers",IDC_IGNORE_NUMBERS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,52,266,10 - CONTROL "Ignore words in UPPER CASE",IDC_IGNORE_UPPERCASE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,64,266,10 - CONTROL "Ask before sending a message with spelling errors",IDC_ASK_ON_ERROR, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,76,266,10 - CONTROL "Download more dictionaries",IDC_GETMORE,"Hyperlink",WS_TABSTOP | 0x1,10,96,266,12 - GROUPBOX "Advanced",IDC_ADVANCED,1,118,282,125 - LTEXT "Underline type:",IDC_UNDERLINE_TYPE_L,10,134,92,8 - COMBOBOX IDC_UNDERLINE_TYPE,110,132,158,60,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - CONTROL "Show corrections in submenu",IDC_CASCADE_CORRECTIONS, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,154,266,10 - CONTROL "Show all corrections in context menu (takes more time to show)",IDC_SHOW_ALL_CORRECTIONS, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,166,266,10 - CONTROL "Show wrong word",IDC_SHOW_WRONG_WORD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,178,266,10 - CONTROL "Use flags",IDC_USE_FLAGS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,190,266,10 - CONTROL "Use input language to select dictionary",IDC_AUTO_LOCALE, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,202,266,10 - CONTROL "Use dictionaries from other programs",IDC_OTHER_PROGS, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,214,266,10 - CONTROL "Avoid removing underscores (slows down checking of long texts)",IDC_HANDLE_UNDERSCORE, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,226,266,10 -END - - -///////////////////////////////////////////////////////////////////////////// -// -// DESIGNINFO -// - -#ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO -BEGIN - IDD_REPLACEMENTS, DIALOG - BEGIN - LEFTMARGIN, 1 - RIGHTMARGIN, 275 - TOPMARGIN, 1 - BOTTOMMARGIN, 227 - HORZGUIDE, 199 - END - - IDD_ADD_REPLACEMENT, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 275 - TOPMARGIN, 7 - BOTTOMMARGIN, 91 - END - - IDD_OPTIONS, DIALOG - BEGIN - LEFTMARGIN, 1 - RIGHTMARGIN, 283 - VERTGUIDE, 10 - VERTGUIDE, 276 - TOPMARGIN, 1 - BOTTOMMARGIN, 243 - END -END -#endif // APSTUDIO_INVOKED - -#endif // Neutral resources -///////////////////////////////////////////////////////////////////////////// - - -///////////////////////////////////////////////////////////////////////////// -// English (United States) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -#pragma code_page(1252) - -///////////////////////////////////////////////////////////////////////////// -// -// Icon -// - -// Icon with lowest ID value placed first to ensure application icon -// remains consistent on all systems. -IDI_NO_CHECK ICON "res/no_spellcheck.ico" -IDI_CHECK ICON "res/spellcheck.ico" -IDI_UNKNOWN_FLAG ICON "res/unknown.ico" -#endif // English (United States) resources -///////////////////////////////////////////////////////////////////////////// - - -///////////////////////////////////////////////////////////////////////////// -// English (Canada) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENC) -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_CAN -#pragma code_page(1252) - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE -BEGIN - "resource.h\0" -END - -2 TEXTINCLUDE -BEGIN - "#include ""resource.h""\r\n" - "#include ""winresrc.h""\r\n" - "\0" -END - -3 TEXTINCLUDE -BEGIN - "\r\n" - "\0" -END - -#endif // APSTUDIO_INVOKED - -#endif // English (Canada) resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// - - -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED \ No newline at end of file diff --git a/plugins/SpellChecker/spellchecker-translation.txt b/plugins/SpellChecker/spellchecker-translation.txt deleted file mode 100644 index cfd53dd935..0000000000 --- a/plugins/SpellChecker/spellchecker-translation.txt +++ /dev/null @@ -1,71 +0,0 @@ -; Common strings that belong to many files -;[Spell Checker] - -; ../../plugins/SpellChecker/ardialog.cpp -;[The correction can't be empty!] -;[The correction can't be equal to the wrong word!] -;[The wrong word can't be empty!] -;[Wrong Correction] - -; ../../plugins/SpellChecker/options.cpp -;[Auto-replacements] -;[Correction] -;[Dash] -;[Dash dot] -;[Dash dot dot] -;[Dotted] -;[Line] -;[Message Sessions] -;[Thick] -;[Wave] -;[Wrong word] - -; ../../plugins/SpellChecker/resource.rc -;[Add auto-replace word] -;[Add...] -;[Advanced] -;[Ask before sending a message with spelling errors] -;[Auto-replace words with dictionary suggestions] -;[Avoid removing underscores (slows down checking of long texts)] -;[Cancel] -;[Correction:] -;[Default language:] -;[Download more dictionaries] -;[Edit...] -;[Enable auto-replacements] -;[Ignore words in UPPER CASE] -;[Ignore words with numbers] -;[Language:] -;[No separators and all lowercase chars] -;[OK] -;[Remove] -;[Replacements] -;[Show all corrections in context menu (takes more time to show)] -;[Show corrections in submenu] -;[Show wrong word] -;[Underline type:] -;[Use dictionaries from other programs] -;[Use flags] -;[Use input language to select dictionary] -;[Use variables in correction] -;[Wrong word:] - -; ../../plugins/SpellChecker/spellchecker.cpp -;[Add to dictionary] -;[Always replace with] -;[Corrections] -;[Custom Dictionaries] -;[Dictionaries] -;[Disabled] -;[Enable spell checking] -;[Enable/disable spell checker] -;[Enabled] -;[Flags DLL] -;[Ignore all] -;[Language] -;[Other...] -;[There are %d spelling errors. Are you sure you want to send this message?] -;[Unknown Flag] -;[Wrong word: %s] -;[Wrong words] -;[Your message window does not support SpellChecker Plugin.\nIf you use SRMM, tabSRMM or Scriver, please update them to the latest version,\notherwise ask the author of your message window plugin to add support for Spell Checker.] diff --git a/plugins/SpellChecker/spellchecker.cpp b/plugins/SpellChecker/spellchecker.cpp deleted file mode 100644 index a126070604..0000000000 --- a/plugins/SpellChecker/spellchecker.cpp +++ /dev/null @@ -1,2252 +0,0 @@ -/* -Copyright (C) 2006-2010 Ricardo Pescuma Domenecci - -This is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public -License as published by the Free Software Foundation; either -version 2 of the License, or (at your option) any later version. - -This is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with this file; see the file license.txt. If -not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -Boston, MA 02111-1307, USA. -*/ - -#include "commons.h" - - -// Prototypes /////////////////////////////////////////////////////////////////////////// - - -PLUGININFOEX pluginInfo={ - sizeof(PLUGININFOEX), - __PLUGIN_NAME, - PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM), - __DESCRIPTION, - __AUTHOR, - __AUTHOREMAIL, - __COPYRIGHT, - __AUTHORWEB, - UNICODE_AWARE, - { 0x36753ae3, 0x840b, 0x4797, { 0x94, 0xa5, 0xfd, 0x9f, 0x58, 0x52, 0xb9, 0x42 } } // {36753AE3-840B-4797-94A5-FD9F5852B942} -}; - -typedef struct -{ - TCHAR* szDescr; - char* szName; - int defIconID; -} IconStruct; - -static IconStruct iconList[] = -{ - { LPGENT("Enabled"), "spellchecker_enabled", IDI_CHECK }, - { LPGENT("Disabled"), "spellchecker_disabled", IDI_NO_CHECK }, -// { LPGENT("Unknown Flag"), "spellchecker_unknown_flag", IDI_UNKNOWN_FLAG }, -}; - -#define TIMER_ID 17982 -#define WMU_DICT_CHANGED (WM_USER+100) -#define WMU_KBDL_CHANGED (WM_USER+101) - -#define HOTKEY_ACTION_TOGGLE 1 - -HINSTANCE hInst; - -int hLangpack = 0; - -HANDLE hHooks[6]; -HANDLE hServices[3]; - -HANDLE hDictionariesFolder = NULL; -TCHAR *dictionariesFolder; - -HANDLE hCustomDictionariesFolder = NULL; -TCHAR *customDictionariesFolder; - -HANDLE hFlagsDllFolder = NULL; -TCHAR *flagsDllFolder; - -HBITMAP hCheckedBmp; -BITMAP bmpChecked; - -BOOL variables_enabled = FALSE; -BOOL loaded = FALSE; - -LIST languages(1); - -typedef map DialogMapType; - -DialogMapType dialogs; -DialogMapType menus; - -int ModulesLoaded(WPARAM wParam, LPARAM lParam); -int PreShutdown(WPARAM wParam, LPARAM lParam); -int MsgWindowEvent(WPARAM wParam, LPARAM lParam); -int MsgWindowPopup(WPARAM wParam, LPARAM lParam); -int IconsChanged(WPARAM wParam, LPARAM lParam); -int IconPressed(WPARAM wParam, LPARAM lParam); - -int AddContactTextBox(HANDLE hContact, HWND hwnd, char *name, BOOL srmm, HWND hwndOwner); -int RemoveContactTextBox(HWND hwnd); -int ShowPopupMenu(HWND hwnd, HMENU hMenu, POINT pt, HWND hwndOwner); - -INT_PTR AddContactTextBoxService(WPARAM wParam, LPARAM lParam); -INT_PTR RemoveContactTextBoxService(WPARAM wParam, LPARAM lParam); -INT_PTR ShowPopupMenuService(WPARAM wParam, LPARAM lParam); - -LRESULT CALLBACK MenuWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); - -void ModifyIcon(Dialog *dlg); -BOOL GetWordCharRange(Dialog *dlg, CHARRANGE &sel, TCHAR *text, size_t text_len, int &first_char); -TCHAR *GetWordUnderPoint(Dialog *dlg, POINT pt, CHARRANGE &sel); - -int GetClosestLanguage(TCHAR *lang_name); - -typedef void (*FoundWrongWordCallback)(TCHAR *word, CHARRANGE pos, void *param); - - -#define DEFINE_GUIDXXX(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \ - const GUID CDECL name \ - = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } } - -DEFINE_GUIDXXX(IID_ITextDocument,0x8CC497C0,0xA1DF,0x11CE,0x80,0x98, - 0x00,0xAA,0x00,0x47,0xBE,0x5D); - - - -// Functions //////////////////////////////////////////////////////////////////////////// - - -HICON IcoLib_LoadIcon(Dictionary *dict, BOOL copy) -{ - - char lang[32]; - WideCharToMultiByte(CP_ACP, 0, dict->language, -1, lang, sizeof(lang), NULL, NULL); - return IcoLib_LoadIcon(lang, copy); - -} - - -extern "C" BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) -{ - hInst = hinstDLL; - return TRUE; -} - -extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion) -{ - return &pluginInfo; -} - -extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_SPELLCHECKER, MIID_LAST }; - -extern "C" int __declspec(dllexport) Load(void) -{ - - mir_getLP(&pluginInfo); - - // hooks - hHooks[0] = HookEvent(ME_SYSTEM_MODULESLOADED, ModulesLoaded); - hHooks[1] = HookEvent(ME_SYSTEM_PRESHUTDOWN, PreShutdown); - - hCheckedBmp = LoadBitmap(NULL, MAKEINTRESOURCE(OBM_CHECK)); - if (GetObject(hCheckedBmp, sizeof(bmpChecked), &bmpChecked) == 0) - bmpChecked.bmHeight = bmpChecked.bmWidth = 10; - - return 0; -} - -extern "C" int __declspec(dllexport) Unload(void) -{ - DeleteObject(hCheckedBmp); - FreeDictionaries(languages); - - return 0; -} - -// Called when all the modules are loaded -int ModulesLoaded(WPARAM wParam, LPARAM lParam) -{ - variables_enabled = ServiceExists(MS_VARS_FORMATSTRING); - - // add our modules to the KnownModules list - CallService("DBEditorpp/RegisterSingleModule", (WPARAM) MODULE_NAME, 0); - - // Folders plugin support - if (ServiceExists(MS_FOLDERS_REGISTER_PATH)) - { - hDictionariesFolder = FoldersRegisterCustomPathT(LPGEN("Spell Checker"), LPGEN("Dictionaries"), DICTIONARIES_FOLDER); - - dictionariesFolder = (TCHAR *) mir_alloc(sizeof(TCHAR) * MAX_PATH); - FoldersGetCustomPathT(hDictionariesFolder, dictionariesFolder, MAX_PATH, _T(".")); - - hCustomDictionariesFolder = FoldersRegisterCustomPathT(LPGEN("Spell Checker"), LPGEN("Custom Dictionaries"), CUSTOM_DICTIONARIES_FOLDER); - - customDictionariesFolder = (TCHAR *) mir_alloc(sizeof(TCHAR) * MAX_PATH); - FoldersGetCustomPathT(hCustomDictionariesFolder, customDictionariesFolder, MAX_PATH, _T(".")); - - hFlagsDllFolder = FoldersRegisterCustomPathT(LPGEN("Spell Checker"), LPGEN("Flags DLL"), FLAGS_DLL_FOLDER); - - flagsDllFolder = (TCHAR *) mir_alloc(sizeof(TCHAR) * MAX_PATH); - FoldersGetCustomPathT(hFlagsDllFolder, flagsDllFolder, MAX_PATH, _T(".")); - } - else - { - dictionariesFolder = Utils_ReplaceVarsT(DICTIONARIES_FOLDER); - customDictionariesFolder = Utils_ReplaceVarsT(CUSTOM_DICTIONARIES_FOLDER); - flagsDllFolder = Utils_ReplaceVarsT(FLAGS_DLL_FOLDER); - } - - TCHAR path[MAX_PATH]; - GetModuleFileName(hInst, path, MAX_PATH); - - SKINICONDESC sid = {0}; - sid.cbSize = sizeof(SKINICONDESC); - sid.flags = SIDF_ALL_TCHAR; - sid.ptszSection = LPGENT("Spell Checker"); - sid.ptszDefaultFile = path; - - for (unsigned i = 0; i < MAX_REGS(iconList); ++i) - { - sid.ptszDescription = iconList[i].szDescr; - sid.pszName = iconList[i].szName; - sid.iDefaultIndex = -iconList[i].defIconID; - Skin_AddIcon(&sid); - } - - InitOptions(); - - GetAvaibleDictionaries(languages, dictionariesFolder, customDictionariesFolder); - - LoadOptions(); - - if (opts.use_flags) - { - // Load flags dll - TCHAR flag_file[1024]; - mir_sntprintf(flag_file, MAX_REGS(flag_file), _T("%s\\flags.dll"), flagsDllFolder); - HMODULE hFlagsDll = LoadLibraryEx(flag_file, NULL, LOAD_LIBRARY_AS_DATAFILE); - - sid.flags = SIDF_ALL_TCHAR | SIDF_SORTED; - sid.ptszSection = _T("Languages/Flags"); - - // Get language flags - for(int i = 0; i < languages.getCount(); i++) - { - sid.ptszDescription = languages[i]->full_name; - - char lang[32]; - mir_snprintf(lang, MAX_REGS(lang), "%S", languages[i]->language); - sid.pszName = lang; - - - HICON hFlag = IcoLib_LoadIcon(sid.pszName); - if (hFlag != NULL) - { - // Already registered - Skin_ReleaseIcon(hFlag); - continue; - } - - if (hFlagsDll != NULL) - hFlag = (HICON) LoadImage(hFlagsDll, languages[i]->language, IMAGE_ICON, 16, 16, 0); - else - hFlag = NULL; - - if (hFlag != NULL) - { - sid.hDefaultIcon = hFlag; - sid.ptszDefaultFile = NULL; - sid.iDefaultIndex = 0; - } - else - { - sid.hDefaultIcon = NULL; - sid.ptszDefaultFile = path; - sid.iDefaultIndex = - IDI_UNKNOWN_FLAG; - } - - // Oki, lets add to IcoLib, then - Skin_AddIcon(&sid); - - if (hFlag != NULL) - DestroyIcon(hFlag); - } - FreeLibrary(hFlagsDll); - } - - for (int j = 0; j < languages.getCount(); j++) - { - Dictionary *dict = languages[j]; - - TCHAR filename[MAX_PATH]; - mir_sntprintf(filename, MAX_PATH, _T("%s\\%s.ar"), customDictionariesFolder, dict->language); - dict->autoReplace = new AutoReplaceMap(filename, dict); - - if (lstrcmp(dict->language, opts.default_language) == 0) - dict->load(); - } - - hHooks[2] = HookEvent(ME_SKIN2_ICONSCHANGED, &IconsChanged); - hHooks[3] = HookEvent(ME_MSG_WINDOWEVENT, &MsgWindowEvent); - hHooks[4] = HookEvent(ME_MSG_WINDOWPOPUP, &MsgWindowPopup); - hHooks[5] = HookEvent(ME_MSG_ICONPRESSED, &IconPressed); - - hServices[0] = CreateServiceFunction(MS_SPELLCHECKER_ADD_RICHEDIT, AddContactTextBoxService); - hServices[1] = CreateServiceFunction(MS_SPELLCHECKER_REMOVE_RICHEDIT, RemoveContactTextBoxService); - hServices[2] = CreateServiceFunction(MS_SPELLCHECKER_SHOW_POPUP_MENU, ShowPopupMenuService); - - if (ServiceExists(MS_MSG_ADDICON)) - { - StatusIconData sid = {0}; - sid.cbSize = sizeof(sid); - sid.szModule = MODULE_NAME; - sid.hIconDisabled = IcoLib_LoadIcon("spellchecker_disabled", TRUE); - sid.flags = MBF_HIDDEN; - - for (int i = 0; i < languages.getCount(); i++) - { - sid.dwId = i; - - char tmp[128]; - mir_snprintf(tmp, MAX_REGS(tmp), "%s - " TCHAR_STR_PARAM, - Translate("Spell Checker"), languages[i]->full_name); - sid.szTooltip = tmp; - - if (opts.use_flags) - sid.hIcon = IcoLib_LoadIcon(languages[i], TRUE); - else - sid.hIcon = IcoLib_LoadIcon("spellchecker_enabled", TRUE); - - CallService(MS_MSG_ADDICON, 0, (LPARAM) &sid); - } - } - - HOTKEYDESC hkd = {0}; - hkd.cbSize = sizeof(hkd); - hkd.pszName = "Spell Checker/Toggle"; - hkd.pszSection = LPGEN("Spell Checker"); - hkd.pszDescription = LPGEN("Enable/disable spell checker"); - hkd.DefHotKey = HOTKEYCODE(HOTKEYF_SHIFT|HOTKEYF_ALT, 'S'); - hkd.lParam = HOTKEY_ACTION_TOGGLE; - Hotkey_Register( &hkd); - - loaded = TRUE; - - return 0; -} - - -int IconsChanged(WPARAM wParam, LPARAM lParam) -{ - if (ServiceExists(MS_MSG_MODIFYICON)) - { - StatusIconData sid = {0}; - sid.cbSize = sizeof(sid); - sid.szModule = MODULE_NAME; - sid.hIconDisabled = IcoLib_LoadIcon("spellchecker_disabled", TRUE); - sid.flags = MBF_HIDDEN; - - - for (int i = 0; i < languages.getCount(); i++) - { - sid.dwId = i; - - char tmp[128]; - mir_snprintf(tmp, MAX_REGS(tmp), "%s - " TCHAR_STR_PARAM, - Translate("Spell Checker"), languages[i]->full_name); - sid.szTooltip = tmp; - - if (opts.use_flags) - sid.hIcon = IcoLib_LoadIcon(languages[i], TRUE); - else - sid.hIcon = IcoLib_LoadIcon("spellchecker_enabled", TRUE); - - CallService(MS_MSG_MODIFYICON, 0, (LPARAM) &sid); - } - } - - return 0; -} - - -int PreShutdown(WPARAM wParam, LPARAM lParam) -{ - int i; - for(i = 0; i < MAX_REGS(hServices); i++) - DestroyServiceFunction(hServices[i]); - - for(i = 0; i < MAX_REGS(hHooks); i++) - UnhookEvent(hHooks[i]); - - DeInitOptions(); - - if (ServiceExists(MS_MSG_REMOVEICON)) - { - StatusIconData sid = {0}; - sid.cbSize = sizeof(sid); - sid.szModule = MODULE_NAME; - CallService(MS_MSG_REMOVEICON, 0, (LPARAM) &sid); - } - - mir_free(dictionariesFolder); - mir_free(customDictionariesFolder); - mir_free(flagsDllFolder); - - return 0; -} - - -void SetUnderline(Dialog *dlg, int pos_start, int pos_end) -{ - dlg->re->SetSel(pos_start, pos_end); - - CHARFORMAT2 cf; - cf.cbSize = sizeof(CHARFORMAT2); - cf.dwMask = CFM_UNDERLINE | CFM_UNDERLINETYPE; - cf.dwEffects = CFE_UNDERLINE; - cf.bUnderlineType = ((opts.underline_type + CFU_UNDERLINEDOUBLE) | 0x50); - dlg->re->SendMessage(EM_SETCHARFORMAT, (WPARAM) SCF_SELECTION, (LPARAM)&cf); - - dlg->markedSomeWord = TRUE; -} - - -BOOL IsMyUnderline(const CHARFORMAT2 &cf) -{ - return (cf.dwEffects & CFE_UNDERLINE) - && (cf.bUnderlineType & 0x0F) >= CFU_UNDERLINEDOUBLE - && (cf.bUnderlineType & 0x0F) <= CFU_UNDERLINETHICK - && (cf.bUnderlineType & ~0x0F) == 0x50; -} - - -void SetNoUnderline(RichEdit *re, int pos_start, int pos_end) -{ - if (opts.handle_underscore) - { - for(int i = pos_start; i <= pos_end; i++) - { - re->SetSel(i, min(i+1, pos_end)); - - CHARFORMAT2 cf; - cf.cbSize = sizeof(CHARFORMAT2); - re->SendMessage(EM_GETCHARFORMAT, (WPARAM) SCF_SELECTION, (LPARAM)&cf); - - BOOL mine = IsMyUnderline(cf); - if (mine) - { - cf.cbSize = sizeof(CHARFORMAT2); - cf.dwMask = CFM_UNDERLINE | CFM_UNDERLINETYPE; - cf.dwEffects = 0; - cf.bUnderlineType = CFU_UNDERLINE; - re->SendMessage(EM_SETCHARFORMAT, (WPARAM) SCF_SELECTION, (LPARAM)&cf); - } - } - } - else - { - re->SetSel(pos_start, pos_end); - - CHARFORMAT2 cf; - cf.cbSize = sizeof(CHARFORMAT2); - cf.dwMask = CFM_UNDERLINE | CFM_UNDERLINETYPE; - cf.dwEffects = 0; - cf.bUnderlineType = CFU_UNDERLINE; - re->SendMessage(EM_SETCHARFORMAT, (WPARAM) SCF_SELECTION, (LPARAM)&cf); - } -} - - -void SetNoUnderline(Dialog *dlg) -{ - dlg->re->Stop(); - SetNoUnderline(dlg->re, 0, dlg->re->GetTextLength()); - dlg->markedSomeWord = FALSE; - dlg->re->Start(); -} - - -inline BOOL IsNumber(TCHAR c) -{ - return c >= _T('0') && c <= _T('9'); -} - - -inline BOOL IsURL(TCHAR c) -{ - return (c >= _T('a') && c <= _T('z')) - || (c >= _T('A') && c <= _T('Z')) - || IsNumber(c) - || c == _T('.') || c == _T('/') - || c == _T('\\') || c == _T('?') - || c == _T('=') || c == _T('&') - || c == _T('%') || c == _T('-') - || c == _T('_') || c == _T(':') - || c == _T('@') || c == _T('#'); -} - - -int FindURLEnd(Dialog *dlg, TCHAR *text, int start_pos, int *checked_until = NULL) -{ - int num_slashes = 0; - int num_ats = 0; - int num_dots = 0; - - int i = start_pos; - - for (; IsURL(text[i]) || dlg->lang->isWordChar(text[i]); i++) - { - TCHAR c = text[i]; - - if (c == _T('\\') || c == _T('/')) - num_slashes++; - else if (c == _T('.')) - num_dots++; - else if (c == _T('@')) - num_ats++; - } - - if (checked_until != NULL) - *checked_until = i; - - if (num_slashes <= 0 && num_ats <= 0 && num_dots <= 0) - return -1; - - if (num_slashes == 0 && num_ats == 0 && num_dots < 2) - return -1; - - if (i - start_pos < 2) - return -1; - - return i; -} - - -int ReplaceWord(Dialog *dlg, CHARRANGE &sel, TCHAR *new_word) -{ - dlg->re->Stop(); - dlg->re->ResumeUndo(); - - int dif = dlg->re->Replace(sel.cpMin, sel.cpMax, new_word); - - dlg->re->SuspendUndo(); - dlg->re->Start(); - - return dif; -} - - -class TextParser -{ -public: - virtual ~TextParser() {} - - /// @return true when finished an word - virtual bool feed(int pos, TCHAR c) =0; - virtual int getFirstCharPos() =0; - virtual void reset() =0; - virtual void deal(const TCHAR *text, bool *mark, bool *replace, TCHAR **replacement) =0; -}; - - -class SpellParser : public TextParser -{ - Dictionary *dict; - int last_pos; - BOOL found_real_char; - -public: - SpellParser(Dictionary *dict) : dict(dict) - { - reset(); - } - - void reset() - { - last_pos = -1; - found_real_char = FALSE; - } - - bool feed(int pos, TCHAR c) - { - // Is inside a word? - if (dict->isWordChar(c) || IsNumber(c)) - { - if (last_pos == -1) - last_pos = pos; - - if (c != _T('-') && !IsNumber(c)) - found_real_char = TRUE; - - return false; - } - - if (!found_real_char) - last_pos = -1; - - return (last_pos != -1); - } - - int getFirstCharPos() - { - if (!found_real_char) - return -1; - else - return last_pos; - } - - void deal(const TCHAR *text, bool *mark, bool *replace, TCHAR **replacement) - { - // Is it correct? - if (dict->spell(text)) - return; - - // Has to auto-correct? - if (opts.auto_replace_dict) - { - *replacement = dict->autoSuggestOne(text); - if (*replacement != NULL) - { - *replace = true; - return; - } - } - - *mark = true; - } -}; - - -class AutoReplaceParser : public TextParser -{ - AutoReplaceMap *ar; - int last_pos; - -public: - AutoReplaceParser(AutoReplaceMap *ar) : ar(ar) - { - reset(); - } - - void reset() - { - last_pos = -1; - } - - bool feed(int pos, TCHAR c) - { - // Is inside a word? - if (ar->isWordChar(c)) - { - if (last_pos == -1) - last_pos = pos; - return false; - } - - return (last_pos != -1); - } - - int getFirstCharPos() - { - return last_pos; - } - - void deal(const TCHAR *text, bool *mark, bool *replace, TCHAR **replacement) - { - *replacement = ar->autoReplace(text); - if (*replacement != NULL) - *replace = true; - } -}; - -int CheckTextLine(Dialog *dlg, int line, TextParser *parser, - BOOL ignore_upper, BOOL ignore_with_numbers, BOOL test_urls, - const CHARRANGE &ignored, FoundWrongWordCallback callback, void *param) -{ - int errors = 0; - TCHAR text[1024]; - dlg->re->GetLine(line, text, MAX_REGS(text)); - int len = lstrlen(text); - int first_char = dlg->re->GetFirstCharOfLine(line); - - // Now lets get the words - int next_char_for_url = 0; - for (int pos = 0; pos < len; pos++) - { - int url_end = pos; - if (pos >= next_char_for_url) - { - url_end = FindURLEnd(dlg, text, pos, &next_char_for_url); - next_char_for_url++; - } - - if (url_end > pos) - { - BOOL ignore_url = FALSE; - - if (test_urls) - { - // All the url must be handled by the parser - parser->reset(); - - BOOL feed = FALSE; - for(int j = pos; !feed && j <= url_end; j++) - feed = parser->feed(j, text[j]); - - if (feed || parser->getFirstCharPos() != pos) - ignore_url = TRUE; - } - else - ignore_url = TRUE; - - pos = url_end; - - if (ignore_url) - { - parser->reset(); - continue; - } - } - else - { - TCHAR c = text[pos]; - - BOOL feed = parser->feed(pos, c); - - if (!feed) - { - if (pos >= len-1) - pos = len; // To check the last block - else - continue; - } - } - - int last_pos = parser->getFirstCharPos(); - parser->reset(); - - if (last_pos < 0) - continue; - - // We found a word - CHARRANGE sel = { first_char + last_pos, first_char + pos }; - - // Is in ignored range? - if (sel.cpMin <= ignored.cpMax && sel.cpMax >= ignored.cpMin) - continue; - - if (ignore_upper) - { - BOOL upper = TRUE; - for(int i = last_pos; i < pos && upper; i++) - upper = !IsCharLower(text[i]); - if (upper) - continue; - } - - if (ignore_with_numbers) - { - BOOL hasNumbers = FALSE; - for(int i = last_pos; i < pos && !hasNumbers; i++) - hasNumbers = IsNumber(text[i]); - if (hasNumbers) - continue; - } - - text[pos] = 0; - - bool mark = false; - bool replace = false; - TCHAR *replacement = NULL; - parser->deal(&text[last_pos], &mark, &replace, &replacement); - - if (replace) - { - // Replace in rich edit - int dif = dlg->re->Replace(sel.cpMin, sel.cpMax, replacement); - if (dif != 0) - { - // Read line again - dlg->re->GetLine(line, text, MAX_REGS(text)); - len = lstrlen(text); - - int old_first_char = first_char; - first_char = dlg->re->GetFirstCharOfLine(line); - - pos = max(-1, pos + dif + old_first_char - first_char); - } - - free(replacement); - } - else if (mark) - { - SetUnderline(dlg, sel.cpMin, sel.cpMax); - - if (callback != NULL) - callback(&text[last_pos], sel, param); - - errors++; - } - } - - return errors; -} - - -// Checks for errors in all text -int CheckText(Dialog *dlg, BOOL check_all, - FoundWrongWordCallback callback = NULL, void *param = NULL) -{ - int errors = 0; - - dlg->re->Stop(); - - if (dlg->re->GetTextLength() > 0) - { - int lines = dlg->re->GetLineCount(); - int line = 0; - CHARRANGE cur_sel = { -1, -1 }; - - if (!check_all) - { - // Check only the current line, one up and one down - int current_line = dlg->re->GetLineFromChar(dlg->re->GetSel().cpMin); - line = max(line, current_line - 1); - lines = min(lines, current_line + 2); - cur_sel = dlg->re->GetSel(); - } - - for (; line < lines; line++) - { - int first_char = dlg->re->GetFirstCharOfLine(line); - - SetNoUnderline(dlg->re, first_char, first_char + dlg->re->GetLineLength(line)); - - if (opts.auto_replace_user) - { - errors += CheckTextLine(dlg, line, &AutoReplaceParser(dlg->lang->autoReplace), - FALSE, FALSE, TRUE, - cur_sel, callback, param); - } - - errors += CheckTextLine(dlg, line, &SpellParser(dlg->lang), - opts.ignore_uppercase, opts.ignore_with_numbers, FALSE, - cur_sel, callback, param); - } - } - - // Fix last char - int len = dlg->re->GetTextLength(); - SetNoUnderline(dlg->re, len, len); - - dlg->re->Start(); - - return errors; -} - - -void ToLocaleID(TCHAR *szKLName, size_t size) -{ - TCHAR *stopped = NULL; - USHORT langID = (USHORT) _tcstol(szKLName, &stopped, 16); - - TCHAR ini[32]; - TCHAR end[32]; - GetLocaleInfo(MAKELCID(langID, 0), LOCALE_SISO639LANGNAME, ini, MAX_REGS(ini)); - GetLocaleInfo(MAKELCID(langID, 0), LOCALE_SISO3166CTRYNAME, end, MAX_REGS(end)); - - mir_sntprintf(szKLName, size, _T("%s_%s"), ini, end); -} - - -void LoadDictFromKbdl(Dialog *dlg) -{ - TCHAR szKLName[KL_NAMELENGTH + 1]; - - // Use default input language - HKL hkl = GetKeyboardLayout(0); - mir_sntprintf(szKLName, MAX_REGS(szKLName), _T("%x"), (int) LOWORD(hkl)); - ToLocaleID(szKLName, MAX_REGS(szKLName)); - - // Old code (use keyboard layout) -// GetKeyboardLayoutName(szKLName); -// ToLocaleID(szKLName, MAX_REGS(szKLName)); - - int d = GetClosestLanguage(szKLName); - if (d >= 0) - { - dlg->lang = languages[d]; - dlg->lang->load(); - - if (dlg->srmm) - ModifyIcon(dlg); - } -} - -int TimerCheck(Dialog *dlg, BOOL forceCheck = FALSE) -{ - KillTimer(dlg->hwnd, TIMER_ID); - - if (!dlg->enabled || dlg->lang == NULL) - return -1; - - if (!dlg->lang->isLoaded()) - { - SetTimer(dlg->hwnd, TIMER_ID, 500, NULL); - return -1; - } - - // Don't check if field is read-only - if (dlg->re->IsReadOnly()) - return -1; - - int len = dlg->re->GetTextLength(); - if (!forceCheck && len == dlg->old_text_len && !dlg->changed) - return -1; - - dlg->old_text_len = len; - dlg->changed = FALSE; - - return CheckText(dlg, TRUE); -} - - -LRESULT CALLBACK OwnerProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) -{ - DialogMapType::iterator dlgit = dialogs.find(hwnd); - if (dlgit == dialogs.end()) - return -1; - - Dialog *dlg = dlgit->second; - - if (msg == WM_COMMAND && (LOWORD(wParam) == IDOK || LOWORD(wParam) == 1624)) - { - if (opts.ask_when_sending_with_error) - { - int errors = TimerCheck(dlg, TRUE); - if (errors > 0) - { - TCHAR text[500]; - mir_sntprintf(text,MAX_REGS(text),TranslateT("There are %d spelling errors. Are you sure you want to send this message?"),errors); - if (MessageBox(hwnd,text,TranslateT("Spell Checker"), MB_ICONQUESTION | MB_YESNO) == IDNO) - { - return TRUE; - } - } - } - else if (opts.auto_replace_dict || opts.auto_replace_user) - { - // Fix all - TimerCheck(dlg); - } - - if (dlg->markedSomeWord) - // Remove underline - SetNoUnderline(dlg); - - // Schedule to re-parse - KillTimer(dlg->hwnd, TIMER_ID); - SetTimer(dlg->hwnd, TIMER_ID, 100, NULL); - - dlg->changed = TRUE; - } - - return CallWindowProc(dlg->owner_old_edit_proc, hwnd, msg, wParam, lParam); -} - - -void ToggleEnabled(Dialog *dlg) -{ - dlg->enabled = !dlg->enabled; - DBWriteContactSettingByte(dlg->hContact, MODULE_NAME, dlg->name, dlg->enabled); - - if (!dlg->enabled) - { - SetNoUnderline(dlg); - } - else - { - dlg->changed = TRUE; - SetTimer(dlg->hwnd, TIMER_ID, 100, NULL); - } - - if (dlg->srmm) - ModifyIcon(dlg); -} - - -LRESULT CALLBACK EditProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) -{ - DialogMapType::iterator dlgit = dialogs.find(hwnd); - if (dlgit == dialogs.end()) - return -1; - - Dialog *dlg = dlgit->second; - if (dlg == NULL) - return -1; - - // Hotkey support - { - MSG msgData = {0}; - msgData.hwnd = hwnd; - msgData.message = msg; - msgData.wParam = wParam; - msgData.lParam = lParam; - - int action = CallService(MS_HOTKEY_CHECK, (WPARAM) &msgData, (LPARAM) "Spell Checker"); - if (action == HOTKEY_ACTION_TOGGLE) - { - ToggleEnabled(dlg); - return 1; - } - } - - LRESULT ret = CallWindowProc(dlg->old_edit_proc, hwnd, msg, wParam, lParam); - - switch(msg) - { - case WM_KEYDOWN: - { - if (wParam != VK_DELETE) - break; - } - case WM_CHAR: - { - if (dlg->re->IsStopped()) - break; - - if (lParam & (1 << 28)) // ALT key - break; - - if (GetKeyState(VK_CONTROL) & 0x8000) // CTRL key - break; - - TCHAR c = (TCHAR) wParam; - BOOL deleting = (c == VK_BACK || c == VK_DELETE); - - // Need to do that to avoid changing the word while typing - KillTimer(hwnd, TIMER_ID); - SetTimer(hwnd, TIMER_ID, 1000, NULL); - - dlg->changed = TRUE; - - if (!deleting && (lParam & 0xFF) > 1) // Repeat rate - break; - - if (!dlg->enabled || dlg->lang == NULL || !dlg->lang->isLoaded()) - break; - - // Don't check if field is read-only - if (dlg->re->IsReadOnly()) - break; - - - if (!deleting && !dlg->lang->isWordChar(c)) - { - CheckText(dlg, FALSE); - } - else - { - // Remove underline of current word - - CHARFORMAT2 cf; - cf.cbSize = sizeof(CHARFORMAT2); - dlg->re->SendMessage(EM_GETCHARFORMAT, (WPARAM) SCF_SELECTION, (LPARAM)&cf); - - if (IsMyUnderline(cf)) - { - dlg->re->Stop(); - - CHARRANGE sel = dlg->re->GetSel(); - - TCHAR text[1024]; - int first_char; - GetWordCharRange(dlg, sel, text, MAX_REGS(text), first_char); - - SetNoUnderline(dlg->re, sel.cpMin, sel.cpMax); - - dlg->re->Start(); - } - } - - break; - } - case EM_REPLACESEL: - case WM_SETTEXT: - case EM_SETTEXTEX: - case EM_PASTESPECIAL: - case WM_PASTE: - { - if (dlg->re->IsStopped()) - break; - - KillTimer(hwnd, TIMER_ID); - SetTimer(hwnd, TIMER_ID, 100, NULL); - - dlg->changed = TRUE; - break; - } - - case WM_TIMER: - { - if (wParam != TIMER_ID) - break; - - TimerCheck(dlg); - break; - } - - case WMU_DICT_CHANGED: - { - KillTimer(hwnd, TIMER_ID); - SetTimer(hwnd, TIMER_ID, 100, NULL); - - dlg->changed = TRUE; - break; - } - - case WMU_KBDL_CHANGED: - { - if (opts.auto_locale) - { - KillTimer(hwnd, TIMER_ID); - SetTimer(hwnd, TIMER_ID, 100, NULL); - - dlg->changed = TRUE; - - LoadDictFromKbdl(dlg); - } - break; - } - - case WM_INPUTLANGCHANGE: - { - // Allow others to process this message and we get only the result - PostMessage(hwnd, WMU_KBDL_CHANGED, 0, 0); - break; - } - } - - return ret; -} - -int GetClosestLanguage(TCHAR *lang_name) -{ - int i; - - // Search the language by name - for (i = 0; i < languages.getCount(); i++) - { - if (lstrcmpi(languages[i]->language, lang_name) == 0) - { - return i; - } - } - - // Try searching by the prefix only - TCHAR lang[128]; - lstrcpyn(lang, lang_name, MAX_REGS(lang)); - - TCHAR *p = _tcschr(lang, _T('_')); - if (p != NULL) - *p = _T('\0'); - - // First check if there is a language that is only the prefix - for (i = 0; i < languages.getCount(); i++) - { - if (lstrcmpi(languages[i]->language, lang) == 0) - { - return i; - } - } - - // Now try any suffix - size_t len = lstrlen(lang); - for (i = 0; i < languages.getCount(); i++) - { - TCHAR *p = _tcschr(languages[i]->language, _T('_')); - if (p == NULL) - continue; - - int prefix_len = p - languages[i]->language; - if (prefix_len != len) - continue; - - if (_tcsnicmp(languages[i]->language, lang_name, len) == 0) - { - return i; - } - } - - return -1; -} - -void GetUserProtoLanguageSetting(Dialog *dlg, HANDLE hContact, char *group, char *setting, BOOL isProtocol = TRUE) -{ - DBVARIANT dbv = {0}; - dbv.type = DBVT_TCHAR; - - DBCONTACTGETSETTING cgs = {0}; - cgs.szModule = group; - cgs.szSetting = setting; - cgs.pValue = &dbv; - - INT_PTR rc; - - int caps = (isProtocol ? CallProtoService(group, PS_GETCAPS, PFLAGNUM_4, 0) : 0); - if (caps & PF4_INFOSETTINGSVC) - { - rc = CallProtoService(group, PS_GETINFOSETTING, (WPARAM) hContact, (LPARAM) &cgs); - } - else - { - rc = CallService(MS_DB_CONTACT_GETSETTING_STR_EX, (WPARAM)hContact, (LPARAM)&cgs); - if (rc == CALLSERVICE_NOTFOUND) - { - rc = CallService(MS_DB_CONTACT_GETSETTING_STR, (WPARAM)hContact, (LPARAM)&cgs); - } - } - - if (!rc && dbv.type == DBVT_TCHAR && dbv.ptszVal != NULL) - { - TCHAR *lang = dbv.ptszVal; - - for (int i = 0; i < languages.getCount(); i++) - { - Dictionary *dict = languages[i]; - if (lstrcmpi(dict->localized_name, lang) == 0 - || lstrcmpi(dict->english_name, lang) == 0 - || lstrcmpi(dict->language, lang) == 0) - { - lstrcpyn(dlg->lang_name, dict->language, MAX_REGS(dlg->lang_name)); - break; - } - } - } - - if (!rc) - DBFreeVariant(&dbv); -} - -void GetUserLanguageSetting(Dialog *dlg, char *setting) -{ - char *proto = (char *) CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) dlg->hContact, 0); - if (proto == NULL) - return; - - GetUserProtoLanguageSetting(dlg, dlg->hContact, proto, setting); - if (dlg->lang_name[0] != _T('\0')) - return; - - GetUserProtoLanguageSetting(dlg, dlg->hContact, "UserInfo", setting, FALSE); - if (dlg->lang_name[0] != _T('\0')) - return; - - // If not found and is inside meta, try to get from the meta - INT_PTR mc = CallService(MS_MC_GETPROTOCOLNAME, 0, 0); - if (mc != CALLSERVICE_NOTFOUND) - { - char* metacontacts_proto = (char *) mc; - if (metacontacts_proto != NULL) - { - mc = CallService(MS_MC_GETMETACONTACT, (WPARAM) dlg->hContact, 0); - if (mc != CALLSERVICE_NOTFOUND) - { - HANDLE hMetaContact = (HANDLE) mc; - if (hMetaContact != NULL) - { - GetUserProtoLanguageSetting(dlg, hMetaContact, metacontacts_proto, setting); - if (dlg->lang_name[0] != _T('\0')) - return; - - GetUserProtoLanguageSetting(dlg, hMetaContact, "UserInfo", setting, FALSE); - } - } - } - } -} - -void GetContactLanguage(Dialog *dlg) -{ - DBVARIANT dbv = {0}; - - dlg->lang_name[0] = _T('\0'); - - if (dlg->hContact == NULL) - { - if (!DBGetContactSettingTString(NULL, MODULE_NAME, dlg->name, &dbv)) - { - lstrcpyn(dlg->lang_name, dbv.ptszVal, MAX_REGS(dlg->lang_name)); - DBFreeVariant(&dbv); - } - } - else - { - if (!DBGetContactSettingTString(dlg->hContact, MODULE_NAME, "TalkLanguage", &dbv)) - { - lstrcpyn(dlg->lang_name, dbv.ptszVal, MAX_REGS(dlg->lang_name)); - DBFreeVariant(&dbv); - } - - if (dlg->lang_name[0] == _T('\0') && !DBGetContactSettingTString(dlg->hContact, "eSpeak", "TalkLanguage", &dbv)) - { - lstrcpyn(dlg->lang_name, dbv.ptszVal, MAX_REGS(dlg->lang_name)); - DBFreeVariant(&dbv); - } - - // Try from metacontact - if (dlg->lang_name[0] == _T('\0')) - { - INT_PTR mc = CallService(MS_MC_GETMETACONTACT, (WPARAM) dlg->hContact, 0); - if (mc != CALLSERVICE_NOTFOUND) - { - HANDLE hMetaContact = (HANDLE) mc; - if (hMetaContact != NULL) - { - if (!DBGetContactSettingTString(hMetaContact, MODULE_NAME, "TalkLanguage", &dbv)) - { - lstrcpyn(dlg->lang_name, dbv.ptszVal, MAX_REGS(dlg->lang_name)); - DBFreeVariant(&dbv); - } - - if (dlg->lang_name[0] == _T('\0') && !DBGetContactSettingTString(hMetaContact, "eSpeak", "TalkLanguage", &dbv)) - { - lstrcpyn(dlg->lang_name, dbv.ptszVal, MAX_REGS(dlg->lang_name)); - DBFreeVariant(&dbv); - } - } - } - } - - // Try to get from Language info - if (dlg->lang_name[0] == _T('\0')) - GetUserLanguageSetting(dlg, "Language"); - if (dlg->lang_name[0] == _T('\0')) - GetUserLanguageSetting(dlg, "Language1"); - if (dlg->lang_name[0] == _T('\0')) - GetUserLanguageSetting(dlg, "Language2"); - if (dlg->lang_name[0] == _T('\0')) - GetUserLanguageSetting(dlg, "Language3"); - - // Use default lang - if (dlg->lang_name[0] == _T('\0')) - lstrcpyn(dlg->lang_name, opts.default_language, MAX_REGS(dlg->lang_name)); - } - - int i = GetClosestLanguage(dlg->lang_name); - if (i < 0) - { - // Lost a dict? - lstrcpyn(dlg->lang_name, opts.default_language, MAX_REGS(dlg->lang_name)); - i = GetClosestLanguage(dlg->lang_name); - } - - if (i >= 0) - { - dlg->lang = languages[i]; - dlg->lang->load(); - } - else - { - dlg->lang = NULL; - } -} - -void ModifyIcon(Dialog *dlg) -{ - if (ServiceExists(MS_MSG_MODIFYICON)) - { - StatusIconData sid = {0}; - sid.cbSize = sizeof(sid); - sid.szModule = MODULE_NAME; - - for (int i = 0; i < languages.getCount(); i++) - { - sid.dwId = i; - - if (languages[i] == dlg->lang) - sid.flags = (dlg->enabled ? 0 : MBF_DISABLED); - else - sid.flags = MBF_HIDDEN; - - CallService(MS_MSG_MODIFYICON, (WPARAM) dlg->hContact, (LPARAM) &sid); - } - } -} - -INT_PTR AddContactTextBoxService(WPARAM wParam, LPARAM lParam) -{ - SPELLCHECKER_ITEM *sci = (SPELLCHECKER_ITEM *) wParam; - if (sci == NULL || sci->cbSize != sizeof(SPELLCHECKER_ITEM)) - return -1; - - return AddContactTextBox(sci->hContact, sci->hwnd, sci->window_name, FALSE, NULL); -} - - -void NotifyWrongSRMM() -{ - static BOOL notified = FALSE; - - if (notified) - return; - - MessageBox(NULL, - TranslateT("Your message window does not support SpellChecker Plugin.\nIf you use SRMM, tabSRMM or Scriver, please update them to the latest version,\notherwise ask the author of your message window plugin to add support for Spell Checker."), - TranslateT("Spell Checker"), MB_ICONERROR | MB_OK); - - notified = TRUE; -} - - -int AddContactTextBox(HANDLE hContact, HWND hwnd, char *name, BOOL srmm, HWND hwndOwner) -{ - if (languages.getCount() <= 0) - return 0; - - if (dialogs.find(hwnd) == dialogs.end()) - { - // Fill dialog data - Dialog *dlg = (Dialog *) malloc(sizeof(Dialog)); - ZeroMemory(dlg, sizeof(Dialog)); - - dlg->re = new RichEdit(hwnd); - if (!dlg->re->IsValid()) - { - delete dlg->re; - free(dlg); - - if (srmm) - NotifyWrongSRMM(); - - return 0; - } - - dlg->hContact = hContact; - dlg->hwnd = hwnd; - strncpy(dlg->name, name, sizeof(dlg->name)); - dlg->enabled = DBGetContactSettingByte(dlg->hContact, MODULE_NAME, dlg->name, 1); - dlg->srmm = srmm; - - GetContactLanguage(dlg); - - if (opts.auto_locale) - LoadDictFromKbdl(dlg); - - dlg->old_edit_proc = (WNDPROC) SetWindowLongPtr(dlg->hwnd, GWLP_WNDPROC, (LONG_PTR) EditProc); - dialogs[hwnd] = dlg; - - if (dlg->srmm && hwndOwner != NULL) - { - dlg->hwnd_owner = hwndOwner; - dlg->owner_old_edit_proc = (WNDPROC) SetWindowLongPtr(dlg->hwnd_owner, GWLP_WNDPROC, (LONG_PTR) OwnerProc); - dialogs[dlg->hwnd_owner] = dlg; - - ModifyIcon(dlg); - } - - if (dlg->lang != NULL) - dlg->lang->load(); - - SetTimer(hwnd, TIMER_ID, 1000, NULL); - } - - return 0; -} - -#define DESTROY_MENY(_m_) if (_m_ != NULL) { DestroyMenu(_m_); _m_ = NULL; } - -void FreePopupData(Dialog *dlg) -{ - DESTROY_MENY(dlg->hLanguageSubMenu) - DESTROY_MENY(dlg->hWrongWordsSubMenu) - - if (dlg->old_menu_proc != NULL) - SetWindowLongPtr(dlg->hwnd_menu_owner, GWLP_WNDPROC, (LONG_PTR) dlg->old_menu_proc); - dlg->old_menu_proc = NULL; - - if (dlg->hwnd_menu_owner != NULL) - menus.erase(dlg->hwnd_menu_owner); - dlg->hwnd_menu_owner = NULL; - - if (dlg->wrong_words != NULL) - { - for (unsigned i = 0; i < dlg->wrong_words->size(); i++) - { - FREE((*dlg->wrong_words)[i].word) - - DESTROY_MENY((*dlg->wrong_words)[i].hMeSubMenu) - DESTROY_MENY((*dlg->wrong_words)[i].hCorrectSubMenu) - DESTROY_MENY((*dlg->wrong_words)[i].hReplaceSubMenu) - - FreeSuggestions((*dlg->wrong_words)[i].suggestions); - } - - delete dlg->wrong_words; - dlg->wrong_words = NULL; - } -} - - -INT_PTR RemoveContactTextBoxService(WPARAM wParam, LPARAM lParam) -{ - HWND hwnd = (HWND) wParam; - if (hwnd == NULL) - return -1; - - return RemoveContactTextBox(hwnd); -} - - -int RemoveContactTextBox(HWND hwnd) -{ - DialogMapType::iterator dlgit = dialogs.find(hwnd); - if (dlgit != dialogs.end()) - { - Dialog *dlg = dlgit->second; - - KillTimer(hwnd, TIMER_ID); - - if (dlg->old_edit_proc != NULL) - SetWindowLongPtr(hwnd, GWLP_WNDPROC, (LONG_PTR) dlg->old_edit_proc); - dialogs.erase(hwnd); - - if (dlg->hwnd_owner != NULL) - { - if (dlg->owner_old_edit_proc != NULL) - SetWindowLongPtr(dlg->hwnd_owner, GWLP_WNDPROC, (LONG_PTR) dlg->owner_old_edit_proc); - dialogs.erase(dlg->hwnd_owner); - } - - delete dlg->re; - FreePopupData(dlg); - free(dlg); - } - - return 0; -} - - -// TODO Make this better -BOOL GetWordCharRange(Dialog *dlg, CHARRANGE &sel, TCHAR *text, size_t text_len, int &first_char) -{ - // Get line - int line = dlg->re->GetLineFromChar(sel.cpMin); - - // Get text - dlg->re->GetLine(line, text, text_len); - first_char = dlg->re->GetFirstCharOfLine(line); - - // Find the word - sel.cpMin--; - while (sel.cpMin >= first_char && (dlg->lang->isWordChar(text[sel.cpMin - first_char]) - || IsNumber(text[sel.cpMin - first_char]))) - sel.cpMin--; - sel.cpMin++; - - while (text[sel.cpMax - first_char] != _T('\0') && (dlg->lang->isWordChar(text[sel.cpMax - first_char]) - || IsNumber(text[sel.cpMax - first_char]))) - sel.cpMax++; - - // Has a word? - if (sel.cpMin >= sel.cpMax) - return FALSE; - - // See if it has only '-'s - BOOL has_valid_char = FALSE; - for (int i = sel.cpMin; i < sel.cpMax && !has_valid_char; i++) - has_valid_char = ( text[i - first_char] != _T('-')); - - return has_valid_char; -} - -TCHAR *GetWordUnderPoint(Dialog *dlg, POINT pt, CHARRANGE &sel) -{ - // Get text - if (dlg->re->GetTextLength() <= 0) - return NULL; - - // Get pos - sel.cpMin = sel.cpMax = dlg->re->GetCharFromPos(pt); - - // Get text - TCHAR text[1024]; - int first_char; - - if (!GetWordCharRange(dlg, sel, text, MAX_REGS(text), first_char)) - return NULL; - - // copy the word - text[sel.cpMax - first_char] = _T('\0'); - return _tcsdup(&text[sel.cpMin - first_char]); -} - - -void AppendSubmenu(HMENU hMenu, HMENU hSubMenu, TCHAR *name) -{ - MENUITEMINFO mii = {0}; - mii.cbSize = sizeof(MENUITEMINFO); - mii.fMask = MIIM_SUBMENU | MIIM_TYPE; - mii.fType = MFT_STRING; - mii.hSubMenu = hSubMenu; - mii.dwTypeData = name; - mii.cch = lstrlen(name); - int ret = InsertMenuItem(hMenu, 0, TRUE, &mii); - -} - -void AppendMenuItem(HMENU hMenu, int id, TCHAR *name, HICON hIcon, BOOL checked) -{ - ICONINFO iconInfo; - GetIconInfo(hIcon, & iconInfo); - - MENUITEMINFO mii = {0}; - mii.cbSize = sizeof(MENUITEMINFO); - mii.fMask = MIIM_CHECKMARKS | MIIM_TYPE | MIIM_STATE; - mii.fType = MFT_STRING; - mii.fState = (checked ? MFS_CHECKED : 0); - mii.wID = id; - mii.hbmpChecked = iconInfo.hbmColor; - mii.hbmpUnchecked = iconInfo.hbmColor; - mii.dwTypeData = name; - mii.cch = lstrlen(name); - int ret = InsertMenuItem(hMenu, 0, TRUE, &mii); -} - - - - -#define LANGUAGE_MENU_ID_BASE 10 -#define WORD_MENU_ID_BASE 100 -#define AUTOREPLACE_MENU_ID_BASE 50 - -void AddMenuForWord(Dialog *dlg, TCHAR *word, CHARRANGE &pos, HMENU hMenu, BOOL in_submenu, UINT base) -{ - if (dlg->wrong_words == NULL) - dlg->wrong_words = new vector(1); - else - dlg->wrong_words->resize(dlg->wrong_words->size() + 1); - - WrongWordPopupMenuData &data = (*dlg->wrong_words)[dlg->wrong_words->size() - 1]; - ZeroMemory(&data, sizeof(WrongWordPopupMenuData)); - - // Get suggestions - data.word = word; - data.pos = pos; - data.suggestions = dlg->lang->suggest(word); - - Suggestions &suggestions = data.suggestions; - - if (in_submenu) - { - data.hMeSubMenu = CreatePopupMenu(); - AppendSubmenu(hMenu, data.hMeSubMenu, word); - hMenu = data.hMeSubMenu; - } - - data.hReplaceSubMenu = CreatePopupMenu(); - - InsertMenu(data.hReplaceSubMenu, 0, MF_BYPOSITION, base + AUTOREPLACE_MENU_ID_BASE + suggestions.count, TranslateT("Other...")); - if (suggestions.count > 0) - { - InsertMenu(data.hReplaceSubMenu, 0, MF_BYPOSITION | MF_SEPARATOR, 0, 0); - for (int i = suggestions.count - 1; i >= 0; i--) - InsertMenu(data.hReplaceSubMenu, 0, MF_BYPOSITION, base + AUTOREPLACE_MENU_ID_BASE + i, suggestions.words[i]); - } - - AppendSubmenu(hMenu, data.hReplaceSubMenu, TranslateT("Always replace with")); - - InsertMenu(hMenu, 0, MF_BYPOSITION, base + suggestions.count + 1, TranslateT("Ignore all")); - InsertMenu(hMenu, 0, MF_BYPOSITION, base + suggestions.count, TranslateT("Add to dictionary")); - - if (suggestions.count > 0) - { - HMENU hSubMenu; - if (opts.cascade_corrections) - { - hSubMenu = data.hCorrectSubMenu = CreatePopupMenu(); - AppendSubmenu(hMenu, hSubMenu, TranslateT("Corrections")); - } - else - { - InsertMenu(hMenu, 0, MF_BYPOSITION | MF_SEPARATOR, 0, 0); - hSubMenu = hMenu; - } - - for (int i = suggestions.count - 1; i >= 0; i--) - InsertMenu(hSubMenu, 0, MF_BYPOSITION, base + i, suggestions.words[i]); - } - - if (!in_submenu && opts.show_wrong_word) - { - InsertMenu(hMenu, 0, MF_BYPOSITION | MF_SEPARATOR, 0, 0); - - TCHAR text[128]; - mir_sntprintf(text, MAX_REGS(text), TranslateT("Wrong word: %s"), word); - InsertMenu(hMenu, 0, MF_BYPOSITION, 0, text); - } -} - - -struct FoundWrongWordParam { - Dialog *dlg; - int count; -}; - -void FoundWrongWord(TCHAR *word, CHARRANGE pos, void *param) -{ - FoundWrongWordParam *p = (FoundWrongWordParam*) param; - - p->count ++; - - AddMenuForWord(p->dlg, _tcsdup(word), pos, p->dlg->hWrongWordsSubMenu, TRUE, WORD_MENU_ID_BASE * p->count); -} - -void AddItemsToMenu(Dialog *dlg, HMENU hMenu, POINT pt, HWND hwndOwner) -{ - FreePopupData(dlg); - if (opts.use_flags) - { - dlg->hwnd_menu_owner = hwndOwner; - menus[hwndOwner] = dlg; - } - - BOOL wrong_word = FALSE; - - // Make menu - if (GetMenuItemCount(hMenu) > 0) - InsertMenu(hMenu, 0, MF_BYPOSITION | MF_SEPARATOR, 0, 0); - - if (languages.getCount() > 0 && dlg->enabled) - { - dlg->hLanguageSubMenu = CreatePopupMenu(); - - if (dlg->hwnd_menu_owner != NULL) - dlg->old_menu_proc = (WNDPROC) SetWindowLongPtr(dlg->hwnd_menu_owner, GWLP_WNDPROC, (LONG_PTR) MenuWndProc); - - // First add languages - for (int i = 0; i < languages.getCount(); i++) - { - AppendMenu(dlg->hLanguageSubMenu, MF_STRING | (languages[i] == dlg->lang ? MF_CHECKED : 0), - LANGUAGE_MENU_ID_BASE + i, languages[i]->full_name); - } - - AppendSubmenu(hMenu, dlg->hLanguageSubMenu, TranslateT("Language")); - } - - InsertMenu(hMenu, 0, MF_BYPOSITION, 1, TranslateT("Enable spell checking")); - CheckMenuItem(hMenu, 1, MF_BYCOMMAND | (dlg->enabled ? MF_CHECKED : MF_UNCHECKED)); - - // Get text - if (dlg->lang != NULL && dlg->enabled) - { - if (opts.show_all_corrections) - { - dlg->hWrongWordsSubMenu = CreatePopupMenu(); - - FoundWrongWordParam p = { dlg, 0 }; - CheckText(dlg, TRUE, FoundWrongWord, &p); - - if (p.count > 0) - AppendSubmenu(hMenu, dlg->hWrongWordsSubMenu, TranslateT("Wrong words")); - } - else - { - CHARRANGE sel; - TCHAR *word = GetWordUnderPoint(dlg, pt, sel); - if (word != NULL && !dlg->lang->spell(word)) - { - InsertMenu(hMenu, 0, MF_BYPOSITION | MF_SEPARATOR, 0, 0); - - AddMenuForWord(dlg, word, sel, hMenu, FALSE, WORD_MENU_ID_BASE); - } - } - } -} - - -static void AddWordToDictCallback(BOOL canceled, Dictionary *dict, - const TCHAR *find, const TCHAR *replace, BOOL useVariables, - const TCHAR *original_find, void *param) -{ - if (canceled) - return; - - dict->autoReplace->add(find, replace, useVariables); - - HWND hwndParent = (HWND) param; - if (hwndParent != NULL) - PostMessage(hwndParent, WMU_DICT_CHANGED, 0, 0); -} - - -BOOL HandleMenuSelection(Dialog *dlg, POINT pt, unsigned selection) -{ - BOOL ret = FALSE; - - if (selection == 1) - { - ToggleEnabled(dlg); - - ret = TRUE; - } - else if (selection >= LANGUAGE_MENU_ID_BASE && selection < LANGUAGE_MENU_ID_BASE + (unsigned) languages.getCount()) - { - SetNoUnderline(dlg); - - if (dlg->hContact == NULL) - DBWriteContactSettingTString(NULL, MODULE_NAME, dlg->name, - languages[selection - LANGUAGE_MENU_ID_BASE]->language); - else - DBWriteContactSettingTString(dlg->hContact, MODULE_NAME, "TalkLanguage", - languages[selection - LANGUAGE_MENU_ID_BASE]->language); - - GetContactLanguage(dlg); - - if (dlg->srmm) - ModifyIcon(dlg); - - ret = TRUE; - } - else if (selection > 0 && dlg->wrong_words != NULL - && selection >= WORD_MENU_ID_BASE - && selection < (dlg->wrong_words->size() + 1) * WORD_MENU_ID_BASE) - { - int pos = selection / WORD_MENU_ID_BASE; - selection -= pos * WORD_MENU_ID_BASE; - pos--; // 0 based - WrongWordPopupMenuData &data = (*dlg->wrong_words)[pos]; - - if (selection < data.suggestions.count) - { - // TODO Assert that text hasn't changed - ReplaceWord(dlg, data.pos, data.suggestions.words[selection]); - - ret = TRUE; - } - else if (selection == data.suggestions.count) - { - dlg->lang->addWord(data.word); - - ret = TRUE; - } - else if (selection == data.suggestions.count + 1) - { - dlg->lang->ignoreWord(data.word); - - ret = TRUE; - } - else if (selection >= AUTOREPLACE_MENU_ID_BASE - && selection < AUTOREPLACE_MENU_ID_BASE + data.suggestions.count + 1) - { - selection -= AUTOREPLACE_MENU_ID_BASE; - - if (selection == data.suggestions.count) - { - ShowAutoReplaceDialog(dlg->hwnd_owner != NULL ? dlg->hwnd_owner : dlg->hwnd, FALSE, - dlg->lang, data.word, NULL, FALSE, - TRUE, &AddWordToDictCallback, dlg->hwnd); - } - else - { - // TODO Assert that text hasn't changed - ReplaceWord(dlg, data.pos, data.suggestions.words[selection]); - dlg->lang->autoReplace->add(data.word, data.suggestions.words[selection]); - ret = TRUE; - } - } - } - - if (ret) - { - KillTimer(dlg->hwnd, TIMER_ID); - SetTimer(dlg->hwnd, TIMER_ID, 100, NULL); - - dlg->changed = TRUE; - } - - FreePopupData(dlg); - - return ret; -} - - -int MsgWindowPopup(WPARAM wParam, LPARAM lParam) -{ - MessageWindowPopupData *mwpd = (MessageWindowPopupData *) lParam; - if (mwpd == NULL || mwpd->cbSize < sizeof(MessageWindowPopupData) - || mwpd->uFlags != MSG_WINDOWPOPUP_INPUT) - return 0; - - DialogMapType::iterator dlgit = dialogs.find(mwpd->hwnd); - if (dlgit == dialogs.end()) - return -1; - - Dialog *dlg = dlgit->second; - - POINT pt = mwpd->pt; - ScreenToClient(dlg->hwnd, &pt); - - if (mwpd->uType == MSG_WINDOWPOPUP_SHOWING) - { - AddItemsToMenu(dlg, mwpd->hMenu, pt, dlg->hwnd_owner); - } - else if (mwpd->uType == MSG_WINDOWPOPUP_SELECTED) - { - HandleMenuSelection(dlg, pt, mwpd->selection); - } - return 0; -} - - -INT_PTR ShowPopupMenuService(WPARAM wParam, LPARAM lParam) -{ - SPELLCHECKER_POPUPMENU *scp = (SPELLCHECKER_POPUPMENU *) wParam; - if (scp == NULL || scp->cbSize != sizeof(SPELLCHECKER_POPUPMENU)) - return -1; - - return ShowPopupMenu(scp->hwnd, scp->hMenu, scp->pt, scp->hwndOwner == NULL ? scp->hwnd : scp->hwndOwner); -} - - -int ShowPopupMenu(HWND hwnd, HMENU hMenu, POINT pt, HWND hwndOwner) -{ - DialogMapType::iterator dlgit = dialogs.find(hwnd); - if (dlgit == dialogs.end()) - return -1; - - Dialog *dlg = dlgit->second; - - if (pt.x == 0xFFFF && pt.y == 0xFFFF) - { - CHARRANGE sel; - SendMessage(hwnd, EM_EXGETSEL, 0, (LPARAM) &sel); - - // Get current cursor pos - SendMessage(hwnd, EM_POSFROMCHAR, (WPARAM)&pt, (LPARAM) sel.cpMax); - } - else - { - ScreenToClient(hwnd, &pt); - } - - BOOL create_menu = (hMenu == NULL); - if (create_menu) - hMenu = CreatePopupMenu(); - - // Make menu - AddItemsToMenu(dlg, hMenu, pt, hwndOwner); - - // Show menu - POINT client = pt; - ClientToScreen(hwnd, &pt); - int selection = TrackPopupMenu(hMenu, TPM_RETURNCMD, pt.x, pt.y, 0, hwndOwner, NULL); - - // Do action - if (HandleMenuSelection(dlg, client, selection)) - selection = 0; - - if (create_menu) - DestroyMenu(hMenu); - - return selection; -} - - -int MsgWindowEvent(WPARAM wParam, LPARAM lParam) -{ - MessageWindowEventData *event = (MessageWindowEventData *)lParam; - if (event == NULL) - return 0; - - if (event->cbSize < sizeof(MessageWindowEventData)) - return 0; - - if (event->uType == MSG_WINDOW_EVT_OPEN) - { - AddContactTextBox(event->hContact, event->hwndInput, "DefaultSRMM", TRUE, event->hwndWindow); - } - else if (event->uType == MSG_WINDOW_EVT_CLOSING) - { - RemoveContactTextBox(event->hwndInput); - } - - return 0; -} - - -int IconPressed(WPARAM wParam, LPARAM lParam) -{ - StatusIconClickData *sicd = (StatusIconClickData *) lParam; - if (sicd == NULL || strcmp(sicd->szModule, MODULE_NAME) != 0) - return 0; - - HANDLE hContact = (HANDLE) wParam; - if (hContact == NULL) - return 0; - - // Find the dialog - HWND hwnd = NULL; - Dialog *dlg; - for(DialogMapType::iterator it = dialogs.begin(); it != dialogs.end(); it++) - { - dlg = it->second; - if (dlg->srmm && dlg->hContact == hContact) - { - hwnd = it->first; - break; - } - } - - if (hwnd == NULL) - { - NotifyWrongSRMM(); - return 0; - } - - if ((sicd->flags & MBCF_RIGHTBUTTON) == 0) - { - FreePopupData(dlg); - - // Show the menu - HMENU hMenu = CreatePopupMenu(); - - if (languages.getCount() > 0) - { - if (opts.use_flags) - { - menus[dlg->hwnd] = dlg; - dlg->hwnd_menu_owner = dlg->hwnd; - dlg->old_menu_proc = (WNDPROC) SetWindowLongPtr(dlg->hwnd_menu_owner, GWLP_WNDPROC, (LONG_PTR) MenuWndProc); - } - - // First add languages - for (int i = 0; i < languages.getCount(); i++) - { - AppendMenu(hMenu, MF_STRING | (languages[i] == dlg->lang ? MF_CHECKED : 0), - LANGUAGE_MENU_ID_BASE + i, languages[i]->full_name); - } - - InsertMenu(hMenu, 0, MF_BYPOSITION | MF_SEPARATOR, 0, 0); - } - - InsertMenu(hMenu, 0, MF_BYPOSITION, 1, TranslateT("Enable spell checking")); - CheckMenuItem(hMenu, 1, MF_BYCOMMAND | (dlg->enabled ? MF_CHECKED : MF_UNCHECKED)); - - // Show menu - int selection = TrackPopupMenu(hMenu, TPM_RETURNCMD, sicd->clickLocation.x, sicd->clickLocation.y, 0, - dlg->hwnd, NULL); - - HandleMenuSelection(dlg, sicd->clickLocation, selection); - - DestroyMenu(hMenu); - } - else - { - // Enable / disable - HandleMenuSelection(dlg, sicd->clickLocation, 1); - } - - return 0; -} - - -LRESULT CALLBACK MenuWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) -{ - DialogMapType::iterator dlgit = menus.find(hwnd); - if (dlgit == menus.end()) - return -1; - - Dialog *dlg = dlgit->second; - - switch (msg) - { - case WM_INITMENUPOPUP: - { - HMENU hMenu = (HMENU) wParam; - - int count = GetMenuItemCount(hMenu); - for(int i = 0; i < count; i++) - { - unsigned id = GetMenuItemID(hMenu, i); - if (id < LANGUAGE_MENU_ID_BASE || id >= LANGUAGE_MENU_ID_BASE + (unsigned) languages.getCount()) - continue; - - MENUITEMINFO mii = {0}; - mii.cbSize = sizeof(MENUITEMINFO); - mii.fMask = MIIM_STATE; - GetMenuItemInfo(hMenu, id, FALSE, &mii); - - // Make ownerdraw - ModifyMenu(hMenu, id, mii.fState | MF_BYCOMMAND | MF_OWNERDRAW, id, NULL); - } - - break; - } - case WM_DRAWITEM: - { - LPDRAWITEMSTRUCT lpdis = (LPDRAWITEMSTRUCT)lParam; - if (lpdis->CtlType != ODT_MENU || lpdis->itemID < LANGUAGE_MENU_ID_BASE || lpdis->itemID >= LANGUAGE_MENU_ID_BASE + (unsigned) languages.getCount()) - break; - - int pos = lpdis->itemID - LANGUAGE_MENU_ID_BASE; - - Dictionary *dict = languages[pos]; - - COLORREF clrfore = SetTextColor(lpdis->hDC, - GetSysColor(lpdis->itemState & ODS_SELECTED ? COLOR_HIGHLIGHTTEXT : COLOR_MENUTEXT)); - COLORREF clrback = SetBkColor(lpdis->hDC, - GetSysColor(lpdis->itemState & ODS_SELECTED ? COLOR_HIGHLIGHT : COLOR_MENU)); - - FillRect(lpdis->hDC, &lpdis->rcItem, GetSysColorBrush(lpdis->itemState & ODS_SELECTED ? COLOR_HIGHLIGHT : COLOR_MENU)); - - RECT rc = lpdis->rcItem; - rc.left += 2; - - // Checked? - rc.right = rc.left + bmpChecked.bmWidth; - - if (lpdis->itemState & ODS_CHECKED) - { - rc.top = (lpdis->rcItem.bottom + lpdis->rcItem.top - bmpChecked.bmHeight) / 2; - rc.bottom = rc.top + bmpChecked.bmHeight; - - HDC hdcTemp = CreateCompatibleDC(lpdis->hDC); - HBITMAP oldBmp = (HBITMAP) SelectObject(hdcTemp, hCheckedBmp); - - BitBlt(lpdis->hDC, rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top, hdcTemp, 0, 0, SRCCOPY); - - SelectObject(hdcTemp, oldBmp); - DeleteDC(hdcTemp); - } - - rc.left += bmpChecked.bmWidth + 2; - - // Draw icon - HICON hFlag = IcoLib_LoadIcon(dict); - - rc.top = (lpdis->rcItem.bottom + lpdis->rcItem.top - ICON_SIZE) / 2; - DrawIconEx(lpdis->hDC, rc.left, rc.top, hFlag, 16, 16, 0, NULL, DI_NORMAL); - - Skin_ReleaseIcon(hFlag); - - rc.left += ICON_SIZE + 4; - - // Draw text - RECT rc_text = { 0, 0, 0xFFFF, 0xFFFF }; - DrawText(lpdis->hDC, dict->full_name, lstrlen(dict->full_name), &rc_text, DT_END_ELLIPSIS | DT_NOPREFIX | DT_SINGLELINE | DT_LEFT | DT_TOP | DT_CALCRECT); - - rc.right = lpdis->rcItem.right - 2; - rc.top = (lpdis->rcItem.bottom + lpdis->rcItem.top - (rc_text.bottom - rc_text.top)) / 2; - rc.bottom = rc.top + rc_text.bottom - rc_text.top; - DrawText(lpdis->hDC, dict->full_name, lstrlen(dict->full_name), &rc, DT_END_ELLIPSIS | DT_NOPREFIX | DT_LEFT | DT_TOP | DT_SINGLELINE); - - // Restore old colors - SetTextColor(lpdis->hDC, clrfore); - SetBkColor(lpdis->hDC, clrback); - - return TRUE; - } - - case WM_MEASUREITEM: - { - LPMEASUREITEMSTRUCT lpmis = (LPMEASUREITEMSTRUCT)lParam; - if (lpmis->CtlType != ODT_MENU || lpmis->itemID < LANGUAGE_MENU_ID_BASE || lpmis->itemID >= LANGUAGE_MENU_ID_BASE + (unsigned) languages.getCount()) - break; - - int pos = lpmis->itemID - LANGUAGE_MENU_ID_BASE; - - Dictionary *dict = languages[pos]; - - HDC hdc = GetDC(hwnd); - - NONCLIENTMETRICS info; - ZeroMemory(&info, sizeof(info)); - info.cbSize = sizeof(info); - SystemParametersInfo(SPI_GETNONCLIENTMETRICS, sizeof(info), &info, 0); - HFONT hFont = CreateFontIndirect(&info.lfMenuFont); - HFONT hFontOld = (HFONT) SelectObject(hdc, hFont); - - RECT rc = { 0, 0, 0xFFFF, 0xFFFF }; - - DrawText(hdc, dict->full_name, lstrlen(dict->full_name), &rc, DT_NOPREFIX | DT_SINGLELINE | DT_LEFT | DT_TOP | DT_CALCRECT); - - lpmis->itemHeight = max(ICON_SIZE, max(bmpChecked.bmHeight, rc.bottom)); - lpmis->itemWidth = 2 + bmpChecked.bmWidth + 2 + ICON_SIZE + 4 + rc.right + 2; - - SelectObject(hdc, hFontOld); - DeleteObject(hFont); - ReleaseDC(hwnd, hdc); - - return TRUE; - } - } - - return CallWindowProc(dlg->old_menu_proc, hwnd, msg, wParam, lParam); -} - -TCHAR *lstrtrim(TCHAR *str) -{ - int len = lstrlen(str); - - int i; - for(i = len - 1; i >= 0 && (str[i] == ' ' || str[i] == '\t'); --i) ; - if (i < len - 1) - { - ++i; - str[i] = _T('\0'); - len = i; - } - - for(i = 0; i < len && (str[i] == ' ' || str[i] == '\t'); ++i) ; - if (i > 0) - memmove(str, &str[i], (len - i + 1) * sizeof(TCHAR)); - - return str; -} - -BOOL lstreq(TCHAR *a, TCHAR *b, size_t len) -{ - - a = CharLower(_tcsdup(a)); - b = CharLower(_tcsdup(b)); - BOOL ret; - if (len >= 0) - ret = !_tcsncmp(a, b, len); - else - ret = !_tcscmp(a, b); - free(a); - free(b); - return ret; - -} - - -BOOL CreatePath(const TCHAR *path) -{ - TCHAR folder[1024]; - lstrcpyn(folder, path, MAX_REGS(folder)); - - TCHAR *p = folder; - if (p[0] && p[1] && p[1] == _T(':') && p[2] == _T('\\')) p += 3; // skip drive letter - - SetLastError(ERROR_SUCCESS); - while(p = _tcschr(p, '\\')) - { - *p = _T('\0'); - CreateDirectory(folder, 0); - *p = _T('\\'); - p++; - } - CreateDirectory(folder, 0); - - DWORD lerr = GetLastError(); - return (lerr == ERROR_SUCCESS || lerr == ERROR_ALREADY_EXISTS); -} diff --git a/plugins/SpellChecker/spellchecker.vcxproj b/plugins/SpellChecker/spellchecker.vcxproj index ad3d1555b3..5159fde64d 100644 --- a/plugins/SpellChecker/spellchecker.vcxproj +++ b/plugins/SpellChecker/spellchecker.vcxproj @@ -74,7 +74,7 @@ Full OnlyExplicitInline ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) - HUNSPELL_STATIC;WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + WIN32;NDEBUG;_WINDOWS;_USRDLL;HUNSPELL_STATIC;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) true true Level3 @@ -101,7 +101,7 @@ Full OnlyExplicitInline ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) - HUNSPELL_STATIC;WIN64;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + WIN64;NDEBUG;_WINDOWS;_USRDLL;HUNSPELL_STATIC;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) true true Level3 @@ -127,7 +127,7 @@ Disabled ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) - HUNSPELL_STATIC;WIN32;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + WIN32;_DEBUG;_WINDOWS;_USRDLL;HUNSPELL_STATIC;%(PreprocessorDefinitions) MultiThreadedDebugDLL Level3 EditAndContinue @@ -150,7 +150,7 @@ Disabled ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) - HUNSPELL_STATIC;WIN64;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + WIN64;_DEBUG;_WINDOWS;_USRDLL;HUNSPELL_STATIC;%(PreprocessorDefinitions) MultiThreadedDebugDLL Level3 EnableFastChecks @@ -169,68 +169,59 @@ - - - - + + + + - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + - - - - - - - + + - - - - - - - + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + diff --git a/plugins/SpellChecker/spellchecker.vcxproj.filters b/plugins/SpellChecker/spellchecker.vcxproj.filters index c923a6345a..f46574b63c 100644 --- a/plugins/SpellChecker/spellchecker.vcxproj.filters +++ b/plugins/SpellChecker/spellchecker.vcxproj.filters @@ -19,21 +19,18 @@ {a28a5de0-489b-4a0c-8e4b-87848ecfc338} - - {437a04fa-5422-4a59-bf81-a7a42e195870} - - + Header Files - + Header Files - + Header Files - + Header Files @@ -45,109 +42,86 @@ Header Files - + Header Files - + Header Files - + Header Files - + Header Files\hunspell Header Files - + Header Files\hunspell Header Files - + Header Files\hunspell Header Files - + Header Files\hunspell Header Files - + Header Files\hunspell Header Files - + Header Files\hunspell Header Files - + Header Files\hunspell Header Files - + Header Files\hunspell Header Files - + Header Files\hunspell Header Files - + Header Files\hunspell Header Files - + Header Files\hunspell Header Files - + Header Files\hunspell Header Files - + Header Files\hunspell Header Files - + Header Files\hunspell Header Files - + Header Files\hunspell Header Files - + Header Files\hunspell Header Files - + Header Files\hunspell Header Files - + Header Files - - Resource Files - - - Resource Files - - - Resource Files - - - Docs - - - Docs - - - Docs - - - Docs - - - - + Resource Files - + Resource Files - + Source Files - + Source Files - + Source Files @@ -156,46 +130,46 @@ Source Files - + Source Files - + Source Files - + Source Files - + Source Files\hunspell Source Files - + Source Files\hunspell Source Files - + Source Files\hunspell Source Files - + Source Files\hunspell Source Files - + Source Files\hunspell Source Files - + Source Files\hunspell Source Files - + Source Files\hunspell Source Files - + Source Files\hunspell Source Files - + Source Files\hunspell Source Files - + Source Files\hunspell Source Files - + Source Files\hunspell Source Files diff --git a/plugins/SpellChecker/spellchecker_flags.vcxproj b/plugins/SpellChecker/spellchecker_flags.vcxproj index 6310e5be01..6c6e373743 100644 --- a/plugins/SpellChecker/spellchecker_flags.vcxproj +++ b/plugins/SpellChecker/spellchecker_flags.vcxproj @@ -117,7 +117,7 @@ - + diff --git a/plugins/SpellChecker/src/RichEdit.cpp b/plugins/SpellChecker/src/RichEdit.cpp new file mode 100644 index 0000000000..102b1acfde --- /dev/null +++ b/plugins/SpellChecker/src/RichEdit.cpp @@ -0,0 +1,332 @@ +#include "commons.h" + + +RichEdit::RichEdit(HWND hwnd) + : hwnd(NULL), ole(NULL), textDocument(NULL), stopped(0), undoEnabled(TRUE) +{ + SetHWND(hwnd); +} + +RichEdit::~RichEdit() +{ + SetHWND(NULL); +} + +bool RichEdit::IsValid() const +{ + return ole != NULL; +} + +HWND RichEdit::GetHWND() const +{ + return hwnd; +} + +void RichEdit::SetHWND(HWND hwnd) +{ + if (textDocument != NULL) + { + textDocument->Release(); + textDocument = NULL; + } + if (ole != NULL) + { + ole->Release(); + ole = NULL; + } + + this->hwnd = hwnd; + + if (hwnd == NULL) + return; + + SendMessage(EM_GETOLEINTERFACE, 0, (LPARAM) &ole); + if (ole == NULL) + return; + + if (ole->QueryInterface(IID_ITextDocument, (void**) &textDocument) != S_OK) + textDocument = NULL; +} + +LRESULT RichEdit::SendMessage(UINT Msg, WPARAM wParam, LPARAM lParam) const +{ + return ::SendMessage(hwnd, Msg, wParam, lParam); +} + +bool RichEdit::IsReadOnly() const +{ + return (GetWindowLongPtr(hwnd, GWL_STYLE) & ES_READONLY) == ES_READONLY; +} + +void RichEdit::SuspendUndo() +{ + if (textDocument != NULL) + { + textDocument->Undo(tomSuspend, NULL); + undoEnabled = FALSE; + } +} + +void RichEdit::ResumeUndo() +{ + if (textDocument != NULL) + { + textDocument->Undo(tomResume, NULL); + undoEnabled = TRUE; + } +} + +void RichEdit::Stop() +{ + stopped++; + if (stopped != 1) + return; + + SuspendUndo(); + +// HideCaret(hwnd); + SendMessage(WM_SETREDRAW, FALSE, 0); + + SendMessage(EM_GETSCROLLPOS, 0, (LPARAM) &old_scroll_pos); + SendMessage(EM_EXGETSEL, 0, (LPARAM) &old_sel); + GetCaretPos(&caretPos); + + old_mask = SendMessage(EM_GETEVENTMASK, 0, 0); + SendMessage(EM_SETEVENTMASK, 0, old_mask & ~ENM_CHANGE); + + inverse = (old_sel.cpMin >= LOWORD(SendMessage(EM_CHARFROMPOS, 0, (LPARAM) &caretPos))); +} + +void RichEdit::Start() +{ + stopped--; + + if (stopped < 0) + { + stopped = 0; + return; + } + else if (stopped > 0) + return; + + if (inverse) + { + LONG tmp = old_sel.cpMin; + old_sel.cpMin = old_sel.cpMax; + old_sel.cpMax = tmp; + } + + SendMessage(EM_SETEVENTMASK, 0, old_mask); + SendMessage(EM_EXSETSEL, 0, (LPARAM) &old_sel); + SendMessage(EM_SETSCROLLPOS, 0, (LPARAM) &old_scroll_pos); + + SendMessage(WM_SETREDRAW, TRUE, 0); + InvalidateRect(hwnd, NULL, FALSE); +// ShowCaret(hwnd); + + ResumeUndo(); +} + +BOOL RichEdit::IsStopped() +{ + return stopped > 0; +} + +int RichEdit::GetCharFromPos(const POINT &pt) +{ + return LOWORD(SendMessage(EM_CHARFROMPOS, 0, (LPARAM) &pt)); +} + +int RichEdit::GetLineCount() const +{ + return SendMessage(EM_GETLINECOUNT, 0, 0); +} + +void RichEdit::GetLine(int line, TCHAR *text, size_t text_len) const +{ + *((WORD*)text) = text_len - 1; + unsigned size = (unsigned) SendMessage(EM_GETLINE, (WPARAM) line, (LPARAM) text); + // Sometimes it likes to return size = lineLen+1, adding an \n at the end, so we remove it here + // to make both implementations return same size + int lineLen = GetLineLength(line); + size = (unsigned) max(0, min((int)text_len - 1, min((int) size, lineLen))); + text[size] = _T('\0'); + +/* + int len = GetLineLength(line); + if (len < 1) + { + text[0] = 0; + return; + } + + int first = GetFirstCharOfLine(line); + TCHAR *tmp = GetText(first, first + GetLineLength(line)); + lstrcpyn(text, tmp, text_len); + mir_free(tmp); +*/ +} + +int RichEdit::GetLineLength(int line) const +{ + return SendMessage(EM_LINELENGTH, GetFirstCharOfLine(line), 0); +} + +int RichEdit::GetFirstCharOfLine(int line) const +{ + return SendMessage(EM_LINEINDEX, (WPARAM) line, 0); +} + +int RichEdit::GetLineFromChar(int charPos) const +{ + return SendMessage(EM_LINEFROMCHAR, charPos, 0); +} + +CHARRANGE RichEdit::GetSel() const +{ + CHARRANGE sel; + SendMessage(EM_EXGETSEL, 0, (LPARAM) &sel); + return sel; +} + +void RichEdit::SetSel(int start, int end) +{ + CHARRANGE sel = { start, end }; + SetSel(sel); +} + +void RichEdit::SetSel(const CHARRANGE &sel) +{ + SendMessage(EM_EXSETSEL, 0, (LPARAM) &sel); +} + +int RichEdit::GetTextLength() const +{ + return GetWindowTextLength(hwnd); +} + +TCHAR *RichEdit::GetText(int start, int end) const +{ + if (end <= start) + end = GetTextLength(); + + if (textDocument != NULL) + { + ITextRange *range; + if (textDocument->Range(start, end, &range) != S_OK) + return mir_tstrdup(_T("")); + + BSTR text = NULL; + if (range->GetText(&text) != S_OK || text == NULL) + { + range->Release(); + return mir_tstrdup(_T("")); + } + + TCHAR *ret = mir_u2t(text); + + SysFreeString(text); + + range->Release(); + + return ret; + } + else + { + int len = GetTextLength(); + TCHAR *tmp = (TCHAR *) mir_alloc(len * sizeof(TCHAR)); + GetWindowText(hwnd, tmp, len); + tmp[len] = 0; + + TCHAR *ret = (TCHAR *) mir_alloc((end - start + 1) * sizeof(TCHAR)); + memmove(ret, &tmp[start], (end - start) * sizeof(TCHAR)); + ret[end - start] = 0; + + mir_free(tmp); + return ret; + } +} + +void RichEdit::ReplaceSel(const TCHAR *new_text) +{ + if (stopped) + { + CHARRANGE sel = GetSel(); + + ResumeUndo(); + + SendMessage(EM_REPLACESEL, undoEnabled, (LPARAM) new_text); + + SuspendUndo(); + + FixSel(&old_sel, sel, lstrlen(new_text)); + + SendMessage(WM_SETREDRAW, FALSE, 0); + SendMessage(EM_SETEVENTMASK, 0, old_mask & ~ENM_CHANGE); + } + else + { + SendMessage(EM_REPLACESEL, undoEnabled, (LPARAM) new_text); + } +} + +int RichEdit::Replace(int start, int end, const TCHAR *new_text) +{ + CHARRANGE sel = GetSel(); + CHARRANGE replace_sel = { start, end }; + SetSel(replace_sel); + + ReplaceSel(new_text); + + int dif = FixSel(&sel, replace_sel, lstrlen(new_text)); + SetSel(sel); + return dif; +} + +int RichEdit::Insert(int pos, const TCHAR *text) +{ + CHARRANGE sel = GetSel(); + CHARRANGE replace_sel = { pos, pos }; + SetSel(replace_sel); + + ReplaceSel(text); + + int dif = FixSel(&sel, replace_sel, lstrlen(text)); + SetSel(sel); + return dif; +} + +int RichEdit::Delete(int start, int end) +{ + CHARRANGE sel = GetSel(); + CHARRANGE replace_sel = { start, end }; + SetSel(replace_sel); + + ReplaceSel(_T("")); + + int dif = FixSel(&sel, replace_sel, 0); + SetSel(sel); + return dif; +} + +int RichEdit::FixSel(CHARRANGE *to_fix, CHARRANGE sel_changed, int new_len) +{ + int dif = new_len - (sel_changed.cpMax - sel_changed.cpMin); + + if (to_fix->cpMax <= sel_changed.cpMin) + return dif; + + int newMax = sel_changed.cpMax + dif; + + if (to_fix->cpMin >= sel_changed.cpMax) + to_fix->cpMin += dif; + else if (to_fix->cpMin >= newMax) // For dif < 0, pos beetween sel_changed.cpMax + dif and sel_changed.cpMax + to_fix->cpMin = newMax; + + if (to_fix->cpMax >= sel_changed.cpMax) + to_fix->cpMax += dif; + else if (to_fix->cpMax >= newMax) // For dif < 0, pos beetween sel_changed.cpMax + dif and sel_changed.cpMax + to_fix->cpMax = newMax; + + return dif; +} diff --git a/plugins/SpellChecker/src/RichEdit.h b/plugins/SpellChecker/src/RichEdit.h new file mode 100644 index 0000000000..e8b4101be4 --- /dev/null +++ b/plugins/SpellChecker/src/RichEdit.h @@ -0,0 +1,71 @@ +#ifndef __RICHEDIT_H__ +#define __RICHEDIT_H__ + +#include +#include +#include +#include + + +class RichEdit +{ + HWND hwnd; + IRichEditOle *ole; + ITextDocument *textDocument; + + int stopped; + BOOL undoEnabled; + POINT old_scroll_pos; + CHARRANGE old_sel; + POINT caretPos; + DWORD old_mask; + BOOL inverse; + +public: + RichEdit(HWND hwnd); + ~RichEdit(); + + bool IsValid() const; + HWND GetHWND() const; + + LRESULT SendMessage(UINT Msg, WPARAM wParam, LPARAM lParam) const; + + bool IsReadOnly() const; + + void SuspendUndo(); + void ResumeUndo(); + void Stop(); + void Start(); + BOOL IsStopped(); + + int GetCharFromPos(const POINT &pt); + + int GetLineCount() const; + void GetLine(int line, TCHAR *text, size_t text_len) const; + int GetLineLength(int line) const; + int GetFirstCharOfLine(int line) const; + int GetLineFromChar(int charPos) const; + + CHARRANGE GetSel() const; + void SetSel(int start, int end); + void SetSel(const CHARRANGE &sel); + + TCHAR *GetText(int start, int end) const; + int GetTextLength() const; + + void ReplaceSel(const TCHAR *new_text); + int Replace(int start, int end, const TCHAR *new_text); + int Insert(int pos, const TCHAR *text); + int Delete(int start, int end); + +private: + void SetHWND(HWND hwnd); + + int FixSel(CHARRANGE *to_fix, CHARRANGE sel_changed, int new_len); +}; + + + + + +#endif // __RICHEDIT_H__ diff --git a/plugins/SpellChecker/src/Version.h b/plugins/SpellChecker/src/Version.h new file mode 100644 index 0000000000..2fa11f0306 --- /dev/null +++ b/plugins/SpellChecker/src/Version.h @@ -0,0 +1,20 @@ +#define __MAJOR_VERSION 0 +#define __MINOR_VERSION 2 +#define __RELEASE_NUM 6 +#define __BUILD_NUM 0 + +#define __FILEVERSION_STRING __MAJOR_VERSION,__MINOR_VERSION,__RELEASE_NUM,__BUILD_NUM +#define __FILEVERSION_DOTS __MAJOR_VERSION.__MINOR_VERSION.__RELEASE_NUM.__BUILD_NUM + +#define __STRINGIFY_IMPL(x) #x +#define __STRINGIFY(x) __STRINGIFY_IMPL(x) +#define __VERSION_STRING __STRINGIFY(__FILEVERSION_DOTS) + +#define __PLUGIN_NAME "Spell Checker" +#define __INTERNAL_NAME "SpellChecker" +#define __FILENAME "SpellChecker.dll" +#define __DESCRIPTION "Spell checker for the message windows. Uses Hunspell to do the checking." +#define __AUTHOR "Ricardo Pescuma Domenecci, FREAK_THEMIGHTY" +#define __AUTHOREMAIL "pescuma@miranda-im.org" +#define __AUTHORWEB "http://nightly.miranda.im/" +#define __COPYRIGHT "© 2006-2010 Ricardo Pescuma Domenecci" diff --git a/plugins/SpellChecker/src/ardialog.cpp b/plugins/SpellChecker/src/ardialog.cpp new file mode 100644 index 0000000000..6a08585ea1 --- /dev/null +++ b/plugins/SpellChecker/src/ardialog.cpp @@ -0,0 +1,316 @@ +/* +Copyright (C) 2006-2010 Ricardo Pescuma Domenecci + +This is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public +License as published by the Free Software Foundation; either +version 2 of the License, or (at your option) any later version. + +This is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with this file; see the file license.txt. If +not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. +*/ + + +#include "commons.h" + + +static LRESULT CALLBACK EditProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); +static INT_PTR CALLBACK AddReplacementDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam); + + +struct Data +{ + Dictionary *dict; + tstring find; + tstring replace; + BOOL useVariables; + + BOOL modal; + BOOL findReadOnly; + + AutoReplaceDialogCallback callback; + void *param; + + WNDPROC old_edit_proc; +}; + +BOOL ShowAutoReplaceDialog(HWND parent, BOOL modal, + Dictionary *dict, const TCHAR *find, const TCHAR *replace, BOOL useVariables, + BOOL findReadOnly, AutoReplaceDialogCallback callback, void *param) +{ + Data *data = new Data(); + data->dict = dict; + data->useVariables = useVariables; + data->modal = modal; + data->findReadOnly = findReadOnly; + data->callback = callback; + data->param = param; + + if (find != NULL) + data->find = find; + + if (replace != NULL) + data->replace = replace; + + if (modal) + { + return DialogBoxParam(hInst, MAKEINTRESOURCE(IDD_ADD_REPLACEMENT), parent, + AddReplacementDlgProc, (LPARAM) data); + } + else + { + HWND hwnd = CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_ADD_REPLACEMENT), parent, + AddReplacementDlgProc, (LPARAM) data); + SetForegroundWindow(hwnd); + SetFocus(hwnd); + SetFocus(GetDlgItem(hwnd, IDC_NEW)); + ShowWindow(hwnd, SW_SHOW); + return TRUE; + } +} + + +static LRESULT CALLBACK OnlyCharsEditProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) +{ + Data *data = (Data *) GetWindowLongPtr(hwnd, GWLP_USERDATA); + + switch(msg) + { + case WM_CHAR: + { + if (wParam == VK_BACK) + break; + if (lParam & (1 << 28)) // ALT key + break; + if (GetKeyState(VK_CONTROL) & 0x8000) // CTRL key + break; + + TCHAR c = (TCHAR) wParam; + if (!data->dict->autoReplace->isWordChar(c)) + return 1; + + TCHAR tmp[2] = { c, 0 }; + CharLower(tmp); + wParam = tmp[0]; + + break; + } + } + + LRESULT ret = CallWindowProc(data->old_edit_proc, hwnd, msg, wParam, lParam); + + switch(msg) + { + case EM_PASTESPECIAL: + case WM_PASTE: + { + TCHAR text[256]; + GetWindowText(hwnd, text, MAX_REGS(text)); + + scoped_free dest = data->dict->autoReplace->filterText(text); + SetWindowText(hwnd, dest); + break; + } + } + + return ret; + +} + + +static BOOL CenterParent(HWND hwnd) +{ + HWND hwndParent = GetParent(hwnd); + if (hwndParent == NULL) + return FALSE; + + RECT rect, rectP; + GetWindowRect(hwnd, &rect); + GetWindowRect(hwndParent, &rectP); + + int width = rect.right - rect.left; + int height = rect.bottom - rect.top; + + int x = ((rectP.right-rectP.left) - width) / 2 + rectP.left; + int y = ((rectP.bottom-rectP.top) - height) / 2 + rectP.top; + + int screenwidth = GetSystemMetrics(SM_CXSCREEN); + int screenheight = GetSystemMetrics(SM_CYSCREEN); + + if(x + width > screenwidth) x = screenwidth - width; + if(y + height > screenheight) y = screenheight - height; + if(x < 0) x = 0; + if(y < 0) y = 0; + + MoveWindow(hwnd, x, y, width, height, FALSE); + + return TRUE; +} + +static void Close(HWND hwndDlg, int ret) +{ + Data *data = (Data *) GetWindowLongPtr(hwndDlg, GWLP_USERDATA); + + if (!ret) + { + data->callback(TRUE, data->dict, + data->find.c_str(), data->replace.c_str(), data->useVariables, + data->find.c_str(), data->param); + } + + SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_OLD), GWLP_WNDPROC, (LONG_PTR) data->old_edit_proc); + data->old_edit_proc = NULL; + + if (data->modal) + EndDialog(hwndDlg, ret); + else + DestroyWindow(hwndDlg); + + delete data; +} + +static INT_PTR CALLBACK AddReplacementDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) +{ + switch (msg) + { + case WM_INITDIALOG: + { + TranslateDialogDefault(hwndDlg); + + Data *data = (Data *) lParam; + SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR) data); + + SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_OLD), GWLP_USERDATA, (LONG_PTR) data); + data->old_edit_proc = (WNDPROC) SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_OLD), GWLP_WNDPROC, + (LONG_PTR) OnlyCharsEditProc); + + HICON hIcon = IcoLib_LoadIcon("spellchecker_enabled"); + SendMessage(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM) hIcon); + Skin_ReleaseIcon(hIcon); + + SendDlgItemMessage(hwndDlg, IDC_OLD, EM_LIMITTEXT, 256, 0); + SendDlgItemMessage(hwndDlg, IDC_NEW, EM_LIMITTEXT, 256, 0); + + if (!data->find.empty()) + { + scoped_free tmp = data->dict->autoReplace->filterText(data->find.c_str()); + SetDlgItemText(hwndDlg, IDC_OLD, tmp); + } + if (!data->replace.empty()) + SetDlgItemText(hwndDlg, IDC_NEW, data->replace.c_str()); + + CheckDlgButton(hwndDlg, IDC_VARIABLES, data->useVariables ? BST_CHECKED : BST_UNCHECKED); + + if (data->findReadOnly) + { + SendDlgItemMessage(hwndDlg, IDC_OLD, EM_SETREADONLY, TRUE, 0); + EnableWindow(GetDlgItem(hwndDlg, IDC_OLD_PS), FALSE); + } + + if (!variables_enabled) + { + ShowWindow(GetDlgItem(hwndDlg, IDC_VARIABLES), FALSE); + ShowWindow(GetDlgItem(hwndDlg, IDC_VAR_HELP), FALSE); + + RECT rc_old; + GetWindowRect(GetDlgItem(hwndDlg, IDC_OLD), &rc_old); + RECT rc_new; + GetWindowRect(GetDlgItem(hwndDlg, IDC_NEW), &rc_new); + rc_new.right = rc_old.right; + + SetWindowPos(GetDlgItem(hwndDlg, IDC_NEW), NULL, 0, 0, + rc_new.right - rc_new.left, rc_new.bottom - rc_new.top, + SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOOWNERZORDER | SWP_NOREDRAW | SWP_NOZORDER); + } + else + { + variables_skin_helpbutton(hwndDlg, IDC_VAR_HELP); + EnableWindow(GetDlgItem(hwndDlg, IDC_VAR_HELP), IsDlgButtonChecked(hwndDlg, IDC_VARIABLES)); + } + + CenterParent(hwndDlg); + + return TRUE; + } + + case WM_COMMAND: + switch(wParam) + { + case IDOK: + { + Data *data = (Data *) GetWindowLongPtr(hwndDlg, GWLP_USERDATA); + + TCHAR find[256]; + if (data->findReadOnly) + { + lstrcpyn(find, data->find.c_str(), MAX_REGS(find)); + } + else + { + GetDlgItemText(hwndDlg, IDC_OLD, find, MAX_REGS(find)); + lstrtrim(find); + } + + TCHAR replace[256]; + GetDlgItemText(hwndDlg, IDC_NEW, replace, MAX_REGS(replace)); + lstrtrim(replace); + + if (!data->findReadOnly && find[0] == 0) + { + MessageBox(hwndDlg, TranslateT("The wrong word can't be empty!"), TranslateT("Wrong Correction"), + MB_OK | MB_ICONERROR); + } + else if (replace[0] == 0) + { + MessageBox(hwndDlg, TranslateT("The correction can't be empty!"), TranslateT("Wrong Correction"), + MB_OK | MB_ICONERROR); + } + else if (_tcscmp(find, replace) == 0) + { + MessageBox(hwndDlg, TranslateT("The correction can't be equal to the wrong word!"), TranslateT("Wrong Correction"), + MB_OK | MB_ICONERROR); + } + else + { + data->callback(FALSE, data->dict, + find, replace, IsDlgButtonChecked(hwndDlg, IDC_VARIABLES), + data->find.c_str(), data->param); + Close(hwndDlg, 1); + } + + break; + } + case IDCANCEL: + { + Close(hwndDlg, 0); + break; + } + case IDC_VARIABLES: + { + EnableWindow(GetDlgItem(hwndDlg, IDC_VAR_HELP), IsDlgButtonChecked(hwndDlg, IDC_VARIABLES)); + break; + } + case IDC_VAR_HELP: + { + variables_showhelp(hwndDlg, IDC_NEW, VHF_FULLDLG, NULL, "The wrong word typed by the user"); + break; + } + } + break; + + case WM_CLOSE: + { + Close(hwndDlg, 0); + break; + } + } + + return FALSE; +} diff --git a/plugins/SpellChecker/src/ardialog.h b/plugins/SpellChecker/src/ardialog.h new file mode 100644 index 0000000000..83f97c6026 --- /dev/null +++ b/plugins/SpellChecker/src/ardialog.h @@ -0,0 +1,33 @@ +/* +Copyright (C) 2009-2010 Ricardo Pescuma Domenecci + +This is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public +License as published by the Free Software Foundation; either +version 2 of the License, or (at your option) any later version. + +This is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with this file; see the file license.txt. If +not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. +*/ + +#ifndef __ARDIALOG_H__ +# define __ARDIALOG_H__ + + +typedef void (*AutoReplaceDialogCallback)(BOOL canceled, Dictionary *dict, + const TCHAR *find, const TCHAR *replace, BOOL useVariables, + const TCHAR *original_find, void *param); + +BOOL ShowAutoReplaceDialog(HWND parent, BOOL modal, + Dictionary *dict, const TCHAR *find, const TCHAR *replace, BOOL useVariables, + BOOL findReadOnly, AutoReplaceDialogCallback callback, void *param); + + +#endif // __ARDIALOG_H__ diff --git a/plugins/SpellChecker/src/autoreplace.cpp b/plugins/SpellChecker/src/autoreplace.cpp new file mode 100644 index 0000000000..2d257ccfec --- /dev/null +++ b/plugins/SpellChecker/src/autoreplace.cpp @@ -0,0 +1,229 @@ +/* +Copyright (C) 2009-2010 Ricardo Pescuma Domenecci + +This is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public +License as published by the Free Software Foundation; either +version 2 of the License, or (at your option) any later version. + +This is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with this file; see the file license.txt. If +not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. +*/ + + +#include "commons.h" + + +AutoReplacement::AutoReplacement() + : useVariables(FALSE) +{ +} + +AutoReplacement::AutoReplacement(const TCHAR *replace, BOOL useVariables) + : replace(replace), useVariables(useVariables) +{ +} + + +AutoReplaceMap::AutoReplaceMap(TCHAR *aFilename, Dictionary *dict) +{ + this->dict = dict; + lstrcpyn(filename, aFilename, MAX_REGS(filename)); + loadAutoReplaceMap(); +} + +void AutoReplaceMap::loadAutoReplaceMap() +{ + FILE *file = _tfopen(filename, _T("rb")); + if (file == NULL) + return; + + char tmp[1024]; + char c; + int pos = 0; + while((c = fgetc(file)) != EOF) + { + if (c == '\n' || c == '\r' || pos >= MAX_REGS(tmp) - 1) + { + if (pos > 0) + { + tmp[pos] = '\0'; + + // Get from + BOOL useVars; + char *p; + if ((p = strstr(tmp, "->")) != NULL) + { + *p = '\0'; + p += 2; + useVars = FALSE; + } + else if ((p = strstr(tmp, "-V>")) != NULL) + { + *p = '\0'; + p += 3; + useVars = TRUE; + } + + if (p != NULL) + { + Utf8ToTchar find(tmp); + Utf8ToTchar replace(p); + + lstrtrim(find); + lstrtrim(replace); + + if (find[0] != 0 && replace[0] != 0) + replacements[find.get()] = AutoReplacement(replace, useVars); + } + } + + pos = 0; + } + else + { + tmp[pos] = c; + pos ++; + } + } + fclose(file); +} + +void AutoReplaceMap::writeAutoReplaceMap() +{ + // Create path + TCHAR *p = _tcsrchr(filename, _T('\\')); + if (p != NULL) + { + *p = 0; + CreatePath(filename); + *p = _T('\\'); + } + + // Write it + FILE *file = _tfopen(filename, _T("wb")); + if (file != NULL) + { + map::iterator it = replacements.begin(); + for (; it != replacements.end(); it++) + { + AutoReplacement &ar = it->second; + + TcharToUtf8 find(it->first.c_str()); + TcharToUtf8 replace(ar.replace.c_str()); + + if (ar.useVariables) + fprintf(file, "%s-V>%s\n", (const char *)find, (const char *)replace); + else + fprintf(file, "%s->%s\n", (const char *)find, (const char *)replace); + } + fclose(file); + } +} + + +BOOL AutoReplaceMap::isWordChar(TCHAR c) +{ + if (IsNumber(c)) + return TRUE; + + if (_tcschr(_T("-_.!@#$%&*()[]{}<>:?/\\=+"), c) != NULL) + return TRUE; + + return dict->isWordChar(c); +} + + +TCHAR * AutoReplaceMap::autoReplace(const TCHAR * word) +{ + scoped_free from = _tcslwr(_tcsdup(word)); + + if (replacements.find(from.get()) == replacements.end()) + return NULL; + + AutoReplacement &ar = replacements[from.get()]; + + TCHAR *to; + if (ar.useVariables) + to = variables_parsedup((TCHAR *) ar.replace.c_str(), (TCHAR *) word, NULL); + else + to = _tcsdup(ar.replace.c_str()); + + // Wich case to use? + size_t len = lstrlen(word); + size_t i; + for (i = 0; i < len; i++) + if (IsCharLower(word[i])) + break; + + if (i <= 0) + { + // All lower + return to; + } + else if (i >= len) + { + // All upper + return CharUpper(to); + } + else + { + // First upper + TCHAR tmp[2]; + tmp[0] = to[0]; + tmp[1] = _T('\0'); + CharUpper(tmp); + to[0] = tmp[0]; + return to; + } +} + +TCHAR * AutoReplaceMap::filterText(const TCHAR *find) +{ + TCHAR *ret = _tcsdup(find); + int len = lstrlen(ret); + int pos = 0; + for(int i = 0; i < len; i++) + if (isWordChar(find[i])) + ret[pos++] = ret[i]; + ret[pos] = 0; + return CharLower(ret); +} + +void AutoReplaceMap::add(const TCHAR * aFrom, const TCHAR * to, BOOL useVariables) +{ + scoped_free from = filterText(aFrom); + + replacements[from.get()] = AutoReplacement(to, useVariables); + + writeAutoReplaceMap(); +} + +void AutoReplaceMap::copyMap(map *replacements) +{ + *replacements = this->replacements; +} + +void AutoReplaceMap::setMap(const map &replacements) +{ + this->replacements.clear(); + + map::const_iterator it = replacements.begin(); + for (; it != replacements.end(); it++) + { + scoped_free from = filterText(it->first.c_str()); + this->replacements[from.get()] = it->second; + } + + writeAutoReplaceMap(); +} + + + diff --git a/plugins/SpellChecker/src/autoreplace.h b/plugins/SpellChecker/src/autoreplace.h new file mode 100644 index 0000000000..e7e2efbb55 --- /dev/null +++ b/plugins/SpellChecker/src/autoreplace.h @@ -0,0 +1,70 @@ +/* +Copyright (C) 2009-2010 Ricardo Pescuma Domenecci + +This is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public +License as published by the Free Software Foundation; either +version 2 of the License, or (at your option) any later version. + +This is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with this file; see the file license.txt. If +not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. +*/ + + +#ifndef __AUTOREPLACE_H__ +# define __AUTOREPLACE_H__ + + +struct AutoReplacement +{ + tstring replace; + BOOL useVariables; + + AutoReplacement(); + AutoReplacement(const TCHAR *replace, BOOL useVariables); +}; + + +class Dictionary; + + +class AutoReplaceMap +{ +private: + TCHAR filename[1024]; + Dictionary *dict; + map replacements; + + void loadAutoReplaceMap(); + void writeAutoReplaceMap(); + +public: + AutoReplaceMap(TCHAR *filename, Dictionary *dict); + + TCHAR *filterText(const TCHAR *find); + BOOL isWordChar(TCHAR c); + + /// Return an auto replacement to a word or NULL if none exists. + /// You have to free the item. + TCHAR * autoReplace(const TCHAR * word); + + /// Add a word to the list of auto-replaced words + void add(const TCHAR * from, const TCHAR * to, BOOL useVariables = FALSE); + + /// Make a copy of the auto replace map + void copyMap(map *replacements); + + /// Make a copy of the auto replace map + void setMap(const map &replacements); +}; + + + +#endif // __AUTOREPLACE_H__ diff --git a/plugins/SpellChecker/src/codepages.cpp b/plugins/SpellChecker/src/codepages.cpp new file mode 100644 index 0000000000..6441cda1b0 --- /dev/null +++ b/plugins/SpellChecker/src/codepages.cpp @@ -0,0 +1,307 @@ + +struct { + char *name; + UINT codepage; +} codepages[] = { + { "ISO8859-1", 28591 }, + { "UTF-7", CP_UTF7 }, + { "UTF-8", CP_UTF8 }, + { "UTF7", CP_UTF7 }, + { "UTF8", CP_UTF8 }, + { "ISO8859-2", 28592 }, + { "ISO8859-3", 28593 }, + { "ISO8859-4", 28594 }, + { "ISO8859-5", 28595 }, + { "ISO8859-6", 28596 }, + { "ISO8859-7", 28597 }, + { "ISO8859-8", 28598 }, + { "ISO8859-9", 28599 }, + { "ASMO-708", 708 }, + { "DOS-720", 720 }, + { "iso-8859-6", 28596 }, + { "arabic", 28596 }, + { "csISOLatinArabic", 28596 }, + { "ECMA-114", 28596 }, + { "ISO_8859-6", 28596 }, + { "ISO_8859-6:1987", 28596 }, + { "iso-ir-127", 28596 }, + { "x-mac-arabic", 10004 }, + { "windows-1256", 1256 }, + { "cp1256", 1256 }, + { "ibm775", 775 }, + { "CP500", 775 }, + { "iso-8859-4", 28594 }, + { "csISOLatin4", 28594 }, + { "ISO_8859-4", 28594 }, + { "ISO_8859-4:1988", 28594 }, + { "iso-ir-110", 28594 }, + { "l4", 28594 }, + { "latin4", 28594 }, + { "windows-1257", 1257 }, + { "ibm852", 852 }, + { "cp852", 852 }, + { "iso-8859-2", 28592 }, + { "csISOLatin2", 28592 }, + { "iso_8859-2", 28592 }, + { "iso_8859-2:1987", 28592 }, + { "iso-ir-101", 28592 }, + { "l2", 28592 }, + { "latin2", 28592 }, + { "x-mac-ce", 10029 }, + { "windows-1250", 1250 }, + { "x-cp1250", 1250 }, + { "EUC-CN", 51936 }, + { "x-euc-cn", 51936 }, + { "gb2312", 936 }, + { "chinese", 936 }, + { "CN-GB", 936 }, + { "csGB2312", 936 }, + { "csGB231280", 936 }, + { "csISO58GB231280", 936 }, + { "GB_2312-80", 936 }, + { "GB231280", 936 }, + { "GB2312-80", 936 }, + { "GBK", 936 }, + { "iso-ir-58", 936 }, + { "hz-gb-2312", 52936 }, + { "x-mac-chinesesimp", 10008 }, + { "big5", 950 }, + { "cn-big5", 950 }, + { "csbig5", 950 }, + { "x-x-big5", 950 }, + { "x-Chinese-CNS", 20000 }, + { "x-Chinese-Eten", 20002 }, + { "x-mac-chinesetrad", 10002 }, + { "cp866", 866 }, + { "ibm866", 866 }, + { "iso-8859-5", 28595 }, + { "csISOLatin5", 28595 }, + { "csISOLatinCyrillic", 28595 }, + { "cyrillic", 28595 }, + { "ISO_8859-5", 28595 }, + { "ISO_8859-5:1988", 28595 }, + { "iso-ir-144", 28595 }, + { "l5", 28595 }, + { "KOI8-R", 20866 }, + { "csKOI8R", 20866 }, + { "koi", 20866 }, + { "koi8", 20866 }, + { "koi8r", 20866 }, + { "KOI8-U", 21866 }, + { "koi8-ru", 21866 }, + { "x-mac-cyrillic", 10007 }, + { "windows-1251", 1251 }, + { "Win1251", 1251 }, + { "x-cp1251", 1251 }, + { "x-Europa", 29001 }, + { "x-IA5-German", 20106 }, + { "ibm737", 737 }, + { "iso-8859-7", 28597 }, + { "csISOLatinGreek", 28597 }, + { "ECMA-118", 28597 }, + { "ELOT_928", 28597 }, + { "greek", 28597 }, + { "greek8", 28597 }, + { "ISO_8859-7", 28597 }, + { "ISO_8859-7:1987", 28597 }, + { "iso-ir-126", 28597 }, + { "x-mac-greek", 10006 }, + { "windows-1253", 1253 }, + { "ibm869", 869 }, + { "DOS-862", 862 }, + { "iso-8859-8-i", 38598 }, + { "logical", 38598 }, + { "iso-8859-8", 28598 }, + { "csISOLatinHebrew", 28598 }, + { "hebrew", 28598 }, + { "ISO_8859-8", 28598 }, + { "ISO_8859-8:1988", 28598 }, + { "ISO-8859-8", 28598 }, + { "iso-ir-138", 28598 }, + { "visual", 28598 }, + { "x-mac-hebrew", 10005 }, + { "windows-1255", 1255 }, + { "ISO_8859-8-I", 1255 }, + { "ISO-8859-8", 1255 }, + { "x-EBCDIC-Arabic", 20420 }, + { "x-EBCDIC-CyrillicRussian", 20880 }, + { "x-EBCDIC-CyrillicSerbianBulgarian", 21025 }, + { "x-EBCDIC-DenmarkNorway", 20277 }, + { "x-ebcdic-denmarknorway-euro", 1142 }, + { "x-EBCDIC-FinlandSweden", 20278 }, + { "x-ebcdic-finlandsweden-euro", 1143 }, + { "X-EBCDIC-France", 1143 }, + { "X-EBCDIC-France", 1143 }, + { "x-ebcdic-france-euro", 1147 }, + { "x-EBCDIC-Germany", 20273 }, + { "x-ebcdic-germany-euro", 1141 }, + { "x-EBCDIC-GreekModern", 875 }, + { "x-EBCDIC-Greek", 20423 }, + { "x-EBCDIC-Hebrew", 20424 }, + { "x-EBCDIC-Icelandic", 20871 }, + { "x-ebcdic-icelandic-euro", 1149 }, + { "x-ebcdic-international-euro", 1148 }, + { "x-EBCDIC-Italy", 20280 }, + { "x-ebcdic-italy-euro", 1144 }, + { "x-EBCDIC-JapaneseAndKana", 50930 }, + { "x-EBCDIC-JapaneseAndJapaneseLatin", 50939 }, + { "x-EBCDIC-JapaneseAndUSCanada", 50931 }, + { "x-EBCDIC-JapaneseKatakana", 20290 }, + { "x-EBCDIC-KoreanAndKoreanExtended", 50933 }, + { "x-EBCDIC-KoreanExtended", 20833 }, + { "CP870", 870 }, + { "x-EBCDIC-SimplifiedChinese", 50935 }, + { "X-EBCDIC-Spain", 20284 }, + { "x-ebcdic-spain-euro", 1145 }, + { "x-EBCDIC-Thai", 20838 }, + { "x-EBCDIC-TraditionalChinese", 50937 }, + { "CP1026", 1026 }, + { "x-EBCDIC-Turkish", 20905 }, + { "x-EBCDIC-UK", 20285 }, + { "x-ebcdic-uk-euro", 1146 }, + { "ebcdic-cp-us", 37 }, + { "x-ebcdic-cp-us-euro", 1140 }, + { "ibm861", 861 }, + { "x-mac-icelandic", 10079 }, + { "x-iscii-as", 57006 }, + { "x-iscii-be", 57003 }, + { "x-iscii-de", 57002 }, + { "x-iscii-gu", 57010 }, + { "x-iscii-ka", 57008 }, + { "x-iscii-ma", 57009 }, + { "x-iscii-or", 57007 }, + { "x-iscii-pa", 57011 }, + { "x-iscii-ta", 57004 }, + { "x-iscii-te", 57005 }, + { "euc-jp", 51932 }, + { "csEUCPkdFmtJapanese", 51932 }, + { "Extended_UNIX_Code_Packed_Format_for_Japanese", 51932 }, + { "x-euc", 51932 }, + { "x-euc-jp", 51932 }, + { "iso-2022-jp", 50220 }, + { "iso-2022-jp", 50222 }, + { "_iso-2022-jp$SIO", 50222 }, + { "csISO2022JP", 50221 }, + { "_iso-2022-jp", 50221 }, + { "x-mac-japanese", 10001 }, + { "shift_jis", 932 }, + { "csShiftJIS", 932 }, + { "csWindows31J", 932 }, + { "ms_Kanji", 932 }, + { "shift-jis", 932 }, + { "x-ms-cp932", 932 }, + { "x-sjis", 932 }, + { "ks_c_5601-1987", 949 }, + { "csKSC56011987", 949 }, + { "euc-kr", 949 }, + { "iso-ir-149", 949 }, + { "korean", 949 }, + { "ks_c_5601", 949 }, + { "ks_c_5601_1987", 949 }, + { "ks_c_5601-1989", 949 }, + { "KSC_5601", 949 }, + { "KSC5601", 949 }, + { "euc-kr", 51949 }, + { "csEUCKR", 51949 }, + { "iso-2022-kr", 50225 }, + { "csISO2022KR", 50225 }, + { "Johab", 1361 }, + { "x-mac-korean", 10003 }, + { "iso-8859-3", 28593 }, + { "csISO", 28593 }, + { "Latin3", 28593 }, + { "ISO_8859-3", 28593 }, + { "ISO_8859-3:1988", 28593 }, + { "iso-ir-109", 28593 }, + { "l3", 28593 }, + { "latin3", 28593 }, + { "iso-8859-15", 28605 }, + { "csISO", 28605 }, + { "Latin9", 28605 }, + { "ISO_8859-15", 28605 }, + { "l9", 28605 }, + { "latin9", 28605 }, + { "x-IA5-Norwegian", 20108 }, + { "IBM437", 437 }, + { "437", 437 }, + { "cp437", 437 }, + { "csPC8", 437 }, + { "CodePage437", 437 }, + { "x-IA5-Swedish", 20107 }, + { "windows-874", 874 }, + { "DOS-874", 874 }, + { "iso-8859-11", 874 }, + { "TIS-620", 874 }, + { "ibm857", 857 }, + { "iso-8859-9", 28599 }, + { "csISO", 28599 }, + { "Latin5", 28599 }, + { "ISO_8859-9", 28599 }, + { "ISO_8859-9:1989", 28599 }, + { "iso-ir-148", 28599 }, + { "l5", 28599 }, + { "latin5", 28599 }, + { "x-mac-turkish", 10081 }, + { "windows-1254", 1254 }, + { "ISO_8859-9", 1254 }, + { "ISO_8859-9:1989", 1254 }, + { "iso-8859-9", 1254 }, + { "iso-ir-148", 1254 }, + { "latin5", 1254 }, + { "unicode", 1200 }, + { "utf-16", 1200 }, + { "unicodeFFFE", 1201 }, + { "utf-7", 65000 }, + { "csUnicode11UTF7", 65000 }, + { "unicode-1-1-utf-7", 65000 }, + { "x-unicode-2-0-utf-7", 65000 }, + { "utf-8", 65001 }, + { "unicode-1-1-utf-8", 65001 }, + { "unicode-2-0-utf-8", 65001 }, + { "x-unicode-2-0-utf-8", 65001 }, + { "us-ascii", 20127 }, + { "ANSI_X3.4-1968", 20127 }, + { "ANSI_X3.4-1986", 20127 }, + { "ascii", 20127 }, + { "cp367", 20127 }, + { "csASCII", 20127 }, + { "IBM367", 20127 }, + { "ISO_646.irv:1991", 20127 }, + { "ISO646-US", 20127 }, + { "iso-ir-6us", 20127 }, + { "windows-1258", 1258 }, + { "ibm850", 850 }, + { "x-IA5", 20105 }, + { "iso-8859-1", 28591 }, + { "cp819", 28591 }, + { "csISO", 28591 }, + { "Latin1", 28591 }, + { "ibm819", 28591 }, + { "iso_8859-1", 28591 }, + { "iso_8859-1:1987", 28591 }, + { "iso-ir-100", 28591 }, + { "l1", 28591 }, + { "latin1", 28591 }, + { "macintosh", 10000 }, + { "Windows-1252", 1252 }, + { "ANSI_X3.4-1968", 1252 }, + { "ANSI_X3.4-1986", 1252 }, + { "ascii", 1252 }, + { "cp367", 1252 }, + { "cp819", 1252 }, + { "csASCII", 1252 }, + { "IBM367", 1252 }, + { "ibm819", 1252 }, + { "ISO_646.irv:1991", 1252 }, + { "iso_8859-1", 1252 }, + { "iso_8859-1:1987", 1252 }, + { "ISO646-US", 1252 }, + { "iso-ir-100", 1252 }, + { "iso-ir-6", 1252 }, + { "latin1", 1252 }, + { "us", 1252 }, + { "us-ascii", 1252 }, + { "x-ansi", 1252 }, + { "microsoft-cp1251", 1251 } +}; + diff --git a/plugins/SpellChecker/src/commons.h b/plugins/SpellChecker/src/commons.h new file mode 100644 index 0000000000..2ad53b6092 --- /dev/null +++ b/plugins/SpellChecker/src/commons.h @@ -0,0 +1,153 @@ +/* +Copyright (C) 2006-2010 Ricardo Pescuma Domenecci + +This is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public +License as published by the Free Software Foundation; either +version 2 of the License, or (at your option) any later version. + +This is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with this file; see the file license.txt. If +not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. +*/ + +#ifndef __COMMONS_H__ +# define __COMMONS_H__ + + +#define OEMRESOURCE +#include +#include +#include +#include +#include +#include +#include +#include + +// Disable "...truncated to '255' characters in the debug information" warnings +#pragma warning(disable: 4786) + +#include +#include +#include +using namespace std; + + +// Miranda headers +#define MIRANDA_VER 0x0900 +#define MIRANDA_CUSTOM_LP +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//own includes +#include "m_folders.h" +#include "m_metacontacts.h" +#include "m_variables.h" +#include "m_userinfoex.h" + +#include "../utils/mir_memory.h" +#include "../utils/mir_options.h" +#include "../utils/mir_icons.h" +#include "../utils/tstring.h" +#include "../utils/utf8_helpers.h" +#include "../utils/scope.h" + +#include "resource.h" +#include "Version.h" +#include "m_spellchecker.h" +#include "options.h" +#include "autoreplace.h" +#include "dictionary.h" +#include "ardialog.h" +#include "RichEdit.h" + + +#define MODULE_NAME "SpellChecker" + +#define FLAGS_DLL_FOLDER _T("%miranda_path%\\Icons") +#define CUSTOM_DICTIONARIES_FOLDER _T("%miranda_userdata%\\Dictionaries") +#define DICTIONARIES_FOLDER _T("%miranda_path%\\Dictionaries") + +// Global Variables +extern HINSTANCE hInst; +extern BOOL uinfoex_enabled; +extern BOOL variables_enabled; + + +#define MAX_REGS(_A_) ( sizeof(_A_) / sizeof(_A_[0])) +#define FREE(_m_) if (_m_ != NULL) { free(_m_); _m_ = NULL; } + + +#define ICON_SIZE 16 + + +extern LIST languages; + +struct WrongWordPopupMenuData +{ + Suggestions suggestions; + TCHAR *word; + CHARRANGE pos; + HMENU hMeSubMenu; + HMENU hCorrectSubMenu; + HMENU hReplaceSubMenu; +}; + +struct Dialog +{ + HWND hwnd; + HWND hwnd_owner; + HANDLE hContact; + char name[64]; + Dictionary *lang; + TCHAR lang_name[32]; + WNDPROC old_edit_proc; + WNDPROC owner_old_edit_proc; + BOOL enabled; + BOOL srmm; + + RichEdit *re; + + HWND hwnd_menu_owner; + WNDPROC old_menu_proc; + + BOOL changed; + BOOL markedSomeWord; + int old_text_len; + + // Popup data + HMENU hLanguageSubMenu; + HMENU hWrongWordsSubMenu; + vector *wrong_words; +}; + +HICON IcoLib_LoadIcon(Dictionary *dict, BOOL copy = FALSE); + +BOOL CenterParent(HWND hwnd); +BOOL CreatePath(const TCHAR *path); +TCHAR *lstrtrim(TCHAR *str); +BOOL lstreq(TCHAR *a, TCHAR *b, size_t len = -1); +BOOL IsNumber(TCHAR c); + +#endif // __COMMONS_H__ diff --git a/plugins/SpellChecker/src/dictionary.cpp b/plugins/SpellChecker/src/dictionary.cpp new file mode 100644 index 0000000000..ac24af66ea --- /dev/null +++ b/plugins/SpellChecker/src/dictionary.cpp @@ -0,0 +1,721 @@ +/* +Copyright (C) 2006-2010 Ricardo Pescuma Domenecci + +This is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public +License as published by the Free Software Foundation; either +version 2 of the License, or (at your option) any later version. + +This is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with this file; see the file license.txt. If +not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. +*/ + + +#include "commons.h" + +#include "hunspell/config.h" +#include "hunspell/hunspell.hxx" +#include "hunspell/csutil.hxx" + + +#include "codepages.cpp" + + +DWORD WINAPI LoadThread(LPVOID hd); + +// Additional languages that i could not find in Windows +TCHAR *aditionalLanguages[] = { + _T("tl_PH"), _T("Tagalog (Philippines)"), + _T("de_frami_neu"), _T("German (Germany)") +}; + + + +#define LANGUAGE_NOT_LOADED 1 +#define LANGUAGE_LOADING -1 +#define LANGUAGE_LOADED 0 + + + +class HunspellDictionary : public Dictionary { +protected: + TCHAR fileWithoutExtension[1024]; + TCHAR userPath[1024]; + volatile int loaded; + Hunspell *hunspell; + TCHAR *wordChars; + UINT codePage; + + void loadCustomDict() + { + TCHAR filename[1024]; + mir_sntprintf(filename, MAX_REGS(filename), _T("%s\\%s.cdic"), userPath, language); + + FILE *file = _tfopen(filename, _T("rb")); + if (file != NULL) + { + char tmp[1024]; + char c; + int pos = 0; + while((c = fgetc(file)) != EOF) + { + if (c == '\n' || c == '\r' || pos >= MAX_REGS(tmp) - 1) + { + if (pos > 0) + { + tmp[pos] = '\0'; + hunspell->add(tmp); + } + + pos = 0; + } + else + { + tmp[pos] = c; + pos ++; + } + } + fclose(file); + } + } + + void appendToCustomDict(const TCHAR *word) + { + CreatePath(userPath); + + TCHAR filename[1024]; + mir_sntprintf(filename, MAX_REGS(filename), _T("%s\\%s.cdic"), userPath, language); + + FILE *file = _tfopen(filename, _T("ab")); + if (file != NULL) + { + char tmp[1024]; + toHunspell(tmp, word, MAX_REGS(tmp)); + fprintf(file, "%s\n", tmp); + fclose(file); + } + } + + virtual void addWordInternal(const TCHAR * word) + { + if (loaded != LANGUAGE_LOADED) + return; + + char hunspell_word[1024]; + toHunspell(hunspell_word, word, MAX_REGS(hunspell_word)); + + hunspell->add(hunspell_word); + } + + void toHunspell(char *hunspellWord, const TCHAR *word, size_t hunspellWordLen) + { + + WideCharToMultiByte(codePage, 0, word, -1, hunspellWord, hunspellWordLen, NULL, NULL); + + } + + TCHAR * fromHunspell(const char *hunspellWord) + { + + int len = MultiByteToWideChar(codePage, 0, hunspellWord, -1, NULL, 0); + WCHAR *ret = (WCHAR *) malloc((len + 1) * sizeof(WCHAR)); + MultiByteToWideChar(codePage, 0, hunspellWord, -1, ret, len + 1); + return ret; + + } + + TCHAR * fromHunspellAndFree(char *hunspellWord) + { + if (hunspellWord == NULL) + return NULL; + + TCHAR *ret = fromHunspell(hunspellWord); + free(hunspellWord); + return ret; + } + +public: + HunspellDictionary(TCHAR *aLanguage, TCHAR *aFileWithoutExtension, TCHAR *anUserPath, TCHAR *aSource) + { + lstrcpyn(language, aLanguage, MAX_REGS(language)); + lstrcpyn(fileWithoutExtension, aFileWithoutExtension, MAX_REGS(fileWithoutExtension)); + lstrcpyn(userPath, anUserPath, MAX_REGS(userPath)); + if (aSource == NULL) + source[0] = _T('\0'); + else + lstrcpyn(source, aSource, MAX_REGS(source)); + + loaded = LANGUAGE_NOT_LOADED; + localized_name[0] = _T('\0'); + english_name[0] = _T('\0'); + full_name[0] = _T('\0'); + hunspell = NULL; + wordChars = NULL; + codePage = CP_ACP; + autoReplace = NULL; + } + + virtual ~HunspellDictionary() + { + if (hunspell != NULL) + delete hunspell; + if (wordChars != NULL) + free(wordChars); + } + + TCHAR * merge(TCHAR * s1, TCHAR *s2) + { + int len1 = (s1 == NULL ? 0 : lstrlen(s1)); + int len2 = (s2 == NULL ? 0 : lstrlen(s2)); + + TCHAR *ret; + if (len1 > 0 && len2 > 0) + { + ret = (TCHAR *) malloc(sizeof(TCHAR) * (len1 + len2 + 1)); + lstrcpyn(ret, s1, len1+1); + lstrcpyn(&ret[len1], s2, len2+1); + + FREE(s1); + FREE(s2); + } + else if (len1 > 0) + { + ret = s1; + FREE(s2); + } + else if (len2 > 0) + { + ret = s2; + FREE(s1); + } + else + { + ret = (TCHAR *) malloc(sizeof(TCHAR)); + ret[0] = 0; + + FREE(s1); + FREE(s2); + } + + // Remove duplicated chars + int last = lstrlen(ret) - 1; + for(int i = 0; i <= last; i++) + { + TCHAR c = ret[i]; + for(int j = last; j > i; j--) + { + if (c != ret[j]) + continue; + if (j != last) + ret[j] = ret[last]; + ret[last] = _T('\0'); + last--; + } + } + + return ret; + } + + + void loadThread() + { + char dic[1024]; + char aff[1024]; + + + mir_snprintf(dic, MAX_REGS(dic), "%S.dic", fileWithoutExtension); + mir_snprintf(aff, MAX_REGS(aff), "%S.aff", fileWithoutExtension); + + + hunspell = new Hunspell(aff, dic); + + // Get codepage + const char *dic_enc = hunspell->get_dic_encoding(); + + TCHAR *hwordchars; + if (strcmp(dic_enc, "UTF-8") == 0) + { + codePage = CP_UTF8; + + + int wcs_len; + hwordchars = fromHunspell((char *) hunspell->get_wordchars_utf16(&wcs_len)); + + } + else + { + for (int i = 0; i < MAX_REGS(codepages); i++) + { + if (_strcmpi(codepages[i].name, dic_enc) == 0) + { + if (IsValidCodePage(codepages[i].codepage)) + codePage = codepages[i].codepage; + break; + } + } + + hwordchars = fromHunspell(hunspell->get_wordchars()); + } + + TCHAR *casechars = fromHunspellAndFree(get_casechars(dic_enc)); + TCHAR *try_string = fromHunspellAndFree(hunspell->get_try_string()); + + wordChars = merge(merge(casechars, hwordchars), try_string); + + // Make a suggestion to load hunspell internalls + char ** words = NULL; + int count = hunspell->suggest(&words, "asdf"); + for (int i = 0; i < count; i++) + free(words[i]); + if (words != NULL) + free(words); + + loadCustomDict(); + + loaded = LANGUAGE_LOADED; + } + + // Return TRUE if the word is correct + virtual BOOL spell(const TCHAR *word) + { + load(); + if (loaded != LANGUAGE_LOADED) + return TRUE; + + // TODO Check if it was generated by auto-replacement + + char hunspell_word[1024]; + toHunspell(hunspell_word, word, MAX_REGS(hunspell_word)); + + return hunspell->spell(hunspell_word); + } + + // Return a list of suggestions to a word + virtual Suggestions suggest(const TCHAR * word) + { + Suggestions ret = {0}; + + load(); + if (loaded != LANGUAGE_LOADED) + return ret; + + char hunspell_word[1024]; + toHunspell(hunspell_word, word, MAX_REGS(hunspell_word)); + + char ** words = NULL; + ret.count = hunspell->suggest(&words, hunspell_word); + + if (ret.count > 0) + { + // Oki, lets make our array + ret.words = (TCHAR **) malloc(ret.count * sizeof(TCHAR *)); + for (unsigned i = 0; i < ret.count; i++) + { + ret.words[i] = fromHunspell(words[i]); + free(words[i]); + } + } + + if (words != NULL) + free(words); + + return ret; + } + + // Return a list of auto suggestions to a word + virtual Suggestions autoSuggest(const TCHAR * word) + { + Suggestions ret = {0}; + + load(); + if (loaded != LANGUAGE_LOADED) + return ret; + + char hunspell_word[1024]; + toHunspell(hunspell_word, word, MAX_REGS(hunspell_word)); + + char ** words; + int count = hunspell->suggest_auto(&words, hunspell_word); + + if (count <= 0) + return ret; + + // Oki, lets make our array + ret.count = count; + ret.words = (TCHAR **) malloc(ret.count * sizeof(TCHAR *)); + for (int i = 0; i < count; i++) + { + ret.words[i] = fromHunspell(words[i]); + free(words[i]); + } + free(words); + + return ret; + } + + // Return a list of auto suggestions to a word + // You have to free the list AND each item + virtual TCHAR * autoSuggestOne(const TCHAR * word) + { + load(); + if (loaded != LANGUAGE_LOADED) + return NULL; + + char hunspell_word[1024]; + toHunspell(hunspell_word, word, MAX_REGS(hunspell_word)); + + char ** words; + int count = hunspell->suggest_auto(&words, hunspell_word); + + if (count <= 0) + return NULL; + + TCHAR *ret = fromHunspell(words[0]); + + // Oki, lets make our array + for (int i = 0; i < count; i++) + free(words[i]); + free(words); + + return ret; + } + + // Return TRUE if the char is a word char + virtual BOOL isWordChar(TCHAR c) + { + if (c == 0) + return FALSE; + + load(); + if (loaded != LANGUAGE_LOADED) + return TRUE; + + return _tcschr(wordChars, (_TINT) c) != NULL; + } + + // Assert that all needed data is loaded + virtual void load() + { + if (loaded == LANGUAGE_NOT_LOADED) + { + loaded = LANGUAGE_LOADING; + + DWORD thread_id; + CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE) LoadThread, + (LPVOID) this, 0, &thread_id); + } + } + + virtual BOOL isLoaded() + { + return loaded == LANGUAGE_LOADED; + } + + + // Add a word to the user custom dict + virtual void addWord(const TCHAR * word) + { + addWordInternal(word); + appendToCustomDict(word); + } + + // Add a word to the list of ignored words + virtual void ignoreWord(const TCHAR * word) + { + addWordInternal(word); + } +}; + + +DWORD WINAPI LoadThread(LPVOID hd) +{ + HunspellDictionary *dict = (HunspellDictionary *) hd; + dict->loadThread(); + return 0; +} + + + +// To use with EnumLocalesProc :( +LIST *tmp_dicts; + +// To get the names of the languages +BOOL CALLBACK EnumLocalesProc(LPTSTR lpLocaleString) +{ + TCHAR *stopped = NULL; + USHORT langID = (USHORT) _tcstol(lpLocaleString, &stopped, 16); + + TCHAR ini[32]; + TCHAR end[32]; + GetLocaleInfo(MAKELCID(langID, 0), LOCALE_SISO639LANGNAME, ini, MAX_REGS(ini)); + GetLocaleInfo(MAKELCID(langID, 0), LOCALE_SISO3166CTRYNAME, end, MAX_REGS(end)); + + TCHAR name[64]; + mir_sntprintf(name, MAX_REGS(name), _T("%s_%s"), ini, end); + + for(int i = 0; i < tmp_dicts->getCount(); i++) + { + Dictionary *dict = (*tmp_dicts)[i]; + if (lstrcmpi(dict->language, name) == 0) + { +#define LOCALE_SLOCALIZEDLANGUAGENAME 0x0000006f +#define LOCALE_SNATIVEDISPLAYNAME 0x00000073 + + GetLocaleInfo(MAKELCID(langID, 0), LOCALE_SENGLANGUAGE, dict->english_name, MAX_REGS(dict->english_name)); + + GetLocaleInfo(MAKELCID(langID, 0), LOCALE_SLANGUAGE, dict->localized_name, MAX_REGS(dict->localized_name)); + if (dict->localized_name[0] == 0) + GetLocaleInfo(MAKELCID(langID, 0), LOCALE_SLOCALIZEDLANGUAGENAME, dict->localized_name, MAX_REGS(dict->localized_name)); + if (dict->localized_name[0] == 0) + GetLocaleInfo(MAKELCID(langID, 0), LOCALE_SNATIVEDISPLAYNAME, dict->localized_name, MAX_REGS(dict->localized_name)); + if (dict->localized_name[0] == 0 && dict->english_name[0] != 0) + { + TCHAR country[1024]; + GetLocaleInfo(MAKELCID(langID, 0), LOCALE_SENGCOUNTRY, country, MAX_REGS(country)); + + TCHAR name[1024]; + if (country[0] != 0) + mir_sntprintf(name, MAX_REGS(name), _T("%s (%s)"), dict->english_name, country); + else + lstrcpyn(name, dict->english_name, MAX_REGS(name)); + + lstrcpyn(dict->localized_name, TranslateTS(name), MAX_REGS(dict->localized_name)); + } + + if (dict->localized_name[0] != 0) + { + mir_sntprintf(dict->full_name, MAX_REGS(dict->full_name), _T("%s [%s]"), dict->localized_name, dict->language); + } + break; + } + } + return TRUE; +} + + +void GetDictsInfo(LIST &dicts) +{ + tmp_dicts = &dicts; + EnumSystemLocales(EnumLocalesProc, LCID_SUPPORTED); + + // Try to get name from DB + for(int i = 0; i < dicts.getCount(); i++) + { + Dictionary *dict = dicts[i]; + + if (dict->full_name[0] == _T('\0')) + { + DBVARIANT dbv; + + char lang[128]; + WideCharToMultiByte(CP_ACP, 0, dict->language, -1, lang, sizeof(lang), NULL, NULL); + if (!DBGetContactSettingTString(NULL, MODULE_NAME, lang, &dbv)) + + { + lstrcpyn(dict->localized_name, dbv.ptszVal, MAX_REGS(dict->localized_name)); + DBFreeVariant(&dbv); + } + + if (dict->localized_name[0] == _T('\0')) + { + for(size_t j = 0; j < MAX_REGS(aditionalLanguages); j+=2) + { + if (lstrcmp(aditionalLanguages[j], dict->language) == 0) + { + lstrcpyn(dict->localized_name, aditionalLanguages[j+1], MAX_REGS(dict->localized_name)); + break; + } + } + } + + if (dict->localized_name[0] != _T('\0')) + { + mir_sntprintf(dict->full_name, MAX_REGS(dict->full_name), _T("%s [%s]"), dict->localized_name, dict->language); + } + else + { + lstrcpyn(dict->full_name, dict->language, MAX_REGS(dict->full_name)); + } + } + } +} + + +void GetHunspellDictionariesFromFolder(LIST &dicts, TCHAR *path, TCHAR *user_path, TCHAR *source) +{ + // Load the language files and create an array with then + TCHAR file[1024]; + mir_sntprintf(file, MAX_REGS(file), _T("%s\\*.dic"), path); + + BOOL found = FALSE; + + WIN32_FIND_DATA ffd = {0}; + HANDLE hFFD = FindFirstFile(file, &ffd); + if (hFFD != INVALID_HANDLE_VALUE) + { + do + { + mir_sntprintf(file, MAX_REGS(file), _T("%s\\%s"), path, ffd.cFileName); + + // Check .dic + DWORD attrib = GetFileAttributes(file); + if (attrib == 0xFFFFFFFF || (attrib & FILE_ATTRIBUTE_DIRECTORY)) + continue; + + // See if .aff exists too + lstrcpy(&file[lstrlen(file) - 4], _T(".aff")); + attrib = GetFileAttributes(file); + if (attrib == 0xFFFFFFFF || (attrib & FILE_ATTRIBUTE_DIRECTORY)) + continue; + + ffd.cFileName[lstrlen(ffd.cFileName)-4] = _T('\0'); + + TCHAR *lang = ffd.cFileName; + + // Replace - for _ + int i; + for(i = 0; i < lstrlen(lang); i++) + if (lang[i] == _T('-')) + lang[i] = _T('_'); + + // Check if dict is new + BOOL exists = FALSE; + for(i = 0; i < dicts.getCount() && !exists; i++) + if (lstrcmp(dicts[i]->language, lang) == 0) + exists = TRUE; + + if (!exists) + { + found = TRUE; + file[lstrlen(file) - 4] = _T('\0'); + dicts.insert(new HunspellDictionary(lang, file, user_path, source)); + } + } + while(FindNextFile(hFFD, &ffd)); + + FindClose(hFFD); + } +} + + +// Return a list of avaible languages +void GetAvaibleDictionaries(LIST &dicts, TCHAR *path, TCHAR *user_path) +{ + // Get miranda folder dicts + GetHunspellDictionariesFromFolder(dicts, path, user_path, NULL); + + if (opts.use_other_apps_dicts) + { + TCHAR *otherHunspellApps[] = { _T("Thunderbird"), _T("thunderbird.exe"), + _T("Firefox"), _T("firefox.exe") }; + +#define APPPATH _T("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\%s") +#define MUICACHE _T("Software\\Microsoft\\Windows\\ShellNoRoam\\MUICache") + + // Get other apps dicts + for (int i = 0; i < MAX_REGS(otherHunspellApps); i += 2) + { + TCHAR key[1024]; + mir_sntprintf(key, MAX_REGS(key), APPPATH, otherHunspellApps[i+1]); + + HKEY hKey = 0; + LONG lResult = 0; + if (ERROR_SUCCESS == RegOpenKeyEx(HKEY_LOCAL_MACHINE, key, 0, KEY_QUERY_VALUE, &hKey)) + { + DWORD size = MAX_REGS(key); + lResult = RegQueryValueEx(hKey, _T("Path"), NULL, NULL, (LPBYTE)key, &size); + RegCloseKey(hKey); + } + else + { + // Not found in installed apps - Try MUICache + lResult = RegOpenKeyEx(HKEY_CURRENT_USER, MUICACHE, 0, KEY_QUERY_VALUE, &hKey); + if (ERROR_SUCCESS == lResult) + { + DWORD numValues; + if (ERROR_SUCCESS != RegQueryInfoKey(hKey, NULL, NULL, NULL, NULL, NULL, NULL, &numValues, NULL, NULL, NULL, NULL)) + numValues = 0; + + lResult = ERROR_NO_MORE_ITEMS; + for (DWORD local = 0; local < numValues; local++) + { + DWORD cchValue = MAX_REGS(key); + if (ERROR_SUCCESS != RegEnumValue(hKey, local, key, &cchValue, NULL, NULL, NULL, NULL)) + break; + key[cchValue] = 0; + TCHAR *pos; + if (pos = _tcsrchr(key, _T('\\'))) + { + if (lstrcmpi(&pos[1], otherHunspellApps[i+1]) == 0) + { + pos[0] = 0; + lResult = ERROR_SUCCESS; + break; + } + } + } + RegCloseKey(hKey); + } + } + + if (ERROR_SUCCESS == lResult) + { + TCHAR folder[1024]; + mir_sntprintf(folder, MAX_REGS(folder), _T("%s\\Dictionaries"), key); + + GetHunspellDictionariesFromFolder(languages, folder, user_path, otherHunspellApps[i]); + } + } + } + + GetDictsInfo(dicts); + + // Yeah, yeah, yeah, I know, but this is the easiest way... + SortedList *sl = (SortedList *) &dicts; + + // Sort dicts + for(int i = 0; i < dicts.getCount(); i++) + { + for(int j = i + 1; j < dicts.getCount(); j++) + { + if (lstrcmp(dicts[i]->full_name, dicts[j]->full_name) > 0) + { + Dictionary *dict = dicts[i]; + sl->items[i] = dicts[j]; + sl->items[j] = dict; + } + } + } +} + + +// Free the list returned by GetAvaibleDictionaries +void FreeDictionaries(LIST &dicts) +{ + for (int i = 0; i < dicts.getCount(); i++) + { + delete dicts[i]; + } + dicts.destroy(); +} + + +// Free the list returned by GetAvaibleDictionaries +void FreeSuggestions(Suggestions &suggestions) +{ + for (size_t i = 0; i < suggestions.count; i++) + { + free(suggestions.words[i]); + } + free(suggestions.words); + + suggestions.words = NULL; + suggestions.count = 0; +} diff --git a/plugins/SpellChecker/src/dictionary.h b/plugins/SpellChecker/src/dictionary.h new file mode 100644 index 0000000000..b57aa730bd --- /dev/null +++ b/plugins/SpellChecker/src/dictionary.h @@ -0,0 +1,86 @@ +/* +Copyright (C) 2006-2010 Ricardo Pescuma Domenecci + +This is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public +License as published by the Free Software Foundation; either +version 2 of the License, or (at your option) any later version. + +This is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with this file; see the file license.txt. If +not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. +*/ + + +#ifndef __DICTIONARY_H__ +# define __DICTIONARY_H__ + + +struct Suggestions { + TCHAR ** words; + size_t count; +}; + + +// A Dictionary interface +// All dictionaries use a lazy interface +class Dictionary { +public: + TCHAR language[128]; + TCHAR localized_name[128]; + TCHAR english_name[128]; + TCHAR full_name[256]; + TCHAR source[128]; + AutoReplaceMap *autoReplace; + + virtual ~Dictionary() {} + + // Return TRUE if the word is correct + virtual BOOL spell(const TCHAR *) =0; + + // Return a list of suggestions to a word + virtual Suggestions suggest(const TCHAR * word) =0; + + // Return a list of auto suggestions to a word + virtual Suggestions autoSuggest(const TCHAR * word) =0; + + // Return a auto suggestions to a word + // You have to free the item + virtual TCHAR * autoSuggestOne(const TCHAR * word) =0; + + // Return TRUE if the char is a word char + virtual BOOL isWordChar(TCHAR c) =0; + + // Add a word to the user custom dict + virtual void addWord(const TCHAR * word) =0; + + // Add a word to the list of ignored words + virtual void ignoreWord(const TCHAR * word) =0; + + // Assert that all needed data is loaded + virtual void load() =0; + + // Return TRUE if the dict is fully loaded + virtual BOOL isLoaded() =0; +}; + + + +// Return a list of avaible languages +void GetAvaibleDictionaries(LIST &dicts, TCHAR *path, TCHAR *user_path); + +// Free the list returned by GetAvaibleDictionaries +void FreeDictionaries(LIST &dicts); + +// Free the list returned by GetAvaibleDictionaries +void FreeSuggestions(Suggestions &suggestions); + + + +#endif // __DICTIONARY_H__ diff --git a/plugins/SpellChecker/src/hunspell/README b/plugins/SpellChecker/src/hunspell/README new file mode 100644 index 0000000000..b452096282 --- /dev/null +++ b/plugins/SpellChecker/src/hunspell/README @@ -0,0 +1,21 @@ +Hunspell spell checker and morphological analyser library + +Documentation, tests, examples: http://hunspell.sourceforge.net + +Author of Hunspell: +László Németh (nemethl (at) gyorsposta.hu) + +Hunspell based on OpenOffice.org's Myspell. MySpell's author: +Kevin Hendricks (kevin.hendricks (at) sympatico.ca) + +License: GPL 2.0/LGPL 2.1/MPL 1.1 tri-license + +The contents of this library may be used under the terms of +the GNU General Public License Version 2 or later (the "GPL"), or +the GNU Lesser General Public License Version 2.1 or later (the "LGPL", +see http://gnu.org/copyleft/lesser.html) or the Mozilla Public License +Version 1.1 or later (the "MPL", see http://mozilla.org/MPL/MPL-1.1.html). + +Software distributed under these licenses is distributed on an "AS IS" basis, +WITHOUT WARRANTY OF ANY KIND, either express or implied. See the licences +for the specific language governing rights and limitations under the licenses. diff --git a/plugins/SpellChecker/src/hunspell/affentry.cxx b/plugins/SpellChecker/src/hunspell/affentry.cxx new file mode 100644 index 0000000000..fef0cca5f5 --- /dev/null +++ b/plugins/SpellChecker/src/hunspell/affentry.cxx @@ -0,0 +1,962 @@ +#include "license.hunspell" +#include "license.myspell" + +#include +#include +#include +#include + +#include "affentry.hxx" +#include "csutil.hxx" + +PfxEntry::PfxEntry(AffixMgr* pmgr, affentry* dp) +{ + // register affix manager + pmyMgr = pmgr; + + // set up its initial values + + aflag = dp->aflag; // flag + strip = dp->strip; // string to strip + appnd = dp->appnd; // string to append + stripl = dp->stripl; // length of strip string + appndl = dp->appndl; // length of append string + numconds = dp->numconds; // length of the condition + opts = dp->opts; // cross product flag + // then copy over all of the conditions + if (opts & aeLONGCOND) { + memcpy(c.conds, dp->c.l.conds1, MAXCONDLEN_1); + c.l.conds2 = dp->c.l.conds2; + } else memcpy(c.conds, dp->c.conds, MAXCONDLEN); + next = NULL; + nextne = NULL; + nexteq = NULL; + morphcode = dp->morphcode; + contclass = dp->contclass; + contclasslen = dp->contclasslen; +} + + +PfxEntry::~PfxEntry() +{ + aflag = 0; + if (appnd) free(appnd); + if (strip) free(strip); + pmyMgr = NULL; + appnd = NULL; + strip = NULL; + if (opts & aeLONGCOND) free(c.l.conds2); + if (morphcode && !(opts & aeALIASM)) free(morphcode); + if (contclass && !(opts & aeALIASF)) free(contclass); +} + +// add prefix to this word assuming conditions hold +char * PfxEntry::add(const char * word, int len) +{ + char tword[MAXWORDUTF8LEN + 4]; + + if ((len > stripl || (len == 0 && pmyMgr->get_fullstrip())) && + (len >= numconds) && test_condition(word) && + (!stripl || (strncmp(word, strip, stripl) == 0)) && + ((MAXWORDUTF8LEN + 4) > (len + appndl - stripl))) { + /* we have a match so add prefix */ + char * pp = tword; + if (appndl) { + strcpy(tword,appnd); + pp += appndl; + } + strcpy(pp, (word + stripl)); + return mystrdup(tword); + } + return NULL; +} + +inline char * PfxEntry::nextchar(char * p) { + if (p) { + p++; + if (opts & aeLONGCOND) { + // jump to the 2nd part of the condition + if (p == c.conds + MAXCONDLEN_1) return c.l.conds2; + // end of the MAXCONDLEN length condition + } else if (p == c.conds + MAXCONDLEN) return NULL; + return *p ? p : NULL; + } + return NULL; +} + +inline int PfxEntry::test_condition(const char * st) +{ + const char * pos = NULL; // group with pos input position + bool neg = false; // complementer + bool ingroup = false; // character in the group + if (numconds == 0) return 1; + char * p = c.conds; + while (1) { + switch (*p) { + case '\0': return 1; + case '[': { + neg = false; + ingroup = false; + p = nextchar(p); + pos = st; break; + } + case '^': { p = nextchar(p); neg = true; break; } + case ']': { + if ((neg && ingroup) || (!neg && !ingroup)) return 0; + pos = NULL; + p = nextchar(p); + // skip the next character + if (!ingroup && *st) for (st++; (opts & aeUTF8) && (*st & 0xc0) == 0x80; st++); + if (*st == '\0' && p) return 0; // word <= condition + break; + } + case '.': if (!pos) { // dots are not metacharacters in groups: [.] + p = nextchar(p); + // skip the next character + for (st++; (opts & aeUTF8) && (*st & 0xc0) == 0x80; st++); + if (*st == '\0' && p) return 0; // word <= condition + break; + } + default: { + if (*st == *p) { + st++; + p = nextchar(p); + if ((opts & aeUTF8) && (*(st - 1) & 0x80)) { // multibyte + while (p && (*p & 0xc0) == 0x80) { // character + if (*p != *st) { + if (!pos) return 0; + st = pos; + break; + } + p = nextchar(p); + st++; + } + if (pos && st != pos) { + ingroup = true; + while (p && *p != ']' && (p = nextchar(p))); + } + } else if (pos) { + ingroup = true; + while (p && *p != ']' && (p = nextchar(p))); + } + } else if (pos) { // group + p = nextchar(p); + } else return 0; + } + } + if (!p) return 1; + } +} + +// check if this prefix entry matches +struct hentry * PfxEntry::checkword(const char * word, int len, char in_compound, const FLAG needflag) +{ + int tmpl; // length of tmpword + struct hentry * he; // hash entry of root word or NULL + char tmpword[MAXWORDUTF8LEN + 4]; + + // on entry prefix is 0 length or already matches the beginning of the word. + // So if the remaining root word has positive length + // and if there are enough chars in root word and added back strip chars + // to meet the number of characters conditions, then test it + + tmpl = len - appndl; + + if (tmpl > 0 || (tmpl == 0 && pmyMgr->get_fullstrip())) { + + // generate new root word by removing prefix and adding + // back any characters that would have been stripped + + if (stripl) strcpy (tmpword, strip); + strcpy ((tmpword + stripl), (word + appndl)); + + // now make sure all of the conditions on characters + // are met. Please see the appendix at the end of + // this file for more info on exactly what is being + // tested + + // if all conditions are met then check if resulting + // root word in the dictionary + + if (test_condition(tmpword)) { + tmpl += stripl; + if ((he = pmyMgr->lookup(tmpword)) != NULL) { + do { + if (TESTAFF(he->astr, aflag, he->alen) && + // forbid single prefixes with needaffix flag + ! TESTAFF(contclass, pmyMgr->get_needaffix(), contclasslen) && + // needflag + ((!needflag) || TESTAFF(he->astr, needflag, he->alen) || + (contclass && TESTAFF(contclass, needflag, contclasslen)))) + return he; + he = he->next_homonym; // check homonyms + } while (he); + } + + // prefix matched but no root word was found + // if aeXPRODUCT is allowed, try again but now + // ross checked combined with a suffix + + //if ((opts & aeXPRODUCT) && in_compound) { + if ((opts & aeXPRODUCT)) { + he = pmyMgr->suffix_check(tmpword, tmpl, aeXPRODUCT, this, NULL, + 0, NULL, FLAG_NULL, needflag, in_compound); + if (he) return he; + } + } + } + return NULL; +} + +// check if this prefix entry matches +struct hentry * PfxEntry::check_twosfx(const char * word, int len, + char in_compound, const FLAG needflag) +{ + int tmpl; // length of tmpword + struct hentry * he; // hash entry of root word or NULL + char tmpword[MAXWORDUTF8LEN + 4]; + + // on entry prefix is 0 length or already matches the beginning of the word. + // So if the remaining root word has positive length + // and if there are enough chars in root word and added back strip chars + // to meet the number of characters conditions, then test it + + tmpl = len - appndl; + + if ((tmpl > 0 || (tmpl == 0 && pmyMgr->get_fullstrip())) && + (tmpl + stripl >= numconds)) { + + // generate new root word by removing prefix and adding + // back any characters that would have been stripped + + if (stripl) strcpy (tmpword, strip); + strcpy ((tmpword + stripl), (word + appndl)); + + // now make sure all of the conditions on characters + // are met. Please see the appendix at the end of + // this file for more info on exactly what is being + // tested + + // if all conditions are met then check if resulting + // root word in the dictionary + + if (test_condition(tmpword)) { + tmpl += stripl; + + // prefix matched but no root word was found + // if aeXPRODUCT is allowed, try again but now + // cross checked combined with a suffix + + if ((opts & aeXPRODUCT) && (in_compound != IN_CPD_BEGIN)) { + he = pmyMgr->suffix_check_twosfx(tmpword, tmpl, aeXPRODUCT, this, needflag); + if (he) return he; + } + } + } + return NULL; +} + +// check if this prefix entry matches +char * PfxEntry::check_twosfx_morph(const char * word, int len, + char in_compound, const FLAG needflag) +{ + int tmpl; // length of tmpword + char tmpword[MAXWORDUTF8LEN + 4]; + + // on entry prefix is 0 length or already matches the beginning of the word. + // So if the remaining root word has positive length + // and if there are enough chars in root word and added back strip chars + // to meet the number of characters conditions, then test it + + tmpl = len - appndl; + + if ((tmpl > 0 || (tmpl == 0 && pmyMgr->get_fullstrip())) && + (tmpl + stripl >= numconds)) { + + // generate new root word by removing prefix and adding + // back any characters that would have been stripped + + if (stripl) strcpy (tmpword, strip); + strcpy ((tmpword + stripl), (word + appndl)); + + // now make sure all of the conditions on characters + // are met. Please see the appendix at the end of + // this file for more info on exactly what is being + // tested + + // if all conditions are met then check if resulting + // root word in the dictionary + + if (test_condition(tmpword)) { + tmpl += stripl; + + // prefix matched but no root word was found + // if aeXPRODUCT is allowed, try again but now + // ross checked combined with a suffix + + if ((opts & aeXPRODUCT) && (in_compound != IN_CPD_BEGIN)) { + return pmyMgr->suffix_check_twosfx_morph(tmpword, tmpl, + aeXPRODUCT, this, needflag); + } + } + } + return NULL; +} + +// check if this prefix entry matches +char * PfxEntry::check_morph(const char * word, int len, char in_compound, const FLAG needflag) +{ + int tmpl; // length of tmpword + struct hentry * he; // hash entry of root word or NULL + char tmpword[MAXWORDUTF8LEN + 4]; + char result[MAXLNLEN]; + char * st; + + *result = '\0'; + + // on entry prefix is 0 length or already matches the beginning of the word. + // So if the remaining root word has positive length + // and if there are enough chars in root word and added back strip chars + // to meet the number of characters conditions, then test it + + tmpl = len - appndl; + + if ((tmpl > 0 || (tmpl == 0 && pmyMgr->get_fullstrip())) && + (tmpl + stripl >= numconds)) { + + // generate new root word by removing prefix and adding + // back any characters that would have been stripped + + if (stripl) strcpy (tmpword, strip); + strcpy ((tmpword + stripl), (word + appndl)); + + // now make sure all of the conditions on characters + // are met. Please see the appendix at the end of + // this file for more info on exactly what is being + // tested + + // if all conditions are met then check if resulting + // root word in the dictionary + + if (test_condition(tmpword)) { + tmpl += stripl; + if ((he = pmyMgr->lookup(tmpword)) != NULL) { + do { + if (TESTAFF(he->astr, aflag, he->alen) && + // forbid single prefixes with needaffix flag + ! TESTAFF(contclass, pmyMgr->get_needaffix(), contclasslen) && + // needflag + ((!needflag) || TESTAFF(he->astr, needflag, he->alen) || + (contclass && TESTAFF(contclass, needflag, contclasslen)))) { + if (morphcode) { + mystrcat(result, " ", MAXLNLEN); + mystrcat(result, morphcode, MAXLNLEN); + } else mystrcat(result,getKey(), MAXLNLEN); + if (!HENTRY_FIND(he, MORPH_STEM)) { + mystrcat(result, " ", MAXLNLEN); + mystrcat(result, MORPH_STEM, MAXLNLEN); + mystrcat(result, HENTRY_WORD(he), MAXLNLEN); + } + // store the pointer of the hash entry + if (HENTRY_DATA(he)) { + mystrcat(result, " ", MAXLNLEN); + mystrcat(result, HENTRY_DATA2(he), MAXLNLEN); + } else { + // return with debug information + char * flag = pmyMgr->encode_flag(getFlag()); + mystrcat(result, " ", MAXLNLEN); + mystrcat(result, MORPH_FLAG, MAXLNLEN); + mystrcat(result, flag, MAXLNLEN); + free(flag); + } + mystrcat(result, "\n", MAXLNLEN); + } + he = he->next_homonym; + } while (he); + } + + // prefix matched but no root word was found + // if aeXPRODUCT is allowed, try again but now + // ross checked combined with a suffix + + if ((opts & aeXPRODUCT) && (in_compound != IN_CPD_BEGIN)) { + st = pmyMgr->suffix_check_morph(tmpword, tmpl, aeXPRODUCT, this, + FLAG_NULL, needflag); + if (st) { + mystrcat(result, st, MAXLNLEN); + free(st); + } + } + } + } + + if (*result) return mystrdup(result); + return NULL; +} + +SfxEntry::SfxEntry(AffixMgr * pmgr, affentry* dp) +{ + // register affix manager + pmyMgr = pmgr; + + // set up its initial values + aflag = dp->aflag; // char flag + strip = dp->strip; // string to strip + appnd = dp->appnd; // string to append + stripl = dp->stripl; // length of strip string + appndl = dp->appndl; // length of append string + numconds = dp->numconds; // length of the condition + opts = dp->opts; // cross product flag + + // then copy over all of the conditions + if (opts & aeLONGCOND) { + memcpy(c.l.conds1, dp->c.l.conds1, MAXCONDLEN_1); + c.l.conds2 = dp->c.l.conds2; + } else memcpy(c.conds, dp->c.conds, MAXCONDLEN); + + rappnd = myrevstrdup(appnd); + morphcode = dp->morphcode; + contclass = dp->contclass; + contclasslen = dp->contclasslen; +} + + +SfxEntry::~SfxEntry() +{ + aflag = 0; + if (appnd) free(appnd); + if (rappnd) free(rappnd); + if (strip) free(strip); + pmyMgr = NULL; + appnd = NULL; + strip = NULL; + if (opts & aeLONGCOND) free(c.l.conds2); + if (morphcode && !(opts & aeALIASM)) free(morphcode); + if (contclass && !(opts & aeALIASF)) free(contclass); +} + +// add suffix to this word assuming conditions hold +char * SfxEntry::add(const char * word, int len) +{ + char tword[MAXWORDUTF8LEN + 4]; + + /* make sure all conditions match */ + if ((len > stripl || (len == 0 && pmyMgr->get_fullstrip())) && + (len >= numconds) && test_condition(word + len, word) && + (!stripl || (strcmp(word + len - stripl, strip) == 0)) && + ((MAXWORDUTF8LEN + 4) > (len + appndl - stripl))) { + /* we have a match so add suffix */ + strcpy(tword,word); + if (appndl) { + strcpy(tword + len - stripl, appnd); + } else { + *(tword + len - stripl) = '\0'; + } + return mystrdup(tword); + } + return NULL; +} + +inline char * SfxEntry::nextchar(char * p) { + if (p) { + p++; + if (opts & aeLONGCOND) { + // jump to the 2nd part of the condition + if (p == c.l.conds1 + MAXCONDLEN_1) return c.l.conds2; + // end of the MAXCONDLEN length condition + } else if (p == c.conds + MAXCONDLEN) return NULL; + return *p ? p : NULL; + } + return NULL; +} + +inline int SfxEntry::test_condition(const char * st, const char * beg) +{ + const char * pos = NULL; // group with pos input position + bool neg = false; // complementer + bool ingroup = false; // character in the group + if (numconds == 0) return 1; + char * p = c.conds; + st--; + int i = 1; + while (1) { + switch (*p) { + case '\0': return 1; + case '[': { p = nextchar(p); pos = st; break; } + case '^': { p = nextchar(p); neg = true; break; } + case ']': { if (!neg && !ingroup) return 0; + i++; + // skip the next character + if (!ingroup) { + for (; (opts & aeUTF8) && (st >= beg) && (*st & 0xc0) == 0x80; st--); + st--; + } + pos = NULL; + neg = false; + ingroup = false; + p = nextchar(p); + if (st < beg && p) return 0; // word <= condition + break; + } + case '.': if (!pos) { // dots are not metacharacters in groups: [.] + p = nextchar(p); + // skip the next character + for (st--; (opts & aeUTF8) && (st >= beg) && (*st & 0xc0) == 0x80; st--); + if (st < beg) { // word <= condition + if (p) return 0; else return 1; + } + if ((opts & aeUTF8) && (*st & 0x80)) { // head of the UTF-8 character + st--; + if (st < beg) { // word <= condition + if (p) return 0; else return 1; + } + } + break; + } + default: { + if (*st == *p) { + p = nextchar(p); + if ((opts & aeUTF8) && (*st & 0x80)) { + st--; + while (p && (st >= beg)) { + if (*p != *st) { + if (!pos) return 0; + st = pos; + break; + } + // first byte of the UTF-8 multibyte character + if ((*p & 0xc0) != 0x80) break; + p = nextchar(p); + st--; + } + if (pos && st != pos) { + if (neg) return 0; + else if (i == numconds) return 1; + ingroup = true; + while (p && *p != ']' && (p = nextchar(p))); + st--; + } + if (p && *p != ']') p = nextchar(p); + } else if (pos) { + if (neg) return 0; + else if (i == numconds) return 1; + ingroup = true; + while (p && *p != ']' && (p = nextchar(p))); +// if (p && *p != ']') p = nextchar(p); + st--; + } + if (!pos) { + i++; + st--; + } + if (st < beg && p && *p != ']') return 0; // word <= condition + } else if (pos) { // group + p = nextchar(p); + } else return 0; + } + } + if (!p) return 1; + } +} + +// see if this suffix is present in the word +struct hentry * SfxEntry::checkword(const char * word, int len, int optflags, + PfxEntry* ppfx, char ** wlst, int maxSug, int * ns, const FLAG cclass, const FLAG needflag, + const FLAG badflag) +{ + int tmpl; // length of tmpword + struct hentry * he; // hash entry pointer + unsigned char * cp; + char tmpword[MAXWORDUTF8LEN + 4]; + PfxEntry* ep = ppfx; + + // if this suffix is being cross checked with a prefix + // but it does not support cross products skip it + + if (((optflags & aeXPRODUCT) != 0) && ((opts & aeXPRODUCT) == 0)) + return NULL; + + // upon entry suffix is 0 length or already matches the end of the word. + // So if the remaining root word has positive length + // and if there are enough chars in root word and added back strip chars + // to meet the number of characters conditions, then test it + + tmpl = len - appndl; + // the second condition is not enough for UTF-8 strings + // it checked in test_condition() + + if ((tmpl > 0 || (tmpl == 0 && pmyMgr->get_fullstrip())) && + (tmpl + stripl >= numconds)) { + + // generate new root word by removing suffix and adding + // back any characters that would have been stripped or + // or null terminating the shorter string + + strcpy (tmpword, word); + cp = (unsigned char *)(tmpword + tmpl); + if (stripl) { + strcpy ((char *)cp, strip); + tmpl += stripl; + cp = (unsigned char *)(tmpword + tmpl); + } else *cp = '\0'; + + // now make sure all of the conditions on characters + // are met. Please see the appendix at the end of + // this file for more info on exactly what is being + // tested + + // if all conditions are met then check if resulting + // root word in the dictionary + + if (test_condition((char *) cp, (char *) tmpword)) { + +#ifdef SZOSZABLYA_POSSIBLE_ROOTS + fprintf(stdout,"%s %s %c\n", word, tmpword, aflag); +#endif + if ((he = pmyMgr->lookup(tmpword)) != NULL) { + do { + // check conditional suffix (enabled by prefix) + if ((TESTAFF(he->astr, aflag, he->alen) || (ep && ep->getCont() && + TESTAFF(ep->getCont(), aflag, ep->getContLen()))) && + (((optflags & aeXPRODUCT) == 0) || + (ep && TESTAFF(he->astr, ep->getFlag(), he->alen)) || + // enabled by prefix + ((contclass) && (ep && TESTAFF(contclass, ep->getFlag(), contclasslen))) + ) && + // handle cont. class + ((!cclass) || + ((contclass) && TESTAFF(contclass, cclass, contclasslen)) + ) && + // check only in compound homonyms (bad flags) + (!badflag || !TESTAFF(he->astr, badflag, he->alen) + ) && + // handle required flag + ((!needflag) || + (TESTAFF(he->astr, needflag, he->alen) || + ((contclass) && TESTAFF(contclass, needflag, contclasslen))) + ) + ) return he; + he = he->next_homonym; // check homonyms + } while (he); + + // obsolote stemming code (used only by the + // experimental SuffixMgr:suggest_pos_stems) + // store resulting root in wlst + } else if (wlst && (*ns < maxSug)) { + int cwrd = 1; + for (int k=0; k < *ns; k++) + if (strcmp(tmpword, wlst[k]) == 0) cwrd = 0; + if (cwrd) { + wlst[*ns] = mystrdup(tmpword); + if (wlst[*ns] == NULL) { + for (int j=0; j<*ns; j++) free(wlst[j]); + *ns = -1; + return NULL; + } + (*ns)++; + } + } + } + } + return NULL; +} + +// see if two-level suffix is present in the word +struct hentry * SfxEntry::check_twosfx(const char * word, int len, int optflags, + PfxEntry* ppfx, const FLAG needflag) +{ + int tmpl; // length of tmpword + struct hentry * he; // hash entry pointer + unsigned char * cp; + char tmpword[MAXWORDUTF8LEN + 4]; + PfxEntry* ep = ppfx; + + + // if this suffix is being cross checked with a prefix + // but it does not support cross products skip it + + if ((optflags & aeXPRODUCT) != 0 && (opts & aeXPRODUCT) == 0) + return NULL; + + // upon entry suffix is 0 length or already matches the end of the word. + // So if the remaining root word has positive length + // and if there are enough chars in root word and added back strip chars + // to meet the number of characters conditions, then test it + + tmpl = len - appndl; + + if ((tmpl > 0 || (tmpl == 0 && pmyMgr->get_fullstrip())) && + (tmpl + stripl >= numconds)) { + + // generate new root word by removing suffix and adding + // back any characters that would have been stripped or + // or null terminating the shorter string + + strcpy (tmpword, word); + cp = (unsigned char *)(tmpword + tmpl); + if (stripl) { + strcpy ((char *)cp, strip); + tmpl += stripl; + cp = (unsigned char *)(tmpword + tmpl); + } else *cp = '\0'; + + // now make sure all of the conditions on characters + // are met. Please see the appendix at the end of + // this file for more info on exactly what is being + // tested + + // if all conditions are met then recall suffix_check + + if (test_condition((char *) cp, (char *) tmpword)) { + if (ppfx) { + // handle conditional suffix + if ((contclass) && TESTAFF(contclass, ep->getFlag(), contclasslen)) + he = pmyMgr->suffix_check(tmpword, tmpl, 0, NULL, NULL, 0, NULL, (FLAG) aflag, needflag); + else + he = pmyMgr->suffix_check(tmpword, tmpl, optflags, ppfx, NULL, 0, NULL, (FLAG) aflag, needflag); + } else { + he = pmyMgr->suffix_check(tmpword, tmpl, 0, NULL, NULL, 0, NULL, (FLAG) aflag, needflag); + } + if (he) return he; + } + } + return NULL; +} + +// see if two-level suffix is present in the word +char * SfxEntry::check_twosfx_morph(const char * word, int len, int optflags, + PfxEntry* ppfx, const FLAG needflag) +{ + int tmpl; // length of tmpword + unsigned char * cp; + char tmpword[MAXWORDUTF8LEN + 4]; + PfxEntry* ep = ppfx; + char * st; + + char result[MAXLNLEN]; + + *result = '\0'; + + // if this suffix is being cross checked with a prefix + // but it does not support cross products skip it + + if ((optflags & aeXPRODUCT) != 0 && (opts & aeXPRODUCT) == 0) + return NULL; + + // upon entry suffix is 0 length or already matches the end of the word. + // So if the remaining root word has positive length + // and if there are enough chars in root word and added back strip chars + // to meet the number of characters conditions, then test it + + tmpl = len - appndl; + + if ((tmpl > 0 || (tmpl == 0 && pmyMgr->get_fullstrip())) && + (tmpl + stripl >= numconds)) { + + // generate new root word by removing suffix and adding + // back any characters that would have been stripped or + // or null terminating the shorter string + + strcpy (tmpword, word); + cp = (unsigned char *)(tmpword + tmpl); + if (stripl) { + strcpy ((char *)cp, strip); + tmpl += stripl; + cp = (unsigned char *)(tmpword + tmpl); + } else *cp = '\0'; + + // now make sure all of the conditions on characters + // are met. Please see the appendix at the end of + // this file for more info on exactly what is being + // tested + + // if all conditions are met then recall suffix_check + + if (test_condition((char *) cp, (char *) tmpword)) { + if (ppfx) { + // handle conditional suffix + if ((contclass) && TESTAFF(contclass, ep->getFlag(), contclasslen)) { + st = pmyMgr->suffix_check_morph(tmpword, tmpl, 0, NULL, aflag, needflag); + if (st) { + if (ppfx->getMorph()) { + mystrcat(result, ppfx->getMorph(), MAXLNLEN); + mystrcat(result, " ", MAXLNLEN); + } + mystrcat(result,st, MAXLNLEN); + free(st); + mychomp(result); + } + } else { + st = pmyMgr->suffix_check_morph(tmpword, tmpl, optflags, ppfx, aflag, needflag); + if (st) { + mystrcat(result, st, MAXLNLEN); + free(st); + mychomp(result); + } + } + } else { + st = pmyMgr->suffix_check_morph(tmpword, tmpl, 0, NULL, aflag, needflag); + if (st) { + mystrcat(result, st, MAXLNLEN); + free(st); + mychomp(result); + } + } + if (*result) return mystrdup(result); + } + } + return NULL; +} + +// get next homonym with same affix +struct hentry * SfxEntry::get_next_homonym(struct hentry * he, int optflags, PfxEntry* ppfx, + const FLAG cclass, const FLAG needflag) +{ + PfxEntry* ep = ppfx; + FLAG eFlag = ep ? ep->getFlag() : FLAG_NULL; + + while (he->next_homonym) { + he = he->next_homonym; + if ((TESTAFF(he->astr, aflag, he->alen) || (ep && ep->getCont() && TESTAFF(ep->getCont(), aflag, ep->getContLen()))) && + ((optflags & aeXPRODUCT) == 0 || + TESTAFF(he->astr, eFlag, he->alen) || + // handle conditional suffix + ((contclass) && TESTAFF(contclass, eFlag, contclasslen)) + ) && + // handle cont. class + ((!cclass) || + ((contclass) && TESTAFF(contclass, cclass, contclasslen)) + ) && + // handle required flag + ((!needflag) || + (TESTAFF(he->astr, needflag, he->alen) || + ((contclass) && TESTAFF(contclass, needflag, contclasslen))) + ) + ) return he; + } + return NULL; +} + + +#if 0 + +Appendix: Understanding Affix Code + + +An affix is either a prefix or a suffix attached to root words to make +other words. + +Basically a Prefix or a Suffix is set of AffEntry objects +which store information about the prefix or suffix along +with supporting routines to check if a word has a particular +prefix or suffix or a combination. + +The structure affentry is defined as follows: + +struct affentry +{ + unsigned short aflag; // ID used to represent the affix + char * strip; // string to strip before adding affix + char * appnd; // the affix string to add + unsigned char stripl; // length of the strip string + unsigned char appndl; // length of the affix string + char numconds; // the number of conditions that must be met + char opts; // flag: aeXPRODUCT- combine both prefix and suffix + char conds[SETSIZE]; // array which encodes the conditions to be met +}; + + +Here is a suffix borrowed from the en_US.aff file. This file +is whitespace delimited. + +SFX D Y 4 +SFX D 0 e d +SFX D y ied [^aeiou]y +SFX D 0 ed [^ey] +SFX D 0 ed [aeiou]y + +This information can be interpreted as follows: + +In the first line has 4 fields + +Field +----- +1 SFX - indicates this is a suffix +2 D - is the name of the character flag which represents this suffix +3 Y - indicates it can be combined with prefixes (cross product) +4 4 - indicates that sequence of 4 affentry structures are needed to + properly store the affix information + +The remaining lines describe the unique information for the 4 SfxEntry +objects that make up this affix. Each line can be interpreted +as follows: (note fields 1 and 2 are as a check against line 1 info) + +Field +----- +1 SFX - indicates this is a suffix +2 D - is the name of the character flag for this affix +3 y - the string of chars to strip off before adding affix + (a 0 here indicates the NULL string) +4 ied - the string of affix characters to add +5 [^aeiou]y - the conditions which must be met before the affix + can be applied + +Field 5 is interesting. Since this is a suffix, field 5 tells us that +there are 2 conditions that must be met. The first condition is that +the next to the last character in the word must *NOT* be any of the +following "a", "e", "i", "o" or "u". The second condition is that +the last character of the word must end in "y". + +So how can we encode this information concisely and be able to +test for both conditions in a fast manner? The answer is found +but studying the wonderful ispell code of Geoff Kuenning, et.al. +(now available under a normal BSD license). + +If we set up a conds array of 256 bytes indexed (0 to 255) and access it +using a character (cast to an unsigned char) of a string, we have 8 bits +of information we can store about that character. Specifically we +could use each bit to say if that character is allowed in any of the +last (or first for prefixes) 8 characters of the word. + +Basically, each character at one end of the word (up to the number +of conditions) is used to index into the conds array and the resulting +value found there says whether the that character is valid for a +specific character position in the word. + +For prefixes, it does this by setting bit 0 if that char is valid +in the first position, bit 1 if valid in the second position, and so on. + +If a bit is not set, then that char is not valid for that postion in the +word. + +If working with suffixes bit 0 is used for the character closest +to the front, bit 1 for the next character towards the end, ..., +with bit numconds-1 representing the last char at the end of the string. + +Note: since entries in the conds[] are 8 bits, only 8 conditions +(read that only 8 character positions) can be examined at one +end of a word (the beginning for prefixes and the end for suffixes. + +So to make this clearer, lets encode the conds array values for the +first two affentries for the suffix D described earlier. + + + For the first affentry: + numconds = 1 (only examine the last character) + + conds['e'] = (1 << 0) (the word must end in an E) + all others are all 0 + + For the second affentry: + numconds = 2 (only examine the last two characters) + + conds[X] = conds[X] | (1 << 0) (aeiou are not allowed) + where X is all characters *but* a, e, i, o, or u + + + conds['y'] = (1 << 1) (the last char must be a y) + all other bits for all other entries in the conds array are zero + + +#endif + diff --git a/plugins/SpellChecker/src/hunspell/affentry.hxx b/plugins/SpellChecker/src/hunspell/affentry.hxx new file mode 100644 index 0000000000..eaf361fcce --- /dev/null +++ b/plugins/SpellChecker/src/hunspell/affentry.hxx @@ -0,0 +1,136 @@ +#ifndef _AFFIX_HXX_ +#define _AFFIX_HXX_ + +#include "hunvisapi.h" + +#include "atypes.hxx" +#include "baseaffix.hxx" +#include "affixmgr.hxx" + +/* A Prefix Entry */ + +class LIBHUNSPELL_DLL_EXPORTED PfxEntry : protected AffEntry +{ + AffixMgr* pmyMgr; + + PfxEntry * next; + PfxEntry * nexteq; + PfxEntry * nextne; + PfxEntry * flgnxt; + +public: + + PfxEntry(AffixMgr* pmgr, affentry* dp ); + ~PfxEntry(); + + inline bool allowCross() { return ((opts & aeXPRODUCT) != 0); } + struct hentry * checkword(const char * word, int len, char in_compound, + const FLAG needflag = FLAG_NULL); + + struct hentry * check_twosfx(const char * word, int len, char in_compound, const FLAG needflag = NULL); + + char * check_morph(const char * word, int len, char in_compound, + const FLAG needflag = FLAG_NULL); + + char * check_twosfx_morph(const char * word, int len, + char in_compound, const FLAG needflag = FLAG_NULL); + + inline FLAG getFlag() { return aflag; } + inline const char * getKey() { return appnd; } + char * add(const char * word, int len); + + inline short getKeyLen() { return appndl; } + + inline const char * getMorph() { return morphcode; } + + inline const unsigned short * getCont() { return contclass; } + inline short getContLen() { return contclasslen; } + + inline PfxEntry * getNext() { return next; } + inline PfxEntry * getNextNE() { return nextne; } + inline PfxEntry * getNextEQ() { return nexteq; } + inline PfxEntry * getFlgNxt() { return flgnxt; } + + inline void setNext(PfxEntry * ptr) { next = ptr; } + inline void setNextNE(PfxEntry * ptr) { nextne = ptr; } + inline void setNextEQ(PfxEntry * ptr) { nexteq = ptr; } + inline void setFlgNxt(PfxEntry * ptr) { flgnxt = ptr; } + + inline char * nextchar(char * p); + inline int test_condition(const char * st); +}; + + + + +/* A Suffix Entry */ + +class LIBHUNSPELL_DLL_EXPORTED SfxEntry : protected AffEntry +{ + AffixMgr* pmyMgr; + char * rappnd; + + SfxEntry * next; + SfxEntry * nexteq; + SfxEntry * nextne; + SfxEntry * flgnxt; + + SfxEntry * l_morph; + SfxEntry * r_morph; + SfxEntry * eq_morph; + +public: + + SfxEntry(AffixMgr* pmgr, affentry* dp ); + ~SfxEntry(); + + inline bool allowCross() { return ((opts & aeXPRODUCT) != 0); } + struct hentry * checkword(const char * word, int len, int optflags, + PfxEntry* ppfx, char ** wlst, int maxSug, int * ns, +// const FLAG cclass = FLAG_NULL, const FLAG needflag = FLAG_NULL, char in_compound=IN_CPD_NOT); + const FLAG cclass = FLAG_NULL, const FLAG needflag = FLAG_NULL, const FLAG badflag = 0); + + struct hentry * check_twosfx(const char * word, int len, int optflags, PfxEntry* ppfx, const FLAG needflag = NULL); + + char * check_twosfx_morph(const char * word, int len, int optflags, + PfxEntry* ppfx, const FLAG needflag = FLAG_NULL); + struct hentry * get_next_homonym(struct hentry * he); + struct hentry * get_next_homonym(struct hentry * word, int optflags, PfxEntry* ppfx, + const FLAG cclass, const FLAG needflag); + + + inline FLAG getFlag() { return aflag; } + inline const char * getKey() { return rappnd; } + char * add(const char * word, int len); + + + inline const char * getMorph() { return morphcode; } + + inline const unsigned short * getCont() { return contclass; } + inline short getContLen() { return contclasslen; } + inline const char * getAffix() { return appnd; } + + inline short getKeyLen() { return appndl; } + + inline SfxEntry * getNext() { return next; } + inline SfxEntry * getNextNE() { return nextne; } + inline SfxEntry * getNextEQ() { return nexteq; } + + inline SfxEntry * getLM() { return l_morph; } + inline SfxEntry * getRM() { return r_morph; } + inline SfxEntry * getEQM() { return eq_morph; } + inline SfxEntry * getFlgNxt() { return flgnxt; } + + inline void setNext(SfxEntry * ptr) { next = ptr; } + inline void setNextNE(SfxEntry * ptr) { nextne = ptr; } + inline void setNextEQ(SfxEntry * ptr) { nexteq = ptr; } + inline void setFlgNxt(SfxEntry * ptr) { flgnxt = ptr; } + + inline char * nextchar(char * p); + inline int test_condition(const char * st, const char * begin); + +}; + +#endif + + diff --git a/plugins/SpellChecker/src/hunspell/affixmgr.cxx b/plugins/SpellChecker/src/hunspell/affixmgr.cxx new file mode 100644 index 0000000000..ae72f70270 --- /dev/null +++ b/plugins/SpellChecker/src/hunspell/affixmgr.cxx @@ -0,0 +1,4521 @@ +#include "license.hunspell" +#include "license.myspell" + +#include +#include +#include +#include + +#include + +#include "affixmgr.hxx" +#include "affentry.hxx" +#include "langnum.hxx" + +#include "csutil.hxx" + +AffixMgr::AffixMgr(const char * affpath, HashMgr** ptr, int * md, const char * key) +{ + // register hash manager and load affix data from aff file + pHMgr = ptr[0]; + alldic = ptr; + maxdic = md; + keystring = NULL; + trystring = NULL; + encoding=NULL; + csconv=NULL; + utf8 = 0; + complexprefixes = 0; + maptable = NULL; + nummap = 0; + breaktable = NULL; + numbreak = -1; + reptable = NULL; + numrep = 0; + iconvtable = NULL; + oconvtable = NULL; + checkcpdtable = NULL; + // allow simplified compound forms (see 3rd field of CHECKCOMPOUNDPATTERN) + simplifiedcpd = 0; + numcheckcpd = 0; + defcpdtable = NULL; + numdefcpd = 0; + phone = NULL; + compoundflag = FLAG_NULL; // permits word in compound forms + compoundbegin = FLAG_NULL; // may be first word in compound forms + compoundmiddle = FLAG_NULL; // may be middle word in compound forms + compoundend = FLAG_NULL; // may be last word in compound forms + compoundroot = FLAG_NULL; // compound word signing flag + compoundpermitflag = FLAG_NULL; // compound permitting flag for suffixed word + compoundforbidflag = FLAG_NULL; // compound fordidden flag for suffixed word + checkcompounddup = 0; // forbid double words in compounds + checkcompoundrep = 0; // forbid bad compounds (may be non compound word with a REP substitution) + checkcompoundcase = 0; // forbid upper and lowercase combinations at word bounds + checkcompoundtriple = 0; // forbid compounds with triple letters + simplifiedtriple = 0; // allow simplified triple letters in compounds (Schiff+fahrt -> Schiffahrt) + forbiddenword = FORBIDDENWORD; // forbidden word signing flag + nosuggest = FLAG_NULL; // don't suggest words signed with NOSUGGEST flag + nongramsuggest = FLAG_NULL; + lang = NULL; // language + langnum = 0; // language code (see http://l10n.openoffice.org/languages.html) + needaffix = FLAG_NULL; // forbidden root, allowed only with suffixes + cpdwordmax = -1; // default: unlimited wordcount in compound words + cpdmin = -1; // undefined + cpdmaxsyllable = 0; // default: unlimited syllablecount in compound words + cpdvowels=NULL; // vowels (for calculating of Hungarian compounding limit, O(n) search! XXX) + cpdvowels_utf16=NULL; // vowels for UTF-8 encoding (bsearch instead of O(n) search) + cpdvowels_utf16_len=0; // vowels + pfxappnd=NULL; // previous prefix for counting the syllables of prefix BUG + sfxappnd=NULL; // previous suffix for counting a special syllables BUG + cpdsyllablenum=NULL; // syllable count incrementing flag + checknum=0; // checking numbers, and word with numbers + wordchars=NULL; // letters + spec. word characters + wordchars_utf16=NULL; // letters + spec. word characters + wordchars_utf16_len=0; // letters + spec. word characters + ignorechars=NULL; // letters + spec. word characters + ignorechars_utf16=NULL; // letters + spec. word characters + ignorechars_utf16_len=0; // letters + spec. word characters + version=NULL; // affix and dictionary file version string + havecontclass=0; // flags of possible continuing classes (double affix) + // LEMMA_PRESENT: not put root into the morphological output. Lemma presents + // in morhological description in dictionary file. It's often combined with PSEUDOROOT. + lemma_present = FLAG_NULL; + circumfix = FLAG_NULL; + onlyincompound = FLAG_NULL; + maxngramsugs = -1; // undefined + maxdiff = -1; // undefined + onlymaxdiff = 0; + maxcpdsugs = -1; // undefined + nosplitsugs = 0; + sugswithdots = 0; + keepcase = 0; + forceucase = 0; + warn = 0; + forbidwarn = 0; + checksharps = 0; + substandard = FLAG_NULL; + fullstrip = 0; + + sfx = NULL; + pfx = NULL; + + for (int i=0; i < SETSIZE; i++) { + pStart[i] = NULL; + sStart[i] = NULL; + pFlag[i] = NULL; + sFlag[i] = NULL; + } + + for (int j=0; j < CONTSIZE; j++) { + contclasses[j] = 0; + } + + if (parse_file(affpath, key)) { + HUNSPELL_WARNING(stderr, "Failure loading aff file %s\n",affpath); + } + + if (cpdmin == -1) cpdmin = MINCPDLEN; + +} + + +AffixMgr::~AffixMgr() +{ + // pass through linked prefix entries and clean up + for (int i=0; i < SETSIZE ;i++) { + pFlag[i] = NULL; + PfxEntry * ptr = pStart[i]; + PfxEntry * nptr = NULL; + while (ptr) { + nptr = ptr->getNext(); + delete(ptr); + ptr = nptr; + nptr = NULL; + } + } + + // pass through linked suffix entries and clean up + for (int j=0; j < SETSIZE ; j++) { + sFlag[j] = NULL; + SfxEntry * ptr = sStart[j]; + SfxEntry * nptr = NULL; + while (ptr) { + nptr = ptr->getNext(); + delete(ptr); + ptr = nptr; + nptr = NULL; + } + sStart[j] = NULL; + } + + if (keystring) free(keystring); + keystring=NULL; + if (trystring) free(trystring); + trystring=NULL; + if (encoding) free(encoding); + encoding=NULL; + if (maptable) { + for (int j=0; j < nummap; j++) { + for (int k=0; k < maptable[j].len; k++) { + if (maptable[j].set[k]) free(maptable[j].set[k]); + } + free(maptable[j].set); + maptable[j].set = NULL; + maptable[j].len = 0; + } + free(maptable); + maptable = NULL; + } + nummap = 0; + if (breaktable) { + for (int j=0; j < numbreak; j++) { + if (breaktable[j]) free(breaktable[j]); + breaktable[j] = NULL; + } + free(breaktable); + breaktable = NULL; + } + numbreak = 0; + if (reptable) { + for (int j=0; j < numrep; j++) { + free(reptable[j].pattern); + free(reptable[j].pattern2); + } + free(reptable); + reptable = NULL; + } + if (iconvtable) delete iconvtable; + if (oconvtable) delete oconvtable; + if (phone && phone->rules) { + for (int j=0; j < phone->num + 1; j++) { + free(phone->rules[j * 2]); + free(phone->rules[j * 2 + 1]); + } + free(phone->rules); + free(phone); + phone = NULL; + } + + if (defcpdtable) { + for (int j=0; j < numdefcpd; j++) { + free(defcpdtable[j].def); + defcpdtable[j].def = NULL; + } + free(defcpdtable); + defcpdtable = NULL; + } + numrep = 0; + if (checkcpdtable) { + for (int j=0; j < numcheckcpd; j++) { + free(checkcpdtable[j].pattern); + free(checkcpdtable[j].pattern2); + free(checkcpdtable[j].pattern3); + checkcpdtable[j].pattern = NULL; + checkcpdtable[j].pattern2 = NULL; + checkcpdtable[j].pattern3 = NULL; + } + free(checkcpdtable); + checkcpdtable = NULL; + } + numcheckcpd = 0; + FREE_FLAG(compoundflag); + FREE_FLAG(compoundbegin); + FREE_FLAG(compoundmiddle); + FREE_FLAG(compoundend); + FREE_FLAG(compoundpermitflag); + FREE_FLAG(compoundforbidflag); + FREE_FLAG(compoundroot); + FREE_FLAG(forbiddenword); + FREE_FLAG(nosuggest); + FREE_FLAG(nongramsuggest); + FREE_FLAG(needaffix); + FREE_FLAG(lemma_present); + FREE_FLAG(circumfix); + FREE_FLAG(onlyincompound); + + cpdwordmax = 0; + pHMgr = NULL; + cpdmin = 0; + cpdmaxsyllable = 0; + if (cpdvowels) free(cpdvowels); + if (cpdvowels_utf16) free(cpdvowels_utf16); + if (cpdsyllablenum) free(cpdsyllablenum); + free_utf_tbl(); + if (lang) free(lang); + if (wordchars) free(wordchars); + if (wordchars_utf16) free(wordchars_utf16); + if (ignorechars) free(ignorechars); + if (ignorechars_utf16) free(ignorechars_utf16); + if (version) free(version); + checknum=0; +#ifdef MOZILLA_CLIENT + delete [] csconv; +#endif +} + + +// read in aff file and build up prefix and suffix entry objects +int AffixMgr::parse_file(const char * affpath, const char * key) +{ + char * line; // io buffers + char ft; // affix type + + // checking flag duplication + char dupflags[CONTSIZE]; + char dupflags_ini = 1; + + // first line indicator for removing byte order mark + int firstline = 1; + + // open the affix file + FileMgr * afflst = new FileMgr(affpath, key); + if (!afflst) { + HUNSPELL_WARNING(stderr, "error: could not open affix description file %s\n",affpath); + return 1; + } + + // step one is to parse the affix file building up the internal + // affix data structures + + // read in each line ignoring any that do not + // start with a known line type indicator + while ((line = afflst->getline())) { + mychomp(line); + + /* remove byte order mark */ + if (firstline) { + firstline = 0; + // Affix file begins with byte order mark: possible incompatibility with old Hunspell versions + if (strncmp(line,"\xEF\xBB\xBF",3) == 0) { + memmove(line, line+3, strlen(line+3)+1); + } + } + + /* parse in the keyboard string */ + if (strncmp(line,"KEY",3) == 0) { + if (parse_string(line, &keystring, afflst->getlinenum())) { + delete afflst; + return 1; + } + } + + /* parse in the try string */ + if (strncmp(line,"TRY",3) == 0) { + if (parse_string(line, &trystring, afflst->getlinenum())) { + delete afflst; + return 1; + } + } + + /* parse in the name of the character set used by the .dict and .aff */ + if (strncmp(line,"SET",3) == 0) { + if (parse_string(line, &encoding, afflst->getlinenum())) { + delete afflst; + return 1; + } + if (strcmp(encoding, "UTF-8") == 0) { + utf8 = 1; +#ifndef OPENOFFICEORG +#ifndef MOZILLA_CLIENT + if (initialize_utf_tbl()) return 1; +#endif +#endif + } + } + + /* parse COMPLEXPREFIXES for agglutinative languages with right-to-left writing system */ + if (strncmp(line,"COMPLEXPREFIXES",15) == 0) + complexprefixes = 1; + + /* parse in the flag used by the controlled compound words */ + if (strncmp(line,"COMPOUNDFLAG",12) == 0) { + if (parse_flag(line, &compoundflag, afflst)) { + delete afflst; + return 1; + } + } + + /* parse in the flag used by compound words */ + if (strncmp(line,"COMPOUNDBEGIN",13) == 0) { + if (complexprefixes) { + if (parse_flag(line, &compoundend, afflst)) { + delete afflst; + return 1; + } + } else { + if (parse_flag(line, &compoundbegin, afflst)) { + delete afflst; + return 1; + } + } + } + + /* parse in the flag used by compound words */ + if (strncmp(line,"COMPOUNDMIDDLE",14) == 0) { + if (parse_flag(line, &compoundmiddle, afflst)) { + delete afflst; + return 1; + } + } + /* parse in the flag used by compound words */ + if (strncmp(line,"COMPOUNDEND",11) == 0) { + if (complexprefixes) { + if (parse_flag(line, &compoundbegin, afflst)) { + delete afflst; + return 1; + } + } else { + if (parse_flag(line, &compoundend, afflst)) { + delete afflst; + return 1; + } + } + } + + /* parse in the data used by compound_check() method */ + if (strncmp(line,"COMPOUNDWORDMAX",15) == 0) { + if (parse_num(line, &cpdwordmax, afflst)) { + delete afflst; + return 1; + } + } + + /* parse in the flag sign compounds in dictionary */ + if (strncmp(line,"COMPOUNDROOT",12) == 0) { + if (parse_flag(line, &compoundroot, afflst)) { + delete afflst; + return 1; + } + } + + /* parse in the flag used by compound_check() method */ + if (strncmp(line,"COMPOUNDPERMITFLAG",18) == 0) { + if (parse_flag(line, &compoundpermitflag, afflst)) { + delete afflst; + return 1; + } + } + + /* parse in the flag used by compound_check() method */ + if (strncmp(line,"COMPOUNDFORBIDFLAG",18) == 0) { + if (parse_flag(line, &compoundforbidflag, afflst)) { + delete afflst; + return 1; + } + } + + if (strncmp(line,"CHECKCOMPOUNDDUP",16) == 0) { + checkcompounddup = 1; + } + + if (strncmp(line,"CHECKCOMPOUNDREP",16) == 0) { + checkcompoundrep = 1; + } + + if (strncmp(line,"CHECKCOMPOUNDTRIPLE",19) == 0) { + checkcompoundtriple = 1; + } + + if (strncmp(line,"SIMPLIFIEDTRIPLE",16) == 0) { + simplifiedtriple = 1; + } + + if (strncmp(line,"CHECKCOMPOUNDCASE",17) == 0) { + checkcompoundcase = 1; + } + + if (strncmp(line,"NOSUGGEST",9) == 0) { + if (parse_flag(line, &nosuggest, afflst)) { + delete afflst; + return 1; + } + } + + if (strncmp(line,"NONGRAMSUGGEST",14) == 0) { + if (parse_flag(line, &nongramsuggest, afflst)) { + delete afflst; + return 1; + } + } + + /* parse in the flag used by forbidden words */ + if (strncmp(line,"FORBIDDENWORD",13) == 0) { + if (parse_flag(line, &forbiddenword, afflst)) { + delete afflst; + return 1; + } + } + + /* parse in the flag used by forbidden words */ + if (strncmp(line,"LEMMA_PRESENT",13) == 0) { + if (parse_flag(line, &lemma_present, afflst)) { + delete afflst; + return 1; + } + } + + /* parse in the flag used by circumfixes */ + if (strncmp(line,"CIRCUMFIX",9) == 0) { + if (parse_flag(line, &circumfix, afflst)) { + delete afflst; + return 1; + } + } + + /* parse in the flag used by fogemorphemes */ + if (strncmp(line,"ONLYINCOMPOUND",14) == 0) { + if (parse_flag(line, &onlyincompound, afflst)) { + delete afflst; + return 1; + } + } + + /* parse in the flag used by `needaffixs' */ + if (strncmp(line,"PSEUDOROOT",10) == 0) { + if (parse_flag(line, &needaffix, afflst)) { + delete afflst; + return 1; + } + } + + /* parse in the flag used by `needaffixs' */ + if (strncmp(line,"NEEDAFFIX",9) == 0) { + if (parse_flag(line, &needaffix, afflst)) { + delete afflst; + return 1; + } + } + + /* parse in the minimal length for words in compounds */ + if (strncmp(line,"COMPOUNDMIN",11) == 0) { + if (parse_num(line, &cpdmin, afflst)) { + delete afflst; + return 1; + } + if (cpdmin < 1) cpdmin = 1; + } + + /* parse in the max. words and syllables in compounds */ + if (strncmp(line,"COMPOUNDSYLLABLE",16) == 0) { + if (parse_cpdsyllable(line, afflst)) { + delete afflst; + return 1; + } + } + + /* parse in the flag used by compound_check() method */ + if (strncmp(line,"SYLLABLENUM",11) == 0) { + if (parse_string(line, &cpdsyllablenum, afflst->getlinenum())) { + delete afflst; + return 1; + } + } + + /* parse in the flag used by the controlled compound words */ + if (strncmp(line,"CHECKNUM",8) == 0) { + checknum=1; + } + + /* parse in the extra word characters */ + if (strncmp(line,"WORDCHARS",9) == 0) { + if (parse_array(line, &wordchars, &wordchars_utf16, &wordchars_utf16_len, utf8, afflst->getlinenum())) { + delete afflst; + return 1; + } + } + + /* parse in the ignored characters (for example, Arabic optional diacretics charachters */ + if (strncmp(line,"IGNORE",6) == 0) { + if (parse_array(line, &ignorechars, &ignorechars_utf16, &ignorechars_utf16_len, utf8, afflst->getlinenum())) { + delete afflst; + return 1; + } + } + + /* parse in the typical fault correcting table */ + if (strncmp(line,"REP",3) == 0) { + if (parse_reptable(line, afflst)) { + delete afflst; + return 1; + } + } + + /* parse in the input conversion table */ + if (strncmp(line,"ICONV",5) == 0) { + if (parse_convtable(line, afflst, &iconvtable, "ICONV")) { + delete afflst; + return 1; + } + } + + /* parse in the input conversion table */ + if (strncmp(line,"OCONV",5) == 0) { + if (parse_convtable(line, afflst, &oconvtable, "OCONV")) { + delete afflst; + return 1; + } + } + + /* parse in the phonetic translation table */ + if (strncmp(line,"PHONE",5) == 0) { + if (parse_phonetable(line, afflst)) { + delete afflst; + return 1; + } + } + + /* parse in the checkcompoundpattern table */ + if (strncmp(line,"CHECKCOMPOUNDPATTERN",20) == 0) { + if (parse_checkcpdtable(line, afflst)) { + delete afflst; + return 1; + } + } + + /* parse in the defcompound table */ + if (strncmp(line,"COMPOUNDRULE",12) == 0) { + if (parse_defcpdtable(line, afflst)) { + delete afflst; + return 1; + } + } + + /* parse in the related character map table */ + if (strncmp(line,"MAP",3) == 0) { + if (parse_maptable(line, afflst)) { + delete afflst; + return 1; + } + } + + /* parse in the word breakpoints table */ + if (strncmp(line,"BREAK",5) == 0) { + if (parse_breaktable(line, afflst)) { + delete afflst; + return 1; + } + } + + /* parse in the language for language specific codes */ + if (strncmp(line,"LANG",4) == 0) { + if (parse_string(line, &lang, afflst->getlinenum())) { + delete afflst; + return 1; + } + langnum = get_lang_num(lang); + } + + if (strncmp(line,"VERSION",7) == 0) { + for(line = line + 7; *line == ' ' || *line == '\t'; line++); + version = mystrdup(line); + } + + if (strncmp(line,"MAXNGRAMSUGS",12) == 0) { + if (parse_num(line, &maxngramsugs, afflst)) { + delete afflst; + return 1; + } + } + + if (strncmp(line,"ONLYMAXDIFF", 11) == 0) + onlymaxdiff = 1; + + if (strncmp(line,"MAXDIFF",7) == 0) { + if (parse_num(line, &maxdiff, afflst)) { + delete afflst; + return 1; + } + } + + if (strncmp(line,"MAXCPDSUGS",10) == 0) { + if (parse_num(line, &maxcpdsugs, afflst)) { + delete afflst; + return 1; + } + } + + if (strncmp(line,"NOSPLITSUGS",11) == 0) { + nosplitsugs=1; + } + + if (strncmp(line,"FULLSTRIP",9) == 0) { + fullstrip=1; + } + + if (strncmp(line,"SUGSWITHDOTS",12) == 0) { + sugswithdots=1; + } + + /* parse in the flag used by forbidden words */ + if (strncmp(line,"KEEPCASE",8) == 0) { + if (parse_flag(line, &keepcase, afflst)) { + delete afflst; + return 1; + } + } + + /* parse in the flag used by `forceucase' */ + if (strncmp(line,"FORCEUCASE",10) == 0) { + if (parse_flag(line, &forceucase, afflst)) { + delete afflst; + return 1; + } + } + + /* parse in the flag used by `warn' */ + if (strncmp(line,"WARN",4) == 0) { + if (parse_flag(line, &warn, afflst)) { + delete afflst; + return 1; + } + } + + if (strncmp(line,"FORBIDWARN",10) == 0) { + forbidwarn=1; + } + + /* parse in the flag used by the affix generator */ + if (strncmp(line,"SUBSTANDARD",11) == 0) { + if (parse_flag(line, &substandard, afflst)) { + delete afflst; + return 1; + } + } + + if (strncmp(line,"CHECKSHARPS",11) == 0) { + checksharps=1; + } + + /* parse this affix: P - prefix, S - suffix */ + ft = ' '; + if (strncmp(line,"PFX",3) == 0) ft = complexprefixes ? 'S' : 'P'; + if (strncmp(line,"SFX",3) == 0) ft = complexprefixes ? 'P' : 'S'; + if (ft != ' ') { + if (dupflags_ini) { + memset(dupflags, 0, sizeof(dupflags)); + dupflags_ini = 0; + } + if (parse_affix(line, ft, afflst, dupflags)) { + delete afflst; + process_pfx_tree_to_list(); + process_sfx_tree_to_list(); + return 1; + } + } + + } + delete afflst; + + // convert affix trees to sorted list + process_pfx_tree_to_list(); + process_sfx_tree_to_list(); + + // now we can speed up performance greatly taking advantage of the + // relationship between the affixes and the idea of "subsets". + + // View each prefix as a potential leading subset of another and view + // each suffix (reversed) as a potential trailing subset of another. + + // To illustrate this relationship if we know the prefix "ab" is found in the + // word to examine, only prefixes that "ab" is a leading subset of need be examined. + // Furthermore is "ab" is not present then none of the prefixes that "ab" is + // is a subset need be examined. + // The same argument goes for suffix string that are reversed. + + // Then to top this off why not examine the first char of the word to quickly + // limit the set of prefixes to examine (i.e. the prefixes to examine must + // be leading supersets of the first character of the word (if they exist) + + // To take advantage of this "subset" relationship, we need to add two links + // from entry. One to take next if the current prefix is found (call it nexteq) + // and one to take next if the current prefix is not found (call it nextne). + + // Since we have built ordered lists, all that remains is to properly initialize + // the nextne and nexteq pointers that relate them + + process_pfx_order(); + process_sfx_order(); + + /* get encoding for CHECKCOMPOUNDCASE */ + if (!utf8) { + char * enc = get_encoding(); + csconv = get_current_cs(enc); + free(enc); + enc = NULL; + + char expw[MAXLNLEN]; + if (wordchars) { + strcpy(expw, wordchars); + free(wordchars); + } else *expw = '\0'; + + for (int i = 0; i <= 255; i++) { + if ( (csconv[i].cupper != csconv[i].clower) && + (! strchr(expw, (char) i))) { + *(expw + strlen(expw) + 1) = '\0'; + *(expw + strlen(expw)) = (char) i; + } + } + + wordchars = mystrdup(expw); + } + + // default BREAK definition + if (numbreak == -1) { + breaktable = (char **) malloc(sizeof(char *) * 3); + if (!breaktable) return 1; + breaktable[0] = mystrdup("-"); + breaktable[1] = mystrdup("^-"); + breaktable[2] = mystrdup("-$"); + if (breaktable[0] && breaktable[1] && breaktable[2]) numbreak = 3; + } + return 0; +} + + +// we want to be able to quickly access prefix information +// both by prefix flag, and sorted by prefix string itself +// so we need to set up two indexes + +int AffixMgr::build_pfxtree(PfxEntry* pfxptr) +{ + PfxEntry * ptr; + PfxEntry * pptr; + PfxEntry * ep = pfxptr; + + // get the right starting points + const char * key = ep->getKey(); + const unsigned char flg = (unsigned char) (ep->getFlag() & 0x00FF); + + // first index by flag which must exist + ptr = pFlag[flg]; + ep->setFlgNxt(ptr); + pFlag[flg] = ep; + + + // handle the special case of null affix string + if (strlen(key) == 0) { + // always inset them at head of list at element 0 + ptr = pStart[0]; + ep->setNext(ptr); + pStart[0] = ep; + return 0; + } + + // now handle the normal case + ep->setNextEQ(NULL); + ep->setNextNE(NULL); + + unsigned char sp = *((const unsigned char *)key); + ptr = pStart[sp]; + + // handle the first insert + if (!ptr) { + pStart[sp] = ep; + return 0; + } + + + // otherwise use binary tree insertion so that a sorted + // list can easily be generated later + pptr = NULL; + for (;;) { + pptr = ptr; + if (strcmp(ep->getKey(), ptr->getKey()) <= 0) { + ptr = ptr->getNextEQ(); + if (!ptr) { + pptr->setNextEQ(ep); + break; + } + } else { + ptr = ptr->getNextNE(); + if (!ptr) { + pptr->setNextNE(ep); + break; + } + } + } + return 0; +} + +// we want to be able to quickly access suffix information +// both by suffix flag, and sorted by the reverse of the +// suffix string itself; so we need to set up two indexes +int AffixMgr::build_sfxtree(SfxEntry* sfxptr) +{ + SfxEntry * ptr; + SfxEntry * pptr; + SfxEntry * ep = sfxptr; + + /* get the right starting point */ + const char * key = ep->getKey(); + const unsigned char flg = (unsigned char) (ep->getFlag() & 0x00FF); + + // first index by flag which must exist + ptr = sFlag[flg]; + ep->setFlgNxt(ptr); + sFlag[flg] = ep; + + // next index by affix string + + // handle the special case of null affix string + if (strlen(key) == 0) { + // always inset them at head of list at element 0 + ptr = sStart[0]; + ep->setNext(ptr); + sStart[0] = ep; + return 0; + } + + // now handle the normal case + ep->setNextEQ(NULL); + ep->setNextNE(NULL); + + unsigned char sp = *((const unsigned char *)key); + ptr = sStart[sp]; + + // handle the first insert + if (!ptr) { + sStart[sp] = ep; + return 0; + } + + // otherwise use binary tree insertion so that a sorted + // list can easily be generated later + pptr = NULL; + for (;;) { + pptr = ptr; + if (strcmp(ep->getKey(), ptr->getKey()) <= 0) { + ptr = ptr->getNextEQ(); + if (!ptr) { + pptr->setNextEQ(ep); + break; + } + } else { + ptr = ptr->getNextNE(); + if (!ptr) { + pptr->setNextNE(ep); + break; + } + } + } + return 0; +} + +// convert from binary tree to sorted list +int AffixMgr::process_pfx_tree_to_list() +{ + for (int i=1; i< SETSIZE; i++) { + pStart[i] = process_pfx_in_order(pStart[i],NULL); + } + return 0; +} + + +PfxEntry* AffixMgr::process_pfx_in_order(PfxEntry* ptr, PfxEntry* nptr) +{ + if (ptr) { + nptr = process_pfx_in_order(ptr->getNextNE(), nptr); + ptr->setNext(nptr); + nptr = process_pfx_in_order(ptr->getNextEQ(), ptr); + } + return nptr; +} + + +// convert from binary tree to sorted list +int AffixMgr:: process_sfx_tree_to_list() +{ + for (int i=1; i< SETSIZE; i++) { + sStart[i] = process_sfx_in_order(sStart[i],NULL); + } + return 0; +} + +SfxEntry* AffixMgr::process_sfx_in_order(SfxEntry* ptr, SfxEntry* nptr) +{ + if (ptr) { + nptr = process_sfx_in_order(ptr->getNextNE(), nptr); + ptr->setNext(nptr); + nptr = process_sfx_in_order(ptr->getNextEQ(), ptr); + } + return nptr; +} + + +// reinitialize the PfxEntry links NextEQ and NextNE to speed searching +// using the idea of leading subsets this time +int AffixMgr::process_pfx_order() +{ + PfxEntry* ptr; + + // loop through each prefix list starting point + for (int i=1; i < SETSIZE; i++) { + + ptr = pStart[i]; + + // look through the remainder of the list + // and find next entry with affix that + // the current one is not a subset of + // mark that as destination for NextNE + // use next in list that you are a subset + // of as NextEQ + + for (; ptr != NULL; ptr = ptr->getNext()) { + + PfxEntry * nptr = ptr->getNext(); + for (; nptr != NULL; nptr = nptr->getNext()) { + if (! isSubset( ptr->getKey() , nptr->getKey())) break; + } + ptr->setNextNE(nptr); + ptr->setNextEQ(NULL); + if ((ptr->getNext()) && isSubset(ptr->getKey() , (ptr->getNext())->getKey())) + ptr->setNextEQ(ptr->getNext()); + } + + // now clean up by adding smart search termination strings: + // if you are already a superset of the previous prefix + // but not a subset of the next, search can end here + // so set NextNE properly + + ptr = pStart[i]; + for (; ptr != NULL; ptr = ptr->getNext()) { + PfxEntry * nptr = ptr->getNext(); + PfxEntry * mptr = NULL; + for (; nptr != NULL; nptr = nptr->getNext()) { + if (! isSubset(ptr->getKey(),nptr->getKey())) break; + mptr = nptr; + } + if (mptr) mptr->setNextNE(NULL); + } + } + return 0; +} + +// initialize the SfxEntry links NextEQ and NextNE to speed searching +// using the idea of leading subsets this time +int AffixMgr::process_sfx_order() +{ + SfxEntry* ptr; + + // loop through each prefix list starting point + for (int i=1; i < SETSIZE; i++) { + + ptr = sStart[i]; + + // look through the remainder of the list + // and find next entry with affix that + // the current one is not a subset of + // mark that as destination for NextNE + // use next in list that you are a subset + // of as NextEQ + + for (; ptr != NULL; ptr = ptr->getNext()) { + SfxEntry * nptr = ptr->getNext(); + for (; nptr != NULL; nptr = nptr->getNext()) { + if (! isSubset(ptr->getKey(),nptr->getKey())) break; + } + ptr->setNextNE(nptr); + ptr->setNextEQ(NULL); + if ((ptr->getNext()) && isSubset(ptr->getKey(),(ptr->getNext())->getKey())) + ptr->setNextEQ(ptr->getNext()); + } + + + // now clean up by adding smart search termination strings: + // if you are already a superset of the previous suffix + // but not a subset of the next, search can end here + // so set NextNE properly + + ptr = sStart[i]; + for (; ptr != NULL; ptr = ptr->getNext()) { + SfxEntry * nptr = ptr->getNext(); + SfxEntry * mptr = NULL; + for (; nptr != NULL; nptr = nptr->getNext()) { + if (! isSubset(ptr->getKey(),nptr->getKey())) break; + mptr = nptr; + } + if (mptr) mptr->setNextNE(NULL); + } + } + return 0; +} + +// add flags to the result for dictionary debugging +void AffixMgr::debugflag(char * result, unsigned short flag) { + char * st = encode_flag(flag); + mystrcat(result, " ", MAXLNLEN); + mystrcat(result, MORPH_FLAG, MAXLNLEN); + if (st) { + mystrcat(result, st, MAXLNLEN); + free(st); + } +} + +// calculate the character length of the condition +int AffixMgr::condlen(char * st) +{ + int l = 0; + bool group = false; + for(; *st; st++) { + if (*st == '[') { + group = true; + l++; + } else if (*st == ']') group = false; + else if (!group && (!utf8 || + (!(*st & 0x80) || ((*st & 0xc0) == 0x80)))) l++; + } + return l; +} + +int AffixMgr::encodeit(affentry &entry, char * cs) +{ + if (strcmp(cs,".") != 0) { + entry.numconds = (char) condlen(cs); + strncpy(entry.c.conds, cs, MAXCONDLEN); + // long condition (end of conds padded by strncpy) + if (entry.c.conds[MAXCONDLEN - 1] && cs[MAXCONDLEN]) { + entry.opts += aeLONGCOND; + entry.c.l.conds2 = mystrdup(cs + MAXCONDLEN_1); + if (!entry.c.l.conds2) return 1; + } + } else { + entry.numconds = 0; + entry.c.conds[0] = '\0'; + } + return 0; +} + +// return 1 if s1 is a leading subset of s2 (dots are for infixes) +inline int AffixMgr::isSubset(const char * s1, const char * s2) + { + while (((*s1 == *s2) || (*s1 == '.')) && (*s1 != '\0')) { + s1++; + s2++; + } + return (*s1 == '\0'); + } + + +// check word for prefixes +struct hentry * AffixMgr::prefix_check(const char * word, int len, char in_compound, + const FLAG needflag) +{ + struct hentry * rv= NULL; + + pfx = NULL; + pfxappnd = NULL; + sfxappnd = NULL; + + // first handle the special case of 0 length prefixes + PfxEntry * pe = pStart[0]; + while (pe) { + if ( + // fogemorpheme + ((in_compound != IN_CPD_NOT) || !(pe->getCont() && + (TESTAFF(pe->getCont(), onlyincompound, pe->getContLen())))) && + // permit prefixes in compounds + ((in_compound != IN_CPD_END) || (pe->getCont() && + (TESTAFF(pe->getCont(), compoundpermitflag, pe->getContLen())))) + ) { + // check prefix + rv = pe->checkword(word, len, in_compound, needflag); + if (rv) { + pfx=pe; // BUG: pfx not stateless + return rv; + } + } + pe = pe->getNext(); + } + + // now handle the general case + unsigned char sp = *((const unsigned char *)word); + PfxEntry * pptr = pStart[sp]; + + while (pptr) { + if (isSubset(pptr->getKey(),word)) { + if ( + // fogemorpheme + ((in_compound != IN_CPD_NOT) || !(pptr->getCont() && + (TESTAFF(pptr->getCont(), onlyincompound, pptr->getContLen())))) && + // permit prefixes in compounds + ((in_compound != IN_CPD_END) || (pptr->getCont() && + (TESTAFF(pptr->getCont(), compoundpermitflag, pptr->getContLen())))) + ) { + // check prefix + rv = pptr->checkword(word, len, in_compound, needflag); + if (rv) { + pfx=pptr; // BUG: pfx not stateless + return rv; + } + } + pptr = pptr->getNextEQ(); + } else { + pptr = pptr->getNextNE(); + } + } + + return NULL; +} + +// check word for prefixes +struct hentry * AffixMgr::prefix_check_twosfx(const char * word, int len, + char in_compound, const FLAG needflag) +{ + struct hentry * rv= NULL; + + pfx = NULL; + sfxappnd = NULL; + + // first handle the special case of 0 length prefixes + PfxEntry * pe = pStart[0]; + + while (pe) { + rv = pe->check_twosfx(word, len, in_compound, needflag); + if (rv) return rv; + pe = pe->getNext(); + } + + // now handle the general case + unsigned char sp = *((const unsigned char *)word); + PfxEntry * pptr = pStart[sp]; + + while (pptr) { + if (isSubset(pptr->getKey(),word)) { + rv = pptr->check_twosfx(word, len, in_compound, needflag); + if (rv) { + pfx = pptr; + return rv; + } + pptr = pptr->getNextEQ(); + } else { + pptr = pptr->getNextNE(); + } + } + + return NULL; +} + +// check word for prefixes +char * AffixMgr::prefix_check_morph(const char * word, int len, char in_compound, + const FLAG needflag) +{ + char * st; + + char result[MAXLNLEN]; + result[0] = '\0'; + + pfx = NULL; + sfxappnd = NULL; + + // first handle the special case of 0 length prefixes + PfxEntry * pe = pStart[0]; + while (pe) { + st = pe->check_morph(word,len,in_compound, needflag); + if (st) { + mystrcat(result, st, MAXLNLEN); + free(st); + } + // if (rv) return rv; + pe = pe->getNext(); + } + + // now handle the general case + unsigned char sp = *((const unsigned char *)word); + PfxEntry * pptr = pStart[sp]; + + while (pptr) { + if (isSubset(pptr->getKey(),word)) { + st = pptr->check_morph(word,len,in_compound, needflag); + if (st) { + // fogemorpheme + if ((in_compound != IN_CPD_NOT) || !((pptr->getCont() && + (TESTAFF(pptr->getCont(), onlyincompound, pptr->getContLen()))))) { + mystrcat(result, st, MAXLNLEN); + pfx = pptr; + } + free(st); + } + pptr = pptr->getNextEQ(); + } else { + pptr = pptr->getNextNE(); + } + } + + if (*result) return mystrdup(result); + return NULL; +} + + +// check word for prefixes +char * AffixMgr::prefix_check_twosfx_morph(const char * word, int len, + char in_compound, const FLAG needflag) +{ + char * st; + + char result[MAXLNLEN]; + result[0] = '\0'; + + pfx = NULL; + sfxappnd = NULL; + + // first handle the special case of 0 length prefixes + PfxEntry * pe = pStart[0]; + while (pe) { + st = pe->check_twosfx_morph(word,len,in_compound, needflag); + if (st) { + mystrcat(result, st, MAXLNLEN); + free(st); + } + pe = pe->getNext(); + } + + // now handle the general case + unsigned char sp = *((const unsigned char *)word); + PfxEntry * pptr = pStart[sp]; + + while (pptr) { + if (isSubset(pptr->getKey(),word)) { + st = pptr->check_twosfx_morph(word, len, in_compound, needflag); + if (st) { + mystrcat(result, st, MAXLNLEN); + free(st); + pfx = pptr; + } + pptr = pptr->getNextEQ(); + } else { + pptr = pptr->getNextNE(); + } + } + + if (*result) return mystrdup(result); + return NULL; +} + +// Is word a non compound with a REP substitution (see checkcompoundrep)? +int AffixMgr::cpdrep_check(const char * word, int wl) +{ + char candidate[MAXLNLEN]; + const char * r; + int lenr, lenp; + + if ((wl < 2) || !numrep) return 0; + + for (int i=0; i < numrep; i++ ) { + r = word; + lenr = strlen(reptable[i].pattern2); + lenp = strlen(reptable[i].pattern); + // search every occurence of the pattern in the word + while ((r=strstr(r, reptable[i].pattern)) != NULL) { + strcpy(candidate, word); + if (r-word + lenr + strlen(r+lenp) >= MAXLNLEN) break; + strcpy(candidate+(r-word),reptable[i].pattern2); + strcpy(candidate+(r-word)+lenr, r+lenp); + if (candidate_check(candidate,strlen(candidate))) return 1; + r++; // search for the next letter + } + } + return 0; +} + +// forbid compoundings when there are special patterns at word bound +int AffixMgr::cpdpat_check(const char * word, int pos, hentry * r1, hentry * r2, const char affixed) +{ + int len; + for (int i = 0; i < numcheckcpd; i++) { + if (isSubset(checkcpdtable[i].pattern2, word + pos) && + (!r1 || !checkcpdtable[i].cond || + (r1->astr && TESTAFF(r1->astr, checkcpdtable[i].cond, r1->alen))) && + (!r2 || !checkcpdtable[i].cond2 || + (r2->astr && TESTAFF(r2->astr, checkcpdtable[i].cond2, r2->alen))) && + // zero length pattern => only TESTAFF + // zero pattern (0/flag) => unmodified stem (zero affixes allowed) + (!*(checkcpdtable[i].pattern) || ( + (*(checkcpdtable[i].pattern)=='0' && r1->blen <= pos && strncmp(word + pos - r1->blen, r1->word, r1->blen) == 0) || + (*(checkcpdtable[i].pattern)!='0' && (len = strlen(checkcpdtable[i].pattern)) && + strncmp(word + pos - len, checkcpdtable[i].pattern, len) == 0)))) { + return 1; + } + } + return 0; +} + +// forbid compounding with neighbouring upper and lower case characters at word bounds +int AffixMgr::cpdcase_check(const char * word, int pos) +{ + if (utf8) { + w_char u, w; + const char * p; + u8_u16(&u, 1, word + pos); + for (p = word + pos - 1; (*p & 0xc0) == 0x80; p--); + u8_u16(&w, 1, p); + unsigned short a = (u.h << 8) + u.l; + unsigned short b = (w.h << 8) + w.l; + if (((unicodetoupper(a, langnum) == a) || (unicodetoupper(b, langnum) == b)) && + (a != '-') && (b != '-')) return 1; + } else { + unsigned char a = *(word + pos - 1); + unsigned char b = *(word + pos); + if ((csconv[a].ccase || csconv[b].ccase) && (a != '-') && (b != '-')) return 1; + } + return 0; +} + +// check compound patterns +int AffixMgr::defcpd_check(hentry *** words, short wnum, hentry * rv, hentry ** def, char all) +{ + signed short btpp[MAXWORDLEN]; // metacharacter (*, ?) positions for backtracking + signed short btwp[MAXWORDLEN]; // word positions for metacharacters + int btnum[MAXWORDLEN]; // number of matched characters in metacharacter positions + short bt = 0; + int i, j; + int ok; + int w = 0; + + if (!*words) { + w = 1; + *words = def; + } + + if (!*words) { + return 0; + } + + (*words)[wnum] = rv; + + // has the last word COMPOUNDRULE flag? + if (rv->alen == 0) { + (*words)[wnum] = NULL; + if (w) *words = NULL; + return 0; + } + ok = 0; + for (i = 0; i < numdefcpd; i++) { + for (j = 0; j < defcpdtable[i].len; j++) { + if (defcpdtable[i].def[j] != '*' && defcpdtable[i].def[j] != '?' && + TESTAFF(rv->astr, defcpdtable[i].def[j], rv->alen)) ok = 1; + } + } + if (ok == 0) { + (*words)[wnum] = NULL; + if (w) *words = NULL; + return 0; + } + + for (i = 0; i < numdefcpd; i++) { + signed short pp = 0; // pattern position + signed short wp = 0; // "words" position + int ok2; + ok = 1; + ok2 = 1; + do { + while ((pp < defcpdtable[i].len) && (wp <= wnum)) { + if (((pp+1) < defcpdtable[i].len) && + ((defcpdtable[i].def[pp+1] == '*') || (defcpdtable[i].def[pp+1] == '?'))) { + int wend = (defcpdtable[i].def[pp+1] == '?') ? wp : wnum; + ok2 = 1; + pp+=2; + btpp[bt] = pp; + btwp[bt] = wp; + while (wp <= wend) { + if (!(*words)[wp]->alen || + !TESTAFF((*words)[wp]->astr, defcpdtable[i].def[pp-2], (*words)[wp]->alen)) { + ok2 = 0; + break; + } + wp++; + } + if (wp <= wnum) ok2 = 0; + btnum[bt] = wp - btwp[bt]; + if (btnum[bt] > 0) bt++; + if (ok2) break; + } else { + ok2 = 1; + if (!(*words)[wp] || !(*words)[wp]->alen || + !TESTAFF((*words)[wp]->astr, defcpdtable[i].def[pp], (*words)[wp]->alen)) { + ok = 0; + break; + } + pp++; + wp++; + if ((defcpdtable[i].len == pp) && !(wp > wnum)) ok = 0; + } + } + if (ok && ok2) { + int r = pp; + while ((defcpdtable[i].len > r) && ((r+1) < defcpdtable[i].len) && + ((defcpdtable[i].def[r+1] == '*') || (defcpdtable[i].def[r+1] == '?'))) r+=2; + if (defcpdtable[i].len <= r) return 1; + } + // backtrack + if (bt) do { + ok = 1; + btnum[bt - 1]--; + pp = btpp[bt - 1]; + wp = btwp[bt - 1] + (signed short) btnum[bt - 1]; + } while ((btnum[bt - 1] < 0) && --bt); + } while (bt); + + if (ok && ok2 && (!all || (defcpdtable[i].len <= pp))) return 1; + + // check zero ending + while (ok && ok2 && (defcpdtable[i].len > pp) && ((pp+1) < defcpdtable[i].len) && + ((defcpdtable[i].def[pp+1] == '*') || (defcpdtable[i].def[pp+1] == '?'))) pp+=2; + if (ok && ok2 && (defcpdtable[i].len <= pp)) return 1; + } + (*words)[wnum] = NULL; + if (w) *words = NULL; + return 0; +} + +inline int AffixMgr::candidate_check(const char * word, int len) +{ + struct hentry * rv=NULL; + + rv = lookup(word); + if (rv) return 1; + +// rv = prefix_check(word,len,1); +// if (rv) return 1; + + rv = affix_check(word,len); + if (rv) return 1; + return 0; +} + +// calculate number of syllable for compound-checking +short AffixMgr::get_syllable(const char * word, int wlen) +{ + if (cpdmaxsyllable==0) return 0; + + short num=0; + + if (!utf8) { + for (int i=0; i 0; i--) { + if (flag_bsearch((unsigned short *) cpdvowels_utf16, + ((unsigned short *) w)[i - 1], cpdvowels_utf16_len)) num++; + } + } + return num; +} + +void AffixMgr::setcminmax(int * cmin, int * cmax, const char * word, int len) { + if (utf8) { + int i; + for (*cmin = 0, i = 0; (i < cpdmin) && word[*cmin]; i++) { + for ((*cmin)++; (word[*cmin] & 0xc0) == 0x80; (*cmin)++); + } + for (*cmax = len, i = 0; (i < (cpdmin - 1)) && *cmax; i++) { + for ((*cmax)--; (word[*cmax] & 0xc0) == 0x80; (*cmax)--); + } + } else { + *cmin = cpdmin; + *cmax = len - cpdmin + 1; + } +} + + +// check if compound word is correctly spelled +// hu_mov_rule = spec. Hungarian rule (XXX) +struct hentry * AffixMgr::compound_check(const char * word, int len, + short wordnum, short numsyllable, short maxwordnum, short wnum, hentry ** words = NULL, + char hu_mov_rule = 0, char is_sug = 0, int * info = NULL) +{ + int i; + short oldnumsyllable, oldnumsyllable2, oldwordnum, oldwordnum2; + struct hentry * rv = NULL; + struct hentry * rv_first; + struct hentry * rwords[MAXWORDLEN]; // buffer for COMPOUND pattern checking + char st [MAXWORDUTF8LEN + 4]; + char ch = '\0'; + int cmin; + int cmax; + int striple = 0; + int scpd = 0; + int soldi = 0; + int oldcmin = 0; + int oldcmax = 0; + int oldlen = 0; + int checkedstriple = 0; + int onlycpdrule; + int affixed = 0; + hentry ** oldwords = words; + + int checked_prefix; + + setcminmax(&cmin, &cmax, word, len); + + strcpy(st, word); + + for (i = cmin; i < cmax; i++) { + // go to end of the UTF-8 character + if (utf8) { + for (; (st[i] & 0xc0) == 0x80; i++); + if (i >= cmax) return NULL; + } + + words = oldwords; + onlycpdrule = (words) ? 1 : 0; + + do { // onlycpdrule loop + + oldnumsyllable = numsyllable; + oldwordnum = wordnum; + checked_prefix = 0; + + + do { // simplified checkcompoundpattern loop + + if (scpd > 0) { + for (; scpd <= numcheckcpd && (!checkcpdtable[scpd-1].pattern3 || + strncmp(word + i, checkcpdtable[scpd-1].pattern3, strlen(checkcpdtable[scpd-1].pattern3)) != 0); scpd++); + + if (scpd > numcheckcpd) break; // break simplified checkcompoundpattern loop + strcpy(st + i, checkcpdtable[scpd-1].pattern); + soldi = i; + i += strlen(checkcpdtable[scpd-1].pattern); + strcpy(st + i, checkcpdtable[scpd-1].pattern2); + strcpy(st + i + strlen(checkcpdtable[scpd-1].pattern2), word + soldi + strlen(checkcpdtable[scpd-1].pattern3)); + + oldlen = len; + len += strlen(checkcpdtable[scpd-1].pattern) + strlen(checkcpdtable[scpd-1].pattern2) - strlen(checkcpdtable[scpd-1].pattern3); + oldcmin = cmin; + oldcmax = cmax; + setcminmax(&cmin, &cmax, st, len); + + cmax = len - cpdmin + 1; + } + + ch = st[i]; + st[i] = '\0'; + + sfx = NULL; + pfx = NULL; + + // FIRST WORD + + affixed = 1; + rv = lookup(st); // perhaps without prefix + + // search homonym with compound flag + while ((rv) && !hu_mov_rule && + ((needaffix && TESTAFF(rv->astr, needaffix, rv->alen)) || + !((compoundflag && !words && !onlycpdrule && TESTAFF(rv->astr, compoundflag, rv->alen)) || + (compoundbegin && !wordnum && !onlycpdrule && + TESTAFF(rv->astr, compoundbegin, rv->alen)) || + (compoundmiddle && wordnum && !words && !onlycpdrule && + TESTAFF(rv->astr, compoundmiddle, rv->alen)) || + (numdefcpd && onlycpdrule && + ((!words && !wordnum && defcpd_check(&words, wnum, rv, (hentry **) &rwords, 0)) || + (words && defcpd_check(&words, wnum, rv, (hentry **) &rwords, 0))))) || + (scpd != 0 && checkcpdtable[scpd-1].cond != FLAG_NULL && + !TESTAFF(rv->astr, checkcpdtable[scpd-1].cond, rv->alen))) + ) { + rv = rv->next_homonym; + } + + if (rv) affixed = 0; + + if (!rv) { + if (onlycpdrule) break; + if (compoundflag && + !(rv = prefix_check(st, i, hu_mov_rule ? IN_CPD_OTHER : IN_CPD_BEGIN, compoundflag))) { + if ((rv = suffix_check(st, i, 0, NULL, NULL, 0, NULL, + FLAG_NULL, compoundflag, hu_mov_rule ? IN_CPD_OTHER : IN_CPD_BEGIN)) && !hu_mov_rule && + sfx->getCont() && + ((compoundforbidflag && TESTAFF(sfx->getCont(), compoundforbidflag, + sfx->getContLen())) || (compoundend && + TESTAFF(sfx->getCont(), compoundend, + sfx->getContLen())))) { + rv = NULL; + } + } + + if (rv || + (((wordnum == 0) && compoundbegin && + ((rv = suffix_check(st, i, 0, NULL, NULL, 0, NULL, FLAG_NULL, compoundbegin, hu_mov_rule ? IN_CPD_OTHER : IN_CPD_BEGIN)) || + (rv = prefix_check(st, i, hu_mov_rule ? IN_CPD_OTHER : IN_CPD_BEGIN, compoundbegin)))) || + ((wordnum > 0) && compoundmiddle && + ((rv = suffix_check(st, i, 0, NULL, NULL, 0, NULL, FLAG_NULL, compoundmiddle, hu_mov_rule ? IN_CPD_OTHER : IN_CPD_BEGIN)) || + (rv = prefix_check(st, i, hu_mov_rule ? IN_CPD_OTHER : IN_CPD_BEGIN, compoundmiddle))))) + ) checked_prefix = 1; + // else check forbiddenwords and needaffix + } else if (rv->astr && (TESTAFF(rv->astr, forbiddenword, rv->alen) || + TESTAFF(rv->astr, needaffix, rv->alen) || + TESTAFF(rv->astr, ONLYUPCASEFLAG, rv->alen) || + (is_sug && nosuggest && TESTAFF(rv->astr, nosuggest, rv->alen)) + )) { + st[i] = ch; + //continue; + break; + } + + // check non_compound flag in suffix and prefix + if ((rv) && !hu_mov_rule && + ((pfx && pfx->getCont() && + TESTAFF(pfx->getCont(), compoundforbidflag, + pfx->getContLen())) || + (sfx && sfx->getCont() && + TESTAFF(sfx->getCont(), compoundforbidflag, + sfx->getContLen())))) { + rv = NULL; + } + + // check compoundend flag in suffix and prefix + if ((rv) && !checked_prefix && compoundend && !hu_mov_rule && + ((pfx && pfx->getCont() && + TESTAFF(pfx->getCont(), compoundend, + pfx->getContLen())) || + (sfx && sfx->getCont() && + TESTAFF(sfx->getCont(), compoundend, + sfx->getContLen())))) { + rv = NULL; + } + + // check compoundmiddle flag in suffix and prefix + if ((rv) && !checked_prefix && (wordnum==0) && compoundmiddle && !hu_mov_rule && + ((pfx && pfx->getCont() && + TESTAFF(pfx->getCont(), compoundmiddle, + pfx->getContLen())) || + (sfx && sfx->getCont() && + TESTAFF(sfx->getCont(), compoundmiddle, + sfx->getContLen())))) { + rv = NULL; + } + + // check forbiddenwords + if ((rv) && (rv->astr) && (TESTAFF(rv->astr, forbiddenword, rv->alen) || + TESTAFF(rv->astr, ONLYUPCASEFLAG, rv->alen) || + (is_sug && nosuggest && TESTAFF(rv->astr, nosuggest, rv->alen)))) { + return NULL; + } + + // increment word number, if the second root has a compoundroot flag + if ((rv) && compoundroot && + (TESTAFF(rv->astr, compoundroot, rv->alen))) { + wordnum++; + } + + // first word is acceptable in compound words? + if (((rv) && + ( checked_prefix || (words && words[wnum]) || + (compoundflag && TESTAFF(rv->astr, compoundflag, rv->alen)) || + ((oldwordnum == 0) && compoundbegin && TESTAFF(rv->astr, compoundbegin, rv->alen)) || + ((oldwordnum > 0) && compoundmiddle && TESTAFF(rv->astr, compoundmiddle, rv->alen))// || +// (numdefcpd && ) + +// LANG_hu section: spec. Hungarian rule + || ((langnum == LANG_hu) && hu_mov_rule && ( + TESTAFF(rv->astr, 'F', rv->alen) || // XXX hardwired Hungarian dictionary codes + TESTAFF(rv->astr, 'G', rv->alen) || + TESTAFF(rv->astr, 'H', rv->alen) + ) + ) +// END of LANG_hu section + ) && + ( + // test CHECKCOMPOUNDPATTERN conditions + scpd == 0 || checkcpdtable[scpd-1].cond == FLAG_NULL || + TESTAFF(rv->astr, checkcpdtable[scpd-1].cond, rv->alen) + ) + && ! (( checkcompoundtriple && scpd == 0 && !words && // test triple letters + (word[i-1]==word[i]) && ( + ((i>1) && (word[i-1]==word[i-2])) || + ((word[i-1]==word[i+1])) // may be word[i+1] == '\0' + ) + ) || + ( + checkcompoundcase && scpd == 0 && !words && cpdcase_check(word, i) + )) + ) +// LANG_hu section: spec. Hungarian rule + || ((!rv) && (langnum == LANG_hu) && hu_mov_rule && (rv = affix_check(st,i)) && + (sfx && sfx->getCont() && ( // XXX hardwired Hungarian dic. codes + TESTAFF(sfx->getCont(), (unsigned short) 'x', sfx->getContLen()) || + TESTAFF(sfx->getCont(), (unsigned short) '%', sfx->getContLen()) + ) + ) + ) + ) { // first word is ok condition + +// LANG_hu section: spec. Hungarian rule + if (langnum == LANG_hu) { + // calculate syllable number of the word + numsyllable += get_syllable(st, i); + // + 1 word, if syllable number of the prefix > 1 (hungarian convention) + if (pfx && (get_syllable(pfx->getKey(),strlen(pfx->getKey())) > 1)) wordnum++; + } +// END of LANG_hu section + + // NEXT WORD(S) + rv_first = rv; + st[i] = ch; + + do { // striple loop + + // check simplifiedtriple + if (simplifiedtriple) { + if (striple) { + checkedstriple = 1; + i--; // check "fahrt" instead of "ahrt" in "Schiffahrt" + } else if (i > 2 && *(word+i - 1) == *(word + i - 2)) striple = 1; + } + + rv = lookup((st+i)); // perhaps without prefix + + // search homonym with compound flag + while ((rv) && ((needaffix && TESTAFF(rv->astr, needaffix, rv->alen)) || + !((compoundflag && !words && TESTAFF(rv->astr, compoundflag, rv->alen)) || + (compoundend && !words && TESTAFF(rv->astr, compoundend, rv->alen)) || + (numdefcpd && words && defcpd_check(&words, wnum + 1, rv, NULL,1))) || + (scpd != 0 && checkcpdtable[scpd-1].cond2 != FLAG_NULL && + !TESTAFF(rv->astr, checkcpdtable[scpd-1].cond2, rv->alen)) + )) { + rv = rv->next_homonym; + } + + // check FORCEUCASE + if (rv && forceucase && (rv) && + (TESTAFF(rv->astr, forceucase, rv->alen)) && !(info && *info & SPELL_ORIGCAP)) rv = NULL; + + if (rv && words && words[wnum + 1]) return rv_first; + + oldnumsyllable2 = numsyllable; + oldwordnum2 = wordnum; + + +// LANG_hu section: spec. Hungarian rule, XXX hardwired dictionary code + if ((rv) && (langnum == LANG_hu) && (TESTAFF(rv->astr, 'I', rv->alen)) && !(TESTAFF(rv->astr, 'J', rv->alen))) { + numsyllable--; + } +// END of LANG_hu section + + // increment word number, if the second root has a compoundroot flag + if ((rv) && (compoundroot) && + (TESTAFF(rv->astr, compoundroot, rv->alen))) { + wordnum++; + } + + // check forbiddenwords + if ((rv) && (rv->astr) && (TESTAFF(rv->astr, forbiddenword, rv->alen) || + TESTAFF(rv->astr, ONLYUPCASEFLAG, rv->alen) || + (is_sug && nosuggest && TESTAFF(rv->astr, nosuggest, rv->alen)))) return NULL; + + // second word is acceptable, as a root? + // hungarian conventions: compounding is acceptable, + // when compound forms consist of 2 words, or if more, + // then the syllable number of root words must be 6, or lesser. + + if ((rv) && ( + (compoundflag && TESTAFF(rv->astr, compoundflag, rv->alen)) || + (compoundend && TESTAFF(rv->astr, compoundend, rv->alen)) + ) + && ( + ((cpdwordmax==-1) || (wordnum+1clen)<=cpdmaxsyllable)) + ) && + ( + // test CHECKCOMPOUNDPATTERN + !numcheckcpd || scpd != 0 || !cpdpat_check(word, i, rv_first, rv, 0) + ) && + ( + (!checkcompounddup || (rv != rv_first)) + ) + // test CHECKCOMPOUNDPATTERN conditions + && (scpd == 0 || checkcpdtable[scpd-1].cond2 == FLAG_NULL || + TESTAFF(rv->astr, checkcpdtable[scpd-1].cond2, rv->alen)) + ) + { + // forbid compound word, if it is a non compound word with typical fault + if (checkcompoundrep && cpdrep_check(word,len)) return NULL; + return rv_first; + } + + numsyllable = oldnumsyllable2; + wordnum = oldwordnum2; + + // perhaps second word has prefix or/and suffix + sfx = NULL; + sfxflag = FLAG_NULL; + rv = (compoundflag && !onlycpdrule) ? affix_check((word+i),strlen(word+i), compoundflag, IN_CPD_END) : NULL; + if (!rv && compoundend && !onlycpdrule) { + sfx = NULL; + pfx = NULL; + rv = affix_check((word+i),strlen(word+i), compoundend, IN_CPD_END); + } + + if (!rv && numdefcpd && words) { + rv = affix_check((word+i),strlen(word+i), 0, IN_CPD_END); + if (rv && defcpd_check(&words, wnum + 1, rv, NULL, 1)) return rv_first; + rv = NULL; + } + + // test CHECKCOMPOUNDPATTERN conditions (allowed forms) + if (rv && !(scpd == 0 || checkcpdtable[scpd-1].cond2 == FLAG_NULL || + TESTAFF(rv->astr, checkcpdtable[scpd-1].cond2, rv->alen))) rv = NULL; + + // test CHECKCOMPOUNDPATTERN conditions (forbidden compounds) + if (rv && numcheckcpd && scpd == 0 && cpdpat_check(word, i, rv_first, rv, affixed)) rv = NULL; + + // check non_compound flag in suffix and prefix + if ((rv) && + ((pfx && pfx->getCont() && + TESTAFF(pfx->getCont(), compoundforbidflag, + pfx->getContLen())) || + (sfx && sfx->getCont() && + TESTAFF(sfx->getCont(), compoundforbidflag, + sfx->getContLen())))) { + rv = NULL; + } + + // check FORCEUCASE + if (rv && forceucase && (rv) && + (TESTAFF(rv->astr, forceucase, rv->alen)) && !(info && *info & SPELL_ORIGCAP)) rv = NULL; + + // check forbiddenwords + if ((rv) && (rv->astr) && (TESTAFF(rv->astr, forbiddenword, rv->alen) || + TESTAFF(rv->astr, ONLYUPCASEFLAG, rv->alen) || + (is_sug && nosuggest && TESTAFF(rv->astr, nosuggest, rv->alen)))) return NULL; + + // pfxappnd = prefix of word+i, or NULL + // calculate syllable number of prefix. + // hungarian convention: when syllable number of prefix is more, + // than 1, the prefix+word counts as two words. + + if (langnum == LANG_hu) { + // calculate syllable number of the word + numsyllable += get_syllable(word + i, strlen(word + i)); + + // - affix syllable num. + // XXX only second suffix (inflections, not derivations) + if (sfxappnd) { + char * tmp = myrevstrdup(sfxappnd); + numsyllable -= get_syllable(tmp, strlen(tmp)); + free(tmp); + } + + // + 1 word, if syllable number of the prefix > 1 (hungarian convention) + if (pfx && (get_syllable(pfx->getKey(),strlen(pfx->getKey())) > 1)) wordnum++; + + // increment syllable num, if last word has a SYLLABLENUM flag + // and the suffix is beginning `s' + + if (cpdsyllablenum) { + switch (sfxflag) { + case 'c': { numsyllable+=2; break; } + case 'J': { numsyllable += 1; break; } + case 'I': { if (rv && TESTAFF(rv->astr, 'J', rv->alen)) numsyllable += 1; break; } + } + } + } + + // increment word number, if the second word has a compoundroot flag + if ((rv) && (compoundroot) && + (TESTAFF(rv->astr, compoundroot, rv->alen))) { + wordnum++; + } + + // second word is acceptable, as a word with prefix or/and suffix? + // hungarian conventions: compounding is acceptable, + // when compound forms consist 2 word, otherwise + // the syllable number of root words is 6, or lesser. + if ((rv) && + ( + ((cpdwordmax == -1) || (wordnum + 1 < cpdwordmax)) || + ((cpdmaxsyllable != 0) && + (numsyllable <= cpdmaxsyllable)) + ) + && ( + (!checkcompounddup || (rv != rv_first)) + )) { + // forbid compound word, if it is a non compound word with typical fault + if (checkcompoundrep && cpdrep_check(word, len)) return NULL; + return rv_first; + } + + numsyllable = oldnumsyllable2; + wordnum = oldwordnum2; + + // perhaps second word is a compound word (recursive call) + if (wordnum < maxwordnum) { + rv = compound_check((st+i),strlen(st+i), wordnum+1, + numsyllable, maxwordnum, wnum + 1, words, 0, is_sug, info); + + if (rv && numcheckcpd && ((scpd == 0 && cpdpat_check(word, i, rv_first, rv, affixed)) || + (scpd != 0 && !cpdpat_check(word, i, rv_first, rv, affixed)))) rv = NULL; + } else { + rv=NULL; + } + if (rv) { + // forbid compound word, if it is a non compound word with typical fault + if (checkcompoundrep || forbiddenword) { + struct hentry * rv2 = NULL; + + if (checkcompoundrep && cpdrep_check(word, len)) return NULL; + + // check first part + if (strncmp(rv->word, word + i, rv->blen) == 0) { + char r = *(st + i + rv->blen); + *(st + i + rv->blen) = '\0'; + + if (checkcompoundrep && cpdrep_check(st, i + rv->blen)) { + *(st + i + rv->blen) = r; + continue; + } + + if (forbiddenword) { + rv2 = lookup(word); + if (!rv2) rv2 = affix_check(word, len); + if (rv2 && rv2->astr && TESTAFF(rv2->astr, forbiddenword, rv2->alen) && + (strncmp(rv2->word, st, i + rv->blen) == 0)) { + return NULL; + } + } + *(st + i + rv->blen) = r; + } + } + return rv_first; + } + } while (striple && !checkedstriple); // end of striple loop + + if (checkedstriple) { + i++; + checkedstriple = 0; + striple = 0; + } + + } // first word is ok condition + + if (soldi != 0) { + i = soldi; + soldi = 0; + len = oldlen; + cmin = oldcmin; + cmax = oldcmax; + } + scpd++; + + + } while (!onlycpdrule && simplifiedcpd && scpd <= numcheckcpd); // end of simplifiedcpd loop + + scpd = 0; + wordnum = oldwordnum; + numsyllable = oldnumsyllable; + + if (soldi != 0) { + i = soldi; + strcpy(st, word); // XXX add more optim. + soldi = 0; + } else st[i] = ch; + + } while (numdefcpd && oldwordnum == 0 && !onlycpdrule && (onlycpdrule = 1)); // end of onlycpd loop + + } + + return NULL; +} + +// check if compound word is correctly spelled +// hu_mov_rule = spec. Hungarian rule (XXX) +int AffixMgr::compound_check_morph(const char * word, int len, + short wordnum, short numsyllable, short maxwordnum, short wnum, hentry ** words, + char hu_mov_rule = 0, char ** result = NULL, char * partresult = NULL) +{ + int i; + short oldnumsyllable, oldnumsyllable2, oldwordnum, oldwordnum2; + int ok = 0; + + struct hentry * rv = NULL; + struct hentry * rv_first; + struct hentry * rwords[MAXWORDLEN]; // buffer for COMPOUND pattern checking + char st [MAXWORDUTF8LEN + 4]; + char ch; + + int checked_prefix; + char presult[MAXLNLEN]; + + int cmin; + int cmax; + + int onlycpdrule; + int affixed = 0; + hentry ** oldwords = words; + + setcminmax(&cmin, &cmax, word, len); + + strcpy(st, word); + + for (i = cmin; i < cmax; i++) { + oldnumsyllable = numsyllable; + oldwordnum = wordnum; + checked_prefix = 0; + + // go to end of the UTF-8 character + if (utf8) { + for (; (st[i] & 0xc0) == 0x80; i++); + if (i >= cmax) return 0; + } + + words = oldwords; + onlycpdrule = (words) ? 1 : 0; + + do { // onlycpdrule loop + + oldnumsyllable = numsyllable; + oldwordnum = wordnum; + checked_prefix = 0; + + ch = st[i]; + st[i] = '\0'; + sfx = NULL; + + // FIRST WORD + + affixed = 1; + + *presult = '\0'; + if (partresult) mystrcat(presult, partresult, MAXLNLEN); + + rv = lookup(st); // perhaps without prefix + + // search homonym with compound flag + while ((rv) && !hu_mov_rule && + ((needaffix && TESTAFF(rv->astr, needaffix, rv->alen)) || + !((compoundflag && !words && !onlycpdrule && TESTAFF(rv->astr, compoundflag, rv->alen)) || + (compoundbegin && !wordnum && !onlycpdrule && + TESTAFF(rv->astr, compoundbegin, rv->alen)) || + (compoundmiddle && wordnum && !words && !onlycpdrule && + TESTAFF(rv->astr, compoundmiddle, rv->alen)) || + (numdefcpd && onlycpdrule && + ((!words && !wordnum && defcpd_check(&words, wnum, rv, (hentry **) &rwords, 0)) || + (words && defcpd_check(&words, wnum, rv, (hentry **) &rwords, 0)))) + ))) { + rv = rv->next_homonym; + } + + if (rv) affixed = 0; + + if (rv) { + sprintf(presult + strlen(presult), "%c%s%s", MSEP_FLD, MORPH_PART, st); + if (!HENTRY_FIND(rv, MORPH_STEM)) { + sprintf(presult + strlen(presult), "%c%s%s", MSEP_FLD, MORPH_STEM, st); + } + // store the pointer of the hash entry +// sprintf(presult + strlen(presult), "%c%s%p", MSEP_FLD, MORPH_HENTRY, rv); + if (HENTRY_DATA(rv)) { + sprintf(presult + strlen(presult), "%c%s", MSEP_FLD, HENTRY_DATA2(rv)); + } + } + + if (!rv) { + if (onlycpdrule) break; + if (compoundflag && + !(rv = prefix_check(st, i, hu_mov_rule ? IN_CPD_OTHER : IN_CPD_BEGIN, compoundflag))) { + if ((rv = suffix_check(st, i, 0, NULL, NULL, 0, NULL, + FLAG_NULL, compoundflag, hu_mov_rule ? IN_CPD_OTHER : IN_CPD_BEGIN)) && !hu_mov_rule && + sfx->getCont() && + ((compoundforbidflag && TESTAFF(sfx->getCont(), compoundforbidflag, + sfx->getContLen())) || (compoundend && + TESTAFF(sfx->getCont(), compoundend, + sfx->getContLen())))) { + rv = NULL; + } + } + + if (rv || + (((wordnum == 0) && compoundbegin && + ((rv = suffix_check(st, i, 0, NULL, NULL, 0, NULL, FLAG_NULL, compoundbegin, hu_mov_rule ? IN_CPD_OTHER : IN_CPD_BEGIN)) || + (rv = prefix_check(st, i, hu_mov_rule ? IN_CPD_OTHER : IN_CPD_BEGIN, compoundbegin)))) || + ((wordnum > 0) && compoundmiddle && + ((rv = suffix_check(st, i, 0, NULL, NULL, 0, NULL, FLAG_NULL, compoundmiddle, hu_mov_rule ? IN_CPD_OTHER : IN_CPD_BEGIN)) || + (rv = prefix_check(st, i, hu_mov_rule ? IN_CPD_OTHER : IN_CPD_BEGIN, compoundmiddle))))) + ) { + // char * p = prefix_check_morph(st, i, 0, compound); + char * p = NULL; + if (compoundflag) p = affix_check_morph(st, i, compoundflag); + if (!p || (*p == '\0')) { + if (p) free(p); + p = NULL; + if ((wordnum == 0) && compoundbegin) { + p = affix_check_morph(st, i, compoundbegin); + } else if ((wordnum > 0) && compoundmiddle) { + p = affix_check_morph(st, i, compoundmiddle); + } + } + if (p && (*p != '\0')) { + sprintf(presult + strlen(presult), "%c%s%s%s", MSEP_FLD, + MORPH_PART, st, line_uniq_app(&p, MSEP_REC)); + } + if (p) free(p); + checked_prefix = 1; + } + // else check forbiddenwords + } else if (rv->astr && (TESTAFF(rv->astr, forbiddenword, rv->alen) || + TESTAFF(rv->astr, ONLYUPCASEFLAG, rv->alen) || + TESTAFF(rv->astr, needaffix, rv->alen))) { + st[i] = ch; + continue; + } + + // check non_compound flag in suffix and prefix + if ((rv) && !hu_mov_rule && + ((pfx && pfx->getCont() && + TESTAFF(pfx->getCont(), compoundforbidflag, + pfx->getContLen())) || + (sfx && sfx->getCont() && + TESTAFF(sfx->getCont(), compoundforbidflag, + sfx->getContLen())))) { + continue; + } + + // check compoundend flag in suffix and prefix + if ((rv) && !checked_prefix && compoundend && !hu_mov_rule && + ((pfx && pfx->getCont() && + TESTAFF(pfx->getCont(), compoundend, + pfx->getContLen())) || + (sfx && sfx->getCont() && + TESTAFF(sfx->getCont(), compoundend, + sfx->getContLen())))) { + continue; + } + + // check compoundmiddle flag in suffix and prefix + if ((rv) && !checked_prefix && (wordnum==0) && compoundmiddle && !hu_mov_rule && + ((pfx && pfx->getCont() && + TESTAFF(pfx->getCont(), compoundmiddle, + pfx->getContLen())) || + (sfx && sfx->getCont() && + TESTAFF(sfx->getCont(), compoundmiddle, + sfx->getContLen())))) { + rv = NULL; + } + + // check forbiddenwords + if ((rv) && (rv->astr) && (TESTAFF(rv->astr, forbiddenword, rv->alen) + || TESTAFF(rv->astr, ONLYUPCASEFLAG, rv->alen))) continue; + + // increment word number, if the second root has a compoundroot flag + if ((rv) && (compoundroot) && + (TESTAFF(rv->astr, compoundroot, rv->alen))) { + wordnum++; + } + + // first word is acceptable in compound words? + if (((rv) && + ( checked_prefix || (words && words[wnum]) || + (compoundflag && TESTAFF(rv->astr, compoundflag, rv->alen)) || + ((oldwordnum == 0) && compoundbegin && TESTAFF(rv->astr, compoundbegin, rv->alen)) || + ((oldwordnum > 0) && compoundmiddle && TESTAFF(rv->astr, compoundmiddle, rv->alen)) +// LANG_hu section: spec. Hungarian rule + || ((langnum == LANG_hu) && // hu_mov_rule + hu_mov_rule && ( + TESTAFF(rv->astr, 'F', rv->alen) || + TESTAFF(rv->astr, 'G', rv->alen) || + TESTAFF(rv->astr, 'H', rv->alen) + ) + ) +// END of LANG_hu section + ) + && ! (( checkcompoundtriple && !words && // test triple letters + (word[i-1]==word[i]) && ( + ((i>1) && (word[i-1]==word[i-2])) || + ((word[i-1]==word[i+1])) // may be word[i+1] == '\0' + ) + ) || + ( + // test CHECKCOMPOUNDPATTERN + numcheckcpd && !words && cpdpat_check(word, i, rv, NULL, affixed) + ) || + ( + checkcompoundcase && !words && cpdcase_check(word, i) + )) + ) +// LANG_hu section: spec. Hungarian rule + || ((!rv) && (langnum == LANG_hu) && hu_mov_rule && (rv = affix_check(st,i)) && + (sfx && sfx->getCont() && ( + TESTAFF(sfx->getCont(), (unsigned short) 'x', sfx->getContLen()) || + TESTAFF(sfx->getCont(), (unsigned short) '%', sfx->getContLen()) + ) + ) + ) +// END of LANG_hu section + ) { + +// LANG_hu section: spec. Hungarian rule + if (langnum == LANG_hu) { + // calculate syllable number of the word + numsyllable += get_syllable(st, i); + + // + 1 word, if syllable number of the prefix > 1 (hungarian convention) + if (pfx && (get_syllable(pfx->getKey(),strlen(pfx->getKey())) > 1)) wordnum++; + } +// END of LANG_hu section + + // NEXT WORD(S) + rv_first = rv; + rv = lookup((word+i)); // perhaps without prefix + + // search homonym with compound flag + while ((rv) && ((needaffix && TESTAFF(rv->astr, needaffix, rv->alen)) || + !((compoundflag && !words && TESTAFF(rv->astr, compoundflag, rv->alen)) || + (compoundend && !words && TESTAFF(rv->astr, compoundend, rv->alen)) || + (numdefcpd && words && defcpd_check(&words, wnum + 1, rv, NULL,1))))) { + rv = rv->next_homonym; + } + + if (rv && words && words[wnum + 1]) { + mystrcat(*result, presult, MAXLNLEN); + mystrcat(*result, " ", MAXLNLEN); + mystrcat(*result, MORPH_PART, MAXLNLEN); + mystrcat(*result, word+i, MAXLNLEN); + if (complexprefixes && HENTRY_DATA(rv)) mystrcat(*result, HENTRY_DATA2(rv), MAXLNLEN); + if (!HENTRY_FIND(rv, MORPH_STEM)) { + mystrcat(*result, " ", MAXLNLEN); + mystrcat(*result, MORPH_STEM, MAXLNLEN); + mystrcat(*result, HENTRY_WORD(rv), MAXLNLEN); + } + // store the pointer of the hash entry +// sprintf(*result + strlen(*result), " %s%p", MORPH_HENTRY, rv); + if (!complexprefixes && HENTRY_DATA(rv)) { + mystrcat(*result, " ", MAXLNLEN); + mystrcat(*result, HENTRY_DATA2(rv), MAXLNLEN); + } + mystrcat(*result, "\n", MAXLNLEN); + ok = 1; + return 0; + } + + oldnumsyllable2 = numsyllable; + oldwordnum2 = wordnum; + +// LANG_hu section: spec. Hungarian rule + if ((rv) && (langnum == LANG_hu) && (TESTAFF(rv->astr, 'I', rv->alen)) && !(TESTAFF(rv->astr, 'J', rv->alen))) { + numsyllable--; + } +// END of LANG_hu section + // increment word number, if the second root has a compoundroot flag + if ((rv) && (compoundroot) && + (TESTAFF(rv->astr, compoundroot, rv->alen))) { + wordnum++; + } + + // check forbiddenwords + if ((rv) && (rv->astr) && (TESTAFF(rv->astr, forbiddenword, rv->alen) || + TESTAFF(rv->astr, ONLYUPCASEFLAG, rv->alen))) { + st[i] = ch; + continue; + } + + // second word is acceptable, as a root? + // hungarian conventions: compounding is acceptable, + // when compound forms consist of 2 words, or if more, + // then the syllable number of root words must be 6, or lesser. + if ((rv) && ( + (compoundflag && TESTAFF(rv->astr, compoundflag, rv->alen)) || + (compoundend && TESTAFF(rv->astr, compoundend, rv->alen)) + ) + && ( + ((cpdwordmax==-1) || (wordnum+1blen)<=cpdmaxsyllable)) + ) + && ( + (!checkcompounddup || (rv != rv_first)) + ) + ) + { + // bad compound word + mystrcat(*result, presult, MAXLNLEN); + mystrcat(*result, " ", MAXLNLEN); + mystrcat(*result, MORPH_PART, MAXLNLEN); + mystrcat(*result, word+i, MAXLNLEN); + + if (HENTRY_DATA(rv)) { + if (complexprefixes) mystrcat(*result, HENTRY_DATA2(rv), MAXLNLEN); + if (! HENTRY_FIND(rv, MORPH_STEM)) { + mystrcat(*result, " ", MAXLNLEN); + mystrcat(*result, MORPH_STEM, MAXLNLEN); + mystrcat(*result, HENTRY_WORD(rv), MAXLNLEN); + } + // store the pointer of the hash entry +// sprintf(*result + strlen(*result), " %s%p", MORPH_HENTRY, rv); + if (!complexprefixes) { + mystrcat(*result, " ", MAXLNLEN); + mystrcat(*result, HENTRY_DATA2(rv), MAXLNLEN); + } + } + mystrcat(*result, "\n", MAXLNLEN); + ok = 1; + } + + numsyllable = oldnumsyllable2 ; + wordnum = oldwordnum2; + + // perhaps second word has prefix or/and suffix + sfx = NULL; + sfxflag = FLAG_NULL; + + if (compoundflag && !onlycpdrule) rv = affix_check((word+i),strlen(word+i), compoundflag); else rv = NULL; + + if (!rv && compoundend && !onlycpdrule) { + sfx = NULL; + pfx = NULL; + rv = affix_check((word+i),strlen(word+i), compoundend); + } + + if (!rv && numdefcpd && words) { + rv = affix_check((word+i),strlen(word+i), 0, IN_CPD_END); + if (rv && words && defcpd_check(&words, wnum + 1, rv, NULL, 1)) { + char * m = NULL; + if (compoundflag) m = affix_check_morph((word+i),strlen(word+i), compoundflag); + if ((!m || *m == '\0') && compoundend) { + if (m) free(m); + m = affix_check_morph((word+i),strlen(word+i), compoundend); + } + mystrcat(*result, presult, MAXLNLEN); + if (m || (*m != '\0')) { + sprintf(*result + strlen(*result), "%c%s%s%s", MSEP_FLD, + MORPH_PART, word + i, line_uniq_app(&m, MSEP_REC)); + } + if (m) free(m); + mystrcat(*result, "\n", MAXLNLEN); + ok = 1; + } + } + + // check non_compound flag in suffix and prefix + if ((rv) && + ((pfx && pfx->getCont() && + TESTAFF(pfx->getCont(), compoundforbidflag, + pfx->getContLen())) || + (sfx && sfx->getCont() && + TESTAFF(sfx->getCont(), compoundforbidflag, + sfx->getContLen())))) { + rv = NULL; + } + + // check forbiddenwords + if ((rv) && (rv->astr) && (TESTAFF(rv->astr,forbiddenword,rv->alen) || + TESTAFF(rv->astr, ONLYUPCASEFLAG, rv->alen)) + && (! TESTAFF(rv->astr, needaffix, rv->alen))) { + st[i] = ch; + continue; + } + + if (langnum == LANG_hu) { + // calculate syllable number of the word + numsyllable += get_syllable(word + i, strlen(word + i)); + + // - affix syllable num. + // XXX only second suffix (inflections, not derivations) + if (sfxappnd) { + char * tmp = myrevstrdup(sfxappnd); + numsyllable -= get_syllable(tmp, strlen(tmp)); + free(tmp); + } + + // + 1 word, if syllable number of the prefix > 1 (hungarian convention) + if (pfx && (get_syllable(pfx->getKey(),strlen(pfx->getKey())) > 1)) wordnum++; + + // increment syllable num, if last word has a SYLLABLENUM flag + // and the suffix is beginning `s' + + if (cpdsyllablenum) { + switch (sfxflag) { + case 'c': { numsyllable+=2; break; } + case 'J': { numsyllable += 1; break; } + case 'I': { if (rv && TESTAFF(rv->astr, 'J', rv->alen)) numsyllable += 1; break; } + } + } + } + + // increment word number, if the second word has a compoundroot flag + if ((rv) && (compoundroot) && + (TESTAFF(rv->astr, compoundroot, rv->alen))) { + wordnum++; + } + // second word is acceptable, as a word with prefix or/and suffix? + // hungarian conventions: compounding is acceptable, + // when compound forms consist 2 word, otherwise + // the syllable number of root words is 6, or lesser. + if ((rv) && + ( + ((cpdwordmax==-1) || (wordnum+1 0) && *s1 && (*s1 == *end_of_s2)) { + s1++; + end_of_s2--; + len--; + } + return (*s1 == '\0'); + } + */ + +inline int AffixMgr::isRevSubset(const char * s1, const char * end_of_s2, int len) + { + while ((len > 0) && (*s1 != '\0') && ((*s1 == *end_of_s2) || (*s1 == '.'))) { + s1++; + end_of_s2--; + len--; + } + return (*s1 == '\0'); + } + +// check word for suffixes + +struct hentry * AffixMgr::suffix_check (const char * word, int len, + int sfxopts, PfxEntry * ppfx, char ** wlst, int maxSug, int * ns, + const FLAG cclass, const FLAG needflag, char in_compound) +{ + struct hentry * rv = NULL; + PfxEntry* ep = ppfx; + + // first handle the special case of 0 length suffixes + SfxEntry * se = sStart[0]; + + while (se) { + if (!cclass || se->getCont()) { + // suffixes are not allowed in beginning of compounds + if ((((in_compound != IN_CPD_BEGIN)) || // && !cclass + // except when signed with compoundpermitflag flag + (se->getCont() && compoundpermitflag && + TESTAFF(se->getCont(),compoundpermitflag,se->getContLen()))) && (!circumfix || + // no circumfix flag in prefix and suffix + ((!ppfx || !(ep->getCont()) || !TESTAFF(ep->getCont(), + circumfix, ep->getContLen())) && + (!se->getCont() || !(TESTAFF(se->getCont(),circumfix,se->getContLen())))) || + // circumfix flag in prefix AND suffix + ((ppfx && (ep->getCont()) && TESTAFF(ep->getCont(), + circumfix, ep->getContLen())) && + (se->getCont() && (TESTAFF(se->getCont(),circumfix,se->getContLen()))))) && + // fogemorpheme + (in_compound || + !(se->getCont() && (TESTAFF(se->getCont(), onlyincompound, se->getContLen())))) && + // needaffix on prefix or first suffix + (cclass || + !(se->getCont() && TESTAFF(se->getCont(), needaffix, se->getContLen())) || + (ppfx && !((ep->getCont()) && + TESTAFF(ep->getCont(), needaffix, + ep->getContLen()))) + )) { + rv = se->checkword(word,len, sfxopts, ppfx, wlst, maxSug, ns, (FLAG) cclass, + needflag, (in_compound ? 0 : onlyincompound)); + if (rv) { + sfx=se; // BUG: sfx not stateless + return rv; + } + } + } + se = se->getNext(); + } + + // now handle the general case + if (len == 0) return NULL; // FULLSTRIP + unsigned char sp= *((const unsigned char *)(word + len - 1)); + SfxEntry * sptr = sStart[sp]; + + while (sptr) { + if (isRevSubset(sptr->getKey(), word + len - 1, len) + ) { + // suffixes are not allowed in beginning of compounds + if ((((in_compound != IN_CPD_BEGIN)) || // && !cclass + // except when signed with compoundpermitflag flag + (sptr->getCont() && compoundpermitflag && + TESTAFF(sptr->getCont(),compoundpermitflag,sptr->getContLen()))) && (!circumfix || + // no circumfix flag in prefix and suffix + ((!ppfx || !(ep->getCont()) || !TESTAFF(ep->getCont(), + circumfix, ep->getContLen())) && + (!sptr->getCont() || !(TESTAFF(sptr->getCont(),circumfix,sptr->getContLen())))) || + // circumfix flag in prefix AND suffix + ((ppfx && (ep->getCont()) && TESTAFF(ep->getCont(), + circumfix, ep->getContLen())) && + (sptr->getCont() && (TESTAFF(sptr->getCont(),circumfix,sptr->getContLen()))))) && + // fogemorpheme + (in_compound || + !((sptr->getCont() && (TESTAFF(sptr->getCont(), onlyincompound, sptr->getContLen()))))) && + // needaffix on prefix or first suffix + (cclass || + !(sptr->getCont() && TESTAFF(sptr->getCont(), needaffix, sptr->getContLen())) || + (ppfx && !((ep->getCont()) && + TESTAFF(ep->getCont(), needaffix, + ep->getContLen()))) + ) + ) if (in_compound != IN_CPD_END || ppfx || !(sptr->getCont() && TESTAFF(sptr->getCont(), onlyincompound, sptr->getContLen()))) { + rv = sptr->checkword(word,len, sfxopts, ppfx, wlst, + maxSug, ns, cclass, needflag, (in_compound ? 0 : onlyincompound)); + if (rv) { + sfx=sptr; // BUG: sfx not stateless + sfxflag = sptr->getFlag(); // BUG: sfxflag not stateless + if (!sptr->getCont()) sfxappnd=sptr->getKey(); // BUG: sfxappnd not stateless + return rv; + } + } + sptr = sptr->getNextEQ(); + } else { + sptr = sptr->getNextNE(); + } + } + + return NULL; +} + +// check word for two-level suffixes + +struct hentry * AffixMgr::suffix_check_twosfx(const char * word, int len, + int sfxopts, PfxEntry * ppfx, const FLAG needflag) +{ + struct hentry * rv = NULL; + + // first handle the special case of 0 length suffixes + SfxEntry * se = sStart[0]; + while (se) { + if (contclasses[se->getFlag()]) + { + rv = se->check_twosfx(word,len, sfxopts, ppfx, needflag); + if (rv) return rv; + } + se = se->getNext(); + } + + // now handle the general case + if (len == 0) return NULL; // FULLSTRIP + unsigned char sp = *((const unsigned char *)(word + len - 1)); + SfxEntry * sptr = sStart[sp]; + + while (sptr) { + if (isRevSubset(sptr->getKey(), word + len - 1, len)) { + if (contclasses[sptr->getFlag()]) + { + rv = sptr->check_twosfx(word,len, sfxopts, ppfx, needflag); + if (rv) { + sfxflag = sptr->getFlag(); // BUG: sfxflag not stateless + if (!sptr->getCont()) sfxappnd=sptr->getKey(); // BUG: sfxappnd not stateless + return rv; + } + } + sptr = sptr->getNextEQ(); + } else { + sptr = sptr->getNextNE(); + } + } + + return NULL; +} + +char * AffixMgr::suffix_check_twosfx_morph(const char * word, int len, + int sfxopts, PfxEntry * ppfx, const FLAG needflag) +{ + char result[MAXLNLEN]; + char result2[MAXLNLEN]; + char result3[MAXLNLEN]; + + char * st; + + result[0] = '\0'; + result2[0] = '\0'; + result3[0] = '\0'; + + // first handle the special case of 0 length suffixes + SfxEntry * se = sStart[0]; + while (se) { + if (contclasses[se->getFlag()]) + { + st = se->check_twosfx_morph(word,len, sfxopts, ppfx, needflag); + if (st) { + if (ppfx) { + if (ppfx->getMorph()) { + mystrcat(result, ppfx->getMorph(), MAXLNLEN); + mystrcat(result, " ", MAXLNLEN); + } else debugflag(result, ppfx->getFlag()); + } + mystrcat(result, st, MAXLNLEN); + free(st); + if (se->getMorph()) { + mystrcat(result, " ", MAXLNLEN); + mystrcat(result, se->getMorph(), MAXLNLEN); + } else debugflag(result, se->getFlag()); + mystrcat(result, "\n", MAXLNLEN); + } + } + se = se->getNext(); + } + + // now handle the general case + if (len == 0) return NULL; // FULLSTRIP + unsigned char sp = *((const unsigned char *)(word + len - 1)); + SfxEntry * sptr = sStart[sp]; + + while (sptr) { + if (isRevSubset(sptr->getKey(), word + len - 1, len)) { + if (contclasses[sptr->getFlag()]) + { + st = sptr->check_twosfx_morph(word,len, sfxopts, ppfx, needflag); + if (st) { + sfxflag = sptr->getFlag(); // BUG: sfxflag not stateless + if (!sptr->getCont()) sfxappnd=sptr->getKey(); // BUG: sfxappnd not stateless + strcpy(result2, st); + free(st); + + result3[0] = '\0'; + + if (sptr->getMorph()) { + mystrcat(result3, " ", MAXLNLEN); + mystrcat(result3, sptr->getMorph(), MAXLNLEN); + } else debugflag(result3, sptr->getFlag()); + strlinecat(result2, result3); + mystrcat(result2, "\n", MAXLNLEN); + mystrcat(result, result2, MAXLNLEN); + } + } + sptr = sptr->getNextEQ(); + } else { + sptr = sptr->getNextNE(); + } + } + if (*result) return mystrdup(result); + return NULL; +} + +char * AffixMgr::suffix_check_morph(const char * word, int len, + int sfxopts, PfxEntry * ppfx, const FLAG cclass, const FLAG needflag, char in_compound) +{ + char result[MAXLNLEN]; + + struct hentry * rv = NULL; + + result[0] = '\0'; + + PfxEntry* ep = ppfx; + + // first handle the special case of 0 length suffixes + SfxEntry * se = sStart[0]; + while (se) { + if (!cclass || se->getCont()) { + // suffixes are not allowed in beginning of compounds + if (((((in_compound != IN_CPD_BEGIN)) || // && !cclass + // except when signed with compoundpermitflag flag + (se->getCont() && compoundpermitflag && + TESTAFF(se->getCont(),compoundpermitflag,se->getContLen()))) && (!circumfix || + // no circumfix flag in prefix and suffix + ((!ppfx || !(ep->getCont()) || !TESTAFF(ep->getCont(), + circumfix, ep->getContLen())) && + (!se->getCont() || !(TESTAFF(se->getCont(),circumfix,se->getContLen())))) || + // circumfix flag in prefix AND suffix + ((ppfx && (ep->getCont()) && TESTAFF(ep->getCont(), + circumfix, ep->getContLen())) && + (se->getCont() && (TESTAFF(se->getCont(),circumfix,se->getContLen()))))) && + // fogemorpheme + (in_compound || + !((se->getCont() && (TESTAFF(se->getCont(), onlyincompound, se->getContLen()))))) && + // needaffix on prefix or first suffix + (cclass || + !(se->getCont() && TESTAFF(se->getCont(), needaffix, se->getContLen())) || + (ppfx && !((ep->getCont()) && + TESTAFF(ep->getCont(), needaffix, + ep->getContLen()))) + ) + )) + rv = se->checkword(word, len, sfxopts, ppfx, NULL, 0, 0, cclass, needflag); + while (rv) { + if (ppfx) { + if (ppfx->getMorph()) { + mystrcat(result, ppfx->getMorph(), MAXLNLEN); + mystrcat(result, " ", MAXLNLEN); + } else debugflag(result, ppfx->getFlag()); + } + if (complexprefixes && HENTRY_DATA(rv)) mystrcat(result, HENTRY_DATA2(rv), MAXLNLEN); + if (! HENTRY_FIND(rv, MORPH_STEM)) { + mystrcat(result, " ", MAXLNLEN); + mystrcat(result, MORPH_STEM, MAXLNLEN); + mystrcat(result, HENTRY_WORD(rv), MAXLNLEN); + } + // store the pointer of the hash entry +// sprintf(result + strlen(result), " %s%p", MORPH_HENTRY, rv); + + if (!complexprefixes && HENTRY_DATA(rv)) { + mystrcat(result, " ", MAXLNLEN); + mystrcat(result, HENTRY_DATA2(rv), MAXLNLEN); + } + if (se->getMorph()) { + mystrcat(result, " ", MAXLNLEN); + mystrcat(result, se->getMorph(), MAXLNLEN); + } else debugflag(result, se->getFlag()); + mystrcat(result, "\n", MAXLNLEN); + rv = se->get_next_homonym(rv, sfxopts, ppfx, cclass, needflag); + } + } + se = se->getNext(); + } + + // now handle the general case + if (len == 0) return NULL; // FULLSTRIP + unsigned char sp = *((const unsigned char *)(word + len - 1)); + SfxEntry * sptr = sStart[sp]; + + while (sptr) { + if (isRevSubset(sptr->getKey(), word + len - 1, len) + ) { + // suffixes are not allowed in beginning of compounds + if (((((in_compound != IN_CPD_BEGIN)) || // && !cclass + // except when signed with compoundpermitflag flag + (sptr->getCont() && compoundpermitflag && + TESTAFF(sptr->getCont(),compoundpermitflag,sptr->getContLen()))) && (!circumfix || + // no circumfix flag in prefix and suffix + ((!ppfx || !(ep->getCont()) || !TESTAFF(ep->getCont(), + circumfix, ep->getContLen())) && + (!sptr->getCont() || !(TESTAFF(sptr->getCont(),circumfix,sptr->getContLen())))) || + // circumfix flag in prefix AND suffix + ((ppfx && (ep->getCont()) && TESTAFF(ep->getCont(), + circumfix, ep->getContLen())) && + (sptr->getCont() && (TESTAFF(sptr->getCont(),circumfix,sptr->getContLen()))))) && + // fogemorpheme + (in_compound || + !((sptr->getCont() && (TESTAFF(sptr->getCont(), onlyincompound, sptr->getContLen()))))) && + // needaffix on first suffix + (cclass || !(sptr->getCont() && + TESTAFF(sptr->getCont(), needaffix, sptr->getContLen()))) + )) rv = sptr->checkword(word,len, sfxopts, ppfx, NULL, 0, 0, cclass, needflag); + while (rv) { + if (ppfx) { + if (ppfx->getMorph()) { + mystrcat(result, ppfx->getMorph(), MAXLNLEN); + mystrcat(result, " ", MAXLNLEN); + } else debugflag(result, ppfx->getFlag()); + } + if (complexprefixes && HENTRY_DATA(rv)) mystrcat(result, HENTRY_DATA2(rv), MAXLNLEN); + if (! HENTRY_FIND(rv, MORPH_STEM)) { + mystrcat(result, " ", MAXLNLEN); + mystrcat(result, MORPH_STEM, MAXLNLEN); + mystrcat(result, HENTRY_WORD(rv), MAXLNLEN); + } + // store the pointer of the hash entry +// sprintf(result + strlen(result), " %s%p", MORPH_HENTRY, rv); + + if (!complexprefixes && HENTRY_DATA(rv)) { + mystrcat(result, " ", MAXLNLEN); + mystrcat(result, HENTRY_DATA2(rv), MAXLNLEN); + } + + if (sptr->getMorph()) { + mystrcat(result, " ", MAXLNLEN); + mystrcat(result, sptr->getMorph(), MAXLNLEN); + } else debugflag(result, sptr->getFlag()); + mystrcat(result, "\n", MAXLNLEN); + rv = sptr->get_next_homonym(rv, sfxopts, ppfx, cclass, needflag); + } + sptr = sptr->getNextEQ(); + } else { + sptr = sptr->getNextNE(); + } + } + + if (*result) return mystrdup(result); + return NULL; +} + +// check if word with affixes is correctly spelled +struct hentry * AffixMgr::affix_check (const char * word, int len, const FLAG needflag, char in_compound) +{ + struct hentry * rv= NULL; + + // check all prefixes (also crossed with suffixes if allowed) + rv = prefix_check(word, len, in_compound, needflag); + if (rv) return rv; + + // if still not found check all suffixes + rv = suffix_check(word, len, 0, NULL, NULL, 0, NULL, FLAG_NULL, needflag, in_compound); + + if (havecontclass) { + sfx = NULL; + pfx = NULL; + + if (rv) return rv; + // if still not found check all two-level suffixes + rv = suffix_check_twosfx(word, len, 0, NULL, needflag); + + if (rv) return rv; + // if still not found check all two-level suffixes + rv = prefix_check_twosfx(word, len, IN_CPD_NOT, needflag); + } + + return rv; +} + +// check if word with affixes is correctly spelled +char * AffixMgr::affix_check_morph(const char * word, int len, const FLAG needflag, char in_compound) +{ + char result[MAXLNLEN]; + char * st = NULL; + + *result = '\0'; + + // check all prefixes (also crossed with suffixes if allowed) + st = prefix_check_morph(word, len, in_compound); + if (st) { + mystrcat(result, st, MAXLNLEN); + free(st); + } + + // if still not found check all suffixes + st = suffix_check_morph(word, len, 0, NULL, '\0', needflag, in_compound); + if (st) { + mystrcat(result, st, MAXLNLEN); + free(st); + } + + if (havecontclass) { + sfx = NULL; + pfx = NULL; + // if still not found check all two-level suffixes + st = suffix_check_twosfx_morph(word, len, 0, NULL, needflag); + if (st) { + mystrcat(result, st, MAXLNLEN); + free(st); + } + + // if still not found check all two-level suffixes + st = prefix_check_twosfx_morph(word, len, IN_CPD_NOT, needflag); + if (st) { + mystrcat(result, st, MAXLNLEN); + free(st); + } + } + + return mystrdup(result); +} + +char * AffixMgr::morphgen(char * ts, int wl, const unsigned short * ap, + unsigned short al, char * morph, char * targetmorph, int level) +{ + // handle suffixes + char * stemmorph; + char * stemmorphcatpos; + char mymorph[MAXLNLEN]; + + if (!morph) return NULL; + + // check substandard flag + if (TESTAFF(ap, substandard, al)) return NULL; + + if (morphcmp(morph, targetmorph) == 0) return mystrdup(ts); + +// int targetcount = get_sfxcount(targetmorph); + + // use input suffix fields, if exist + if (strstr(morph, MORPH_INFL_SFX) || strstr(morph, MORPH_DERI_SFX)) { + stemmorph = mymorph; + strcpy(stemmorph, morph); + mystrcat(stemmorph, " ", MAXLNLEN); + stemmorphcatpos = stemmorph + strlen(stemmorph); + } else { + stemmorph = morph; + stemmorphcatpos = NULL; + } + + for (int i = 0; i < al; i++) { + const unsigned char c = (unsigned char) (ap[i] & 0x00FF); + SfxEntry * sptr = sFlag[c]; + while (sptr) { + if (sptr->getFlag() == ap[i] && sptr->getMorph() && ((sptr->getContLen() == 0) || + // don't generate forms with substandard affixes + !TESTAFF(sptr->getCont(), substandard, sptr->getContLen()))) { + + if (stemmorphcatpos) strcpy(stemmorphcatpos, sptr->getMorph()); + else stemmorph = (char *) sptr->getMorph(); + + int cmp = morphcmp(stemmorph, targetmorph); + + if (cmp == 0) { + char * newword = sptr->add(ts, wl); + if (newword) { + hentry * check = pHMgr->lookup(newword); // XXX extra dic + if (!check || !check->astr || + !(TESTAFF(check->astr, forbiddenword, check->alen) || + TESTAFF(check->astr, ONLYUPCASEFLAG, check->alen))) { + return newword; + } + free(newword); + } + } + + // recursive call for secondary suffixes + if ((level == 0) && (cmp == 1) && (sptr->getContLen() > 0) && +// (get_sfxcount(stemmorph) < targetcount) && + !TESTAFF(sptr->getCont(), substandard, sptr->getContLen())) { + char * newword = sptr->add(ts, wl); + if (newword) { + char * newword2 = morphgen(newword, strlen(newword), sptr->getCont(), + sptr->getContLen(), stemmorph, targetmorph, 1); + + if (newword2) { + free(newword); + return newword2; + } + free(newword); + newword = NULL; + } + } + } + sptr = sptr->getFlgNxt(); + } + } + return NULL; +} + + +int AffixMgr::expand_rootword(struct guessword * wlst, int maxn, const char * ts, + int wl, const unsigned short * ap, unsigned short al, char * bad, int badl, + char * phon) +{ + int nh=0; + // first add root word to list + if ((nh < maxn) && !(al && ((needaffix && TESTAFF(ap, needaffix, al)) || + (onlyincompound && TESTAFF(ap, onlyincompound, al))))) { + wlst[nh].word = mystrdup(ts); + if (!wlst[nh].word) return 0; + wlst[nh].allow = (1 == 0); + wlst[nh].orig = NULL; + nh++; + // add special phonetic version + if (phon && (nh < maxn)) { + wlst[nh].word = mystrdup(phon); + if (!wlst[nh].word) return nh - 1; + wlst[nh].allow = (1 == 0); + wlst[nh].orig = mystrdup(ts); + if (!wlst[nh].orig) return nh - 1; + nh++; + } + } + + // handle suffixes + for (int i = 0; i < al; i++) { + const unsigned char c = (unsigned char) (ap[i] & 0x00FF); + SfxEntry * sptr = sFlag[c]; + while (sptr) { + if ((sptr->getFlag() == ap[i]) && (!sptr->getKeyLen() || ((badl > sptr->getKeyLen()) && + (strcmp(sptr->getAffix(), bad + badl - sptr->getKeyLen()) == 0))) && + // check needaffix flag + !(sptr->getCont() && ((needaffix && + TESTAFF(sptr->getCont(), needaffix, sptr->getContLen())) || + (circumfix && + TESTAFF(sptr->getCont(), circumfix, sptr->getContLen())) || + (onlyincompound && + TESTAFF(sptr->getCont(), onlyincompound, sptr->getContLen())))) + ) { + char * newword = sptr->add(ts, wl); + if (newword) { + if (nh < maxn) { + wlst[nh].word = newword; + wlst[nh].allow = sptr->allowCross(); + wlst[nh].orig = NULL; + nh++; + // add special phonetic version + if (phon && (nh < maxn)) { + char st[MAXWORDUTF8LEN]; + strcpy(st, phon); + strcat(st, sptr->getKey()); + reverseword(st + strlen(phon)); + wlst[nh].word = mystrdup(st); + if (!wlst[nh].word) return nh - 1; + wlst[nh].allow = (1 == 0); + wlst[nh].orig = mystrdup(newword); + if (!wlst[nh].orig) return nh - 1; + nh++; + } + } else { + free(newword); + } + } + } + sptr = sptr->getFlgNxt(); + } + } + + int n = nh; + + // handle cross products of prefixes and suffixes + for (int j=1;jgetFlag() == ap[k]) && cptr->allowCross() && (!cptr->getKeyLen() || ((badl > cptr->getKeyLen()) && + (strncmp(cptr->getKey(), bad, cptr->getKeyLen()) == 0)))) { + int l1 = strlen(wlst[j].word); + char * newword = cptr->add(wlst[j].word, l1); + if (newword) { + if (nh < maxn) { + wlst[nh].word = newword; + wlst[nh].allow = cptr->allowCross(); + wlst[nh].orig = NULL; + nh++; + } else { + free(newword); + } + } + } + cptr = cptr->getFlgNxt(); + } + } + } + + + // now handle pure prefixes + for (int m = 0; m < al; m ++) { + const unsigned char c = (unsigned char) (ap[m] & 0x00FF); + PfxEntry * ptr = pFlag[c]; + while (ptr) { + if ((ptr->getFlag() == ap[m]) && (!ptr->getKeyLen() || ((badl > ptr->getKeyLen()) && + (strncmp(ptr->getKey(), bad, ptr->getKeyLen()) == 0))) && + // check needaffix flag + !(ptr->getCont() && ((needaffix && + TESTAFF(ptr->getCont(), needaffix, ptr->getContLen())) || + (circumfix && + TESTAFF(ptr->getCont(), circumfix, ptr->getContLen())) || + (onlyincompound && + TESTAFF(ptr->getCont(), onlyincompound, ptr->getContLen())))) + ) { + char * newword = ptr->add(ts, wl); + if (newword) { + if (nh < maxn) { + wlst[nh].word = newword; + wlst[nh].allow = ptr->allowCross(); + wlst[nh].orig = NULL; + nh++; + } else { + free(newword); + } + } + } + ptr = ptr->getFlgNxt(); + } + } + + return nh; +} + +// return length of replacing table +int AffixMgr::get_numrep() const +{ + return numrep; +} + +// return replacing table +struct replentry * AffixMgr::get_reptable() const +{ + if (! reptable ) return NULL; + return reptable; +} + +// return iconv table +RepList * AffixMgr::get_iconvtable() const +{ + if (! iconvtable ) return NULL; + return iconvtable; +} + +// return oconv table +RepList * AffixMgr::get_oconvtable() const +{ + if (! oconvtable ) return NULL; + return oconvtable; +} + +// return replacing table +struct phonetable * AffixMgr::get_phonetable() const +{ + if (! phone ) return NULL; + return phone; +} + +// return length of character map table +int AffixMgr::get_nummap() const +{ + return nummap; +} + +// return character map table +struct mapentry * AffixMgr::get_maptable() const +{ + if (! maptable ) return NULL; + return maptable; +} + +// return length of word break table +int AffixMgr::get_numbreak() const +{ + return numbreak; +} + +// return character map table +char ** AffixMgr::get_breaktable() const +{ + if (! breaktable ) return NULL; + return breaktable; +} + +// return text encoding of dictionary +char * AffixMgr::get_encoding() +{ + if (! encoding ) encoding = mystrdup(SPELL_ENCODING); + return mystrdup(encoding); +} + +// return text encoding of dictionary +int AffixMgr::get_langnum() const +{ + return langnum; +} + +// return double prefix option +int AffixMgr::get_complexprefixes() const +{ + return complexprefixes; +} + +// return FULLSTRIP option +int AffixMgr::get_fullstrip() const +{ + return fullstrip; +} + +FLAG AffixMgr::get_keepcase() const +{ + return keepcase; +} + +FLAG AffixMgr::get_forceucase() const +{ + return forceucase; +} + +FLAG AffixMgr::get_warn() const +{ + return warn; +} + +int AffixMgr::get_forbidwarn() const +{ + return forbidwarn; +} + +int AffixMgr::get_checksharps() const +{ + return checksharps; +} + +char * AffixMgr::encode_flag(unsigned short aflag) const +{ + return pHMgr->encode_flag(aflag); +} + + +// return the preferred ignore string for suggestions +char * AffixMgr::get_ignore() const +{ + if (!ignorechars) return NULL; + return ignorechars; +} + +// return the preferred ignore string for suggestions +unsigned short * AffixMgr::get_ignore_utf16(int * len) const +{ + *len = ignorechars_utf16_len; + return ignorechars_utf16; +} + +// return the keyboard string for suggestions +char * AffixMgr::get_key_string() +{ + if (! keystring ) keystring = mystrdup(SPELL_KEYSTRING); + return mystrdup(keystring); +} + +// return the preferred try string for suggestions +char * AffixMgr::get_try_string() const +{ + if (! trystring ) return NULL; + return mystrdup(trystring); +} + +// return the preferred try string for suggestions +const char * AffixMgr::get_wordchars() const +{ + return wordchars; +} + +unsigned short * AffixMgr::get_wordchars_utf16(int * len) const +{ + *len = wordchars_utf16_len; + return wordchars_utf16; +} + +// is there compounding? +int AffixMgr::get_compound() const +{ + return compoundflag || compoundbegin || numdefcpd; +} + +// return the compound words control flag +FLAG AffixMgr::get_compoundflag() const +{ + return compoundflag; +} + +// return the forbidden words control flag +FLAG AffixMgr::get_forbiddenword() const +{ + return forbiddenword; +} + +// return the forbidden words control flag +FLAG AffixMgr::get_nosuggest() const +{ + return nosuggest; +} + +// return the forbidden words control flag +FLAG AffixMgr::get_nongramsuggest() const +{ + return nongramsuggest; +} + +// return the forbidden words flag modify flag +FLAG AffixMgr::get_needaffix() const +{ + return needaffix; +} + +// return the onlyincompound flag +FLAG AffixMgr::get_onlyincompound() const +{ + return onlyincompound; +} + +// return the compound word signal flag +FLAG AffixMgr::get_compoundroot() const +{ + return compoundroot; +} + +// return the compound begin signal flag +FLAG AffixMgr::get_compoundbegin() const +{ + return compoundbegin; +} + +// return the value of checknum +int AffixMgr::get_checknum() const +{ + return checknum; +} + +// return the value of prefix +const char * AffixMgr::get_prefix() const +{ + if (pfx) return pfx->getKey(); + return NULL; +} + +// return the value of suffix +const char * AffixMgr::get_suffix() const +{ + return sfxappnd; +} + +// return the value of suffix +const char * AffixMgr::get_version() const +{ + return version; +} + +// return lemma_present flag +FLAG AffixMgr::get_lemma_present() const +{ + return lemma_present; +} + +// utility method to look up root words in hash table +struct hentry * AffixMgr::lookup(const char * word) +{ + int i; + struct hentry * he = NULL; + for (i = 0; i < *maxdic && !he; i++) { + he = (alldic[i])->lookup(word); + } + return he; +} + +// return the value of suffix +int AffixMgr::have_contclass() const +{ + return havecontclass; +} + +// return utf8 +int AffixMgr::get_utf8() const +{ + return utf8; +} + +int AffixMgr::get_maxngramsugs(void) const +{ + return maxngramsugs; +} + +int AffixMgr::get_maxcpdsugs(void) const +{ + return maxcpdsugs; +} + +int AffixMgr::get_maxdiff(void) const +{ + return maxdiff; +} + +int AffixMgr::get_onlymaxdiff(void) const +{ + return onlymaxdiff; +} + +// return nosplitsugs +int AffixMgr::get_nosplitsugs(void) const +{ + return nosplitsugs; +} + +// return sugswithdots +int AffixMgr::get_sugswithdots(void) const +{ + return sugswithdots; +} + +/* parse flag */ +int AffixMgr::parse_flag(char * line, unsigned short * out, FileMgr * af) { + char * s = NULL; + if (*out != FLAG_NULL && !(*out >= DEFAULTFLAGS)) { + HUNSPELL_WARNING(stderr, "error: line %d: multiple definitions of an affix file parameter\n", af->getlinenum()); + return 1; + } + if (parse_string(line, &s, af->getlinenum())) return 1; + *out = pHMgr->decode_flag(s); + free(s); + return 0; +} + +/* parse num */ +int AffixMgr::parse_num(char * line, int * out, FileMgr * af) { + char * s = NULL; + if (*out != -1) { + HUNSPELL_WARNING(stderr, "error: line %d: multiple definitions of an affix file parameter\n", af->getlinenum()); + return 1; + } + if (parse_string(line, &s, af->getlinenum())) return 1; + *out = atoi(s); + free(s); + return 0; +} + +/* parse in the max syllablecount of compound words and */ +int AffixMgr::parse_cpdsyllable(char * line, FileMgr * af) +{ + char * tp = line; + char * piece; + int i = 0; + int np = 0; + w_char w[MAXWORDLEN]; + piece = mystrsep(&tp, 0); + while (piece) { + if (*piece != '\0') { + switch(i) { + case 0: { np++; break; } + case 1: { cpdmaxsyllable = atoi(piece); np++; break; } + case 2: { + if (!utf8) { + cpdvowels = mystrdup(piece); + } else { + int n = u8_u16(w, MAXWORDLEN, piece); + if (n > 0) { + flag_qsort((unsigned short *) w, 0, n); + cpdvowels_utf16 = (w_char *) malloc(n * sizeof(w_char)); + if (!cpdvowels_utf16) return 1; + memcpy(cpdvowels_utf16, w, n * sizeof(w_char)); + } + cpdvowels_utf16_len = n; + } + np++; + break; + } + default: break; + } + i++; + } + piece = mystrsep(&tp, 0); + } + if (np < 2) { + HUNSPELL_WARNING(stderr, "error: line %d: missing compoundsyllable information\n", af->getlinenum()); + return 1; + } + if (np == 2) cpdvowels = mystrdup("aeiouAEIOU"); + return 0; +} + +/* parse in the typical fault correcting table */ +int AffixMgr::parse_reptable(char * line, FileMgr * af) +{ + if (numrep != 0) { + HUNSPELL_WARNING(stderr, "error: line %d: multiple table definitions\n", af->getlinenum()); + return 1; + } + char * tp = line; + char * piece; + int i = 0; + int np = 0; + piece = mystrsep(&tp, 0); + while (piece) { + if (*piece != '\0') { + switch(i) { + case 0: { np++; break; } + case 1: { + numrep = atoi(piece); + if (numrep < 1) { + HUNSPELL_WARNING(stderr, "error: line %d: incorrect entry number\n", af->getlinenum()); + return 1; + } + reptable = (replentry *) malloc(numrep * sizeof(struct replentry)); + if (!reptable) return 1; + np++; + break; + } + default: break; + } + i++; + } + piece = mystrsep(&tp, 0); + } + if (np != 2) { + HUNSPELL_WARNING(stderr, "error: line %d: missing data\n", af->getlinenum()); + return 1; + } + + /* now parse the numrep lines to read in the remainder of the table */ + char * nl; + for (int j=0; j < numrep; j++) { + if (!(nl = af->getline())) return 1; + mychomp(nl); + tp = nl; + i = 0; + reptable[j].pattern = NULL; + reptable[j].pattern2 = NULL; + piece = mystrsep(&tp, 0); + while (piece) { + if (*piece != '\0') { + switch(i) { + case 0: { + if (strncmp(piece,"REP",3) != 0) { + HUNSPELL_WARNING(stderr, "error: line %d: table is corrupt\n", af->getlinenum()); + numrep = 0; + return 1; + } + break; + } + case 1: { + if (*piece == '^') reptable[j].start = true; else reptable[j].start = false; + reptable[j].pattern = mystrrep(mystrdup(piece + int(reptable[j].start)),"_"," "); + int lr = strlen(reptable[j].pattern) - 1; + if (reptable[j].pattern[lr] == '$') { + reptable[j].end = true; + reptable[j].pattern[lr] = '\0'; + } else reptable[j].end = false; + break; + } + case 2: { reptable[j].pattern2 = mystrrep(mystrdup(piece),"_"," "); break; } + default: break; + } + i++; + } + piece = mystrsep(&tp, 0); + } + if ((!(reptable[j].pattern)) || (!(reptable[j].pattern2))) { + HUNSPELL_WARNING(stderr, "error: line %d: table is corrupt\n", af->getlinenum()); + numrep = 0; + return 1; + } + } + return 0; +} + +/* parse in the typical fault correcting table */ +int AffixMgr::parse_convtable(char * line, FileMgr * af, RepList ** rl, const char * keyword) +{ + if (*rl) { + HUNSPELL_WARNING(stderr, "error: line %d: multiple table definitions\n", af->getlinenum()); + return 1; + } + char * tp = line; + char * piece; + int i = 0; + int np = 0; + int numrl = 0; + piece = mystrsep(&tp, 0); + while (piece) { + if (*piece != '\0') { + switch(i) { + case 0: { np++; break; } + case 1: { + numrl = atoi(piece); + if (numrl < 1) { + HUNSPELL_WARNING(stderr, "error: line %d: incorrect entry number\n", af->getlinenum()); + return 1; + } + *rl = new RepList(numrl); + if (!*rl) return 1; + np++; + break; + } + default: break; + } + i++; + } + piece = mystrsep(&tp, 0); + } + if (np != 2) { + HUNSPELL_WARNING(stderr, "error: line %d: missing data\n", af->getlinenum()); + return 1; + } + + /* now parse the num lines to read in the remainder of the table */ + char * nl; + for (int j=0; j < numrl; j++) { + if (!(nl = af->getline())) return 1; + mychomp(nl); + tp = nl; + i = 0; + char * pattern = NULL; + char * pattern2 = NULL; + piece = mystrsep(&tp, 0); + while (piece) { + if (*piece != '\0') { + switch(i) { + case 0: { + if (strncmp(piece, keyword, sizeof(keyword)) != 0) { + HUNSPELL_WARNING(stderr, "error: line %d: table is corrupt\n", af->getlinenum()); + delete *rl; + *rl = NULL; + return 1; + } + break; + } + case 1: { pattern = mystrrep(mystrdup(piece),"_"," "); break; } + case 2: { + pattern2 = mystrrep(mystrdup(piece),"_"," "); + break; + } + default: break; + } + i++; + } + piece = mystrsep(&tp, 0); + } + if (!pattern || !pattern2) { + if (pattern) + free(pattern); + if (pattern2) + free(pattern2); + HUNSPELL_WARNING(stderr, "error: line %d: table is corrupt\n", af->getlinenum()); + return 1; + } + (*rl)->add(pattern, pattern2); + } + return 0; +} + + +/* parse in the typical fault correcting table */ +int AffixMgr::parse_phonetable(char * line, FileMgr * af) +{ + if (phone) { + HUNSPELL_WARNING(stderr, "error: line %d: multiple table definitions\n", af->getlinenum()); + return 1; + } + char * tp = line; + char * piece; + int i = 0; + int np = 0; + piece = mystrsep(&tp, 0); + while (piece) { + if (*piece != '\0') { + switch(i) { + case 0: { np++; break; } + case 1: { + phone = (phonetable *) malloc(sizeof(struct phonetable)); + if (!phone) return 1; + phone->num = atoi(piece); + phone->rules = NULL; + phone->utf8 = (char) utf8; + if (phone->num < 1) { + HUNSPELL_WARNING(stderr, "error: line %d: bad entry number\n", af->getlinenum()); + return 1; + } + phone->rules = (char * *) malloc(2 * (phone->num + 1) * sizeof(char *)); + if (!phone->rules) { + free(phone); + phone = NULL; + return 1; + } + np++; + break; + } + default: break; + } + i++; + } + piece = mystrsep(&tp, 0); + } + if (np != 2) { + HUNSPELL_WARNING(stderr, "error: line %d: missing data\n", af->getlinenum()); + return 1; + } + + /* now parse the phone->num lines to read in the remainder of the table */ + char * nl; + for (int j=0; j < phone->num; j++) { + if (!(nl = af->getline())) return 1; + mychomp(nl); + tp = nl; + i = 0; + phone->rules[j * 2] = NULL; + phone->rules[j * 2 + 1] = NULL; + piece = mystrsep(&tp, 0); + while (piece) { + if (*piece != '\0') { + switch(i) { + case 0: { + if (strncmp(piece,"PHONE",5) != 0) { + HUNSPELL_WARNING(stderr, "error: line %d: table is corrupt\n", af->getlinenum()); + phone->num = 0; + return 1; + } + break; + } + case 1: { phone->rules[j * 2] = mystrrep(mystrdup(piece),"_",""); break; } + case 2: { phone->rules[j * 2 + 1] = mystrrep(mystrdup(piece),"_",""); break; } + default: break; + } + i++; + } + piece = mystrsep(&tp, 0); + } + if ((!(phone->rules[j * 2])) || (!(phone->rules[j * 2 + 1]))) { + HUNSPELL_WARNING(stderr, "error: line %d: table is corrupt\n", af->getlinenum()); + phone->num = 0; + return 1; + } + } + phone->rules[phone->num * 2] = mystrdup(""); + phone->rules[phone->num * 2 + 1] = mystrdup(""); + init_phonet_hash(*phone); + return 0; +} + +/* parse in the checkcompoundpattern table */ +int AffixMgr::parse_checkcpdtable(char * line, FileMgr * af) +{ + if (numcheckcpd != 0) { + HUNSPELL_WARNING(stderr, "error: line %d: multiple table definitions\n", af->getlinenum()); + return 1; + } + char * tp = line; + char * piece; + int i = 0; + int np = 0; + piece = mystrsep(&tp, 0); + while (piece) { + if (*piece != '\0') { + switch(i) { + case 0: { np++; break; } + case 1: { + numcheckcpd = atoi(piece); + if (numcheckcpd < 1) { + HUNSPELL_WARNING(stderr, "error: line %d: bad entry number\n", af->getlinenum()); + return 1; + } + checkcpdtable = (patentry *) malloc(numcheckcpd * sizeof(struct patentry)); + if (!checkcpdtable) return 1; + np++; + break; + } + default: break; + } + i++; + } + piece = mystrsep(&tp, 0); + } + if (np != 2) { + HUNSPELL_WARNING(stderr, "error: line %d: missing data\n", af->getlinenum()); + return 1; + } + + /* now parse the numcheckcpd lines to read in the remainder of the table */ + char * nl; + for (int j=0; j < numcheckcpd; j++) { + if (!(nl = af->getline())) return 1; + mychomp(nl); + tp = nl; + i = 0; + checkcpdtable[j].pattern = NULL; + checkcpdtable[j].pattern2 = NULL; + checkcpdtable[j].pattern3 = NULL; + checkcpdtable[j].cond = FLAG_NULL; + checkcpdtable[j].cond2 = FLAG_NULL; + piece = mystrsep(&tp, 0); + while (piece) { + if (*piece != '\0') { + switch(i) { + case 0: { + if (strncmp(piece,"CHECKCOMPOUNDPATTERN",20) != 0) { + HUNSPELL_WARNING(stderr, "error: line %d: table is corrupt\n", af->getlinenum()); + numcheckcpd = 0; + return 1; + } + break; + } + case 1: { + checkcpdtable[j].pattern = mystrdup(piece); + char * p = strchr(checkcpdtable[j].pattern, '/'); + if (p) { + *p = '\0'; + checkcpdtable[j].cond = pHMgr->decode_flag(p + 1); + } + break; } + case 2: { + checkcpdtable[j].pattern2 = mystrdup(piece); + char * p = strchr(checkcpdtable[j].pattern2, '/'); + if (p) { + *p = '\0'; + checkcpdtable[j].cond2 = pHMgr->decode_flag(p + 1); + } + break; + } + case 3: { checkcpdtable[j].pattern3 = mystrdup(piece); simplifiedcpd = 1; break; } + default: break; + } + i++; + } + piece = mystrsep(&tp, 0); + } + if ((!(checkcpdtable[j].pattern)) || (!(checkcpdtable[j].pattern2))) { + HUNSPELL_WARNING(stderr, "error: line %d: table is corrupt\n", af->getlinenum()); + numcheckcpd = 0; + return 1; + } + } + return 0; +} + +/* parse in the compound rule table */ +int AffixMgr::parse_defcpdtable(char * line, FileMgr * af) +{ + if (numdefcpd != 0) { + HUNSPELL_WARNING(stderr, "error: line %d: multiple table definitions\n", af->getlinenum()); + return 1; + } + char * tp = line; + char * piece; + int i = 0; + int np = 0; + piece = mystrsep(&tp, 0); + while (piece) { + if (*piece != '\0') { + switch(i) { + case 0: { np++; break; } + case 1: { + numdefcpd = atoi(piece); + if (numdefcpd < 1) { + HUNSPELL_WARNING(stderr, "error: line %d: bad entry number\n", af->getlinenum()); + return 1; + } + defcpdtable = (flagentry *) malloc(numdefcpd * sizeof(flagentry)); + if (!defcpdtable) return 1; + np++; + break; + } + default: break; + } + i++; + } + piece = mystrsep(&tp, 0); + } + if (np != 2) { + HUNSPELL_WARNING(stderr, "error: line %d: missing data\n", af->getlinenum()); + return 1; + } + + /* now parse the numdefcpd lines to read in the remainder of the table */ + char * nl; + for (int j=0; j < numdefcpd; j++) { + if (!(nl = af->getline())) return 1; + mychomp(nl); + tp = nl; + i = 0; + defcpdtable[j].def = NULL; + piece = mystrsep(&tp, 0); + while (piece) { + if (*piece != '\0') { + switch(i) { + case 0: { + if (strncmp(piece, "COMPOUNDRULE", 12) != 0) { + HUNSPELL_WARNING(stderr, "error: line %d: table is corrupt\n", af->getlinenum()); + numdefcpd = 0; + return 1; + } + break; + } + case 1: { // handle parenthesized flags + if (strchr(piece, '(')) { + defcpdtable[j].def = (FLAG *) malloc(strlen(piece) * sizeof(FLAG)); + defcpdtable[j].len = 0; + int end = 0; + FLAG * conv; + while (!end) { + char * par = piece + 1; + while (*par != '(' && *par != ')' && *par != '\0') par++; + if (*par == '\0') end = 1; else *par = '\0'; + if (*piece == '(') piece++; + if (*piece == '*' || *piece == '?') { + defcpdtable[j].def[defcpdtable[j].len++] = (FLAG) *piece; + } else if (*piece != '\0') { + int l = pHMgr->decode_flags(&conv, piece, af); + for (int k = 0; k < l; k++) defcpdtable[j].def[defcpdtable[j].len++] = conv[k]; + free(conv); + } + piece = par + 1; + } + } else { + defcpdtable[j].len = pHMgr->decode_flags(&(defcpdtable[j].def), piece, af); + } + break; + } + default: break; + } + i++; + } + piece = mystrsep(&tp, 0); + } + if (!defcpdtable[j].len) { + HUNSPELL_WARNING(stderr, "error: line %d: table is corrupt\n", af->getlinenum()); + numdefcpd = 0; + return 1; + } + } + return 0; +} + + +/* parse in the character map table */ +int AffixMgr::parse_maptable(char * line, FileMgr * af) +{ + if (nummap != 0) { + HUNSPELL_WARNING(stderr, "error: line %d: multiple table definitions\n", af->getlinenum()); + return 1; + } + char * tp = line; + char * piece; + int i = 0; + int np = 0; + piece = mystrsep(&tp, 0); + while (piece) { + if (*piece != '\0') { + switch(i) { + case 0: { np++; break; } + case 1: { + nummap = atoi(piece); + if (nummap < 1) { + HUNSPELL_WARNING(stderr, "error: line %d: bad entry number\n", af->getlinenum()); + return 1; + } + maptable = (mapentry *) malloc(nummap * sizeof(struct mapentry)); + if (!maptable) return 1; + np++; + break; + } + default: break; + } + i++; + } + piece = mystrsep(&tp, 0); + } + if (np != 2) { + HUNSPELL_WARNING(stderr, "error: line %d: missing data\n", af->getlinenum()); + return 1; + } + + /* now parse the nummap lines to read in the remainder of the table */ + char * nl; + for (int j=0; j < nummap; j++) { + if (!(nl = af->getline())) return 1; + mychomp(nl); + tp = nl; + i = 0; + maptable[j].set = NULL; + maptable[j].len = 0; + piece = mystrsep(&tp, 0); + while (piece) { + if (*piece != '\0') { + switch(i) { + case 0: { + if (strncmp(piece,"MAP",3) != 0) { + HUNSPELL_WARNING(stderr, "error: line %d: table is corrupt\n", af->getlinenum()); + nummap = 0; + return 1; + } + break; + } + case 1: { + int setn = 0; + maptable[j].len = strlen(piece); + maptable[j].set = (char **) malloc(maptable[j].len * sizeof(char*)); + if (!maptable[j].set) return 1; + for (int k = 0; k < maptable[j].len; k++) { + int chl = 1; + int chb = k; + if (piece[k] == '(') { + char * parpos = strchr(piece + k, ')'); + if (parpos != NULL) { + chb = k + 1; + chl = (int)(parpos - piece) - k - 1; + k = k + chl + 1; + } + } else { + if (utf8 && (piece[k] & 0xc0) == 0xc0) { + for (k++; utf8 && (piece[k] & 0xc0) == 0x80; k++); + chl = k - chb; + k--; + } + } + maptable[j].set[setn] = (char *) malloc(chl + 1); + if (!maptable[j].set[setn]) return 1; + strncpy(maptable[j].set[setn], piece + chb, chl); + maptable[j].set[setn][chl] = '\0'; + setn++; + } + maptable[j].len = setn; + break; } + default: break; + } + i++; + } + piece = mystrsep(&tp, 0); + } + if (!maptable[j].set || !maptable[j].len) { + HUNSPELL_WARNING(stderr, "error: line %d: table is corrupt\n", af->getlinenum()); + nummap = 0; + return 1; + } + } + return 0; +} + +/* parse in the word breakpoint table */ +int AffixMgr::parse_breaktable(char * line, FileMgr * af) +{ + if (numbreak > -1) { + HUNSPELL_WARNING(stderr, "error: line %d: multiple table definitions\n", af->getlinenum()); + return 1; + } + char * tp = line; + char * piece; + int i = 0; + int np = 0; + piece = mystrsep(&tp, 0); + while (piece) { + if (*piece != '\0') { + switch(i) { + case 0: { np++; break; } + case 1: { + numbreak = atoi(piece); + if (numbreak < 0) { + HUNSPELL_WARNING(stderr, "error: line %d: bad entry number\n", af->getlinenum()); + return 1; + } + if (numbreak == 0) return 0; + breaktable = (char **) malloc(numbreak * sizeof(char *)); + if (!breaktable) return 1; + np++; + break; + } + default: break; + } + i++; + } + piece = mystrsep(&tp, 0); + } + if (np != 2) { + HUNSPELL_WARNING(stderr, "error: line %d: missing data\n", af->getlinenum()); + return 1; + } + + /* now parse the numbreak lines to read in the remainder of the table */ + char * nl; + for (int j=0; j < numbreak; j++) { + if (!(nl = af->getline())) return 1; + mychomp(nl); + tp = nl; + i = 0; + piece = mystrsep(&tp, 0); + while (piece) { + if (*piece != '\0') { + switch(i) { + case 0: { + if (strncmp(piece,"BREAK",5) != 0) { + HUNSPELL_WARNING(stderr, "error: line %d: table is corrupt\n", af->getlinenum()); + numbreak = 0; + return 1; + } + break; + } + case 1: { + breaktable[j] = mystrdup(piece); + break; + } + default: break; + } + i++; + } + piece = mystrsep(&tp, 0); + } + if (!breaktable) { + HUNSPELL_WARNING(stderr, "error: line %d: table is corrupt\n", af->getlinenum()); + numbreak = 0; + return 1; + } + } + return 0; +} + +void AffixMgr::reverse_condition(char * piece) { + int neg = 0; + for (char * k = piece + strlen(piece) - 1; k >= piece; k--) { + switch(*k) { + case '[': { + if (neg) *(k+1) = '['; else *k = ']'; + break; + } + case ']': { + *k = '['; + if (neg) *(k+1) = '^'; + neg = 0; + break; + } + case '^': { + if (*(k+1) == ']') neg = 1; else *(k+1) = *k; + break; + } + default: { + if (neg) *(k+1) = *k; + } + } + } +} + +int AffixMgr::parse_affix(char * line, const char at, FileMgr * af, char * dupflags) +{ + int numents = 0; // number of affentry structures to parse + + unsigned short aflag = 0; // affix char identifier + + char ff=0; + std::vector affentries; + + char * tp = line; + char * nl = line; + char * piece; + int i = 0; + + // checking lines with bad syntax +#ifdef DEBUG + int basefieldnum = 0; +#endif + + // split affix header line into pieces + + int np = 0; + + piece = mystrsep(&tp, 0); + while (piece) { + if (*piece != '\0') { + switch(i) { + // piece 1 - is type of affix + case 0: { np++; break; } + + // piece 2 - is affix char + case 1: { + np++; + aflag = pHMgr->decode_flag(piece); + if (((at == 'S') && (dupflags[aflag] & dupSFX)) || + ((at == 'P') && (dupflags[aflag] & dupPFX))) { + HUNSPELL_WARNING(stderr, "error: line %d: multiple definitions of an affix flag\n", + af->getlinenum()); + // return 1; XXX permissive mode for bad dictionaries + } + dupflags[aflag] += (char) ((at == 'S') ? dupSFX : dupPFX); + break; + } + // piece 3 - is cross product indicator + case 2: { np++; if (*piece == 'Y') ff = aeXPRODUCT; break; } + + // piece 4 - is number of affentries + case 3: { + np++; + numents = atoi(piece); + if (numents == 0) { + char * err = pHMgr->encode_flag(aflag); + if (err) { + HUNSPELL_WARNING(stderr, "error: line %d: bad entry number\n", + af->getlinenum()); + free(err); + } + return 1; + } + affentries.resize(numents); + affentries[0].opts = ff; + if (utf8) affentries[0].opts += aeUTF8; + if (pHMgr->is_aliasf()) affentries[0].opts += aeALIASF; + if (pHMgr->is_aliasm()) affentries[0].opts += aeALIASM; + affentries[0].aflag = aflag; + } + + default: break; + } + i++; + } + piece = mystrsep(&tp, 0); + } + // check to make sure we parsed enough pieces + if (np != 4) { + char * err = pHMgr->encode_flag(aflag); + if (err) { + HUNSPELL_WARNING(stderr, "error: line %d: missing data\n", af->getlinenum()); + free(err); + } + return 1; + } + + // now parse numents affentries for this affix + std::vector::iterator start = affentries.begin(); + std::vector::iterator end = affentries.end(); + for (std::vector::iterator entry = start; entry != end; ++entry) { + if (!(nl = af->getline())) return 1; + mychomp(nl); + tp = nl; + i = 0; + np = 0; + + // split line into pieces + piece = mystrsep(&tp, 0); + while (piece) { + if (*piece != '\0') { + switch(i) { + // piece 1 - is type + case 0: { + np++; + if (entry != start) entry->opts = start->opts & + (char) (aeXPRODUCT + aeUTF8 + aeALIASF + aeALIASM); + break; + } + + // piece 2 - is affix char + case 1: { + np++; + if (pHMgr->decode_flag(piece) != aflag) { + char * err = pHMgr->encode_flag(aflag); + if (err) { + HUNSPELL_WARNING(stderr, "error: line %d: affix %s is corrupt\n", + af->getlinenum(), err); + free(err); + } + return 1; + } + + if (entry != start) entry->aflag = start->aflag; + break; + } + + // piece 3 - is string to strip or 0 for null + case 2: { + np++; + if (complexprefixes) { + if (utf8) reverseword_utf(piece); else reverseword(piece); + } + entry->strip = mystrdup(piece); + entry->stripl = (unsigned char) strlen(entry->strip); + if (strcmp(entry->strip,"0") == 0) { + free(entry->strip); + entry->strip=mystrdup(""); + entry->stripl = 0; + } + break; + } + + // piece 4 - is affix string or 0 for null + case 3: { + char * dash; + entry->morphcode = NULL; + entry->contclass = NULL; + entry->contclasslen = 0; + np++; + dash = strchr(piece, '/'); + if (dash) { + *dash = '\0'; + + if (ignorechars) { + if (utf8) { + remove_ignored_chars_utf(piece, ignorechars_utf16, ignorechars_utf16_len); + } else { + remove_ignored_chars(piece,ignorechars); + } + } + + if (complexprefixes) { + if (utf8) reverseword_utf(piece); else reverseword(piece); + } + entry->appnd = mystrdup(piece); + + if (pHMgr->is_aliasf()) { + int index = atoi(dash + 1); + entry->contclasslen = (unsigned short) pHMgr->get_aliasf(index, &(entry->contclass), af); + if (!entry->contclasslen) HUNSPELL_WARNING(stderr, "error: bad affix flag alias: \"%s\"\n", dash+1); + } else { + entry->contclasslen = (unsigned short) pHMgr->decode_flags(&(entry->contclass), dash + 1, af); + flag_qsort(entry->contclass, 0, entry->contclasslen); + } + *dash = '/'; + + havecontclass = 1; + for (unsigned short _i = 0; _i < entry->contclasslen; _i++) { + contclasses[(entry->contclass)[_i]] = 1; + } + } else { + if (ignorechars) { + if (utf8) { + remove_ignored_chars_utf(piece, ignorechars_utf16, ignorechars_utf16_len); + } else { + remove_ignored_chars(piece,ignorechars); + } + } + + if (complexprefixes) { + if (utf8) reverseword_utf(piece); else reverseword(piece); + } + entry->appnd = mystrdup(piece); + } + + entry->appndl = (unsigned char) strlen(entry->appnd); + if (strcmp(entry->appnd,"0") == 0) { + free(entry->appnd); + entry->appnd=mystrdup(""); + entry->appndl = 0; + } + break; + } + + // piece 5 - is the conditions descriptions + case 4: { + np++; + if (complexprefixes) { + if (utf8) reverseword_utf(piece); else reverseword(piece); + reverse_condition(piece); + } + if (entry->stripl && (strcmp(piece, ".") != 0) && + redundant_condition(at, entry->strip, entry->stripl, piece, af->getlinenum())) + strcpy(piece, "."); + if (at == 'S') { + reverseword(piece); + reverse_condition(piece); + } + if (encodeit(*entry, piece)) return 1; + break; + } + + case 5: { + np++; + if (pHMgr->is_aliasm()) { + int index = atoi(piece); + entry->morphcode = pHMgr->get_aliasm(index); + } else { + if (complexprefixes) { // XXX - fix me for morph. gen. + if (utf8) reverseword_utf(piece); else reverseword(piece); + } + // add the remaining of the line + if (*tp) { + *(tp - 1) = ' '; + tp = tp + strlen(tp); + } + entry->morphcode = mystrdup(piece); + if (!entry->morphcode) return 1; + } + break; + } + default: break; + } + i++; + } + piece = mystrsep(&tp, 0); + } + // check to make sure we parsed enough pieces + if (np < 4) { + char * err = pHMgr->encode_flag(aflag); + if (err) { + HUNSPELL_WARNING(stderr, "error: line %d: affix %s is corrupt\n", + af->getlinenum(), err); + free(err); + } + return 1; + } + +#ifdef DEBUG + // detect unnecessary fields, excepting comments + if (basefieldnum) { + int fieldnum = !(entry->morphcode) ? 5 : ((*(entry->morphcode)=='#') ? 5 : 6); + if (fieldnum != basefieldnum) + HUNSPELL_WARNING(stderr, "warning: line %d: bad field number\n", af->getlinenum()); + } else { + basefieldnum = !(entry->morphcode) ? 5 : ((*(entry->morphcode)=='#') ? 5 : 6); + } +#endif + } + + // now create SfxEntry or PfxEntry objects and use links to + // build an ordered (sorted by affix string) list + for (std::vector::iterator entry = start; entry != end; ++entry) { + if (at == 'P') { + PfxEntry * pfxptr = new PfxEntry(this,&(*entry)); + build_pfxtree(pfxptr); + } else { + SfxEntry * sfxptr = new SfxEntry(this,&(*entry)); + build_sfxtree(sfxptr); + } + } + return 0; +} + +int AffixMgr::redundant_condition(char ft, char * strip, int stripl, const char * cond, int linenum) { + int condl = strlen(cond); + int i; + int j; + int neg; + int in; + if (ft == 'P') { // prefix + if (strncmp(strip, cond, condl) == 0) return 1; + if (utf8) { + } else { + for (i = 0, j = 0; (i < stripl) && (j < condl); i++, j++) { + if (cond[j] != '[') { + if (cond[j] != strip[i]) { + HUNSPELL_WARNING(stderr, "warning: line %d: incompatible stripping characters and condition\n", linenum); + return 0; + } + } else { + neg = (cond[j+1] == '^') ? 1 : 0; + in = 0; + do { + j++; + if (strip[i] == cond[j]) in = 1; + } while ((j < (condl - 1)) && (cond[j] != ']')); + if (j == (condl - 1) && (cond[j] != ']')) { + HUNSPELL_WARNING(stderr, "error: line %d: missing ] in condition:\n%s\n", linenum, cond); + return 0; + } + if ((!neg && !in) || (neg && in)) { + HUNSPELL_WARNING(stderr, "warning: line %d: incompatible stripping characters and condition\n", linenum); + return 0; + } + } + } + if (j >= condl) return 1; + } + } else { // suffix + if ((stripl >= condl) && strcmp(strip + stripl - condl, cond) == 0) return 1; + if (utf8) { + } else { + for (i = stripl - 1, j = condl - 1; (i >= 0) && (j >= 0); i--, j--) { + if (cond[j] != ']') { + if (cond[j] != strip[i]) { + HUNSPELL_WARNING(stderr, "warning: line %d: incompatible stripping characters and condition\n", linenum); + return 0; + } + } else { + in = 0; + do { + j--; + if (strip[i] == cond[j]) in = 1; + } while ((j > 0) && (cond[j] != '[')); + if ((j == 0) && (cond[j] != '[')) { + HUNSPELL_WARNING(stderr, "error: line: %d: missing ] in condition:\n%s\n", linenum, cond); + return 0; + } + neg = (cond[j+1] == '^') ? 1 : 0; + if ((!neg && !in) || (neg && in)) { + HUNSPELL_WARNING(stderr, "warning: line %d: incompatible stripping characters and condition\n", linenum); + return 0; + } + } + } + if (j < 0) return 1; + } + } + return 0; +} diff --git a/plugins/SpellChecker/src/hunspell/affixmgr.hxx b/plugins/SpellChecker/src/hunspell/affixmgr.hxx new file mode 100644 index 0000000000..d9c625aed0 --- /dev/null +++ b/plugins/SpellChecker/src/hunspell/affixmgr.hxx @@ -0,0 +1,250 @@ +#ifndef _AFFIXMGR_HXX_ +#define _AFFIXMGR_HXX_ + +#include "hunvisapi.h" + +#include + +#include "atypes.hxx" +#include "baseaffix.hxx" +#include "hashmgr.hxx" +#include "phonet.hxx" +#include "replist.hxx" + +// check flag duplication +#define dupSFX (1 << 0) +#define dupPFX (1 << 1) + +class PfxEntry; +class SfxEntry; + +class LIBHUNSPELL_DLL_EXPORTED AffixMgr +{ + + PfxEntry * pStart[SETSIZE]; + SfxEntry * sStart[SETSIZE]; + PfxEntry * pFlag[SETSIZE]; + SfxEntry * sFlag[SETSIZE]; + HashMgr * pHMgr; + HashMgr ** alldic; + int * maxdic; + char * keystring; + char * trystring; + char * encoding; + struct cs_info * csconv; + int utf8; + int complexprefixes; + FLAG compoundflag; + FLAG compoundbegin; + FLAG compoundmiddle; + FLAG compoundend; + FLAG compoundroot; + FLAG compoundforbidflag; + FLAG compoundpermitflag; + int checkcompounddup; + int checkcompoundrep; + int checkcompoundcase; + int checkcompoundtriple; + int simplifiedtriple; + FLAG forbiddenword; + FLAG nosuggest; + FLAG nongramsuggest; + FLAG needaffix; + int cpdmin; + int numrep; + replentry * reptable; + RepList * iconvtable; + RepList * oconvtable; + int nummap; + mapentry * maptable; + int numbreak; + char ** breaktable; + int numcheckcpd; + patentry * checkcpdtable; + int simplifiedcpd; + int numdefcpd; + flagentry * defcpdtable; + phonetable * phone; + int maxngramsugs; + int maxcpdsugs; + int maxdiff; + int onlymaxdiff; + int nosplitsugs; + int sugswithdots; + int cpdwordmax; + int cpdmaxsyllable; + char * cpdvowels; + w_char * cpdvowels_utf16; + int cpdvowels_utf16_len; + char * cpdsyllablenum; + const char * pfxappnd; // BUG: not stateless + const char * sfxappnd; // BUG: not stateless + FLAG sfxflag; // BUG: not stateless + char * derived; // BUG: not stateless + SfxEntry * sfx; // BUG: not stateless + PfxEntry * pfx; // BUG: not stateless + int checknum; + char * wordchars; + unsigned short * wordchars_utf16; + int wordchars_utf16_len; + char * ignorechars; + unsigned short * ignorechars_utf16; + int ignorechars_utf16_len; + char * version; + char * lang; + int langnum; + FLAG lemma_present; + FLAG circumfix; + FLAG onlyincompound; + FLAG keepcase; + FLAG forceucase; + FLAG warn; + int forbidwarn; + FLAG substandard; + int checksharps; + int fullstrip; + + int havecontclass; // boolean variable + char contclasses[CONTSIZE]; // flags of possible continuing classes (twofold affix) + +public: + + AffixMgr(const char * affpath, HashMgr** ptr, int * md, + const char * key = NULL); + ~AffixMgr(); + struct hentry * affix_check(const char * word, int len, + const unsigned short needflag = (unsigned short) 0, + char in_compound = IN_CPD_NOT); + struct hentry * prefix_check(const char * word, int len, + char in_compound, const FLAG needflag = FLAG_NULL); + inline int isSubset(const char * s1, const char * s2); + struct hentry * prefix_check_twosfx(const char * word, int len, + char in_compound, const FLAG needflag = FLAG_NULL); + inline int isRevSubset(const char * s1, const char * end_of_s2, int len); + struct hentry * suffix_check(const char * word, int len, int sfxopts, + PfxEntry* ppfx, char ** wlst, int maxSug, int * ns, + const FLAG cclass = FLAG_NULL, const FLAG needflag = FLAG_NULL, + char in_compound = IN_CPD_NOT); + struct hentry * suffix_check_twosfx(const char * word, int len, + int sfxopts, PfxEntry* ppfx, const FLAG needflag = FLAG_NULL); + + char * affix_check_morph(const char * word, int len, + const FLAG needflag = FLAG_NULL, char in_compound = IN_CPD_NOT); + char * prefix_check_morph(const char * word, int len, + char in_compound, const FLAG needflag = FLAG_NULL); + char * suffix_check_morph (const char * word, int len, int sfxopts, + PfxEntry * ppfx, const FLAG cclass = FLAG_NULL, + const FLAG needflag = FLAG_NULL, char in_compound = IN_CPD_NOT); + + char * prefix_check_twosfx_morph(const char * word, int len, + char in_compound, const FLAG needflag = FLAG_NULL); + char * suffix_check_twosfx_morph(const char * word, int len, + int sfxopts, PfxEntry * ppfx, const FLAG needflag = FLAG_NULL); + + char * morphgen(char * ts, int wl, const unsigned short * ap, + unsigned short al, char * morph, char * targetmorph, int level); + + int expand_rootword(struct guessword * wlst, int maxn, const char * ts, + int wl, const unsigned short * ap, unsigned short al, char * bad, + int, char *); + + short get_syllable (const char * word, int wlen); + int cpdrep_check(const char * word, int len); + int cpdpat_check(const char * word, int len, hentry * r1, hentry * r2, + const char affixed); + int defcpd_check(hentry *** words, short wnum, hentry * rv, + hentry ** rwords, char all); + int cpdcase_check(const char * word, int len); + inline int candidate_check(const char * word, int len); + void setcminmax(int * cmin, int * cmax, const char * word, int len); + struct hentry * compound_check(const char * word, int len, short wordnum, + short numsyllable, short maxwordnum, short wnum, hentry ** words, + char hu_mov_rule, char is_sug, int * info); + + int compound_check_morph(const char * word, int len, short wordnum, + short numsyllable, short maxwordnum, short wnum, hentry ** words, + char hu_mov_rule, char ** result, char * partresult); + + struct hentry * lookup(const char * word); + int get_numrep() const; + struct replentry * get_reptable() const; + RepList * get_iconvtable() const; + RepList * get_oconvtable() const; + struct phonetable * get_phonetable() const; + int get_nummap() const; + struct mapentry * get_maptable() const; + int get_numbreak() const; + char ** get_breaktable() const; + char * get_encoding(); + int get_langnum() const; + char * get_key_string(); + char * get_try_string() const; + const char * get_wordchars() const; + unsigned short * get_wordchars_utf16(int * len) const; + char * get_ignore() const; + unsigned short * get_ignore_utf16(int * len) const; + int get_compound() const; + FLAG get_compoundflag() const; + FLAG get_compoundbegin() const; + FLAG get_forbiddenword() const; + FLAG get_nosuggest() const; + FLAG get_nongramsuggest() const; + FLAG get_needaffix() const; + FLAG get_onlyincompound() const; + FLAG get_compoundroot() const; + FLAG get_lemma_present() const; + int get_checknum() const; + const char * get_prefix() const; + const char * get_suffix() const; + const char * get_derived() const; + const char * get_version() const; + int have_contclass() const; + int get_utf8() const; + int get_complexprefixes() const; + char * get_suffixed(char ) const; + int get_maxngramsugs() const; + int get_maxcpdsugs() const; + int get_maxdiff() const; + int get_onlymaxdiff() const; + int get_nosplitsugs() const; + int get_sugswithdots(void) const; + FLAG get_keepcase(void) const; + FLAG get_forceucase(void) const; + FLAG get_warn(void) const; + int get_forbidwarn(void) const; + int get_checksharps(void) const; + char * encode_flag(unsigned short aflag) const; + int get_fullstrip() const; + +private: + int parse_file(const char * affpath, const char * key); + int parse_flag(char * line, unsigned short * out, FileMgr * af); + int parse_num(char * line, int * out, FileMgr * af); + int parse_cpdsyllable(char * line, FileMgr * af); + int parse_reptable(char * line, FileMgr * af); + int parse_convtable(char * line, FileMgr * af, RepList ** rl, const char * keyword); + int parse_phonetable(char * line, FileMgr * af); + int parse_maptable(char * line, FileMgr * af); + int parse_breaktable(char * line, FileMgr * af); + int parse_checkcpdtable(char * line, FileMgr * af); + int parse_defcpdtable(char * line, FileMgr * af); + int parse_affix(char * line, const char at, FileMgr * af, char * dupflags); + + void reverse_condition(char *); + void debugflag(char * result, unsigned short flag); + int condlen(char *); + int encodeit(affentry &entry, char * cs); + int build_pfxtree(PfxEntry* pfxptr); + int build_sfxtree(SfxEntry* sfxptr); + int process_pfx_order(); + int process_sfx_order(); + PfxEntry * process_pfx_in_order(PfxEntry * ptr, PfxEntry * nptr); + SfxEntry * process_sfx_in_order(SfxEntry * ptr, SfxEntry * nptr); + int process_pfx_tree_to_list(); + int process_sfx_tree_to_list(); + int redundant_condition(char, char * strip, int stripl, + const char * cond, int); +}; + +#endif + diff --git a/plugins/SpellChecker/src/hunspell/atypes.hxx b/plugins/SpellChecker/src/hunspell/atypes.hxx new file mode 100644 index 0000000000..df27c4d1cb --- /dev/null +++ b/plugins/SpellChecker/src/hunspell/atypes.hxx @@ -0,0 +1,107 @@ +#ifndef _ATYPES_HXX_ +#define _ATYPES_HXX_ + +#ifndef HUNSPELL_WARNING +#include +#ifdef HUNSPELL_WARNING_ON +#define HUNSPELL_WARNING fprintf +#else +// empty inline function to switch off warnings (instead of the C99 standard variadic macros) +static inline void HUNSPELL_WARNING(FILE *, const char *, ...) {} +#endif +#endif + +// HUNSTEM def. +#define HUNSTEM + +#include "hashmgr.hxx" +#include "w_char.hxx" + +#define SETSIZE 256 +#define CONTSIZE 65536 +#define MAXWORDLEN 100 +#define MAXWORDUTF8LEN 256 + +// affentry options +#define aeXPRODUCT (1 << 0) +#define aeUTF8 (1 << 1) +#define aeALIASF (1 << 2) +#define aeALIASM (1 << 3) +#define aeLONGCOND (1 << 4) + +// compound options +#define IN_CPD_NOT 0 +#define IN_CPD_BEGIN 1 +#define IN_CPD_END 2 +#define IN_CPD_OTHER 3 + +// info options +#define SPELL_COMPOUND (1 << 0) +#define SPELL_FORBIDDEN (1 << 1) +#define SPELL_ALLCAP (1 << 2) +#define SPELL_NOCAP (1 << 3) +#define SPELL_INITCAP (1 << 4) +#define SPELL_ORIGCAP (1 << 5) +#define SPELL_WARN (1 << 6) + +#define MAXLNLEN 8192 + +#define MINCPDLEN 3 +#define MAXCOMPOUND 10 +#define MAXCONDLEN 20 +#define MAXCONDLEN_1 (MAXCONDLEN - sizeof(char *)) + +#define MAXACC 1000 + +#define FLAG unsigned short +#define FLAG_NULL 0x00 +#define FREE_FLAG(a) a = 0 + +#define TESTAFF( a, b , c ) flag_bsearch((unsigned short *) a, (unsigned short) b, c) + +struct affentry +{ + char * strip; + char * appnd; + unsigned char stripl; + unsigned char appndl; + char numconds; + char opts; + unsigned short aflag; + unsigned short * contclass; + short contclasslen; + union { + char conds[MAXCONDLEN]; + struct { + char conds1[MAXCONDLEN_1]; + char * conds2; + } l; + } c; + char * morphcode; +}; + +struct guessword { + char * word; + bool allow; + char * orig; +}; + +struct mapentry { + char ** set; + int len; +}; + +struct flagentry { + FLAG * def; + int len; +}; + +struct patentry { + char * pattern; + char * pattern2; + char * pattern3; + FLAG cond; + FLAG cond2; +}; + +#endif diff --git a/plugins/SpellChecker/src/hunspell/baseaffix.hxx b/plugins/SpellChecker/src/hunspell/baseaffix.hxx new file mode 100644 index 0000000000..ed64f3d84f --- /dev/null +++ b/plugins/SpellChecker/src/hunspell/baseaffix.hxx @@ -0,0 +1,28 @@ +#ifndef _BASEAFF_HXX_ +#define _BASEAFF_HXX_ + +#include "hunvisapi.h" + +class LIBHUNSPELL_DLL_EXPORTED AffEntry +{ +protected: + char * appnd; + char * strip; + unsigned char appndl; + unsigned char stripl; + char numconds; + char opts; + unsigned short aflag; + union { + char conds[MAXCONDLEN]; + struct { + char conds1[MAXCONDLEN_1]; + char * conds2; + } l; + } c; + char * morphcode; + unsigned short * contclass; + short contclasslen; +}; + +#endif diff --git a/plugins/SpellChecker/src/hunspell/config.h b/plugins/SpellChecker/src/hunspell/config.h new file mode 100644 index 0000000000..b2236a30db --- /dev/null +++ b/plugins/SpellChecker/src/hunspell/config.h @@ -0,0 +1,216 @@ +/* config.h.in. Generated from configure.ac by autoheader. */ + + +/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP + systems. This function is required for `alloca.c' support on those systems. + */ +#define CRAY_STACKSEG_END 1 + +/* Define to 1 if using `alloca.c'. */ +#define C_ALLOCA 1 + +/* Define to 1 if translation of program messages to the user's native + language is requested. */ +#undef ENABLE_NLS + +/* Define to 1 if you have `alloca', as a function or macro. */ +#define HAVE_ALLOCA 1 + +/* Define to 1 if you have and it should be used (not on Ultrix). + */ +#define HAVE_ALLOCA_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_ARGZ_H 1 + +/* "Define if you have the header" */ +#undef HAVE_CURSES_H + +/* Define if the GNU dcgettext() function is already present or preinstalled. + */ +#define HAVE_DCGETTEXT 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_ERROR_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_FCNTL_H 1 + +/* Define to 1 if you have the `feof_unlocked' function. */ +#define HAVE_FEOF_UNLOCKED 1 + +/* Define to 1 if you have the `fgets_unlocked' function. */ +#define HAVE_FGETS_UNLOCKED 1 + +/* Define to 1 if you have the `getcwd' function. */ +#define HAVE_GETCWD 1 + +/* Define to 1 if you have the `getc_unlocked' function. */ +#define HAVE_GETC_UNLOCKED 1 + +/* Define to 1 if you have the `getegid' function. */ +#define HAVE_GETEGID 1 + +/* Define to 1 if you have the `geteuid' function. */ +#define HAVE_GETEUID 1 + +/* Define to 1 if you have the `getgid' function. */ +#define HAVE_GETGID 1 + +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + +/* Define if the GNU gettext() function is already present or preinstalled. */ +#define HAVE_GETTEXT 1 + +/* Define to 1 if you have the `getuid' function. */ +#define HAVE_GETUID 1 + +/* Define if you have the iconv() function. */ +#undef HAVE_ICONV + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define if you have and nl_langinfo(CODESET). */ +#define HAVE_LANGINFO_CODESET 1 + +/* Define if your file defines LC_MESSAGES. */ +#define HAVE_LC_MESSAGES 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_LIBINTL_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_LIMITS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_LOCALE_H 1 + +/* Define to 1 if your system has a GNU libc compatible `malloc' function, and + to 0 otherwise. */ +#define HAVE_MALLOC 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MALLOC_H 1 + +/* Define to 1 if you have the `memchr' function. */ +#define HAVE_MEMCHR 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have the `mempcpy' function. */ +#define HAVE_MEMPCPY 1 + +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + +/* Define to 1 if you have the `munmap' function. */ +#define HAVE_MUNMAP 1 + +/* "Define if you have the header" */ +#define HAVE_NCURSESW_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_NL_TYPES_H 1 + +/* Define to 1 if you have the `putenv' function. */ +#define HAVE_PUTENV 1 + +/* "Define if you have fancy command input editing with Readline" */ +#undef HAVE_READLINE + +/* Define to 1 if you have the `setenv' function. */ +#define HAVE_SETENV 1 + +/* Define to 1 if you have the `setlocale' function. */ +#define HAVE_SETLOCALE 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDDEF_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the `stpcpy' function. */ +#define HAVE_STPCPY 1 + +/* Define to 1 if you have the `strcasecmp' function. */ +#define HAVE_STRCASECMP 1 + +/* Define to 1 if you have the `strchr' function. */ +#define HAVE_STRCHR 1 + +/* Define to 1 if you have the `strdup' function. */ +#define HAVE_STRDUP 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the `strstr' function. */ +#define HAVE_STRSTR 1 + +/* Define to 1 if you have the `strtoul' function. */ +#define HAVE_STRTOUL 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the `tsearch' function. */ +#define HAVE_TSEARCH 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to 1 if you have the `__argz_count' function. */ +#define HAVE___ARGZ_COUNT 1 + +/* Define to 1 if you have the `__argz_next' function. */ +#define HAVE___ARGZ_NEXT 1 + +/* Define to 1 if you have the `__argz_stringify' function. */ +#define HAVE___ARGZ_STRINGIFY 1 + +/* "Define if you use exterimental functions" */ +#define HUNSPELL_EXPERIMENTAL 1 + +/* "Define if you need warning messages" */ +#define HUNSPELL_WARNING_ON + +/* Define as const if the declaration of iconv() needs const. */ +#define ICONV_CONST 1 + +/* Name of package */ +#define PACKAGE + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT + +/* Define to the full name of this package. */ +#define PACKAGE_NAME + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "1.3.1" +#define VERSION "1.3.1" diff --git a/plugins/SpellChecker/src/hunspell/csutil.cxx b/plugins/SpellChecker/src/hunspell/csutil.cxx new file mode 100644 index 0000000000..35154a73ed --- /dev/null +++ b/plugins/SpellChecker/src/hunspell/csutil.cxx @@ -0,0 +1,5834 @@ +#include "license.hunspell" +#include "license.myspell" + +#include +#include +#include +#include + +#include "csutil.hxx" +#include "atypes.hxx" +#include "langnum.hxx" + +// Unicode character encoding information +struct unicode_info { + unsigned short c; + unsigned short cupper; + unsigned short clower; +}; + +#ifdef OPENOFFICEORG +# include +#else +# ifndef MOZILLA_CLIENT +# include "utf_info.cxx" +# define UTF_LST_LEN (sizeof(utf_lst) / (sizeof(unicode_info))) +# endif +#endif + +#ifdef MOZILLA_CLIENT +#include "nsCOMPtr.h" +#include "nsServiceManagerUtils.h" +#include "nsIUnicodeEncoder.h" +#include "nsIUnicodeDecoder.h" +#include "nsUnicharUtils.h" +#include "nsICharsetConverterManager.h" + +static NS_DEFINE_CID(kCharsetConverterManagerCID, NS_ICHARSETCONVERTERMANAGER_CID); +#endif + +struct unicode_info2 { + char cletter; + unsigned short cupper; + unsigned short clower; +}; + +static struct unicode_info2 * utf_tbl = NULL; +static int utf_tbl_count = 0; // utf_tbl can be used by multiple Hunspell instances + +/* only UTF-16 (BMP) implementation */ +char * u16_u8(char * dest, int size, const w_char * src, int srclen) { + signed char * u8 = (signed char *)dest; + signed char * u8_max = (signed char *)(u8 + size); + const w_char * u2 = src; + const w_char * u2_max = src + srclen; + while ((u2 < u2_max) && (u8 < u8_max)) { + if (u2->h) { // > 0xFF + // XXX 4-byte haven't implemented yet. + if (u2->h >= 0x08) { // >= 0x800 (3-byte UTF-8 character) + *u8 = 0xe0 + (u2->h >> 4); + u8++; + if (u8 < u8_max) { + *u8 = 0x80 + ((u2->h & 0xf) << 2) + (u2->l >> 6); + u8++; + if (u8 < u8_max) { + *u8 = 0x80 + (u2->l & 0x3f); + u8++; + } + } + } else { // < 0x800 (2-byte UTF-8 character) + *u8 = 0xc0 + (u2->h << 2) + (u2->l >> 6); + u8++; + if (u8 < u8_max) { + *u8 = 0x80 + (u2->l & 0x3f); + u8++; + } + } + } else { // <= 0xFF + if (u2->l & 0x80) { // >0x80 (2-byte UTF-8 character) + *u8 = 0xc0 + (u2->l >> 6); + u8++; + if (u8 < u8_max) { + *u8 = 0x80 + (u2->l & 0x3f); + u8++; + } + } else { // < 0x80 (1-byte UTF-8 character) + *u8 = u2->l; + u8++; + } + } + u2++; + } + *u8 = '\0'; + return dest; +} + + +/* only UTF-16 (BMP) implementation */ +int u8_u16(w_char * dest, int size, const char * src) { + const signed char * u8 = (const signed char *)src; + w_char * u2 = dest; + w_char * u2_max = u2 + size; + + while ((u2 < u2_max) && *u8) { + switch ((*u8) & 0xf0) { + case 0x00: + case 0x10: + case 0x20: + case 0x30: + case 0x40: + case 0x50: + case 0x60: + case 0x70: { + u2->h = 0; + u2->l = *u8; + break; + } + case 0x80: + case 0x90: + case 0xa0: + case 0xb0: { + HUNSPELL_WARNING(stderr, "UTF-8 encoding error. Unexpected continuation bytes in %ld. character position\n%s\n", static_cast(u8 - (signed char *)src), src); + u2->h = 0xff; + u2->l = 0xfd; + break; + } + case 0xc0: + case 0xd0: { // 2-byte UTF-8 codes + if ((*(u8+1) & 0xc0) == 0x80) { + u2->h = (*u8 & 0x1f) >> 2; + u2->l = (*u8 << 6) + (*(u8+1) & 0x3f); + u8++; + } else { + HUNSPELL_WARNING(stderr, "UTF-8 encoding error. Missing continuation byte in %ld. character position:\n%s\n", static_cast(u8 - (signed char *)src), src); + u2->h = 0xff; + u2->l = 0xfd; + } + break; + } + case 0xe0: { // 3-byte UTF-8 codes + if ((*(u8+1) & 0xc0) == 0x80) { + u2->h = ((*u8 & 0x0f) << 4) + ((*(u8+1) & 0x3f) >> 2); + u8++; + if ((*(u8+1) & 0xc0) == 0x80) { + u2->l = (*u8 << 6) + (*(u8+1) & 0x3f); + u8++; + } else { + HUNSPELL_WARNING(stderr, "UTF-8 encoding error. Missing continuation byte in %ld. character position:\n%s\n", static_cast(u8 - (signed char *)src), src); + u2->h = 0xff; + u2->l = 0xfd; + } + } else { + HUNSPELL_WARNING(stderr, "UTF-8 encoding error. Missing continuation byte in %ld. character position:\n%s\n", static_cast(u8 - (signed char *)src), src); + u2->h = 0xff; + u2->l = 0xfd; + } + break; + } + case 0xf0: { // 4 or more byte UTF-8 codes + HUNSPELL_WARNING(stderr, "This UTF-8 encoding can't convert to UTF-16:\n%s\n", src); + u2->h = 0xff; + u2->l = 0xfd; + return -1; + } + } + u8++; + u2++; + } + return (int)(u2 - dest); +} + +void flag_qsort(unsigned short flags[], int begin, int end) { + unsigned short reg; + if (end > begin) { + unsigned short pivot = flags[begin]; + int l = begin + 1; + int r = end; + while(l < r) { + if (flags[l] <= pivot) { + l++; + } else { + r--; + reg = flags[l]; + flags[l] = flags[r]; + flags[r] = reg; + } + } + l--; + reg = flags[begin]; + flags[begin] = flags[l]; + flags[l] = reg; + + flag_qsort(flags, begin, l); + flag_qsort(flags, r, end); + } + } + +int flag_bsearch(unsigned short flags[], unsigned short flag, int length) { + int mid; + int left = 0; + int right = length - 1; + while (left <= right) { + mid = (left + right) / 2; + if (flags[mid] == flag) return 1; + if (flag < flags[mid]) right = mid - 1; + else left = mid + 1; + } + return 0; +} + + // strip strings into token based on single char delimiter + // acts like strsep() but only uses a delim char and not + // a delim string + // default delimiter: white space characters + + char * mystrsep(char ** stringp, const char delim) + { + char * mp = *stringp; + if (*mp != '\0') { + char * dp; + if (delim) { + dp = strchr(mp, delim); + } else { + // don't use isspace() here, the string can be in some random charset + // that's way different than the locale's + for (dp = mp; (*dp && *dp != ' ' && *dp != '\t'); dp++); + if (!*dp) dp = NULL; + } + if (dp) { + *stringp = dp+1; + *dp = '\0'; + } else { + *stringp = mp + strlen(mp); + } + return mp; + } + return NULL; + } + + // replaces strdup with ansi version + char * mystrdup(const char * s) + { + char * d = NULL; + if (s) { + size_t sl = strlen(s)+1; + d = (char *) malloc(sl); + if (d) { + memcpy(d,s,sl); + } else { + HUNSPELL_WARNING(stderr, "Can't allocate memory.\n"); + } + } + return d; + } + + // strcat for limited length destination string + char * mystrcat(char * dest, const char * st, int max) { + int len; + int len2; + if (dest == NULL || st == NULL) return dest; + len = strlen(dest); + len2 = strlen(st); + if (len + len2 + 1 > max) return dest; + strcpy(dest + len, st); + return dest; + } + + // remove cross-platform text line end characters + void mychomp(char * s) + { + size_t k = strlen(s); + if ((k > 0) && ((*(s+k-1)=='\r') || (*(s+k-1)=='\n'))) *(s+k-1) = '\0'; + if ((k > 1) && (*(s+k-2) == '\r')) *(s+k-2) = '\0'; + } + + + // does an ansi strdup of the reverse of a string + char * myrevstrdup(const char * s) + { + char * d = NULL; + if (s) { + size_t sl = strlen(s); + d = (char *) malloc(sl+1); + if (d) { + const char * p = s + sl - 1; + char * q = d; + while (p >= s) *q++ = *p--; + *q = '\0'; + } else { + HUNSPELL_WARNING(stderr, "Can't allocate memory.\n"); + } + } + return d; + } + +// break text to lines +// return number of lines +int line_tok(const char * text, char *** lines, char breakchar) { + int linenum = 0; + if (!text) { + return linenum; + } + char * dup = mystrdup(text); + char * p = strchr(dup, breakchar); + while (p) { + linenum++; + *p = '\0'; + p++; + p = strchr(p, breakchar); + } + linenum++; + *lines = (char **) malloc(linenum * sizeof(char *)); + if (!(*lines)) { + free(dup); + return 0; + } + + p = dup; + int l = 0; + for (int i = 0; i < linenum; i++) { + if (*p != '\0') { + (*lines)[l] = mystrdup(p); + if (!(*lines)[l]) { + for (i = 0; i < l; i++) free((*lines)[i]); + free(dup); + return 0; + } + l++; + } + p += strlen(p) + 1; + } + free(dup); + if (!l) free(*lines); + return l; +} + +// uniq line in place +char * line_uniq(char * text, char breakchar) { + char ** lines; + int linenum = line_tok(text, &lines, breakchar); + int i; + strcpy(text, lines[0]); + for ( i = 1; i < linenum; i++ ) { + int dup = 0; + for (int j = 0; j < i; j++) { + if (strcmp(lines[i], lines[j]) == 0) dup = 1; + } + if (!dup) { + if ((i > 1) || (*(lines[0]) != '\0')) { + sprintf(text + strlen(text), "%c", breakchar); + } + strcat(text, lines[i]); + } + } + for ( i = 0; i < linenum; i++ ) { + if (lines[i]) free(lines[i]); + } + if (lines) free(lines); + return text; +} + +// uniq and boundary for compound analysis: "1\n\2\n\1" -> " ( \1 | \2 ) " +char * line_uniq_app(char ** text, char breakchar) { + if (!strchr(*text, breakchar)) { + return *text; + } + + char ** lines; + int i; + int linenum = line_tok(*text, &lines, breakchar); + int dup = 0; + for (i = 0; i < linenum; i++) { + for (int j = 0; j < (i - 1); j++) { + if (strcmp(lines[i], lines[j]) == 0) { + *(lines[i]) = '\0'; + dup++; + break; + } + } + } + if ((linenum - dup) == 1) { + strcpy(*text, lines[0]); + freelist(&lines, linenum); + return *text; + } + char * newtext = (char *) malloc(strlen(*text) + 2 * linenum + 3 + 1); + if (newtext) { + free(*text); + *text = newtext; + } else { + freelist(&lines, linenum); + return *text; + } + strcpy(*text," ( "); + for (i = 0; i < linenum; i++) if (*(lines[i])) { + sprintf(*text + strlen(*text), "%s%s", lines[i], " | "); + } + (*text)[strlen(*text) - 2] = ')'; // " ) " + freelist(&lines, linenum); + return *text; +} + + // append s to ends of every lines in text + void strlinecat(char * dest, const char * s) + { + char * dup = mystrdup(dest); + char * source = dup; + int len = strlen(s); + if (dup) { + while (*source) { + if (*source == '\n') { + strncpy(dest, s, len); + dest += len; + } + *dest = *source; + source++; dest++; + } + strcpy(dest, s); + free(dup); + } + } + +// change \n to char c +char * tr(char * text, char oldc, char newc) { + char * p; + for (p = text; *p; p++) if (*p == oldc) *p = newc; + return text; +} + +// morphcmp(): compare MORPH_DERI_SFX, MORPH_INFL_SFX and MORPH_TERM_SFX fields +// in the first line of the inputs +// return 0, if inputs equal +// return 1, if inputs may equal with a secondary suffix +// otherwise return -1 +int morphcmp(const char * s, const char * t) +{ + int se = 0; + int te = 0; + const char * sl; + const char * tl; + const char * olds; + const char * oldt; + if (!s || !t) return 1; + olds = s; + sl = strchr(s, '\n'); + s = strstr(s, MORPH_DERI_SFX); + if (!s || (sl && sl < s)) s = strstr(olds, MORPH_INFL_SFX); + if (!s || (sl && sl < s)) { + s= strstr(olds, MORPH_TERM_SFX); + olds = NULL; + } + oldt = t; + tl = strchr(t, '\n'); + t = strstr(t, MORPH_DERI_SFX); + if (!t || (tl && tl < t)) t = strstr(oldt, MORPH_INFL_SFX); + if (!t || (tl && tl < t)) { + t = strstr(oldt, MORPH_TERM_SFX); + oldt = NULL; + } + while (s && t && (!sl || sl > s) && (!tl || tl > t)) { + s += MORPH_TAG_LEN; + t += MORPH_TAG_LEN; + se = 0; + te = 0; + while ((*s == *t) && !se && !te) { + s++; + t++; + switch(*s) { + case ' ': + case '\n': + case '\t': + case '\0': se = 1; + } + switch(*t) { + case ' ': + case '\n': + case '\t': + case '\0': te = 1; + } + } + if (!se || !te) { + // not terminal suffix difference + if (olds) return -1; + return 1; + } + olds = s; + s = strstr(s, MORPH_DERI_SFX); + if (!s || (sl && sl < s)) s = strstr(olds, MORPH_INFL_SFX); + if (!s || (sl && sl < s)) { + s = strstr(olds, MORPH_TERM_SFX); + olds = NULL; + } + oldt = t; + t = strstr(t, MORPH_DERI_SFX); + if (!t || (tl && tl < t)) t = strstr(oldt, MORPH_INFL_SFX); + if (!t || (tl && tl < t)) { + t = strstr(oldt, MORPH_TERM_SFX); + oldt = NULL; + } + } + if (!s && !t && se && te) return 0; + return 1; +} + +int get_sfxcount(const char * morph) +{ + if (!morph || !*morph) return 0; + int n = 0; + const char * old = morph; + morph = strstr(morph, MORPH_DERI_SFX); + if (!morph) morph = strstr(old, MORPH_INFL_SFX); + if (!morph) morph = strstr(old, MORPH_TERM_SFX); + while (morph) { + n++; + old = morph; + morph = strstr(morph + 1, MORPH_DERI_SFX); + if (!morph) morph = strstr(old + 1, MORPH_INFL_SFX); + if (!morph) morph = strstr(old + 1, MORPH_TERM_SFX); + } + return n; +} + + +int fieldlen(const char * r) +{ + int n = 0; + while (r && *r != ' ' && *r != '\t' && *r != '\0' && *r != '\n') { + r++; + n++; + } + return n; +} + +char * copy_field(char * dest, const char * morph, const char * var) +{ + if (!morph) return NULL; + const char * beg = strstr(morph, var); + if (beg) { + char * d = dest; + for (beg += MORPH_TAG_LEN; *beg != ' ' && *beg != '\t' && + *beg != '\n' && *beg != '\0'; d++, beg++) { + *d = *beg; + } + *d = '\0'; + return dest; + } + return NULL; +} + +char * mystrrep(char * word, const char * pat, const char * rep) { + char * pos = strstr(word, pat); + if (pos) { + int replen = strlen(rep); + int patlen = strlen(pat); + while (pos) { + if (replen < patlen) { + char * end = word + strlen(word); + char * next = pos + replen; + char * prev = pos + strlen(pat); + for (; prev < end; *next = *prev, prev++, next++); + *next = '\0'; + } else if (replen > patlen) { + char * end = pos + patlen; + char * next = word + strlen(word) + replen - patlen; + char * prev = next - replen + patlen; + for (; prev >= end; *next = *prev, prev--, next--); + } + strncpy(pos, rep, replen); + pos = strstr(word, pat); + } + } + return word; +} + + // reverse word + int reverseword(char * word) { + char r; + for (char * dest = word + strlen(word) - 1; word < dest; word++, dest--) { + r=*word; + *word = *dest; + *dest = r; + } + return 0; + } + + // reverse word (error: 1) + int reverseword_utf(char * word) { + w_char w[MAXWORDLEN]; + w_char * p; + w_char r; + int l = u8_u16(w, MAXWORDLEN, word); + if (l == -1) return 1; + p = w; + for (w_char * dest = w + l - 1; p < dest; p++, dest--) { + r=*p; + *p = *dest; + *dest = r; + } + u16_u8(word, MAXWORDUTF8LEN, w, l); + return 0; + } + + int uniqlist(char ** list, int n) { + int i; + if (n < 2) return n; + for (i = 0; i < n; i++) { + for (int j = 0; j < i; j++) { + if (list[j] && list[i] && (strcmp(list[j], list[i]) == 0)) { + free(list[i]); + list[i] = NULL; + break; + } + } + } + int m = 1; + for (i = 1; i < n; i++) if (list[i]) { + list[m] = list[i]; + m++; + } + return m; + } + + void freelist(char *** list, int n) { + if (list && *list && n > 0) { + for (int i = 0; i < n; i++) if ((*list)[i]) free((*list)[i]); + free(*list); + *list = NULL; + } + } + + // convert null terminated string to all caps + void mkallcap(char * p, const struct cs_info * csconv) + { + while (*p != '\0') { + *p = csconv[((unsigned char) *p)].cupper; + p++; + } + } + + // convert null terminated string to all little + void mkallsmall(char * p, const struct cs_info * csconv) + { + while (*p != '\0') { + *p = csconv[((unsigned char) *p)].clower; + p++; + } + } + +void mkallsmall_utf(w_char * u, int nc, int langnum) { + for (int i = 0; i < nc; i++) { + unsigned short idx = (u[i].h << 8) + u[i].l; + if (idx != unicodetolower(idx, langnum)) { + u[i].h = (unsigned char) (unicodetolower(idx, langnum) >> 8); + u[i].l = (unsigned char) (unicodetolower(idx, langnum) & 0x00FF); + } + } +} + +void mkallcap_utf(w_char * u, int nc, int langnum) { + for (int i = 0; i < nc; i++) { + unsigned short idx = (u[i].h << 8) + u[i].l; + if (idx != unicodetoupper(idx, langnum)) { + u[i].h = (unsigned char) (unicodetoupper(idx, langnum) >> 8); + u[i].l = (unsigned char) (unicodetoupper(idx, langnum) & 0x00FF); + } + } +} + + // convert null terminated string to have initial capital + void mkinitcap(char * p, const struct cs_info * csconv) + { + if (*p != '\0') *p = csconv[((unsigned char)*p)].cupper; + } + + // conversion function for protected memory + void store_pointer(char * dest, char * source) + { + memcpy(dest, &source, sizeof(char *)); + } + + // conversion function for protected memory + char * get_stored_pointer(const char * s) + { + char * p; + memcpy(&p, s, sizeof(char *)); + return p; + } + +#ifndef MOZILLA_CLIENT + // convert null terminated string to all caps using encoding + void enmkallcap(char * d, const char * p, const char * encoding) + + { + struct cs_info * csconv = get_current_cs(encoding); + while (*p != '\0') { + *d++ = csconv[((unsigned char) *p)].cupper; + p++; + } + *d = '\0'; + } + + // convert null terminated string to all little using encoding + void enmkallsmall(char * d, const char * p, const char * encoding) + { + struct cs_info * csconv = get_current_cs(encoding); + while (*p != '\0') { + *d++ = csconv[((unsigned char) *p)].clower; + p++; + } + *d = '\0'; + } + + // convert null terminated string to have initial capital using encoding + void enmkinitcap(char * d, const char * p, const char * encoding) + { + struct cs_info * csconv = get_current_cs(encoding); + memcpy(d,p,(strlen(p)+1)); + if (*p != '\0') *d= csconv[((unsigned char)*p)].cupper; + } + +// these are simple character mappings for the +// encodings supported +// supplying isupper, tolower, and toupper + +static struct cs_info iso1_tbl[] = { +{ 0x00, 0x00, 0x00 }, +{ 0x00, 0x01, 0x01 }, +{ 0x00, 0x02, 0x02 }, +{ 0x00, 0x03, 0x03 }, +{ 0x00, 0x04, 0x04 }, +{ 0x00, 0x05, 0x05 }, +{ 0x00, 0x06, 0x06 }, +{ 0x00, 0x07, 0x07 }, +{ 0x00, 0x08, 0x08 }, +{ 0x00, 0x09, 0x09 }, +{ 0x00, 0x0a, 0x0a }, +{ 0x00, 0x0b, 0x0b }, +{ 0x00, 0x0c, 0x0c }, +{ 0x00, 0x0d, 0x0d }, +{ 0x00, 0x0e, 0x0e }, +{ 0x00, 0x0f, 0x0f }, +{ 0x00, 0x10, 0x10 }, +{ 0x00, 0x11, 0x11 }, +{ 0x00, 0x12, 0x12 }, +{ 0x00, 0x13, 0x13 }, +{ 0x00, 0x14, 0x14 }, +{ 0x00, 0x15, 0x15 }, +{ 0x00, 0x16, 0x16 }, +{ 0x00, 0x17, 0x17 }, +{ 0x00, 0x18, 0x18 }, +{ 0x00, 0x19, 0x19 }, +{ 0x00, 0x1a, 0x1a }, +{ 0x00, 0x1b, 0x1b }, +{ 0x00, 0x1c, 0x1c }, +{ 0x00, 0x1d, 0x1d }, +{ 0x00, 0x1e, 0x1e }, +{ 0x00, 0x1f, 0x1f }, +{ 0x00, 0x20, 0x20 }, +{ 0x00, 0x21, 0x21 }, +{ 0x00, 0x22, 0x22 }, +{ 0x00, 0x23, 0x23 }, +{ 0x00, 0x24, 0x24 }, +{ 0x00, 0x25, 0x25 }, +{ 0x00, 0x26, 0x26 }, +{ 0x00, 0x27, 0x27 }, +{ 0x00, 0x28, 0x28 }, +{ 0x00, 0x29, 0x29 }, +{ 0x00, 0x2a, 0x2a }, +{ 0x00, 0x2b, 0x2b }, +{ 0x00, 0x2c, 0x2c }, +{ 0x00, 0x2d, 0x2d }, +{ 0x00, 0x2e, 0x2e }, +{ 0x00, 0x2f, 0x2f }, +{ 0x00, 0x30, 0x30 }, +{ 0x00, 0x31, 0x31 }, +{ 0x00, 0x32, 0x32 }, +{ 0x00, 0x33, 0x33 }, +{ 0x00, 0x34, 0x34 }, +{ 0x00, 0x35, 0x35 }, +{ 0x00, 0x36, 0x36 }, +{ 0x00, 0x37, 0x37 }, +{ 0x00, 0x38, 0x38 }, +{ 0x00, 0x39, 0x39 }, +{ 0x00, 0x3a, 0x3a }, +{ 0x00, 0x3b, 0x3b }, +{ 0x00, 0x3c, 0x3c }, +{ 0x00, 0x3d, 0x3d }, +{ 0x00, 0x3e, 0x3e }, +{ 0x00, 0x3f, 0x3f }, +{ 0x00, 0x40, 0x40 }, +{ 0x01, 0x61, 0x41 }, +{ 0x01, 0x62, 0x42 }, +{ 0x01, 0x63, 0x43 }, +{ 0x01, 0x64, 0x44 }, +{ 0x01, 0x65, 0x45 }, +{ 0x01, 0x66, 0x46 }, +{ 0x01, 0x67, 0x47 }, +{ 0x01, 0x68, 0x48 }, +{ 0x01, 0x69, 0x49 }, +{ 0x01, 0x6a, 0x4a }, +{ 0x01, 0x6b, 0x4b }, +{ 0x01, 0x6c, 0x4c }, +{ 0x01, 0x6d, 0x4d }, +{ 0x01, 0x6e, 0x4e }, +{ 0x01, 0x6f, 0x4f }, +{ 0x01, 0x70, 0x50 }, +{ 0x01, 0x71, 0x51 }, +{ 0x01, 0x72, 0x52 }, +{ 0x01, 0x73, 0x53 }, +{ 0x01, 0x74, 0x54 }, +{ 0x01, 0x75, 0x55 }, +{ 0x01, 0x76, 0x56 }, +{ 0x01, 0x77, 0x57 }, +{ 0x01, 0x78, 0x58 }, +{ 0x01, 0x79, 0x59 }, +{ 0x01, 0x7a, 0x5a }, +{ 0x00, 0x5b, 0x5b }, +{ 0x00, 0x5c, 0x5c }, +{ 0x00, 0x5d, 0x5d }, +{ 0x00, 0x5e, 0x5e }, +{ 0x00, 0x5f, 0x5f }, +{ 0x00, 0x60, 0x60 }, +{ 0x00, 0x61, 0x41 }, +{ 0x00, 0x62, 0x42 }, +{ 0x00, 0x63, 0x43 }, +{ 0x00, 0x64, 0x44 }, +{ 0x00, 0x65, 0x45 }, +{ 0x00, 0x66, 0x46 }, +{ 0x00, 0x67, 0x47 }, +{ 0x00, 0x68, 0x48 }, +{ 0x00, 0x69, 0x49 }, +{ 0x00, 0x6a, 0x4a }, +{ 0x00, 0x6b, 0x4b }, +{ 0x00, 0x6c, 0x4c }, +{ 0x00, 0x6d, 0x4d }, +{ 0x00, 0x6e, 0x4e }, +{ 0x00, 0x6f, 0x4f }, +{ 0x00, 0x70, 0x50 }, +{ 0x00, 0x71, 0x51 }, +{ 0x00, 0x72, 0x52 }, +{ 0x00, 0x73, 0x53 }, +{ 0x00, 0x74, 0x54 }, +{ 0x00, 0x75, 0x55 }, +{ 0x00, 0x76, 0x56 }, +{ 0x00, 0x77, 0x57 }, +{ 0x00, 0x78, 0x58 }, +{ 0x00, 0x79, 0x59 }, +{ 0x00, 0x7a, 0x5a }, +{ 0x00, 0x7b, 0x7b }, +{ 0x00, 0x7c, 0x7c }, +{ 0x00, 0x7d, 0x7d }, +{ 0x00, 0x7e, 0x7e }, +{ 0x00, 0x7f, 0x7f }, +{ 0x00, 0x80, 0x80 }, +{ 0x00, 0x81, 0x81 }, +{ 0x00, 0x82, 0x82 }, +{ 0x00, 0x83, 0x83 }, +{ 0x00, 0x84, 0x84 }, +{ 0x00, 0x85, 0x85 }, +{ 0x00, 0x86, 0x86 }, +{ 0x00, 0x87, 0x87 }, +{ 0x00, 0x88, 0x88 }, +{ 0x00, 0x89, 0x89 }, +{ 0x00, 0x8a, 0x8a }, +{ 0x00, 0x8b, 0x8b }, +{ 0x00, 0x8c, 0x8c }, +{ 0x00, 0x8d, 0x8d }, +{ 0x00, 0x8e, 0x8e }, +{ 0x00, 0x8f, 0x8f }, +{ 0x00, 0x90, 0x90 }, +{ 0x00, 0x91, 0x91 }, +{ 0x00, 0x92, 0x92 }, +{ 0x00, 0x93, 0x93 }, +{ 0x00, 0x94, 0x94 }, +{ 0x00, 0x95, 0x95 }, +{ 0x00, 0x96, 0x96 }, +{ 0x00, 0x97, 0x97 }, +{ 0x00, 0x98, 0x98 }, +{ 0x00, 0x99, 0x99 }, +{ 0x00, 0x9a, 0x9a }, +{ 0x00, 0x9b, 0x9b }, +{ 0x00, 0x9c, 0x9c }, +{ 0x00, 0x9d, 0x9d }, +{ 0x00, 0x9e, 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 0xde }, +{ 0x00, 0xff, 0xff } +}; + + +static struct cs_info iso2_tbl[] = { +{ 0x00, 0x00, 0x00 }, +{ 0x00, 0x01, 0x01 }, +{ 0x00, 0x02, 0x02 }, +{ 0x00, 0x03, 0x03 }, +{ 0x00, 0x04, 0x04 }, +{ 0x00, 0x05, 0x05 }, +{ 0x00, 0x06, 0x06 }, +{ 0x00, 0x07, 0x07 }, +{ 0x00, 0x08, 0x08 }, +{ 0x00, 0x09, 0x09 }, +{ 0x00, 0x0a, 0x0a }, +{ 0x00, 0x0b, 0x0b }, +{ 0x00, 0x0c, 0x0c }, +{ 0x00, 0x0d, 0x0d }, +{ 0x00, 0x0e, 0x0e }, +{ 0x00, 0x0f, 0x0f }, +{ 0x00, 0x10, 0x10 }, +{ 0x00, 0x11, 0x11 }, +{ 0x00, 0x12, 0x12 }, +{ 0x00, 0x13, 0x13 }, +{ 0x00, 0x14, 0x14 }, +{ 0x00, 0x15, 0x15 }, +{ 0x00, 0x16, 0x16 }, +{ 0x00, 0x17, 0x17 }, +{ 0x00, 0x18, 0x18 }, +{ 0x00, 0x19, 0x19 }, +{ 0x00, 0x1a, 0x1a }, +{ 0x00, 0x1b, 0x1b }, +{ 0x00, 0x1c, 0x1c }, +{ 0x00, 0x1d, 0x1d }, +{ 0x00, 0x1e, 0x1e }, +{ 0x00, 0x1f, 0x1f }, +{ 0x00, 0x20, 0x20 }, +{ 0x00, 0x21, 0x21 }, +{ 0x00, 0x22, 0x22 }, +{ 0x00, 0x23, 0x23 }, +{ 0x00, 0x24, 0x24 }, +{ 0x00, 0x25, 0x25 }, +{ 0x00, 0x26, 0x26 }, +{ 0x00, 0x27, 0x27 }, +{ 0x00, 0x28, 0x28 }, +{ 0x00, 0x29, 0x29 }, +{ 0x00, 0x2a, 0x2a }, +{ 0x00, 0x2b, 0x2b }, +{ 0x00, 0x2c, 0x2c }, +{ 0x00, 0x2d, 0x2d }, +{ 0x00, 0x2e, 0x2e }, +{ 0x00, 0x2f, 0x2f }, +{ 0x00, 0x30, 0x30 }, +{ 0x00, 0x31, 0x31 }, +{ 0x00, 0x32, 0x32 }, +{ 0x00, 0x33, 0x33 }, +{ 0x00, 0x34, 0x34 }, +{ 0x00, 0x35, 0x35 }, +{ 0x00, 0x36, 0x36 }, +{ 0x00, 0x37, 0x37 }, +{ 0x00, 0x38, 0x38 }, +{ 0x00, 0x39, 0x39 }, +{ 0x00, 0x3a, 0x3a }, +{ 0x00, 0x3b, 0x3b }, +{ 0x00, 0x3c, 0x3c }, +{ 0x00, 0x3d, 0x3d }, +{ 0x00, 0x3e, 0x3e }, +{ 0x00, 0x3f, 0x3f }, +{ 0x00, 0x40, 0x40 }, +{ 0x01, 0x61, 0x41 }, +{ 0x01, 0x62, 0x42 }, +{ 0x01, 0x63, 0x43 }, +{ 0x01, 0x64, 0x44 }, +{ 0x01, 0x65, 0x45 }, +{ 0x01, 0x66, 0x46 }, +{ 0x01, 0x67, 0x47 }, +{ 0x01, 0x68, 0x48 }, +{ 0x01, 0x69, 0x49 }, +{ 0x01, 0x6a, 0x4a }, +{ 0x01, 0x6b, 0x4b }, +{ 0x01, 0x6c, 0x4c }, +{ 0x01, 0x6d, 0x4d }, +{ 0x01, 0x6e, 0x4e }, +{ 0x01, 0x6f, 0x4f }, +{ 0x01, 0x70, 0x50 }, +{ 0x01, 0x71, 0x51 }, +{ 0x01, 0x72, 0x52 }, +{ 0x01, 0x73, 0x53 }, +{ 0x01, 0x74, 0x54 }, +{ 0x01, 0x75, 0x55 }, +{ 0x01, 0x76, 0x56 }, +{ 0x01, 0x77, 0x57 }, +{ 0x01, 0x78, 0x58 }, +{ 0x01, 0x79, 0x59 }, +{ 0x01, 0x7a, 0x5a }, +{ 0x00, 0x5b, 0x5b }, +{ 0x00, 0x5c, 0x5c }, +{ 0x00, 0x5d, 0x5d }, +{ 0x00, 0x5e, 0x5e }, +{ 0x00, 0x5f, 0x5f }, +{ 0x00, 0x60, 0x60 }, +{ 0x00, 0x61, 0x41 }, +{ 0x00, 0x62, 0x42 }, +{ 0x00, 0x63, 0x43 }, +{ 0x00, 0x64, 0x44 }, +{ 0x00, 0x65, 0x45 }, +{ 0x00, 0x66, 0x46 }, +{ 0x00, 0x67, 0x47 }, +{ 0x00, 0x68, 0x48 }, +{ 0x00, 0x69, 0x49 }, +{ 0x00, 0x6a, 0x4a }, +{ 0x00, 0x6b, 0x4b }, +{ 0x00, 0x6c, 0x4c }, +{ 0x00, 0x6d, 0x4d }, +{ 0x00, 0x6e, 0x4e }, +{ 0x00, 0x6f, 0x4f }, +{ 0x00, 0x70, 0x50 }, +{ 0x00, 0x71, 0x51 }, +{ 0x00, 0x72, 0x52 }, +{ 0x00, 0x73, 0x53 }, +{ 0x00, 0x74, 0x54 }, +{ 0x00, 0x75, 0x55 }, +{ 0x00, 0x76, 0x56 }, +{ 0x00, 0x77, 0x57 }, +{ 0x00, 0x78, 0x58 }, +{ 0x00, 0x79, 0x59 }, +{ 0x00, 0x7a, 0x5a }, +{ 0x00, 0x7b, 0x7b }, +{ 0x00, 0x7c, 0x7c }, +{ 0x00, 0x7d, 0x7d }, +{ 0x00, 0x7e, 0x7e }, +{ 0x00, 0x7f, 0x7f }, +{ 0x00, 0x80, 0x80 }, +{ 0x00, 0x81, 0x81 }, +{ 0x00, 0x82, 0x82 }, +{ 0x00, 0x83, 0x83 }, +{ 0x00, 0x84, 0x84 }, +{ 0x00, 0x85, 0x85 }, +{ 0x00, 0x86, 0x86 }, +{ 0x00, 0x87, 0x87 }, +{ 0x00, 0x88, 0x88 }, +{ 0x00, 0x89, 0x89 }, +{ 0x00, 0x8a, 0x8a }, +{ 0x00, 0x8b, 0x8b }, +{ 0x00, 0x8c, 0x8c }, +{ 0x00, 0x8d, 0x8d }, +{ 0x00, 0x8e, 0x8e }, +{ 0x00, 0x8f, 0x8f }, +{ 0x00, 0x90, 0x90 }, +{ 0x00, 0x91, 0x91 }, +{ 0x00, 0x92, 0x92 }, +{ 0x00, 0x93, 0x93 }, +{ 0x00, 0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}, +{ 0x00, 0xf5, 0xd5 }, +{ 0x00, 0xf6, 0xd6 }, +{ 0x00, 0xf7, 0xf7 }, +{ 0x00, 0xf8, 0xd8 }, +{ 0x00, 0xf9, 0xd9 }, +{ 0x00, 0xfa, 0xda }, +{ 0x00, 0xfb, 0xdb }, +{ 0x00, 0xfc, 0xdc }, +{ 0x00, 0xfd, 0xdd }, +{ 0x00, 0xfe, 0xde }, +{ 0x00, 0xff, 0xff } +}; + + +static struct cs_info iso3_tbl[] = { +{ 0x00, 0x00, 0x00 }, +{ 0x00, 0x01, 0x01 }, +{ 0x00, 0x02, 0x02 }, +{ 0x00, 0x03, 0x03 }, +{ 0x00, 0x04, 0x04 }, +{ 0x00, 0x05, 0x05 }, +{ 0x00, 0x06, 0x06 }, +{ 0x00, 0x07, 0x07 }, +{ 0x00, 0x08, 0x08 }, +{ 0x00, 0x09, 0x09 }, +{ 0x00, 0x0a, 0x0a }, +{ 0x00, 0x0b, 0x0b }, +{ 0x00, 0x0c, 0x0c }, +{ 0x00, 0x0d, 0x0d }, +{ 0x00, 0x0e, 0x0e }, +{ 0x00, 0x0f, 0x0f }, +{ 0x00, 0x10, 0x10 }, +{ 0x00, 0x11, 0x11 }, +{ 0x00, 0x12, 0x12 }, +{ 0x00, 0x13, 0x13 }, +{ 0x00, 0x14, 0x14 }, +{ 0x00, 0x15, 0x15 }, +{ 0x00, 0x16, 0x16 }, +{ 0x00, 0x17, 0x17 }, +{ 0x00, 0x18, 0x18 }, +{ 0x00, 0x19, 0x19 }, +{ 0x00, 0x1a, 0x1a }, +{ 0x00, 0x1b, 0x1b }, +{ 0x00, 0x1c, 0x1c }, +{ 0x00, 0x1d, 0x1d }, +{ 0x00, 0x1e, 0x1e }, +{ 0x00, 0x1f, 0x1f }, +{ 0x00, 0x20, 0x20 }, +{ 0x00, 0x21, 0x21 }, +{ 0x00, 0x22, 0x22 }, +{ 0x00, 0x23, 0x23 }, +{ 0x00, 0x24, 0x24 }, +{ 0x00, 0x25, 0x25 }, +{ 0x00, 0x26, 0x26 }, +{ 0x00, 0x27, 0x27 }, +{ 0x00, 0x28, 0x28 }, +{ 0x00, 0x29, 0x29 }, +{ 0x00, 0x2a, 0x2a }, +{ 0x00, 0x2b, 0x2b }, +{ 0x00, 0x2c, 0x2c }, +{ 0x00, 0x2d, 0x2d }, +{ 0x00, 0x2e, 0x2e }, +{ 0x00, 0x2f, 0x2f }, +{ 0x00, 0x30, 0x30 }, +{ 0x00, 0x31, 0x31 }, +{ 0x00, 0x32, 0x32 }, +{ 0x00, 0x33, 0x33 }, +{ 0x00, 0x34, 0x34 }, +{ 0x00, 0x35, 0x35 }, +{ 0x00, 0x36, 0x36 }, +{ 0x00, 0x37, 0x37 }, +{ 0x00, 0x38, 0x38 }, +{ 0x00, 0x39, 0x39 }, +{ 0x00, 0x3a, 0x3a }, +{ 0x00, 0x3b, 0x3b }, +{ 0x00, 0x3c, 0x3c }, +{ 0x00, 0x3d, 0x3d }, +{ 0x00, 0x3e, 0x3e }, +{ 0x00, 0x3f, 0x3f }, +{ 0x00, 0x40, 0x40 }, +{ 0x01, 0x61, 0x41 }, +{ 0x01, 0x62, 0x42 }, +{ 0x01, 0x63, 0x43 }, +{ 0x01, 0x64, 0x44 }, +{ 0x01, 0x65, 0x45 }, +{ 0x01, 0x66, 0x46 }, +{ 0x01, 0x67, 0x47 }, +{ 0x01, 0x68, 0x48 }, +{ 0x01, 0x69, 0x49 }, +{ 0x01, 0x6a, 0x4a }, +{ 0x01, 0x6b, 0x4b }, +{ 0x01, 0x6c, 0x4c }, +{ 0x01, 0x6d, 0x4d }, +{ 0x01, 0x6e, 0x4e }, +{ 0x01, 0x6f, 0x4f }, +{ 0x01, 0x70, 0x50 }, +{ 0x01, 0x71, 0x51 }, +{ 0x01, 0x72, 0x52 }, +{ 0x01, 0x73, 0x53 }, +{ 0x01, 0x74, 0x54 }, +{ 0x01, 0x75, 0x55 }, +{ 0x01, 0x76, 0x56 }, +{ 0x01, 0x77, 0x57 }, +{ 0x01, 0x78, 0x58 }, +{ 0x01, 0x79, 0x59 }, +{ 0x01, 0x7a, 0x5a }, +{ 0x00, 0x5b, 0x5b }, +{ 0x00, 0x5c, 0x5c }, +{ 0x00, 0x5d, 0x5d }, +{ 0x00, 0x5e, 0x5e }, +{ 0x00, 0x5f, 0x5f }, +{ 0x00, 0x60, 0x60 }, +{ 0x00, 0x61, 0x41 }, +{ 0x00, 0x62, 0x42 }, +{ 0x00, 0x63, 0x43 }, +{ 0x00, 0x64, 0x44 }, +{ 0x00, 0x65, 0x45 }, +{ 0x00, 0x66, 0x46 }, +{ 0x00, 0x67, 0x47 }, +{ 0x00, 0x68, 0x48 }, +{ 0x00, 0x69, 0x49 }, +{ 0x00, 0x6a, 0x4a }, +{ 0x00, 0x6b, 0x4b }, +{ 0x00, 0x6c, 0x4c }, +{ 0x00, 0x6d, 0x4d }, +{ 0x00, 0x6e, 0x4e }, +{ 0x00, 0x6f, 0x4f }, +{ 0x00, 0x70, 0x50 }, +{ 0x00, 0x71, 0x51 }, +{ 0x00, 0x72, 0x52 }, +{ 0x00, 0x73, 0x53 }, +{ 0x00, 0x74, 0x54 }, +{ 0x00, 0x75, 0x55 }, +{ 0x00, 0x76, 0x56 }, +{ 0x00, 0x77, 0x57 }, +{ 0x00, 0x78, 0x58 }, +{ 0x00, 0x79, 0x59 }, +{ 0x00, 0x7a, 0x5a }, +{ 0x00, 0x7b, 0x7b }, +{ 0x00, 0x7c, 0x7c }, +{ 0x00, 0x7d, 0x7d }, +{ 0x00, 0x7e, 0x7e }, +{ 0x00, 0x7f, 0x7f }, +{ 0x00, 0x80, 0x80 }, +{ 0x00, 0x81, 0x81 }, +{ 0x00, 0x82, 0x82 }, +{ 0x00, 0x83, 0x83 }, +{ 0x00, 0x84, 0x84 }, +{ 0x00, 0x85, 0x85 }, +{ 0x00, 0x86, 0x86 }, +{ 0x00, 0x87, 0x87 }, +{ 0x00, 0x88, 0x88 }, +{ 0x00, 0x89, 0x89 }, +{ 0x00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{ 0x00, 0xeb, 0xcb }, +{ 0x00, 0xec, 0xcc }, +{ 0x00, 0xed, 0xcd }, +{ 0x00, 0xee, 0xce }, +{ 0x00, 0xef, 0xcf }, +{ 0x00, 0xf0, 0xf0 }, +{ 0x00, 0xf1, 0xd1 }, +{ 0x00, 0xf2, 0xd2 }, +{ 0x00, 0xf3, 0xd3 }, +{ 0x00, 0xf4, 0xd4 }, +{ 0x00, 0xf5, 0xd5 }, +{ 0x00, 0xf6, 0xd6 }, +{ 0x00, 0xf7, 0xf7 }, +{ 0x00, 0xf8, 0xd8 }, +{ 0x00, 0xf9, 0xd9 }, +{ 0x00, 0xfa, 0xda }, +{ 0x00, 0xfb, 0xdb }, +{ 0x00, 0xfc, 0xdc }, +{ 0x00, 0xfd, 0xdd }, +{ 0x00, 0xfe, 0xde }, +{ 0x00, 0xff, 0xff } +}; + +static struct cs_info iso4_tbl[] = { +{ 0x00, 0x00, 0x00 }, +{ 0x00, 0x01, 0x01 }, +{ 0x00, 0x02, 0x02 }, +{ 0x00, 0x03, 0x03 }, +{ 0x00, 0x04, 0x04 }, +{ 0x00, 0x05, 0x05 }, +{ 0x00, 0x06, 0x06 }, +{ 0x00, 0x07, 0x07 }, +{ 0x00, 0x08, 0x08 }, +{ 0x00, 0x09, 0x09 }, +{ 0x00, 0x0a, 0x0a }, +{ 0x00, 0x0b, 0x0b }, +{ 0x00, 0x0c, 0x0c }, +{ 0x00, 0x0d, 0x0d }, +{ 0x00, 0x0e, 0x0e }, +{ 0x00, 0x0f, 0x0f }, +{ 0x00, 0x10, 0x10 }, +{ 0x00, 0x11, 0x11 }, +{ 0x00, 0x12, 0x12 }, +{ 0x00, 0x13, 0x13 }, +{ 0x00, 0x14, 0x14 }, +{ 0x00, 0x15, 0x15 }, +{ 0x00, 0x16, 0x16 }, +{ 0x00, 0x17, 0x17 }, +{ 0x00, 0x18, 0x18 }, +{ 0x00, 0x19, 0x19 }, +{ 0x00, 0x1a, 0x1a }, +{ 0x00, 0x1b, 0x1b }, +{ 0x00, 0x1c, 0x1c }, +{ 0x00, 0x1d, 0x1d }, +{ 0x00, 0x1e, 0x1e }, +{ 0x00, 0x1f, 0x1f }, +{ 0x00, 0x20, 0x20 }, +{ 0x00, 0x21, 0x21 }, +{ 0x00, 0x22, 0x22 }, +{ 0x00, 0x23, 0x23 }, +{ 0x00, 0x24, 0x24 }, +{ 0x00, 0x25, 0x25 }, +{ 0x00, 0x26, 0x26 }, +{ 0x00, 0x27, 0x27 }, +{ 0x00, 0x28, 0x28 }, +{ 0x00, 0x29, 0x29 }, +{ 0x00, 0x2a, 0x2a }, +{ 0x00, 0x2b, 0x2b }, +{ 0x00, 0x2c, 0x2c }, +{ 0x00, 0x2d, 0x2d }, +{ 0x00, 0x2e, 0x2e }, +{ 0x00, 0x2f, 0x2f }, +{ 0x00, 0x30, 0x30 }, +{ 0x00, 0x31, 0x31 }, +{ 0x00, 0x32, 0x32 }, +{ 0x00, 0x33, 0x33 }, +{ 0x00, 0x34, 0x34 }, +{ 0x00, 0x35, 0x35 }, +{ 0x00, 0x36, 0x36 }, +{ 0x00, 0x37, 0x37 }, +{ 0x00, 0x38, 0x38 }, +{ 0x00, 0x39, 0x39 }, +{ 0x00, 0x3a, 0x3a }, +{ 0x00, 0x3b, 0x3b }, +{ 0x00, 0x3c, 0x3c }, +{ 0x00, 0x3d, 0x3d }, +{ 0x00, 0x3e, 0x3e }, +{ 0x00, 0x3f, 0x3f }, +{ 0x00, 0x40, 0x40 }, +{ 0x01, 0x61, 0x41 }, +{ 0x01, 0x62, 0x42 }, +{ 0x01, 0x63, 0x43 }, +{ 0x01, 0x64, 0x44 }, +{ 0x01, 0x65, 0x45 }, +{ 0x01, 0x66, 0x46 }, +{ 0x01, 0x67, 0x47 }, +{ 0x01, 0x68, 0x48 }, +{ 0x01, 0x69, 0x49 }, +{ 0x01, 0x6a, 0x4a }, +{ 0x01, 0x6b, 0x4b }, +{ 0x01, 0x6c, 0x4c }, +{ 0x01, 0x6d, 0x4d }, +{ 0x01, 0x6e, 0x4e }, +{ 0x01, 0x6f, 0x4f }, +{ 0x01, 0x70, 0x50 }, +{ 0x01, 0x71, 0x51 }, +{ 0x01, 0x72, 0x52 }, +{ 0x01, 0x73, 0x53 }, +{ 0x01, 0x74, 0x54 }, +{ 0x01, 0x75, 0x55 }, +{ 0x01, 0x76, 0x56 }, +{ 0x01, 0x77, 0x57 }, +{ 0x01, 0x78, 0x58 }, +{ 0x01, 0x79, 0x59 }, +{ 0x01, 0x7a, 0x5a }, +{ 0x00, 0x5b, 0x5b }, +{ 0x00, 0x5c, 0x5c }, +{ 0x00, 0x5d, 0x5d }, +{ 0x00, 0x5e, 0x5e }, +{ 0x00, 0x5f, 0x5f }, +{ 0x00, 0x60, 0x60 }, +{ 0x00, 0x61, 0x41 }, +{ 0x00, 0x62, 0x42 }, +{ 0x00, 0x63, 0x43 }, +{ 0x00, 0x64, 0x44 }, +{ 0x00, 0x65, 0x45 }, +{ 0x00, 0x66, 0x46 }, +{ 0x00, 0x67, 0x47 }, +{ 0x00, 0x68, 0x48 }, +{ 0x00, 0x69, 0x49 }, +{ 0x00, 0x6a, 0x4a }, +{ 0x00, 0x6b, 0x4b }, +{ 0x00, 0x6c, 0x4c }, +{ 0x00, 0x6d, 0x4d }, +{ 0x00, 0x6e, 0x4e }, +{ 0x00, 0x6f, 0x4f }, +{ 0x00, 0x70, 0x50 }, +{ 0x00, 0x71, 0x51 }, +{ 0x00, 0x72, 0x52 }, +{ 0x00, 0x73, 0x53 }, +{ 0x00, 0x74, 0x54 }, +{ 0x00, 0x75, 0x55 }, +{ 0x00, 0x76, 0x56 }, +{ 0x00, 0x77, 0x57 }, +{ 0x00, 0x78, 0x58 }, +{ 0x00, 0x79, 0x59 }, +{ 0x00, 0x7a, 0x5a }, +{ 0x00, 0x7b, 0x7b }, +{ 0x00, 0x7c, 0x7c }, +{ 0x00, 0x7d, 0x7d }, +{ 0x00, 0x7e, 0x7e }, +{ 0x00, 0x7f, 0x7f }, +{ 0x00, 0x80, 0x80 }, +{ 0x00, 0x81, 0x81 }, +{ 0x00, 0x82, 0x82 }, +{ 0x00, 0x83, 0x83 }, +{ 0x00, 0x84, 0x84 }, +{ 0x00, 0x85, 0x85 }, +{ 0x00, 0x86, 0x86 }, +{ 0x00, 0x87, 0x87 }, +{ 0x00, 0x88, 0x88 }, +{ 0x00, 0x89, 0x89 }, +{ 0x00, 0x8a, 0x8a }, +{ 0x00, 0x8b, 0x8b }, +{ 0x00, 0x8c, 0x8c }, +{ 0x00, 0x8d, 0x8d }, +{ 0x00, 0x8e, 0x8e }, +{ 0x00, 0x8f, 0x8f }, +{ 0x00, 0x90, 0x90 }, +{ 0x00, 0x91, 0x91 }, +{ 0x00, 0x92, 0x92 }, +{ 0x00, 0x93, 0x93 }, +{ 0x00, 0x94, 0x94 }, +{ 0x00, 0x95, 0x95 }, +{ 0x00, 0x96, 0x96 }, +{ 0x00, 0x97, 0x97 }, +{ 0x00, 0x98, 0x98 }, +{ 0x00, 0x99, 0x99 }, +{ 0x00, 0x9a, 0x9a }, +{ 0x00, 0x9b, 0x9b }, +{ 0x00, 0x9c, 0x9c }, +{ 0x00, 0x9d, 0x9d }, +{ 0x00, 0x9e, 0x9e }, +{ 0x00, 0x9f, 0x9f }, +{ 0x00, 0xa0, 0xa0 }, +{ 0x01, 0xb1, 0xa1 }, +{ 0x00, 0xa2, 0xa2 }, +{ 0x01, 0xb3, 0xa3 }, +{ 0x00, 0xa4, 0xa4 }, +{ 0x01, 0xb5, 0xa5 }, +{ 0x01, 0xb6, 0xa6 }, +{ 0x00, 0xa7, 0xa7 }, +{ 0x00, 0xa8, 0xa8 }, +{ 0x01, 0xb9, 0xa9 }, +{ 0x01, 0xba, 0xaa }, +{ 0x01, 0xbb, 0xab }, +{ 0x01, 0xbc, 0xac }, +{ 0x00, 0xad, 0xad }, +{ 0x01, 0xbe, 0xae }, +{ 0x00, 0xaf, 0xaf }, +{ 0x00, 0xb0, 0xb0 }, +{ 0x00, 0x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xe1, 0xc1 }, +{ 0x00, 0xe2, 0xc2 }, +{ 0x00, 0xe3, 0xc3 }, +{ 0x00, 0xe4, 0xc4 }, +{ 0x00, 0xe5, 0xc5 }, +{ 0x00, 0xe6, 0xc6 }, +{ 0x00, 0xe7, 0xc7 }, +{ 0x00, 0xe8, 0xc8 }, +{ 0x00, 0xe9, 0xc9 }, +{ 0x00, 0xea, 0xca }, +{ 0x00, 0xeb, 0xcb }, +{ 0x00, 0xec, 0xcc }, +{ 0x00, 0xed, 0xcd }, +{ 0x00, 0xee, 0xce }, +{ 0x00, 0xef, 0xcf }, +{ 0x00, 0xf0, 0xd0 }, +{ 0x00, 0xf1, 0xd1 }, +{ 0x00, 0xf2, 0xd2 }, +{ 0x00, 0xf3, 0xd3 }, +{ 0x00, 0xf4, 0xd4 }, +{ 0x00, 0xf5, 0xd5 }, +{ 0x00, 0xf6, 0xd6 }, +{ 0x00, 0xf7, 0xf7 }, +{ 0x00, 0xf8, 0xd8 }, +{ 0x00, 0xf9, 0xd9 }, +{ 0x00, 0xfa, 0xda }, +{ 0x00, 0xfb, 0xdb }, +{ 0x00, 0xfc, 0xdc }, +{ 0x00, 0xfd, 0xdd }, +{ 0x00, 0xfe, 0xde }, +{ 0x00, 0xff, 0xff } +}; + +static struct cs_info iso5_tbl[] = { +{ 0x00, 0x00, 0x00 }, +{ 0x00, 0x01, 0x01 }, +{ 0x00, 0x02, 0x02 }, +{ 0x00, 0x03, 0x03 }, +{ 0x00, 0x04, 0x04 }, +{ 0x00, 0x05, 0x05 }, +{ 0x00, 0x06, 0x06 }, +{ 0x00, 0x07, 0x07 }, +{ 0x00, 0x08, 0x08 }, +{ 0x00, 0x09, 0x09 }, +{ 0x00, 0x0a, 0x0a }, +{ 0x00, 0x0b, 0x0b }, +{ 0x00, 0x0c, 0x0c }, +{ 0x00, 0x0d, 0x0d }, +{ 0x00, 0x0e, 0x0e }, +{ 0x00, 0x0f, 0x0f }, +{ 0x00, 0x10, 0x10 }, +{ 0x00, 0x11, 0x11 }, +{ 0x00, 0x12, 0x12 }, +{ 0x00, 0x13, 0x13 }, +{ 0x00, 0x14, 0x14 }, +{ 0x00, 0x15, 0x15 }, +{ 0x00, 0x16, 0x16 }, +{ 0x00, 0x17, 0x17 }, +{ 0x00, 0x18, 0x18 }, +{ 0x00, 0x19, 0x19 }, +{ 0x00, 0x1a, 0x1a }, +{ 0x00, 0x1b, 0x1b }, +{ 0x00, 0x1c, 0x1c }, +{ 0x00, 0x1d, 0x1d }, +{ 0x00, 0x1e, 0x1e }, +{ 0x00, 0x1f, 0x1f }, +{ 0x00, 0x20, 0x20 }, +{ 0x00, 0x21, 0x21 }, +{ 0x00, 0x22, 0x22 }, +{ 0x00, 0x23, 0x23 }, +{ 0x00, 0x24, 0x24 }, +{ 0x00, 0x25, 0x25 }, +{ 0x00, 0x26, 0x26 }, +{ 0x00, 0x27, 0x27 }, +{ 0x00, 0x28, 0x28 }, +{ 0x00, 0x29, 0x29 }, +{ 0x00, 0x2a, 0x2a }, +{ 0x00, 0x2b, 0x2b }, +{ 0x00, 0x2c, 0x2c }, +{ 0x00, 0x2d, 0x2d }, +{ 0x00, 0x2e, 0x2e }, +{ 0x00, 0x2f, 0x2f }, +{ 0x00, 0x30, 0x30 }, +{ 0x00, 0x31, 0x31 }, +{ 0x00, 0x32, 0x32 }, +{ 0x00, 0x33, 0x33 }, +{ 0x00, 0x34, 0x34 }, +{ 0x00, 0x35, 0x35 }, +{ 0x00, 0x36, 0x36 }, +{ 0x00, 0x37, 0x37 }, +{ 0x00, 0x38, 0x38 }, +{ 0x00, 0x39, 0x39 }, +{ 0x00, 0x3a, 0x3a }, +{ 0x00, 0x3b, 0x3b }, +{ 0x00, 0x3c, 0x3c }, +{ 0x00, 0x3d, 0x3d }, +{ 0x00, 0x3e, 0x3e }, +{ 0x00, 0x3f, 0x3f }, +{ 0x00, 0x40, 0x40 }, +{ 0x01, 0x61, 0x41 }, +{ 0x01, 0x62, 0x42 }, +{ 0x01, 0x63, 0x43 }, +{ 0x01, 0x64, 0x44 }, +{ 0x01, 0x65, 0x45 }, +{ 0x01, 0x66, 0x46 }, +{ 0x01, 0x67, 0x47 }, +{ 0x01, 0x68, 0x48 }, +{ 0x01, 0x69, 0x49 }, +{ 0x01, 0x6a, 0x4a }, +{ 0x01, 0x6b, 0x4b }, +{ 0x01, 0x6c, 0x4c }, +{ 0x01, 0x6d, 0x4d }, +{ 0x01, 0x6e, 0x4e }, +{ 0x01, 0x6f, 0x4f }, +{ 0x01, 0x70, 0x50 }, +{ 0x01, 0x71, 0x51 }, +{ 0x01, 0x72, 0x52 }, +{ 0x01, 0x73, 0x53 }, +{ 0x01, 0x74, 0x54 }, +{ 0x01, 0x75, 0x55 }, +{ 0x01, 0x76, 0x56 }, +{ 0x01, 0x77, 0x57 }, +{ 0x01, 0x78, 0x58 }, +{ 0x01, 0x79, 0x59 }, +{ 0x01, 0x7a, 0x5a }, +{ 0x00, 0x5b, 0x5b }, +{ 0x00, 0x5c, 0x5c }, +{ 0x00, 0x5d, 0x5d }, +{ 0x00, 0x5e, 0x5e }, +{ 0x00, 0x5f, 0x5f }, +{ 0x00, 0x60, 0x60 }, +{ 0x00, 0x61, 0x41 }, +{ 0x00, 0x62, 0x42 }, +{ 0x00, 0x63, 0x43 }, +{ 0x00, 0x64, 0x44 }, +{ 0x00, 0x65, 0x45 }, +{ 0x00, 0x66, 0x46 }, +{ 0x00, 0x67, 0x47 }, +{ 0x00, 0x68, 0x48 }, +{ 0x00, 0x69, 0x49 }, +{ 0x00, 0x6a, 0x4a }, +{ 0x00, 0x6b, 0x4b }, +{ 0x00, 0x6c, 0x4c }, +{ 0x00, 0x6d, 0x4d }, +{ 0x00, 0x6e, 0x4e }, +{ 0x00, 0x6f, 0x4f }, +{ 0x00, 0x70, 0x50 }, +{ 0x00, 0x71, 0x51 }, +{ 0x00, 0x72, 0x52 }, +{ 0x00, 0x73, 0x53 }, +{ 0x00, 0x74, 0x54 }, +{ 0x00, 0x75, 0x55 }, +{ 0x00, 0x76, 0x56 }, +{ 0x00, 0x77, 0x57 }, +{ 0x00, 0x78, 0x58 }, +{ 0x00, 0x79, 0x59 }, +{ 0x00, 0x7a, 0x5a }, +{ 0x00, 0x7b, 0x7b }, +{ 0x00, 0x7c, 0x7c }, +{ 0x00, 0x7d, 0x7d }, +{ 0x00, 0x7e, 0x7e }, +{ 0x00, 0x7f, 0x7f }, +{ 0x00, 0x80, 0x80 }, +{ 0x00, 0x81, 0x81 }, +{ 0x00, 0x82, 0x82 }, +{ 0x00, 0x83, 0x83 }, +{ 0x00, 0x84, 0x84 }, +{ 0x00, 0x85, 0x85 }, +{ 0x00, 0x86, 0x86 }, +{ 0x00, 0x87, 0x87 }, +{ 0x00, 0x88, 0x88 }, +{ 0x00, 0x89, 0x89 }, +{ 0x00, 0x8a, 0x8a }, +{ 0x00, 0x8b, 0x8b }, +{ 0x00, 0x8c, 0x8c }, +{ 0x00, 0x8d, 0x8d }, +{ 0x00, 0x8e, 0x8e }, +{ 0x00, 0x8f, 0x8f }, +{ 0x00, 0x90, 0x90 }, +{ 0x00, 0x91, 0x91 }, +{ 0x00, 0x92, 0x92 }, +{ 0x00, 0x93, 0x93 }, +{ 0x00, 0x94, 0x94 }, +{ 0x00, 0x95, 0x95 }, +{ 0x00, 0x96, 0x96 }, +{ 0x00, 0x97, 0x97 }, +{ 0x00, 0x98, 0x98 }, +{ 0x00, 0x99, 0x99 }, +{ 0x00, 0x9a, 0x9a }, +{ 0x00, 0x9b, 0x9b }, +{ 0x00, 0x9c, 0x9c }, +{ 0x00, 0x9d, 0x9d }, +{ 0x00, 0x9e, 0x9e }, +{ 0x00, 0x9f, 0x9f }, +{ 0x00, 0xa0, 0xa0 }, +{ 0x01, 0xf1, 0xa1 }, +{ 0x01, 0xf2, 0xa2 }, +{ 0x01, 0xf3, 0xa3 }, +{ 0x01, 0xf4, 0xa4 }, +{ 0x01, 0xf5, 0xa5 }, +{ 0x01, 0xf6, 0xa6 }, +{ 0x01, 0x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, 0xb7 }, +{ 0x00, 0xd8, 0xb8 }, +{ 0x00, 0xd9, 0xb9 }, +{ 0x00, 0xda, 0xba }, +{ 0x00, 0xdb, 0xbb }, +{ 0x00, 0xdc, 0xbc }, +{ 0x00, 0xdd, 0xbd }, +{ 0x00, 0xde, 0xbe }, +{ 0x00, 0xdf, 0xbf }, +{ 0x00, 0xe0, 0xc0 }, +{ 0x00, 0xe1, 0xc1 }, +{ 0x00, 0xe2, 0xc2 }, +{ 0x00, 0xe3, 0xc3 }, +{ 0x00, 0xe4, 0xc4 }, +{ 0x00, 0xe5, 0xc5 }, +{ 0x00, 0xe6, 0xc6 }, +{ 0x00, 0xe7, 0xc7 }, +{ 0x00, 0xe8, 0xc8 }, +{ 0x00, 0xe9, 0xc9 }, +{ 0x00, 0xea, 0xca }, +{ 0x00, 0xeb, 0xcb }, +{ 0x00, 0xec, 0xcc }, +{ 0x00, 0xed, 0xcd }, +{ 0x00, 0xee, 0xce }, +{ 0x00, 0xef, 0xcf }, +{ 0x00, 0xf0, 0xf0 }, +{ 0x00, 0xf1, 0xa1 }, +{ 0x00, 0xf2, 0xa2 }, +{ 0x00, 0xf3, 0xa3 }, +{ 0x00, 0xf4, 0xa4 }, +{ 0x00, 0xf5, 0xa5 }, +{ 0x00, 0xf6, 0xa6 }, +{ 0x00, 0xf7, 0xa7 }, +{ 0x00, 0xf8, 0xa8 }, +{ 0x00, 0xf9, 0xa9 }, +{ 0x00, 0xfa, 0xaa }, +{ 0x00, 0xfb, 0xab }, +{ 0x00, 0xfc, 0xac }, +{ 0x00, 0xfd, 0xfd }, +{ 0x00, 0xfe, 0xae }, +{ 0x00, 0xff, 0xaf } +}; + +static struct cs_info iso6_tbl[] = { +{ 0x00, 0x00, 0x00 }, +{ 0x00, 0x01, 0x01 }, +{ 0x00, 0x02, 0x02 }, +{ 0x00, 0x03, 0x03 }, +{ 0x00, 0x04, 0x04 }, +{ 0x00, 0x05, 0x05 }, +{ 0x00, 0x06, 0x06 }, +{ 0x00, 0x07, 0x07 }, +{ 0x00, 0x08, 0x08 }, +{ 0x00, 0x09, 0x09 }, +{ 0x00, 0x0a, 0x0a }, +{ 0x00, 0x0b, 0x0b }, +{ 0x00, 0x0c, 0x0c }, +{ 0x00, 0x0d, 0x0d }, +{ 0x00, 0x0e, 0x0e }, +{ 0x00, 0x0f, 0x0f }, +{ 0x00, 0x10, 0x10 }, +{ 0x00, 0x11, 0x11 }, +{ 0x00, 0x12, 0x12 }, +{ 0x00, 0x13, 0x13 }, +{ 0x00, 0x14, 0x14 }, +{ 0x00, 0x15, 0x15 }, +{ 0x00, 0x16, 0x16 }, +{ 0x00, 0x17, 0x17 }, +{ 0x00, 0x18, 0x18 }, +{ 0x00, 0x19, 0x19 }, +{ 0x00, 0x1a, 0x1a }, +{ 0x00, 0x1b, 0x1b }, +{ 0x00, 0x1c, 0x1c }, +{ 0x00, 0x1d, 0x1d }, +{ 0x00, 0x1e, 0x1e }, +{ 0x00, 0x1f, 0x1f }, +{ 0x00, 0x20, 0x20 }, +{ 0x00, 0x21, 0x21 }, +{ 0x00, 0x22, 0x22 }, +{ 0x00, 0x23, 0x23 }, +{ 0x00, 0x24, 0x24 }, +{ 0x00, 0x25, 0x25 }, +{ 0x00, 0x26, 0x26 }, +{ 0x00, 0x27, 0x27 }, +{ 0x00, 0x28, 0x28 }, +{ 0x00, 0x29, 0x29 }, +{ 0x00, 0x2a, 0x2a }, +{ 0x00, 0x2b, 0x2b }, +{ 0x00, 0x2c, 0x2c }, +{ 0x00, 0x2d, 0x2d }, +{ 0x00, 0x2e, 0x2e }, +{ 0x00, 0x2f, 0x2f }, +{ 0x00, 0x30, 0x30 }, +{ 0x00, 0x31, 0x31 }, +{ 0x00, 0x32, 0x32 }, +{ 0x00, 0x33, 0x33 }, +{ 0x00, 0x34, 0x34 }, +{ 0x00, 0x35, 0x35 }, +{ 0x00, 0x36, 0x36 }, +{ 0x00, 0x37, 0x37 }, +{ 0x00, 0x38, 0x38 }, +{ 0x00, 0x39, 0x39 }, +{ 0x00, 0x3a, 0x3a }, +{ 0x00, 0x3b, 0x3b }, +{ 0x00, 0x3c, 0x3c }, +{ 0x00, 0x3d, 0x3d }, +{ 0x00, 0x3e, 0x3e }, +{ 0x00, 0x3f, 0x3f }, +{ 0x00, 0x40, 0x40 }, +{ 0x01, 0x61, 0x41 }, +{ 0x01, 0x62, 0x42 }, +{ 0x01, 0x63, 0x43 }, +{ 0x01, 0x64, 0x44 }, +{ 0x01, 0x65, 0x45 }, +{ 0x01, 0x66, 0x46 }, +{ 0x01, 0x67, 0x47 }, +{ 0x01, 0x68, 0x48 }, +{ 0x01, 0x69, 0x49 }, +{ 0x01, 0x6a, 0x4a }, +{ 0x01, 0x6b, 0x4b }, +{ 0x01, 0x6c, 0x4c }, +{ 0x01, 0x6d, 0x4d }, +{ 0x01, 0x6e, 0x4e }, +{ 0x01, 0x6f, 0x4f }, +{ 0x01, 0x70, 0x50 }, +{ 0x01, 0x71, 0x51 }, +{ 0x01, 0x72, 0x52 }, +{ 0x01, 0x73, 0x53 }, +{ 0x01, 0x74, 0x54 }, +{ 0x01, 0x75, 0x55 }, +{ 0x01, 0x76, 0x56 }, +{ 0x01, 0x77, 0x57 }, +{ 0x01, 0x78, 0x58 }, +{ 0x01, 0x79, 0x59 }, +{ 0x01, 0x7a, 0x5a }, +{ 0x00, 0x5b, 0x5b }, +{ 0x00, 0x5c, 0x5c }, +{ 0x00, 0x5d, 0x5d }, +{ 0x00, 0x5e, 0x5e }, +{ 0x00, 0x5f, 0x5f }, +{ 0x00, 0x60, 0x60 }, +{ 0x00, 0x61, 0x41 }, +{ 0x00, 0x62, 0x42 }, +{ 0x00, 0x63, 0x43 }, +{ 0x00, 0x64, 0x44 }, +{ 0x00, 0x65, 0x45 }, +{ 0x00, 0x66, 0x46 }, +{ 0x00, 0x67, 0x47 }, +{ 0x00, 0x68, 0x48 }, +{ 0x00, 0x69, 0x49 }, +{ 0x00, 0x6a, 0x4a }, +{ 0x00, 0x6b, 0x4b }, +{ 0x00, 0x6c, 0x4c }, +{ 0x00, 0x6d, 0x4d }, +{ 0x00, 0x6e, 0x4e }, +{ 0x00, 0x6f, 0x4f }, +{ 0x00, 0x70, 0x50 }, +{ 0x00, 0x71, 0x51 }, +{ 0x00, 0x72, 0x52 }, +{ 0x00, 0x73, 0x53 }, +{ 0x00, 0x74, 0x54 }, +{ 0x00, 0x75, 0x55 }, +{ 0x00, 0x76, 0x56 }, +{ 0x00, 0x77, 0x57 }, +{ 0x00, 0x78, 0x58 }, +{ 0x00, 0x79, 0x59 }, +{ 0x00, 0x7a, 0x5a }, +{ 0x00, 0x7b, 0x7b }, +{ 0x00, 0x7c, 0x7c }, +{ 0x00, 0x7d, 0x7d }, +{ 0x00, 0x7e, 0x7e }, +{ 0x00, 0x7f, 0x7f }, +{ 0x00, 0x80, 0x80 }, +{ 0x00, 0x81, 0x81 }, +{ 0x00, 0x82, 0x82 }, +{ 0x00, 0x83, 0x83 }, +{ 0x00, 0x84, 0x84 }, +{ 0x00, 0x85, 0x85 }, +{ 0x00, 0x86, 0x86 }, +{ 0x00, 0x87, 0x87 }, +{ 0x00, 0x88, 0x88 }, +{ 0x00, 0x89, 0x89 }, +{ 0x00, 0x8a, 0x8a }, +{ 0x00, 0x8b, 0x8b }, +{ 0x00, 0x8c, 0x8c }, +{ 0x00, 0x8d, 0x8d }, +{ 0x00, 0x8e, 0x8e }, +{ 0x00, 0x8f, 0x8f }, +{ 0x00, 0x90, 0x90 }, +{ 0x00, 0x91, 0x91 }, +{ 0x00, 0x92, 0x92 }, +{ 0x00, 0x93, 0x93 }, +{ 0x00, 0x94, 0x94 }, +{ 0x00, 0x95, 0x95 }, +{ 0x00, 0x96, 0x96 }, +{ 0x00, 0x97, 0x97 }, +{ 0x00, 0x98, 0x98 }, +{ 0x00, 0x99, 0x99 }, +{ 0x00, 0x9a, 0x9a }, +{ 0x00, 0x9b, 0x9b }, +{ 0x00, 0x9c, 0x9c }, +{ 0x00, 0x9d, 0x9d }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, +{ 0x00, 0xfe, 0xfe }, +{ 0x00, 0xff, 0xff } +}; + +static struct cs_info iso7_tbl[] = { +{ 0x00, 0x00, 0x00 }, +{ 0x00, 0x01, 0x01 }, +{ 0x00, 0x02, 0x02 }, +{ 0x00, 0x03, 0x03 }, +{ 0x00, 0x04, 0x04 }, +{ 0x00, 0x05, 0x05 }, +{ 0x00, 0x06, 0x06 }, +{ 0x00, 0x07, 0x07 }, +{ 0x00, 0x08, 0x08 }, +{ 0x00, 0x09, 0x09 }, +{ 0x00, 0x0a, 0x0a }, +{ 0x00, 0x0b, 0x0b }, +{ 0x00, 0x0c, 0x0c }, +{ 0x00, 0x0d, 0x0d }, +{ 0x00, 0x0e, 0x0e }, +{ 0x00, 0x0f, 0x0f }, +{ 0x00, 0x10, 0x10 }, +{ 0x00, 0x11, 0x11 }, +{ 0x00, 0x12, 0x12 }, +{ 0x00, 0x13, 0x13 }, +{ 0x00, 0x14, 0x14 }, +{ 0x00, 0x15, 0x15 }, +{ 0x00, 0x16, 0x16 }, +{ 0x00, 0x17, 0x17 }, +{ 0x00, 0x18, 0x18 }, +{ 0x00, 0x19, 0x19 }, +{ 0x00, 0x1a, 0x1a }, +{ 0x00, 0x1b, 0x1b }, +{ 0x00, 0x1c, 0x1c }, +{ 0x00, 0x1d, 0x1d }, +{ 0x00, 0x1e, 0x1e }, +{ 0x00, 0x1f, 0x1f }, +{ 0x00, 0x20, 0x20 }, +{ 0x00, 0x21, 0x21 }, +{ 0x00, 0x22, 0x22 }, +{ 0x00, 0x23, 0x23 }, +{ 0x00, 0x24, 0x24 }, +{ 0x00, 0x25, 0x25 }, +{ 0x00, 0x26, 0x26 }, +{ 0x00, 0x27, 0x27 }, +{ 0x00, 0x28, 0x28 }, +{ 0x00, 0x29, 0x29 }, +{ 0x00, 0x2a, 0x2a }, +{ 0x00, 0x2b, 0x2b }, +{ 0x00, 0x2c, 0x2c }, +{ 0x00, 0x2d, 0x2d }, +{ 0x00, 0x2e, 0x2e }, +{ 0x00, 0x2f, 0x2f }, +{ 0x00, 0x30, 0x30 }, +{ 0x00, 0x31, 0x31 }, +{ 0x00, 0x32, 0x32 }, +{ 0x00, 0x33, 0x33 }, +{ 0x00, 0x34, 0x34 }, +{ 0x00, 0x35, 0x35 }, +{ 0x00, 0x36, 0x36 }, +{ 0x00, 0x37, 0x37 }, +{ 0x00, 0x38, 0x38 }, +{ 0x00, 0x39, 0x39 }, +{ 0x00, 0x3a, 0x3a }, +{ 0x00, 0x3b, 0x3b }, +{ 0x00, 0x3c, 0x3c }, +{ 0x00, 0x3d, 0x3d }, +{ 0x00, 0x3e, 0x3e }, +{ 0x00, 0x3f, 0x3f }, +{ 0x00, 0x40, 0x40 }, +{ 0x01, 0x61, 0x41 }, +{ 0x01, 0x62, 0x42 }, +{ 0x01, 0x63, 0x43 }, +{ 0x01, 0x64, 0x44 }, +{ 0x01, 0x65, 0x45 }, +{ 0x01, 0x66, 0x46 }, +{ 0x01, 0x67, 0x47 }, +{ 0x01, 0x68, 0x48 }, +{ 0x01, 0x69, 0x49 }, +{ 0x01, 0x6a, 0x4a }, +{ 0x01, 0x6b, 0x4b }, +{ 0x01, 0x6c, 0x4c }, +{ 0x01, 0x6d, 0x4d }, +{ 0x01, 0x6e, 0x4e }, +{ 0x01, 0x6f, 0x4f }, +{ 0x01, 0x70, 0x50 }, +{ 0x01, 0x71, 0x51 }, +{ 0x01, 0x72, 0x52 }, +{ 0x01, 0x73, 0x53 }, +{ 0x01, 0x74, 0x54 }, +{ 0x01, 0x75, 0x55 }, +{ 0x01, 0x76, 0x56 }, +{ 0x01, 0x77, 0x57 }, +{ 0x01, 0x78, 0x58 }, +{ 0x01, 0x79, 0x59 }, +{ 0x01, 0x7a, 0x5a }, +{ 0x00, 0x5b, 0x5b }, +{ 0x00, 0x5c, 0x5c }, +{ 0x00, 0x5d, 0x5d }, +{ 0x00, 0x5e, 0x5e }, +{ 0x00, 0x5f, 0x5f }, +{ 0x00, 0x60, 0x60 }, +{ 0x00, 0x61, 0x41 }, +{ 0x00, 0x62, 0x42 }, +{ 0x00, 0x63, 0x43 }, +{ 0x00, 0x64, 0x44 }, +{ 0x00, 0x65, 0x45 }, +{ 0x00, 0x66, 0x46 }, +{ 0x00, 0x67, 0x47 }, +{ 0x00, 0x68, 0x48 }, +{ 0x00, 0x69, 0x49 }, +{ 0x00, 0x6a, 0x4a }, +{ 0x00, 0x6b, 0x4b }, +{ 0x00, 0x6c, 0x4c }, +{ 0x00, 0x6d, 0x4d }, +{ 0x00, 0x6e, 0x4e }, +{ 0x00, 0x6f, 0x4f }, +{ 0x00, 0x70, 0x50 }, +{ 0x00, 0x71, 0x51 }, +{ 0x00, 0x72, 0x52 }, +{ 0x00, 0x73, 0x53 }, +{ 0x00, 0x74, 0x54 }, +{ 0x00, 0x75, 0x55 }, +{ 0x00, 0x76, 0x56 }, +{ 0x00, 0x77, 0x57 }, +{ 0x00, 0x78, 0x58 }, +{ 0x00, 0x79, 0x59 }, +{ 0x00, 0x7a, 0x5a }, +{ 0x00, 0x7b, 0x7b }, +{ 0x00, 0x7c, 0x7c }, +{ 0x00, 0x7d, 0x7d }, +{ 0x00, 0x7e, 0x7e }, +{ 0x00, 0x7f, 0x7f }, +{ 0x00, 0x80, 0x80 }, +{ 0x00, 0x81, 0x81 }, +{ 0x00, 0x82, 0x82 }, +{ 0x00, 0x83, 0x83 }, +{ 0x00, 0x84, 0x84 }, +{ 0x00, 0x85, 0x85 }, +{ 0x00, 0x86, 0x86 }, +{ 0x00, 0x87, 0x87 }, +{ 0x00, 0x88, 0x88 }, +{ 0x00, 0x89, 0x89 }, +{ 0x00, 0x8a, 0x8a }, +{ 0x00, 0x8b, 0x8b }, +{ 0x00, 0x8c, 0x8c }, +{ 0x00, 0x8d, 0x8d }, +{ 0x00, 0x8e, 0x8e }, +{ 0x00, 0x8f, 0x8f }, +{ 0x00, 0x90, 0x90 }, +{ 0x00, 0x91, 0x91 }, +{ 0x00, 0x92, 0x92 }, +{ 0x00, 0x93, 0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 0x00, 0xf4, 0xd4 }, +{ 0x00, 0xf5, 0xd5 }, +{ 0x00, 0xf6, 0xd6 }, +{ 0x00, 0xf7, 0xd7 }, +{ 0x00, 0xf8, 0xd8 }, +{ 0x00, 0xf9, 0xd9 }, +{ 0x00, 0xfa, 0xda }, +{ 0x00, 0xfb, 0xdb }, +{ 0x00, 0xfc, 0xbc }, +{ 0x00, 0xfd, 0xbe }, +{ 0x00, 0xfe, 0xbf }, +{ 0x00, 0xff, 0xff } +}; + +static struct cs_info iso8_tbl[] = { +{ 0x00, 0x00, 0x00 }, +{ 0x00, 0x01, 0x01 }, +{ 0x00, 0x02, 0x02 }, +{ 0x00, 0x03, 0x03 }, +{ 0x00, 0x04, 0x04 }, +{ 0x00, 0x05, 0x05 }, +{ 0x00, 0x06, 0x06 }, +{ 0x00, 0x07, 0x07 }, +{ 0x00, 0x08, 0x08 }, +{ 0x00, 0x09, 0x09 }, +{ 0x00, 0x0a, 0x0a }, +{ 0x00, 0x0b, 0x0b }, +{ 0x00, 0x0c, 0x0c }, +{ 0x00, 0x0d, 0x0d }, +{ 0x00, 0x0e, 0x0e }, +{ 0x00, 0x0f, 0x0f }, +{ 0x00, 0x10, 0x10 }, +{ 0x00, 0x11, 0x11 }, +{ 0x00, 0x12, 0x12 }, +{ 0x00, 0x13, 0x13 }, +{ 0x00, 0x14, 0x14 }, +{ 0x00, 0x15, 0x15 }, +{ 0x00, 0x16, 0x16 }, +{ 0x00, 0x17, 0x17 }, +{ 0x00, 0x18, 0x18 }, +{ 0x00, 0x19, 0x19 }, +{ 0x00, 0x1a, 0x1a }, +{ 0x00, 0x1b, 0x1b }, +{ 0x00, 0x1c, 0x1c }, +{ 0x00, 0x1d, 0x1d }, +{ 0x00, 0x1e, 0x1e }, +{ 0x00, 0x1f, 0x1f }, +{ 0x00, 0x20, 0x20 }, +{ 0x00, 0x21, 0x21 }, +{ 0x00, 0x22, 0x22 }, +{ 0x00, 0x23, 0x23 }, +{ 0x00, 0x24, 0x24 }, +{ 0x00, 0x25, 0x25 }, +{ 0x00, 0x26, 0x26 }, +{ 0x00, 0x27, 0x27 }, +{ 0x00, 0x28, 0x28 }, +{ 0x00, 0x29, 0x29 }, +{ 0x00, 0x2a, 0x2a }, +{ 0x00, 0x2b, 0x2b }, +{ 0x00, 0x2c, 0x2c }, +{ 0x00, 0x2d, 0x2d }, +{ 0x00, 0x2e, 0x2e }, +{ 0x00, 0x2f, 0x2f }, +{ 0x00, 0x30, 0x30 }, +{ 0x00, 0x31, 0x31 }, +{ 0x00, 0x32, 0x32 }, +{ 0x00, 0x33, 0x33 }, +{ 0x00, 0x34, 0x34 }, +{ 0x00, 0x35, 0x35 }, +{ 0x00, 0x36, 0x36 }, +{ 0x00, 0x37, 0x37 }, +{ 0x00, 0x38, 0x38 }, +{ 0x00, 0x39, 0x39 }, +{ 0x00, 0x3a, 0x3a }, +{ 0x00, 0x3b, 0x3b }, +{ 0x00, 0x3c, 0x3c }, +{ 0x00, 0x3d, 0x3d }, +{ 0x00, 0x3e, 0x3e }, +{ 0x00, 0x3f, 0x3f }, +{ 0x00, 0x40, 0x40 }, +{ 0x01, 0x61, 0x41 }, +{ 0x01, 0x62, 0x42 }, +{ 0x01, 0x63, 0x43 }, +{ 0x01, 0x64, 0x44 }, +{ 0x01, 0x65, 0x45 }, +{ 0x01, 0x66, 0x46 }, +{ 0x01, 0x67, 0x47 }, +{ 0x01, 0x68, 0x48 }, +{ 0x01, 0x69, 0x49 }, +{ 0x01, 0x6a, 0x4a }, +{ 0x01, 0x6b, 0x4b }, +{ 0x01, 0x6c, 0x4c }, +{ 0x01, 0x6d, 0x4d }, +{ 0x01, 0x6e, 0x4e }, +{ 0x01, 0x6f, 0x4f }, +{ 0x01, 0x70, 0x50 }, +{ 0x01, 0x71, 0x51 }, +{ 0x01, 0x72, 0x52 }, +{ 0x01, 0x73, 0x53 }, +{ 0x01, 0x74, 0x54 }, +{ 0x01, 0x75, 0x55 }, +{ 0x01, 0x76, 0x56 }, +{ 0x01, 0x77, 0x57 }, +{ 0x01, 0x78, 0x58 }, +{ 0x01, 0x79, 0x59 }, +{ 0x01, 0x7a, 0x5a }, +{ 0x00, 0x5b, 0x5b }, +{ 0x00, 0x5c, 0x5c }, +{ 0x00, 0x5d, 0x5d }, +{ 0x00, 0x5e, 0x5e }, +{ 0x00, 0x5f, 0x5f }, +{ 0x00, 0x60, 0x60 }, +{ 0x00, 0x61, 0x41 }, +{ 0x00, 0x62, 0x42 }, +{ 0x00, 0x63, 0x43 }, +{ 0x00, 0x64, 0x44 }, +{ 0x00, 0x65, 0x45 }, +{ 0x00, 0x66, 0x46 }, +{ 0x00, 0x67, 0x47 }, +{ 0x00, 0x68, 0x48 }, +{ 0x00, 0x69, 0x49 }, +{ 0x00, 0x6a, 0x4a }, +{ 0x00, 0x6b, 0x4b }, +{ 0x00, 0x6c, 0x4c }, +{ 0x00, 0x6d, 0x4d }, +{ 0x00, 0x6e, 0x4e }, +{ 0x00, 0x6f, 0x4f }, +{ 0x00, 0x70, 0x50 }, +{ 0x00, 0x71, 0x51 }, +{ 0x00, 0x72, 0x52 }, +{ 0x00, 0x73, 0x53 }, +{ 0x00, 0x74, 0x54 }, +{ 0x00, 0x75, 0x55 }, +{ 0x00, 0x76, 0x56 }, +{ 0x00, 0x77, 0x57 }, +{ 0x00, 0x78, 0x58 }, +{ 0x00, 0x79, 0x59 }, +{ 0x00, 0x7a, 0x5a }, +{ 0x00, 0x7b, 0x7b }, +{ 0x00, 0x7c, 0x7c }, +{ 0x00, 0x7d, 0x7d }, +{ 0x00, 0x7e, 0x7e }, +{ 0x00, 0x7f, 0x7f }, +{ 0x00, 0x80, 0x80 }, +{ 0x00, 0x81, 0x81 }, +{ 0x00, 0x82, 0x82 }, +{ 0x00, 0x83, 0x83 }, +{ 0x00, 0x84, 0x84 }, +{ 0x00, 0x85, 0x85 }, +{ 0x00, 0x86, 0x86 }, +{ 0x00, 0x87, 0x87 }, +{ 0x00, 0x88, 0x88 }, +{ 0x00, 0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+{ 0x00, 0xea, 0xea }, +{ 0x00, 0xeb, 0xeb }, +{ 0x00, 0xec, 0xec }, +{ 0x00, 0xed, 0xed }, +{ 0x00, 0xee, 0xee }, +{ 0x00, 0xef, 0xef }, +{ 0x00, 0xf0, 0xf0 }, +{ 0x00, 0xf1, 0xf1 }, +{ 0x00, 0xf2, 0xf2 }, +{ 0x00, 0xf3, 0xf3 }, +{ 0x00, 0xf4, 0xf4 }, +{ 0x00, 0xf5, 0xf5 }, +{ 0x00, 0xf6, 0xf6 }, +{ 0x00, 0xf7, 0xf7 }, +{ 0x00, 0xf8, 0xf8 }, +{ 0x00, 0xf9, 0xf9 }, +{ 0x00, 0xfa, 0xfa }, +{ 0x00, 0xfb, 0xfb }, +{ 0x00, 0xfc, 0xfc }, +{ 0x00, 0xfd, 0xfd }, +{ 0x00, 0xfe, 0xfe }, +{ 0x00, 0xff, 0xff } +}; + +static struct cs_info iso9_tbl[] = { +{ 0x00, 0x00, 0x00 }, +{ 0x00, 0x01, 0x01 }, +{ 0x00, 0x02, 0x02 }, +{ 0x00, 0x03, 0x03 }, +{ 0x00, 0x04, 0x04 }, +{ 0x00, 0x05, 0x05 }, +{ 0x00, 0x06, 0x06 }, +{ 0x00, 0x07, 0x07 }, +{ 0x00, 0x08, 0x08 }, +{ 0x00, 0x09, 0x09 }, +{ 0x00, 0x0a, 0x0a }, +{ 0x00, 0x0b, 0x0b }, +{ 0x00, 0x0c, 0x0c }, +{ 0x00, 0x0d, 0x0d }, +{ 0x00, 0x0e, 0x0e }, +{ 0x00, 0x0f, 0x0f }, +{ 0x00, 0x10, 0x10 }, +{ 0x00, 0x11, 0x11 }, +{ 0x00, 0x12, 0x12 }, +{ 0x00, 0x13, 0x13 }, +{ 0x00, 0x14, 0x14 }, +{ 0x00, 0x15, 0x15 }, +{ 0x00, 0x16, 0x16 }, +{ 0x00, 0x17, 0x17 }, +{ 0x00, 0x18, 0x18 }, +{ 0x00, 0x19, 0x19 }, +{ 0x00, 0x1a, 0x1a }, +{ 0x00, 0x1b, 0x1b }, +{ 0x00, 0x1c, 0x1c }, +{ 0x00, 0x1d, 0x1d }, +{ 0x00, 0x1e, 0x1e }, +{ 0x00, 0x1f, 0x1f }, +{ 0x00, 0x20, 0x20 }, +{ 0x00, 0x21, 0x21 }, +{ 0x00, 0x22, 0x22 }, +{ 0x00, 0x23, 0x23 }, +{ 0x00, 0x24, 0x24 }, +{ 0x00, 0x25, 0x25 }, +{ 0x00, 0x26, 0x26 }, +{ 0x00, 0x27, 0x27 }, +{ 0x00, 0x28, 0x28 }, +{ 0x00, 0x29, 0x29 }, +{ 0x00, 0x2a, 0x2a }, +{ 0x00, 0x2b, 0x2b }, +{ 0x00, 0x2c, 0x2c }, +{ 0x00, 0x2d, 0x2d }, +{ 0x00, 0x2e, 0x2e }, +{ 0x00, 0x2f, 0x2f }, +{ 0x00, 0x30, 0x30 }, +{ 0x00, 0x31, 0x31 }, +{ 0x00, 0x32, 0x32 }, +{ 0x00, 0x33, 0x33 }, +{ 0x00, 0x34, 0x34 }, +{ 0x00, 0x35, 0x35 }, +{ 0x00, 0x36, 0x36 }, +{ 0x00, 0x37, 0x37 }, +{ 0x00, 0x38, 0x38 }, +{ 0x00, 0x39, 0x39 }, +{ 0x00, 0x3a, 0x3a }, +{ 0x00, 0x3b, 0x3b }, +{ 0x00, 0x3c, 0x3c }, +{ 0x00, 0x3d, 0x3d }, +{ 0x00, 0x3e, 0x3e }, +{ 0x00, 0x3f, 0x3f }, +{ 0x00, 0x40, 0x40 }, +{ 0x01, 0x61, 0x41 }, +{ 0x01, 0x62, 0x42 }, +{ 0x01, 0x63, 0x43 }, +{ 0x01, 0x64, 0x44 }, +{ 0x01, 0x65, 0x45 }, +{ 0x01, 0x66, 0x46 }, +{ 0x01, 0x67, 0x47 }, +{ 0x01, 0x68, 0x48 }, +{ 0x01, 0xfd, 0x49 }, +{ 0x01, 0x6a, 0x4a }, +{ 0x01, 0x6b, 0x4b }, +{ 0x01, 0x6c, 0x4c }, +{ 0x01, 0x6d, 0x4d }, +{ 0x01, 0x6e, 0x4e }, +{ 0x01, 0x6f, 0x4f }, +{ 0x01, 0x70, 0x50 }, +{ 0x01, 0x71, 0x51 }, +{ 0x01, 0x72, 0x52 }, +{ 0x01, 0x73, 0x53 }, +{ 0x01, 0x74, 0x54 }, +{ 0x01, 0x75, 0x55 }, +{ 0x01, 0x76, 0x56 }, +{ 0x01, 0x77, 0x57 }, +{ 0x01, 0x78, 0x58 }, +{ 0x01, 0x79, 0x59 }, +{ 0x01, 0x7a, 0x5a }, +{ 0x00, 0x5b, 0x5b }, +{ 0x00, 0x5c, 0x5c }, +{ 0x00, 0x5d, 0x5d }, +{ 0x00, 0x5e, 0x5e }, +{ 0x00, 0x5f, 0x5f }, +{ 0x00, 0x60, 0x60 }, +{ 0x00, 0x61, 0x41 }, +{ 0x00, 0x62, 0x42 }, +{ 0x00, 0x63, 0x43 }, +{ 0x00, 0x64, 0x44 }, +{ 0x00, 0x65, 0x45 }, +{ 0x00, 0x66, 0x46 }, +{ 0x00, 0x67, 0x47 }, +{ 0x00, 0x68, 0x48 }, +{ 0x00, 0x69, 0xdd }, +{ 0x00, 0x6a, 0x4a }, +{ 0x00, 0x6b, 0x4b }, +{ 0x00, 0x6c, 0x4c }, +{ 0x00, 0x6d, 0x4d }, +{ 0x00, 0x6e, 0x4e }, +{ 0x00, 0x6f, 0x4f }, +{ 0x00, 0x70, 0x50 }, +{ 0x00, 0x71, 0x51 }, +{ 0x00, 0x72, 0x52 }, +{ 0x00, 0x73, 0x53 }, +{ 0x00, 0x74, 0x54 }, +{ 0x00, 0x75, 0x55 }, +{ 0x00, 0x76, 0x56 }, +{ 0x00, 0x77, 0x57 }, +{ 0x00, 0x78, 0x58 }, +{ 0x00, 0x79, 0x59 }, +{ 0x00, 0x7a, 0x5a }, +{ 0x00, 0x7b, 0x7b }, +{ 0x00, 0x7c, 0x7c }, +{ 0x00, 0x7d, 0x7d }, +{ 0x00, 0x7e, 0x7e }, +{ 0x00, 0x7f, 0x7f }, +{ 0x00, 0x80, 0x80 }, +{ 0x00, 0x81, 0x81 }, +{ 0x00, 0x82, 0x82 }, +{ 0x00, 0x83, 0x83 }, +{ 0x00, 0x84, 0x84 }, +{ 0x00, 0x85, 0x85 }, +{ 0x00, 0x86, 0x86 }, +{ 0x00, 0x87, 0x87 }, +{ 0x00, 0x88, 0x88 }, +{ 0x00, 0x89, 0x89 }, +{ 0x00, 0x8a, 0x8a }, +{ 0x00, 0x8b, 0x8b }, +{ 0x00, 0x8c, 0x8c }, +{ 0x00, 0x8d, 0x8d }, +{ 0x00, 0x8e, 0x8e }, +{ 0x00, 0x8f, 0x8f }, +{ 0x00, 0x90, 0x90 }, +{ 0x00, 0x91, 0x91 }, +{ 0x00, 0x92, 0x92 }, +{ 0x00, 0x93, 0x93 }, +{ 0x00, 0x94, 0x94 }, +{ 0x00, 0x95, 0x95 }, +{ 0x00, 0x96, 0x96 }, +{ 0x00, 0x97, 0x97 }, +{ 0x00, 0x98, 0x98 }, +{ 0x00, 0x99, 0x99 }, +{ 0x00, 0x9a, 0x9a }, +{ 0x00, 0x9b, 0x9b }, +{ 0x00, 0x9c, 0x9c }, +{ 0x00, 0x9d, 0x9d }, +{ 0x00, 0x9e, 0x9e }, +{ 0x00, 0x9f, 0x9f }, +{ 0x00, 0xa0, 0xa0 }, +{ 0x00, 0xa1, 0xa1 }, +{ 0x00, 0xa2, 0xa2 }, +{ 0x00, 0xa3, 0xa3 }, +{ 0x00, 0xa4, 0xa4 }, +{ 0x00, 0xa5, 0xa5 }, +{ 0x00, 0xa6, 0xa6 }, +{ 0x00, 0xa7, 0xa7 }, +{ 0x00, 0xa8, 0xa8 }, +{ 0x00, 0xa9, 0xa9 }, +{ 0x00, 0xaa, 0xaa }, +{ 0x00, 0xab, 0xab }, +{ 0x00, 0xac, 0xac }, +{ 0x00, 0xad, 0xad }, +{ 0x00, 0xae, 0xae }, +{ 0x00, 0xaf, 0xaf }, +{ 0x00, 0xb0, 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, 0xc0 }, +{ 0x00, 0xe1, 0xc1 }, +{ 0x00, 0xe2, 0xc2 }, +{ 0x00, 0xe3, 0xc3 }, +{ 0x00, 0xe4, 0xc4 }, +{ 0x00, 0xe5, 0xc5 }, +{ 0x00, 0xe6, 0xc6 }, +{ 0x00, 0xe7, 0xc7 }, +{ 0x00, 0xe8, 0xc8 }, +{ 0x00, 0xe9, 0xc9 }, +{ 0x00, 0xea, 0xca }, +{ 0x00, 0xeb, 0xcb }, +{ 0x00, 0xec, 0xcc }, +{ 0x00, 0xed, 0xcd }, +{ 0x00, 0xee, 0xce }, +{ 0x00, 0xef, 0xcf }, +{ 0x00, 0xf0, 0xd0 }, +{ 0x00, 0xf1, 0xd1 }, +{ 0x00, 0xf2, 0xd2 }, +{ 0x00, 0xf3, 0xd3 }, +{ 0x00, 0xf4, 0xd4 }, +{ 0x00, 0xf5, 0xd5 }, +{ 0x00, 0xf6, 0xd6 }, +{ 0x00, 0xf7, 0xf7 }, +{ 0x00, 0xf8, 0xd8 }, +{ 0x00, 0xf9, 0xd9 }, +{ 0x00, 0xfa, 0xda }, +{ 0x00, 0xfb, 0xdb }, +{ 0x00, 0xfc, 0xdc }, +{ 0x00, 0xfd, 0x49 }, +{ 0x00, 0xfe, 0xde }, +{ 0x00, 0xff, 0xff } +}; + +static struct cs_info iso10_tbl[] = { +{ 0x00, 0x00, 0x00 }, +{ 0x00, 0x01, 0x01 }, +{ 0x00, 0x02, 0x02 }, +{ 0x00, 0x03, 0x03 }, +{ 0x00, 0x04, 0x04 }, +{ 0x00, 0x05, 0x05 }, +{ 0x00, 0x06, 0x06 }, +{ 0x00, 0x07, 0x07 }, +{ 0x00, 0x08, 0x08 }, +{ 0x00, 0x09, 0x09 }, +{ 0x00, 0x0a, 0x0a }, +{ 0x00, 0x0b, 0x0b }, +{ 0x00, 0x0c, 0x0c }, +{ 0x00, 0x0d, 0x0d }, +{ 0x00, 0x0e, 0x0e }, +{ 0x00, 0x0f, 0x0f }, +{ 0x00, 0x10, 0x10 }, +{ 0x00, 0x11, 0x11 }, +{ 0x00, 0x12, 0x12 }, +{ 0x00, 0x13, 0x13 }, +{ 0x00, 0x14, 0x14 }, +{ 0x00, 0x15, 0x15 }, +{ 0x00, 0x16, 0x16 }, +{ 0x00, 0x17, 0x17 }, +{ 0x00, 0x18, 0x18 }, +{ 0x00, 0x19, 0x19 }, +{ 0x00, 0x1a, 0x1a }, +{ 0x00, 0x1b, 0x1b }, +{ 0x00, 0x1c, 0x1c }, +{ 0x00, 0x1d, 0x1d }, +{ 0x00, 0x1e, 0x1e }, +{ 0x00, 0x1f, 0x1f }, +{ 0x00, 0x20, 0x20 }, +{ 0x00, 0x21, 0x21 }, +{ 0x00, 0x22, 0x22 }, +{ 0x00, 0x23, 0x23 }, +{ 0x00, 0x24, 0x24 }, +{ 0x00, 0x25, 0x25 }, +{ 0x00, 0x26, 0x26 }, +{ 0x00, 0x27, 0x27 }, +{ 0x00, 0x28, 0x28 }, +{ 0x00, 0x29, 0x29 }, +{ 0x00, 0x2a, 0x2a }, +{ 0x00, 0x2b, 0x2b }, +{ 0x00, 0x2c, 0x2c }, +{ 0x00, 0x2d, 0x2d }, +{ 0x00, 0x2e, 0x2e }, +{ 0x00, 0x2f, 0x2f }, +{ 0x00, 0x30, 0x30 }, +{ 0x00, 0x31, 0x31 }, +{ 0x00, 0x32, 0x32 }, +{ 0x00, 0x33, 0x33 }, +{ 0x00, 0x34, 0x34 }, +{ 0x00, 0x35, 0x35 }, +{ 0x00, 0x36, 0x36 }, +{ 0x00, 0x37, 0x37 }, +{ 0x00, 0x38, 0x38 }, +{ 0x00, 0x39, 0x39 }, +{ 0x00, 0x3a, 0x3a }, +{ 0x00, 0x3b, 0x3b }, +{ 0x00, 0x3c, 0x3c }, +{ 0x00, 0x3d, 0x3d }, +{ 0x00, 0x3e, 0x3e }, +{ 0x00, 0x3f, 0x3f }, +{ 0x00, 0x40, 0x40 }, +{ 0x01, 0x61, 0x41 }, +{ 0x01, 0x62, 0x42 }, +{ 0x01, 0x63, 0x43 }, +{ 0x01, 0x64, 0x44 }, +{ 0x01, 0x65, 0x45 }, +{ 0x01, 0x66, 0x46 }, +{ 0x01, 0x67, 0x47 }, +{ 0x01, 0x68, 0x48 }, +{ 0x01, 0x69, 0x49 }, +{ 0x01, 0x6a, 0x4a }, +{ 0x01, 0x6b, 0x4b }, +{ 0x01, 0x6c, 0x4c }, +{ 0x01, 0x6d, 0x4d }, +{ 0x01, 0x6e, 0x4e }, +{ 0x01, 0x6f, 0x4f }, +{ 0x01, 0x70, 0x50 }, +{ 0x01, 0x71, 0x51 }, +{ 0x01, 0x72, 0x52 }, +{ 0x01, 0x73, 0x53 }, +{ 0x01, 0x74, 0x54 }, +{ 0x01, 0x75, 0x55 }, +{ 0x01, 0x76, 0x56 }, +{ 0x01, 0x77, 0x57 }, +{ 0x01, 0x78, 0x58 }, +{ 0x01, 0x79, 0x59 }, +{ 0x01, 0x7a, 0x5a }, +{ 0x00, 0x5b, 0x5b }, +{ 0x00, 0x5c, 0x5c }, +{ 0x00, 0x5d, 0x5d }, +{ 0x00, 0x5e, 0x5e }, +{ 0x00, 0x5f, 0x5f }, +{ 0x00, 0x60, 0x60 }, +{ 0x00, 0x61, 0x41 }, +{ 0x00, 0x62, 0x42 }, +{ 0x00, 0x63, 0x43 }, +{ 0x00, 0x64, 0x44 }, +{ 0x00, 0x65, 0x45 }, +{ 0x00, 0x66, 0x46 }, +{ 0x00, 0x67, 0x47 }, +{ 0x00, 0x68, 0x48 }, +{ 0x00, 0x69, 0x49 }, +{ 0x00, 0x6a, 0x4a }, +{ 0x00, 0x6b, 0x4b }, +{ 0x00, 0x6c, 0x4c }, +{ 0x00, 0x6d, 0x4d }, +{ 0x00, 0x6e, 0x4e }, +{ 0x00, 0x6f, 0x4f }, +{ 0x00, 0x70, 0x50 }, +{ 0x00, 0x71, 0x51 }, +{ 0x00, 0x72, 0x52 }, +{ 0x00, 0x73, 0x53 }, +{ 0x00, 0x74, 0x54 }, +{ 0x00, 0x75, 0x55 }, +{ 0x00, 0x76, 0x56 }, +{ 0x00, 0x77, 0x57 }, +{ 0x00, 0x78, 0x58 }, +{ 0x00, 0x79, 0x59 }, +{ 0x00, 0x7a, 0x5a }, +{ 0x00, 0x7b, 0x7b }, +{ 0x00, 0x7c, 0x7c }, +{ 0x00, 0x7d, 0x7d }, +{ 0x00, 0x7e, 0x7e }, +{ 0x00, 0x7f, 0x7f }, +{ 0x00, 0x80, 0x80 }, +{ 0x00, 0x81, 0x81 }, +{ 0x00, 0x82, 0x82 }, +{ 0x00, 0x83, 0x83 }, +{ 0x00, 0x84, 0x84 }, +{ 0x00, 0x85, 0x85 }, +{ 0x00, 0x86, 0x86 }, +{ 0x00, 0x87, 0x87 }, +{ 0x00, 0x88, 0x88 }, +{ 0x00, 0x89, 0x89 }, +{ 0x00, 0x8a, 0x8a }, +{ 0x00, 0x8b, 0x8b }, +{ 0x00, 0x8c, 0x8c }, +{ 0x00, 0x8d, 0x8d }, +{ 0x00, 0x8e, 0x8e }, +{ 0x00, 0x8f, 0x8f }, +{ 0x00, 0x90, 0x90 }, +{ 0x00, 0x91, 0x91 }, +{ 0x00, 0x92, 0x92 }, +{ 0x00, 0x93, 0x93 }, +{ 0x00, 0x94, 0x94 }, +{ 0x00, 0x95, 0x95 }, +{ 0x00, 0x96, 0x96 }, +{ 0x00, 0x97, 0x97 }, +{ 0x00, 0x98, 0x98 }, +{ 0x00, 0x99, 0x99 }, +{ 0x00, 0x9a, 0x9a }, +{ 0x00, 0x9b, 0x9b }, +{ 0x00, 0x9c, 0x9c }, +{ 0x00, 0x9d, 0x9d }, +{ 0x00, 0x9e, 0x9e }, +{ 0x00, 0x9f, 0x9f }, +{ 0x00, 0xa0, 0xa0 }, +{ 0x00, 0xa1, 0xa1 }, +{ 0x00, 0xa2, 0xa2 }, +{ 0x00, 0xa3, 0xa3 }, +{ 0x00, 0xa4, 0xa4 }, +{ 0x00, 0xa5, 0xa5 }, +{ 0x00, 0xa6,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 0xd6 }, +{ 0x00, 0xd7, 0xd7 }, +{ 0x00, 0xd8, 0xd8 }, +{ 0x00, 0xd9, 0xd9 }, +{ 0x00, 0xda, 0xda }, +{ 0x00, 0xdb, 0xdb }, +{ 0x00, 0xdc, 0xdc }, +{ 0x00, 0xdd, 0xdd }, +{ 0x00, 0xde, 0xde }, +{ 0x00, 0xdf, 0xdf }, +{ 0x00, 0xe0, 0xe0 }, +{ 0x00, 0xe1, 0xe1 }, +{ 0x00, 0xe2, 0xe2 }, +{ 0x00, 0xe3, 0xe3 }, +{ 0x00, 0xe4, 0xe4 }, +{ 0x00, 0xe5, 0xe5 }, +{ 0x00, 0xe6, 0xe6 }, +{ 0x00, 0xe7, 0xe7 }, +{ 0x00, 0xe8, 0xe8 }, +{ 0x00, 0xe9, 0xe9 }, +{ 0x00, 0xea, 0xea }, +{ 0x00, 0xeb, 0xeb }, +{ 0x00, 0xec, 0xec }, +{ 0x00, 0xed, 0xed }, +{ 0x00, 0xee, 0xee }, +{ 0x00, 0xef, 0xef }, +{ 0x00, 0xf0, 0xf0 }, +{ 0x00, 0xf1, 0xf1 }, +{ 0x00, 0xf2, 0xf2 }, +{ 0x00, 0xf3, 0xf3 }, +{ 0x00, 0xf4, 0xf4 }, +{ 0x00, 0xf5, 0xf5 }, +{ 0x00, 0xf6, 0xf6 }, +{ 0x00, 0xf7, 0xf7 }, +{ 0x00, 0xf8, 0xf8 }, +{ 0x00, 0xf9, 0xf9 }, +{ 0x00, 0xfa, 0xfa }, +{ 0x00, 0xfb, 0xfb }, +{ 0x00, 0xfc, 0xfc }, +{ 0x00, 0xfd, 0xfd }, +{ 0x00, 0xfe, 0xfe }, +{ 0x00, 0xff, 0xff } +}; + +static struct cs_info koi8r_tbl[] = { +{ 0x00, 0x00, 0x00 }, +{ 0x00, 0x01, 0x01 }, +{ 0x00, 0x02, 0x02 }, +{ 0x00, 0x03, 0x03 }, +{ 0x00, 0x04, 0x04 }, +{ 0x00, 0x05, 0x05 }, +{ 0x00, 0x06, 0x06 }, +{ 0x00, 0x07, 0x07 }, +{ 0x00, 0x08, 0x08 }, +{ 0x00, 0x09, 0x09 }, +{ 0x00, 0x0a, 0x0a }, +{ 0x00, 0x0b, 0x0b }, +{ 0x00, 0x0c, 0x0c }, +{ 0x00, 0x0d, 0x0d }, +{ 0x00, 0x0e, 0x0e }, +{ 0x00, 0x0f, 0x0f }, +{ 0x00, 0x10, 0x10 }, +{ 0x00, 0x11, 0x11 }, +{ 0x00, 0x12, 0x12 }, +{ 0x00, 0x13, 0x13 }, +{ 0x00, 0x14, 0x14 }, +{ 0x00, 0x15, 0x15 }, +{ 0x00, 0x16, 0x16 }, +{ 0x00, 0x17, 0x17 }, +{ 0x00, 0x18, 0x18 }, +{ 0x00, 0x19, 0x19 }, +{ 0x00, 0x1a, 0x1a }, +{ 0x00, 0x1b, 0x1b }, +{ 0x00, 0x1c, 0x1c }, +{ 0x00, 0x1d, 0x1d }, +{ 0x00, 0x1e, 0x1e }, +{ 0x00, 0x1f, 0x1f }, +{ 0x00, 0x20, 0x20 }, +{ 0x00, 0x21, 0x21 }, +{ 0x00, 0x22, 0x22 }, +{ 0x00, 0x23, 0x23 }, +{ 0x00, 0x24, 0x24 }, +{ 0x00, 0x25, 0x25 }, +{ 0x00, 0x26, 0x26 }, +{ 0x00, 0x27, 0x27 }, +{ 0x00, 0x28, 0x28 }, +{ 0x00, 0x29, 0x29 }, +{ 0x00, 0x2a, 0x2a }, +{ 0x00, 0x2b, 0x2b }, +{ 0x00, 0x2c, 0x2c }, +{ 0x00, 0x2d, 0x2d }, +{ 0x00, 0x2e, 0x2e }, +{ 0x00, 0x2f, 0x2f }, +{ 0x00, 0x30, 0x30 }, +{ 0x00, 0x31, 0x31 }, +{ 0x00, 0x32, 0x32 }, +{ 0x00, 0x33, 0x33 }, +{ 0x00, 0x34, 0x34 }, +{ 0x00, 0x35, 0x35 }, +{ 0x00, 0x36, 0x36 }, +{ 0x00, 0x37, 0x37 }, +{ 0x00, 0x38, 0x38 }, +{ 0x00, 0x39, 0x39 }, +{ 0x00, 0x3a, 0x3a }, +{ 0x00, 0x3b, 0x3b }, +{ 0x00, 0x3c, 0x3c }, +{ 0x00, 0x3d, 0x3d }, +{ 0x00, 0x3e, 0x3e }, +{ 0x00, 0x3f, 0x3f }, +{ 0x00, 0x40, 0x40 }, +{ 0x01, 0x61, 0x41 }, +{ 0x01, 0x62, 0x42 }, +{ 0x01, 0x63, 0x43 }, +{ 0x01, 0x64, 0x44 }, +{ 0x01, 0x65, 0x45 }, +{ 0x01, 0x66, 0x46 }, +{ 0x01, 0x67, 0x47 }, +{ 0x01, 0x68, 0x48 }, +{ 0x01, 0x69, 0x49 }, +{ 0x01, 0x6a, 0x4a }, +{ 0x01, 0x6b, 0x4b }, +{ 0x01, 0x6c, 0x4c }, +{ 0x01, 0x6d, 0x4d }, +{ 0x01, 0x6e, 0x4e }, +{ 0x01, 0x6f, 0x4f }, +{ 0x01, 0x70, 0x50 }, +{ 0x01, 0x71, 0x51 }, +{ 0x01, 0x72, 0x52 }, +{ 0x01, 0x73, 0x53 }, +{ 0x01, 0x74, 0x54 }, +{ 0x01, 0x75, 0x55 }, +{ 0x01, 0x76, 0x56 }, +{ 0x01, 0x77, 0x57 }, +{ 0x01, 0x78, 0x58 }, +{ 0x01, 0x79, 0x59 }, +{ 0x01, 0x7a, 0x5a }, +{ 0x00, 0x5b, 0x5b }, +{ 0x00, 0x5c, 0x5c }, +{ 0x00, 0x5d, 0x5d }, +{ 0x00, 0x5e, 0x5e }, +{ 0x00, 0x5f, 0x5f }, +{ 0x00, 0x60, 0x60 }, +{ 0x00, 0x61, 0x41 }, +{ 0x00, 0x62, 0x42 }, +{ 0x00, 0x63, 0x43 }, +{ 0x00, 0x64, 0x44 }, +{ 0x00, 0x65, 0x45 }, +{ 0x00, 0x66, 0x46 }, +{ 0x00, 0x67, 0x47 }, +{ 0x00, 0x68, 0x48 }, +{ 0x00, 0x69, 0x49 }, +{ 0x00, 0x6a, 0x4a }, +{ 0x00, 0x6b, 0x4b }, +{ 0x00, 0x6c, 0x4c }, +{ 0x00, 0x6d, 0x4d }, +{ 0x00, 0x6e, 0x4e }, +{ 0x00, 0x6f, 0x4f }, +{ 0x00, 0x70, 0x50 }, +{ 0x00, 0x71, 0x51 }, +{ 0x00, 0x72, 0x52 }, +{ 0x00, 0x73, 0x53 }, +{ 0x00, 0x74, 0x54 }, +{ 0x00, 0x75, 0x55 }, +{ 0x00, 0x76, 0x56 }, +{ 0x00, 0x77, 0x57 }, +{ 0x00, 0x78, 0x58 }, +{ 0x00, 0x79, 0x59 }, +{ 0x00, 0x7a, 0x5a }, +{ 0x00, 0x7b, 0x7b }, +{ 0x00, 0x7c, 0x7c }, +{ 0x00, 0x7d, 0x7d }, +{ 0x00, 0x7e, 0x7e }, +{ 0x00, 0x7f, 0x7f }, +{ 0x00, 0x80, 0x80 }, +{ 0x00, 0x81, 0x81 }, +{ 0x00, 0x82, 0x82 }, +{ 0x00, 0x83, 0x83 }, +{ 0x00, 0x84, 0x84 }, +{ 0x00, 0x85, 0x85 }, +{ 0x00, 0x86, 0x86 }, +{ 0x00, 0x87, 0x87 }, +{ 0x00, 0x88, 0x88 }, +{ 0x00, 0x89, 0x89 }, +{ 0x00, 0x8a, 0x8a }, +{ 0x00, 0x8b, 0x8b }, +{ 0x00, 0x8c, 0x8c }, +{ 0x00, 0x8d, 0x8d }, +{ 0x00, 0x8e, 0x8e }, +{ 0x00, 0x8f, 0x8f }, +{ 0x00, 0x90, 0x90 }, +{ 0x00, 0x91, 0x91 }, +{ 0x00, 0x92, 0x92 }, +{ 0x00, 0x93, 0x93 }, +{ 0x00, 0x94, 0x94 }, +{ 0x00, 0x95, 0x95 }, +{ 0x00, 0x96, 0x96 }, +{ 0x00, 0x97, 0x97 }, +{ 0x00, 0x98, 0x98 }, +{ 0x00, 0x99, 0x99 }, +{ 0x00, 0x9a, 0x9a }, +{ 0x00, 0x9b, 0x9b }, +{ 0x00, 0x9c, 0x9c },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+{ 0x01, 0xdd, 0xfd }, +{ 0x01, 0xde, 0xfe }, +{ 0x01, 0xdf, 0xff } +}; + +static struct cs_info koi8u_tbl[] = { +{ 0x00, 0x00, 0x00 }, +{ 0x00, 0x01, 0x01 }, +{ 0x00, 0x02, 0x02 }, +{ 0x00, 0x03, 0x03 }, +{ 0x00, 0x04, 0x04 }, +{ 0x00, 0x05, 0x05 }, +{ 0x00, 0x06, 0x06 }, +{ 0x00, 0x07, 0x07 }, +{ 0x00, 0x08, 0x08 }, +{ 0x00, 0x09, 0x09 }, +{ 0x00, 0x0a, 0x0a }, +{ 0x00, 0x0b, 0x0b }, +{ 0x00, 0x0c, 0x0c }, +{ 0x00, 0x0d, 0x0d }, +{ 0x00, 0x0e, 0x0e }, +{ 0x00, 0x0f, 0x0f }, +{ 0x00, 0x10, 0x10 }, +{ 0x00, 0x11, 0x11 }, +{ 0x00, 0x12, 0x12 }, +{ 0x00, 0x13, 0x13 }, +{ 0x00, 0x14, 0x14 }, +{ 0x00, 0x15, 0x15 }, +{ 0x00, 0x16, 0x16 }, +{ 0x00, 0x17, 0x17 }, +{ 0x00, 0x18, 0x18 }, +{ 0x00, 0x19, 0x19 }, +{ 0x00, 0x1a, 0x1a }, +{ 0x00, 0x1b, 0x1b }, +{ 0x00, 0x1c, 0x1c }, +{ 0x00, 0x1d, 0x1d }, +{ 0x00, 0x1e, 0x1e }, +{ 0x00, 0x1f, 0x1f }, +{ 0x00, 0x20, 0x20 }, +{ 0x00, 0x21, 0x21 }, +{ 0x00, 0x22, 0x22 }, +{ 0x00, 0x23, 0x23 }, +{ 0x00, 0x24, 0x24 }, +{ 0x00, 0x25, 0x25 }, +{ 0x00, 0x26, 0x26 }, +{ 0x00, 0x27, 0x27 }, +{ 0x00, 0x28, 0x28 }, +{ 0x00, 0x29, 0x29 }, +{ 0x00, 0x2a, 0x2a }, +{ 0x00, 0x2b, 0x2b }, +{ 0x00, 0x2c, 0x2c }, +{ 0x00, 0x2d, 0x2d }, +{ 0x00, 0x2e, 0x2e }, +{ 0x00, 0x2f, 0x2f }, +{ 0x00, 0x30, 0x30 }, +{ 0x00, 0x31, 0x31 }, +{ 0x00, 0x32, 0x32 }, +{ 0x00, 0x33, 0x33 }, +{ 0x00, 0x34, 0x34 }, +{ 0x00, 0x35, 0x35 }, +{ 0x00, 0x36, 0x36 }, +{ 0x00, 0x37, 0x37 }, +{ 0x00, 0x38, 0x38 }, +{ 0x00, 0x39, 0x39 }, +{ 0x00, 0x3a, 0x3a }, +{ 0x00, 0x3b, 0x3b }, +{ 0x00, 0x3c, 0x3c }, +{ 0x00, 0x3d, 0x3d }, +{ 0x00, 0x3e, 0x3e }, +{ 0x00, 0x3f, 0x3f }, +{ 0x00, 0x40, 0x40 }, +{ 0x01, 0x61, 0x41 }, +{ 0x01, 0x62, 0x42 }, +{ 0x01, 0x63, 0x43 }, +{ 0x01, 0x64, 0x44 }, +{ 0x01, 0x65, 0x45 }, +{ 0x01, 0x66, 0x46 }, +{ 0x01, 0x67, 0x47 }, +{ 0x01, 0x68, 0x48 }, +{ 0x01, 0x69, 0x49 }, +{ 0x01, 0x6a, 0x4a }, +{ 0x01, 0x6b, 0x4b }, +{ 0x01, 0x6c, 0x4c }, +{ 0x01, 0x6d, 0x4d }, +{ 0x01, 0x6e, 0x4e }, +{ 0x01, 0x6f, 0x4f }, +{ 0x01, 0x70, 0x50 }, +{ 0x01, 0x71, 0x51 }, +{ 0x01, 0x72, 0x52 }, +{ 0x01, 0x73, 0x53 }, +{ 0x01, 0x74, 0x54 }, +{ 0x01, 0x75, 0x55 }, +{ 0x01, 0x76, 0x56 }, +{ 0x01, 0x77, 0x57 }, +{ 0x01, 0x78, 0x58 }, +{ 0x01, 0x79, 0x59 }, +{ 0x01, 0x7a, 0x5a }, +{ 0x00, 0x5b, 0x5b }, +{ 0x00, 0x5c, 0x5c }, +{ 0x00, 0x5d, 0x5d }, +{ 0x00, 0x5e, 0x5e }, +{ 0x00, 0x5f, 0x5f }, +{ 0x00, 0x60, 0x60 }, +{ 0x00, 0x61, 0x41 }, +{ 0x00, 0x62, 0x42 }, +{ 0x00, 0x63, 0x43 }, +{ 0x00, 0x64, 0x44 }, +{ 0x00, 0x65, 0x45 }, +{ 0x00, 0x66, 0x46 }, +{ 0x00, 0x67, 0x47 }, +{ 0x00, 0x68, 0x48 }, +{ 0x00, 0x69, 0x49 }, +{ 0x00, 0x6a, 0x4a }, +{ 0x00, 0x6b, 0x4b }, +{ 0x00, 0x6c, 0x4c }, +{ 0x00, 0x6d, 0x4d }, +{ 0x00, 0x6e, 0x4e }, +{ 0x00, 0x6f, 0x4f }, +{ 0x00, 0x70, 0x50 }, +{ 0x00, 0x71, 0x51 }, +{ 0x00, 0x72, 0x52 }, +{ 0x00, 0x73, 0x53 }, +{ 0x00, 0x74, 0x54 }, +{ 0x00, 0x75, 0x55 }, +{ 0x00, 0x76, 0x56 }, +{ 0x00, 0x77, 0x57 }, +{ 0x00, 0x78, 0x58 }, +{ 0x00, 0x79, 0x59 }, +{ 0x00, 0x7a, 0x5a }, +{ 0x00, 0x7b, 0x7b }, +{ 0x00, 0x7c, 0x7c }, +{ 0x00, 0x7d, 0x7d }, +{ 0x00, 0x7e, 0x7e }, +{ 0x00, 0x7f, 0x7f }, +{ 0x00, 0x80, 0x80 }, +{ 0x00, 0x81, 0x81 }, +{ 0x00, 0x82, 0x82 }, +{ 0x00, 0x83, 0x83 }, +{ 0x00, 0x84, 0x84 }, +{ 0x00, 0x85, 0x85 }, +{ 0x00, 0x86, 0x86 }, +{ 0x00, 0x87, 0x87 }, +{ 0x00, 0x88, 0x88 }, +{ 0x00, 0x89, 0x89 }, +{ 0x00, 0x8a, 0x8a }, +{ 0x00, 0x8b, 0x8b }, +{ 0x00, 0x8c, 0x8c }, +{ 0x00, 0x8d, 0x8d }, +{ 0x00, 0x8e, 0x8e }, +{ 0x00, 0x8f, 0x8f }, +{ 0x00, 0x90, 0x90 }, +{ 0x00, 0x91, 0x91 }, +{ 0x00, 0x92, 0x92 }, +{ 0x00, 0x93, 0x93 }, +{ 0x00, 0x94, 0x94 }, +{ 0x00, 0x95, 0x95 }, +{ 0x00, 0x96, 0x96 }, +{ 0x00, 0x97, 0x97 }, +{ 0x00, 0x98, 0x98 }, +{ 0x00, 0x99, 0x99 }, +{ 0x00, 0x9a, 0x9a }, +{ 0x00, 0x9b, 0x9b }, +{ 0x00, 0x9c, 0x9c }, +{ 0x00, 0x9d, 0x9d }, +{ 0x00, 0x9e, 0x9e }, +{ 0x00, 0x9f, 0x9f }, +{ 0x00, 0xa0, 0xa0 }, +{ 0x00, 0xa1, 0xa1 }, +{ 0x00, 0xa2, 0xa2 }, +{ 0x00, 0xa3, 0xb3 }, +{ 0x00, 0xa4, 0xb4 }, /* ie */ +{ 0x00, 0xa5, 0xa5 }, +{ 0x00, 0xa6, 0xb6 }, /* i */ +{ 0x00, 0xa7, 0xb7 }, /* ii */ +{ 0x00, 0xa8, 0xa8 }, +{ 0x00, 0xa9, 0xa9 }, +{ 0x00, 0xaa, 0xaa }, +{ 0x00, 0xab, 0xab }, +{ 0x00, 0xac, 0xac }, +{ 0x00, 0xad, 0xbd }, /* g'' */ +{ 0x00, 0xae, 0xae }, +{ 0x00, 0xaf, 0xaf }, +{ 0x00, 0xb0, 0xb0 }, +{ 0x00, 0xb1, 0xb1 }, +{ 0x00, 0xb2, 0xb2 }, +{ 0x01, 0xa3, 0xb3 }, +{ 0x00, 0xb4, 0xb4 }, /* IE */ +{ 0x00, 0xb5, 0xb5 }, +{ 0x00, 0xb6, 0xb6 }, /* I */ +{ 0x00, 0xb7, 0xb7 }, /* II */ +{ 0x00, 0xb8, 0xb8 }, +{ 0x00, 0xb9, 0xb9 }, +{ 0x00, 0xba, 0xba }, +{ 0x00, 0xbb, 0xbb }, +{ 0x00, 0xbc, 0xbc }, +{ 0x00, 0xbd, 0xbd }, +{ 0x00, 0xbe, 0xbe }, +{ 0x00, 0xbf, 0xbf }, +{ 0x00, 0xc0, 0xe0 }, +{ 0x00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xd1, 0xf1 }, +{ 0x01, 0xd2, 0xf2 }, +{ 0x01, 0xd3, 0xf3 }, +{ 0x01, 0xd4, 0xf4 }, +{ 0x01, 0xd5, 0xf5 }, +{ 0x01, 0xd6, 0xf6 }, +{ 0x01, 0xd7, 0xf7 }, +{ 0x01, 0xd8, 0xf8 }, +{ 0x01, 0xd9, 0xf9 }, +{ 0x01, 0xda, 0xfa }, +{ 0x01, 0xdb, 0xfb }, +{ 0x01, 0xdc, 0xfc }, +{ 0x01, 0xdd, 0xfd }, +{ 0x01, 0xde, 0xfe }, +{ 0x01, 0xdf, 0xff } +}; + +static struct cs_info cp1251_tbl[] = { +{ 0x00, 0x00, 0x00 }, +{ 0x00, 0x01, 0x01 }, +{ 0x00, 0x02, 0x02 }, +{ 0x00, 0x03, 0x03 }, +{ 0x00, 0x04, 0x04 }, +{ 0x00, 0x05, 0x05 }, +{ 0x00, 0x06, 0x06 }, +{ 0x00, 0x07, 0x07 }, +{ 0x00, 0x08, 0x08 }, +{ 0x00, 0x09, 0x09 }, +{ 0x00, 0x0a, 0x0a }, +{ 0x00, 0x0b, 0x0b }, +{ 0x00, 0x0c, 0x0c }, +{ 0x00, 0x0d, 0x0d }, +{ 0x00, 0x0e, 0x0e }, +{ 0x00, 0x0f, 0x0f }, +{ 0x00, 0x10, 0x10 }, +{ 0x00, 0x11, 0x11 }, +{ 0x00, 0x12, 0x12 }, +{ 0x00, 0x13, 0x13 }, +{ 0x00, 0x14, 0x14 }, +{ 0x00, 0x15, 0x15 }, +{ 0x00, 0x16, 0x16 }, +{ 0x00, 0x17, 0x17 }, +{ 0x00, 0x18, 0x18 }, +{ 0x00, 0x19, 0x19 }, +{ 0x00, 0x1a, 0x1a }, +{ 0x00, 0x1b, 0x1b }, +{ 0x00, 0x1c, 0x1c }, +{ 0x00, 0x1d, 0x1d }, +{ 0x00, 0x1e, 0x1e }, +{ 0x00, 0x1f, 0x1f }, +{ 0x00, 0x20, 0x20 }, +{ 0x00, 0x21, 0x21 }, +{ 0x00, 0x22, 0x22 }, +{ 0x00, 0x23, 0x23 }, +{ 0x00, 0x24, 0x24 }, +{ 0x00, 0x25, 0x25 }, +{ 0x00, 0x26, 0x26 }, +{ 0x00, 0x27, 0x27 }, +{ 0x00, 0x28, 0x28 }, +{ 0x00, 0x29, 0x29 }, +{ 0x00, 0x2a, 0x2a }, +{ 0x00, 0x2b, 0x2b }, +{ 0x00, 0x2c, 0x2c }, +{ 0x00, 0x2d, 0x2d }, +{ 0x00, 0x2e, 0x2e }, +{ 0x00, 0x2f, 0x2f }, +{ 0x00, 0x30, 0x30 }, +{ 0x00, 0x31, 0x31 }, +{ 0x00, 0x32, 0x32 }, +{ 0x00, 0x33, 0x33 }, +{ 0x00, 0x34, 0x34 }, +{ 0x00, 0x35, 0x35 }, +{ 0x00, 0x36, 0x36 }, +{ 0x00, 0x37, 0x37 }, +{ 0x00, 0x38, 0x38 }, +{ 0x00, 0x39, 0x39 }, +{ 0x00, 0x3a, 0x3a }, +{ 0x00, 0x3b, 0x3b }, +{ 0x00, 0x3c, 0x3c }, +{ 0x00, 0x3d, 0x3d }, +{ 0x00, 0x3e, 0x3e }, +{ 0x00, 0x3f, 0x3f }, +{ 0x00, 0x40, 0x40 }, +{ 0x01, 0x61, 0x41 }, +{ 0x01, 0x62, 0x42 }, +{ 0x01, 0x63, 0x43 }, +{ 0x01, 0x64, 0x44 }, +{ 0x01, 0x65, 0x45 }, +{ 0x01, 0x66, 0x46 }, +{ 0x01, 0x67, 0x47 }, +{ 0x01, 0x68, 0x48 }, +{ 0x01, 0x69, 0x49 }, +{ 0x01, 0x6a, 0x4a }, +{ 0x01, 0x6b, 0x4b }, +{ 0x01, 0x6c, 0x4c }, +{ 0x01, 0x6d, 0x4d }, +{ 0x01, 0x6e, 0x4e }, +{ 0x01, 0x6f, 0x4f }, +{ 0x01, 0x70, 0x50 }, +{ 0x01, 0x71, 0x51 }, +{ 0x01, 0x72, 0x52 }, +{ 0x01, 0x73, 0x53 }, +{ 0x01, 0x74, 0x54 }, +{ 0x01, 0x75, 0x55 }, +{ 0x01, 0x76, 0x56 }, +{ 0x01, 0x77, 0x57 }, +{ 0x01, 0x78, 0x58 }, +{ 0x01, 0x79, 0x59 }, +{ 0x01, 0x7a, 0x5a }, +{ 0x00, 0x5b, 0x5b }, +{ 0x00, 0x5c, 0x5c }, +{ 0x00, 0x5d, 0x5d }, +{ 0x00, 0x5e, 0x5e }, +{ 0x00, 0x5f, 0x5f }, +{ 0x00, 0x60, 0x60 }, +{ 0x00, 0x61, 0x41 }, +{ 0x00, 0x62, 0x42 }, +{ 0x00, 0x63, 0x43 }, +{ 0x00, 0x64, 0x44 }, +{ 0x00, 0x65, 0x45 }, +{ 0x00, 0x66, 0x46 }, +{ 0x00, 0x67, 0x47 }, +{ 0x00, 0x68, 0x48 }, +{ 0x00, 0x69, 0x49 }, +{ 0x00, 0x6a, 0x4a }, +{ 0x00, 0x6b, 0x4b }, +{ 0x00, 0x6c, 0x4c }, +{ 0x00, 0x6d, 0x4d }, +{ 0x00, 0x6e, 0x4e }, +{ 0x00, 0x6f, 0x4f }, +{ 0x00, 0x70, 0x50 }, +{ 0x00, 0x71, 0x51 }, +{ 0x00, 0x72, 0x52 }, +{ 0x00, 0x73, 0x53 }, +{ 0x00, 0x74, 0x54 }, +{ 0x00, 0x75, 0x55 }, +{ 0x00, 0x76, 0x56 }, +{ 0x00, 0x77, 0x57 }, +{ 0x00, 0x78, 0x58 }, +{ 0x00, 0x79, 0x59 }, +{ 0x00, 0x7a, 0x5a }, +{ 0x00, 0x7b, 0x7b }, +{ 0x00, 0x7c, 0x7c }, +{ 0x00, 0x7d, 0x7d }, +{ 0x00, 0x7e, 0x7e }, +{ 0x00, 0x7f, 0x7f }, +{ 0x01, 0x90, 0x80 }, +{ 0x01, 0x83, 0x81 }, +{ 0x00, 0x82, 0x82 }, +{ 0x00, 0x83, 0x81 }, +{ 0x00, 0x84, 0x84 }, +{ 0x00, 0x85, 0x85 }, +{ 0x00, 0x86, 0x86 }, +{ 0x00, 0x87, 0x87 }, +{ 0x00, 0x88, 0x88 }, +{ 0x00, 0x89, 0x89 }, +{ 0x01, 0x9a, 0x8a }, +{ 0x00, 0x8b, 0x8b }, +{ 0x01, 0x9c, 0x8c }, +{ 0x01, 0x9d, 0x8d }, +{ 0x01, 0x9e, 0x8e }, +{ 0x01, 0x9f, 0x8f }, +{ 0x00, 0x90, 0x80 }, +{ 0x00, 0x91, 0x91 }, +{ 0x00, 0x92, 0x92 }, +{ 0x00, 0x93, 0x93 }, +{ 0x00, 0x94, 0x94 }, +{ 0x00, 0x95, 0x95 }, +{ 0x00, 0x96, 0x96 }, +{ 0x00, 0x97, 0x97 }, +{ 0x00, 0x98, 0x98 }, +{ 0x00, 0x99, 0x99 }, +{ 0x00, 0x9a, 0x8a }, +{ 0x00, 0x9b, 0x9b }, +{ 0x00, 0x9c, 0x8c }, +{ 0x00, 0x9d, 0x8d }, +{ 0x00, 0x9e, 0x8e }, +{ 0x00, 0x9f, 0x8f }, +{ 0x00, 0xa0, 0xa0 }, +{ 0x01, 0xa2, 0xa1 }, +{ 0x00, 0xa2, 0xa1 }, +{ 0x01, 0xbc, 0xa3 }, +{ 0x00, 0xa4, 0xa4 }, +{ 0x01, 0xb4, 0xa5 }, +{ 0x00, 0xa6, 0xa6 }, +{ 0x00, 0xa7, 0xa7 }, +{ 0x01, 0xb8, 0xa8 }, +{ 0x00, 0xa9, 0xa9 }, +{ 0x01, 0xba, 0xaa }, +{ 0x00, 0xab, 0xab }, +{ 0x00, 0xac, 0xac }, +{ 0x00, 0xad, 0xad }, +{ 0x00, 0xae, 0xae }, +{ 0x01, 0xbf, 0xaf }, +{ 0x00, 0xb0, 0xb0 }, +{ 0x00, 0xb1, 0xb1 }, +{ 0x01, 0xb3, 0xb2 }, +{ 0x00, 0xb3, 0xb2 }, +{ 0x00, 0xb4, 0xa5 }, +{ 0x00, 0xb5, 0xb5 }, +{ 0x00, 0xb6, 0xb6 }, +{ 0x00, 0x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, 0xe7, 0xc7 }, +{ 0x00, 0xe8, 0xc8 }, +{ 0x00, 0xe9, 0xc9 }, +{ 0x00, 0xea, 0xca }, +{ 0x00, 0xeb, 0xcb }, +{ 0x00, 0xec, 0xcc }, +{ 0x00, 0xed, 0xcd }, +{ 0x00, 0xee, 0xce }, +{ 0x00, 0xef, 0xcf }, +{ 0x00, 0xf0, 0xd0 }, +{ 0x00, 0xf1, 0xd1 }, +{ 0x00, 0xf2, 0xd2 }, +{ 0x00, 0xf3, 0xd3 }, +{ 0x00, 0xf4, 0xd4 }, +{ 0x00, 0xf5, 0xd5 }, +{ 0x00, 0xf6, 0xd6 }, +{ 0x00, 0xf7, 0xd7 }, +{ 0x00, 0xf8, 0xd8 }, +{ 0x00, 0xf9, 0xd9 }, +{ 0x00, 0xfa, 0xda }, +{ 0x00, 0xfb, 0xdb }, +{ 0x00, 0xfc, 0xdc }, +{ 0x00, 0xfd, 0xdd }, +{ 0x00, 0xfe, 0xde }, +{ 0x00, 0xff, 0xdf } +}; + +static struct cs_info iso13_tbl[] = { +{ 0x00, 0x00, 0x00 }, +{ 0x00, 0x01, 0x01 }, +{ 0x00, 0x02, 0x02 }, +{ 0x00, 0x03, 0x03 }, +{ 0x00, 0x04, 0x04 }, +{ 0x00, 0x05, 0x05 }, +{ 0x00, 0x06, 0x06 }, +{ 0x00, 0x07, 0x07 }, +{ 0x00, 0x08, 0x08 }, +{ 0x00, 0x09, 0x09 }, +{ 0x00, 0x0A, 0x0A }, +{ 0x00, 0x0B, 0x0B }, +{ 0x00, 0x0C, 0x0C }, +{ 0x00, 0x0D, 0x0D }, +{ 0x00, 0x0E, 0x0E }, +{ 0x00, 0x0F, 0x0F }, +{ 0x00, 0x10, 0x10 }, +{ 0x00, 0x11, 0x11 }, +{ 0x00, 0x12, 0x12 }, +{ 0x00, 0x13, 0x13 }, +{ 0x00, 0x14, 0x14 }, +{ 0x00, 0x15, 0x15 }, +{ 0x00, 0x16, 0x16 }, +{ 0x00, 0x17, 0x17 }, +{ 0x00, 0x18, 0x18 }, +{ 0x00, 0x19, 0x19 }, +{ 0x00, 0x1A, 0x1A }, +{ 0x00, 0x1B, 0x1B }, +{ 0x00, 0x1C, 0x1C }, +{ 0x00, 0x1D, 0x1D }, +{ 0x00, 0x1E, 0x1E }, +{ 0x00, 0x1F, 0x1F }, +{ 0x00, 0x20, 0x20 }, +{ 0x00, 0x21, 0x21 }, +{ 0x00, 0x22, 0x22 }, +{ 0x00, 0x23, 0x23 }, +{ 0x00, 0x24, 0x24 }, +{ 0x00, 0x25, 0x25 }, +{ 0x00, 0x26, 0x26 }, +{ 0x00, 0x27, 0x27 }, +{ 0x00, 0x28, 0x28 }, +{ 0x00, 0x29, 0x29 }, +{ 0x00, 0x2A, 0x2A }, +{ 0x00, 0x2B, 0x2B }, +{ 0x00, 0x2C, 0x2C }, +{ 0x00, 0x2D, 0x2D }, +{ 0x00, 0x2E, 0x2E }, +{ 0x00, 0x2F, 0x2F }, +{ 0x00, 0x30, 0x30 }, +{ 0x00, 0x31, 0x31 }, +{ 0x00, 0x32, 0x32 }, +{ 0x00, 0x33, 0x33 }, +{ 0x00, 0x34, 0x34 }, +{ 0x00, 0x35, 0x35 }, +{ 0x00, 0x36, 0x36 }, +{ 0x00, 0x37, 0x37 }, +{ 0x00, 0x38, 0x38 }, +{ 0x00, 0x39, 0x39 }, +{ 0x00, 0x3A, 0x3A }, +{ 0x00, 0x3B, 0x3B }, +{ 0x00, 0x3C, 0x3C }, +{ 0x00, 0x3D, 0x3D }, +{ 0x00, 0x3E, 0x3E }, +{ 0x00, 0x3F, 0x3F }, +{ 0x00, 0x40, 0x40 }, +{ 0x01, 0x61, 0x41 }, +{ 0x01, 0x62, 0x42 }, +{ 0x01, 0x63, 0x43 }, +{ 0x01, 0x64, 0x44 }, +{ 0x01, 0x65, 0x45 }, +{ 0x01, 0x66, 0x46 }, +{ 0x01, 0x67, 0x47 }, +{ 0x01, 0x68, 0x48 }, +{ 0x01, 0x69, 0x49 }, +{ 0x01, 0x6A, 0x4A }, +{ 0x01, 0x6B, 0x4B }, +{ 0x01, 0x6C, 0x4C }, +{ 0x01, 0x6D, 0x4D }, +{ 0x01, 0x6E, 0x4E }, +{ 0x01, 0x6F, 0x4F }, +{ 0x01, 0x70, 0x50 }, +{ 0x01, 0x71, 0x51 }, +{ 0x01, 0x72, 0x52 }, +{ 0x01, 0x73, 0x53 }, +{ 0x01, 0x74, 0x54 }, +{ 0x01, 0x75, 0x55 }, +{ 0x01, 0x76, 0x56 }, +{ 0x01, 0x77, 0x57 }, +{ 0x01, 0x78, 0x58 }, +{ 0x01, 0x79, 0x59 }, +{ 0x01, 0x7A, 0x5A }, +{ 0x00, 0x5B, 0x5B }, +{ 0x00, 0x5C, 0x5C }, +{ 0x00, 0x5D, 0x5D }, +{ 0x00, 0x5E, 0x5E }, +{ 0x00, 0x5F, 0x5F }, +{ 0x00, 0x60, 0x60 }, +{ 0x00, 0x61, 0x41 }, +{ 0x00, 0x62, 0x42 }, +{ 0x00, 0x63, 0x43 }, +{ 0x00, 0x64, 0x44 }, +{ 0x00, 0x65, 0x45 }, +{ 0x00, 0x66, 0x46 }, +{ 0x00, 0x67, 0x47 }, +{ 0x00, 0x68, 0x48 }, +{ 0x00, 0x69, 0x49 }, +{ 0x00, 0x6A, 0x4A }, +{ 0x00, 0x6B, 0x4B }, +{ 0x00, 0x6C, 0x4C }, +{ 0x00, 0x6D, 0x4D }, +{ 0x00, 0x6E, 0x4E }, +{ 0x00, 0x6F, 0x4F }, +{ 0x00, 0x70, 0x50 }, +{ 0x00, 0x71, 0x51 }, +{ 0x00, 0x72, 0x52 }, +{ 0x00, 0x73, 0x53 }, +{ 0x00, 0x74, 0x54 }, +{ 0x00, 0x75, 0x55 }, +{ 0x00, 0x76, 0x56 }, +{ 0x00, 0x77, 0x57 }, +{ 0x00, 0x78, 0x58 }, +{ 0x00, 0x79, 0x59 }, +{ 0x00, 0x7A, 0x5A }, +{ 0x00, 0x7B, 0x7B }, +{ 0x00, 0x7C, 0x7C }, +{ 0x00, 0x7D, 0x7D }, +{ 0x00, 0x7E, 0x7E }, +{ 0x00, 0x7F, 0x7F }, +{ 0x00, 0x80, 0x80 }, +{ 0x00, 0x81, 0x81 }, +{ 0x00, 0x82, 0x82 }, +{ 0x00, 0x83, 0x83 }, +{ 0x00, 0x84, 0x84 }, +{ 0x00, 0x85, 0x85 }, +{ 0x00, 0x86, 0x86 }, +{ 0x00, 0x87, 0x87 }, +{ 0x00, 0x88, 0x88 }, +{ 0x00, 0x89, 0x89 }, +{ 0x00, 0x8A, 0x8A }, +{ 0x00, 0x8B, 0x8B }, +{ 0x00, 0x8C, 0x8C }, +{ 0x00, 0x8D, 0x8D }, +{ 0x00, 0x8E, 0x8E }, +{ 0x00, 0x8F, 0x8F }, +{ 0x00, 0x90, 0x90 }, +{ 0x00, 0x91, 0x91 }, +{ 0x00, 0x92, 0x92 }, +{ 0x00, 0x93, 0x93 }, +{ 0x00, 0x94, 0x94 }, +{ 0x00, 0x95, 0x95 }, +{ 0x00, 0x96, 0x96 }, +{ 0x00, 0x97, 0x97 }, +{ 0x00, 0x98, 0x98 }, +{ 0x00, 0x99, 0x99 }, +{ 0x00, 0x9A, 0x9A }, +{ 0x00, 0x9B, 0x9B }, +{ 0x00, 0x9C, 0x9C }, +{ 0x00, 0x9D, 0x9D }, +{ 0x00, 0x9E, 0x9E }, +{ 0x00, 0x9F, 0x9F }, +{ 0x00, 0xA0, 0xA0 }, +{ 0x00, 0xA1, 0xA1 }, +{ 0x00, 0xA2, 0xA2 }, +{ 0x00, 0xA3, 0xA3 }, +{ 0x00, 0xA4, 0xA4 }, +{ 0x00, 0xA5, 0xA5 }, +{ 0x00, 0xA6, 0xA6 }, +{ 0x00, 0xA7, 0xA7 }, +{ 0x01, 0xB8, 0xA8 }, +{ 0x00, 0xA9, 0xA9 }, +{ 0x01, 0xBA, 0xAA }, +{ 0x00, 0xAB, 0xAB }, +{ 0x00, 0xAC, 0xAC }, +{ 0x00, 0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C }, +{ 0x01, 0xFD, 0xDD }, +{ 0x01, 0xFE, 0xDE }, +{ 0x00, 0xDF, 0xDF }, +{ 0x00, 0xE0, 0xC0 }, +{ 0x00, 0xE1, 0xC1 }, +{ 0x00, 0xE2, 0xC2 }, +{ 0x00, 0xE3, 0xC3 }, +{ 0x00, 0xE4, 0xC4 }, +{ 0x00, 0xE5, 0xC5 }, +{ 0x00, 0xE6, 0xC6 }, +{ 0x00, 0xE7, 0xC7 }, +{ 0x00, 0xE8, 0xC8 }, +{ 0x00, 0xE9, 0xC9 }, +{ 0x00, 0xEA, 0xCA }, +{ 0x00, 0xEB, 0xCB }, +{ 0x00, 0xEC, 0xCC }, +{ 0x00, 0xED, 0xCD }, +{ 0x00, 0xEE, 0xCE }, +{ 0x00, 0xEF, 0xCF }, +{ 0x00, 0xF0, 0xD0 }, +{ 0x00, 0xF1, 0xD1 }, +{ 0x00, 0xF2, 0xD2 }, +{ 0x00, 0xF3, 0xD3 }, +{ 0x00, 0xF4, 0xD4 }, +{ 0x00, 0xF5, 0xD5 }, +{ 0x00, 0xF6, 0xD6 }, +{ 0x00, 0xF7, 0xF7 }, +{ 0x00, 0xF8, 0xD8 }, +{ 0x00, 0xF9, 0xD9 }, +{ 0x00, 0xFA, 0xDA }, +{ 0x00, 0xFB, 0xDB }, +{ 0x00, 0xFC, 0xDC }, +{ 0x00, 0xFD, 0xDD }, +{ 0x00, 0xFE, 0xDE }, +{ 0x00, 0xFF, 0xFF } +}; + + +static struct cs_info iso14_tbl[] = { +{ 0x00, 0x00, 0x00 }, +{ 0x00, 0x01, 0x01 }, +{ 0x00, 0x02, 0x02 }, +{ 0x00, 0x03, 0x03 }, +{ 0x00, 0x04, 0x04 }, +{ 0x00, 0x05, 0x05 }, +{ 0x00, 0x06, 0x06 }, +{ 0x00, 0x07, 0x07 }, +{ 0x00, 0x08, 0x08 }, +{ 0x00, 0x09, 0x09 }, +{ 0x00, 0x0a, 0x0a }, +{ 0x00, 0x0b, 0x0b }, +{ 0x00, 0x0c, 0x0c }, +{ 0x00, 0x0d, 0x0d }, +{ 0x00, 0x0e, 0x0e }, +{ 0x00, 0x0f, 0x0f }, +{ 0x00, 0x10, 0x10 }, +{ 0x00, 0x11, 0x11 }, +{ 0x00, 0x12, 0x12 }, +{ 0x00, 0x13, 0x13 }, +{ 0x00, 0x14, 0x14 }, +{ 0x00, 0x15, 0x15 }, +{ 0x00, 0x16, 0x16 }, +{ 0x00, 0x17, 0x17 }, +{ 0x00, 0x18, 0x18 }, +{ 0x00, 0x19, 0x19 }, +{ 0x00, 0x1a, 0x1a }, +{ 0x00, 0x1b, 0x1b }, +{ 0x00, 0x1c, 0x1c }, +{ 0x00, 0x1d, 0x1d }, +{ 0x00, 0x1e, 0x1e }, +{ 0x00, 0x1f, 0x1f }, +{ 0x00, 0x20, 0x20 }, +{ 0x00, 0x21, 0x21 }, +{ 0x00, 0x22, 0x22 }, +{ 0x00, 0x23, 0x23 }, +{ 0x00, 0x24, 0x24 }, +{ 0x00, 0x25, 0x25 }, +{ 0x00, 0x26, 0x26 }, +{ 0x00, 0x27, 0x27 }, +{ 0x00, 0x28, 0x28 }, +{ 0x00, 0x29, 0x29 }, +{ 0x00, 0x2a, 0x2a }, +{ 0x00, 0x2b, 0x2b }, +{ 0x00, 0x2c, 0x2c }, +{ 0x00, 0x2d, 0x2d }, +{ 0x00, 0x2e, 0x2e }, +{ 0x00, 0x2f, 0x2f }, +{ 0x00, 0x30, 0x30 }, +{ 0x00, 0x31, 0x31 }, +{ 0x00, 0x32, 0x32 }, +{ 0x00, 0x33, 0x33 }, +{ 0x00, 0x34, 0x34 }, +{ 0x00, 0x35, 0x35 }, +{ 0x00, 0x36, 0x36 }, +{ 0x00, 0x37, 0x37 }, +{ 0x00, 0x38, 0x38 }, +{ 0x00, 0x39, 0x39 }, +{ 0x00, 0x3a, 0x3a }, +{ 0x00, 0x3b, 0x3b }, +{ 0x00, 0x3c, 0x3c }, +{ 0x00, 0x3d, 0x3d }, +{ 0x00, 0x3e, 0x3e }, +{ 0x00, 0x3f, 0x3f }, +{ 0x00, 0x40, 0x40 }, +{ 0x01, 0x61, 0x41 }, +{ 0x01, 0x62, 0x42 }, +{ 0x01, 0x63, 0x43 }, +{ 0x01, 0x64, 0x44 }, +{ 0x01, 0x65, 0x45 }, +{ 0x01, 0x66, 0x46 }, +{ 0x01, 0x67, 0x47 }, +{ 0x01, 0x68, 0x48 }, +{ 0x01, 0x69, 0x49 }, +{ 0x01, 0x6a, 0x4a }, +{ 0x01, 0x6b, 0x4b }, +{ 0x01, 0x6c, 0x4c }, +{ 0x01, 0x6d, 0x4d }, +{ 0x01, 0x6e, 0x4e }, +{ 0x01, 0x6f, 0x4f }, +{ 0x01, 0x70, 0x50 }, +{ 0x01, 0x71, 0x51 }, +{ 0x01, 0x72, 0x52 }, +{ 0x01, 0x73, 0x53 }, +{ 0x01, 0x74, 0x54 }, +{ 0x01, 0x75, 0x55 }, +{ 0x01, 0x76, 0x56 }, +{ 0x01, 0x77, 0x57 }, +{ 0x01, 0x78, 0x58 }, +{ 0x01, 0x79, 0x59 }, +{ 0x01, 0x7a, 0x5a }, +{ 0x00, 0x5b, 0x5b }, +{ 0x00, 0x5c, 0x5c }, +{ 0x00, 0x5d, 0x5d }, +{ 0x00, 0x5e, 0x5e }, +{ 0x00, 0x5f, 0x5f }, +{ 0x00, 0x60, 0x60 }, +{ 0x00, 0x61, 0x41 }, +{ 0x00, 0x62, 0x42 }, +{ 0x00, 0x63, 0x43 }, +{ 0x00, 0x64, 0x44 }, +{ 0x00, 0x65, 0x45 }, +{ 0x00, 0x66, 0x46 }, +{ 0x00, 0x67, 0x47 }, +{ 0x00, 0x68, 0x48 }, +{ 0x00, 0x69, 0x49 }, +{ 0x00, 0x6a, 0x4a }, +{ 0x00, 0x6b, 0x4b }, +{ 0x00, 0x6c, 0x4c }, +{ 0x00, 0x6d, 0x4d }, +{ 0x00, 0x6e, 0x4e }, +{ 0x00, 0x6f, 0x4f }, +{ 0x00, 0x70, 0x50 }, +{ 0x00, 0x71, 0x51 }, +{ 0x00, 0x72, 0x52 }, +{ 0x00, 0x73, 0x53 }, +{ 0x00, 0x74, 0x54 }, +{ 0x00, 0x75, 0x55 }, +{ 0x00, 0x76, 0x56 }, +{ 0x00, 0x77, 0x57 }, +{ 0x00, 0x78, 0x58 }, +{ 0x00, 0x79, 0x59 }, +{ 0x00, 0x7a, 0x5a }, +{ 0x00, 0x7b, 0x7b }, +{ 0x00, 0x7c, 0x7c }, +{ 0x00, 0x7d, 0x7d }, +{ 0x00, 0x7e, 0x7e }, +{ 0x00, 0x7f, 0x7f }, +{ 0x00, 0x80, 0x80 }, +{ 0x00, 0x81, 0x81 }, +{ 0x00, 0x82, 0x82 }, +{ 0x00, 0x83, 0x83 }, +{ 0x00, 0x84, 0x84 }, +{ 0x00, 0x85, 0x85 }, +{ 0x00, 0x86, 0x86 }, +{ 0x00, 0x87, 0x87 }, +{ 0x00, 0x88, 0x88 }, +{ 0x00, 0x89, 0x89 }, +{ 0x00, 0x8a, 0x8a }, +{ 0x00, 0x8b, 0x8b }, +{ 0x00, 0x8c, 0x8c }, +{ 0x00, 0x8d, 0x8d }, +{ 0x00, 0x8e, 0x8e }, +{ 0x00, 0x8f, 0x8f }, +{ 0x00, 0x90, 0x90 }, +{ 0x00, 0x91, 0x91 }, +{ 0x00, 0x92, 0x92 }, +{ 0x00, 0x93, 0x93 }, +{ 0x00, 0x94, 0x94 }, +{ 0x00, 0x95, 0x95 }, +{ 0x00, 0x96, 0x96 }, +{ 0x00, 0x97, 0x97 }, +{ 0x00, 0x98, 0x98 }, +{ 0x00, 0x99, 0x99 }, +{ 0x00, 0x9a, 0x9a }, +{ 0x00, 0x9b, 0x9b }, +{ 0x00, 0x9c, 0x9c }, +{ 0x00, 0x9d, 0x9d }, +{ 0x00, 0x9e, 0x9e }, +{ 0x00, 0x9f, 0x9f }, +{ 0x00, 0xa0, 0xa0 }, +{ 0x01, 0xa2, 0xa1 }, +{ 0x00, 0xa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xd2 }, +{ 0x01, 0xf3, 0xd3 }, +{ 0x01, 0xf4, 0xd4 }, +{ 0x01, 0xf5, 0xd5 }, +{ 0x01, 0xf6, 0xd6 }, +{ 0x01, 0xf7, 0xd7 }, +{ 0x01, 0xf8, 0xd8 }, +{ 0x01, 0xf9, 0xd9 }, +{ 0x01, 0xfa, 0xda }, +{ 0x01, 0xfb, 0xdb }, +{ 0x01, 0xfc, 0xdc }, +{ 0x01, 0xfd, 0xdd }, +{ 0x01, 0xfe, 0xde }, +{ 0x00, 0xdf, 0xdf }, +{ 0x00, 0xe0, 0xc0 }, +{ 0x00, 0xe1, 0xc1 }, +{ 0x00, 0xe2, 0xc2 }, +{ 0x00, 0xe3, 0xc3 }, +{ 0x00, 0xe4, 0xc4 }, +{ 0x00, 0xe5, 0xc5 }, +{ 0x00, 0xe6, 0xc6 }, +{ 0x00, 0xe7, 0xc7 }, +{ 0x00, 0xe8, 0xc8 }, +{ 0x00, 0xe9, 0xc9 }, +{ 0x00, 0xea, 0xca }, +{ 0x00, 0xeb, 0xcb }, +{ 0x00, 0xec, 0xcc }, +{ 0x00, 0xed, 0xcd }, +{ 0x00, 0xee, 0xce }, +{ 0x00, 0xef, 0xcf }, +{ 0x00, 0xf0, 0xd0 }, +{ 0x00, 0xf1, 0xd1 }, +{ 0x00, 0xf2, 0xd2 }, +{ 0x00, 0xf3, 0xd3 }, +{ 0x00, 0xf4, 0xd4 }, +{ 0x00, 0xf5, 0xd5 }, +{ 0x00, 0xf6, 0xd6 }, +{ 0x00, 0xf7, 0xd7 }, +{ 0x00, 0xf8, 0xd8 }, +{ 0x00, 0xf9, 0xd9 }, +{ 0x00, 0xfa, 0xda }, +{ 0x00, 0xfb, 0xdb }, +{ 0x00, 0xfc, 0xdc }, +{ 0x00, 0xfd, 0xdd }, +{ 0x00, 0xfe, 0xde }, +{ 0x00, 0xff, 0xff } +}; + +static struct cs_info iso15_tbl[] = { +{ 0x00, 0x00, 0x00 }, +{ 0x00, 0x01, 0x01 }, +{ 0x00, 0x02, 0x02 }, +{ 0x00, 0x03, 0x03 }, +{ 0x00, 0x04, 0x04 }, +{ 0x00, 0x05, 0x05 }, +{ 0x00, 0x06, 0x06 }, +{ 0x00, 0x07, 0x07 }, +{ 0x00, 0x08, 0x08 }, +{ 0x00, 0x09, 0x09 }, +{ 0x00, 0x0a, 0x0a }, +{ 0x00, 0x0b, 0x0b }, +{ 0x00, 0x0c, 0x0c }, +{ 0x00, 0x0d, 0x0d }, +{ 0x00, 0x0e, 0x0e }, +{ 0x00, 0x0f, 0x0f }, +{ 0x00, 0x10, 0x10 }, +{ 0x00, 0x11, 0x11 }, +{ 0x00, 0x12, 0x12 }, +{ 0x00, 0x13, 0x13 }, +{ 0x00, 0x14, 0x14 }, +{ 0x00, 0x15, 0x15 }, +{ 0x00, 0x16, 0x16 }, +{ 0x00, 0x17, 0x17 }, +{ 0x00, 0x18, 0x18 }, +{ 0x00, 0x19, 0x19 }, +{ 0x00, 0x1a, 0x1a }, +{ 0x00, 0x1b, 0x1b }, +{ 0x00, 0x1c, 0x1c }, +{ 0x00, 0x1d, 0x1d }, +{ 0x00, 0x1e, 0x1e }, +{ 0x00, 0x1f, 0x1f }, +{ 0x00, 0x20, 0x20 }, +{ 0x00, 0x21, 0x21 }, +{ 0x00, 0x22, 0x22 }, +{ 0x00, 0x23, 0x23 }, +{ 0x00, 0x24, 0x24 }, +{ 0x00, 0x25, 0x25 }, +{ 0x00, 0x26, 0x26 }, +{ 0x00, 0x27, 0x27 }, +{ 0x00, 0x28, 0x28 }, +{ 0x00, 0x29, 0x29 }, +{ 0x00, 0x2a, 0x2a }, +{ 0x00, 0x2b, 0x2b }, +{ 0x00, 0x2c, 0x2c }, +{ 0x00, 0x2d, 0x2d }, +{ 0x00, 0x2e, 0x2e }, +{ 0x00, 0x2f, 0x2f }, +{ 0x00, 0x30, 0x30 }, +{ 0x00, 0x31, 0x31 }, +{ 0x00, 0x32, 0x32 }, +{ 0x00, 0x33, 0x33 }, +{ 0x00, 0x34, 0x34 }, +{ 0x00, 0x35, 0x35 }, +{ 0x00, 0x36, 0x36 }, +{ 0x00, 0x37, 0x37 }, +{ 0x00, 0x38, 0x38 }, +{ 0x00, 0x39, 0x39 }, +{ 0x00, 0x3a, 0x3a }, +{ 0x00, 0x3b, 0x3b }, +{ 0x00, 0x3c, 0x3c }, +{ 0x00, 0x3d, 0x3d }, +{ 0x00, 0x3e, 0x3e }, +{ 0x00, 0x3f, 0x3f }, +{ 0x00, 0x40, 0x40 }, +{ 0x01, 0x61, 0x41 }, +{ 0x01, 0x62, 0x42 }, +{ 0x01, 0x63, 0x43 }, +{ 0x01, 0x64, 0x44 }, +{ 0x01, 0x65, 0x45 }, +{ 0x01, 0x66, 0x46 }, +{ 0x01, 0x67, 0x47 }, +{ 0x01, 0x68, 0x48 }, +{ 0x01, 0x69, 0x49 }, +{ 0x01, 0x6a, 0x4a }, +{ 0x01, 0x6b, 0x4b }, +{ 0x01, 0x6c, 0x4c }, +{ 0x01, 0x6d, 0x4d }, +{ 0x01, 0x6e, 0x4e }, +{ 0x01, 0x6f, 0x4f }, +{ 0x01, 0x70, 0x50 }, +{ 0x01, 0x71, 0x51 }, +{ 0x01, 0x72, 0x52 }, +{ 0x01, 0x73, 0x53 }, +{ 0x01, 0x74, 0x54 }, +{ 0x01, 0x75, 0x55 }, +{ 0x01, 0x76, 0x56 }, +{ 0x01, 0x77, 0x57 }, +{ 0x01, 0x78, 0x58 }, +{ 0x01, 0x79, 0x59 }, +{ 0x01, 0x7a, 0x5a }, +{ 0x00, 0x5b, 0x5b }, +{ 0x00, 0x5c, 0x5c }, +{ 0x00, 0x5d, 0x5d }, +{ 0x00, 0x5e, 0x5e }, +{ 0x00, 0x5f, 0x5f }, +{ 0x00, 0x60, 0x60 }, +{ 0x00, 0x61, 0x41 }, +{ 0x00, 0x62, 0x42 }, +{ 0x00, 0x63, 0x43 }, +{ 0x00, 0x64, 0x44 }, +{ 0x00, 0x65, 0x45 }, +{ 0x00, 0x66, 0x46 }, +{ 0x00, 0x67, 0x47 }, +{ 0x00, 0x68, 0x48 }, +{ 0x00, 0x69, 0x49 }, +{ 0x00, 0x6a, 0x4a }, +{ 0x00, 0x6b, 0x4b }, +{ 0x00, 0x6c, 0x4c }, +{ 0x00, 0x6d, 0x4d }, +{ 0x00, 0x6e, 0x4e }, +{ 0x00, 0x6f, 0x4f }, +{ 0x00, 0x70, 0x50 }, +{ 0x00, 0x71, 0x51 }, +{ 0x00, 0x72, 0x52 }, +{ 0x00, 0x73, 0x53 }, +{ 0x00, 0x74, 0x54 }, +{ 0x00, 0x75, 0x55 }, +{ 0x00, 0x76, 0x56 }, +{ 0x00, 0x77, 0x57 }, +{ 0x00, 0x78, 0x58 }, +{ 0x00, 0x79, 0x59 }, +{ 0x00, 0x7a, 0x5a }, +{ 0x00, 0x7b, 0x7b }, +{ 0x00, 0x7c, 0x7c }, +{ 0x00, 0x7d, 0x7d }, +{ 0x00, 0x7e, 0x7e }, +{ 0x00, 0x7f, 0x7f }, +{ 0x00, 0x80, 0x80 }, +{ 0x00, 0x81, 0x81 }, +{ 0x00, 0x82, 0x82 }, +{ 0x00, 0x83, 0x83 }, +{ 0x00, 0x84, 0x84 }, +{ 0x00, 0x85, 0x85 }, +{ 0x00, 0x86, 0x86 }, +{ 0x00, 0x87, 0x87 }, +{ 0x00, 0x88, 0x88 }, +{ 0x00, 0x89, 0x89 }, +{ 0x00, 0x8a, 0x8a }, +{ 0x00, 0x8b, 0x8b }, +{ 0x00, 0x8c, 0x8c }, +{ 0x00, 0x8d, 0x8d }, +{ 0x00, 0x8e, 0x8e }, +{ 0x00, 0x8f, 0x8f }, +{ 0x00, 0x90, 0x90 }, +{ 0x00, 0x91, 0x91 }, +{ 0x00, 0x92, 0x92 }, +{ 0x00, 0x93, 0x93 }, +{ 0x00, 0x94, 0x94 }, +{ 0x00, 0x95, 0x95 }, +{ 0x00, 0x96, 0x96 }, +{ 0x00, 0x97, 0x97 }, +{ 0x00, 0x98, 0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8 }, +{ 0x00, 0xf9, 0xd9 }, +{ 0x00, 0xfa, 0xda }, +{ 0x00, 0xfb, 0xdb }, +{ 0x00, 0xfc, 0xdc }, +{ 0x00, 0xfd, 0xdd }, +{ 0x00, 0xfe, 0xde }, +{ 0x00, 0xff, 0xbe } +}; + +static struct cs_info iscii_devanagari_tbl[] = { +{ 0x00, 0x00, 0x00 }, +{ 0x00, 0x01, 0x01 }, +{ 0x00, 0x02, 0x02 }, +{ 0x00, 0x03, 0x03 }, +{ 0x00, 0x04, 0x04 }, +{ 0x00, 0x05, 0x05 }, +{ 0x00, 0x06, 0x06 }, +{ 0x00, 0x07, 0x07 }, +{ 0x00, 0x08, 0x08 }, +{ 0x00, 0x09, 0x09 }, +{ 0x00, 0x0a, 0x0a }, +{ 0x00, 0x0b, 0x0b }, +{ 0x00, 0x0c, 0x0c }, +{ 0x00, 0x0d, 0x0d }, +{ 0x00, 0x0e, 0x0e }, +{ 0x00, 0x0f, 0x0f }, +{ 0x00, 0x10, 0x10 }, +{ 0x00, 0x11, 0x11 }, +{ 0x00, 0x12, 0x12 }, +{ 0x00, 0x13, 0x13 }, +{ 0x00, 0x14, 0x14 }, +{ 0x00, 0x15, 0x15 }, +{ 0x00, 0x16, 0x16 }, +{ 0x00, 0x17, 0x17 }, +{ 0x00, 0x18, 0x18 }, +{ 0x00, 0x19, 0x19 }, +{ 0x00, 0x1a, 0x1a }, +{ 0x00, 0x1b, 0x1b }, +{ 0x00, 0x1c, 0x1c }, +{ 0x00, 0x1d, 0x1d }, +{ 0x00, 0x1e, 0x1e }, +{ 0x00, 0x1f, 0x1f }, +{ 0x00, 0x20, 0x20 }, +{ 0x00, 0x21, 0x21 }, +{ 0x00, 0x22, 0x22 }, +{ 0x00, 0x23, 0x23 }, +{ 0x00, 0x24, 0x24 }, +{ 0x00, 0x25, 0x25 }, +{ 0x00, 0x26, 0x26 }, +{ 0x00, 0x27, 0x27 }, +{ 0x00, 0x28, 0x28 }, +{ 0x00, 0x29, 0x29 }, +{ 0x00, 0x2a, 0x2a }, +{ 0x00, 0x2b, 0x2b }, +{ 0x00, 0x2c, 0x2c }, +{ 0x00, 0x2d, 0x2d }, +{ 0x00, 0x2e, 0x2e }, +{ 0x00, 0x2f, 0x2f }, +{ 0x00, 0x30, 0x30 }, +{ 0x00, 0x31, 0x31 }, +{ 0x00, 0x32, 0x32 }, +{ 0x00, 0x33, 0x33 }, +{ 0x00, 0x34, 0x34 }, +{ 0x00, 0x35, 0x35 }, +{ 0x00, 0x36, 0x36 }, +{ 0x00, 0x37, 0x37 }, +{ 0x00, 0x38, 0x38 }, +{ 0x00, 0x39, 0x39 }, +{ 0x00, 0x3a, 0x3a }, +{ 0x00, 0x3b, 0x3b }, +{ 0x00, 0x3c, 0x3c }, +{ 0x00, 0x3d, 0x3d }, +{ 0x00, 0x3e, 0x3e }, +{ 0x00, 0x3f, 0x3f }, +{ 0x00, 0x40, 0x40 }, +{ 0x01, 0x61, 0x41 }, +{ 0x01, 0x62, 0x42 }, +{ 0x01, 0x63, 0x43 }, +{ 0x01, 0x64, 0x44 }, +{ 0x01, 0x65, 0x45 }, +{ 0x01, 0x66, 0x46 }, +{ 0x01, 0x67, 0x47 }, +{ 0x01, 0x68, 0x48 }, +{ 0x01, 0x69, 0x49 }, +{ 0x01, 0x6a, 0x4a }, +{ 0x01, 0x6b, 0x4b }, +{ 0x01, 0x6c, 0x4c }, +{ 0x01, 0x6d, 0x4d }, +{ 0x01, 0x6e, 0x4e }, +{ 0x01, 0x6f, 0x4f }, +{ 0x01, 0x70, 0x50 }, +{ 0x01, 0x71, 0x51 }, +{ 0x01, 0x72, 0x52 }, +{ 0x01, 0x73, 0x53 }, +{ 0x01, 0x74, 0x54 }, +{ 0x01, 0x75, 0x55 }, +{ 0x01, 0x76, 0x56 }, +{ 0x01, 0x77, 0x57 }, +{ 0x01, 0x78, 0x58 }, +{ 0x01, 0x79, 0x59 }, +{ 0x01, 0x7a, 0x5a }, +{ 0x00, 0x5b, 0x5b }, +{ 0x00, 0x5c, 0x5c }, +{ 0x00, 0x5d, 0x5d }, +{ 0x00, 0x5e, 0x5e }, +{ 0x00, 0x5f, 0x5f }, +{ 0x00, 0x60, 0x60 }, +{ 0x00, 0x61, 0x41 }, +{ 0x00, 0x62, 0x42 }, +{ 0x00, 0x63, 0x43 }, +{ 0x00, 0x64, 0x44 }, +{ 0x00, 0x65, 0x45 }, +{ 0x00, 0x66, 0x46 }, +{ 0x00, 0x67, 0x47 }, +{ 0x00, 0x68, 0x48 }, +{ 0x00, 0x69, 0x49 }, +{ 0x00, 0x6a, 0x4a }, +{ 0x00, 0x6b, 0x4b }, +{ 0x00, 0x6c, 0x4c }, +{ 0x00, 0x6d, 0x4d }, +{ 0x00, 0x6e, 0x4e }, +{ 0x00, 0x6f, 0x4f }, +{ 0x00, 0x70, 0x50 }, +{ 0x00, 0x71, 0x51 }, +{ 0x00, 0x72, 0x52 }, +{ 0x00, 0x73, 0x53 }, +{ 0x00, 0x74, 0x54 }, +{ 0x00, 0x75, 0x55 }, +{ 0x00, 0x76, 0x56 }, +{ 0x00, 0x77, 0x57 }, +{ 0x00, 0x78, 0x58 }, +{ 0x00, 0x79, 0x59 }, +{ 0x00, 0x7a, 0x5a }, +{ 0x00, 0x7b, 0x7b }, +{ 0x00, 0x7c, 0x7c }, +{ 0x00, 0x7d, 0x7d }, +{ 0x00, 0x7e, 0x7e }, +{ 0x00, 0x7f, 0x7f }, +{ 0x00, 0x80, 0x80 }, +{ 0x00, 0x81, 0x81 }, +{ 0x00, 0x82, 0x82 }, +{ 0x00, 0x83, 0x83 }, +{ 0x00, 0x84, 0x84 }, +{ 0x00, 0x85, 0x85 }, +{ 0x00, 0x86, 0x86 }, +{ 0x00, 0x87, 0x87 }, +{ 0x00, 0x88, 0x88 }, +{ 0x00, 0x89, 0x89 }, +{ 0x00, 0x8a, 0x8a }, +{ 0x00, 0x8b, 0x8b }, +{ 0x00, 0x8c, 0x8c }, +{ 0x00, 0x8d, 0x8d }, +{ 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{ 0x00, 0xef, 0xef }, +{ 0x00, 0xf0, 0xf0 }, +{ 0x00, 0xf1, 0xf1 }, +{ 0x00, 0xf2, 0xf2 }, +{ 0x00, 0xf3, 0xf3 }, +{ 0x00, 0xf4, 0xf4 }, +{ 0x00, 0xf5, 0xf5 }, +{ 0x00, 0xf6, 0xf6 }, +{ 0x00, 0xf7, 0xf7 }, +{ 0x00, 0xf8, 0xf8 }, +{ 0x00, 0xf9, 0xf9 }, +{ 0x00, 0xfa, 0xfa }, +{ 0x00, 0xfb, 0xfb }, +{ 0x00, 0xfc, 0xfc }, +{ 0x00, 0xfd, 0xfd }, +{ 0x00, 0xfe, 0xfe }, +{ 0x00, 0xff, 0xff } +}; + +static struct cs_info tis620_tbl[] = { +{ 0x00, 0x00, 0x00 }, +{ 0x00, 0x01, 0x01 }, +{ 0x00, 0x02, 0x02 }, +{ 0x00, 0x03, 0x03 }, +{ 0x00, 0x04, 0x04 }, +{ 0x00, 0x05, 0x05 }, +{ 0x00, 0x06, 0x06 }, +{ 0x00, 0x07, 0x07 }, +{ 0x00, 0x08, 0x08 }, +{ 0x00, 0x09, 0x09 }, +{ 0x00, 0x0a, 0x0a }, +{ 0x00, 0x0b, 0x0b }, +{ 0x00, 0x0c, 0x0c }, +{ 0x00, 0x0d, 0x0d }, +{ 0x00, 0x0e, 0x0e }, +{ 0x00, 0x0f, 0x0f }, +{ 0x00, 0x10, 0x10 }, +{ 0x00, 0x11, 0x11 }, +{ 0x00, 0x12, 0x12 }, +{ 0x00, 0x13, 0x13 }, +{ 0x00, 0x14, 0x14 }, +{ 0x00, 0x15, 0x15 }, +{ 0x00, 0x16, 0x16 }, +{ 0x00, 0x17, 0x17 }, +{ 0x00, 0x18, 0x18 }, +{ 0x00, 0x19, 0x19 }, +{ 0x00, 0x1a, 0x1a }, +{ 0x00, 0x1b, 0x1b }, +{ 0x00, 0x1c, 0x1c }, +{ 0x00, 0x1d, 0x1d }, +{ 0x00, 0x1e, 0x1e }, +{ 0x00, 0x1f, 0x1f }, +{ 0x00, 0x20, 0x20 }, +{ 0x00, 0x21, 0x21 }, +{ 0x00, 0x22, 0x22 }, +{ 0x00, 0x23, 0x23 }, +{ 0x00, 0x24, 0x24 }, +{ 0x00, 0x25, 0x25 }, +{ 0x00, 0x26, 0x26 }, +{ 0x00, 0x27, 0x27 }, +{ 0x00, 0x28, 0x28 }, +{ 0x00, 0x29, 0x29 }, +{ 0x00, 0x2a, 0x2a }, +{ 0x00, 0x2b, 0x2b }, +{ 0x00, 0x2c, 0x2c }, +{ 0x00, 0x2d, 0x2d }, +{ 0x00, 0x2e, 0x2e }, +{ 0x00, 0x2f, 0x2f }, +{ 0x00, 0x30, 0x30 }, +{ 0x00, 0x31, 0x31 }, +{ 0x00, 0x32, 0x32 }, +{ 0x00, 0x33, 0x33 }, +{ 0x00, 0x34, 0x34 }, +{ 0x00, 0x35, 0x35 }, +{ 0x00, 0x36, 0x36 }, +{ 0x00, 0x37, 0x37 }, +{ 0x00, 0x38, 0x38 }, +{ 0x00, 0x39, 0x39 }, +{ 0x00, 0x3a, 0x3a }, +{ 0x00, 0x3b, 0x3b }, +{ 0x00, 0x3c, 0x3c }, +{ 0x00, 0x3d, 0x3d }, +{ 0x00, 0x3e, 0x3e }, +{ 0x00, 0x3f, 0x3f }, +{ 0x00, 0x40, 0x40 }, +{ 0x01, 0x61, 0x41 }, +{ 0x01, 0x62, 0x42 }, +{ 0x01, 0x63, 0x43 }, +{ 0x01, 0x64, 0x44 }, +{ 0x01, 0x65, 0x45 }, +{ 0x01, 0x66, 0x46 }, +{ 0x01, 0x67, 0x47 }, +{ 0x01, 0x68, 0x48 }, +{ 0x01, 0x69, 0x49 }, +{ 0x01, 0x6a, 0x4a }, +{ 0x01, 0x6b, 0x4b }, +{ 0x01, 0x6c, 0x4c }, +{ 0x01, 0x6d, 0x4d }, +{ 0x01, 0x6e, 0x4e }, +{ 0x01, 0x6f, 0x4f }, +{ 0x01, 0x70, 0x50 }, +{ 0x01, 0x71, 0x51 }, +{ 0x01, 0x72, 0x52 }, +{ 0x01, 0x73, 0x53 }, +{ 0x01, 0x74, 0x54 }, +{ 0x01, 0x75, 0x55 }, +{ 0x01, 0x76, 0x56 }, +{ 0x01, 0x77, 0x57 }, +{ 0x01, 0x78, 0x58 }, +{ 0x01, 0x79, 0x59 }, +{ 0x01, 0x7a, 0x5a }, +{ 0x00, 0x5b, 0x5b }, +{ 0x00, 0x5c, 0x5c }, +{ 0x00, 0x5d, 0x5d }, +{ 0x00, 0x5e, 0x5e }, +{ 0x00, 0x5f, 0x5f }, +{ 0x00, 0x60, 0x60 }, +{ 0x00, 0x61, 0x41 }, +{ 0x00, 0x62, 0x42 }, +{ 0x00, 0x63, 0x43 }, +{ 0x00, 0x64, 0x44 }, +{ 0x00, 0x65, 0x45 }, +{ 0x00, 0x66, 0x46 }, +{ 0x00, 0x67, 0x47 }, +{ 0x00, 0x68, 0x48 }, +{ 0x00, 0x69, 0x49 }, +{ 0x00, 0x6a, 0x4a }, +{ 0x00, 0x6b, 0x4b }, +{ 0x00, 0x6c, 0x4c }, +{ 0x00, 0x6d, 0x4d }, +{ 0x00, 0x6e, 0x4e }, +{ 0x00, 0x6f, 0x4f }, +{ 0x00, 0x70, 0x50 }, +{ 0x00, 0x71, 0x51 }, +{ 0x00, 0x72, 0x52 }, +{ 0x00, 0x73, 0x53 }, +{ 0x00, 0x74, 0x54 }, +{ 0x00, 0x75, 0x55 }, +{ 0x00, 0x76, 0x56 }, +{ 0x00, 0x77, 0x57 }, +{ 0x00, 0x78, 0x58 }, +{ 0x00, 0x79, 0x59 }, +{ 0x00, 0x7a, 0x5a }, +{ 0x00, 0x7b, 0x7b }, +{ 0x00, 0x7c, 0x7c }, +{ 0x00, 0x7d, 0x7d }, +{ 0x00, 0x7e, 0x7e }, +{ 0x00, 0x7f, 0x7f }, +{ 0x00, 0x80, 0x80 }, +{ 0x00, 0x81, 0x81 }, +{ 0x00, 0x82, 0x82 }, +{ 0x00, 0x83, 0x83 }, +{ 0x00, 0x84, 0x84 }, +{ 0x00, 0x85, 0x85 }, +{ 0x00, 0x86, 0x86 }, +{ 0x00, 0x87, 0x87 }, +{ 0x00, 0x88, 0x88 }, +{ 0x00, 0x89, 0x89 }, +{ 0x00, 0x8a, 0x8a }, +{ 0x00, 0x8b, 0x8b }, +{ 0x00, 0x8c, 0x8c }, +{ 0x00, 0x8d, 0x8d }, +{ 0x00, 0x8e, 0x8e }, +{ 0x00, 0x8f, 0x8f }, +{ 0x00, 0x90, 0x90 }, +{ 0x00, 0x91, 0x91 }, +{ 0x00, 0x92, 0x92 }, +{ 0x00, 0x93, 0x93 }, +{ 0x00, 0x94, 0x94 }, +{ 0x00, 0x95, 0x95 }, +{ 0x00, 0x96, 0x96 }, +{ 0x00, 0x97, 0x97 }, +{ 0x00, 0x98, 0x98 }, +{ 0x00, 0x99, 0x99 }, +{ 0x00, 0x9a, 0x9a }, +{ 0x00, 0x9b, 0x9b }, +{ 0x00, 0x9c, 0x9c }, +{ 0x00, 0x9d, 0x9d }, +{ 0x00, 0x9e, 0x9e }, +{ 0x00, 0x9f, 0x9f }, +{ 0x00, 0xa0, 0xa0 }, +{ 0x00, 0xa1, 0xa1 }, +{ 0x00, 0xa2, 0xa2 }, +{ 0x00, 0xa3, 0xa3 }, +{ 0x00, 0xa4, 0xa4 }, +{ 0x00, 0xa5, 0xa5 }, +{ 0x00, 0xa6, 0xa6 }, +{ 0x00, 0xa7, 0xa7 }, +{ 0x00, 0xa8, 0xa8 }, +{ 0x00, 0xa9, 0xa9 }, +{ 0x00, 0xaa, 0xaa }, +{ 0x00, 0xab, 0xab }, +{ 0x00, 0xac, 0xac }, +{ 0x00, 0xad, 0xad }, +{ 0x00, 0xae, 0xae }, +{ 0x00, 0xaf, 0xaf }, +{ 0x00, 0xb0, 0xb0 }, +{ 0x00, 0xb1, 0xb1 }, +{ 0x00, 0xb2, 0xb2 }, +{ 0x00, 0xb3, 0xb3 }, +{ 0x00, 0xb4, 0xb4 }, +{ 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+{ 0x00, 0xe5, 0xe5 }, +{ 0x00, 0xe6, 0xe6 }, +{ 0x00, 0xe7, 0xe7 }, +{ 0x00, 0xe8, 0xe8 }, +{ 0x00, 0xe9, 0xe9 }, +{ 0x00, 0xea, 0xea }, +{ 0x00, 0xeb, 0xeb }, +{ 0x00, 0xec, 0xec }, +{ 0x00, 0xed, 0xed }, +{ 0x00, 0xee, 0xee }, +{ 0x00, 0xef, 0xef }, +{ 0x00, 0xf0, 0xf0 }, +{ 0x00, 0xf1, 0xf1 }, +{ 0x00, 0xf2, 0xf2 }, +{ 0x00, 0xf3, 0xf3 }, +{ 0x00, 0xf4, 0xf4 }, +{ 0x00, 0xf5, 0xf5 }, +{ 0x00, 0xf6, 0xf6 }, +{ 0x00, 0xf7, 0xf7 }, +{ 0x00, 0xf8, 0xf8 }, +{ 0x00, 0xf9, 0xf9 }, +{ 0x00, 0xfa, 0xfa }, +{ 0x00, 0xfb, 0xfb }, +{ 0x00, 0xfc, 0xfc }, +{ 0x00, 0xfd, 0xfd }, +{ 0x00, 0xfe, 0xfe }, +{ 0x00, 0xff, 0xff } +}; + +struct enc_entry { + const char * enc_name; + struct cs_info * cs_table; +}; + +static struct enc_entry encds[] = { + {"iso88591",iso1_tbl}, //ISO-8859-1 + {"iso88592",iso2_tbl}, //ISO-8859-2 + {"iso88593",iso3_tbl}, //ISO-8859-3 + {"iso88594",iso4_tbl}, //ISO-8859-4 + {"iso88595",iso5_tbl}, //ISO-8859-5 + {"iso88596",iso6_tbl}, //ISO-8859-6 + {"iso88597",iso7_tbl}, //ISO-8859-7 + {"iso88598",iso8_tbl}, //ISO-8859-8 + {"iso88599",iso9_tbl}, //ISO-8859-9 + {"iso885910",iso10_tbl}, //ISO-8859-10 + {"tis620",tis620_tbl}, //TIS-620/ISO-8859-11 + {"tis6202533",tis620_tbl}, //TIS-620/ISO-8859-11 + {"iso885911",tis620_tbl}, //TIS-620/ISO-8859-11 + {"iso885913", iso13_tbl}, //ISO-8859-13 + {"iso885914", iso14_tbl}, //ISO-8859-14 + {"iso885915", iso15_tbl}, //ISO-8859-15 + {"koi8r",koi8r_tbl}, //KOI8-R + {"koi8u",koi8u_tbl}, //KOI8-U + {"cp1251",cp1251_tbl}, //CP-1251 + {"microsoftcp1251",cp1251_tbl}, //microsoft-cp1251 + {"xisciias", iscii_devanagari_tbl}, //x-iscii-as + {"isciidevanagari", iscii_devanagari_tbl} //ISCII-DEVANAGARI +}; + +/* map to lower case and remove non alphanumeric chars */ +static void toAsciiLowerAndRemoveNonAlphanumeric( const char* pName, char* pBuf ) +{ + while ( *pName ) + { + /* A-Z */ + if ( (*pName >= 0x41) && (*pName <= 0x5A)) + { + *pBuf = (*pName)+0x20; /* toAsciiLower */ + pBuf++; + } + /* a-z, 0-9 */ + else if ( ((*pName >= 0x61) && (*pName <= 0x7A)) || + ((*pName >= 0x30) && (*pName <= 0x39))) + { + *pBuf = *pName; + pBuf++; + } + + pName++; + } + + *pBuf = '\0'; +} + +struct cs_info * get_current_cs(const char * es) { + char *normalized_encoding = new char[strlen(es)+1]; + toAsciiLowerAndRemoveNonAlphanumeric(es, normalized_encoding); + + struct cs_info * ccs = NULL; + int n = sizeof(encds) / sizeof(encds[0]); + for (int i = 0; i < n; i++) { + if (strcmp(normalized_encoding,encds[i].enc_name) == 0) { + ccs = encds[i].cs_table; + break; + } + } + + delete[] normalized_encoding; + + if (!ccs) { + HUNSPELL_WARNING(stderr, "error: unknown encoding %s: using %s as fallback\n", es, encds[0].enc_name); + ccs = encds[0].cs_table; + } + + return ccs; +} +#else +// XXX This function was rewritten for mozilla. Instead of storing the +// conversion tables static in this file, create them when needed +// with help the mozilla backend. +struct cs_info * get_current_cs(const char * es) { + struct cs_info *ccs; + + nsCOMPtr encoder; + nsCOMPtr decoder; + + nsresult rv; + nsCOMPtr ccm = do_GetService(kCharsetConverterManagerCID, &rv); + if (NS_FAILED(rv)) + return nsnull; + + rv = ccm->GetUnicodeEncoder(es, getter_AddRefs(encoder)); + if (NS_FAILED(rv)) + return nsnull; + encoder->SetOutputErrorBehavior(encoder->kOnError_Signal, nsnull, '?'); + rv = ccm->GetUnicodeDecoder(es, getter_AddRefs(decoder)); + if (NS_FAILED(rv)) + return nsnull; + decoder->SetInputErrorBehavior(decoder->kOnError_Signal); + + if (NS_FAILED(rv)) + return nsnull; + + ccs = new cs_info[256]; + + for (unsigned int i = 0; i <= 0xff; ++i) { + PRBool success = PR_FALSE; + // We want to find the upper/lowercase equivalents of each byte + // in this 1-byte character encoding. Call our encoding/decoding + // APIs separately for each byte since they may reject some of the + // bytes, and we want to handle errors separately for each byte. + char lower, upper; + do { + if (i == 0) + break; + const char source = char(i); + PRUnichar uni, uniCased; + PRInt32 charLength = 1, uniLength = 1; + + rv = decoder->Convert(&source, &charLength, &uni, &uniLength); + // Explicitly check NS_OK because we don't want to allow + // NS_OK_UDEC_MOREOUTPUT or NS_OK_UDEC_MOREINPUT. + if (rv != NS_OK || charLength != 1 || uniLength != 1) + break; + uniCased = ToLowerCase(uni); + rv = encoder->Convert(&uniCased, &uniLength, &lower, &charLength); + // Explicitly check NS_OK because we don't want to allow + // NS_OK_UDEC_MOREOUTPUT or NS_OK_UDEC_MOREINPUT. + if (rv != NS_OK || charLength != 1 || uniLength != 1) + break; + + uniCased = ToUpperCase(uni); + rv = encoder->Convert(&uniCased, &uniLength, &upper, &charLength); + // Explicitly check NS_OK because we don't want to allow + // NS_OK_UDEC_MOREOUTPUT or NS_OK_UDEC_MOREINPUT. + if (rv != NS_OK || charLength != 1 || uniLength != 1) + break; + + success = PR_TRUE; + } while (0); + + if (success) { + ccs[i].cupper = upper; + ccs[i].clower = lower; + } else { + ccs[i].cupper = i; + ccs[i].clower = i; + } + + if (ccs[i].clower != (unsigned char)i) + ccs[i].ccase = true; + else + ccs[i].ccase = false; + } + + return ccs; +} +#endif + +// primitive isalpha() replacement for tokenization +char * get_casechars(const char * enc) { + struct cs_info * csconv = get_current_cs(enc); + char expw[MAXLNLEN]; + char * p = expw; + for (int i = 0; i <= 255; i++) { + if ((csconv[i].cupper != csconv[i].clower)) { + *p = (char) i; + p++; + } + } + *p = '\0'; +#ifdef MOZILLA_CLIENT + delete [] csconv; +#endif + return mystrdup(expw); +} + +// language to encoding default map + +struct lang_map { + const char * lang; + int num; +}; + +static struct lang_map lang2enc[] = { +{"ar", LANG_ar}, +{"az", LANG_az}, +{"az_AZ", LANG_az}, // for back-compatibility +{"bg", LANG_bg}, +{"ca", LANG_ca}, +{"cs", LANG_cs}, +{"da", LANG_da}, +{"de", LANG_de}, +{"el", LANG_el}, +{"en", LANG_en}, +{"es", LANG_es}, +{"eu", LANG_eu}, +{"gl", LANG_gl}, +{"fr", LANG_fr}, +{"hr", LANG_hr}, +{"hu", LANG_hu}, +{"hu_HU", LANG_hu}, // for back-compatibility +{"it", LANG_it}, +{"la", LANG_la}, +{"lv", LANG_lv}, +{"nl", LANG_nl}, +{"pl", LANG_pl}, +{"pt", LANG_pt}, +{"sv", LANG_sv}, +{"tr", LANG_tr}, +{"tr_TR", LANG_tr}, // for back-compatibility +{"ru", LANG_ru}, +{"uk", LANG_uk} +}; + + +int get_lang_num(const char * lang) { + int n = sizeof(lang2enc) / sizeof(lang2enc[0]); + for (int i = 0; i < n; i++) { + if (strcmp(lang, lang2enc[i].lang) == 0) { + return lang2enc[i].num; + } + } + return LANG_xx; +} + +#ifndef OPENOFFICEORG +#ifndef MOZILLA_CLIENT +int initialize_utf_tbl() { + utf_tbl_count++; + if (utf_tbl) return 0; + utf_tbl = (unicode_info2 *) malloc(CONTSIZE * sizeof(unicode_info2)); + if (utf_tbl) { + size_t j; + for (j = 0; j < CONTSIZE; j++) { + utf_tbl[j].cletter = 0; + utf_tbl[j].clower = (unsigned short) j; + utf_tbl[j].cupper = (unsigned short) j; + } + for (j = 0; j < UTF_LST_LEN; j++) { + utf_tbl[utf_lst[j].c].cletter = 1; + utf_tbl[utf_lst[j].c].clower = utf_lst[j].clower; + utf_tbl[utf_lst[j].c].cupper = utf_lst[j].cupper; + } + } else return 1; + return 0; +} +#endif +#endif + +void free_utf_tbl() { + if (utf_tbl_count > 0) utf_tbl_count--; + if (utf_tbl && (utf_tbl_count == 0)) { + free(utf_tbl); + utf_tbl = NULL; + } +} + +unsigned short unicodetoupper(unsigned short c, int langnum) +{ + // In Azeri and Turkish, I and i dictinct letters: + // There are a dotless lower case i pair of upper `I', + // and an upper I with dot pair of lower `i'. + if (c == 0x0069 && ((langnum == LANG_az) || (langnum == LANG_tr))) + return 0x0130; +#ifdef OPENOFFICEORG + return u_toupper(c); +#else +#ifdef MOZILLA_CLIENT + return ToUpperCase((PRUnichar) c); +#else + return (utf_tbl) ? utf_tbl[c].cupper : c; +#endif +#endif +} + +unsigned short unicodetolower(unsigned short c, int langnum) +{ + // In Azeri and Turkish, I and i dictinct letters: + // There are a dotless lower case i pair of upper `I', + // and an upper I with dot pair of lower `i'. + if (c == 0x0049 && ((langnum == LANG_az) || (langnum == LANG_tr))) + return 0x0131; +#ifdef OPENOFFICEORG + return u_tolower(c); +#else +#ifdef MOZILLA_CLIENT + return ToLowerCase((PRUnichar) c); +#else + return (utf_tbl) ? utf_tbl[c].clower : c; +#endif +#endif +} + +int unicodeisalpha(unsigned short c) +{ +#ifdef OPENOFFICEORG + return u_isalpha(c); +#else + return (utf_tbl) ? utf_tbl[c].cletter : 0; +#endif +} + +/* get type of capitalization */ +int get_captype(char * word, int nl, cs_info * csconv) { + // now determine the capitalization type of the first nl letters + int ncap = 0; + int nneutral = 0; + int firstcap = 0; + if (csconv == NULL) return NOCAP; + for (char * q = word; *q != '\0'; q++) { + if (csconv[*((unsigned char *)q)].ccase) ncap++; + if (csconv[*((unsigned char *)q)].cupper == csconv[*((unsigned char *)q)].clower) nneutral++; + } + if (ncap) { + firstcap = csconv[*((unsigned char *) word)].ccase; + } + + // now finally set the captype + if (ncap == 0) { + return NOCAP; + } else if ((ncap == 1) && firstcap) { + return INITCAP; + } else if ((ncap == nl) || ((ncap + nneutral) == nl)) { + return ALLCAP; + } else if ((ncap > 1) && firstcap) { + return HUHINITCAP; + } + return HUHCAP; +} + +int get_captype_utf8(w_char * word, int nl, int langnum) { + // now determine the capitalization type of the first nl letters + int ncap = 0; + int nneutral = 0; + int firstcap = 0; + unsigned short idx; + // don't check too long words + if (nl >= MAXWORDLEN) return 0; + // big Unicode character (non BMP area) + if (nl == -1) return NOCAP; + for (int i = 0; i < nl; i++) { + idx = (word[i].h << 8) + word[i].l; + if (idx != unicodetolower(idx, langnum)) ncap++; + if (unicodetoupper(idx, langnum) == unicodetolower(idx, langnum)) nneutral++; + } + if (ncap) { + idx = (word[0].h << 8) + word[0].l; + firstcap = (idx != unicodetolower(idx, langnum)); + } + + // now finally set the captype + if (ncap == 0) { + return NOCAP; + } else if ((ncap == 1) && firstcap) { + return INITCAP; + } else if ((ncap == nl) || ((ncap + nneutral) == nl)) { + return ALLCAP; + } else if ((ncap > 1) && firstcap) { + return HUHINITCAP; + } + return HUHCAP; +} + + +// strip all ignored characters in the string +void remove_ignored_chars_utf(char * word, unsigned short ignored_chars[], int ignored_len) +{ + w_char w[MAXWORDLEN]; + w_char w2[MAXWORDLEN]; + int i; + int j; + int len = u8_u16(w, MAXWORDLEN, word); + for (i = 0, j = 0; i < len; i++) { + if (!flag_bsearch(ignored_chars, ((unsigned short *) w)[i], ignored_len)) { + w2[j] = w[i]; + j++; + } + } + if (j < i) u16_u8(word, MAXWORDUTF8LEN, w2, j); +} + +// strip all ignored characters in the string +void remove_ignored_chars(char * word, char * ignored_chars) +{ + for (char * p = word; *p != '\0'; p++) { + if (!strchr(ignored_chars, *p)) { + *word = *p; + word++; + } + } + *word = '\0'; +} + +int parse_string(char * line, char ** out, int ln) +{ + char * tp = line; + char * piece; + int i = 0; + int np = 0; + if (*out) { + HUNSPELL_WARNING(stderr, "error: line %d: multiple definitions\n", ln); + return 1; + } + piece = mystrsep(&tp, 0); + while (piece) { + if (*piece != '\0') { + switch(i) { + case 0: { np++; break; } + case 1: { + *out = mystrdup(piece); + if (!*out) return 1; + np++; + break; + } + default: break; + } + i++; + } + // free(piece); + piece = mystrsep(&tp, 0); + } + if (np != 2) { + HUNSPELL_WARNING(stderr, "error: line %d: missing data\n", ln); + return 1; + } + return 0; +} + +int parse_array(char * line, char ** out, unsigned short ** out_utf16, + int * out_utf16_len, int utf8, int ln) { + if (parse_string(line, out, ln)) return 1; + if (utf8) { + w_char w[MAXWORDLEN]; + int n = u8_u16(w, MAXWORDLEN, *out); + if (n > 0) { + flag_qsort((unsigned short *) w, 0, n); + *out_utf16 = (unsigned short *) malloc(n * sizeof(unsigned short)); + if (!*out_utf16) return 1; + memcpy(*out_utf16, w, n * sizeof(unsigned short)); + } + *out_utf16_len = n; + } + return 0; +} diff --git a/plugins/SpellChecker/src/hunspell/csutil.hxx b/plugins/SpellChecker/src/hunspell/csutil.hxx new file mode 100644 index 0000000000..7bd0b919be --- /dev/null +++ b/plugins/SpellChecker/src/hunspell/csutil.hxx @@ -0,0 +1,220 @@ +#ifndef __CSUTILHXX__ +#define __CSUTILHXX__ + +#include "hunvisapi.h" + +// First some base level utility routines + +#include +#include "w_char.hxx" +#include "htypes.hxx" + +#ifdef MOZILLA_CLIENT +#include "nscore.h" // for mozalloc headers +#endif + +// casing +#define NOCAP 0 +#define INITCAP 1 +#define ALLCAP 2 +#define HUHCAP 3 +#define HUHINITCAP 4 + +// default encoding and keystring +#define SPELL_ENCODING "ISO8859-1" +#define SPELL_KEYSTRING "qwertyuiop|asdfghjkl|zxcvbnm" + +// default morphological fields +#define MORPH_STEM "st:" +#define MORPH_ALLOMORPH "al:" +#define MORPH_POS "po:" +#define MORPH_DERI_PFX "dp:" +#define MORPH_INFL_PFX "ip:" +#define MORPH_TERM_PFX "tp:" +#define MORPH_DERI_SFX "ds:" +#define MORPH_INFL_SFX "is:" +#define MORPH_TERM_SFX "ts:" +#define MORPH_SURF_PFX "sp:" +#define MORPH_FREQ "fr:" +#define MORPH_PHON "ph:" +#define MORPH_HYPH "hy:" +#define MORPH_PART "pa:" +#define MORPH_FLAG "fl:" +#define MORPH_HENTRY "_H:" +#define MORPH_TAG_LEN strlen(MORPH_STEM) + +#define MSEP_FLD ' ' +#define MSEP_REC '\n' +#define MSEP_ALT '\v' + +// default flags +#define DEFAULTFLAGS 65510 +#define FORBIDDENWORD 65510 +#define ONLYUPCASEFLAG 65511 + +// convert UTF-16 characters to UTF-8 +LIBHUNSPELL_DLL_EXPORTED char * u16_u8(char * dest, int size, const w_char * src, int srclen); + +// convert UTF-8 characters to UTF-16 +LIBHUNSPELL_DLL_EXPORTED int u8_u16(w_char * dest, int size, const char * src); + +// sort 2-byte vector +LIBHUNSPELL_DLL_EXPORTED void flag_qsort(unsigned short flags[], int begin, int end); + +// binary search in 2-byte vector +LIBHUNSPELL_DLL_EXPORTED int flag_bsearch(unsigned short flags[], unsigned short flag, int right); + +// remove end of line char(s) +LIBHUNSPELL_DLL_EXPORTED void mychomp(char * s); + +// duplicate string +LIBHUNSPELL_DLL_EXPORTED char * mystrdup(const char * s); + +// strcat for limited length destination string +LIBHUNSPELL_DLL_EXPORTED char * mystrcat(char * dest, const char * st, int max); + +// duplicate reverse of string +LIBHUNSPELL_DLL_EXPORTED char * myrevstrdup(const char * s); + +// parse into tokens with char delimiter +LIBHUNSPELL_DLL_EXPORTED char * mystrsep(char ** sptr, const char delim); +// parse into tokens with char delimiter +LIBHUNSPELL_DLL_EXPORTED char * mystrsep2(char ** sptr, const char delim); + +// parse into tokens with char delimiter +LIBHUNSPELL_DLL_EXPORTED char * mystrrep(char *, const char *, const char *); + +// append s to ends of every lines in text +LIBHUNSPELL_DLL_EXPORTED void strlinecat(char * lines, const char * s); + +// tokenize into lines with new line +LIBHUNSPELL_DLL_EXPORTED int line_tok(const char * text, char *** lines, char breakchar); + +// tokenize into lines with new line and uniq in place +LIBHUNSPELL_DLL_EXPORTED char * line_uniq(char * text, char breakchar); +LIBHUNSPELL_DLL_EXPORTED char * line_uniq_app(char ** text, char breakchar); + +// change oldchar to newchar in place +LIBHUNSPELL_DLL_EXPORTED char * tr(char * text, char oldc, char newc); + +// reverse word +LIBHUNSPELL_DLL_EXPORTED int reverseword(char *); + +// reverse word +LIBHUNSPELL_DLL_EXPORTED int reverseword_utf(char *); + +// remove duplicates +LIBHUNSPELL_DLL_EXPORTED int uniqlist(char ** list, int n); + +// free character array list +LIBHUNSPELL_DLL_EXPORTED void freelist(char *** list, int n); + +// character encoding information +struct cs_info { + unsigned char ccase; + unsigned char clower; + unsigned char cupper; +}; + +LIBHUNSPELL_DLL_EXPORTED int initialize_utf_tbl(); +LIBHUNSPELL_DLL_EXPORTED void free_utf_tbl(); +LIBHUNSPELL_DLL_EXPORTED unsigned short unicodetoupper(unsigned short c, int langnum); +LIBHUNSPELL_DLL_EXPORTED unsigned short unicodetolower(unsigned short c, int langnum); +LIBHUNSPELL_DLL_EXPORTED int unicodeisalpha(unsigned short c); + +LIBHUNSPELL_DLL_EXPORTED struct cs_info * get_current_cs(const char * es); + +// get language identifiers of language codes +LIBHUNSPELL_DLL_EXPORTED int get_lang_num(const char * lang); + +// get characters of the given 8bit encoding with lower- and uppercase forms +LIBHUNSPELL_DLL_EXPORTED char * get_casechars(const char * enc); + +// convert null terminated string to all caps using encoding +LIBHUNSPELL_DLL_EXPORTED void enmkallcap(char * d, const char * p, const char * encoding); + +// convert null terminated string to all little using encoding +LIBHUNSPELL_DLL_EXPORTED void enmkallsmall(char * d, const char * p, const char * encoding); + +// convert null terminated string to have initial capital using encoding +LIBHUNSPELL_DLL_EXPORTED void enmkinitcap(char * d, const char * p, const char * encoding); + +// convert null terminated string to all caps +LIBHUNSPELL_DLL_EXPORTED void mkallcap(char * p, const struct cs_info * csconv); + +// convert null terminated string to all little +LIBHUNSPELL_DLL_EXPORTED void mkallsmall(char * p, const struct cs_info * csconv); + +// convert null terminated string to have initial capital +LIBHUNSPELL_DLL_EXPORTED void mkinitcap(char * p, const struct cs_info * csconv); + +// convert first nc characters of UTF-8 string to little +LIBHUNSPELL_DLL_EXPORTED void mkallsmall_utf(w_char * u, int nc, int langnum); + +// convert first nc characters of UTF-8 string to capital +LIBHUNSPELL_DLL_EXPORTED void mkallcap_utf(w_char * u, int nc, int langnum); + +// get type of capitalization +LIBHUNSPELL_DLL_EXPORTED int get_captype(char * q, int nl, cs_info *); + +// get type of capitalization (UTF-8) +LIBHUNSPELL_DLL_EXPORTED int get_captype_utf8(w_char * q, int nl, int langnum); + +// strip all ignored characters in the string +LIBHUNSPELL_DLL_EXPORTED void remove_ignored_chars_utf(char * word, unsigned short ignored_chars[], int ignored_len); + +// strip all ignored characters in the string +LIBHUNSPELL_DLL_EXPORTED void remove_ignored_chars(char * word, char * ignored_chars); + +LIBHUNSPELL_DLL_EXPORTED int parse_string(char * line, char ** out, int ln); + +LIBHUNSPELL_DLL_EXPORTED int parse_array(char * line, char ** out, unsigned short ** out_utf16, + int * out_utf16_len, int utf8, int ln); + +LIBHUNSPELL_DLL_EXPORTED int fieldlen(const char * r); +LIBHUNSPELL_DLL_EXPORTED char * copy_field(char * dest, const char * morph, const char * var); + +LIBHUNSPELL_DLL_EXPORTED int morphcmp(const char * s, const char * t); + +LIBHUNSPELL_DLL_EXPORTED int get_sfxcount(const char * morph); + +// conversion function for protected memory +LIBHUNSPELL_DLL_EXPORTED void store_pointer(char * dest, char * source); + +// conversion function for protected memory +LIBHUNSPELL_DLL_EXPORTED char * get_stored_pointer(const char * s); + +// hash entry macros +LIBHUNSPELL_DLL_EXPORTED inline char* HENTRY_DATA(struct hentry *h) +{ + char *ret; + if (!h->var) + ret = NULL; + else if (h->var & H_OPT_ALIASM) + ret = get_stored_pointer(HENTRY_WORD(h) + h->blen + 1); + else + ret = HENTRY_WORD(h) + h->blen + 1; + return ret; +} + +// NULL-free version for warning-free OOo build +LIBHUNSPELL_DLL_EXPORTED inline const char* HENTRY_DATA2(const struct hentry *h) +{ + const char *ret; + if (!h->var) + ret = ""; + else if (h->var & H_OPT_ALIASM) + ret = get_stored_pointer(HENTRY_WORD(h) + h->blen + 1); + else + ret = HENTRY_WORD(h) + h->blen + 1; + return ret; +} + +LIBHUNSPELL_DLL_EXPORTED inline char* HENTRY_FIND(struct hentry *h, const char *p) +{ + return (HENTRY_DATA(h) ? strstr(HENTRY_DATA(h), p) : NULL); +} + +#define w_char_eq(a,b) (((a).l == (b).l) && ((a).h == (b).h)) + +#endif diff --git a/plugins/SpellChecker/src/hunspell/dictmgr.cxx b/plugins/SpellChecker/src/hunspell/dictmgr.cxx new file mode 100644 index 0000000000..b4a15b1a5b --- /dev/null +++ b/plugins/SpellChecker/src/hunspell/dictmgr.cxx @@ -0,0 +1,180 @@ + +#include +#include +#include +#include + +#include "dictmgr.hxx" + +DictMgr::DictMgr(const char * dictpath, const char * etype) : numdict(0) +{ + // load list of etype entries + pdentry = (dictentry *)malloc(MAXDICTIONARIES*sizeof(struct dictentry)); + if (pdentry) { + if (parse_file(dictpath, etype)) { + numdict = 0; + // no dictionary.lst found is okay + } + } +} + + +DictMgr::~DictMgr() +{ + dictentry * pdict = NULL; + if (pdentry) { + pdict = pdentry; + for (int i=0;ilang) { + free(pdict->lang); + pdict->lang = NULL; + } + if (pdict->region) { + free(pdict->region); + pdict->region=NULL; + } + if (pdict->filename) { + free(pdict->filename); + pdict->filename = NULL; + } + pdict++; + } + free(pdentry); + pdentry = NULL; + pdict = NULL; + } + numdict = 0; +} + + +// read in list of etype entries and build up structure to describe them +int DictMgr::parse_file(const char * dictpath, const char * etype) +{ + + int i; + char line[MAXDICTENTRYLEN+1]; + dictentry * pdict = pdentry; + + // open the dictionary list file + FILE * dictlst; + dictlst = fopen(dictpath,"r"); + if (!dictlst) { + return 1; + } + + // step one is to parse the dictionary list building up the + // descriptive structures + + // read in each line ignoring any that dont start with etype + while (fgets(line,MAXDICTENTRYLEN,dictlst)) { + mychomp(line); + + /* parse in a dictionary entry */ + if (strncmp(line,etype,4) == 0) { + if (numdict < MAXDICTIONARIES) { + char * tp = line; + char * piece; + i = 0; + while ((piece=mystrsep(&tp,' '))) { + if (*piece != '\0') { + switch(i) { + case 0: break; + case 1: pdict->lang = mystrdup(piece); break; + case 2: if (strcmp (piece, "ANY") == 0) + pdict->region = mystrdup(""); + else + pdict->region = mystrdup(piece); + break; + case 3: pdict->filename = mystrdup(piece); break; + default: break; + } + i++; + } + free(piece); + } + if (i == 4) { + numdict++; + pdict++; + } else { + switch (i) { + case 3: + free(pdict->region); + pdict->region=NULL; + case 2: //deliberate fallthrough + free(pdict->lang); + pdict->lang=NULL; + default: + break; + } + fprintf(stderr,"dictionary list corruption in line \"%s\"\n",line); + fflush(stderr); + } + } + } + } + fclose(dictlst); + return 0; +} + +// return text encoding of dictionary +int DictMgr::get_list(dictentry ** ppentry) +{ + *ppentry = pdentry; + return numdict; +} + + + +// strip strings into token based on single char delimiter +// acts like strsep() but only uses a delim char and not +// a delim string + +char * DictMgr::mystrsep(char ** stringp, const char delim) +{ + char * rv = NULL; + char * mp = *stringp; + size_t n = strlen(mp); + if (n > 0) { + char * dp = (char *)memchr(mp,(int)((unsigned char)delim),n); + if (dp) { + *stringp = dp+1; + size_t nc = dp - mp; + rv = (char *) malloc(nc+1); + if (rv) { + memcpy(rv,mp,nc); + *(rv+nc) = '\0'; + } + } else { + rv = (char *) malloc(n+1); + if (rv) { + memcpy(rv, mp, n); + *(rv+n) = '\0'; + *stringp = mp + n; + } + } + } + return rv; +} + + +// replaces strdup with ansi version +char * DictMgr::mystrdup(const char * s) +{ + char * d = NULL; + if (s) { + int sl = strlen(s)+1; + d = (char *) malloc(sl); + if (d) memcpy(d,s,sl); + } + return d; +} + + +// remove cross-platform text line end characters +void DictMgr:: mychomp(char * s) +{ + int k = strlen(s); + if ((k > 0) && ((*(s+k-1)=='\r') || (*(s+k-1)=='\n'))) *(s+k-1) = '\0'; + if ((k > 1) && (*(s+k-2) == '\r')) *(s+k-2) = '\0'; +} + diff --git a/plugins/SpellChecker/src/hunspell/dictmgr.hxx b/plugins/SpellChecker/src/hunspell/dictmgr.hxx new file mode 100644 index 0000000000..bb197f84fb --- /dev/null +++ b/plugins/SpellChecker/src/hunspell/dictmgr.hxx @@ -0,0 +1,36 @@ +#ifndef _DICTMGR_HXX_ +#define _DICTMGR_HXX_ + +#include "hunvisapi.h" + +#define MAXDICTIONARIES 100 +#define MAXDICTENTRYLEN 1024 + +struct dictentry { + char * filename; + char * lang; + char * region; +}; + + +class LIBHUNSPELL_DLL_EXPORTED DictMgr +{ + + int numdict; + dictentry * pdentry; + +public: + + DictMgr(const char * dictpath, const char * etype); + ~DictMgr(); + int get_list(dictentry** ppentry); + +private: + int parse_file(const char * dictpath, const char * etype); + char * mystrsep(char ** stringp, const char delim); + char * mystrdup(const char * s); + void mychomp(char * s); + +}; + +#endif diff --git a/plugins/SpellChecker/src/hunspell/filemgr.cxx b/plugins/SpellChecker/src/hunspell/filemgr.cxx new file mode 100644 index 0000000000..5fb82bcf80 --- /dev/null +++ b/plugins/SpellChecker/src/hunspell/filemgr.cxx @@ -0,0 +1,49 @@ +#include "license.hunspell" +#include "license.myspell" + +#include +#include +#include + +#include "filemgr.hxx" + +int FileMgr::fail(const char * err, const char * par) { + fprintf(stderr, err, par); + return -1; +} + +FileMgr::FileMgr(const char * file, const char * key) { + linenum = 0; + hin = NULL; + fin = fopen(file, "r"); + if (!fin) { + // check hzipped file + char * st = (char *) malloc(strlen(file) + strlen(HZIP_EXTENSION) + 1); + if (st) { + strcpy(st, file); + strcat(st, HZIP_EXTENSION); + hin = new Hunzip(st, key); + free(st); + } + } + if (!fin && !hin) fail(MSG_OPEN, file); +} + +FileMgr::~FileMgr() +{ + if (fin) fclose(fin); + if (hin) delete hin; +} + +char * FileMgr::getline() { + const char * l; + linenum++; + if (fin) return fgets(in, BUFSIZE - 1, fin); + if (hin && (l = hin->getline())) return strcpy(in, l); + linenum--; + return NULL; +} + +int FileMgr::getlinenum() { + return linenum; +} diff --git a/plugins/SpellChecker/src/hunspell/filemgr.hxx b/plugins/SpellChecker/src/hunspell/filemgr.hxx new file mode 100644 index 0000000000..94cb7233d8 --- /dev/null +++ b/plugins/SpellChecker/src/hunspell/filemgr.hxx @@ -0,0 +1,25 @@ +/* file manager class - read lines of files [filename] OR [filename.hz] */ +#ifndef _FILEMGR_HXX_ +#define _FILEMGR_HXX_ + +#include "hunvisapi.h" + +#include "hunzip.hxx" +#include + +class LIBHUNSPELL_DLL_EXPORTED FileMgr +{ +protected: + FILE * fin; + Hunzip * hin; + char in[BUFSIZE + 50]; // input buffer + int fail(const char * err, const char * par); + int linenum; + +public: + FileMgr(const char * filename, const char * key = NULL); + ~FileMgr(); + char * getline(); + int getlinenum(); +}; +#endif diff --git a/plugins/SpellChecker/src/hunspell/hashmgr.cxx b/plugins/SpellChecker/src/hunspell/hashmgr.cxx new file mode 100644 index 0000000000..ea93b8787c --- /dev/null +++ b/plugins/SpellChecker/src/hunspell/hashmgr.cxx @@ -0,0 +1,928 @@ +#include "license.hunspell" +#include "license.myspell" + +#include +#include +#include +#include + +#include "hashmgr.hxx" +#include "csutil.hxx" +#include "atypes.hxx" + +// build a hash table from a munched word list + +HashMgr::HashMgr(const char * tpath, const char * apath, const char * key) +{ + tablesize = 0; + tableptr = NULL; + flag_mode = FLAG_CHAR; + complexprefixes = 0; + utf8 = 0; + langnum = 0; + lang = NULL; + enc = NULL; + csconv = 0; + ignorechars = NULL; + ignorechars_utf16 = NULL; + ignorechars_utf16_len = 0; + numaliasf = 0; + aliasf = NULL; + numaliasm = 0; + aliasm = NULL; + forbiddenword = FORBIDDENWORD; // forbidden word signing flag + load_config(apath, key); + int ec = load_tables(tpath, key); + if (ec) { + /* error condition - what should we do here */ + HUNSPELL_WARNING(stderr, "Hash Manager Error : %d\n",ec); + if (tableptr) { + free(tableptr); + tableptr = NULL; + } + tablesize = 0; + } +} + + +HashMgr::~HashMgr() +{ + if (tableptr) { + // now pass through hash table freeing up everything + // go through column by column of the table + for (int i=0; i < tablesize; i++) { + struct hentry * pt = tableptr[i]; + struct hentry * nt = NULL; + while(pt) { + nt = pt->next; + if (pt->astr && (!aliasf || TESTAFF(pt->astr, ONLYUPCASEFLAG, pt->alen))) free(pt->astr); + free(pt); + pt = nt; + } + } + free(tableptr); + } + tablesize = 0; + + if (aliasf) { + for (int j = 0; j < (numaliasf); j++) free(aliasf[j]); + free(aliasf); + aliasf = NULL; + if (aliasflen) { + free(aliasflen); + aliasflen = NULL; + } + } + if (aliasm) { + for (int j = 0; j < (numaliasm); j++) free(aliasm[j]); + free(aliasm); + aliasm = NULL; + } + +#ifndef OPENOFFICEORG +#ifndef MOZILLA_CLIENT + if (utf8) free_utf_tbl(); +#endif +#endif + + if (enc) free(enc); + if (lang) free(lang); + + if (ignorechars) free(ignorechars); + if (ignorechars_utf16) free(ignorechars_utf16); + +#ifdef MOZILLA_CLIENT + delete [] csconv; +#endif +} + +// lookup a root word in the hashtable + +struct hentry * HashMgr::lookup(const char *word) const +{ + struct hentry * dp; + if (tableptr) { + dp = tableptr[hash(word)]; + if (!dp) return NULL; + for ( ; dp != NULL; dp = dp->next) { + if (strcmp(word, dp->word) == 0) return dp; + } + } + return NULL; +} + +// add a word to the hash table (private) +int HashMgr::add_word(const char * word, int wbl, int wcl, unsigned short * aff, + int al, const char * desc, bool onlyupcase) +{ + bool upcasehomonym = false; + int descl = desc ? (aliasm ? sizeof(short) : strlen(desc) + 1) : 0; + // variable-length hash record with word and optional fields + struct hentry* hp = + (struct hentry *) malloc (sizeof(struct hentry) + wbl + descl); + if (!hp) return 1; + char * hpw = hp->word; + strcpy(hpw, word); + if (ignorechars != NULL) { + if (utf8) { + remove_ignored_chars_utf(hpw, ignorechars_utf16, ignorechars_utf16_len); + } else { + remove_ignored_chars(hpw, ignorechars); + } + } + if (complexprefixes) { + if (utf8) reverseword_utf(hpw); else reverseword(hpw); + } + + int i = hash(hpw); + + hp->blen = (unsigned char) wbl; + hp->clen = (unsigned char) wcl; + hp->alen = (short) al; + hp->astr = aff; + hp->next = NULL; + hp->next_homonym = NULL; + + // store the description string or its pointer + if (desc) { + hp->var = H_OPT; + if (aliasm) { + hp->var += H_OPT_ALIASM; + store_pointer(hpw + wbl + 1, get_aliasm(atoi(desc))); + } else { + strcpy(hpw + wbl + 1, desc); + if (complexprefixes) { + if (utf8) reverseword_utf(HENTRY_DATA(hp)); + else reverseword(HENTRY_DATA(hp)); + } + } + if (strstr(HENTRY_DATA(hp), MORPH_PHON)) hp->var += H_OPT_PHON; + } else hp->var = 0; + + struct hentry * dp = tableptr[i]; + if (!dp) { + tableptr[i] = hp; + return 0; + } + while (dp->next != NULL) { + if ((!dp->next_homonym) && (strcmp(hp->word, dp->word) == 0)) { + // remove hidden onlyupcase homonym + if (!onlyupcase) { + if ((dp->astr) && TESTAFF(dp->astr, ONLYUPCASEFLAG, dp->alen)) { + free(dp->astr); + dp->astr = hp->astr; + dp->alen = hp->alen; + free(hp); + return 0; + } else { + dp->next_homonym = hp; + } + } else { + upcasehomonym = true; + } + } + dp=dp->next; + } + if (strcmp(hp->word, dp->word) == 0) { + // remove hidden onlyupcase homonym + if (!onlyupcase) { + if ((dp->astr) && TESTAFF(dp->astr, ONLYUPCASEFLAG, dp->alen)) { + free(dp->astr); + dp->astr = hp->astr; + dp->alen = hp->alen; + free(hp); + return 0; + } else { + dp->next_homonym = hp; + } + } else { + upcasehomonym = true; + } + } + if (!upcasehomonym) { + dp->next = hp; + } else { + // remove hidden onlyupcase homonym + if (hp->astr) free(hp->astr); + free(hp); + } + return 0; +} + +int HashMgr::add_hidden_capitalized_word(char * word, int wbl, int wcl, + unsigned short * flags, int al, char * dp, int captype) +{ + // add inner capitalized forms to handle the following allcap forms: + // Mixed caps: OpenOffice.org -> OPENOFFICE.ORG + // Allcaps with suffixes: CIA's -> CIA'S + if (((captype == HUHCAP) || (captype == HUHINITCAP) || + ((captype == ALLCAP) && (flags != NULL))) && + !((flags != NULL) && TESTAFF(flags, forbiddenword, al))) { + unsigned short * flags2 = (unsigned short *) malloc (sizeof(unsigned short) * (al+1)); + if (!flags2) return 1; + if (al) memcpy(flags2, flags, al * sizeof(unsigned short)); + flags2[al] = ONLYUPCASEFLAG; + if (utf8) { + char st[BUFSIZE]; + w_char w[BUFSIZE]; + int wlen = u8_u16(w, BUFSIZE, word); + mkallsmall_utf(w, wlen, langnum); + mkallcap_utf(w, 1, langnum); + u16_u8(st, BUFSIZE, w, wlen); + return add_word(st,wbl,wcl,flags2,al+1,dp, true); + } else { + mkallsmall(word, csconv); + mkinitcap(word, csconv); + return add_word(word,wbl,wcl,flags2,al+1,dp, true); + } + } + return 0; +} + +// detect captype and modify word length for UTF-8 encoding +int HashMgr::get_clen_and_captype(const char * word, int wbl, int * captype) { + int len; + if (utf8) { + w_char dest_utf[BUFSIZE]; + len = u8_u16(dest_utf, BUFSIZE, word); + *captype = get_captype_utf8(dest_utf, len, langnum); + } else { + len = wbl; + *captype = get_captype((char *) word, len, csconv); + } + return len; +} + +// remove word (personal dictionary function for standalone applications) +int HashMgr::remove(const char * word) +{ + struct hentry * dp = lookup(word); + while (dp) { + if (dp->alen == 0 || !TESTAFF(dp->astr, forbiddenword, dp->alen)) { + unsigned short * flags = + (unsigned short *) malloc(sizeof(short) * (dp->alen + 1)); + if (!flags) return 1; + for (int i = 0; i < dp->alen; i++) flags[i] = dp->astr[i]; + flags[dp->alen] = forbiddenword; + dp->astr = flags; + dp->alen++; + flag_qsort(flags, 0, dp->alen); + } + dp = dp->next_homonym; + } + return 0; +} + +/* remove forbidden flag to add a personal word to the hash */ +int HashMgr::remove_forbidden_flag(const char * word) { + struct hentry * dp = lookup(word); + if (!dp) return 1; + while (dp) { + if (dp->astr && TESTAFF(dp->astr, forbiddenword, dp->alen)) { + if (dp->alen == 1) dp->alen = 0; // XXX forbidden words of personal dic. + else { + unsigned short * flags2 = + (unsigned short *) malloc(sizeof(short) * (dp->alen - 1)); + if (!flags2) return 1; + int i, j = 0; + for (i = 0; i < dp->alen; i++) { + if (dp->astr[i] != forbiddenword) flags2[j++] = dp->astr[i]; + } + dp->alen--; + dp->astr = flags2; // XXX allowed forbidden words + } + } + dp = dp->next_homonym; + } + return 0; +} + +// add a custom dic. word to the hash table (public) +int HashMgr::add(const char * word) +{ + unsigned short * flags = NULL; + int al = 0; + if (remove_forbidden_flag(word)) { + int captype; + int wbl = strlen(word); + int wcl = get_clen_and_captype(word, wbl, &captype); + add_word(word, wbl, wcl, flags, al, NULL, false); + return add_hidden_capitalized_word((char *) word, wbl, wcl, flags, al, NULL, captype); + } + return 0; +} + +int HashMgr::add_with_affix(const char * word, const char * example) +{ + // detect captype and modify word length for UTF-8 encoding + struct hentry * dp = lookup(example); + remove_forbidden_flag(word); + if (dp && dp->astr) { + int captype; + int wbl = strlen(word); + int wcl = get_clen_and_captype(word, wbl, &captype); + if (aliasf) { + add_word(word, wbl, wcl, dp->astr, dp->alen, NULL, false); + } else { + unsigned short * flags = (unsigned short *) malloc (dp->alen * sizeof(short)); + if (flags) { + memcpy((void *) flags, (void *) dp->astr, dp->alen * sizeof(short)); + add_word(word, wbl, wcl, flags, dp->alen, NULL, false); + } else return 1; + } + return add_hidden_capitalized_word((char *) word, wbl, wcl, dp->astr, dp->alen, NULL, captype); + } + return 1; +} + +// walk the hash table entry by entry - null at end +// initialize: col=-1; hp = NULL; hp = walk_hashtable(&col, hp); +struct hentry * HashMgr::walk_hashtable(int &col, struct hentry * hp) const +{ + if (hp && hp->next != NULL) return hp->next; + for (col++; col < tablesize; col++) { + if (tableptr[col]) return tableptr[col]; + } + // null at end and reset to start + col = -1; + return NULL; +} + +// load a munched word list and build a hash table on the fly +int HashMgr::load_tables(const char * tpath, const char * key) +{ + int al; + char * ap; + char * dp; + char * dp2; + unsigned short * flags; + char * ts; + + // open dictionary file + FileMgr * dict = new FileMgr(tpath, key); + if (dict == NULL) return 1; + + // first read the first line of file to get hash table size */ + if (!(ts = dict->getline())) { + HUNSPELL_WARNING(stderr, "error: empty dic file\n"); + delete dict; + return 2; + } + mychomp(ts); + + /* remove byte order mark */ + if (strncmp(ts,"\xEF\xBB\xBF",3) == 0) { + memmove(ts, ts+3, strlen(ts+3)+1); + // warning: dic file begins with byte order mark: possible incompatibility with old Hunspell versions + } + + tablesize = atoi(ts); + if (tablesize == 0) { + HUNSPELL_WARNING(stderr, "error: line 1: missing or bad word count in the dic file\n"); + delete dict; + return 4; + } + tablesize = tablesize + 5 + USERWORD; + if ((tablesize %2) == 0) tablesize++; + + // allocate the hash table + tableptr = (struct hentry **) malloc(tablesize * sizeof(struct hentry *)); + if (! tableptr) { + delete dict; + return 3; + } + for (int i=0; igetline())) { + mychomp(ts); + // split each line into word and morphological description + dp = ts; + while ((dp = strchr(dp, ':'))) { + if ((dp > ts + 3) && (*(dp - 3) == ' ' || *(dp - 3) == '\t')) { + for (dp -= 4; dp >= ts && (*dp == ' ' || *dp == '\t'); dp--); + if (dp < ts) { // missing word + dp = NULL; + } else { + *(dp + 1) = '\0'; + dp = dp + 2; + } + break; + } + dp++; + } + + // tabulator is the old morphological field separator + dp2 = strchr(ts, '\t'); + if (dp2 && (!dp || dp2 < dp)) { + *dp2 = '\0'; + dp = dp2 + 1; + } + + // split each line into word and affix char strings + // "\/" signs slash in words (not affix separator) + // "/" at beginning of the line is word character (not affix separator) + ap = strchr(ts,'/'); + while (ap) { + if (ap == ts) { + ap++; + continue; + } else if (*(ap - 1) != '\\') break; + // replace "\/" with "/" + for (char * sp = ap - 1; *sp; *sp = *(sp + 1), sp++); + ap = strchr(ap,'/'); + } + + if (ap) { + *ap = '\0'; + if (aliasf) { + int index = atoi(ap + 1); + al = get_aliasf(index, &flags, dict); + if (!al) { + HUNSPELL_WARNING(stderr, "error: line %d: bad flag vector alias\n", dict->getlinenum()); + *ap = '\0'; + } + } else { + al = decode_flags(&flags, ap + 1, dict); + if (al == -1) { + HUNSPELL_WARNING(stderr, "Can't allocate memory.\n"); + delete dict; + return 6; + } + flag_qsort(flags, 0, al); + } + } else { + al = 0; + ap = NULL; + flags = NULL; + } + + int captype; + int wbl = strlen(ts); + int wcl = get_clen_and_captype(ts, wbl, &captype); + // add the word and its index plus its capitalized form optionally + if (add_word(ts,wbl,wcl,flags,al,dp, false) || + add_hidden_capitalized_word(ts, wbl, wcl, flags, al, dp, captype)) { + delete dict; + return 5; + } + } + + delete dict; + return 0; +} + +// the hash function is a simple load and rotate +// algorithm borrowed + +int HashMgr::hash(const char * word) const +{ + long hv = 0; + for (int i=0; i < 4 && *word != 0; i++) + hv = (hv << 8) | (*word++); + while (*word != 0) { + ROTATE(hv,ROTATE_LEN); + hv ^= (*word++); + } + return (unsigned long) hv % tablesize; +} + +int HashMgr::decode_flags(unsigned short ** result, char * flags, FileMgr * af) { + int len; + if (*flags == '\0') { + *result = NULL; + return 0; + } + switch (flag_mode) { + case FLAG_LONG: { // two-character flags (1x2yZz -> 1x 2y Zz) + len = strlen(flags); + if (len%2 == 1) HUNSPELL_WARNING(stderr, "error: line %d: bad flagvector\n", af->getlinenum()); + len /= 2; + *result = (unsigned short *) malloc(len * sizeof(short)); + if (!*result) return -1; + for (int i = 0; i < len; i++) { + (*result)[i] = (((unsigned short) flags[i * 2]) << 8) + (unsigned short) flags[i * 2 + 1]; + } + break; + } + case FLAG_NUM: { // decimal numbers separated by comma (4521,23,233 -> 4521 23 233) + int i; + len = 1; + char * src = flags; + unsigned short * dest; + char * p; + for (p = flags; *p; p++) { + if (*p == ',') len++; + } + *result = (unsigned short *) malloc(len * sizeof(short)); + if (!*result) return -1; + dest = *result; + for (p = flags; *p; p++) { + if (*p == ',') { + i = atoi(src); + if (i >= DEFAULTFLAGS) HUNSPELL_WARNING(stderr, "error: line %d: flag id %d is too large (max: %d)\n", + af->getlinenum(), i, DEFAULTFLAGS - 1); + *dest = (unsigned short) i; + if (*dest == 0) HUNSPELL_WARNING(stderr, "error: line %d: 0 is wrong flag id\n", af->getlinenum()); + src = p + 1; + dest++; + } + } + i = atoi(src); + if (i >= DEFAULTFLAGS) HUNSPELL_WARNING(stderr, "error: line %d: flag id %d is too large (max: %d)\n", + af->getlinenum(), i, DEFAULTFLAGS - 1); + *dest = (unsigned short) i; + if (*dest == 0) HUNSPELL_WARNING(stderr, "error: line %d: 0 is wrong flag id\n", af->getlinenum()); + break; + } + case FLAG_UNI: { // UTF-8 characters + w_char w[BUFSIZE/2]; + len = u8_u16(w, BUFSIZE/2, flags); + *result = (unsigned short *) malloc(len * sizeof(short)); + if (!*result) return -1; + memcpy(*result, w, len * sizeof(short)); + break; + } + default: { // Ispell's one-character flags (erfg -> e r f g) + unsigned short * dest; + len = strlen(flags); + *result = (unsigned short *) malloc(len * sizeof(short)); + if (!*result) return -1; + dest = *result; + for (unsigned char * p = (unsigned char *) flags; *p; p++) { + *dest = (unsigned short) *p; + dest++; + } + } + } + return len; +} + +unsigned short HashMgr::decode_flag(const char * f) { + unsigned short s = 0; + int i; + switch (flag_mode) { + case FLAG_LONG: + s = ((unsigned short) f[0] << 8) + (unsigned short) f[1]; + break; + case FLAG_NUM: + i = atoi(f); + if (i >= DEFAULTFLAGS) HUNSPELL_WARNING(stderr, "error: flag id %d is too large (max: %d)\n", i, DEFAULTFLAGS - 1); + s = (unsigned short) i; + break; + case FLAG_UNI: + u8_u16((w_char *) &s, 1, f); + break; + default: + s = (unsigned short) *((unsigned char *)f); + } + if (s == 0) HUNSPELL_WARNING(stderr, "error: 0 is wrong flag id\n"); + return s; +} + +char * HashMgr::encode_flag(unsigned short f) { + unsigned char ch[10]; + if (f==0) return mystrdup("(NULL)"); + if (flag_mode == FLAG_LONG) { + ch[0] = (unsigned char) (f >> 8); + ch[1] = (unsigned char) (f - ((f >> 8) << 8)); + ch[2] = '\0'; + } else if (flag_mode == FLAG_NUM) { + sprintf((char *) ch, "%d", f); + } else if (flag_mode == FLAG_UNI) { + u16_u8((char *) &ch, 10, (w_char *) &f, 1); + } else { + ch[0] = (unsigned char) (f); + ch[1] = '\0'; + } + return mystrdup((char *) ch); +} + +// read in aff file and set flag mode +int HashMgr::load_config(const char * affpath, const char * key) +{ + char * line; // io buffers + int firstline = 1; + + // open the affix file + FileMgr * afflst = new FileMgr(affpath, key); + if (!afflst) { + HUNSPELL_WARNING(stderr, "Error - could not open affix description file %s\n",affpath); + return 1; + } + + // read in each line ignoring any that do not + // start with a known line type indicator + + while ((line = afflst->getline())) { + mychomp(line); + + /* remove byte order mark */ + if (firstline) { + firstline = 0; + if (strncmp(line,"\xEF\xBB\xBF",3) == 0) memmove(line, line+3, strlen(line+3)+1); + } + + /* parse in the try string */ + if ((strncmp(line,"FLAG",4) == 0) && isspace(line[4])) { + if (flag_mode != FLAG_CHAR) { + HUNSPELL_WARNING(stderr, "error: line %d: multiple definitions of the FLAG affix file parameter\n", afflst->getlinenum()); + } + if (strstr(line, "long")) flag_mode = FLAG_LONG; + if (strstr(line, "num")) flag_mode = FLAG_NUM; + if (strstr(line, "UTF-8")) flag_mode = FLAG_UNI; + if (flag_mode == FLAG_CHAR) { + HUNSPELL_WARNING(stderr, "error: line %d: FLAG needs `num', `long' or `UTF-8' parameter\n", afflst->getlinenum()); + } + } + if (strncmp(line,"FORBIDDENWORD",13) == 0) { + char * st = NULL; + if (parse_string(line, &st, afflst->getlinenum())) { + delete afflst; + return 1; + } + forbiddenword = decode_flag(st); + free(st); + } + if (strncmp(line, "SET", 3) == 0) { + if (parse_string(line, &enc, afflst->getlinenum())) { + delete afflst; + return 1; + } + if (strcmp(enc, "UTF-8") == 0) { + utf8 = 1; +#ifndef OPENOFFICEORG +#ifndef MOZILLA_CLIENT + initialize_utf_tbl(); +#endif +#endif + } else csconv = get_current_cs(enc); + } + if (strncmp(line, "LANG", 4) == 0) { + if (parse_string(line, &lang, afflst->getlinenum())) { + delete afflst; + return 1; + } + langnum = get_lang_num(lang); + } + + /* parse in the ignored characters (for example, Arabic optional diacritics characters */ + if (strncmp(line,"IGNORE",6) == 0) { + if (parse_array(line, &ignorechars, &ignorechars_utf16, + &ignorechars_utf16_len, utf8, afflst->getlinenum())) { + delete afflst; + return 1; + } + } + + if ((strncmp(line,"AF",2) == 0) && isspace(line[2])) { + if (parse_aliasf(line, afflst)) { + delete afflst; + return 1; + } + } + + if ((strncmp(line,"AM",2) == 0) && isspace(line[2])) { + if (parse_aliasm(line, afflst)) { + delete afflst; + return 1; + } + } + + if (strncmp(line,"COMPLEXPREFIXES",15) == 0) complexprefixes = 1; + if (((strncmp(line,"SFX",3) == 0) || (strncmp(line,"PFX",3) == 0)) && isspace(line[3])) break; + } + if (csconv == NULL) csconv = get_current_cs(SPELL_ENCODING); + delete afflst; + return 0; +} + +/* parse in the ALIAS table */ +int HashMgr::parse_aliasf(char * line, FileMgr * af) +{ + if (numaliasf != 0) { + HUNSPELL_WARNING(stderr, "error: line %d: multiple table definitions\n", af->getlinenum()); + return 1; + } + char * tp = line; + char * piece; + int i = 0; + int np = 0; + piece = mystrsep(&tp, 0); + while (piece) { + if (*piece != '\0') { + switch(i) { + case 0: { np++; break; } + case 1: { + numaliasf = atoi(piece); + if (numaliasf < 1) { + numaliasf = 0; + aliasf = NULL; + aliasflen = NULL; + HUNSPELL_WARNING(stderr, "error: line %d: bad entry number\n", af->getlinenum()); + return 1; + } + aliasf = (unsigned short **) malloc(numaliasf * sizeof(unsigned short *)); + aliasflen = (unsigned short *) malloc(numaliasf * sizeof(short)); + if (!aliasf || !aliasflen) { + numaliasf = 0; + if (aliasf) free(aliasf); + if (aliasflen) free(aliasflen); + aliasf = NULL; + aliasflen = NULL; + return 1; + } + np++; + break; + } + default: break; + } + i++; + } + piece = mystrsep(&tp, 0); + } + if (np != 2) { + numaliasf = 0; + free(aliasf); + free(aliasflen); + aliasf = NULL; + aliasflen = NULL; + HUNSPELL_WARNING(stderr, "error: line %d: missing data\n", af->getlinenum()); + return 1; + } + + /* now parse the numaliasf lines to read in the remainder of the table */ + char * nl; + for (int j=0; j < numaliasf; j++) { + if (!(nl = af->getline())) return 1; + mychomp(nl); + tp = nl; + i = 0; + aliasf[j] = NULL; + aliasflen[j] = 0; + piece = mystrsep(&tp, 0); + while (piece) { + if (*piece != '\0') { + switch(i) { + case 0: { + if (strncmp(piece,"AF",2) != 0) { + numaliasf = 0; + free(aliasf); + free(aliasflen); + aliasf = NULL; + aliasflen = NULL; + HUNSPELL_WARNING(stderr, "error: line %d: table is corrupt\n", af->getlinenum()); + return 1; + } + break; + } + case 1: { + aliasflen[j] = (unsigned short) decode_flags(&(aliasf[j]), piece, af); + flag_qsort(aliasf[j], 0, aliasflen[j]); + break; + } + default: break; + } + i++; + } + piece = mystrsep(&tp, 0); + } + if (!aliasf[j]) { + free(aliasf); + free(aliasflen); + aliasf = NULL; + aliasflen = NULL; + numaliasf = 0; + HUNSPELL_WARNING(stderr, "error: line %d: table is corrupt\n", af->getlinenum()); + return 1; + } + } + return 0; +} + +int HashMgr::is_aliasf() { + return (aliasf != NULL); +} + +int HashMgr::get_aliasf(int index, unsigned short ** fvec, FileMgr * af) { + if ((index > 0) && (index <= numaliasf)) { + *fvec = aliasf[index - 1]; + return aliasflen[index - 1]; + } + HUNSPELL_WARNING(stderr, "error: line %d: bad flag alias index: %d\n", af->getlinenum(), index); + *fvec = NULL; + return 0; +} + +/* parse morph alias definitions */ +int HashMgr::parse_aliasm(char * line, FileMgr * af) +{ + if (numaliasm != 0) { + HUNSPELL_WARNING(stderr, "error: line %d: multiple table definitions\n", af->getlinenum()); + return 1; + } + char * tp = line; + char * piece; + int i = 0; + int np = 0; + piece = mystrsep(&tp, 0); + while (piece) { + if (*piece != '\0') { + switch(i) { + case 0: { np++; break; } + case 1: { + numaliasm = atoi(piece); + if (numaliasm < 1) { + HUNSPELL_WARNING(stderr, "error: line %d: bad entry number\n", af->getlinenum()); + return 1; + } + aliasm = (char **) malloc(numaliasm * sizeof(char *)); + if (!aliasm) { + numaliasm = 0; + return 1; + } + np++; + break; + } + default: break; + } + i++; + } + piece = mystrsep(&tp, 0); + } + if (np != 2) { + numaliasm = 0; + free(aliasm); + aliasm = NULL; + HUNSPELL_WARNING(stderr, "error: line %d: missing data\n", af->getlinenum()); + return 1; + } + + /* now parse the numaliasm lines to read in the remainder of the table */ + char * nl = line; + for (int j=0; j < numaliasm; j++) { + if (!(nl = af->getline())) return 1; + mychomp(nl); + tp = nl; + i = 0; + aliasm[j] = NULL; + piece = mystrsep(&tp, ' '); + while (piece) { + if (*piece != '\0') { + switch(i) { + case 0: { + if (strncmp(piece,"AM",2) != 0) { + HUNSPELL_WARNING(stderr, "error: line %d: table is corrupt\n", af->getlinenum()); + numaliasm = 0; + free(aliasm); + aliasm = NULL; + return 1; + } + break; + } + case 1: { + // add the remaining of the line + if (*tp) { + *(tp - 1) = ' '; + tp = tp + strlen(tp); + } + if (complexprefixes) { + if (utf8) reverseword_utf(piece); + else reverseword(piece); + } + aliasm[j] = mystrdup(piece); + if (!aliasm[j]) { + numaliasm = 0; + free(aliasm); + aliasm = NULL; + return 1; + } + break; } + default: break; + } + i++; + } + piece = mystrsep(&tp, ' '); + } + if (!aliasm[j]) { + numaliasm = 0; + free(aliasm); + aliasm = NULL; + HUNSPELL_WARNING(stderr, "error: line %d: table is corrupt\n", af->getlinenum()); + return 1; + } + } + return 0; +} + +int HashMgr::is_aliasm() { + return (aliasm != NULL); +} + +char * HashMgr::get_aliasm(int index) { + if ((index > 0) && (index <= numaliasm)) return aliasm[index - 1]; + HUNSPELL_WARNING(stderr, "error: bad morph. alias index: %d\n", index); + return NULL; +} diff --git a/plugins/SpellChecker/src/hunspell/hashmgr.hxx b/plugins/SpellChecker/src/hunspell/hashmgr.hxx new file mode 100644 index 0000000000..341b08131c --- /dev/null +++ b/plugins/SpellChecker/src/hunspell/hashmgr.hxx @@ -0,0 +1,69 @@ +#ifndef _HASHMGR_HXX_ +#define _HASHMGR_HXX_ + +#include "hunvisapi.h" + +#include + +#include "htypes.hxx" +#include "filemgr.hxx" + +enum flag { FLAG_CHAR, FLAG_LONG, FLAG_NUM, FLAG_UNI }; + +class LIBHUNSPELL_DLL_EXPORTED HashMgr +{ + int tablesize; + struct hentry ** tableptr; + int userword; + flag flag_mode; + int complexprefixes; + int utf8; + unsigned short forbiddenword; + int langnum; + char * enc; + char * lang; + struct cs_info * csconv; + char * ignorechars; + unsigned short * ignorechars_utf16; + int ignorechars_utf16_len; + int numaliasf; // flag vector `compression' with aliases + unsigned short ** aliasf; + unsigned short * aliasflen; + int numaliasm; // morphological desciption `compression' with aliases + char ** aliasm; + + +public: + HashMgr(const char * tpath, const char * apath, const char * key = NULL); + ~HashMgr(); + + struct hentry * lookup(const char *) const; + int hash(const char *) const; + struct hentry * walk_hashtable(int & col, struct hentry * hp) const; + + int add(const char * word); + int add_with_affix(const char * word, const char * pattern); + int remove(const char * word); + int decode_flags(unsigned short ** result, char * flags, FileMgr * af); + unsigned short decode_flag(const char * flag); + char * encode_flag(unsigned short flag); + int is_aliasf(); + int get_aliasf(int index, unsigned short ** fvec, FileMgr * af); + int is_aliasm(); + char * get_aliasm(int index); + +private: + int get_clen_and_captype(const char * word, int wbl, int * captype); + int load_tables(const char * tpath, const char * key); + int add_word(const char * word, int wbl, int wcl, unsigned short * ap, + int al, const char * desc, bool onlyupcase); + int load_config(const char * affpath, const char * key); + int parse_aliasf(char * line, FileMgr * af); + int add_hidden_capitalized_word(char * word, int wbl, int wcl, + unsigned short * flags, int al, char * dp, int captype); + int parse_aliasm(char * line, FileMgr * af); + int remove_forbidden_flag(const char * word); + +}; + +#endif diff --git a/plugins/SpellChecker/src/hunspell/htypes.hxx b/plugins/SpellChecker/src/hunspell/htypes.hxx new file mode 100644 index 0000000000..5b6c90966b --- /dev/null +++ b/plugins/SpellChecker/src/hunspell/htypes.hxx @@ -0,0 +1,32 @@ +#ifndef _HTYPES_HXX_ +#define _HTYPES_HXX_ + +#define ROTATE_LEN 5 + +#define ROTATE(v,q) \ + (v) = ((v) << (q)) | (((v) >> (32 - q)) & ((1 << (q))-1)); + +// hentry options +#define H_OPT (1 << 0) +#define H_OPT_ALIASM (1 << 1) +#define H_OPT_PHON (1 << 2) + +// see also csutil.hxx +#define HENTRY_WORD(h) &(h->word[0]) + +// approx. number of user defined words +#define USERWORD 1000 + +struct hentry +{ + unsigned char blen; // word length in bytes + unsigned char clen; // word length in characters (different for UTF-8 enc.) + short alen; // length of affix flag vector + unsigned short * astr; // affix flag vector + struct hentry * next; // next word with same hash code + struct hentry * next_homonym; // next homonym word (with same hash code) + char var; // variable fields (only for special pronounciation yet) + char word[1]; // variable-length word (8-bit or UTF-8 encoding) +}; + +#endif diff --git a/plugins/SpellChecker/src/hunspell/hunspell.cxx b/plugins/SpellChecker/src/hunspell/hunspell.cxx new file mode 100644 index 0000000000..8e00e1b8cc --- /dev/null +++ b/plugins/SpellChecker/src/hunspell/hunspell.cxx @@ -0,0 +1,2011 @@ +#include "license.hunspell" +#include "license.myspell" + +#include +#include +#include + +#include "hunspell.hxx" +#include "hunspell.h" +#ifndef MOZILLA_CLIENT +# include "config.h" +#endif +#include "csutil.hxx" + +Hunspell::Hunspell(const char * affpath, const char * dpath, const char * key) +{ + encoding = NULL; + csconv = NULL; + utf8 = 0; + complexprefixes = 0; + affixpath = mystrdup(affpath); + maxdic = 0; + + /* first set up the hash manager */ + pHMgr[0] = new HashMgr(dpath, affpath, key); + if (pHMgr[0]) maxdic = 1; + + /* next set up the affix manager */ + /* it needs access to the hash manager lookup methods */ + pAMgr = new AffixMgr(affpath, pHMgr, &maxdic, key); + + /* get the preferred try string and the dictionary */ + /* encoding from the Affix Manager for that dictionary */ + char * try_string = pAMgr->get_try_string(); + encoding = pAMgr->get_encoding(); + langnum = pAMgr->get_langnum(); + utf8 = pAMgr->get_utf8(); + if (!utf8) + csconv = get_current_cs(encoding); + complexprefixes = pAMgr->get_complexprefixes(); + wordbreak = pAMgr->get_breaktable(); + + /* and finally set up the suggestion manager */ + pSMgr = new SuggestMgr(try_string, MAXSUGGESTION, pAMgr); + if (try_string) free(try_string); +} + +Hunspell::~Hunspell() +{ + if (pSMgr) delete pSMgr; + if (pAMgr) delete pAMgr; + for (int i = 0; i < maxdic; i++) delete pHMgr[i]; + maxdic = 0; + pSMgr = NULL; + pAMgr = NULL; +#ifdef MOZILLA_CLIENT + delete [] csconv; +#endif + csconv= NULL; + if (encoding) free(encoding); + encoding = NULL; + if (affixpath) free(affixpath); + affixpath = NULL; +} + +// load extra dictionaries +int Hunspell::add_dic(const char * dpath, const char * key) { + if (maxdic == MAXDIC || !affixpath) return 1; + pHMgr[maxdic] = new HashMgr(dpath, affixpath, key); + if (pHMgr[maxdic]) maxdic++; else return 1; + return 0; +} + +// make a copy of src at destination while removing all leading +// blanks and removing any trailing periods after recording +// their presence with the abbreviation flag +// also since already going through character by character, +// set the capitalization type +// return the length of the "cleaned" (and UTF-8 encoded) word + +int Hunspell::cleanword2(char * dest, const char * src, + w_char * dest_utf, int * nc, int * pcaptype, int * pabbrev) +{ + unsigned char * p = (unsigned char *) dest; + const unsigned char * q = (const unsigned char * ) src; + + // first skip over any leading blanks + while ((*q != '\0') && (*q == ' ')) q++; + + // now strip off any trailing periods (recording their presence) + *pabbrev = 0; + int nl = strlen((const char *)q); + while ((nl > 0) && (*(q+nl-1)=='.')) { + nl--; + (*pabbrev)++; + } + + // if no characters are left it can't be capitalized + if (nl <= 0) { + *pcaptype = NOCAP; + *p = '\0'; + return 0; + } + + strncpy(dest, (char *) q, nl); + *(dest + nl) = '\0'; + nl = strlen(dest); + if (utf8) { + *nc = u8_u16(dest_utf, MAXWORDLEN, dest); + // don't check too long words + if (*nc >= MAXWORDLEN) return 0; + if (*nc == -1) { // big Unicode character (non BMP area) + *pcaptype = NOCAP; + return nl; + } + *pcaptype = get_captype_utf8(dest_utf, *nc, langnum); + } else { + *pcaptype = get_captype(dest, nl, csconv); + *nc = nl; + } + return nl; +} + +int Hunspell::cleanword(char * dest, const char * src, + int * pcaptype, int * pabbrev) +{ + unsigned char * p = (unsigned char *) dest; + const unsigned char * q = (const unsigned char * ) src; + int firstcap = 0; + + // first skip over any leading blanks + while ((*q != '\0') && (*q == ' ')) q++; + + // now strip off any trailing periods (recording their presence) + *pabbrev = 0; + int nl = strlen((const char *)q); + while ((nl > 0) && (*(q+nl-1)=='.')) { + nl--; + (*pabbrev)++; + } + + // if no characters are left it can't be capitalized + if (nl <= 0) { + *pcaptype = NOCAP; + *p = '\0'; + return 0; + } + + // now determine the capitalization type of the first nl letters + int ncap = 0; + int nneutral = 0; + int nc = 0; + + if (!utf8) { + while (nl > 0) { + nc++; + if (csconv[(*q)].ccase) ncap++; + if (csconv[(*q)].cupper == csconv[(*q)].clower) nneutral++; + *p++ = *q++; + nl--; + } + // remember to terminate the destination string + *p = '\0'; + firstcap = csconv[(unsigned char)(*dest)].ccase; + } else { + unsigned short idx; + w_char t[MAXWORDLEN]; + nc = u8_u16(t, MAXWORDLEN, src); + for (int i = 0; i < nc; i++) { + idx = (t[i].h << 8) + t[i].l; + unsigned short low = unicodetolower(idx, langnum); + if (idx != low) ncap++; + if (unicodetoupper(idx, langnum) == low) nneutral++; + } + u16_u8(dest, MAXWORDUTF8LEN, t, nc); + if (ncap) { + idx = (t[0].h << 8) + t[0].l; + firstcap = (idx != unicodetolower(idx, langnum)); + } + } + + // now finally set the captype + if (ncap == 0) { + *pcaptype = NOCAP; + } else if ((ncap == 1) && firstcap) { + *pcaptype = INITCAP; + } else if ((ncap == nc) || ((ncap + nneutral) == nc)){ + *pcaptype = ALLCAP; + } else if ((ncap > 1) && firstcap) { + *pcaptype = HUHINITCAP; + } else { + *pcaptype = HUHCAP; + } + return strlen(dest); +} + +void Hunspell::mkallcap(char * p) +{ + if (utf8) { + w_char u[MAXWORDLEN]; + int nc = u8_u16(u, MAXWORDLEN, p); + unsigned short idx; + for (int i = 0; i < nc; i++) { + idx = (u[i].h << 8) + u[i].l; + if (idx != unicodetoupper(idx, langnum)) { + u[i].h = (unsigned char) (unicodetoupper(idx, langnum) >> 8); + u[i].l = (unsigned char) (unicodetoupper(idx, langnum) & 0x00FF); + } + } + u16_u8(p, MAXWORDUTF8LEN, u, nc); + } else { + while (*p != '\0') { + *p = csconv[((unsigned char) *p)].cupper; + p++; + } + } +} + +int Hunspell::mkallcap2(char * p, w_char * u, int nc) +{ + if (utf8) { + unsigned short idx; + for (int i = 0; i < nc; i++) { + idx = (u[i].h << 8) + u[i].l; + unsigned short up = unicodetoupper(idx, langnum); + if (idx != up) { + u[i].h = (unsigned char) (up >> 8); + u[i].l = (unsigned char) (up & 0x00FF); + } + } + u16_u8(p, MAXWORDUTF8LEN, u, nc); + return strlen(p); + } else { + while (*p != '\0') { + *p = csconv[((unsigned char) *p)].cupper; + p++; + } + } + return nc; +} + + +void Hunspell::mkallsmall(char * p) +{ + while (*p != '\0') { + *p = csconv[((unsigned char) *p)].clower; + p++; + } +} + +int Hunspell::mkallsmall2(char * p, w_char * u, int nc) +{ + if (utf8) { + unsigned short idx; + for (int i = 0; i < nc; i++) { + idx = (u[i].h << 8) + u[i].l; + unsigned short low = unicodetolower(idx, langnum); + if (idx != low) { + u[i].h = (unsigned char) (low >> 8); + u[i].l = (unsigned char) (low & 0x00FF); + } + } + u16_u8(p, MAXWORDUTF8LEN, u, nc); + return strlen(p); + } else { + while (*p != '\0') { + *p = csconv[((unsigned char) *p)].clower; + p++; + } + } + return nc; +} + +// convert UTF-8 sharp S codes to latin 1 +char * Hunspell::sharps_u8_l1(char * dest, char * source) { + char * p = dest; + *p = *source; + for (p++, source++; *(source - 1); p++, source++) { + *p = *source; + if (*source == '\x9F') *--p = '\xDF'; + } + return dest; +} + +// recursive search for right ss - sharp s permutations +hentry * Hunspell::spellsharps(char * base, char * pos, int n, + int repnum, char * tmp, int * info, char **root) { + pos = strstr(pos, "ss"); + if (pos && (n < MAXSHARPS)) { + *pos = '\xC3'; + *(pos + 1) = '\x9F'; + hentry * h = spellsharps(base, pos + 2, n + 1, repnum + 1, tmp, info, root); + if (h) return h; + *pos = 's'; + *(pos + 1) = 's'; + h = spellsharps(base, pos + 2, n + 1, repnum, tmp, info, root); + if (h) return h; + } else if (repnum > 0) { + if (utf8) return checkword(base, info, root); + return checkword(sharps_u8_l1(tmp, base), info, root); + } + return NULL; +} + +int Hunspell::is_keepcase(const hentry * rv) { + return pAMgr && rv->astr && pAMgr->get_keepcase() && + TESTAFF(rv->astr, pAMgr->get_keepcase(), rv->alen); +} + +/* insert a word to the beginning of the suggestion array and return ns */ +int Hunspell::insert_sug(char ***slst, char * word, int ns) { + char * dup = mystrdup(word); + if (!dup) return ns; + if (ns == MAXSUGGESTION) { + ns--; + free((*slst)[ns]); + } + for (int k = ns; k > 0; k--) (*slst)[k] = (*slst)[k - 1]; + (*slst)[0] = dup; + return ns + 1; +} + +int Hunspell::spell(const char * word, int * info, char ** root) +{ + struct hentry * rv=NULL; + // need larger vector. For example, Turkish capital letter I converted a + // 2-byte UTF-8 character (dotless i) by mkallsmall. + char cw[MAXWORDUTF8LEN]; + char wspace[MAXWORDUTF8LEN]; + w_char unicw[MAXWORDLEN]; + // Hunspell supports XML input of the simplified API (see manual) + if (strcmp(word, SPELL_XML) == 0) return 1; + int nc = strlen(word); + int wl2 = 0; + if (utf8) { + if (nc >= MAXWORDUTF8LEN) return 0; + } else { + if (nc >= MAXWORDLEN) return 0; + } + int captype = 0; + int abbv = 0; + int wl = 0; + + // input conversion + RepList * rl = (pAMgr) ? pAMgr->get_iconvtable() : NULL; + if (rl && rl->conv(word, wspace)) wl = cleanword2(cw, wspace, unicw, &nc, &captype, &abbv); + else wl = cleanword2(cw, word, unicw, &nc, &captype, &abbv); + + int info2 = 0; + if (wl == 0 || maxdic == 0) return 1; + if (root) *root = NULL; + + // allow numbers with dots, dashes and commas (but forbid double separators: "..", "--" etc.) + enum { NBEGIN, NNUM, NSEP }; + int nstate = NBEGIN; + int i; + + for (i = 0; (i < wl); i++) { + if ((cw[i] <= '9') && (cw[i] >= '0')) { + nstate = NNUM; + } else if ((cw[i] == ',') || (cw[i] == '.') || (cw[i] == '-')) { + if ((nstate == NSEP) || (i == 0)) break; + nstate = NSEP; + } else break; + } + if ((i == wl) && (nstate == NNUM)) return 1; + if (!info) info = &info2; else *info = 0; + + switch(captype) { + case HUHCAP: + case HUHINITCAP: + *info += SPELL_ORIGCAP; + case NOCAP: { + rv = checkword(cw, info, root); + if ((abbv) && !(rv)) { + memcpy(wspace,cw,wl); + *(wspace+wl) = '.'; + *(wspace+wl+1) = '\0'; + rv = checkword(wspace, info, root); + } + break; + } + case ALLCAP: { + *info += SPELL_ORIGCAP; + rv = checkword(cw, info, root); + if (rv) break; + if (abbv) { + memcpy(wspace,cw,wl); + *(wspace+wl) = '.'; + *(wspace+wl+1) = '\0'; + rv = checkword(wspace, info, root); + if (rv) break; + } + // Spec. prefix handling for Catalan, French, Italian: + // prefixes separated by apostrophe (SANT'ELIA -> Sant'+Elia). + if (pAMgr && strchr(cw, '\'')) { + wl = mkallsmall2(cw, unicw, nc); + //There are no really sane circumstances where this could fail, + //but anyway... + if (char * apostrophe = strchr(cw, '\'')) { + if (utf8) { + w_char tmpword[MAXWORDLEN]; + *apostrophe = '\0'; + wl2 = u8_u16(tmpword, MAXWORDLEN, cw); + *apostrophe = '\''; + if (wl2 < nc) { + mkinitcap2(apostrophe + 1, unicw + wl2 + 1, nc - wl2 - 1); + rv = checkword(cw, info, root); + if (rv) break; + } + } else { + mkinitcap2(apostrophe + 1, unicw, nc); + rv = checkword(cw, info, root); + if (rv) break; + } + } + mkinitcap2(cw, unicw, nc); + rv = checkword(cw, info, root); + if (rv) break; + } + if (pAMgr && pAMgr->get_checksharps() && strstr(cw, "SS")) { + char tmpword[MAXWORDUTF8LEN]; + wl = mkallsmall2(cw, unicw, nc); + memcpy(wspace,cw,(wl+1)); + rv = spellsharps(wspace, wspace, 0, 0, tmpword, info, root); + if (!rv) { + wl2 = mkinitcap2(cw, unicw, nc); + rv = spellsharps(cw, cw, 0, 0, tmpword, info, root); + } + if ((abbv) && !(rv)) { + *(wspace+wl) = '.'; + *(wspace+wl+1) = '\0'; + rv = spellsharps(wspace, wspace, 0, 0, tmpword, info, root); + if (!rv) { + memcpy(wspace, cw, wl2); + *(wspace+wl2) = '.'; + *(wspace+wl2+1) = '\0'; + rv = spellsharps(wspace, wspace, 0, 0, tmpword, info, root); + } + } + if (rv) break; + } + } + case INITCAP: { + *info += SPELL_ORIGCAP; + wl = mkallsmall2(cw, unicw, nc); + memcpy(wspace,cw,(wl+1)); + wl2 = mkinitcap2(cw, unicw, nc); + if (captype == INITCAP) *info += SPELL_INITCAP; + rv = checkword(cw, info, root); + if (captype == INITCAP) *info -= SPELL_INITCAP; + // forbid bad capitalization + // (for example, ijs -> Ijs instead of IJs in Dutch) + // use explicit forms in dic: Ijs/F (F = FORBIDDENWORD flag) + if (*info & SPELL_FORBIDDEN) { + rv = NULL; + break; + } + if (rv && is_keepcase(rv) && (captype == ALLCAP)) rv = NULL; + if (rv) break; + + rv = checkword(wspace, info, root); + if (abbv && !rv) { + + *(wspace+wl) = '.'; + *(wspace+wl+1) = '\0'; + rv = checkword(wspace, info, root); + if (!rv) { + memcpy(wspace, cw, wl2); + *(wspace+wl2) = '.'; + *(wspace+wl2+1) = '\0'; + if (captype == INITCAP) *info += SPELL_INITCAP; + rv = checkword(wspace, info, root); + if (captype == INITCAP) *info -= SPELL_INITCAP; + if (rv && is_keepcase(rv) && (captype == ALLCAP)) rv = NULL; + break; + } + } + if (rv && is_keepcase(rv) && + ((captype == ALLCAP) || + // if CHECKSHARPS: KEEPCASE words with \xDF are allowed + // in INITCAP form, too. + !(pAMgr->get_checksharps() && + ((utf8 && strstr(wspace, "\xC3\x9F")) || + (!utf8 && strchr(wspace, '\xDF')))))) rv = NULL; + break; + } + } + + if (rv) { + if (pAMgr && pAMgr->get_warn() && rv->astr && + TESTAFF(rv->astr, pAMgr->get_warn(), rv->alen)) { + *info += SPELL_WARN; + if (pAMgr->get_forbidwarn()) return 0; + return HUNSPELL_OK_WARN; + } + return HUNSPELL_OK; + } + + // recursive breaking at break points + if (wordbreak) { + char * s; + char r; + int nbr = 0; + wl = strlen(cw); + int numbreak = pAMgr ? pAMgr->get_numbreak() : 0; + + // calculate break points for recursion limit + for (int j = 0; j < numbreak; j++) { + s = cw; + do { + s = (char *) strstr(s, wordbreak[j]); + if (s) { + nbr++; + s++; + } + } while (s); + } + if (nbr >= 10) return 0; + + // check boundary patterns (^begin and end$) + for (int j = 0; j < numbreak; j++) { + int plen = strlen(wordbreak[j]); + if (plen == 1 || plen > wl) continue; + if (wordbreak[j][0] == '^' && strncmp(cw, wordbreak[j] + 1, plen - 1) == 0 + && spell(cw + plen - 1)) return 1; + if (wordbreak[j][plen - 1] == '$' && + strncmp(cw + wl - plen + 1, wordbreak[j], plen - 1) == 0) { + r = cw[wl - plen + 1]; + cw[wl - plen + 1] = '\0'; + if (spell(cw)) return 1; + cw[wl - plen + 1] = r; + } + } + + // other patterns + for (int j = 0; j < numbreak; j++) { + int plen = strlen(wordbreak[j]); + s=(char *) strstr(cw, wordbreak[j]); + if (s && (s > cw) && (s < cw + wl - plen)) { + if (!spell(s + plen)) continue; + r = *s; + *s = '\0'; + // examine 2 sides of the break point + if (spell(cw)) return 1; + *s = r; + + // LANG_hu: spec. dash rule + if (langnum == LANG_hu && strcmp(wordbreak[j], "-") == 0) { + r = s[1]; + s[1] = '\0'; + if (spell(cw)) return 1; // check the first part with dash + s[1] = r; + } + // end of LANG speficic region + + } + } + } + + return 0; +} + +struct hentry * Hunspell::checkword(const char * w, int * info, char ** root) +{ + struct hentry * he = NULL; + int len, i; + char w2[MAXWORDUTF8LEN]; + const char * word; + + char * ignoredchars = pAMgr->get_ignore(); + if (ignoredchars != NULL) { + strcpy(w2, w); + if (utf8) { + int ignoredchars_utf16_len; + unsigned short * ignoredchars_utf16 = pAMgr->get_ignore_utf16(&ignoredchars_utf16_len); + remove_ignored_chars_utf(w2, ignoredchars_utf16, ignoredchars_utf16_len); + } else { + remove_ignored_chars(w2,ignoredchars); + } + word = w2; + } else word = w; + + len = strlen(word); + + if (!len) + return NULL; + + // word reversing wrapper for complex prefixes + if (complexprefixes) { + if (word != w2) { + strcpy(w2, word); + word = w2; + } + if (utf8) reverseword_utf(w2); else reverseword(w2); + } + + // look word in hash table + for (i = 0; (i < maxdic) && !he; i ++) { + he = (pHMgr[i])->lookup(word); + + // check forbidden and onlyincompound words + if ((he) && (he->astr) && (pAMgr) && TESTAFF(he->astr, pAMgr->get_forbiddenword(), he->alen)) { + if (info) *info += SPELL_FORBIDDEN; + // LANG_hu section: set dash information for suggestions + if (langnum == LANG_hu) { + if (pAMgr->get_compoundflag() && + TESTAFF(he->astr, pAMgr->get_compoundflag(), he->alen)) { + if (info) *info += SPELL_COMPOUND; + } + } + return NULL; + } + + // he = next not needaffix, onlyincompound homonym or onlyupcase word + while (he && (he->astr) && + ((pAMgr->get_needaffix() && TESTAFF(he->astr, pAMgr->get_needaffix(), he->alen)) || + (pAMgr->get_onlyincompound() && TESTAFF(he->astr, pAMgr->get_onlyincompound(), he->alen)) || + (info && (*info & SPELL_INITCAP) && TESTAFF(he->astr, ONLYUPCASEFLAG, he->alen)) + )) he = he->next_homonym; + } + + // check with affixes + if (!he && pAMgr) { + // try stripping off affixes */ + he = pAMgr->affix_check(word, len, 0); + + // check compound restriction and onlyupcase + if (he && he->astr && ( + (pAMgr->get_onlyincompound() && + TESTAFF(he->astr, pAMgr->get_onlyincompound(), he->alen)) || + (info && (*info & SPELL_INITCAP) && + TESTAFF(he->astr, ONLYUPCASEFLAG, he->alen)))) { + he = NULL; + } + + if (he) { + if ((he->astr) && (pAMgr) && TESTAFF(he->astr, pAMgr->get_forbiddenword(), he->alen)) { + if (info) *info += SPELL_FORBIDDEN; + return NULL; + } + if (root) { + *root = mystrdup(he->word); + if (*root && complexprefixes) { + if (utf8) reverseword_utf(*root); else reverseword(*root); + } + } + // try check compound word + } else if (pAMgr->get_compound()) { + he = pAMgr->compound_check(word, len, 0, 0, 100, 0, NULL, 0, 0, info); + // LANG_hu section: `moving rule' with last dash + if ((!he) && (langnum == LANG_hu) && (word[len-1] == '-')) { + char * dup = mystrdup(word); + if (!dup) return NULL; + dup[len-1] = '\0'; + he = pAMgr->compound_check(dup, len-1, -5, 0, 100, 0, NULL, 1, 0, info); + free(dup); + } + // end of LANG speficic region + if (he) { + if (root) { + *root = mystrdup(he->word); + if (*root && complexprefixes) { + if (utf8) reverseword_utf(*root); else reverseword(*root); + } + } + if (info) *info += SPELL_COMPOUND; + } + } + + } + + return he; +} + +int Hunspell::suggest(char*** slst, const char * word) +{ + int onlycmpdsug = 0; + char cw[MAXWORDUTF8LEN]; + char wspace[MAXWORDUTF8LEN]; + if (!pSMgr || maxdic == 0) return 0; + w_char unicw[MAXWORDLEN]; + *slst = NULL; + // process XML input of the simplified API (see manual) + if (strncmp(word, SPELL_XML, sizeof(SPELL_XML) - 3) == 0) { + return spellml(slst, word); + } + int nc = strlen(word); + if (utf8) { + if (nc >= MAXWORDUTF8LEN) return 0; + } else { + if (nc >= MAXWORDLEN) return 0; + } + int captype = 0; + int abbv = 0; + int wl = 0; + + // input conversion + RepList * rl = (pAMgr) ? pAMgr->get_iconvtable() : NULL; + if (rl && rl->conv(word, wspace)) wl = cleanword2(cw, wspace, unicw, &nc, &captype, &abbv); + else wl = cleanword2(cw, word, unicw, &nc, &captype, &abbv); + + if (wl == 0) return 0; + int ns = 0; + int capwords = 0; + + // check capitalized form for FORCEUCASE + if (pAMgr && captype == NOCAP && pAMgr->get_forceucase()) { + int info = SPELL_ORIGCAP; + char ** wlst; + if (checkword(cw, &info, NULL)) { + if (*slst) { + wlst = *slst; + } else { + wlst = (char **) malloc(MAXSUGGESTION * sizeof(char *)); + if (wlst == NULL) return -1; + *slst = wlst; + for (int i = 0; i < MAXSUGGESTION; i++) { + wlst[i] = NULL; + } + } + wlst[0] = mystrdup(cw); + mkinitcap(wlst[0]); + return 1; + } + } + + switch(captype) { + case NOCAP: { + ns = pSMgr->suggest(slst, cw, ns, &onlycmpdsug); + break; + } + + case INITCAP: { + capwords = 1; + ns = pSMgr->suggest(slst, cw, ns, &onlycmpdsug); + if (ns == -1) break; + memcpy(wspace,cw,(wl+1)); + mkallsmall2(wspace, unicw, nc); + ns = pSMgr->suggest(slst, wspace, ns, &onlycmpdsug); + break; + } + case HUHINITCAP: + capwords = 1; + case HUHCAP: { + ns = pSMgr->suggest(slst, cw, ns, &onlycmpdsug); + if (ns != -1) { + int prevns; + // something.The -> something. The + char * dot = strchr(cw, '.'); + if (dot && (dot > cw)) { + int captype_; + if (utf8) { + w_char w_[MAXWORDLEN]; + int wl_ = u8_u16(w_, MAXWORDLEN, dot + 1); + captype_ = get_captype_utf8(w_, wl_, langnum); + } else captype_ = get_captype(dot+1, strlen(dot+1), csconv); + if (captype_ == INITCAP) { + char * st = mystrdup(cw); + if (st) st = (char *) realloc(st, wl + 2); + if (st) { + st[(dot - cw) + 1] = ' '; + strcpy(st + (dot - cw) + 2, dot + 1); + ns = insert_sug(slst, st, ns); + free(st); + } + } + } + if (captype == HUHINITCAP) { + // TheOpenOffice.org -> The OpenOffice.org + memcpy(wspace,cw,(wl+1)); + mkinitsmall2(wspace, unicw, nc); + ns = pSMgr->suggest(slst, wspace, ns, &onlycmpdsug); + } + memcpy(wspace,cw,(wl+1)); + mkallsmall2(wspace, unicw, nc); + if (spell(wspace)) ns = insert_sug(slst, wspace, ns); + prevns = ns; + ns = pSMgr->suggest(slst, wspace, ns, &onlycmpdsug); + if (captype == HUHINITCAP) { + mkinitcap2(wspace, unicw, nc); + if (spell(wspace)) ns = insert_sug(slst, wspace, ns); + ns = pSMgr->suggest(slst, wspace, ns, &onlycmpdsug); + } + // aNew -> "a New" (instead of "a new") + for (int j = prevns; j < ns; j++) { + char * space = strchr((*slst)[j],' '); + if (space) { + int slen = strlen(space + 1); + // different case after space (need capitalisation) + if ((slen < wl) && strcmp(cw + wl - slen, space + 1)) { + w_char w[MAXWORDLEN]; + int wc = 0; + char * r = (*slst)[j]; + if (utf8) wc = u8_u16(w, MAXWORDLEN, space + 1); + mkinitcap2(space + 1, w, wc); + // set as first suggestion + for (int k = j; k > 0; k--) (*slst)[k] = (*slst)[k - 1]; + (*slst)[0] = r; + } + } + } + } + break; + } + + case ALLCAP: { + memcpy(wspace, cw, (wl+1)); + mkallsmall2(wspace, unicw, nc); + ns = pSMgr->suggest(slst, wspace, ns, &onlycmpdsug); + if (ns == -1) break; + if (pAMgr && pAMgr->get_keepcase() && spell(wspace)) + ns = insert_sug(slst, wspace, ns); + mkinitcap2(wspace, unicw, nc); + ns = pSMgr->suggest(slst, wspace, ns, &onlycmpdsug); + for (int j=0; j < ns; j++) { + mkallcap((*slst)[j]); + if (pAMgr && pAMgr->get_checksharps()) { + char * pos; + if (utf8) { + pos = strstr((*slst)[j], "\xC3\x9F"); + while (pos) { + *pos = 'S'; + *(pos+1) = 'S'; + pos = strstr(pos+2, "\xC3\x9F"); + } + } else { + pos = strchr((*slst)[j], '\xDF'); + while (pos) { + (*slst)[j] = (char *) realloc((*slst)[j], strlen((*slst)[j]) + 2); + mystrrep((*slst)[j], "\xDF", "SS"); + pos = strchr((*slst)[j], '\xDF'); + } + } + } + } + break; + } + } + + // LANG_hu section: replace '-' with ' ' in Hungarian + if (langnum == LANG_hu) { + for (int j=0; j < ns; j++) { + char * pos = strchr((*slst)[j],'-'); + if (pos) { + int info; + char w[MAXWORDUTF8LEN]; + *pos = '\0'; + strcpy(w, (*slst)[j]); + strcat(w, pos + 1); + spell(w, &info, NULL); + if ((info & SPELL_COMPOUND) && (info & SPELL_FORBIDDEN)) { + *pos = ' '; + } else *pos = '-'; + } + } + } + // END OF LANG_hu section + + // try ngram approach since found nothing or only compound words + if (pAMgr && (ns == 0 || onlycmpdsug) && (pAMgr->get_maxngramsugs() != 0) && (*slst)) { + switch(captype) { + case NOCAP: { + ns = pSMgr->ngsuggest(*slst, cw, ns, pHMgr, maxdic); + break; + } + case HUHINITCAP: + capwords = 1; + case HUHCAP: { + memcpy(wspace,cw,(wl+1)); + mkallsmall2(wspace, unicw, nc); + ns = pSMgr->ngsuggest(*slst, wspace, ns, pHMgr, maxdic); + break; + } + case INITCAP: { + capwords = 1; + memcpy(wspace,cw,(wl+1)); + mkallsmall2(wspace, unicw, nc); + ns = pSMgr->ngsuggest(*slst, wspace, ns, pHMgr, maxdic); + break; + } + case ALLCAP: { + memcpy(wspace,cw,(wl+1)); + mkallsmall2(wspace, unicw, nc); + int oldns = ns; + ns = pSMgr->ngsuggest(*slst, wspace, ns, pHMgr, maxdic); + for (int j = oldns; j < ns; j++) + mkallcap((*slst)[j]); + break; + } + } + } + + // try dash suggestion (Afo-American -> Afro-American) + if (char * pos = strchr(cw, '-')) { + char * ppos = cw; + int nodashsug = 1; + char ** nlst = NULL; + int nn = 0; + int last = 0; + if (*slst) { + for (int j = 0; j < ns && nodashsug == 1; j++) { + if (strchr((*slst)[j], '-')) nodashsug = 0; + } + } + while (nodashsug && !last) { + if (*pos == '\0') last = 1; else *pos = '\0'; + if (!spell(ppos)) { + nn = suggest(&nlst, ppos); + for (int j = nn - 1; j >= 0; j--) { + strncpy(wspace, cw, ppos - cw); + strcpy(wspace + (ppos - cw), nlst[j]); + if (!last) { + strcat(wspace, "-"); + strcat(wspace, pos + 1); + } + ns = insert_sug(slst, wspace, ns); + free(nlst[j]); + } + if (nlst != NULL) free(nlst); + nodashsug = 0; + } + if (!last) { + *pos = '-'; + ppos = pos + 1; + pos = strchr(ppos, '-'); + } + if (!pos) pos = cw + strlen(cw); + } + } + + // word reversing wrapper for complex prefixes + if (complexprefixes) { + for (int j = 0; j < ns; j++) { + if (utf8) reverseword_utf((*slst)[j]); else reverseword((*slst)[j]); + } + } + + // capitalize + if (capwords) for (int j=0; j < ns; j++) { + mkinitcap((*slst)[j]); + } + + // expand suggestions with dot(s) + if (abbv && pAMgr && pAMgr->get_sugswithdots()) { + for (int j = 0; j < ns; j++) { + (*slst)[j] = (char *) realloc((*slst)[j], strlen((*slst)[j]) + 1 + abbv); + strcat((*slst)[j], word + strlen(word) - abbv); + } + } + + // remove bad capitalized and forbidden forms + if (pAMgr && (pAMgr->get_keepcase() || pAMgr->get_forbiddenword())) { + switch (captype) { + case INITCAP: + case ALLCAP: { + int l = 0; + for (int j=0; j < ns; j++) { + if (!strchr((*slst)[j],' ') && !spell((*slst)[j])) { + char s[MAXSWUTF8L]; + w_char w[MAXSWL]; + int len; + if (utf8) { + len = u8_u16(w, MAXSWL, (*slst)[j]); + } else { + strcpy(s, (*slst)[j]); + len = strlen(s); + } + mkallsmall2(s, w, len); + free((*slst)[j]); + if (spell(s)) { + (*slst)[l] = mystrdup(s); + if ((*slst)[l]) l++; + } else { + mkinitcap2(s, w, len); + if (spell(s)) { + (*slst)[l] = mystrdup(s); + if ((*slst)[l]) l++; + } + } + } else { + (*slst)[l] = (*slst)[j]; + l++; + } + } + ns = l; + } + } + } + + // remove duplications + int l = 0; + for (int j = 0; j < ns; j++) { + (*slst)[l] = (*slst)[j]; + for (int k = 0; k < l; k++) { + if (strcmp((*slst)[k], (*slst)[j]) == 0) { + free((*slst)[j]); + l--; + break; + } + } + l++; + } + ns = l; + + // output conversion + rl = (pAMgr) ? pAMgr->get_oconvtable() : NULL; + for (int j = 0; rl && j < ns; j++) { + if (rl->conv((*slst)[j], wspace)) { + free((*slst)[j]); + (*slst)[j] = mystrdup(wspace); + } + } + + // if suggestions removed by nosuggest, onlyincompound parameters + if (l == 0 && *slst) { + free(*slst); + *slst = NULL; + } + return l; +} + +void Hunspell::free_list(char *** slst, int n) { + freelist(slst, n); +} + +char * Hunspell::get_dic_encoding() +{ + return encoding; +} + +#ifdef HUNSPELL_EXPERIMENTAL +// XXX need UTF-8 support +int Hunspell::suggest_auto(char*** slst, const char * word) +{ + char cw[MAXWORDUTF8LEN]; + char wspace[MAXWORDUTF8LEN]; + if (!pSMgr || maxdic == 0) return 0; + int wl = strlen(word); + if (utf8) { + if (wl >= MAXWORDUTF8LEN) return 0; + } else { + if (wl >= MAXWORDLEN) return 0; + } + int captype = 0; + int abbv = 0; + wl = cleanword(cw, word, &captype, &abbv); + if (wl == 0) return 0; + int ns = 0; + *slst = NULL; // HU, nsug in pSMgr->suggest + + switch(captype) { + case NOCAP: { + ns = pSMgr->suggest_auto(slst, cw, ns); + if (ns>0) break; + break; + } + + case INITCAP: { + memcpy(wspace,cw,(wl+1)); + mkallsmall(wspace); + ns = pSMgr->suggest_auto(slst, wspace, ns); + for (int j=0; j < ns; j++) + mkinitcap((*slst)[j]); + ns = pSMgr->suggest_auto(slst, cw, ns); + break; + + } + + case HUHINITCAP: + case HUHCAP: { + ns = pSMgr->suggest_auto(slst, cw, ns); + if (ns == 0) { + memcpy(wspace,cw,(wl+1)); + mkallsmall(wspace); + ns = pSMgr->suggest_auto(slst, wspace, ns); + } + break; + } + + case ALLCAP: { + memcpy(wspace,cw,(wl+1)); + mkallsmall(wspace); + ns = pSMgr->suggest_auto(slst, wspace, ns); + + mkinitcap(wspace); + ns = pSMgr->suggest_auto(slst, wspace, ns); + + for (int j=0; j < ns; j++) + mkallcap((*slst)[j]); + break; + } + } + + // word reversing wrapper for complex prefixes + if (complexprefixes) { + for (int j = 0; j < ns; j++) { + if (utf8) reverseword_utf((*slst)[j]); else reverseword((*slst)[j]); + } + } + + // expand suggestions with dot(s) + if (abbv && pAMgr && pAMgr->get_sugswithdots()) { + for (int j = 0; j < ns; j++) { + (*slst)[j] = (char *) realloc((*slst)[j], strlen((*slst)[j]) + 1 + abbv); + strcat((*slst)[j], word + strlen(word) - abbv); + } + } + + // LANG_hu section: replace '-' with ' ' in Hungarian + if (langnum == LANG_hu) { + for (int j=0; j < ns; j++) { + char * pos = strchr((*slst)[j],'-'); + if (pos) { + int info; + char w[MAXWORDUTF8LEN]; + *pos = '\0'; + strcpy(w, (*slst)[j]); + strcat(w, pos + 1); + spell(w, &info, NULL); + if ((info & SPELL_COMPOUND) && (info & SPELL_FORBIDDEN)) { + *pos = ' '; + } else *pos = '-'; + } + } + } + // END OF LANG_hu section + return ns; +} +#endif + +int Hunspell::stem(char*** slst, char ** desc, int n) +{ + char result[MAXLNLEN]; + char result2[MAXLNLEN]; + *slst = NULL; + if (n == 0) return 0; + *result2 = '\0'; + for (int i = 0; i < n; i++) { + *result = '\0'; + // add compound word parts (except the last one) + char * s = (char *) desc[i]; + char * part = strstr(s, MORPH_PART); + if (part) { + char * nextpart = strstr(part + 1, MORPH_PART); + while (nextpart) { + copy_field(result + strlen(result), part, MORPH_PART); + part = nextpart; + nextpart = strstr(part + 1, MORPH_PART); + } + s = part; + } + + char **pl; + char tok[MAXLNLEN]; + strcpy(tok, s); + char * alt = strstr(tok, " | "); + while (alt) { + alt[1] = MSEP_ALT; + alt = strstr(alt, " | "); + } + int pln = line_tok(tok, &pl, MSEP_ALT); + for (int k = 0; k < pln; k++) { + // add derivational suffixes + if (strstr(pl[k], MORPH_DERI_SFX)) { + // remove inflectional suffixes + char * is = strstr(pl[k], MORPH_INFL_SFX); + if (is) *is = '\0'; + char * sg = pSMgr->suggest_gen(&(pl[k]), 1, pl[k]); + if (sg) { + char ** gen; + int genl = line_tok(sg, &gen, MSEP_REC); + free(sg); + for (int j = 0; j < genl; j++) { + sprintf(result2 + strlen(result2), "%c%s%s", + MSEP_REC, result, gen[j]); + } + freelist(&gen, genl); + } + } else { + sprintf(result2 + strlen(result2), "%c%s", MSEP_REC, result); + if (strstr(pl[k], MORPH_SURF_PFX)) { + copy_field(result2 + strlen(result2), pl[k], MORPH_SURF_PFX); + } + copy_field(result2 + strlen(result2), pl[k], MORPH_STEM); + } + } + freelist(&pl, pln); + } + int sln = line_tok(result2, slst, MSEP_REC); + return uniqlist(*slst, sln); + +} + +int Hunspell::stem(char*** slst, const char * word) +{ + char ** pl; + int pln = analyze(&pl, word); + int pln2 = stem(slst, pl, pln); + freelist(&pl, pln); + return pln2; +} + +#ifdef HUNSPELL_EXPERIMENTAL +int Hunspell::suggest_pos_stems(char*** slst, const char * word) +{ + char cw[MAXWORDUTF8LEN]; + char wspace[MAXWORDUTF8LEN]; + if (! pSMgr || maxdic == 0) return 0; + int wl = strlen(word); + if (utf8) { + if (wl >= MAXWORDUTF8LEN) return 0; + } else { + if (wl >= MAXWORDLEN) return 0; + } + int captype = 0; + int abbv = 0; + wl = cleanword(cw, word, &captype, &abbv); + if (wl == 0) return 0; + + int ns = 0; // ns=0 = normalized input + + *slst = NULL; // HU, nsug in pSMgr->suggest + + switch(captype) { + case HUHCAP: + case NOCAP: { + ns = pSMgr->suggest_pos_stems(slst, cw, ns); + + if ((abbv) && (ns == 0)) { + memcpy(wspace,cw,wl); + *(wspace+wl) = '.'; + *(wspace+wl+1) = '\0'; + ns = pSMgr->suggest_pos_stems(slst, wspace, ns); + } + + break; + } + + case INITCAP: { + + ns = pSMgr->suggest_pos_stems(slst, cw, ns); + + if (ns == 0 || ((*slst)[0][0] == '#')) { + memcpy(wspace,cw,(wl+1)); + mkallsmall(wspace); + ns = pSMgr->suggest_pos_stems(slst, wspace, ns); + } + + break; + + } + + case ALLCAP: { + ns = pSMgr->suggest_pos_stems(slst, cw, ns); + if (ns != 0) break; + + memcpy(wspace,cw,(wl+1)); + mkallsmall(wspace); + ns = pSMgr->suggest_pos_stems(slst, wspace, ns); + + if (ns == 0) { + mkinitcap(wspace); + ns = pSMgr->suggest_pos_stems(slst, wspace, ns); + } + break; + } + } + + return ns; +} +#endif // END OF HUNSPELL_EXPERIMENTAL CODE + +const char * Hunspell::get_wordchars() +{ + return pAMgr->get_wordchars(); +} + +unsigned short * Hunspell::get_wordchars_utf16(int * len) +{ + return pAMgr->get_wordchars_utf16(len); +} + +char * Hunspell::get_try_string() +{ + return pAMgr->get_try_string(); +} + +void Hunspell::mkinitcap(char * p) +{ + if (!utf8) { + if (*p != '\0') *p = csconv[((unsigned char)*p)].cupper; + } else { + int len; + w_char u[MAXWORDLEN]; + len = u8_u16(u, MAXWORDLEN, p); + unsigned short i = unicodetoupper((u[0].h << 8) + u[0].l, langnum); + u[0].h = (unsigned char) (i >> 8); + u[0].l = (unsigned char) (i & 0x00FF); + u16_u8(p, MAXWORDUTF8LEN, u, len); + } +} + +int Hunspell::mkinitcap2(char * p, w_char * u, int nc) +{ + if (!utf8) { + if (*p != '\0') *p = csconv[((unsigned char)*p)].cupper; + } else if (nc > 0) { + unsigned short i = unicodetoupper((u[0].h << 8) + u[0].l, langnum); + u[0].h = (unsigned char) (i >> 8); + u[0].l = (unsigned char) (i & 0x00FF); + u16_u8(p, MAXWORDUTF8LEN, u, nc); + return strlen(p); + } + return nc; +} + +int Hunspell::mkinitsmall2(char * p, w_char * u, int nc) +{ + if (!utf8) { + if (*p != '\0') *p = csconv[((unsigned char)*p)].clower; + } else if (nc > 0) { + unsigned short i = unicodetolower((u[0].h << 8) + u[0].l, langnum); + u[0].h = (unsigned char) (i >> 8); + u[0].l = (unsigned char) (i & 0x00FF); + u16_u8(p, MAXWORDUTF8LEN, u, nc); + return strlen(p); + } + return nc; +} + +int Hunspell::add(const char * word) +{ + if (pHMgr[0]) return (pHMgr[0])->add(word); + return 0; +} + +int Hunspell::add_with_affix(const char * word, const char * example) +{ + if (pHMgr[0]) return (pHMgr[0])->add_with_affix(word, example); + return 0; +} + +int Hunspell::remove(const char * word) +{ + if (pHMgr[0]) return (pHMgr[0])->remove(word); + return 0; +} + +const char * Hunspell::get_version() +{ + return pAMgr->get_version(); +} + +struct cs_info * Hunspell::get_csconv() +{ + return csconv; +} + +void Hunspell::cat_result(char * result, char * st) +{ + if (st) { + if (*result) mystrcat(result, "\n", MAXLNLEN); + mystrcat(result, st, MAXLNLEN); + free(st); + } +} + +int Hunspell::analyze(char*** slst, const char * word) +{ + char cw[MAXWORDUTF8LEN]; + char wspace[MAXWORDUTF8LEN]; + w_char unicw[MAXWORDLEN]; + int wl2 = 0; + *slst = NULL; + if (! pSMgr || maxdic == 0) return 0; + int nc = strlen(word); + if (utf8) { + if (nc >= MAXWORDUTF8LEN) return 0; + } else { + if (nc >= MAXWORDLEN) return 0; + } + int captype = 0; + int abbv = 0; + int wl = 0; + + // input conversion + RepList * rl = (pAMgr) ? pAMgr->get_iconvtable() : NULL; + if (rl && rl->conv(word, wspace)) wl = cleanword2(cw, wspace, unicw, &nc, &captype, &abbv); + else wl = cleanword2(cw, word, unicw, &nc, &captype, &abbv); + + if (wl == 0) { + if (abbv) { + for (wl = 0; wl < abbv; wl++) cw[wl] = '.'; + cw[wl] = '\0'; + abbv = 0; + } else return 0; + } + + char result[MAXLNLEN]; + char * st = NULL; + + *result = '\0'; + + int n = 0; + int n2 = 0; + int n3 = 0; + + // test numbers + // LANG_hu section: set dash information for suggestions + if (langnum == LANG_hu) { + while ((n < wl) && + (((cw[n] <= '9') && (cw[n] >= '0')) || (((cw[n] == '.') || (cw[n] == ',')) && (n > 0)))) { + n++; + if ((cw[n] == '.') || (cw[n] == ',')) { + if (((n2 == 0) && (n > 3)) || + ((n2 > 0) && ((cw[n-1] == '.') || (cw[n-1] == ',')))) break; + n2++; + n3 = n; + } + } + + if ((n == wl) && (n3 > 0) && (n - n3 > 3)) return 0; + if ((n == wl) || ((n>0) && ((cw[n]=='%') || (cw[n]=='\xB0')) && checkword(cw+n, NULL, NULL))) { + mystrcat(result, cw, MAXLNLEN); + result[n - 1] = '\0'; + if (n == wl) cat_result(result, pSMgr->suggest_morph(cw + n - 1)); + else { + char sign = cw[n]; + cw[n] = '\0'; + cat_result(result, pSMgr->suggest_morph(cw + n - 1)); + mystrcat(result, "+", MAXLNLEN); // XXX SPEC. MORPHCODE + cw[n] = sign; + cat_result(result, pSMgr->suggest_morph(cw + n)); + } + return line_tok(result, slst, MSEP_REC); + } + } + // END OF LANG_hu section + + switch(captype) { + case HUHCAP: + case HUHINITCAP: + case NOCAP: { + cat_result(result, pSMgr->suggest_morph(cw)); + if (abbv) { + memcpy(wspace,cw,wl); + *(wspace+wl) = '.'; + *(wspace+wl+1) = '\0'; + cat_result(result, pSMgr->suggest_morph(wspace)); + } + break; + } + case INITCAP: { + wl = mkallsmall2(cw, unicw, nc); + memcpy(wspace,cw,(wl+1)); + wl2 = mkinitcap2(cw, unicw, nc); + cat_result(result, pSMgr->suggest_morph(wspace)); + cat_result(result, pSMgr->suggest_morph(cw)); + if (abbv) { + *(wspace+wl) = '.'; + *(wspace+wl+1) = '\0'; + cat_result(result, pSMgr->suggest_morph(wspace)); + + memcpy(wspace, cw, wl2); + *(wspace+wl2) = '.'; + *(wspace+wl2+1) = '\0'; + + cat_result(result, pSMgr->suggest_morph(wspace)); + } + break; + } + case ALLCAP: { + cat_result(result, pSMgr->suggest_morph(cw)); + if (abbv) { + memcpy(wspace,cw,wl); + *(wspace+wl) = '.'; + *(wspace+wl+1) = '\0'; + cat_result(result, pSMgr->suggest_morph(cw)); + } + wl = mkallsmall2(cw, unicw, nc); + memcpy(wspace,cw,(wl+1)); + wl2 = mkinitcap2(cw, unicw, nc); + + cat_result(result, pSMgr->suggest_morph(wspace)); + cat_result(result, pSMgr->suggest_morph(cw)); + if (abbv) { + *(wspace+wl) = '.'; + *(wspace+wl+1) = '\0'; + cat_result(result, pSMgr->suggest_morph(wspace)); + + memcpy(wspace, cw, wl2); + *(wspace+wl2) = '.'; + *(wspace+wl2+1) = '\0'; + + cat_result(result, pSMgr->suggest_morph(wspace)); + } + break; + } + } + + if (*result) { + // word reversing wrapper for complex prefixes + if (complexprefixes) { + if (utf8) reverseword_utf(result); else reverseword(result); + } + return line_tok(result, slst, MSEP_REC); + } + + // compound word with dash (HU) I18n + char * dash = NULL; + int nresult = 0; + // LANG_hu section: set dash information for suggestions + if (langnum == LANG_hu) dash = (char *) strchr(cw,'-'); + if ((langnum == LANG_hu) && dash) { + *dash='\0'; + // examine 2 sides of the dash + if (dash[1] == '\0') { // base word ending with dash + if (spell(cw)) { + char * p = pSMgr->suggest_morph(cw); + if (p) { + int ret = line_tok(p, slst, MSEP_REC); + free(p); + return ret; + } + + } + } else if ((dash[1] == 'e') && (dash[2] == '\0')) { // XXX (HU) -e hat. + if (spell(cw) && (spell("-e"))) { + st = pSMgr->suggest_morph(cw); + if (st) { + mystrcat(result, st, MAXLNLEN); + free(st); + } + mystrcat(result,"+", MAXLNLEN); // XXX spec. separator in MORPHCODE + st = pSMgr->suggest_morph("-e"); + if (st) { + mystrcat(result, st, MAXLNLEN); + free(st); + } + return line_tok(result, slst, MSEP_REC); + } + } else { + // first word ending with dash: word- XXX ??? + char r2 = *(dash + 1); + dash[0]='-'; + dash[1]='\0'; + nresult = spell(cw); + dash[1] = r2; + dash[0]='\0'; + if (nresult && spell(dash+1) && ((strlen(dash+1) > 1) || + ((dash[1] > '0') && (dash[1] < '9')))) { + st = pSMgr->suggest_morph(cw); + if (st) { + mystrcat(result, st, MAXLNLEN); + free(st); + mystrcat(result,"+", MAXLNLEN); // XXX spec. separator in MORPHCODE + } + st = pSMgr->suggest_morph(dash+1); + if (st) { + mystrcat(result, st, MAXLNLEN); + free(st); + } + return line_tok(result, slst, MSEP_REC); + } + } + // affixed number in correct word + if (nresult && (dash > cw) && (((*(dash-1)<='9') && + (*(dash-1)>='0')) || (*(dash-1)=='.'))) { + *dash='-'; + n = 1; + if (*(dash - n) == '.') n++; + // search first not a number character to left from dash + while (((dash - n)>=cw) && ((*(dash - n)=='0') || (n < 3)) && (n < 6)) { + n++; + } + if ((dash - n) < cw) n--; + // numbers: valami1000000-hoz + // examine 100000-hoz, 10000-hoz 1000-hoz, 10-hoz, + // 56-hoz, 6-hoz + for(; n >= 1; n--) { + if ((*(dash - n) >= '0') && (*(dash - n) <= '9') && checkword(dash - n, NULL, NULL)) { + mystrcat(result, cw, MAXLNLEN); + result[dash - cw - n] = '\0'; + st = pSMgr->suggest_morph(dash - n); + if (st) { + mystrcat(result, st, MAXLNLEN); + free(st); + } + return line_tok(result, slst, MSEP_REC); + } + } + } + } + return 0; +} + +int Hunspell::generate(char*** slst, const char * word, char ** pl, int pln) +{ + *slst = NULL; + if (!pSMgr || !pln) return 0; + char **pl2; + int pl2n = analyze(&pl2, word); + int captype = 0; + int abbv = 0; + char cw[MAXWORDUTF8LEN]; + cleanword(cw, word, &captype, &abbv); + char result[MAXLNLEN]; + *result = '\0'; + + for (int i = 0; i < pln; i++) { + cat_result(result, pSMgr->suggest_gen(pl2, pl2n, pl[i])); + } + freelist(&pl2, pl2n); + + if (*result) { + // allcap + if (captype == ALLCAP) mkallcap(result); + + // line split + int linenum = line_tok(result, slst, MSEP_REC); + + // capitalize + if (captype == INITCAP || captype == HUHINITCAP) { + for (int j=0; j < linenum; j++) mkinitcap((*slst)[j]); + } + + // temporary filtering of prefix related errors (eg. + // generate("undrinkable", "eats") --> "undrinkables" and "*undrinks") + + int r = 0; + for (int j=0; j < linenum; j++) { + if (!spell((*slst)[j])) { + free((*slst)[j]); + (*slst)[j] = NULL; + } else { + if (r < j) (*slst)[r] = (*slst)[j]; + r++; + } + } + if (r > 0) return r; + free(*slst); + *slst = NULL; + } + return 0; +} + +int Hunspell::generate(char*** slst, const char * word, const char * pattern) +{ + char **pl; + int pln = analyze(&pl, pattern); + int n = generate(slst, word, pl, pln); + freelist(&pl, pln); + return uniqlist(*slst, n); +} + +// minimal XML parser functions +int Hunspell::get_xml_par(char * dest, const char * par, int max) +{ + char * d = dest; + if (!par) return 0; + char end = *par; + char * dmax = dest + max; + if (end == '>') end = '<'; + else if (end != '\'' && end != '"') return 0; // bad XML + for (par++; d < dmax && *par != '\0' && *par != end; par++, d++) *d = *par; + *d = '\0'; + mystrrep(dest, "<", "<"); + mystrrep(dest, "&", "&"); + return (int)(d - dest); +} + +int Hunspell::get_langnum() const +{ + return langnum; +} + +// return the beginning of the element (attr == NULL) or the attribute +const char * Hunspell::get_xml_pos(const char * s, const char * attr) +{ + const char * end = strchr(s, '>'); + const char * p = s; + if (attr == NULL) return end; + do { + p = strstr(p, attr); + if (!p || p >= end) return 0; + } while (*(p-1) != ' ' && *(p-1) != '\n'); + return p + strlen(attr); +} + +int Hunspell::check_xml_par(const char * q, const char * attr, const char * value) { + char cw[MAXWORDUTF8LEN]; + if (get_xml_par(cw, get_xml_pos(q, attr), MAXWORDUTF8LEN - 1) && + strcmp(cw, value) == 0) return 1; + return 0; +} + +int Hunspell::get_xml_list(char ***slst, char * list, const char * tag) { + int n = 0; + char * p; + if (!list) return 0; + for (p = list; (p = strstr(p, tag)); p++) n++; + if (n == 0) return 0; + *slst = (char **) malloc(sizeof(char *) * n); + if (!*slst) return 0; + for (p = list, n = 0; (p = strstr(p, tag)); p++, n++) { + int l = strlen(p); + (*slst)[n] = (char *) malloc(l + 1); + if (!(*slst)[n]) return n; + if (!get_xml_par((*slst)[n], p + strlen(tag) - 1, l)) { + free((*slst)[n]); + break; + } + } + return n; +} + +int Hunspell::spellml(char*** slst, const char * word) +{ + char *q, *q2; + char cw[MAXWORDUTF8LEN], cw2[MAXWORDUTF8LEN]; + q = (char *) strstr(word, "'); + if (!q2) return 0; // bad XML input + q2 = strstr(q2, "'), MAXWORDUTF8LEN - 10)) n = analyze(slst, cw); + if (n == 0) return 0; + // convert the result to ana1ana2 format + for (int i = 0; i < n; i++) s+= strlen((*slst)[i]); + char * r = (char *) malloc(6 + 5 * s + 7 * n + 7 + 1); // XXX 5*s->&->& + if (!r) return 0; + strcpy(r, ""); + for (int i = 0; i < n; i++) { + int l = strlen(r); + strcpy(r + l, ""); + strcpy(r + l + 3, (*slst)[i]); + mystrrep(r + l + 3, "\t", " "); + mystrrep(r + l + 3, "<", "<"); + mystrrep(r + l + 3, "&", "&"); + strcat(r, ""); + free((*slst)[i]); + } + strcat(r, ""); + (*slst)[0] = r; + return 1; + } else if (check_xml_par(q, "type=", "stem")) { + if (get_xml_par(cw, strchr(q2, '>'), MAXWORDUTF8LEN - 1)) return stem(slst, cw); + } else if (check_xml_par(q, "type=", "generate")) { + int n = get_xml_par(cw, strchr(q2, '>'), MAXWORDUTF8LEN - 1); + if (n == 0) return 0; + char * q3 = strstr(q2 + 1, "'), MAXWORDUTF8LEN - 1)) { + return generate(slst, cw, cw2); + } + } else { + if ((q2 = strstr(q2 + 1, "'), ""))) { + int n2 = generate(slst, cw, slst2, n); + freelist(&slst2, n); + return uniqlist(*slst, n2); + } + freelist(&slst2, n); + } + } + } + return 0; +} + + +#ifdef HUNSPELL_EXPERIMENTAL +// XXX need UTF-8 support +char * Hunspell::morph_with_correction(const char * word) +{ + char cw[MAXWORDUTF8LEN]; + char wspace[MAXWORDUTF8LEN]; + if (! pSMgr || maxdic == 0) return NULL; + int wl = strlen(word); + if (utf8) { + if (wl >= MAXWORDUTF8LEN) return NULL; + } else { + if (wl >= MAXWORDLEN) return NULL; + } + int captype = 0; + int abbv = 0; + wl = cleanword(cw, word, &captype, &abbv); + if (wl == 0) return NULL; + + char result[MAXLNLEN]; + char * st = NULL; + + *result = '\0'; + + + switch(captype) { + case NOCAP: { + st = pSMgr->suggest_morph_for_spelling_error(cw); + if (st) { + mystrcat(result, st, MAXLNLEN); + free(st); + } + if (abbv) { + memcpy(wspace,cw,wl); + *(wspace+wl) = '.'; + *(wspace+wl+1) = '\0'; + st = pSMgr->suggest_morph_for_spelling_error(wspace); + if (st) { + if (*result) mystrcat(result, "\n", MAXLNLEN); + mystrcat(result, st, MAXLNLEN); + free(st); + } + } + break; + } + case INITCAP: { + memcpy(wspace,cw,(wl+1)); + mkallsmall(wspace); + st = pSMgr->suggest_morph_for_spelling_error(wspace); + if (st) { + mystrcat(result, st, MAXLNLEN); + free(st); + } + st = pSMgr->suggest_morph_for_spelling_error(cw); + if (st) { + if (*result) mystrcat(result, "\n", MAXLNLEN); + mystrcat(result, st, MAXLNLEN); + free(st); + } + if (abbv) { + memcpy(wspace,cw,wl); + *(wspace+wl) = '.'; + *(wspace+wl+1) = '\0'; + mkallsmall(wspace); + st = pSMgr->suggest_morph_for_spelling_error(wspace); + if (st) { + if (*result) mystrcat(result, "\n", MAXLNLEN); + mystrcat(result, st, MAXLNLEN); + free(st); + } + mkinitcap(wspace); + st = pSMgr->suggest_morph_for_spelling_error(wspace); + if (st) { + if (*result) mystrcat(result, "\n", MAXLNLEN); + mystrcat(result, st, MAXLNLEN); + free(st); + } + } + break; + } + case HUHCAP: { + st = pSMgr->suggest_morph_for_spelling_error(cw); + if (st) { + mystrcat(result, st, MAXLNLEN); + free(st); + } + memcpy(wspace,cw,(wl+1)); + mkallsmall(wspace); + st = pSMgr->suggest_morph_for_spelling_error(wspace); + if (st) { + if (*result) mystrcat(result, "\n", MAXLNLEN); + mystrcat(result, st, MAXLNLEN); + free(st); + } + break; + } + case ALLCAP: { + memcpy(wspace,cw,(wl+1)); + st = pSMgr->suggest_morph_for_spelling_error(wspace); + if (st) { + mystrcat(result, st, MAXLNLEN); + free(st); + } + mkallsmall(wspace); + st = pSMgr->suggest_morph_for_spelling_error(wspace); + if (st) { + if (*result) mystrcat(result, "\n", MAXLNLEN); + mystrcat(result, st, MAXLNLEN); + free(st); + } + mkinitcap(wspace); + st = pSMgr->suggest_morph_for_spelling_error(wspace); + if (st) { + if (*result) mystrcat(result, "\n", MAXLNLEN); + mystrcat(result, st, MAXLNLEN); + free(st); + } + if (abbv) { + memcpy(wspace,cw,(wl+1)); + *(wspace+wl) = '.'; + *(wspace+wl+1) = '\0'; + if (*result) mystrcat(result, "\n", MAXLNLEN); + st = pSMgr->suggest_morph_for_spelling_error(wspace); + if (st) { + mystrcat(result, st, MAXLNLEN); + free(st); + } + mkallsmall(wspace); + st = pSMgr->suggest_morph_for_spelling_error(wspace); + if (st) { + if (*result) mystrcat(result, "\n", MAXLNLEN); + mystrcat(result, st, MAXLNLEN); + free(st); + } + mkinitcap(wspace); + st = pSMgr->suggest_morph_for_spelling_error(wspace); + if (st) { + if (*result) mystrcat(result, "\n", MAXLNLEN); + mystrcat(result, st, MAXLNLEN); + free(st); + } + } + break; + } + } + + if (*result) return mystrdup(result); + return NULL; +} + +#endif // END OF HUNSPELL_EXPERIMENTAL CODE + +Hunhandle *Hunspell_create(const char * affpath, const char * dpath) +{ + return (Hunhandle*)(new Hunspell(affpath, dpath)); +} + +Hunhandle *Hunspell_create_key(const char * affpath, const char * dpath, + const char * key) +{ + return (Hunhandle*)(new Hunspell(affpath, dpath, key)); +} + +void Hunspell_destroy(Hunhandle *pHunspell) +{ + delete (Hunspell*)(pHunspell); +} + +int Hunspell_spell(Hunhandle *pHunspell, const char *word) +{ + return ((Hunspell*)pHunspell)->spell(word); +} + +char *Hunspell_get_dic_encoding(Hunhandle *pHunspell) +{ + return ((Hunspell*)pHunspell)->get_dic_encoding(); +} + +int Hunspell_suggest(Hunhandle *pHunspell, char*** slst, const char * word) +{ + return ((Hunspell*)pHunspell)->suggest(slst, word); +} + +int Hunspell_analyze(Hunhandle *pHunspell, char*** slst, const char * word) +{ + return ((Hunspell*)pHunspell)->analyze(slst, word); +} + +int Hunspell_stem(Hunhandle *pHunspell, char*** slst, const char * word) +{ + return ((Hunspell*)pHunspell)->stem(slst, word); +} + +int Hunspell_stem2(Hunhandle *pHunspell, char*** slst, char** desc, int n) +{ + return ((Hunspell*)pHunspell)->stem(slst, desc, n); +} + +int Hunspell_generate(Hunhandle *pHunspell, char*** slst, const char * word, + const char * word2) +{ + return ((Hunspell*)pHunspell)->generate(slst, word, word2); +} + +int Hunspell_generate2(Hunhandle *pHunspell, char*** slst, const char * word, + char** desc, int n) +{ + return ((Hunspell*)pHunspell)->generate(slst, word, desc, n); +} + + /* functions for run-time modification of the dictionary */ + + /* add word to the run-time dictionary */ + +int Hunspell_add(Hunhandle *pHunspell, const char * word) { + return ((Hunspell*)pHunspell)->add(word); +} + + /* add word to the run-time dictionary with affix flags of + * the example (a dictionary word): Hunspell will recognize + * affixed forms of the new word, too. + */ + +int Hunspell_add_with_affix(Hunhandle *pHunspell, const char * word, + const char * example) { + return ((Hunspell*)pHunspell)->add_with_affix(word, example); +} + + /* remove word from the run-time dictionary */ + +int Hunspell_remove(Hunhandle *pHunspell, const char * word) { + return ((Hunspell*)pHunspell)->remove(word); +} + +void Hunspell_free_list(Hunhandle *, char *** slst, int n) { + freelist(slst, n); +} diff --git a/plugins/SpellChecker/src/hunspell/hunspell.dsp b/plugins/SpellChecker/src/hunspell/hunspell.dsp new file mode 100644 index 0000000000..c182621742 --- /dev/null +++ b/plugins/SpellChecker/src/hunspell/hunspell.dsp @@ -0,0 +1,164 @@ +# Microsoft Developer Studio Project File - Name="hunspell" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=hunspell - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "hunspell.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "hunspell.mak" CFG="hunspell - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "hunspell - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "hunspell - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "hunspell - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "W32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /D "W32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD BASE RSC /l 0x40e /d "NDEBUG" +# ADD RSC /l 0x40e /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "hunspell - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "W32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "W32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40e /d "_DEBUG" +# ADD RSC /l 0x40e /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ENDIF + +# Begin Target + +# Name "hunspell - Win32 Release" +# Name "hunspell - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\affentry.cxx +# End Source File +# Begin Source File + +SOURCE=.\affixmgr.cxx +# End Source File +# Begin Source File + +SOURCE=.\csutil.cxx +# End Source File +# Begin Source File + +SOURCE=.\dictmgr.cxx +# End Source File +# Begin Source File + +SOURCE=.\hashmgr.cxx +# End Source File +# Begin Source File + +SOURCE=.\hunspell.cxx +# End Source File +# Begin Source File + +SOURCE=.\suggestmgr.cxx +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\affentry.hxx +# End Source File +# Begin Source File + +SOURCE=.\affixmgr.hxx +# End Source File +# Begin Source File + +SOURCE=.\atypes.hxx +# End Source File +# Begin Source File + +SOURCE=.\baseaffix.hxx +# End Source File +# Begin Source File + +SOURCE=.\csutil.hxx +# End Source File +# Begin Source File + +SOURCE=.\dictmgr.hxx +# End Source File +# Begin Source File + +SOURCE=.\hashmgr.hxx +# End Source File +# Begin Source File + +SOURCE=.\htypes.hxx +# End Source File +# Begin Source File + +SOURCE=.\langnum.hxx +# End Source File +# Begin Source File + +SOURCE=.\hunspell.hxx +# End Source File +# Begin Source File + +SOURCE=.\suggestmgr.hxx +# End Source File +# End Group +# End Target +# End Project diff --git a/plugins/SpellChecker/src/hunspell/hunspell.h b/plugins/SpellChecker/src/hunspell/hunspell.h new file mode 100644 index 0000000000..627968a3da --- /dev/null +++ b/plugins/SpellChecker/src/hunspell/hunspell.h @@ -0,0 +1,95 @@ +#ifndef _MYSPELLMGR_H_ +#define _MYSPELLMGR_H_ + +#include "hunvisapi.h" + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct Hunhandle Hunhandle; + +LIBHUNSPELL_DLL_EXPORTED Hunhandle *Hunspell_create(const char * affpath, const char * dpath); + +LIBHUNSPELL_DLL_EXPORTED Hunhandle *Hunspell_create_key(const char * affpath, const char * dpath, + const char * key); + +LIBHUNSPELL_DLL_EXPORTED void Hunspell_destroy(Hunhandle *pHunspell); + +/* spell(word) - spellcheck word + * output: 0 = bad word, not 0 = good word + */ +LIBHUNSPELL_DLL_EXPORTED int Hunspell_spell(Hunhandle *pHunspell, const char *); + +LIBHUNSPELL_DLL_EXPORTED char *Hunspell_get_dic_encoding(Hunhandle *pHunspell); + +/* suggest(suggestions, word) - search suggestions + * input: pointer to an array of strings pointer and the (bad) word + * array of strings pointer (here *slst) may not be initialized + * output: number of suggestions in string array, and suggestions in + * a newly allocated array of strings (*slts will be NULL when number + * of suggestion equals 0.) + */ +LIBHUNSPELL_DLL_EXPORTED int Hunspell_suggest(Hunhandle *pHunspell, char*** slst, const char * word); + + /* morphological functions */ + + /* analyze(result, word) - morphological analysis of the word */ + +LIBHUNSPELL_DLL_EXPORTED int Hunspell_analyze(Hunhandle *pHunspell, char*** slst, const char * word); + + /* stem(result, word) - stemmer function */ + +LIBHUNSPELL_DLL_EXPORTED int Hunspell_stem(Hunhandle *pHunspell, char*** slst, const char * word); + + /* stem(result, analysis, n) - get stems from a morph. analysis + * example: + * char ** result, result2; + * int n1 = Hunspell_analyze(result, "words"); + * int n2 = Hunspell_stem2(result2, result, n1); + */ + +LIBHUNSPELL_DLL_EXPORTED int Hunspell_stem2(Hunhandle *pHunspell, char*** slst, char** desc, int n); + + /* generate(result, word, word2) - morphological generation by example(s) */ + +LIBHUNSPELL_DLL_EXPORTED int Hunspell_generate(Hunhandle *pHunspell, char*** slst, const char * word, + const char * word2); + + /* generate(result, word, desc, n) - generation by morph. description(s) + * example: + * char ** result; + * char * affix = "is:plural"; // description depends from dictionaries, too + * int n = Hunspell_generate2(result, "word", &affix, 1); + * for (int i = 0; i < n; i++) printf("%s\n", result[i]); + */ + +LIBHUNSPELL_DLL_EXPORTED int Hunspell_generate2(Hunhandle *pHunspell, char*** slst, const char * word, + char** desc, int n); + + /* functions for run-time modification of the dictionary */ + + /* add word to the run-time dictionary */ + +LIBHUNSPELL_DLL_EXPORTED int Hunspell_add(Hunhandle *pHunspell, const char * word); + + /* add word to the run-time dictionary with affix flags of + * the example (a dictionary word): Hunspell will recognize + * affixed forms of the new word, too. + */ + +LIBHUNSPELL_DLL_EXPORTED int Hunspell_add_with_affix(Hunhandle *pHunspell, const char * word, const char * example); + + /* remove word from the run-time dictionary */ + +LIBHUNSPELL_DLL_EXPORTED int Hunspell_remove(Hunhandle *pHunspell, const char * word); + + /* free suggestion lists */ + +LIBHUNSPELL_DLL_EXPORTED void Hunspell_free_list(Hunhandle *pHunspell, char *** slst, int n); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/plugins/SpellChecker/src/hunspell/hunspell.hxx b/plugins/SpellChecker/src/hunspell/hunspell.hxx new file mode 100644 index 0000000000..a25c637f0d --- /dev/null +++ b/plugins/SpellChecker/src/hunspell/hunspell.hxx @@ -0,0 +1,174 @@ +#include "hunvisapi.h" + +#include "hashmgr.hxx" +#include "affixmgr.hxx" +#include "suggestmgr.hxx" +#include "langnum.hxx" + +#define SPELL_XML "" + +#define MAXDIC 20 +#define MAXSUGGESTION 15 +#define MAXSHARPS 5 + +#define HUNSPELL_OK (1 << 0) +#define HUNSPELL_OK_WARN (1 << 1) + +#ifndef _MYSPELLMGR_HXX_ +#define _MYSPELLMGR_HXX_ + +class LIBHUNSPELL_DLL_EXPORTED Hunspell +{ + AffixMgr* pAMgr; + HashMgr* pHMgr[MAXDIC]; + int maxdic; + SuggestMgr* pSMgr; + char * affixpath; + char * encoding; + struct cs_info * csconv; + int langnum; + int utf8; + int complexprefixes; + char** wordbreak; + +public: + + /* Hunspell(aff, dic) - constructor of Hunspell class + * input: path of affix file and dictionary file + */ + + Hunspell(const char * affpath, const char * dpath, const char * key = NULL); + ~Hunspell(); + + /* load extra dictionaries (only dic files) */ + int add_dic(const char * dpath, const char * key = NULL); + + /* spell(word) - spellcheck word + * output: 0 = bad word, not 0 = good word + * + * plus output: + * info: information bit array, fields: + * SPELL_COMPOUND = a compound word + * SPELL_FORBIDDEN = an explicit forbidden word + * root: root (stem), when input is a word with affix(es) + */ + + int spell(const char * word, int * info = NULL, char ** root = NULL); + + /* suggest(suggestions, word) - search suggestions + * input: pointer to an array of strings pointer and the (bad) word + * array of strings pointer (here *slst) may not be initialized + * output: number of suggestions in string array, and suggestions in + * a newly allocated array of strings (*slts will be NULL when number + * of suggestion equals 0.) + */ + + int suggest(char*** slst, const char * word); + + /* deallocate suggestion lists */ + + void free_list(char *** slst, int n); + + char * get_dic_encoding(); + + /* morphological functions */ + + /* analyze(result, word) - morphological analysis of the word */ + + int analyze(char*** slst, const char * word); + + /* stem(result, word) - stemmer function */ + + int stem(char*** slst, const char * word); + + /* stem(result, analysis, n) - get stems from a morph. analysis + * example: + * char ** result, result2; + * int n1 = analyze(&result, "words"); + * int n2 = stem(&result2, result, n1); + */ + + int stem(char*** slst, char ** morph, int n); + + /* generate(result, word, word2) - morphological generation by example(s) */ + + int generate(char*** slst, const char * word, const char * word2); + + /* generate(result, word, desc, n) - generation by morph. description(s) + * example: + * char ** result; + * char * affix = "is:plural"; // description depends from dictionaries, too + * int n = generate(&result, "word", &affix, 1); + * for (int i = 0; i < n; i++) printf("%s\n", result[i]); + */ + + int generate(char*** slst, const char * word, char ** desc, int n); + + /* functions for run-time modification of the dictionary */ + + /* add word to the run-time dictionary */ + + int add(const char * word); + + /* add word to the run-time dictionary with affix flags of + * the example (a dictionary word): Hunspell will recognize + * affixed forms of the new word, too. + */ + + int add_with_affix(const char * word, const char * example); + + /* remove word from the run-time dictionary */ + + int remove(const char * word); + + /* other */ + + /* get extra word characters definied in affix file for tokenization */ + const char * get_wordchars(); + unsigned short * get_wordchars_utf16(int * len); + + char * get_try_string(); + + struct cs_info * get_csconv(); + const char * get_version(); + + int get_langnum() const; + + /* experimental and deprecated functions */ + +#ifdef HUNSPELL_EXPERIMENTAL + /* suffix is an affix flag string, similarly in dictionary files */ + int put_word_suffix(const char * word, const char * suffix); + char * morph_with_correction(const char * word); + + /* spec. suggestions */ + int suggest_auto(char*** slst, const char * word); + int suggest_pos_stems(char*** slst, const char * word); +#endif + +private: + int cleanword(char *, const char *, int * pcaptype, int * pabbrev); + int cleanword2(char *, const char *, w_char *, int * w_len, int * pcaptype, int * pabbrev); + void mkinitcap(char *); + int mkinitcap2(char * p, w_char * u, int nc); + int mkinitsmall2(char * p, w_char * u, int nc); + void mkallcap(char *); + int mkallcap2(char * p, w_char * u, int nc); + void mkallsmall(char *); + int mkallsmall2(char * p, w_char * u, int nc); + struct hentry * checkword(const char *, int * info, char **root); + char * sharps_u8_l1(char * dest, char * source); + hentry * spellsharps(char * base, char *, int, int, char * tmp, int * info, char **root); + int is_keepcase(const hentry * rv); + int insert_sug(char ***slst, char * word, int ns); + void cat_result(char * result, char * st); + char * stem_description(const char * desc); + int spellml(char*** slst, const char * word); + int get_xml_par(char * dest, const char * par, int maxl); + const char * get_xml_pos(const char * s, const char * attr); + int get_xml_list(char ***slst, char * list, const char * tag); + int check_xml_par(const char * q, const char * attr, const char * value); + +}; + +#endif diff --git a/plugins/SpellChecker/src/hunspell/hunvisapi.h b/plugins/SpellChecker/src/hunspell/hunvisapi.h new file mode 100644 index 0000000000..4712280ad2 --- /dev/null +++ b/plugins/SpellChecker/src/hunspell/hunvisapi.h @@ -0,0 +1,18 @@ +#ifndef _HUNSPELL_VISIBILITY_H_ +#define _HUNSPELL_VISIBILITY_H_ + +#if defined(HUNSPELL_STATIC) +# define LIBHUNSPELL_DLL_EXPORTED +#elif defined(_MSC_VER) +# if defined(BUILDING_LIBHUNSPELL) +# define LIBHUNSPELL_DLL_EXPORTED __declspec(dllexport) +# else +# define LIBHUNSPELL_DLL_EXPORTED __declspec(dllimport) +# endif +#elif BUILDING_LIBHUNSPELL && 1 +# define LIBHUNSPELL_DLL_EXPORTED __attribute__((__visibility__("default"))) +#else +# define LIBHUNSPELL_DLL_EXPORTED +#endif + +#endif diff --git a/plugins/SpellChecker/src/hunspell/hunzip.cxx b/plugins/SpellChecker/src/hunspell/hunzip.cxx new file mode 100644 index 0000000000..b50599fa84 --- /dev/null +++ b/plugins/SpellChecker/src/hunspell/hunzip.cxx @@ -0,0 +1,193 @@ +#include +#include +#include + +#include "hunzip.hxx" + +#define CODELEN 65536 +#define BASEBITREC 5000 + +#define UNCOMPRESSED '\002' +#define MAGIC "hz0" +#define MAGIC_ENCRYPT "hz1" +#define MAGICLEN (sizeof(MAGIC) - 1) + +int Hunzip::fail(const char * err, const char * par) { + fprintf(stderr, err, par); + return -1; +} + +Hunzip::Hunzip(const char * file, const char * key) { + bufsiz = 0; + lastbit = 0; + inc = 0; + outc = 0; + dec = NULL; + fin = NULL; + filename = (char *) malloc(strlen(file) + 1); + if (filename) strcpy(filename, file); + if (getcode(key) == -1) bufsiz = -1; + else bufsiz = getbuf(); +} + +int Hunzip::getcode(const char * key) { + unsigned char c[2]; + int i, j, n, p; + int allocatedbit = BASEBITREC; + const char * enc = key; + + if (!filename) return -1; + + fin = fopen(filename, "rb"); + if (!fin) return -1; + + // read magic number + if ((fread(in, 1, 3, fin) < MAGICLEN) + || !(strncmp(MAGIC, in, MAGICLEN) == 0 || + strncmp(MAGIC_ENCRYPT, in, MAGICLEN) == 0)) { + return fail(MSG_FORMAT, filename); + } + + // check encryption + if (strncmp(MAGIC_ENCRYPT, in, MAGICLEN) == 0) { + unsigned char cs; + if (!key) return fail(MSG_KEY, filename); + if (fread(&c, 1, 1, fin) < 1) return fail(MSG_FORMAT, filename); + for (cs = 0; *enc; enc++) cs ^= *enc; + if (cs != c[0]) return fail(MSG_KEY, filename); + enc = key; + } else key = NULL; + + // read record count + if (fread(&c, 1, 2, fin) < 2) return fail(MSG_FORMAT, filename); + + if (key) { + c[0] ^= *enc; + if (*(++enc) == '\0') enc = key; + c[1] ^= *enc; + } + + n = ((int) c[0] << 8) + c[1]; + dec = (struct bit *) malloc(BASEBITREC * sizeof(struct bit)); + if (!dec) return fail(MSG_MEMORY, filename); + dec[0].v[0] = 0; + dec[0].v[1] = 0; + + // read codes + for (i = 0; i < n; i++) { + unsigned char l; + if (fread(c, 1, 2, fin) < 2) return fail(MSG_FORMAT, filename); + if (key) { + if (*(++enc) == '\0') enc = key; + c[0] ^= *enc; + if (*(++enc) == '\0') enc = key; + c[1] ^= *enc; + } + if (fread(&l, 1, 1, fin) < 1) return fail(MSG_FORMAT, filename); + if (key) { + if (*(++enc) == '\0') enc = key; + l ^= *enc; + } + if (fread(in, 1, l/8+1, fin) < (size_t) l/8+1) return fail(MSG_FORMAT, filename); + if (key) for (j = 0; j <= l/8; j++) { + if (*(++enc) == '\0') enc = key; + in[j] ^= *enc; + } + p = 0; + for (j = 0; j < l; j++) { + int b = (in[j/8] & (1 << (7 - (j % 8)))) ? 1 : 0; + int oldp = p; + p = dec[p].v[b]; + if (p == 0) { + lastbit++; + if (lastbit == allocatedbit) { + allocatedbit += BASEBITREC; + dec = (struct bit *) realloc(dec, allocatedbit * sizeof(struct bit)); + } + dec[lastbit].v[0] = 0; + dec[lastbit].v[1] = 0; + dec[oldp].v[b] = lastbit; + p = lastbit; + } + } + dec[p].c[0] = c[0]; + dec[p].c[1] = c[1]; + } + return 0; +} + +Hunzip::~Hunzip() +{ + if (dec) free(dec); + if (fin) fclose(fin); + if (filename) free(filename); +} + +int Hunzip::getbuf() { + int p = 0; + int o = 0; + do { + if (inc == 0) inbits = fread(in, 1, BUFSIZE, fin) * 8; + for (; inc < inbits; inc++) { + int b = (in[inc / 8] & (1 << (7 - (inc % 8)))) ? 1 : 0; + int oldp = p; + p = dec[p].v[b]; + if (p == 0) { + if (oldp == lastbit) { + fclose(fin); + fin = NULL; + // add last odd byte + if (dec[lastbit].c[0]) out[o++] = dec[lastbit].c[1]; + return o; + } + out[o++] = dec[oldp].c[0]; + out[o++] = dec[oldp].c[1]; + if (o == BUFSIZE) return o; + p = dec[p].v[b]; + } + } + inc = 0; + } while (inbits == BUFSIZE * 8); + return fail(MSG_FORMAT, filename); +} + +const char * Hunzip::getline() { + char linebuf[BUFSIZE]; + int l = 0, eol = 0, left = 0, right = 0; + if (bufsiz == -1) return NULL; + while (l < bufsiz && !eol) { + linebuf[l++] = out[outc]; + switch (out[outc]) { + case '\t': break; + case 31: { // escape + if (++outc == bufsiz) { + bufsiz = getbuf(); + outc = 0; + } + linebuf[l - 1] = out[outc]; + break; + } + case ' ': break; + default: if (((unsigned char) out[outc]) < 47) { + if (out[outc] > 32) { + right = out[outc] - 31; + if (++outc == bufsiz) { + bufsiz = getbuf(); + outc = 0; + } + } + if (out[outc] == 30) left = 9; else left = out[outc]; + linebuf[l-1] = '\n'; + eol = 1; + } + } + if (++outc == bufsiz) { + outc = 0; + bufsiz = fin ? getbuf(): -1; + } + } + if (right) strcpy(linebuf + l - 1, line + strlen(line) - right - 1); + else linebuf[l] = '\0'; + strcpy(line + left, linebuf); + return line; +} diff --git a/plugins/SpellChecker/src/hunspell/hunzip.hxx b/plugins/SpellChecker/src/hunspell/hunzip.hxx new file mode 100644 index 0000000000..b58e3ab1dc --- /dev/null +++ b/plugins/SpellChecker/src/hunspell/hunzip.hxx @@ -0,0 +1,45 @@ +/* hunzip: file decompression for sorted dictionaries with optional encryption, + * algorithm: prefix-suffix encoding and 16-bit Huffman encoding */ + +#ifndef _HUNZIP_HXX_ +#define _HUNZIP_HXX_ + +#include "hunvisapi.h" + +#include + +#define BUFSIZE 65536 +#define HZIP_EXTENSION ".hz" + +#define MSG_OPEN "error: %s: cannot open\n" +#define MSG_FORMAT "error: %s: not in hzip format\n" +#define MSG_MEMORY "error: %s: missing memory\n" +#define MSG_KEY "error: %s: missing or bad password\n" + +struct bit { + unsigned char c[2]; + int v[2]; +}; + +class LIBHUNSPELL_DLL_EXPORTED Hunzip +{ + +protected: + char * filename; + FILE * fin; + int bufsiz, lastbit, inc, inbits, outc; + struct bit * dec; // code table + char in[BUFSIZE]; // input buffer + char out[BUFSIZE + 1]; // Huffman-decoded buffer + char line[BUFSIZE + 50]; // decoded line + int getcode(const char * key); + int getbuf(); + int fail(const char * err, const char * par); + +public: + Hunzip(const char * filename, const char * key = NULL); + ~Hunzip(); + const char * getline(); +}; + +#endif diff --git a/plugins/SpellChecker/src/hunspell/langnum.hxx b/plugins/SpellChecker/src/hunspell/langnum.hxx new file mode 100644 index 0000000000..1d140a701b --- /dev/null +++ b/plugins/SpellChecker/src/hunspell/langnum.hxx @@ -0,0 +1,38 @@ +#ifndef _LANGNUM_HXX_ +#define _LANGNUM_HXX_ + +/* + language numbers for language specific codes + see http://l10n.openoffice.org/languages.html +*/ + +enum { +LANG_ar=96, +LANG_az=100, // custom number +LANG_bg=41, +LANG_ca=37, +LANG_cs=42, +LANG_da=45, +LANG_de=49, +LANG_el=30, +LANG_en=01, +LANG_es=34, +LANG_eu=10, +LANG_fr=02, +LANG_gl=38, +LANG_hr=78, +LANG_hu=36, +LANG_it=39, +LANG_la=99, // custom number +LANG_lv=101, // custom number +LANG_nl=31, +LANG_pl=48, +LANG_pt=03, +LANG_ru=07, +LANG_sv=50, +LANG_tr=90, +LANG_uk=80, +LANG_xx=999 +}; + +#endif diff --git a/plugins/SpellChecker/src/hunspell/license.hunspell b/plugins/SpellChecker/src/hunspell/license.hunspell new file mode 100644 index 0000000000..490e440c74 --- /dev/null +++ b/plugins/SpellChecker/src/hunspell/license.hunspell @@ -0,0 +1,59 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Hunspell, based on MySpell. + * + * The Initial Developers of the Original Code are + * Kevin Hendricks (MySpell) and Laszlo Nemeth (Hunspell). + * Portions created by the Initial Developers are Copyright (C) 2002-2005 + * the Initial Developers. All Rights Reserved. + * + * Contributor(s): + * David Einstein + * Davide Prina + * Giuseppe Modugno + * Gianluca Turconi + * Simon Brouwer + * Noll Janos + * Biro Arpad + * Goldman Eleonora + * Sarlos Tamas + * Bencsath Boldizsar + * Halacsy Peter + * Dvornik Laszlo + * Gefferth Andras + * Nagy Viktor + * Varga Daniel + * Chris Halls + * Rene Engelhard + * Bram Moolenaar + * Dafydd Jones + * Harri Pitkanen + * Andras Timar + * Tor Lillqvist + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +#include "config.h" diff --git a/plugins/SpellChecker/src/hunspell/license.myspell b/plugins/SpellChecker/src/hunspell/license.myspell new file mode 100644 index 0000000000..2da5330750 --- /dev/null +++ b/plugins/SpellChecker/src/hunspell/license.myspell @@ -0,0 +1,61 @@ +/* + * Copyright 2002 Kevin B. Hendricks, Stratford, Ontario, Canada + * And Contributors. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * 3. All modifications to the source code must be clearly marked as + * such. Binary redistributions based on modified source code + * must be clearly marked as modified versions in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY KEVIN B. HENDRICKS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL + * KEVIN B. HENDRICKS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * + * NOTE: A special thanks and credit goes to Geoff Kuenning + * the creator of ispell. MySpell's affix algorithms were + * based on those of ispell which should be noted is + * copyright Geoff Kuenning et.al. and now available + * under a BSD style license. For more information on ispell + * and affix compression in general, please see: + * http://www.cs.ucla.edu/ficus-members/geoff/ispell.html + * (the home page for ispell) + * + * An almost complete rewrite of MySpell for use by + * the Mozilla project has been developed by David Einstein + * (Deinst@world.std.com). David and I are now + * working on parallel development tracks to help + * our respective projects (Mozilla and OpenOffice.org + * and we will maintain full affix file and dictionary + * file compatibility and work on merging our versions + * of MySpell back into a single tree. David has been + * a significant help in improving MySpell. + * + * Special thanks also go to La'szlo' Ne'meth + * who is the author of the + * Hungarian dictionary and who developed and contributed + * the code to support compound words in MySpell + * and fixed numerous problems with the encoding + * case conversion tables. + * + */ diff --git a/plugins/SpellChecker/src/hunspell/phonet.cxx b/plugins/SpellChecker/src/hunspell/phonet.cxx new file mode 100644 index 0000000000..3a849b4444 --- /dev/null +++ b/plugins/SpellChecker/src/hunspell/phonet.cxx @@ -0,0 +1,292 @@ +/* phonetic.c - generic replacement aglogithms for phonetic transformation + Copyright (C) 2000 Bjoern Jacke + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License version 2.1 as published by the Free Software Foundation; + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; If not, see + . + + Changelog: + + 2000-01-05 Bjoern Jacke + Initial Release insprired by the article about phonetic + transformations out of c't 25/1999 + + 2007-07-26 Bjoern Jacke + Released under MPL/GPL/LGPL tri-license for Hunspell + + 2007-08-23 Laszlo Nemeth + Porting from Aspell to Hunspell using C-like structs +*/ + +#include +#include +#include +#include + +#include "csutil.hxx" +#include "phonet.hxx" + +void init_phonet_hash(phonetable & parms) + { + int i, k; + + for (i = 0; i < HASHSIZE; i++) { + parms.hash[i] = -1; + } + + for (i = 0; parms.rules[i][0] != '\0'; i += 2) { + /** set hash value **/ + k = (unsigned char) parms.rules[i][0]; + + if (parms.hash[k] < 0) { + parms.hash[k] = i; + } + } + } + +// like strcpy but safe if the strings overlap +// but only if dest < src +static inline void strmove(char * dest, char * src) { + while (*src) + *dest++ = *src++; + *dest = '\0'; +} + +static int myisalpha(char ch) { + if ((unsigned char) ch < 128) return isalpha(ch); + return 1; +} + +/* phonetic transcription algorithm */ +/* see: http://aspell.net/man-html/Phonetic-Code.html */ +/* convert string to uppercase before this call */ +int phonet (const char * inword, char * target, + int len, + phonetable & parms) + { + /** Do phonetic transformation. **/ + /** "len" = length of "inword" incl. '\0'. **/ + + /** result: >= 0: length of "target" **/ + /** otherwise: error **/ + + int i,j,k=0,n,p,z; + int k0,n0,p0=-333,z0; + char c, c0; + const char * s; + typedef unsigned char uchar; + char word[MAXPHONETUTF8LEN + 1]; + if (len == -1) len = strlen(inword); + if (len > MAXPHONETUTF8LEN) return 0; + strcpy(word, inword); + + /** check word **/ + i = j = z = 0; + while ((c = word[i]) != '\0') { + n = parms.hash[(uchar) c]; + z0 = 0; + + if (n >= 0) { + /** check all rules for the same letter **/ + while (parms.rules[n][0] == c) { + + /** check whole string **/ + k = 1; /** number of found letters **/ + p = 5; /** default priority **/ + s = parms.rules[n]; + s++; /** important for (see below) "*(s-1)" **/ + + while (*s != '\0' && word[i+k] == *s + && !isdigit ((unsigned char) *s) && strchr ("(-<^$", *s) == NULL) { + k++; + s++; + } + if (*s == '(') { + /** check letters in "(..)" **/ + if (myisalpha(word[i+k]) // ...could be implied? + && strchr(s+1, word[i+k]) != NULL) { + k++; + while (*s != ')') + s++; + s++; + } + } + p0 = (int) *s; + k0 = k; + while (*s == '-' && k > 1) { + k--; + s++; + } + if (*s == '<') + s++; + if (isdigit ((unsigned char) *s)) { + /** determine priority **/ + p = *s - '0'; + s++; + } + if (*s == '^' && *(s+1) == '^') + s++; + + if (*s == '\0' + || (*s == '^' + && (i == 0 || ! myisalpha(word[i-1])) + && (*(s+1) != '$' + || (! myisalpha(word[i+k0])))) + || (*s == '$' && i > 0 + && myisalpha(word[i-1]) + && (! myisalpha(word[i+k0])))) + { + /** search for followup rules, if: **/ + /** parms.followup and k > 1 and NO '-' in searchstring **/ + c0 = word[i+k-1]; + n0 = parms.hash[(uchar) c0]; + +// if (parms.followup && k > 1 && n0 >= 0 + if (k > 1 && n0 >= 0 + && p0 != (int) '-' && word[i+k] != '\0') { + /** test follow-up rule for "word[i+k]" **/ + while (parms.rules[n0][0] == c0) { + + /** check whole string **/ + k0 = k; + p0 = 5; + s = parms.rules[n0]; + s++; + while (*s != '\0' && word[i+k0] == *s + && ! isdigit((unsigned char) *s) && strchr("(-<^$",*s) == NULL) { + k0++; + s++; + } + if (*s == '(') { + /** check letters **/ + if (myisalpha(word[i+k0]) + && strchr (s+1, word[i+k0]) != NULL) { + k0++; + while (*s != ')' && *s != '\0') + s++; + if (*s == ')') + s++; + } + } + while (*s == '-') { + /** "k0" gets NOT reduced **/ + /** because "if (k0 == k)" **/ + s++; + } + if (*s == '<') + s++; + if (isdigit ((unsigned char) *s)) { + p0 = *s - '0'; + s++; + } + + if (*s == '\0' + /** *s == '^' cuts **/ + || (*s == '$' && ! myisalpha(word[i+k0]))) + { + if (k0 == k) { + /** this is just a piece of the string **/ + n0 += 2; + continue; + } + + if (p0 < p) { + /** priority too low **/ + n0 += 2; + continue; + } + /** rule fits; stop search **/ + break; + } + n0 += 2; + } /** End of "while (parms.rules[n0][0] == c0)" **/ + + if (p0 >= p && parms.rules[n0][0] == c0) { + n += 2; + continue; + } + } /** end of follow-up stuff **/ + + /** replace string **/ + s = parms.rules[n+1]; + p0 = (parms.rules[n][0] != '\0' + && strchr (parms.rules[n]+1,'<') != NULL) ? 1:0; + if (p0 == 1 && z == 0) { + /** rule with '<' is used **/ + if (j > 0 && *s != '\0' + && (target[j-1] == c || target[j-1] == *s)) { + j--; + } + z0 = 1; + z = 1; + k0 = 0; + while (*s != '\0' && word[i+k0] != '\0') { + word[i+k0] = *s; + k0++; + s++; + } + if (k > k0) + strmove (&word[0]+i+k0, &word[0]+i+k); + + /** new "actual letter" **/ + c = word[i]; + } + else { /** no '<' rule used **/ + i += k - 1; + z = 0; + while (*s != '\0' + && *(s+1) != '\0' && j < len) { + if (j == 0 || target[j-1] != *s) { + target[j] = *s; + j++; + } + s++; + } + /** new "actual letter" **/ + c = *s; + if (parms.rules[n][0] != '\0' + && strstr (parms.rules[n]+1, "^^") != NULL) { + if (c != '\0') { + target[j] = c; + j++; + } + strmove (&word[0], &word[0]+i+1); + i = 0; + z0 = 1; + } + } + break; + } /** end of follow-up stuff **/ + n += 2; + } /** end of while (parms.rules[n][0] == c) **/ + } /** end of if (n >= 0) **/ + if (z0 == 0) { +// if (k && (assert(p0!=-333),!p0) && j < len && c != '\0' +// && (!parms.collapse_result || j == 0 || target[j-1] != c)){ + if (k && !p0 && j < len && c != '\0' + && (1 || j == 0 || target[j-1] != c)){ + /** condense only double letters **/ + target[j] = c; + ///printf("\n setting \n"); + j++; + } + + i++; + z = 0; + k=0; + } + } /** end of while ((c = word[i]) != '\0') **/ + + target[j] = '\0'; + return (j); + + } /** end of function "phonet" **/ diff --git a/plugins/SpellChecker/src/hunspell/phonet.hxx b/plugins/SpellChecker/src/hunspell/phonet.hxx new file mode 100644 index 0000000000..f91d3b02b8 --- /dev/null +++ b/plugins/SpellChecker/src/hunspell/phonet.hxx @@ -0,0 +1,52 @@ +/* phonetic.c - generic replacement aglogithms for phonetic transformation + Copyright (C) 2000 Bjoern Jacke + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License version 2.1 as published by the Free Software Foundation; + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; If not, see + . + + Changelog: + + 2000-01-05 Bjoern Jacke + Initial Release insprired by the article about phonetic + transformations out of c't 25/1999 + + 2007-07-26 Bjoern Jacke + Released under MPL/GPL/LGPL tri-license for Hunspell + + 2007-08-23 Laszlo Nemeth + Porting from Aspell to Hunspell using C-like structs +*/ + +#ifndef __PHONETHXX__ +#define __PHONETHXX__ + +#define HASHSIZE 256 +#define MAXPHONETLEN 256 +#define MAXPHONETUTF8LEN (MAXPHONETLEN * 4) + +#include "hunvisapi.h" + +struct phonetable { + char utf8; + cs_info * lang; + int num; + char * * rules; + int hash[HASHSIZE]; +}; + +LIBHUNSPELL_DLL_EXPORTED void init_phonet_hash(phonetable & parms); + +LIBHUNSPELL_DLL_EXPORTED int phonet (const char * inword, char * target, + int len, phonetable & phone); + +#endif diff --git a/plugins/SpellChecker/src/hunspell/replist.cxx b/plugins/SpellChecker/src/hunspell/replist.cxx new file mode 100644 index 0000000000..bc153733db --- /dev/null +++ b/plugins/SpellChecker/src/hunspell/replist.cxx @@ -0,0 +1,87 @@ +#include "license.hunspell" +#include "license.myspell" + +#include +#include +#include + +#include "replist.hxx" +#include "csutil.hxx" + +RepList::RepList(int n) { + dat = (replentry **) malloc(sizeof(replentry *) * n); + if (dat == 0) size = 0; else size = n; + pos = 0; +} + +RepList::~RepList() +{ + for (int i = 0; i < pos; i++) { + free(dat[i]->pattern); + free(dat[i]->pattern2); + free(dat[i]); + } + free(dat); +} + +int RepList::get_pos() { + return pos; +} + +replentry * RepList::item(int n) { + return dat[n]; +} + +int RepList::findnear(const char * word) { + int p1 = 0; + int p2 = pos; + while ((p2 - p1) > 1) { + int m = (p1 + p2) / 2; + int c = strcmp(word, dat[m]->pattern); + if (c <= 0) { + if (c < 0) p2 = m; else p1 = p2 = m; + } else p1 = m; + } + return p1; +} + +int RepList::match(const char * word, int n) { + if (strncmp(word, dat[n]->pattern, strlen(dat[n]->pattern)) == 0) return strlen(dat[n]->pattern); + return 0; +} + +int RepList::add(char * pat1, char * pat2) { + if (pos >= size || pat1 == NULL || pat2 == NULL) return 1; + replentry * r = (replentry *) malloc(sizeof(replentry)); + if (r == NULL) return 1; + r->pattern = mystrrep(pat1, "_", " "); + r->pattern2 = mystrrep(pat2, "_", " "); + r->start = false; + r->end = false; + dat[pos++] = r; + for (int i = pos - 1; i > 0; i--) { + r = dat[i]; + if (strcmp(r->pattern, dat[i - 1]->pattern) < 0) { + dat[i] = dat[i - 1]; + dat[i - 1] = r; + } else break; + } + return 0; +} + +int RepList::conv(const char * word, char * dest) { + int stl = 0; + int change = 0; + for (size_t i = 0; i < strlen(word); i++) { + int n = findnear(word + i); + int l = match(word + i, n); + if (l) { + strcpy(dest + stl, dat[n]->pattern2); + stl += strlen(dat[n]->pattern2); + i += l - 1; + change = 1; + } else dest[stl++] = word[i]; + } + dest[stl] = '\0'; + return change; +} diff --git a/plugins/SpellChecker/src/hunspell/replist.hxx b/plugins/SpellChecker/src/hunspell/replist.hxx new file mode 100644 index 0000000000..1cc039ebeb --- /dev/null +++ b/plugins/SpellChecker/src/hunspell/replist.hxx @@ -0,0 +1,27 @@ +/* string replacement list class */ +#ifndef _REPLIST_HXX_ +#define _REPLIST_HXX_ + +#include "hunvisapi.h" + +#include "w_char.hxx" + +class LIBHUNSPELL_DLL_EXPORTED RepList +{ +protected: + replentry ** dat; + int size; + int pos; + +public: + RepList(int n); + ~RepList(); + + int get_pos(); + int add(char * pat1, char * pat2); + replentry * item(int n); + int findnear(const char * word); + int match(const char * word, int n); + int conv(const char * word, char * dest); +}; +#endif diff --git a/plugins/SpellChecker/src/hunspell/suggestmgr.cxx b/plugins/SpellChecker/src/hunspell/suggestmgr.cxx new file mode 100644 index 0000000000..d08b506b9f --- /dev/null +++ b/plugins/SpellChecker/src/hunspell/suggestmgr.cxx @@ -0,0 +1,2001 @@ +#include "license.hunspell" +#include "license.myspell" + +#include +#include +#include +#include + +#include "suggestmgr.hxx" +#include "htypes.hxx" +#include "csutil.hxx" + +const w_char W_VLINE = { '\0', '|' }; + +SuggestMgr::SuggestMgr(const char * tryme, int maxn, + AffixMgr * aptr) +{ + + // register affix manager and check in string of chars to + // try when building candidate suggestions + pAMgr = aptr; + + csconv = NULL; + + ckeyl = 0; + ckey = NULL; + ckey_utf = NULL; + + ctryl = 0; + ctry = NULL; + ctry_utf = NULL; + + utf8 = 0; + langnum = 0; + complexprefixes = 0; + + maxSug = maxn; + nosplitsugs = 0; + maxngramsugs = MAXNGRAMSUGS; + maxcpdsugs = MAXCOMPOUNDSUGS; + + if (pAMgr) { + langnum = pAMgr->get_langnum(); + ckey = pAMgr->get_key_string(); + nosplitsugs = pAMgr->get_nosplitsugs(); + if (pAMgr->get_maxngramsugs() >= 0) + maxngramsugs = pAMgr->get_maxngramsugs(); + utf8 = pAMgr->get_utf8(); + if (pAMgr->get_maxcpdsugs() >= 0) + maxcpdsugs = pAMgr->get_maxcpdsugs(); + if (!utf8) + { + char * enc = pAMgr->get_encoding(); + csconv = get_current_cs(enc); + free(enc); + } + complexprefixes = pAMgr->get_complexprefixes(); + } + + if (ckey) { + if (utf8) { + w_char t[MAXSWL]; + ckeyl = u8_u16(t, MAXSWL, ckey); + ckey_utf = (w_char *) malloc(ckeyl * sizeof(w_char)); + if (ckey_utf) memcpy(ckey_utf, t, ckeyl * sizeof(w_char)); + else ckeyl = 0; + } else { + ckeyl = strlen(ckey); + } + } + + if (tryme) { + ctry = mystrdup(tryme); + if (ctry) ctryl = strlen(ctry); + if (ctry && utf8) { + w_char t[MAXSWL]; + ctryl = u8_u16(t, MAXSWL, tryme); + ctry_utf = (w_char *) malloc(ctryl * sizeof(w_char)); + if (ctry_utf) memcpy(ctry_utf, t, ctryl * sizeof(w_char)); + else ctryl = 0; + } + } +} + + +SuggestMgr::~SuggestMgr() +{ + pAMgr = NULL; + if (ckey) free(ckey); + ckey = NULL; + if (ckey_utf) free(ckey_utf); + ckey_utf = NULL; + ckeyl = 0; + if (ctry) free(ctry); + ctry = NULL; + if (ctry_utf) free(ctry_utf); + ctry_utf = NULL; + ctryl = 0; + maxSug = 0; +#ifdef MOZILLA_CLIENT + delete [] csconv; +#endif +} + +int SuggestMgr::testsug(char** wlst, const char * candidate, int wl, int ns, int cpdsuggest, + int * timer, clock_t * timelimit) { + int cwrd = 1; + if (ns == maxSug) return maxSug; + for (int k=0; k < ns; k++) { + if (strcmp(candidate,wlst[k]) == 0) cwrd = 0; + } + if ((cwrd) && checkword(candidate, wl, cpdsuggest, timer, timelimit)) { + wlst[ns] = mystrdup(candidate); + if (wlst[ns] == NULL) { + for (int j=0; j 0) oldSug = nsug; + + // suggestions for an uppercase word (html -> HTML) + if ((nsug < maxSug) && (nsug > -1)) { + nsug = (utf8) ? capchars_utf(wlst, word_utf, wl, nsug, cpdsuggest) : + capchars(wlst, word, nsug, cpdsuggest); + } + + // perhaps we made a typical fault of spelling + if ((nsug < maxSug) && (nsug > -1) && (!cpdsuggest || (nsug < oldSug + maxcpdsugs))) { + nsug = replchars(wlst, word, nsug, cpdsuggest); + } + + // perhaps we made chose the wrong char from a related set + if ((nsug < maxSug) && (nsug > -1) && (!cpdsuggest || (nsug < oldSug + maxcpdsugs))) { + nsug = mapchars(wlst, word, nsug, cpdsuggest); + } + + // only suggest compound words when no other suggestion + if ((cpdsuggest == 0) && (nsug > nsugorig)) nocompoundtwowords=1; + + // did we swap the order of chars by mistake + if ((nsug < maxSug) && (nsug > -1) && (!cpdsuggest || (nsug < oldSug + maxcpdsugs))) { + nsug = (utf8) ? swapchar_utf(wlst, word_utf, wl, nsug, cpdsuggest) : + swapchar(wlst, word, nsug, cpdsuggest); + } + + // did we swap the order of non adjacent chars by mistake + if ((nsug < maxSug) && (nsug > -1) && (!cpdsuggest || (nsug < oldSug + maxcpdsugs))) { + nsug = (utf8) ? longswapchar_utf(wlst, word_utf, wl, nsug, cpdsuggest) : + longswapchar(wlst, word, nsug, cpdsuggest); + } + + // did we just hit the wrong key in place of a good char (case and keyboard) + if ((nsug < maxSug) && (nsug > -1) && (!cpdsuggest || (nsug < oldSug + maxcpdsugs))) { + nsug = (utf8) ? badcharkey_utf(wlst, word_utf, wl, nsug, cpdsuggest) : + badcharkey(wlst, word, nsug, cpdsuggest); + } + + // did we add a char that should not be there + if ((nsug < maxSug) && (nsug > -1) && (!cpdsuggest || (nsug < oldSug + maxcpdsugs))) { + nsug = (utf8) ? extrachar_utf(wlst, word_utf, wl, nsug, cpdsuggest) : + extrachar(wlst, word, nsug, cpdsuggest); + } + + + // did we forgot a char + if ((nsug < maxSug) && (nsug > -1) && (!cpdsuggest || (nsug < oldSug + maxcpdsugs))) { + nsug = (utf8) ? forgotchar_utf(wlst, word_utf, wl, nsug, cpdsuggest) : + forgotchar(wlst, word, nsug, cpdsuggest); + } + + // did we move a char + if ((nsug < maxSug) && (nsug > -1) && (!cpdsuggest || (nsug < oldSug + maxcpdsugs))) { + nsug = (utf8) ? movechar_utf(wlst, word_utf, wl, nsug, cpdsuggest) : + movechar(wlst, word, nsug, cpdsuggest); + } + + // did we just hit the wrong key in place of a good char + if ((nsug < maxSug) && (nsug > -1) && (!cpdsuggest || (nsug < oldSug + maxcpdsugs))) { + nsug = (utf8) ? badchar_utf(wlst, word_utf, wl, nsug, cpdsuggest) : + badchar(wlst, word, nsug, cpdsuggest); + } + + // did we double two characters + if ((nsug < maxSug) && (nsug > -1) && (!cpdsuggest || (nsug < oldSug + maxcpdsugs))) { + nsug = (utf8) ? doubletwochars_utf(wlst, word_utf, wl, nsug, cpdsuggest) : + doubletwochars(wlst, word, nsug, cpdsuggest); + } + + // perhaps we forgot to hit space and two words ran together + if (!nosplitsugs && (nsug < maxSug) && (nsug > -1) && (!cpdsuggest || (nsug < oldSug + maxcpdsugs))) { + nsug = twowords(wlst, word, nsug, cpdsuggest); + } + + } // repeating ``for'' statement compounding support + + if (nsug < 0) { + // we ran out of memory - we should free up as much as possible + for (int i = 0; i < maxSug; i++) + if (wlst[i] != NULL) free(wlst[i]); + free(wlst); + wlst = NULL; + } + + if (!nocompoundtwowords && (nsug > 0) && onlycompoundsug) *onlycompoundsug = 1; + + *slst = wlst; + return nsug; +} + +// generate suggestions for a word with typical mistake +// pass in address of array of char * pointers +#ifdef HUNSPELL_EXPERIMENTAL +int SuggestMgr::suggest_auto(char*** slst, const char * w, int nsug) +{ + int nocompoundtwowords = 0; + char ** wlst; + int oldSug; + + char w2[MAXWORDUTF8LEN]; + const char * word = w; + + // word reversing wrapper for complex prefixes + if (complexprefixes) { + strcpy(w2, w); + if (utf8) reverseword_utf(w2); else reverseword(w2); + word = w2; + } + + if (*slst) { + wlst = *slst; + } else { + wlst = (char **) malloc(maxSug * sizeof(char *)); + if (wlst == NULL) return -1; + } + + for (int cpdsuggest=0; (cpdsuggest<2) && (nocompoundtwowords==0); cpdsuggest++) { + + // limit compound suggestion + if (cpdsuggest > 0) oldSug = nsug; + + // perhaps we made a typical fault of spelling + if ((nsug < maxSug) && (nsug > -1)) + nsug = replchars(wlst, word, nsug, cpdsuggest); + + // perhaps we made chose the wrong char from a related set + if ((nsug < maxSug) && (nsug > -1) && (!cpdsuggest || (nsug < oldSug + maxcpdsugs))) + nsug = mapchars(wlst, word, nsug, cpdsuggest); + + if ((cpdsuggest==0) && (nsug>0)) nocompoundtwowords=1; + + // perhaps we forgot to hit space and two words ran together + + if ((nsug < maxSug) && (nsug > -1) && (!cpdsuggest || (nsug < oldSug + maxcpdsugs)) && check_forbidden(word, strlen(word))) { + nsug = twowords(wlst, word, nsug, cpdsuggest); + } + + } // repeating ``for'' statement compounding support + + if (nsug < 0) { + for (int i=0;i HTML) +int SuggestMgr::capchars_utf(char ** wlst, const w_char * word, int wl, int ns, int cpdsuggest) +{ + char candidate[MAXSWUTF8L]; + w_char candidate_utf[MAXSWL]; + memcpy(candidate_utf, word, wl * sizeof(w_char)); + mkallcap_utf(candidate_utf, wl, langnum); + u16_u8(candidate, MAXSWUTF8L, candidate_utf, wl); + return testsug(wlst, candidate, strlen(candidate), ns, cpdsuggest, NULL, NULL); +} + +// suggestions for an uppercase word (html -> HTML) +int SuggestMgr::capchars(char** wlst, const char * word, int ns, int cpdsuggest) +{ + char candidate[MAXSWUTF8L]; + strcpy(candidate, word); + mkallcap(candidate, csconv); + return testsug(wlst, candidate, strlen(candidate), ns, cpdsuggest, NULL, NULL); +} + +// suggestions for when chose the wrong char out of a related set +int SuggestMgr::mapchars(char** wlst, const char * word, int ns, int cpdsuggest) +{ + char candidate[MAXSWUTF8L]; + clock_t timelimit; + int timer; + candidate[0] = '\0'; + + int wl = strlen(word); + if (wl < 2 || ! pAMgr) return ns; + + int nummap = pAMgr->get_nummap(); + struct mapentry* maptable = pAMgr->get_maptable(); + if (maptable==NULL) return ns; + + timelimit = clock(); + timer = MINTIMER; + return map_related(word, (char *) &candidate, 0, 0, wlst, cpdsuggest, ns, maptable, nummap, &timer, &timelimit); +} + +int SuggestMgr::map_related(const char * word, char * candidate, int wn, int cn, + char** wlst, int cpdsuggest, int ns, + const mapentry* maptable, int nummap, int * timer, clock_t * timelimit) +{ + if (*(word + wn) == '\0') { + int cwrd = 1; + *(candidate + cn) = '\0'; + int wl = strlen(candidate); + for (int m=0; m < ns; m++) + if (strcmp(candidate, wlst[m]) == 0) cwrd = 0; + if ((cwrd) && checkword(candidate, wl, cpdsuggest, timer, timelimit)) { + if (ns < maxSug) { + wlst[ns] = mystrdup(candidate); + if (wlst[ns] == NULL) return -1; + ns++; + } + } + return ns; + } + int in_map = 0; + for (int j = 0; j < nummap; j++) { + for (int k = 0; k < maptable[j].len; k++) { + int len = strlen(maptable[j].set[k]); + if (strncmp(maptable[j].set[k], word + wn, len) == 0) { + in_map = 1; + for (int l = 0; l < maptable[j].len; l++) { + strcpy(candidate + cn, maptable[j].set[l]); + ns = map_related(word, candidate, wn + len, strlen(candidate), wlst, + cpdsuggest, ns, maptable, nummap, timer, timelimit); + if (!(*timer)) return ns; + } + } + } + } + if (!in_map) { + *(candidate + cn) = *(word + wn); + ns = map_related(word, candidate, wn + 1, cn + 1, wlst, cpdsuggest, + ns, maptable, nummap, timer, timelimit); + } + return ns; +} + +// suggestions for a typical fault of spelling, that +// differs with more, than 1 letter from the right form. +int SuggestMgr::replchars(char** wlst, const char * word, int ns, int cpdsuggest) +{ + char candidate[MAXSWUTF8L]; + const char * r; + int lenr, lenp; + int wl = strlen(word); + if (wl < 2 || ! pAMgr) return ns; + int numrep = pAMgr->get_numrep(); + struct replentry* reptable = pAMgr->get_reptable(); + if (reptable==NULL) return ns; + for (int i=0; i < numrep; i++ ) { + r = word; + lenr = strlen(reptable[i].pattern2); + lenp = strlen(reptable[i].pattern); + // search every occurence of the pattern in the word + while ((r=strstr(r, reptable[i].pattern)) != NULL && (!reptable[i].end || strlen(r) == strlen(reptable[i].pattern)) && + (!reptable[i].start || r == word)) { + strcpy(candidate, word); + if (r-word + lenr + strlen(r+lenp) >= MAXSWUTF8L) break; + strcpy(candidate+(r-word),reptable[i].pattern2); + strcpy(candidate+(r-word)+lenr, r+lenp); + ns = testsug(wlst, candidate, wl-lenp+lenr, ns, cpdsuggest, NULL, NULL); + if (ns == -1) return -1; + // check REP suggestions with space + char * sp = strchr(candidate, ' '); + if (sp) { + char * prev = candidate; + while (sp) { + *sp = '\0'; + if (checkword(prev, strlen(prev), 0, NULL, NULL)) { + int oldns = ns; + *sp = ' '; + ns = testsug(wlst, sp + 1, strlen(sp + 1), ns, cpdsuggest, NULL, NULL); + if (ns == -1) return -1; + if (oldns < ns) { + free(wlst[ns - 1]); + wlst[ns - 1] = mystrdup(candidate); + if (!wlst[ns - 1]) return -1; + } + } + *sp = ' '; + prev = sp + 1; + sp = strchr(prev, ' '); + } + } + r++; // search for the next letter + } + } + return ns; +} + +// perhaps we doubled two characters (pattern aba -> ababa, for example vacation -> vacacation) +int SuggestMgr::doubletwochars(char** wlst, const char * word, int ns, int cpdsuggest) +{ + char candidate[MAXSWUTF8L]; + int state=0; + int wl = strlen(word); + if (wl < 5 || ! pAMgr) return ns; + for (int i=2; i < wl; i++ ) { + if (word[i]==word[i-2]) { + state++; + if (state==3) { + strcpy(candidate,word); + strcpy(candidate+i-1,word+i+1); + ns = testsug(wlst, candidate, wl-2, ns, cpdsuggest, NULL, NULL); + if (ns == -1) return -1; + state=0; + } + } else { + state=0; + } + } + return ns; +} + +// perhaps we doubled two characters (pattern aba -> ababa, for example vacation -> vacacation) +int SuggestMgr::doubletwochars_utf(char ** wlst, const w_char * word, int wl, int ns, int cpdsuggest) +{ + w_char candidate_utf[MAXSWL]; + char candidate[MAXSWUTF8L]; + int state=0; + if (wl < 5 || ! pAMgr) return ns; + for (int i=2; i < wl; i++) { + if (w_char_eq(word[i], word[i-2])) { + state++; + if (state==3) { + memcpy(candidate_utf, word, (i - 1) * sizeof(w_char)); + memcpy(candidate_utf+i-1, word+i+1, (wl-i-1) * sizeof(w_char)); + u16_u8(candidate, MAXSWUTF8L, candidate_utf, wl-2); + ns = testsug(wlst, candidate, strlen(candidate), ns, cpdsuggest, NULL, NULL); + if (ns == -1) return -1; + state=0; + } + } else { + state=0; + } + } + return ns; +} + +// error is wrong char in place of correct one (case and keyboard related version) +int SuggestMgr::badcharkey(char ** wlst, const char * word, int ns, int cpdsuggest) +{ + char tmpc; + char candidate[MAXSWUTF8L]; + int wl = strlen(word); + strcpy(candidate, word); + // swap out each char one by one and try uppercase and neighbor + // keyboard chars in its place to see if that makes a good word + + for (int i=0; i < wl; i++) { + tmpc = candidate[i]; + // check with uppercase letters + candidate[i] = csconv[((unsigned char)tmpc)].cupper; + if (tmpc != candidate[i]) { + ns = testsug(wlst, candidate, wl, ns, cpdsuggest, NULL, NULL); + if (ns == -1) return -1; + candidate[i] = tmpc; + } + // check neighbor characters in keyboard string + if (!ckey) continue; + char * loc = strchr(ckey, tmpc); + while (loc) { + if ((loc > ckey) && (*(loc - 1) != '|')) { + candidate[i] = *(loc - 1); + ns = testsug(wlst, candidate, wl, ns, cpdsuggest, NULL, NULL); + if (ns == -1) return -1; + } + if ((*(loc + 1) != '|') && (*(loc + 1) != '\0')) { + candidate[i] = *(loc + 1); + ns = testsug(wlst, candidate, wl, ns, cpdsuggest, NULL, NULL); + if (ns == -1) return -1; + } + loc = strchr(loc + 1, tmpc); + } + candidate[i] = tmpc; + } + return ns; +} + +// error is wrong char in place of correct one (case and keyboard related version) +int SuggestMgr::badcharkey_utf(char ** wlst, const w_char * word, int wl, int ns, int cpdsuggest) +{ + w_char tmpc; + w_char candidate_utf[MAXSWL]; + char candidate[MAXSWUTF8L]; + memcpy(candidate_utf, word, wl * sizeof(w_char)); + // swap out each char one by one and try all the tryme + // chars in its place to see if that makes a good word + for (int i=0; i < wl; i++) { + tmpc = candidate_utf[i]; + // check with uppercase letters + mkallcap_utf(candidate_utf + i, 1, langnum); + if (!w_char_eq(tmpc, candidate_utf[i])) { + u16_u8(candidate, MAXSWUTF8L, candidate_utf, wl); + ns = testsug(wlst, candidate, strlen(candidate), ns, cpdsuggest, NULL, NULL); + if (ns == -1) return -1; + candidate_utf[i] = tmpc; + } + // check neighbor characters in keyboard string + if (!ckey) continue; + w_char * loc = ckey_utf; + while ((loc < (ckey_utf + ckeyl)) && !w_char_eq(*loc, tmpc)) loc++; + while (loc < (ckey_utf + ckeyl)) { + if ((loc > ckey_utf) && !w_char_eq(*(loc - 1), W_VLINE)) { + candidate_utf[i] = *(loc - 1); + u16_u8(candidate, MAXSWUTF8L, candidate_utf, wl); + ns = testsug(wlst, candidate, strlen(candidate), ns, cpdsuggest, NULL, NULL); + if (ns == -1) return -1; + } + if (((loc + 1) < (ckey_utf + ckeyl)) && !w_char_eq(*(loc + 1), W_VLINE)) { + candidate_utf[i] = *(loc + 1); + u16_u8(candidate, MAXSWUTF8L, candidate_utf, wl); + ns = testsug(wlst, candidate, strlen(candidate), ns, cpdsuggest, NULL, NULL); + if (ns == -1) return -1; + } + do { loc++; } while ((loc < (ckey_utf + ckeyl)) && !w_char_eq(*loc, tmpc)); + } + candidate_utf[i] = tmpc; + } + return ns; +} + +// error is wrong char in place of correct one +int SuggestMgr::badchar(char ** wlst, const char * word, int ns, int cpdsuggest) +{ + char tmpc; + char candidate[MAXSWUTF8L]; + clock_t timelimit = clock(); + int timer = MINTIMER; + int wl = strlen(word); + strcpy(candidate, word); + // swap out each char one by one and try all the tryme + // chars in its place to see if that makes a good word + for (int j=0; j < ctryl; j++) { + for (int i=wl-1; i >= 0; i--) { + tmpc = candidate[i]; + if (ctry[j] == tmpc) continue; + candidate[i] = ctry[j]; + ns = testsug(wlst, candidate, wl, ns, cpdsuggest, &timer, &timelimit); + if (ns == -1) return -1; + if (!timer) return ns; + candidate[i] = tmpc; + } + } + return ns; +} + +// error is wrong char in place of correct one +int SuggestMgr::badchar_utf(char ** wlst, const w_char * word, int wl, int ns, int cpdsuggest) +{ + w_char tmpc; + w_char candidate_utf[MAXSWL]; + char candidate[MAXSWUTF8L]; + clock_t timelimit = clock(); + int timer = MINTIMER; + memcpy(candidate_utf, word, wl * sizeof(w_char)); + // swap out each char one by one and try all the tryme + // chars in its place to see if that makes a good word + for (int j=0; j < ctryl; j++) { + for (int i=wl-1; i >= 0; i--) { + tmpc = candidate_utf[i]; + if (w_char_eq(tmpc, ctry_utf[j])) continue; + candidate_utf[i] = ctry_utf[j]; + u16_u8(candidate, MAXSWUTF8L, candidate_utf, wl); + ns = testsug(wlst, candidate, strlen(candidate), ns, cpdsuggest, &timer, &timelimit); + if (ns == -1) return -1; + if (!timer) return ns; + candidate_utf[i] = tmpc; + } + } + return ns; +} + +// error is word has an extra letter it does not need +int SuggestMgr::extrachar_utf(char** wlst, const w_char * word, int wl, int ns, int cpdsuggest) +{ + char candidate[MAXSWUTF8L]; + w_char candidate_utf[MAXSWL]; + w_char * p; + w_char tmpc = W_VLINE; // not used value, only for VCC warning message + if (wl < 2) return ns; + // try omitting one char of word at a time + memcpy(candidate_utf, word, wl * sizeof(w_char)); + for (p = candidate_utf + wl - 1; p >= candidate_utf; p--) { + w_char tmpc2 = *p; + if (p < candidate_utf + wl - 1) *p = tmpc; + u16_u8(candidate, MAXSWUTF8L, candidate_utf, wl - 1); + ns = testsug(wlst, candidate, strlen(candidate), ns, cpdsuggest, NULL, NULL); + if (ns == -1) return -1; + tmpc = tmpc2; + } + return ns; +} + +// error is word has an extra letter it does not need +int SuggestMgr::extrachar(char** wlst, const char * word, int ns, int cpdsuggest) +{ + char tmpc = '\0'; + char candidate[MAXSWUTF8L]; + char * p; + int wl = strlen(word); + if (wl < 2) return ns; + // try omitting one char of word at a time + strcpy (candidate, word); + for (p = candidate + wl - 1; p >=candidate; p--) { + char tmpc2 = *p; + *p = tmpc; + ns = testsug(wlst, candidate, wl-1, ns, cpdsuggest, NULL, NULL); + if (ns == -1) return -1; + tmpc = tmpc2; + } + return ns; +} + +// error is missing a letter it needs +int SuggestMgr::forgotchar(char ** wlst, const char * word, int ns, int cpdsuggest) +{ + char candidate[MAXSWUTF8L]; + char * p; + clock_t timelimit = clock(); + int timer = MINTIMER; + int wl = strlen(word); + // try inserting a tryme character before every letter (and the null terminator) + for (int i = 0; i < ctryl; i++) { + strcpy(candidate, word); + for (p = candidate + wl; p >= candidate; p--) { + *(p+1) = *p; + *p = ctry[i]; + ns = testsug(wlst, candidate, wl+1, ns, cpdsuggest, &timer, &timelimit); + if (ns == -1) return -1; + if (!timer) return ns; + } + } + return ns; +} + +// error is missing a letter it needs +int SuggestMgr::forgotchar_utf(char ** wlst, const w_char * word, int wl, int ns, int cpdsuggest) +{ + w_char candidate_utf[MAXSWL]; + char candidate[MAXSWUTF8L]; + w_char * p; + clock_t timelimit = clock(); + int timer = MINTIMER; + // try inserting a tryme character at the end of the word and before every letter + for (int i = 0; i < ctryl; i++) { + memcpy (candidate_utf, word, wl * sizeof(w_char)); + for (p = candidate_utf + wl; p >= candidate_utf; p--) { + *(p + 1) = *p; + *p = ctry_utf[i]; + u16_u8(candidate, MAXSWUTF8L, candidate_utf, wl + 1); + ns = testsug(wlst, candidate, strlen(candidate), ns, cpdsuggest, &timer, &timelimit); + if (ns == -1) return -1; + if (!timer) return ns; + } + } + return ns; +} + + +/* error is should have been two words */ +int SuggestMgr::twowords(char ** wlst, const char * word, int ns, int cpdsuggest) +{ + char candidate[MAXSWUTF8L]; + char * p; + int c1, c2; + int forbidden = 0; + int cwrd; + + int wl=strlen(word); + if (wl < 3) return ns; + + if (langnum == LANG_hu) forbidden = check_forbidden(word, wl); + + strcpy(candidate + 1, word); + // split the string into two pieces after every char + // if both pieces are good words make them a suggestion + for (p = candidate + 1; p[1] != '\0'; p++) { + p[-1] = *p; + // go to end of the UTF-8 character + while (utf8 && ((p[1] & 0xc0) == 0x80)) { + *p = p[1]; + p++; + } + if (utf8 && p[1] == '\0') break; // last UTF-8 character + *p = '\0'; + c1 = checkword(candidate,strlen(candidate), cpdsuggest, NULL, NULL); + if (c1) { + c2 = checkword((p+1),strlen(p+1), cpdsuggest, NULL, NULL); + if (c2) { + *p = ' '; + + // spec. Hungarian code (need a better compound word support) + if ((langnum == LANG_hu) && !forbidden && + // if 3 repeating letter, use - instead of space + (((p[-1] == p[1]) && (((p>candidate+1) && (p[-1] == p[-2])) || (p[-1] == p[2]))) || + // or multiple compounding, with more, than 6 syllables + ((c1 == 3) && (c2 >= 2)))) *p = '-'; + + cwrd = 1; + for (int k=0; k < ns; k++) + if (strcmp(candidate,wlst[k]) == 0) cwrd = 0; + if (ns < maxSug) { + if (cwrd) { + wlst[ns] = mystrdup(candidate); + if (wlst[ns] == NULL) return -1; + ns++; + } + } else return ns; + // add two word suggestion with dash, if TRY string contains + // "a" or "-" + // NOTE: cwrd doesn't modified for REP twoword sugg. + if (ctry && (strchr(ctry, 'a') || strchr(ctry, '-')) && + mystrlen(p + 1) > 1 && + mystrlen(candidate) - mystrlen(p) > 1) { + *p = '-'; + for (int k=0; k < ns; k++) + if (strcmp(candidate,wlst[k]) == 0) cwrd = 0; + if (ns < maxSug) { + if (cwrd) { + wlst[ns] = mystrdup(candidate); + if (wlst[ns] == NULL) return -1; + ns++; + } + } else return ns; + } + } + } + } + return ns; +} + + +// error is adjacent letter were swapped +int SuggestMgr::swapchar(char ** wlst, const char * word, int ns, int cpdsuggest) +{ + char candidate[MAXSWUTF8L]; + char * p; + char tmpc; + int wl=strlen(word); + // try swapping adjacent chars one by one + strcpy(candidate, word); + for (p = candidate; p[1] != 0; p++) { + tmpc = *p; + *p = p[1]; + p[1] = tmpc; + ns = testsug(wlst, candidate, wl, ns, cpdsuggest, NULL, NULL); + if (ns == -1) return -1; + p[1] = *p; + *p = tmpc; + } + // try double swaps for short words + // ahev -> have, owudl -> would + if (wl == 4 || wl == 5) { + candidate[0] = word[1]; + candidate[1] = word[0]; + candidate[2] = word[2]; + candidate[wl - 2] = word[wl - 1]; + candidate[wl - 1] = word[wl - 2]; + ns = testsug(wlst, candidate, wl, ns, cpdsuggest, NULL, NULL); + if (ns == -1) return -1; + if (wl == 5) { + candidate[0] = word[0]; + candidate[1] = word[2]; + candidate[2] = word[1]; + ns = testsug(wlst, candidate, wl, ns, cpdsuggest, NULL, NULL); + if (ns == -1) return -1; + } + } + return ns; +} + +// error is adjacent letter were swapped +int SuggestMgr::swapchar_utf(char ** wlst, const w_char * word, int wl, int ns, int cpdsuggest) +{ + w_char candidate_utf[MAXSWL]; + char candidate[MAXSWUTF8L]; + w_char * p; + w_char tmpc; + int len = 0; + // try swapping adjacent chars one by one + memcpy (candidate_utf, word, wl * sizeof(w_char)); + for (p = candidate_utf; p < (candidate_utf + wl - 1); p++) { + tmpc = *p; + *p = p[1]; + p[1] = tmpc; + u16_u8(candidate, MAXSWUTF8L, candidate_utf, wl); + if (len == 0) len = strlen(candidate); + ns = testsug(wlst, candidate, len, ns, cpdsuggest, NULL, NULL); + if (ns == -1) return -1; + p[1] = *p; + *p = tmpc; + } + // try double swaps for short words + // ahev -> have, owudl -> would, suodn -> sound + if (wl == 4 || wl == 5) { + candidate_utf[0] = word[1]; + candidate_utf[1] = word[0]; + candidate_utf[2] = word[2]; + candidate_utf[wl - 2] = word[wl - 1]; + candidate_utf[wl - 1] = word[wl - 2]; + u16_u8(candidate, MAXSWUTF8L, candidate_utf, wl); + ns = testsug(wlst, candidate, len, ns, cpdsuggest, NULL, NULL); + if (ns == -1) return -1; + if (wl == 5) { + candidate_utf[0] = word[0]; + candidate_utf[1] = word[2]; + candidate_utf[2] = word[1]; + u16_u8(candidate, MAXSWUTF8L, candidate_utf, wl); + ns = testsug(wlst, candidate, len, ns, cpdsuggest, NULL, NULL); + if (ns == -1) return -1; + } + } + return ns; +} + +// error is not adjacent letter were swapped +int SuggestMgr::longswapchar(char ** wlst, const char * word, int ns, int cpdsuggest) +{ + char candidate[MAXSWUTF8L]; + char * p; + char * q; + char tmpc; + int wl=strlen(word); + // try swapping not adjacent chars one by one + strcpy(candidate, word); + for (p = candidate; *p != 0; p++) { + for (q = candidate; *q != 0; q++) { + if (abs((int)(p-q)) > 1) { + tmpc = *p; + *p = *q; + *q = tmpc; + ns = testsug(wlst, candidate, wl, ns, cpdsuggest, NULL, NULL); + if (ns == -1) return -1; + *q = *p; + *p = tmpc; + } + } + } + return ns; +} + + +// error is adjacent letter were swapped +int SuggestMgr::longswapchar_utf(char ** wlst, const w_char * word, int wl, int ns, int cpdsuggest) +{ + w_char candidate_utf[MAXSWL]; + char candidate[MAXSWUTF8L]; + w_char * p; + w_char * q; + w_char tmpc; + // try swapping not adjacent chars + memcpy (candidate_utf, word, wl * sizeof(w_char)); + for (p = candidate_utf; p < (candidate_utf + wl); p++) { + for (q = candidate_utf; q < (candidate_utf + wl); q++) { + if (abs((int)(p-q)) > 1) { + tmpc = *p; + *p = *q; + *q = tmpc; + u16_u8(candidate, MAXSWUTF8L, candidate_utf, wl); + ns = testsug(wlst, candidate, strlen(candidate), ns, cpdsuggest, NULL, NULL); + if (ns == -1) return -1; + *q = *p; + *p = tmpc; + } + } + } + return ns; +} + +// error is a letter was moved +int SuggestMgr::movechar(char ** wlst, const char * word, int ns, int cpdsuggest) +{ + char candidate[MAXSWUTF8L]; + char * p; + char * q; + char tmpc; + + int wl=strlen(word); + // try moving a char + strcpy(candidate, word); + for (p = candidate; *p != 0; p++) { + for (q = p + 1; (*q != 0) && ((q - p) < 10); q++) { + tmpc = *(q-1); + *(q-1) = *q; + *q = tmpc; + if ((q-p) < 2) continue; // omit swap char + ns = testsug(wlst, candidate, wl, ns, cpdsuggest, NULL, NULL); + if (ns == -1) return -1; + } + strcpy(candidate, word); + } + for (p = candidate + wl - 1; p > candidate; p--) { + for (q = p - 1; (q >= candidate) && ((p - q) < 10); q--) { + tmpc = *(q+1); + *(q+1) = *q; + *q = tmpc; + if ((p-q) < 2) continue; // omit swap char + ns = testsug(wlst, candidate, wl, ns, cpdsuggest, NULL, NULL); + if (ns == -1) return -1; + } + strcpy(candidate, word); + } + return ns; +} + +// error is a letter was moved +int SuggestMgr::movechar_utf(char ** wlst, const w_char * word, int wl, int ns, int cpdsuggest) +{ + w_char candidate_utf[MAXSWL]; + char candidate[MAXSWUTF8L]; + w_char * p; + w_char * q; + w_char tmpc; + // try moving a char + memcpy (candidate_utf, word, wl * sizeof(w_char)); + for (p = candidate_utf; p < (candidate_utf + wl); p++) { + for (q = p + 1; (q < (candidate_utf + wl)) && ((q - p) < 10); q++) { + tmpc = *(q-1); + *(q-1) = *q; + *q = tmpc; + if ((q-p) < 2) continue; // omit swap char + u16_u8(candidate, MAXSWUTF8L, candidate_utf, wl); + ns = testsug(wlst, candidate, strlen(candidate), ns, cpdsuggest, NULL, NULL); + if (ns == -1) return -1; + } + memcpy (candidate_utf, word, wl * sizeof(w_char)); + } + for (p = candidate_utf + wl - 1; p > candidate_utf; p--) { + for (q = p - 1; (q >= candidate_utf) && ((p - q) < 10); q--) { + tmpc = *(q+1); + *(q+1) = *q; + *q = tmpc; + if ((p-q) < 2) continue; // omit swap char + u16_u8(candidate, MAXSWUTF8L, candidate_utf, wl); + ns = testsug(wlst, candidate, strlen(candidate), ns, cpdsuggest, NULL, NULL); + if (ns == -1) return -1; + } + memcpy (candidate_utf, word, wl * sizeof(w_char)); + } + return ns; +} + +// generate a set of suggestions for very poorly spelled words +int SuggestMgr::ngsuggest(char** wlst, char * w, int ns, HashMgr** pHMgr, int md) +{ + + int i, j; + int lval; + int sc, scphon; + int lp, lpphon; + int nonbmp = 0; + + // exhaustively search through all root words + // keeping track of the MAX_ROOTS most similar root words + struct hentry * roots[MAX_ROOTS]; + char * rootsphon[MAX_ROOTS]; + int scores[MAX_ROOTS]; + int scoresphon[MAX_ROOTS]; + for (i = 0; i < MAX_ROOTS; i++) { + roots[i] = NULL; + scores[i] = -100 * i; + rootsphon[i] = NULL; + scoresphon[i] = -100 * i; + } + lp = MAX_ROOTS - 1; + lpphon = MAX_ROOTS - 1; + scphon = -20000; + int low = NGRAM_LOWERING; + + char w2[MAXWORDUTF8LEN]; + char f[MAXSWUTF8L]; + char * word = w; + + // word reversing wrapper for complex prefixes + if (complexprefixes) { + strcpy(w2, w); + if (utf8) reverseword_utf(w2); else reverseword(w2); + word = w2; + } + + char mw[MAXSWUTF8L]; + w_char u8[MAXSWL]; + int nc = strlen(word); + int n = (utf8) ? u8_u16(u8, MAXSWL, word) : nc; + + // set character based ngram suggestion for words with non-BMP Unicode characters + if (n == -1) { + utf8 = 0; // XXX not state-free + n = nc; + nonbmp = 1; + low = 0; + } + + struct hentry* hp = NULL; + int col = -1; + phonetable * ph = (pAMgr) ? pAMgr->get_phonetable() : NULL; + char target[MAXSWUTF8L]; + char candidate[MAXSWUTF8L]; + if (ph) { + if (utf8) { + w_char _w[MAXSWL]; + int _wl = u8_u16(_w, MAXSWL, word); + mkallcap_utf(_w, _wl, langnum); + u16_u8(candidate, MAXSWUTF8L, _w, _wl); + } else { + strcpy(candidate, word); + if (!nonbmp) mkallcap(candidate, csconv); + } + phonet(candidate, target, nc, *ph); // XXX phonet() is 8-bit (nc, not n) + } + + FLAG forbiddenword = pAMgr ? pAMgr->get_forbiddenword() : FLAG_NULL; + FLAG nosuggest = pAMgr ? pAMgr->get_nosuggest() : FLAG_NULL; + FLAG nongramsuggest = pAMgr ? pAMgr->get_nongramsuggest() : FLAG_NULL; + FLAG onlyincompound = pAMgr ? pAMgr->get_onlyincompound() : FLAG_NULL; + + for (i = 0; i < md; i++) { + while (0 != (hp = (pHMgr[i])->walk_hashtable(col, hp))) { + if ((hp->astr) && (pAMgr) && + (TESTAFF(hp->astr, forbiddenword, hp->alen) || + TESTAFF(hp->astr, ONLYUPCASEFLAG, hp->alen) || + TESTAFF(hp->astr, nosuggest, hp->alen) || + TESTAFF(hp->astr, nongramsuggest, hp->alen) || + TESTAFF(hp->astr, onlyincompound, hp->alen))) continue; + + sc = ngram(3, word, HENTRY_WORD(hp), NGRAM_LONGER_WORSE + low) + + leftcommonsubstring(word, HENTRY_WORD(hp)); + + // check special pronounciation + if ((hp->var & H_OPT_PHON) && copy_field(f, HENTRY_DATA(hp), MORPH_PHON)) { + int sc2 = ngram(3, word, f, NGRAM_LONGER_WORSE + low) + + + leftcommonsubstring(word, f); + if (sc2 > sc) sc = sc2; + } + + scphon = -20000; + if (ph && (sc > 2) && (abs(n - (int) hp->clen) <= 3)) { + char target2[MAXSWUTF8L]; + if (utf8) { + w_char _w[MAXSWL]; + int _wl = u8_u16(_w, MAXSWL, HENTRY_WORD(hp)); + mkallcap_utf(_w, _wl, langnum); + u16_u8(candidate, MAXSWUTF8L, _w, _wl); + } else { + strcpy(candidate, HENTRY_WORD(hp)); + mkallcap(candidate, csconv); + } + phonet(candidate, target2, -1, *ph); + scphon = 2 * ngram(3, target, target2, NGRAM_LONGER_WORSE); + } + + if (sc > scores[lp]) { + scores[lp] = sc; + roots[lp] = hp; + lval = sc; + for (j=0; j < MAX_ROOTS; j++) + if (scores[j] < lval) { + lp = j; + lval = scores[j]; + } + } + + + if (scphon > scoresphon[lpphon]) { + scoresphon[lpphon] = scphon; + rootsphon[lpphon] = HENTRY_WORD(hp); + lval = scphon; + for (j=0; j < MAX_ROOTS; j++) + if (scoresphon[j] < lval) { + lpphon = j; + lval = scoresphon[j]; + } + } + }} + + // find minimum threshold for a passable suggestion + // mangle original word three differnt ways + // and score them to generate a minimum acceptable score + int thresh = 0; + for (int sp = 1; sp < 4; sp++) { + if (utf8) { + for (int k=sp; k < n; k+=4) *((unsigned short *) u8 + k) = '*'; + u16_u8(mw, MAXSWUTF8L, u8, n); + thresh = thresh + ngram(n, word, mw, NGRAM_ANY_MISMATCH + low); + } else { + strcpy(mw, word); + for (int k=sp; k < n; k+=4) *(mw + k) = '*'; + thresh = thresh + ngram(n, word, mw, NGRAM_ANY_MISMATCH + low); + } + } + thresh = thresh / 3; + thresh--; + + // now expand affixes on each of these root words and + // and use length adjusted ngram scores to select + // possible suggestions + char * guess[MAX_GUESS]; + char * guessorig[MAX_GUESS]; + int gscore[MAX_GUESS]; + for(i=0;iexpand_rootword(glst, MAX_WORDS, HENTRY_WORD(rp), rp->blen, + rp->astr, rp->alen, word, nc, + ((rp->var & H_OPT_PHON) ? copy_field(f, HENTRY_DATA(rp), MORPH_PHON) : NULL)); + + for (int k = 0; k < nw ; k++) { + sc = ngram(n, word, glst[k].word, NGRAM_ANY_MISMATCH + low) + + leftcommonsubstring(word, glst[k].word); + + if (sc > thresh) { + if (sc > gscore[lp]) { + if (guess[lp]) { + free (guess[lp]); + if (guessorig[lp]) { + free(guessorig[lp]); + guessorig[lp] = NULL; + } + } + gscore[lp] = sc; + guess[lp] = glst[k].word; + guessorig[lp] = glst[k].orig; + lval = sc; + for (j=0; j < MAX_GUESS; j++) + if (gscore[j] < lval) { + lp = j; + lval = gscore[j]; + } + } else { + free(glst[k].word); + if (glst[k].orig) free(glst[k].orig); + } + } else { + free(glst[k].word); + if (glst[k].orig) free(glst[k].orig); + } + } + } + } + free(glst); + + // now we are done generating guesses + // sort in order of decreasing score + + + bubblesort(&guess[0], &guessorig[0], &gscore[0], MAX_GUESS); + if (ph) bubblesort(&rootsphon[0], NULL, &scoresphon[0], MAX_ROOTS); + + // weight suggestions with a similarity index, based on + // the longest common subsequent algorithm and resort + + int is_swap = 0; + int re = 0; + double fact = 1.0; + if (pAMgr) { + int maxd = pAMgr->get_maxdiff(); + if (maxd >= 0) fact = (10.0 - maxd)/5.0; + } + + for (i=0; i < MAX_GUESS; i++) { + if (guess[i]) { + // lowering guess[i] + char gl[MAXSWUTF8L]; + int len; + if (utf8) { + w_char _w[MAXSWL]; + len = u8_u16(_w, MAXSWL, guess[i]); + mkallsmall_utf(_w, len, langnum); + u16_u8(gl, MAXSWUTF8L, _w, len); + } else { + strcpy(gl, guess[i]); + if (!nonbmp) mkallsmall(gl, csconv); + len = strlen(guess[i]); + } + + int _lcs = lcslen(word, gl); + + // same characters with different casing + if ((n == len) && (n == _lcs)) { + gscore[i] += 2000; + break; + } + // using 2-gram instead of 3, and other weightening + gscore[i] = + // length of longest common subsequent minus length difference + 2 * _lcs - abs((int) (n - len)) + + // weight length of the left common substring + leftcommonsubstring(word, gl) + + // weight equal character positions + (!nonbmp && commoncharacterpositions(word, gl, &is_swap) ? 1: 0) + + // swap character (not neighboring) + ((is_swap) ? 10 : 0) + + // ngram + ngram(4, word, gl, NGRAM_ANY_MISMATCH + low) + + // weighted ngrams + (re = ngram(2, word, gl, NGRAM_ANY_MISMATCH + low + NGRAM_WEIGHTED)) + + (re += ngram(2, gl, word, NGRAM_ANY_MISMATCH + low + NGRAM_WEIGHTED)) + + // different limit for dictionaries with PHONE rules + (ph ? (re < len * fact ? -1000 : 0) : (re < (n + len)*fact? -1000 : 0)); + } + } + + bubblesort(&guess[0], &guessorig[0], &gscore[0], MAX_GUESS); + +// phonetic version + if (ph) for (i=0; i < MAX_ROOTS; i++) { + if (rootsphon[i]) { + // lowering rootphon[i] + char gl[MAXSWUTF8L]; + int len; + if (utf8) { + w_char _w[MAXSWL]; + len = u8_u16(_w, MAXSWL, rootsphon[i]); + mkallsmall_utf(_w, len, langnum); + u16_u8(gl, MAXSWUTF8L, _w, len); + } else { + strcpy(gl, rootsphon[i]); + if (!nonbmp) mkallsmall(gl, csconv); + len = strlen(rootsphon[i]); + } + + // heuristic weigthing of ngram scores + scoresphon[i] += 2 * lcslen(word, gl) - abs((int) (n - len)) + + // weight length of the left common substring + leftcommonsubstring(word, gl); + } + } + + if (ph) bubblesort(&rootsphon[0], NULL, &scoresphon[0], MAX_ROOTS); + + // copy over + int oldns = ns; + + int same = 0; + for (i=0; i < MAX_GUESS; i++) { + if (guess[i]) { + if ((ns < oldns + maxngramsugs) && (ns < maxSug) && (!same || (gscore[i] > 1000))) { + int unique = 1; + // leave only excellent suggestions, if exists + if (gscore[i] > 1000) same = 1; else if (gscore[i] < -100) { + same = 1; + // keep the best ngram suggestions, unless in ONLYMAXDIFF mode + if (ns > oldns || (pAMgr && pAMgr->get_onlymaxdiff())) { + free(guess[i]); + if (guessorig[i]) free(guessorig[i]); + continue; + } + } + for (j = 0; j < ns; j++) { + // don't suggest previous suggestions or a previous suggestion with prefixes or affixes + if ((!guessorig[i] && strstr(guess[i], wlst[j])) || + (guessorig[i] && strstr(guessorig[i], wlst[j])) || + // check forbidden words + !checkword(guess[i], strlen(guess[i]), 0, NULL, NULL)) unique = 0; + } + if (unique) { + wlst[ns++] = guess[i]; + if (guessorig[i]) { + free(guess[i]); + wlst[ns-1] = guessorig[i]; + } + } else { + free(guess[i]); + if (guessorig[i]) free(guessorig[i]); + } + } else { + free(guess[i]); + if (guessorig[i]) free(guessorig[i]); + } + } + } + + oldns = ns; + if (ph) for (i=0; i < MAX_ROOTS; i++) { + if (rootsphon[i]) { + if ((ns < oldns + MAXPHONSUGS) && (ns < maxSug)) { + int unique = 1; + for (j = 0; j < ns; j++) { + // don't suggest previous suggestions or a previous suggestion with prefixes or affixes + if (strstr(rootsphon[i], wlst[j]) || + // check forbidden words + !checkword(rootsphon[i], strlen(rootsphon[i]), 0, NULL, NULL)) unique = 0; + } + if (unique) { + wlst[ns++] = mystrdup(rootsphon[i]); + if (!wlst[ns - 1]) return ns - 1; + } + } + } + } + + if (nonbmp) utf8 = 1; + return ns; +} + + +// see if a candidate suggestion is spelled correctly +// needs to check both root words and words with affixes + +// obsolote MySpell-HU modifications: +// return value 2 and 3 marks compounding with hyphen (-) +// `3' marks roots without suffix +int SuggestMgr::checkword(const char * word, int len, int cpdsuggest, int * timer, clock_t * timelimit) +{ + struct hentry * rv=NULL; + struct hentry * rv2=NULL; + int nosuffix = 0; + + // check time limit + if (timer) { + (*timer)--; + if (!(*timer) && timelimit) { + if ((clock() - *timelimit) > TIMELIMIT) return 0; + *timer = MAXPLUSTIMER; + } + } + + if (pAMgr) { + if (cpdsuggest==1) { + if (pAMgr->get_compound()) { + rv = pAMgr->compound_check(word, len, 0, 0, 100, 0, NULL, 0, 1, 0); //EXT + if (rv && (!(rv2 = pAMgr->lookup(word)) || !rv2->astr || + !(TESTAFF(rv2->astr,pAMgr->get_forbiddenword(),rv2->alen) || + TESTAFF(rv2->astr,pAMgr->get_nosuggest(),rv2->alen)))) return 3; // XXX obsolote categorisation + only ICONV needs affix flag check? + } + return 0; + } + + rv = pAMgr->lookup(word); + + if (rv) { + if ((rv->astr) && (TESTAFF(rv->astr,pAMgr->get_forbiddenword(),rv->alen) + || TESTAFF(rv->astr,pAMgr->get_nosuggest(),rv->alen))) return 0; + while (rv) { + if (rv->astr && (TESTAFF(rv->astr,pAMgr->get_needaffix(),rv->alen) || + TESTAFF(rv->astr, ONLYUPCASEFLAG, rv->alen) || + TESTAFF(rv->astr,pAMgr->get_onlyincompound(),rv->alen))) { + rv = rv->next_homonym; + } else break; + } + } else rv = pAMgr->prefix_check(word, len, 0); // only prefix, and prefix + suffix XXX + + if (rv) { + nosuffix=1; + } else { + rv = pAMgr->suffix_check(word, len, 0, NULL, NULL, 0, NULL); // only suffix + } + + if (!rv && pAMgr->have_contclass()) { + rv = pAMgr->suffix_check_twosfx(word, len, 0, NULL, FLAG_NULL); + if (!rv) rv = pAMgr->prefix_check_twosfx(word, len, 1, FLAG_NULL); + } + + // check forbidden words + if ((rv) && (rv->astr) && (TESTAFF(rv->astr,pAMgr->get_forbiddenword(),rv->alen) || + TESTAFF(rv->astr, ONLYUPCASEFLAG, rv->alen) || + TESTAFF(rv->astr,pAMgr->get_nosuggest(),rv->alen) || + TESTAFF(rv->astr,pAMgr->get_onlyincompound(),rv->alen))) return 0; + + if (rv) { // XXX obsolote + if ((pAMgr->get_compoundflag()) && + TESTAFF(rv->astr, pAMgr->get_compoundflag(), rv->alen)) return 2 + nosuffix; + return 1; + } + } + return 0; +} + +int SuggestMgr::check_forbidden(const char * word, int len) +{ + struct hentry * rv = NULL; + + if (pAMgr) { + rv = pAMgr->lookup(word); + if (rv && rv->astr && (TESTAFF(rv->astr,pAMgr->get_needaffix(),rv->alen) || + TESTAFF(rv->astr,pAMgr->get_onlyincompound(),rv->alen))) rv = NULL; + if (!(pAMgr->prefix_check(word,len,1))) + rv = pAMgr->suffix_check(word,len, 0, NULL, NULL, 0, NULL); // prefix+suffix, suffix + // check forbidden words + if ((rv) && (rv->astr) && TESTAFF(rv->astr,pAMgr->get_forbiddenword(),rv->alen)) return 1; + } + return 0; +} + +#ifdef HUNSPELL_EXPERIMENTAL +// suggest possible stems +int SuggestMgr::suggest_pos_stems(char*** slst, const char * w, int nsug) +{ + char ** wlst; + + struct hentry * rv = NULL; + + char w2[MAXSWUTF8L]; + const char * word = w; + + // word reversing wrapper for complex prefixes + if (complexprefixes) { + strcpy(w2, w); + if (utf8) reverseword_utf(w2); else reverseword(w2); + word = w2; + } + + int wl = strlen(word); + + + if (*slst) { + wlst = *slst; + } else { + wlst = (char **) calloc(maxSug, sizeof(char *)); + if (wlst == NULL) return -1; + } + + rv = pAMgr->suffix_check(word, wl, 0, NULL, wlst, maxSug, &nsug); + + // delete dash from end of word + if (nsug > 0) { + for (int j=0; j < nsug; j++) { + if (wlst[j][strlen(wlst[j]) - 1] == '-') wlst[j][strlen(wlst[j]) - 1] = '\0'; + } + } + + *slst = wlst; + return nsug; +} +#endif // END OF HUNSPELL_EXPERIMENTAL CODE + + +char * SuggestMgr::suggest_morph(const char * w) +{ + char result[MAXLNLEN]; + char * r = (char *) result; + char * st; + + struct hentry * rv = NULL; + + *result = '\0'; + + if (! pAMgr) return NULL; + + char w2[MAXSWUTF8L]; + const char * word = w; + + // word reversing wrapper for complex prefixes + if (complexprefixes) { + strcpy(w2, w); + if (utf8) reverseword_utf(w2); else reverseword(w2); + word = w2; + } + + rv = pAMgr->lookup(word); + + while (rv) { + if ((!rv->astr) || !(TESTAFF(rv->astr, pAMgr->get_forbiddenword(), rv->alen) || + TESTAFF(rv->astr, pAMgr->get_needaffix(), rv->alen) || + TESTAFF(rv->astr,pAMgr->get_onlyincompound(),rv->alen))) { + if (!HENTRY_FIND(rv, MORPH_STEM)) { + mystrcat(result, " ", MAXLNLEN); + mystrcat(result, MORPH_STEM, MAXLNLEN); + mystrcat(result, word, MAXLNLEN); + } + if (HENTRY_DATA(rv)) { + mystrcat(result, " ", MAXLNLEN); + mystrcat(result, HENTRY_DATA2(rv), MAXLNLEN); + } + mystrcat(result, "\n", MAXLNLEN); + } + rv = rv->next_homonym; + } + + st = pAMgr->affix_check_morph(word,strlen(word)); + if (st) { + mystrcat(result, st, MAXLNLEN); + free(st); + } + + if (pAMgr->get_compound() && (*result == '\0')) + pAMgr->compound_check_morph(word, strlen(word), + 0, 0, 100, 0,NULL, 0, &r, NULL); + + return (*result) ? mystrdup(line_uniq(result, MSEP_REC)) : NULL; +} + +#ifdef HUNSPELL_EXPERIMENTAL +char * SuggestMgr::suggest_morph_for_spelling_error(const char * word) +{ + char * p = NULL; + char ** wlst = (char **) calloc(maxSug, sizeof(char *)); + if (!**wlst) return NULL; + // we will use only the first suggestion + for (int i = 0; i < maxSug - 1; i++) wlst[i] = ""; + int ns = suggest(&wlst, word, maxSug - 1, NULL); + if (ns == maxSug) { + p = suggest_morph(wlst[maxSug - 1]); + free(wlst[maxSug - 1]); + } + if (wlst) free(wlst); + return p; +} +#endif // END OF HUNSPELL_EXPERIMENTAL CODE + +/* affixation */ +char * SuggestMgr::suggest_hentry_gen(hentry * rv, char * pattern) +{ + char result[MAXLNLEN]; + *result = '\0'; + int sfxcount = get_sfxcount(pattern); + + if (get_sfxcount(HENTRY_DATA(rv)) > sfxcount) return NULL; + + if (HENTRY_DATA(rv)) { + char * aff = pAMgr->morphgen(HENTRY_WORD(rv), rv->blen, rv->astr, rv->alen, + HENTRY_DATA(rv), pattern, 0); + if (aff) { + mystrcat(result, aff, MAXLNLEN); + mystrcat(result, "\n", MAXLNLEN); + free(aff); + } + } + + // check all allomorphs + char allomorph[MAXLNLEN]; + char * p = NULL; + if (HENTRY_DATA(rv)) p = (char *) strstr(HENTRY_DATA2(rv), MORPH_ALLOMORPH); + while (p) { + struct hentry * rv2 = NULL; + p += MORPH_TAG_LEN; + int plen = fieldlen(p); + strncpy(allomorph, p, plen); + allomorph[plen] = '\0'; + rv2 = pAMgr->lookup(allomorph); + while (rv2) { +// if (HENTRY_DATA(rv2) && get_sfxcount(HENTRY_DATA(rv2)) <= sfxcount) { + if (HENTRY_DATA(rv2)) { + char * st = (char *) strstr(HENTRY_DATA2(rv2), MORPH_STEM); + if (st && (strncmp(st + MORPH_TAG_LEN, + HENTRY_WORD(rv), fieldlen(st + MORPH_TAG_LEN)) == 0)) { + char * aff = pAMgr->morphgen(HENTRY_WORD(rv2), rv2->blen, rv2->astr, rv2->alen, + HENTRY_DATA(rv2), pattern, 0); + if (aff) { + mystrcat(result, aff, MAXLNLEN); + mystrcat(result, "\n", MAXLNLEN); + free(aff); + } + } + } + rv2 = rv2->next_homonym; + } + p = strstr(p + plen, MORPH_ALLOMORPH); + } + + return (*result) ? mystrdup(result) : NULL; +} + +char * SuggestMgr::suggest_gen(char ** desc, int n, char * pattern) { + char result[MAXLNLEN]; + char result2[MAXLNLEN]; + char newpattern[MAXLNLEN]; + *newpattern = '\0'; + if (n == 0) return 0; + *result2 = '\0'; + struct hentry * rv = NULL; + if (!pAMgr) return NULL; + +// search affixed forms with and without derivational suffixes + while(1) { + + for (int k = 0; k < n; k++) { + *result = '\0'; + // add compound word parts (except the last one) + char * s = (char *) desc[k]; + char * part = strstr(s, MORPH_PART); + if (part) { + char * nextpart = strstr(part + 1, MORPH_PART); + while (nextpart) { + copy_field(result + strlen(result), part, MORPH_PART); + part = nextpart; + nextpart = strstr(part + 1, MORPH_PART); + } + s = part; + } + + char **pl; + char tok[MAXLNLEN]; + strcpy(tok, s); + char * alt = strstr(tok, " | "); + while (alt) { + alt[1] = MSEP_ALT; + alt = strstr(alt, " | "); + } + int pln = line_tok(tok, &pl, MSEP_ALT); + for (int i = 0; i < pln; i++) { + // remove inflectional and terminal suffixes + char * is = strstr(pl[i], MORPH_INFL_SFX); + if (is) *is = '\0'; + char * ts = strstr(pl[i], MORPH_TERM_SFX); + while (ts) { + *ts = '_'; + ts = strstr(pl[i], MORPH_TERM_SFX); + } + char * st = strstr(s, MORPH_STEM); + if (st) { + copy_field(tok, st, MORPH_STEM); + rv = pAMgr->lookup(tok); + while (rv) { + char newpat[MAXLNLEN]; + strcpy(newpat, pl[i]); + strcat(newpat, pattern); + char * sg = suggest_hentry_gen(rv, newpat); + if (!sg) sg = suggest_hentry_gen(rv, pattern); + if (sg) { + char ** gen; + int genl = line_tok(sg, &gen, MSEP_REC); + free(sg); + sg = NULL; + for (int j = 0; j < genl; j++) { + if (strstr(pl[i], MORPH_SURF_PFX)) { + int r2l = strlen(result2); + result2[r2l] = MSEP_REC; + strcpy(result2 + r2l + 1, result); + copy_field(result2 + strlen(result2), pl[i], MORPH_SURF_PFX); + mystrcat(result2, gen[j], MAXLNLEN); + } else { + sprintf(result2 + strlen(result2), "%c%s%s", + MSEP_REC, result, gen[j]); + } + } + freelist(&gen, genl); + } + rv = rv->next_homonym; + } + } + } + freelist(&pl, pln); + } + + if (*result2 || !strstr(pattern, MORPH_DERI_SFX)) break; + strcpy(newpattern, pattern); + pattern = newpattern; + char * ds = strstr(pattern, MORPH_DERI_SFX); + while (ds) { + strncpy(ds, MORPH_TERM_SFX, MORPH_TAG_LEN); + ds = strstr(pattern, MORPH_DERI_SFX); + } + } + return (*result2 ? mystrdup(result2) : NULL); +} + + +// generate an n-gram score comparing s1 and s2 +int SuggestMgr::ngram(int n, char * s1, const char * s2, int opt) +{ + int nscore = 0; + int ns; + int l1; + int l2; + int test = 0; + + if (utf8) { + w_char su1[MAXSWL]; + w_char su2[MAXSWL]; + l1 = u8_u16(su1, MAXSWL, s1); + l2 = u8_u16(su2, MAXSWL, s2); + if ((l2 <= 0) || (l1 == -1)) return 0; + // lowering dictionary word + if (opt & NGRAM_LOWERING) mkallsmall_utf(su2, l2, langnum); + for (int j = 1; j <= n; j++) { + ns = 0; + for (int i = 0; i <= (l1-j); i++) { + int k = 0; + for (int l = 0; l <= (l2-j); l++) { + for (k = 0; k < j; k++) { + w_char * c1 = su1 + i + k; + w_char * c2 = su2 + l + k; + if ((c1->l != c2->l) || (c1->h != c2->h)) break; + } + if (k == j) { + ns++; + break; + } + } + if (k != j && opt & NGRAM_WEIGHTED) { + ns--; + test++; + if (i == 0 || i == l1-j) ns--; // side weight + } + } + nscore = nscore + ns; + if (ns < 2 && !(opt & NGRAM_WEIGHTED)) break; + } + } else { + l2 = strlen(s2); + if (l2 == 0) return 0; + l1 = strlen(s1); + char *t = mystrdup(s2); + if (opt & NGRAM_LOWERING) mkallsmall(t, csconv); + for (int j = 1; j <= n; j++) { + ns = 0; + for (int i = 0; i <= (l1-j); i++) { + char c = *(s1 + i + j); + *(s1 + i + j) = '\0'; + if (strstr(t,(s1+i))) { + ns++; + } else if (opt & NGRAM_WEIGHTED) { + ns--; +test++; + if (i == 0 || i == l1-j) ns--; // side weight + } + *(s1 + i + j ) = c; + } + nscore = nscore + ns; + if (ns < 2 && !(opt & NGRAM_WEIGHTED)) break; + } + free(t); + } + + ns = 0; + if (opt & NGRAM_LONGER_WORSE) ns = (l2-l1)-2; + if (opt & NGRAM_ANY_MISMATCH) ns = abs(l2-l1)-2; + ns = (nscore - ((ns > 0) ? ns : 0)); + return ns; +} + +// length of the left common substring of s1 and (decapitalised) s2 +int SuggestMgr::leftcommonsubstring(char * s1, const char * s2) { + if (utf8) { + w_char su1[MAXSWL]; + w_char su2[MAXSWL]; + su1[0].l = su2[0].l = su1[0].h = su2[0].h = 0; + // decapitalize dictionary word + if (complexprefixes) { + int l1 = u8_u16(su1, MAXSWL, s1); + int l2 = u8_u16(su2, MAXSWL, s2); + if (*((short *)su1+l1-1) == *((short *)su2+l2-1)) return 1; + } else { + int i; + u8_u16(su1, 1, s1); + u8_u16(su2, 1, s2); + unsigned short idx = (su2->h << 8) + su2->l; + unsigned short otheridx = (su1->h << 8) + su1->l; + if (otheridx != idx && + (otheridx != unicodetolower(idx, langnum))) return 0; + int l1 = u8_u16(su1, MAXSWL, s1); + int l2 = u8_u16(su2, MAXSWL, s2); + for(i = 1; (i < l1) && (i < l2) && + (su1[i].l == su2[i].l) && (su1[i].h == su2[i].h); i++); + return i; + } + } else { + if (complexprefixes) { + int l1 = strlen(s1); + int l2 = strlen(s2); + if (*(s2+l1-1) == *(s2+l2-1)) return 1; + } else { + char * olds = s1; + // decapitalise dictionary word + if ((*s1 != *s2) && (*s1 != csconv[((unsigned char)*s2)].clower)) return 0; + do { + s1++; s2++; + } while ((*s1 == *s2) && (*s1 != '\0')); + return (int)(s1 - olds); + } + } + return 0; +} + +int SuggestMgr::commoncharacterpositions(char * s1, const char * s2, int * is_swap) { + int num = 0; + int diff = 0; + int diffpos[2]; + *is_swap = 0; + if (utf8) { + w_char su1[MAXSWL]; + w_char su2[MAXSWL]; + int l1 = u8_u16(su1, MAXSWL, s1); + int l2 = u8_u16(su2, MAXSWL, s2); + // decapitalize dictionary word + if (complexprefixes) { + mkallsmall_utf(su2+l2-1, 1, langnum); + } else { + mkallsmall_utf(su2, 1, langnum); + } + for (int i = 0; (i < l1) && (i < l2); i++) { + if (((short *) su1)[i] == ((short *) su2)[i]) { + num++; + } else { + if (diff < 2) diffpos[diff] = i; + diff++; + } + } + if ((diff == 2) && (l1 == l2) && + (((short *) su1)[diffpos[0]] == ((short *) su2)[diffpos[1]]) && + (((short *) su1)[diffpos[1]] == ((short *) su2)[diffpos[0]])) *is_swap = 1; + } else { + int i; + char t[MAXSWUTF8L]; + strcpy(t, s2); + // decapitalize dictionary word + if (complexprefixes) { + int l2 = strlen(t); + *(t+l2-1) = csconv[((unsigned char)*(t+l2-1))].clower; + } else { + mkallsmall(t, csconv); + } + for (i = 0; (*(s1+i) != 0) && (*(t+i) != 0); i++) { + if (*(s1+i) == *(t+i)) { + num++; + } else { + if (diff < 2) diffpos[diff] = i; + diff++; + } + } + if ((diff == 2) && (*(s1+i) == 0) && (*(t+i) == 0) && + (*(s1+diffpos[0]) == *(t+diffpos[1])) && + (*(s1+diffpos[1]) == *(t+diffpos[0]))) *is_swap = 1; + } + return num; +} + +int SuggestMgr::mystrlen(const char * word) { + if (utf8) { + w_char w[MAXSWL]; + return u8_u16(w, MAXSWL, word); + } else return strlen(word); +} + +// sort in decreasing order of score +void SuggestMgr::bubblesort(char** rword, char** rword2, int* rsc, int n ) +{ + int m = 1; + while (m < n) { + int j = m; + while (j > 0) { + if (rsc[j-1] < rsc[j]) { + int sctmp = rsc[j-1]; + char * wdtmp = rword[j-1]; + rsc[j-1] = rsc[j]; + rword[j-1] = rword[j]; + rsc[j] = sctmp; + rword[j] = wdtmp; + if (rword2) { + wdtmp = rword2[j-1]; + rword2[j-1] = rword2[j]; + rword2[j] = wdtmp; + } + j--; + } else break; + } + m++; + } + return; +} + +// longest common subsequence +void SuggestMgr::lcs(const char * s, const char * s2, int * l1, int * l2, char ** result) { + int n, m; + w_char su[MAXSWL]; + w_char su2[MAXSWL]; + char * b; + char * c; + int i; + int j; + if (utf8) { + m = u8_u16(su, MAXSWL, s); + n = u8_u16(su2, MAXSWL, s2); + } else { + m = strlen(s); + n = strlen(s2); + } + c = (char *) malloc((m + 1) * (n + 1)); + b = (char *) malloc((m + 1) * (n + 1)); + if (!c || !b) { + if (c) free(c); + if (b) free(b); + *result = NULL; + return; + } + for (i = 1; i <= m; i++) c[i*(n+1)] = 0; + for (j = 0; j <= n; j++) c[j] = 0; + for (i = 1; i <= m; i++) { + for (j = 1; j <= n; j++) { + if ( ((utf8) && (*((short *) su+i-1) == *((short *)su2+j-1))) + || ((!utf8) && ((*(s+i-1)) == (*(s2+j-1))))) { + c[i*(n+1) + j] = c[(i-1)*(n+1) + j-1]+1; + b[i*(n+1) + j] = LCS_UPLEFT; + } else if (c[(i-1)*(n+1) + j] >= c[i*(n+1) + j-1]) { + c[i*(n+1) + j] = c[(i-1)*(n+1) + j]; + b[i*(n+1) + j] = LCS_UP; + } else { + c[i*(n+1) + j] = c[i*(n+1) + j-1]; + b[i*(n+1) + j] = LCS_LEFT; + } + } + } + *result = b; + free(c); + *l1 = m; + *l2 = n; +} + +int SuggestMgr::lcslen(const char * s, const char* s2) { + int m; + int n; + int i; + int j; + char * result; + int len = 0; + lcs(s, s2, &m, &n, &result); + if (!result) return 0; + i = m; + j = n; + while ((i != 0) && (j != 0)) { + if (result[i*(n+1) + j] == LCS_UPLEFT) { + len++; + i--; + j--; + } else if (result[i*(n+1) + j] == LCS_UP) { + i--; + } else j--; + } + free(result); + return len; +} diff --git a/plugins/SpellChecker/src/hunspell/suggestmgr.hxx b/plugins/SpellChecker/src/hunspell/suggestmgr.hxx new file mode 100644 index 0000000000..5f043fdfd2 --- /dev/null +++ b/plugins/SpellChecker/src/hunspell/suggestmgr.hxx @@ -0,0 +1,111 @@ +#ifndef _SUGGESTMGR_HXX_ +#define _SUGGESTMGR_HXX_ + +#define MAXSWL 100 +#define MAXSWUTF8L (MAXSWL * 4) +#define MAX_ROOTS 100 +#define MAX_WORDS 100 +#define MAX_GUESS 200 +#define MAXNGRAMSUGS 4 +#define MAXPHONSUGS 2 +#define MAXCOMPOUNDSUGS 3 + +// timelimit: max ~1/4 sec (process time on Linux) for a time consuming function +#define TIMELIMIT (CLOCKS_PER_SEC >> 2) +#define MINTIMER 100 +#define MAXPLUSTIMER 100 + +#define NGRAM_LONGER_WORSE (1 << 0) +#define NGRAM_ANY_MISMATCH (1 << 1) +#define NGRAM_LOWERING (1 << 2) +#define NGRAM_WEIGHTED (1 << 3) + +#include "hunvisapi.h" + +#include "atypes.hxx" +#include "affixmgr.hxx" +#include "hashmgr.hxx" +#include "langnum.hxx" +#include + +enum { LCS_UP, LCS_LEFT, LCS_UPLEFT }; + +class LIBHUNSPELL_DLL_EXPORTED SuggestMgr +{ + char * ckey; + int ckeyl; + w_char * ckey_utf; + + char * ctry; + int ctryl; + w_char * ctry_utf; + + AffixMgr* pAMgr; + int maxSug; + struct cs_info * csconv; + int utf8; + int langnum; + int nosplitsugs; + int maxngramsugs; + int maxcpdsugs; + int complexprefixes; + + +public: + SuggestMgr(const char * tryme, int maxn, AffixMgr *aptr); + ~SuggestMgr(); + + int suggest(char*** slst, const char * word, int nsug, int * onlycmpdsug); + int ngsuggest(char ** wlst, char * word, int ns, HashMgr** pHMgr, int md); + int suggest_auto(char*** slst, const char * word, int nsug); + int suggest_stems(char*** slst, const char * word, int nsug); + int suggest_pos_stems(char*** slst, const char * word, int nsug); + + char * suggest_morph(const char * word); + char * suggest_gen(char ** pl, int pln, char * pattern); + char * suggest_morph_for_spelling_error(const char * word); + +private: + int testsug(char** wlst, const char * candidate, int wl, int ns, int cpdsuggest, + int * timer, clock_t * timelimit); + int checkword(const char *, int, int, int *, clock_t *); + int check_forbidden(const char *, int); + + int capchars(char **, const char *, int, int); + int replchars(char**, const char *, int, int); + int doubletwochars(char**, const char *, int, int); + int forgotchar(char **, const char *, int, int); + int swapchar(char **, const char *, int, int); + int longswapchar(char **, const char *, int, int); + int movechar(char **, const char *, int, int); + int extrachar(char **, const char *, int, int); + int badcharkey(char **, const char *, int, int); + int badchar(char **, const char *, int, int); + int twowords(char **, const char *, int, int); + int fixstems(char **, const char *, int); + + int capchars_utf(char **, const w_char *, int wl, int, int); + int doubletwochars_utf(char**, const w_char *, int wl, int, int); + int forgotchar_utf(char**, const w_char *, int wl, int, int); + int extrachar_utf(char**, const w_char *, int wl, int, int); + int badcharkey_utf(char **, const w_char *, int wl, int, int); + int badchar_utf(char **, const w_char *, int wl, int, int); + int swapchar_utf(char **, const w_char *, int wl, int, int); + int longswapchar_utf(char **, const w_char *, int, int, int); + int movechar_utf(char **, const w_char *, int, int, int); + + int mapchars(char**, const char *, int, int); + int map_related(const char *, char *, int, int, char ** wlst, int, int, const mapentry*, int, int *, clock_t *); + int ngram(int n, char * s1, const char * s2, int opt); + int mystrlen(const char * word); + int leftcommonsubstring(char * s1, const char * s2); + int commoncharacterpositions(char * s1, const char * s2, int * is_swap); + void bubblesort( char ** rwd, char ** rwd2, int * rsc, int n); + void lcs(const char * s, const char * s2, int * l1, int * l2, char ** result); + int lcslen(const char * s, const char* s2); + char * suggest_hentry_gen(hentry * rv, char * pattern); + +}; + +#endif + diff --git a/plugins/SpellChecker/src/hunspell/utf_info.cxx b/plugins/SpellChecker/src/hunspell/utf_info.cxx new file mode 100644 index 0000000000..4a8e203cfa --- /dev/null +++ b/plugins/SpellChecker/src/hunspell/utf_info.cxx @@ -0,0 +1,19676 @@ +#include "csutil.hxx" +/* fields: Unicode letter, toupper, tolower */ +static struct unicode_info utf_lst[] = { +{ 0x0041, 0x0041, 0x0061 }, +{ 0x0042, 0x0042, 0x0062 }, +{ 0x0043, 0x0043, 0x0063 }, +{ 0x0044, 0x0044, 0x0064 }, +{ 0x0045, 0x0045, 0x0065 }, +{ 0x0046, 0x0046, 0x0066 }, +{ 0x0047, 0x0047, 0x0067 }, +{ 0x0048, 0x0048, 0x0068 }, +{ 0x0049, 0x0049, 0x0069 }, +{ 0x004A, 0x004A, 0x006A }, +{ 0x004B, 0x004B, 0x006B }, +{ 0x004C, 0x004C, 0x006C }, +{ 0x004D, 0x004D, 0x006D }, +{ 0x004E, 0x004E, 0x006E }, +{ 0x004F, 0x004F, 0x006F }, +{ 0x0050, 0x0050, 0x0070 }, +{ 0x0051, 0x0051, 0x0071 }, +{ 0x0052, 0x0052, 0x0072 }, +{ 0x0053, 0x0053, 0x0073 }, +{ 0x0054, 0x0054, 0x0074 }, +{ 0x0055, 0x0055, 0x0075 }, +{ 0x0056, 0x0056, 0x0076 }, +{ 0x0057, 0x0057, 0x0077 }, +{ 0x0058, 0x0058, 0x0078 }, +{ 0x0059, 0x0059, 0x0079 }, +{ 0x005A, 0x005A, 0x007A }, +{ 0x0061, 0x0041, 0x0061 }, +{ 0x0062, 0x0042, 0x0062 }, +{ 0x0063, 0x0043, 0x0063 }, +{ 0x0064, 0x0044, 0x0064 }, +{ 0x0065, 0x0045, 0x0065 }, +{ 0x0066, 0x0046, 0x0066 }, +{ 0x0067, 0x0047, 0x0067 }, +{ 0x0068, 0x0048, 0x0068 }, +{ 0x0069, 0x0049, 0x0069 }, +{ 0x006A, 0x004A, 0x006A }, +{ 0x006B, 0x004B, 0x006B }, +{ 0x006C, 0x004C, 0x006C }, +{ 0x006D, 0x004D, 0x006D }, +{ 0x006E, 0x004E, 0x006E }, +{ 0x006F, 0x004F, 0x006F }, +{ 0x0070, 0x0050, 0x0070 }, +{ 0x0071, 0x0051, 0x0071 }, +{ 0x0072, 0x0052, 0x0072 }, +{ 0x0073, 0x0053, 0x0073 }, +{ 0x0074, 0x0054, 0x0074 }, +{ 0x0075, 0x0055, 0x0075 }, +{ 0x0076, 0x0056, 0x0076 }, +{ 0x0077, 0x0057, 0x0077 }, +{ 0x0078, 0x0058, 0x0078 }, +{ 0x0079, 0x0059, 0x0079 }, +{ 0x007A, 0x005A, 0x007A }, +{ 0x00AA, 0x00AA, 0x00AA }, +{ 0x00B5, 0x039C, 0x00B5 }, +{ 0x00BA, 0x00BA, 0x00BA }, +{ 0x00C0, 0x00C0, 0x00E0 }, +{ 0x00C1, 0x00C1, 0x00E1 }, +{ 0x00C2, 0x00C2, 0x00E2 }, +{ 0x00C3, 0x00C3, 0x00E3 }, +{ 0x00C4, 0x00C4, 0x00E4 }, +{ 0x00C5, 0x00C5, 0x00E5 }, +{ 0x00C6, 0x00C6, 0x00E6 }, +{ 0x00C7, 0x00C7, 0x00E7 }, +{ 0x00C8, 0x00C8, 0x00E8 }, +{ 0x00C9, 0x00C9, 0x00E9 }, +{ 0x00CA, 0x00CA, 0x00EA }, +{ 0x00CB, 0x00CB, 0x00EB }, +{ 0x00CC, 0x00CC, 0x00EC }, +{ 0x00CD, 0x00CD, 0x00ED }, +{ 0x00CE, 0x00CE, 0x00EE }, +{ 0x00CF, 0x00CF, 0x00EF }, +{ 0x00D0, 0x00D0, 0x00F0 }, +{ 0x00D1, 0x00D1, 0x00F1 }, +{ 0x00D2, 0x00D2, 0x00F2 }, +{ 0x00D3, 0x00D3, 0x00F3 }, +{ 0x00D4, 0x00D4, 0x00F4 }, +{ 0x00D5, 0x00D5, 0x00F5 }, +{ 0x00D6, 0x00D6, 0x00F6 }, +{ 0x00D8, 0x00D8, 0x00F8 }, +{ 0x00D9, 0x00D9, 0x00F9 }, +{ 0x00DA, 0x00DA, 0x00FA }, +{ 0x00DB, 0x00DB, 0x00FB }, +{ 0x00DC, 0x00DC, 0x00FC }, +{ 0x00DD, 0x00DD, 0x00FD }, +{ 0x00DE, 0x00DE, 0x00FE }, +{ 0x00DF, 0x00DF, 0x00DF }, +{ 0x00E0, 0x00C0, 0x00E0 }, +{ 0x00E1, 0x00C1, 0x00E1 }, +{ 0x00E2, 0x00C2, 0x00E2 }, +{ 0x00E3, 0x00C3, 0x00E3 }, +{ 0x00E4, 0x00C4, 0x00E4 }, +{ 0x00E5, 0x00C5, 0x00E5 }, +{ 0x00E6, 0x00C6, 0x00E6 }, +{ 0x00E7, 0x00C7, 0x00E7 }, +{ 0x00E8, 0x00C8, 0x00E8 }, +{ 0x00E9, 0x00C9, 0x00E9 }, +{ 0x00EA, 0x00CA, 0x00EA }, +{ 0x00EB, 0x00CB, 0x00EB }, +{ 0x00EC, 0x00CC, 0x00EC }, +{ 0x00ED, 0x00CD, 0x00ED }, +{ 0x00EE, 0x00CE, 0x00EE }, +{ 0x00EF, 0x00CF, 0x00EF }, +{ 0x00F0, 0x00D0, 0x00F0 }, +{ 0x00F1, 0x00D1, 0x00F1 }, +{ 0x00F2, 0x00D2, 0x00F2 }, +{ 0x00F3, 0x00D3, 0x00F3 }, +{ 0x00F4, 0x00D4, 0x00F4 }, +{ 0x00F5, 0x00D5, 0x00F5 }, +{ 0x00F6, 0x00D6, 0x00F6 }, +{ 0x00F8, 0x00D8, 0x00F8 }, +{ 0x00F9, 0x00D9, 0x00F9 }, +{ 0x00FA, 0x00DA, 0x00FA }, +{ 0x00FB, 0x00DB, 0x00FB }, +{ 0x00FC, 0x00DC, 0x00FC }, +{ 0x00FD, 0x00DD, 0x00FD }, +{ 0x00FE, 0x00DE, 0x00FE }, +{ 0x00FF, 0x0178, 0x00FF }, +{ 0x0100, 0x0100, 0x0101 }, +{ 0x0101, 0x0100, 0x0101 }, +{ 0x0102, 0x0102, 0x0103 }, +{ 0x0103, 0x0102, 0x0103 }, +{ 0x0104, 0x0104, 0x0105 }, +{ 0x0105, 0x0104, 0x0105 }, +{ 0x0106, 0x0106, 0x0107 }, +{ 0x0107, 0x0106, 0x0107 }, +{ 0x0108, 0x0108, 0x0109 }, +{ 0x0109, 0x0108, 0x0109 }, +{ 0x010A, 0x010A, 0x010B }, +{ 0x010B, 0x010A, 0x010B }, +{ 0x010C, 0x010C, 0x010D }, +{ 0x010D, 0x010C, 0x010D }, +{ 0x010E, 0x010E, 0x010F }, +{ 0x010F, 0x010E, 0x010F }, +{ 0x0110, 0x0110, 0x0111 }, +{ 0x0111, 0x0110, 0x0111 }, +{ 0x0112, 0x0112, 0x0113 }, +{ 0x0113, 0x0112, 0x0113 }, +{ 0x0114, 0x0114, 0x0115 }, +{ 0x0115, 0x0114, 0x0115 }, +{ 0x0116, 0x0116, 0x0117 }, +{ 0x0117, 0x0116, 0x0117 }, +{ 0x0118, 0x0118, 0x0119 }, +{ 0x0119, 0x0118, 0x0119 }, +{ 0x011A, 0x011A, 0x011B }, +{ 0x011B, 0x011A, 0x011B }, +{ 0x011C, 0x011C, 0x011D }, +{ 0x011D, 0x011C, 0x011D }, +{ 0x011E, 0x011E, 0x011F }, +{ 0x011F, 0x011E, 0x011F }, +{ 0x0120, 0x0120, 0x0121 }, +{ 0x0121, 0x0120, 0x0121 }, +{ 0x0122, 0x0122, 0x0123 }, +{ 0x0123, 0x0122, 0x0123 }, +{ 0x0124, 0x0124, 0x0125 }, +{ 0x0125, 0x0124, 0x0125 }, +{ 0x0126, 0x0126, 0x0127 }, +{ 0x0127, 0x0126, 0x0127 }, +{ 0x0128, 0x0128, 0x0129 }, +{ 0x0129, 0x0128, 0x0129 }, +{ 0x012A, 0x012A, 0x012B }, +{ 0x012B, 0x012A, 0x012B }, +{ 0x012C, 0x012C, 0x012D }, +{ 0x012D, 0x012C, 0x012D }, +{ 0x012E, 0x012E, 0x012F }, +{ 0x012F, 0x012E, 0x012F }, +{ 0x0130, 0x0130, 0x0069 }, +{ 0x0131, 0x0049, 0x0131 }, +{ 0x0132, 0x0132, 0x0133 }, +{ 0x0133, 0x0132, 0x0133 }, +{ 0x0134, 0x0134, 0x0135 }, +{ 0x0135, 0x0134, 0x0135 }, +{ 0x0136, 0x0136, 0x0137 }, +{ 0x0137, 0x0136, 0x0137 }, +{ 0x0138, 0x0138, 0x0138 }, +{ 0x0139, 0x0139, 0x013A }, +{ 0x013A, 0x0139, 0x013A }, +{ 0x013B, 0x013B, 0x013C }, +{ 0x013C, 0x013B, 0x013C }, +{ 0x013D, 0x013D, 0x013E }, +{ 0x013E, 0x013D, 0x013E }, +{ 0x013F, 0x013F, 0x0140 }, +{ 0x0140, 0x013F, 0x0140 }, +{ 0x0141, 0x0141, 0x0142 }, +{ 0x0142, 0x0141, 0x0142 }, +{ 0x0143, 0x0143, 0x0144 }, +{ 0x0144, 0x0143, 0x0144 }, +{ 0x0145, 0x0145, 0x0146 }, +{ 0x0146, 0x0145, 0x0146 }, +{ 0x0147, 0x0147, 0x0148 }, +{ 0x0148, 0x0147, 0x0148 }, +{ 0x0149, 0x0149, 0x0149 }, +{ 0x014A, 0x014A, 0x014B }, +{ 0x014B, 0x014A, 0x014B }, +{ 0x014C, 0x014C, 0x014D }, +{ 0x014D, 0x014C, 0x014D }, +{ 0x014E, 0x014E, 0x014F }, +{ 0x014F, 0x014E, 0x014F }, +{ 0x0150, 0x0150, 0x0151 }, +{ 0x0151, 0x0150, 0x0151 }, +{ 0x0152, 0x0152, 0x0153 }, +{ 0x0153, 0x0152, 0x0153 }, +{ 0x0154, 0x0154, 0x0155 }, +{ 0x0155, 0x0154, 0x0155 }, +{ 0x0156, 0x0156, 0x0157 }, +{ 0x0157, 0x0156, 0x0157 }, +{ 0x0158, 0x0158, 0x0159 }, +{ 0x0159, 0x0158, 0x0159 }, +{ 0x015A, 0x015A, 0x015B }, +{ 0x015B, 0x015A, 0x015B }, +{ 0x015C, 0x015C, 0x015D }, +{ 0x015D, 0x015C, 0x015D }, +{ 0x015E, 0x015E, 0x015F }, +{ 0x015F, 0x015E, 0x015F }, +{ 0x0160, 0x0160, 0x0161 }, +{ 0x0161, 0x0160, 0x0161 }, +{ 0x0162, 0x0162, 0x0163 }, +{ 0x0163, 0x0162, 0x0163 }, +{ 0x0164, 0x0164, 0x0165 }, +{ 0x0165, 0x0164, 0x0165 }, +{ 0x0166, 0x0166, 0x0167 }, +{ 0x0167, 0x0166, 0x0167 }, +{ 0x0168, 0x0168, 0x0169 }, +{ 0x0169, 0x0168, 0x0169 }, +{ 0x016A, 0x016A, 0x016B }, +{ 0x016B, 0x016A, 0x016B }, +{ 0x016C, 0x016C, 0x016D }, +{ 0x016D, 0x016C, 0x016D }, +{ 0x016E, 0x016E, 0x016F }, +{ 0x016F, 0x016E, 0x016F }, +{ 0x0170, 0x0170, 0x0171 }, +{ 0x0171, 0x0170, 0x0171 }, +{ 0x0172, 0x0172, 0x0173 }, +{ 0x0173, 0x0172, 0x0173 }, +{ 0x0174, 0x0174, 0x0175 }, +{ 0x0175, 0x0174, 0x0175 }, +{ 0x0176, 0x0176, 0x0177 }, +{ 0x0177, 0x0176, 0x0177 }, +{ 0x0178, 0x0178, 0x00FF }, +{ 0x0179, 0x0179, 0x017A }, +{ 0x017A, 0x0179, 0x017A }, +{ 0x017B, 0x017B, 0x017C }, +{ 0x017C, 0x017B, 0x017C }, +{ 0x017D, 0x017D, 0x017E }, +{ 0x017E, 0x017D, 0x017E }, +{ 0x017F, 0x0053, 0x017F }, +{ 0x0180, 0x0180, 0x0180 }, +{ 0x0181, 0x0181, 0x0253 }, +{ 0x0182, 0x0182, 0x0183 }, +{ 0x0183, 0x0182, 0x0183 }, +{ 0x0184, 0x0184, 0x0185 }, +{ 0x0185, 0x0184, 0x0185 }, +{ 0x0186, 0x0186, 0x0254 }, +{ 0x0187, 0x0187, 0x0188 }, +{ 0x0188, 0x0187, 0x0188 }, +{ 0x0189, 0x0189, 0x0256 }, +{ 0x018A, 0x018A, 0x0257 }, +{ 0x018B, 0x018B, 0x018C }, +{ 0x018C, 0x018B, 0x018C }, +{ 0x018D, 0x018D, 0x018D }, +{ 0x018E, 0x018E, 0x01DD }, +{ 0x018F, 0x018F, 0x0259 }, +{ 0x0190, 0x0190, 0x025B }, +{ 0x0191, 0x0191, 0x0192 }, +{ 0x0192, 0x0191, 0x0192 }, +{ 0x0193, 0x0193, 0x0260 }, +{ 0x0194, 0x0194, 0x0263 }, +{ 0x0195, 0x01F6, 0x0195 }, +{ 0x0196, 0x0196, 0x0269 }, +{ 0x0197, 0x0197, 0x0268 }, +{ 0x0198, 0x0198, 0x0199 }, +{ 0x0199, 0x0198, 0x0199 }, +{ 0x019A, 0x023D, 0x019A }, +{ 0x019B, 0x019B, 0x019B }, +{ 0x019C, 0x019C, 0x026F }, +{ 0x019D, 0x019D, 0x0272 }, +{ 0x019E, 0x0220, 0x019E }, +{ 0x019F, 0x019F, 0x0275 }, +{ 0x01A0, 0x01A0, 0x01A1 }, +{ 0x01A1, 0x01A0, 0x01A1 }, +{ 0x01A2, 0x01A2, 0x01A3 }, +{ 0x01A3, 0x01A2, 0x01A3 }, +{ 0x01A4, 0x01A4, 0x01A5 }, +{ 0x01A5, 0x01A4, 0x01A5 }, +{ 0x01A6, 0x01A6, 0x0280 }, +{ 0x01A7, 0x01A7, 0x01A8 }, +{ 0x01A8, 0x01A7, 0x01A8 }, +{ 0x01A9, 0x01A9, 0x0283 }, +{ 0x01AA, 0x01AA, 0x01AA }, +{ 0x01AB, 0x01AB, 0x01AB }, +{ 0x01AC, 0x01AC, 0x01AD }, +{ 0x01AD, 0x01AC, 0x01AD }, +{ 0x01AE, 0x01AE, 0x0288 }, +{ 0x01AF, 0x01AF, 0x01B0 }, +{ 0x01B0, 0x01AF, 0x01B0 }, +{ 0x01B1, 0x01B1, 0x028A }, +{ 0x01B2, 0x01B2, 0x028B }, +{ 0x01B3, 0x01B3, 0x01B4 }, +{ 0x01B4, 0x01B3, 0x01B4 }, +{ 0x01B5, 0x01B5, 0x01B6 }, +{ 0x01B6, 0x01B5, 0x01B6 }, +{ 0x01B7, 0x01B7, 0x0292 }, +{ 0x01B8, 0x01B8, 0x01B9 }, +{ 0x01B9, 0x01B8, 0x01B9 }, +{ 0x01BA, 0x01BA, 0x01BA }, +{ 0x01BB, 0x01BB, 0x01BB }, +{ 0x01BC, 0x01BC, 0x01BD }, +{ 0x01BD, 0x01BC, 0x01BD }, +{ 0x01BE, 0x01BE, 0x01BE }, +{ 0x01BF, 0x01F7, 0x01BF }, +{ 0x01C0, 0x01C0, 0x01C0 }, +{ 0x01C1, 0x01C1, 0x01C1 }, +{ 0x01C2, 0x01C2, 0x01C2 }, +{ 0x01C3, 0x01C3, 0x01C3 }, +{ 0x01C4, 0x01C4, 0x01C6 }, +{ 0x01C5, 0x01C4, 0x01C6 }, +{ 0x01C6, 0x01C4, 0x01C6 }, +{ 0x01C7, 0x01C7, 0x01C9 }, +{ 0x01C8, 0x01C7, 0x01C9 }, +{ 0x01C9, 0x01C7, 0x01C9 }, +{ 0x01CA, 0x01CA, 0x01CC }, +{ 0x01CB, 0x01CA, 0x01CC }, +{ 0x01CC, 0x01CA, 0x01CC }, +{ 0x01CD, 0x01CD, 0x01CE }, +{ 0x01CE, 0x01CD, 0x01CE }, +{ 0x01CF, 0x01CF, 0x01D0 }, +{ 0x01D0, 0x01CF, 0x01D0 }, +{ 0x01D1, 0x01D1, 0x01D2 }, +{ 0x01D2, 0x01D1, 0x01D2 }, +{ 0x01D3, 0x01D3, 0x01D4 }, +{ 0x01D4, 0x01D3, 0x01D4 }, +{ 0x01D5, 0x01D5, 0x01D6 }, +{ 0x01D6, 0x01D5, 0x01D6 }, +{ 0x01D7, 0x01D7, 0x01D8 }, +{ 0x01D8, 0x01D7, 0x01D8 }, +{ 0x01D9, 0x01D9, 0x01DA }, +{ 0x01DA, 0x01D9, 0x01DA }, +{ 0x01DB, 0x01DB, 0x01DC }, +{ 0x01DC, 0x01DB, 0x01DC }, +{ 0x01DD, 0x018E, 0x01DD }, +{ 0x01DE, 0x01DE, 0x01DF }, +{ 0x01DF, 0x01DE, 0x01DF }, +{ 0x01E0, 0x01E0, 0x01E1 }, +{ 0x01E1, 0x01E0, 0x01E1 }, +{ 0x01E2, 0x01E2, 0x01E3 }, +{ 0x01E3, 0x01E2, 0x01E3 }, +{ 0x01E4, 0x01E4, 0x01E5 }, +{ 0x01E5, 0x01E4, 0x01E5 }, +{ 0x01E6, 0x01E6, 0x01E7 }, +{ 0x01E7, 0x01E6, 0x01E7 }, +{ 0x01E8, 0x01E8, 0x01E9 }, +{ 0x01E9, 0x01E8, 0x01E9 }, +{ 0x01EA, 0x01EA, 0x01EB }, +{ 0x01EB, 0x01EA, 0x01EB }, +{ 0x01EC, 0x01EC, 0x01ED }, +{ 0x01ED, 0x01EC, 0x01ED }, +{ 0x01EE, 0x01EE, 0x01EF }, +{ 0x01EF, 0x01EE, 0x01EF }, +{ 0x01F0, 0x01F0, 0x01F0 }, +{ 0x01F1, 0x01F1, 0x01F3 }, +{ 0x01F2, 0x01F1, 0x01F3 }, +{ 0x01F3, 0x01F1, 0x01F3 }, +{ 0x01F4, 0x01F4, 0x01F5 }, +{ 0x01F5, 0x01F4, 0x01F5 }, +{ 0x01F6, 0x01F6, 0x0195 }, +{ 0x01F7, 0x01F7, 0x01BF }, +{ 0x01F8, 0x01F8, 0x01F9 }, +{ 0x01F9, 0x01F8, 0x01F9 }, +{ 0x01FA, 0x01FA, 0x01FB }, +{ 0x01FB, 0x01FA, 0x01FB }, +{ 0x01FC, 0x01FC, 0x01FD }, +{ 0x01FD, 0x01FC, 0x01FD }, +{ 0x01FE, 0x01FE, 0x01FF }, +{ 0x01FF, 0x01FE, 0x01FF }, +{ 0x0200, 0x0200, 0x0201 }, +{ 0x0201, 0x0200, 0x0201 }, +{ 0x0202, 0x0202, 0x0203 }, +{ 0x0203, 0x0202, 0x0203 }, +{ 0x0204, 0x0204, 0x0205 }, +{ 0x0205, 0x0204, 0x0205 }, +{ 0x0206, 0x0206, 0x0207 }, +{ 0x0207, 0x0206, 0x0207 }, +{ 0x0208, 0x0208, 0x0209 }, +{ 0x0209, 0x0208, 0x0209 }, +{ 0x020A, 0x020A, 0x020B }, +{ 0x020B, 0x020A, 0x020B }, +{ 0x020C, 0x020C, 0x020D }, +{ 0x020D, 0x020C, 0x020D }, +{ 0x020E, 0x020E, 0x020F }, +{ 0x020F, 0x020E, 0x020F }, +{ 0x0210, 0x0210, 0x0211 }, +{ 0x0211, 0x0210, 0x0211 }, +{ 0x0212, 0x0212, 0x0213 }, +{ 0x0213, 0x0212, 0x0213 }, +{ 0x0214, 0x0214, 0x0215 }, +{ 0x0215, 0x0214, 0x0215 }, +{ 0x0216, 0x0216, 0x0217 }, +{ 0x0217, 0x0216, 0x0217 }, +{ 0x0218, 0x0218, 0x0219 }, +{ 0x0219, 0x0218, 0x0219 }, +{ 0x021A, 0x021A, 0x021B }, +{ 0x021B, 0x021A, 0x021B }, +{ 0x021C, 0x021C, 0x021D }, +{ 0x021D, 0x021C, 0x021D }, +{ 0x021E, 0x021E, 0x021F }, +{ 0x021F, 0x021E, 0x021F }, +{ 0x0220, 0x0220, 0x019E }, +{ 0x0221, 0x0221, 0x0221 }, +{ 0x0222, 0x0222, 0x0223 }, +{ 0x0223, 0x0222, 0x0223 }, +{ 0x0224, 0x0224, 0x0225 }, +{ 0x0225, 0x0224, 0x0225 }, +{ 0x0226, 0x0226, 0x0227 }, +{ 0x0227, 0x0226, 0x0227 }, +{ 0x0228, 0x0228, 0x0229 }, +{ 0x0229, 0x0228, 0x0229 }, +{ 0x022A, 0x022A, 0x022B }, +{ 0x022B, 0x022A, 0x022B }, +{ 0x022C, 0x022C, 0x022D }, +{ 0x022D, 0x022C, 0x022D }, +{ 0x022E, 0x022E, 0x022F }, +{ 0x022F, 0x022E, 0x022F }, +{ 0x0230, 0x0230, 0x0231 }, +{ 0x0231, 0x0230, 0x0231 }, +{ 0x0232, 0x0232, 0x0233 }, +{ 0x0233, 0x0232, 0x0233 }, +{ 0x0234, 0x0234, 0x0234 }, +{ 0x0235, 0x0235, 0x0235 }, +{ 0x0236, 0x0236, 0x0236 }, +{ 0x0237, 0x0237, 0x0237 }, +{ 0x0238, 0x0238, 0x0238 }, +{ 0x0239, 0x0239, 0x0239 }, +{ 0x023A, 0x023A, 0x023A }, +{ 0x023B, 0x023B, 0x023C }, +{ 0x023C, 0x023B, 0x023C }, +{ 0x023D, 0x023D, 0x019A }, +{ 0x023E, 0x023E, 0x023E }, +{ 0x023F, 0x023F, 0x023F }, +{ 0x0240, 0x0240, 0x0240 }, +{ 0x0241, 0x0241, 0x0294 }, +{ 0x0250, 0x0250, 0x0250 }, +{ 0x0251, 0x0251, 0x0251 }, +{ 0x0252, 0x0252, 0x0252 }, +{ 0x0253, 0x0181, 0x0253 }, +{ 0x0254, 0x0186, 0x0254 }, +{ 0x0255, 0x0255, 0x0255 }, +{ 0x0256, 0x0189, 0x0256 }, +{ 0x0257, 0x018A, 0x0257 }, +{ 0x0258, 0x0258, 0x0258 }, +{ 0x0259, 0x018F, 0x0259 }, +{ 0x025A, 0x025A, 0x025A }, +{ 0x025B, 0x0190, 0x025B }, +{ 0x025C, 0x025C, 0x025C }, +{ 0x025D, 0x025D, 0x025D }, +{ 0x025E, 0x025E, 0x025E }, +{ 0x025F, 0x025F, 0x025F }, +{ 0x0260, 0x0193, 0x0260 }, +{ 0x0261, 0x0261, 0x0261 }, +{ 0x0262, 0x0262, 0x0262 }, +{ 0x0263, 0x0194, 0x0263 }, +{ 0x0264, 0x0264, 0x0264 }, +{ 0x0265, 0x0265, 0x0265 }, +{ 0x0266, 0x0266, 0x0266 }, +{ 0x0267, 0x0267, 0x0267 }, +{ 0x0268, 0x0197, 0x0268 }, +{ 0x0269, 0x0196, 0x0269 }, +{ 0x026A, 0x026A, 0x026A }, +{ 0x026B, 0x026B, 0x026B }, +{ 0x026C, 0x026C, 0x026C }, +{ 0x026D, 0x026D, 0x026D }, +{ 0x026E, 0x026E, 0x026E }, +{ 0x026F, 0x019C, 0x026F }, +{ 0x0270, 0x0270, 0x0270 }, +{ 0x0271, 0x0271, 0x0271 }, +{ 0x0272, 0x019D, 0x0272 }, +{ 0x0273, 0x0273, 0x0273 }, +{ 0x0274, 0x0274, 0x0274 }, +{ 0x0275, 0x019F, 0x0275 }, +{ 0x0276, 0x0276, 0x0276 }, +{ 0x0277, 0x0277, 0x0277 }, +{ 0x0278, 0x0278, 0x0278 }, +{ 0x0279, 0x0279, 0x0279 }, +{ 0x027A, 0x027A, 0x027A }, +{ 0x027B, 0x027B, 0x027B }, +{ 0x027C, 0x027C, 0x027C }, +{ 0x027D, 0x027D, 0x027D }, +{ 0x027E, 0x027E, 0x027E }, +{ 0x027F, 0x027F, 0x027F }, +{ 0x0280, 0x01A6, 0x0280 }, +{ 0x0281, 0x0281, 0x0281 }, +{ 0x0282, 0x0282, 0x0282 }, +{ 0x0283, 0x01A9, 0x0283 }, +{ 0x0284, 0x0284, 0x0284 }, +{ 0x0285, 0x0285, 0x0285 }, +{ 0x0286, 0x0286, 0x0286 }, +{ 0x0287, 0x0287, 0x0287 }, +{ 0x0288, 0x01AE, 0x0288 }, +{ 0x0289, 0x0289, 0x0289 }, +{ 0x028A, 0x01B1, 0x028A }, +{ 0x028B, 0x01B2, 0x028B }, +{ 0x028C, 0x028C, 0x028C }, +{ 0x028D, 0x028D, 0x028D }, +{ 0x028E, 0x028E, 0x028E }, +{ 0x028F, 0x028F, 0x028F }, +{ 0x0290, 0x0290, 0x0290 }, +{ 0x0291, 0x0291, 0x0291 }, +{ 0x0292, 0x01B7, 0x0292 }, +{ 0x0293, 0x0293, 0x0293 }, +{ 0x0294, 0x0241, 0x0294 }, +{ 0x0295, 0x0295, 0x0295 }, +{ 0x0296, 0x0296, 0x0296 }, +{ 0x0297, 0x0297, 0x0297 }, +{ 0x0298, 0x0298, 0x0298 }, +{ 0x0299, 0x0299, 0x0299 }, +{ 0x029A, 0x029A, 0x029A }, +{ 0x029B, 0x029B, 0x029B }, +{ 0x029C, 0x029C, 0x029C }, +{ 0x029D, 0x029D, 0x029D }, +{ 0x029E, 0x029E, 0x029E }, +{ 0x029F, 0x029F, 0x029F }, +{ 0x02A0, 0x02A0, 0x02A0 }, +{ 0x02A1, 0x02A1, 0x02A1 }, +{ 0x02A2, 0x02A2, 0x02A2 }, +{ 0x02A3, 0x02A3, 0x02A3 }, +{ 0x02A4, 0x02A4, 0x02A4 }, +{ 0x02A5, 0x02A5, 0x02A5 }, +{ 0x02A6, 0x02A6, 0x02A6 }, +{ 0x02A7, 0x02A7, 0x02A7 }, +{ 0x02A8, 0x02A8, 0x02A8 }, +{ 0x02A9, 0x02A9, 0x02A9 }, +{ 0x02AA, 0x02AA, 0x02AA }, +{ 0x02AB, 0x02AB, 0x02AB }, +{ 0x02AC, 0x02AC, 0x02AC }, +{ 0x02AD, 0x02AD, 0x02AD }, +{ 0x02AE, 0x02AE, 0x02AE }, +{ 0x02AF, 0x02AF, 0x02AF }, +{ 0x02B0, 0x02B0, 0x02B0 }, +{ 0x02B1, 0x02B1, 0x02B1 }, +{ 0x02B2, 0x02B2, 0x02B2 }, +{ 0x02B3, 0x02B3, 0x02B3 }, +{ 0x02B4, 0x02B4, 0x02B4 }, +{ 0x02B5, 0x02B5, 0x02B5 }, +{ 0x02B6, 0x02B6, 0x02B6 }, +{ 0x02B7, 0x02B7, 0x02B7 }, +{ 0x02B8, 0x02B8, 0x02B8 }, +{ 0x02B9, 0x02B9, 0x02B9 }, +{ 0x02BA, 0x02BA, 0x02BA }, +{ 0x02BB, 0x02BB, 0x02BB }, +{ 0x02BC, 0x02BC, 0x02BC }, +{ 0x02BD, 0x02BD, 0x02BD }, +{ 0x02BE, 0x02BE, 0x02BE }, +{ 0x02BF, 0x02BF, 0x02BF }, +{ 0x02C0, 0x02C0, 0x02C0 }, +{ 0x02C1, 0x02C1, 0x02C1 }, +{ 0x02C6, 0x02C6, 0x02C6 }, +{ 0x02C7, 0x02C7, 0x02C7 }, +{ 0x02C8, 0x02C8, 0x02C8 }, +{ 0x02C9, 0x02C9, 0x02C9 }, +{ 0x02CA, 0x02CA, 0x02CA }, +{ 0x02CB, 0x02CB, 0x02CB }, +{ 0x02CC, 0x02CC, 0x02CC }, +{ 0x02CD, 0x02CD, 0x02CD }, +{ 0x02CE, 0x02CE, 0x02CE }, +{ 0x02CF, 0x02CF, 0x02CF }, +{ 0x02D0, 0x02D0, 0x02D0 }, +{ 0x02D1, 0x02D1, 0x02D1 }, +{ 0x02E0, 0x02E0, 0x02E0 }, +{ 0x02E1, 0x02E1, 0x02E1 }, +{ 0x02E2, 0x02E2, 0x02E2 }, +{ 0x02E3, 0x02E3, 0x02E3 }, +{ 0x02E4, 0x02E4, 0x02E4 }, +{ 0x02EE, 0x02EE, 0x02EE }, +{ 0x0300, 0x0300, 0x0300 }, +{ 0x0301, 0x0301, 0x0301 }, +{ 0x0302, 0x0302, 0x0302 }, +{ 0x0303, 0x0303, 0x0303 }, +{ 0x0304, 0x0304, 0x0304 }, +{ 0x0305, 0x0305, 0x0305 }, +{ 0x0306, 0x0306, 0x0306 }, +{ 0x0307, 0x0307, 0x0307 }, +{ 0x0308, 0x0308, 0x0308 }, +{ 0x0309, 0x0309, 0x0309 }, +{ 0x030A, 0x030A, 0x030A }, +{ 0x030B, 0x030B, 0x030B }, +{ 0x030C, 0x030C, 0x030C }, +{ 0x030D, 0x030D, 0x030D }, +{ 0x030E, 0x030E, 0x030E }, +{ 0x030F, 0x030F, 0x030F }, +{ 0x0310, 0x0310, 0x0310 }, +{ 0x0311, 0x0311, 0x0311 }, +{ 0x0312, 0x0312, 0x0312 }, +{ 0x0313, 0x0313, 0x0313 }, +{ 0x0314, 0x0314, 0x0314 }, +{ 0x0315, 0x0315, 0x0315 }, +{ 0x0316, 0x0316, 0x0316 }, +{ 0x0317, 0x0317, 0x0317 }, +{ 0x0318, 0x0318, 0x0318 }, +{ 0x0319, 0x0319, 0x0319 }, +{ 0x031A, 0x031A, 0x031A }, +{ 0x031B, 0x031B, 0x031B }, +{ 0x031C, 0x031C, 0x031C }, +{ 0x031D, 0x031D, 0x031D }, +{ 0x031E, 0x031E, 0x031E }, +{ 0x031F, 0x031F, 0x031F }, +{ 0x0320, 0x0320, 0x0320 }, +{ 0x0321, 0x0321, 0x0321 }, +{ 0x0322, 0x0322, 0x0322 }, +{ 0x0323, 0x0323, 0x0323 }, +{ 0x0324, 0x0324, 0x0324 }, +{ 0x0325, 0x0325, 0x0325 }, +{ 0x0326, 0x0326, 0x0326 }, +{ 0x0327, 0x0327, 0x0327 }, +{ 0x0328, 0x0328, 0x0328 }, +{ 0x0329, 0x0329, 0x0329 }, +{ 0x032A, 0x032A, 0x032A }, +{ 0x032B, 0x032B, 0x032B }, +{ 0x032C, 0x032C, 0x032C }, +{ 0x032D, 0x032D, 0x032D }, +{ 0x032E, 0x032E, 0x032E }, +{ 0x032F, 0x032F, 0x032F }, +{ 0x0330, 0x0330, 0x0330 }, +{ 0x0331, 0x0331, 0x0331 }, +{ 0x0332, 0x0332, 0x0332 }, +{ 0x0333, 0x0333, 0x0333 }, +{ 0x0334, 0x0334, 0x0334 }, +{ 0x0335, 0x0335, 0x0335 }, +{ 0x0336, 0x0336, 0x0336 }, +{ 0x0337, 0x0337, 0x0337 }, +{ 0x0338, 0x0338, 0x0338 }, +{ 0x0339, 0x0339, 0x0339 }, +{ 0x033A, 0x033A, 0x033A }, +{ 0x033B, 0x033B, 0x033B }, +{ 0x033C, 0x033C, 0x033C }, +{ 0x033D, 0x033D, 0x033D }, +{ 0x033E, 0x033E, 0x033E }, +{ 0x033F, 0x033F, 0x033F }, +{ 0x0340, 0x0340, 0x0340 }, +{ 0x0341, 0x0341, 0x0341 }, +{ 0x0342, 0x0342, 0x0342 }, +{ 0x0343, 0x0343, 0x0343 }, +{ 0x0344, 0x0344, 0x0344 }, +{ 0x0345, 0x0399, 0x0345 }, +{ 0x0346, 0x0346, 0x0346 }, +{ 0x0347, 0x0347, 0x0347 }, +{ 0x0348, 0x0348, 0x0348 }, +{ 0x0349, 0x0349, 0x0349 }, +{ 0x034A, 0x034A, 0x034A }, +{ 0x034B, 0x034B, 0x034B }, +{ 0x034C, 0x034C, 0x034C }, +{ 0x034D, 0x034D, 0x034D }, +{ 0x034E, 0x034E, 0x034E }, +{ 0x034F, 0x034F, 0x034F }, +{ 0x0350, 0x0350, 0x0350 }, +{ 0x0351, 0x0351, 0x0351 }, +{ 0x0352, 0x0352, 0x0352 }, +{ 0x0353, 0x0353, 0x0353 }, +{ 0x0354, 0x0354, 0x0354 }, +{ 0x0355, 0x0355, 0x0355 }, +{ 0x0356, 0x0356, 0x0356 }, +{ 0x0357, 0x0357, 0x0357 }, +{ 0x0358, 0x0358, 0x0358 }, +{ 0x0359, 0x0359, 0x0359 }, +{ 0x035A, 0x035A, 0x035A }, +{ 0x035B, 0x035B, 0x035B }, +{ 0x035C, 0x035C, 0x035C }, +{ 0x035D, 0x035D, 0x035D }, +{ 0x035E, 0x035E, 0x035E }, +{ 0x035F, 0x035F, 0x035F }, +{ 0x0360, 0x0360, 0x0360 }, +{ 0x0361, 0x0361, 0x0361 }, +{ 0x0362, 0x0362, 0x0362 }, +{ 0x0363, 0x0363, 0x0363 }, +{ 0x0364, 0x0364, 0x0364 }, +{ 0x0365, 0x0365, 0x0365 }, +{ 0x0366, 0x0366, 0x0366 }, +{ 0x0367, 0x0367, 0x0367 }, +{ 0x0368, 0x0368, 0x0368 }, +{ 0x0369, 0x0369, 0x0369 }, +{ 0x036A, 0x036A, 0x036A }, +{ 0x036B, 0x036B, 0x036B }, +{ 0x036C, 0x036C, 0x036C }, +{ 0x036D, 0x036D, 0x036D }, +{ 0x036E, 0x036E, 0x036E }, +{ 0x036F, 0x036F, 0x036F }, +{ 0x037A, 0x037A, 0x037A }, +{ 0x0386, 0x0386, 0x03AC }, +{ 0x0388, 0x0388, 0x03AD }, +{ 0x0389, 0x0389, 0x03AE }, +{ 0x038A, 0x038A, 0x03AF }, +{ 0x038C, 0x038C, 0x03CC }, +{ 0x038E, 0x038E, 0x03CD }, +{ 0x038F, 0x038F, 0x03CE }, +{ 0x0390, 0x0390, 0x0390 }, +{ 0x0391, 0x0391, 0x03B1 }, +{ 0x0392, 0x0392, 0x03B2 }, +{ 0x0393, 0x0393, 0x03B3 }, +{ 0x0394, 0x0394, 0x03B4 }, +{ 0x0395, 0x0395, 0x03B5 }, +{ 0x0396, 0x0396, 0x03B6 }, +{ 0x0397, 0x0397, 0x03B7 }, +{ 0x0398, 0x0398, 0x03B8 }, +{ 0x0399, 0x0399, 0x03B9 }, +{ 0x039A, 0x039A, 0x03BA }, +{ 0x039B, 0x039B, 0x03BB }, +{ 0x039C, 0x039C, 0x03BC }, +{ 0x039D, 0x039D, 0x03BD }, +{ 0x039E, 0x039E, 0x03BE }, +{ 0x039F, 0x039F, 0x03BF }, +{ 0x03A0, 0x03A0, 0x03C0 }, +{ 0x03A1, 0x03A1, 0x03C1 }, +{ 0x03A3, 0x03A3, 0x03C3 }, +{ 0x03A4, 0x03A4, 0x03C4 }, +{ 0x03A5, 0x03A5, 0x03C5 }, +{ 0x03A6, 0x03A6, 0x03C6 }, +{ 0x03A7, 0x03A7, 0x03C7 }, +{ 0x03A8, 0x03A8, 0x03C8 }, +{ 0x03A9, 0x03A9, 0x03C9 }, +{ 0x03AA, 0x03AA, 0x03CA }, +{ 0x03AB, 0x03AB, 0x03CB }, +{ 0x03AC, 0x0386, 0x03AC }, +{ 0x03AD, 0x0388, 0x03AD }, +{ 0x03AE, 0x0389, 0x03AE }, +{ 0x03AF, 0x038A, 0x03AF }, +{ 0x03B0, 0x03B0, 0x03B0 }, +{ 0x03B1, 0x0391, 0x03B1 }, +{ 0x03B2, 0x0392, 0x03B2 }, +{ 0x03B3, 0x0393, 0x03B3 }, +{ 0x03B4, 0x0394, 0x03B4 }, +{ 0x03B5, 0x0395, 0x03B5 }, +{ 0x03B6, 0x0396, 0x03B6 }, +{ 0x03B7, 0x0397, 0x03B7 }, +{ 0x03B8, 0x0398, 0x03B8 }, +{ 0x03B9, 0x0399, 0x03B9 }, +{ 0x03BA, 0x039A, 0x03BA }, +{ 0x03BB, 0x039B, 0x03BB }, +{ 0x03BC, 0x039C, 0x03BC }, +{ 0x03BD, 0x039D, 0x03BD }, +{ 0x03BE, 0x039E, 0x03BE }, +{ 0x03BF, 0x039F, 0x03BF }, +{ 0x03C0, 0x03A0, 0x03C0 }, +{ 0x03C1, 0x03A1, 0x03C1 }, +{ 0x03C2, 0x03A3, 0x03C2 }, +{ 0x03C3, 0x03A3, 0x03C3 }, +{ 0x03C4, 0x03A4, 0x03C4 }, +{ 0x03C5, 0x03A5, 0x03C5 }, +{ 0x03C6, 0x03A6, 0x03C6 }, +{ 0x03C7, 0x03A7, 0x03C7 }, +{ 0x03C8, 0x03A8, 0x03C8 }, +{ 0x03C9, 0x03A9, 0x03C9 }, +{ 0x03CA, 0x03AA, 0x03CA }, +{ 0x03CB, 0x03AB, 0x03CB }, +{ 0x03CC, 0x038C, 0x03CC }, +{ 0x03CD, 0x038E, 0x03CD }, +{ 0x03CE, 0x038F, 0x03CE }, +{ 0x03D0, 0x0392, 0x03D0 }, +{ 0x03D1, 0x0398, 0x03D1 }, +{ 0x03D2, 0x03D2, 0x03D2 }, +{ 0x03D3, 0x03D3, 0x03D3 }, +{ 0x03D4, 0x03D4, 0x03D4 }, +{ 0x03D5, 0x03A6, 0x03D5 }, +{ 0x03D6, 0x03A0, 0x03D6 }, +{ 0x03D7, 0x03D7, 0x03D7 }, +{ 0x03D8, 0x03D8, 0x03D9 }, +{ 0x03D9, 0x03D8, 0x03D9 }, +{ 0x03DA, 0x03DA, 0x03DB }, +{ 0x03DB, 0x03DA, 0x03DB }, +{ 0x03DC, 0x03DC, 0x03DD }, +{ 0x03DD, 0x03DC, 0x03DD }, +{ 0x03DE, 0x03DE, 0x03DF }, +{ 0x03DF, 0x03DE, 0x03DF }, +{ 0x03E0, 0x03E0, 0x03E1 }, +{ 0x03E1, 0x03E0, 0x03E1 }, +{ 0x03E2, 0x03E2, 0x03E3 }, +{ 0x03E3, 0x03E2, 0x03E3 }, +{ 0x03E4, 0x03E4, 0x03E5 }, +{ 0x03E5, 0x03E4, 0x03E5 }, +{ 0x03E6, 0x03E6, 0x03E7 }, +{ 0x03E7, 0x03E6, 0x03E7 }, +{ 0x03E8, 0x03E8, 0x03E9 }, +{ 0x03E9, 0x03E8, 0x03E9 }, +{ 0x03EA, 0x03EA, 0x03EB }, +{ 0x03EB, 0x03EA, 0x03EB }, +{ 0x03EC, 0x03EC, 0x03ED }, +{ 0x03ED, 0x03EC, 0x03ED }, +{ 0x03EE, 0x03EE, 0x03EF }, +{ 0x03EF, 0x03EE, 0x03EF }, +{ 0x03F0, 0x039A, 0x03F0 }, +{ 0x03F1, 0x03A1, 0x03F1 }, +{ 0x03F2, 0x03F9, 0x03F2 }, +{ 0x03F3, 0x03F3, 0x03F3 }, +{ 0x03F4, 0x03F4, 0x03B8 }, +{ 0x03F5, 0x0395, 0x03F5 }, +{ 0x03F7, 0x03F7, 0x03F8 }, +{ 0x03F8, 0x03F7, 0x03F8 }, +{ 0x03F9, 0x03F9, 0x03F2 }, +{ 0x03FA, 0x03FA, 0x03FB }, +{ 0x03FB, 0x03FA, 0x03FB }, +{ 0x03FC, 0x03FC, 0x03FC }, +{ 0x03FD, 0x03FD, 0x03FD }, +{ 0x03FE, 0x03FE, 0x03FE }, +{ 0x03FF, 0x03FF, 0x03FF }, +{ 0x0400, 0x0400, 0x0450 }, +{ 0x0401, 0x0401, 0x0451 }, +{ 0x0402, 0x0402, 0x0452 }, +{ 0x0403, 0x0403, 0x0453 }, +{ 0x0404, 0x0404, 0x0454 }, +{ 0x0405, 0x0405, 0x0455 }, +{ 0x0406, 0x0406, 0x0456 }, +{ 0x0407, 0x0407, 0x0457 }, +{ 0x0408, 0x0408, 0x0458 }, +{ 0x0409, 0x0409, 0x0459 }, +{ 0x040A, 0x040A, 0x045A }, +{ 0x040B, 0x040B, 0x045B }, +{ 0x040C, 0x040C, 0x045C }, +{ 0x040D, 0x040D, 0x045D }, +{ 0x040E, 0x040E, 0x045E }, +{ 0x040F, 0x040F, 0x045F }, +{ 0x0410, 0x0410, 0x0430 }, +{ 0x0411, 0x0411, 0x0431 }, +{ 0x0412, 0x0412, 0x0432 }, +{ 0x0413, 0x0413, 0x0433 }, +{ 0x0414, 0x0414, 0x0434 }, +{ 0x0415, 0x0415, 0x0435 }, +{ 0x0416, 0x0416, 0x0436 }, +{ 0x0417, 0x0417, 0x0437 }, +{ 0x0418, 0x0418, 0x0438 }, +{ 0x0419, 0x0419, 0x0439 }, +{ 0x041A, 0x041A, 0x043A }, +{ 0x041B, 0x041B, 0x043B }, +{ 0x041C, 0x041C, 0x043C }, +{ 0x041D, 0x041D, 0x043D }, +{ 0x041E, 0x041E, 0x043E }, +{ 0x041F, 0x041F, 0x043F }, +{ 0x0420, 0x0420, 0x0440 }, +{ 0x0421, 0x0421, 0x0441 }, +{ 0x0422, 0x0422, 0x0442 }, +{ 0x0423, 0x0423, 0x0443 }, +{ 0x0424, 0x0424, 0x0444 }, +{ 0x0425, 0x0425, 0x0445 }, +{ 0x0426, 0x0426, 0x0446 }, +{ 0x0427, 0x0427, 0x0447 }, +{ 0x0428, 0x0428, 0x0448 }, +{ 0x0429, 0x0429, 0x0449 }, +{ 0x042A, 0x042A, 0x044A }, +{ 0x042B, 0x042B, 0x044B }, +{ 0x042C, 0x042C, 0x044C }, +{ 0x042D, 0x042D, 0x044D }, +{ 0x042E, 0x042E, 0x044E }, +{ 0x042F, 0x042F, 0x044F }, +{ 0x0430, 0x0410, 0x0430 }, +{ 0x0431, 0x0411, 0x0431 }, +{ 0x0432, 0x0412, 0x0432 }, +{ 0x0433, 0x0413, 0x0433 }, +{ 0x0434, 0x0414, 0x0434 }, +{ 0x0435, 0x0415, 0x0435 }, +{ 0x0436, 0x0416, 0x0436 }, +{ 0x0437, 0x0417, 0x0437 }, +{ 0x0438, 0x0418, 0x0438 }, +{ 0x0439, 0x0419, 0x0439 }, +{ 0x043A, 0x041A, 0x043A }, +{ 0x043B, 0x041B, 0x043B }, +{ 0x043C, 0x041C, 0x043C }, +{ 0x043D, 0x041D, 0x043D }, +{ 0x043E, 0x041E, 0x043E }, +{ 0x043F, 0x041F, 0x043F }, +{ 0x0440, 0x0420, 0x0440 }, +{ 0x0441, 0x0421, 0x0441 }, +{ 0x0442, 0x0422, 0x0442 }, +{ 0x0443, 0x0423, 0x0443 }, +{ 0x0444, 0x0424, 0x0444 }, +{ 0x0445, 0x0425, 0x0445 }, +{ 0x0446, 0x0426, 0x0446 }, +{ 0x0447, 0x0427, 0x0447 }, +{ 0x0448, 0x0428, 0x0448 }, +{ 0x0449, 0x0429, 0x0449 }, +{ 0x044A, 0x042A, 0x044A }, +{ 0x044B, 0x042B, 0x044B }, +{ 0x044C, 0x042C, 0x044C }, +{ 0x044D, 0x042D, 0x044D }, +{ 0x044E, 0x042E, 0x044E }, +{ 0x044F, 0x042F, 0x044F }, +{ 0x0450, 0x0400, 0x0450 }, +{ 0x0451, 0x0401, 0x0451 }, +{ 0x0452, 0x0402, 0x0452 }, +{ 0x0453, 0x0403, 0x0453 }, +{ 0x0454, 0x0404, 0x0454 }, +{ 0x0455, 0x0405, 0x0455 }, +{ 0x0456, 0x0406, 0x0456 }, +{ 0x0457, 0x0407, 0x0457 }, +{ 0x0458, 0x0408, 0x0458 }, +{ 0x0459, 0x0409, 0x0459 }, +{ 0x045A, 0x040A, 0x045A }, +{ 0x045B, 0x040B, 0x045B }, +{ 0x045C, 0x040C, 0x045C }, +{ 0x045D, 0x040D, 0x045D }, +{ 0x045E, 0x040E, 0x045E }, +{ 0x045F, 0x040F, 0x045F }, +{ 0x0460, 0x0460, 0x0461 }, +{ 0x0461, 0x0460, 0x0461 }, +{ 0x0462, 0x0462, 0x0463 }, +{ 0x0463, 0x0462, 0x0463 }, +{ 0x0464, 0x0464, 0x0465 }, +{ 0x0465, 0x0464, 0x0465 }, +{ 0x0466, 0x0466, 0x0467 }, +{ 0x0467, 0x0466, 0x0467 }, +{ 0x0468, 0x0468, 0x0469 }, +{ 0x0469, 0x0468, 0x0469 }, +{ 0x046A, 0x046A, 0x046B }, +{ 0x046B, 0x046A, 0x046B }, +{ 0x046C, 0x046C, 0x046D }, +{ 0x046D, 0x046C, 0x046D }, +{ 0x046E, 0x046E, 0x046F }, +{ 0x046F, 0x046E, 0x046F }, +{ 0x0470, 0x0470, 0x0471 }, +{ 0x0471, 0x0470, 0x0471 }, +{ 0x0472, 0x0472, 0x0473 }, +{ 0x0473, 0x0472, 0x0473 }, +{ 0x0474, 0x0474, 0x0475 }, +{ 0x0475, 0x0474, 0x0475 }, +{ 0x0476, 0x0476, 0x0477 }, +{ 0x0477, 0x0476, 0x0477 }, +{ 0x0478, 0x0478, 0x0479 }, +{ 0x0479, 0x0478, 0x0479 }, +{ 0x047A, 0x047A, 0x047B }, +{ 0x047B, 0x047A, 0x047B }, +{ 0x047C, 0x047C, 0x047D }, +{ 0x047D, 0x047C, 0x047D }, +{ 0x047E, 0x047E, 0x047F }, +{ 0x047F, 0x047E, 0x047F }, +{ 0x0480, 0x0480, 0x0481 }, +{ 0x0481, 0x0480, 0x0481 }, +{ 0x0483, 0x0483, 0x0483 }, +{ 0x0484, 0x0484, 0x0484 }, +{ 0x0485, 0x0485, 0x0485 }, +{ 0x0486, 0x0486, 0x0486 }, +{ 0x048A, 0x048A, 0x048B }, +{ 0x048B, 0x048A, 0x048B }, +{ 0x048C, 0x048C, 0x048D }, +{ 0x048D, 0x048C, 0x048D }, +{ 0x048E, 0x048E, 0x048F }, +{ 0x048F, 0x048E, 0x048F }, +{ 0x0490, 0x0490, 0x0491 }, +{ 0x0491, 0x0490, 0x0491 }, +{ 0x0492, 0x0492, 0x0493 }, +{ 0x0493, 0x0492, 0x0493 }, +{ 0x0494, 0x0494, 0x0495 }, +{ 0x0495, 0x0494, 0x0495 }, +{ 0x0496, 0x0496, 0x0497 }, +{ 0x0497, 0x0496, 0x0497 }, +{ 0x0498, 0x0498, 0x0499 }, +{ 0x0499, 0x0498, 0x0499 }, +{ 0x049A, 0x049A, 0x049B }, +{ 0x049B, 0x049A, 0x049B }, +{ 0x049C, 0x049C, 0x049D }, +{ 0x049D, 0x049C, 0x049D }, +{ 0x049E, 0x049E, 0x049F }, +{ 0x049F, 0x049E, 0x049F }, +{ 0x04A0, 0x04A0, 0x04A1 }, +{ 0x04A1, 0x04A0, 0x04A1 }, +{ 0x04A2, 0x04A2, 0x04A3 }, +{ 0x04A3, 0x04A2, 0x04A3 }, +{ 0x04A4, 0x04A4, 0x04A5 }, +{ 0x04A5, 0x04A4, 0x04A5 }, +{ 0x04A6, 0x04A6, 0x04A7 }, +{ 0x04A7, 0x04A6, 0x04A7 }, +{ 0x04A8, 0x04A8, 0x04A9 }, +{ 0x04A9, 0x04A8, 0x04A9 }, +{ 0x04AA, 0x04AA, 0x04AB }, +{ 0x04AB, 0x04AA, 0x04AB }, +{ 0x04AC, 0x04AC, 0x04AD }, +{ 0x04AD, 0x04AC, 0x04AD }, +{ 0x04AE, 0x04AE, 0x04AF }, +{ 0x04AF, 0x04AE, 0x04AF }, +{ 0x04B0, 0x04B0, 0x04B1 }, +{ 0x04B1, 0x04B0, 0x04B1 }, +{ 0x04B2, 0x04B2, 0x04B3 }, +{ 0x04B3, 0x04B2, 0x04B3 }, +{ 0x04B4, 0x04B4, 0x04B5 }, +{ 0x04B5, 0x04B4, 0x04B5 }, +{ 0x04B6, 0x04B6, 0x04B7 }, +{ 0x04B7, 0x04B6, 0x04B7 }, +{ 0x04B8, 0x04B8, 0x04B9 }, +{ 0x04B9, 0x04B8, 0x04B9 }, +{ 0x04BA, 0x04BA, 0x04BB }, +{ 0x04BB, 0x04BA, 0x04BB }, +{ 0x04BC, 0x04BC, 0x04BD }, +{ 0x04BD, 0x04BC, 0x04BD }, +{ 0x04BE, 0x04BE, 0x04BF }, +{ 0x04BF, 0x04BE, 0x04BF }, +{ 0x04C0, 0x04C0, 0x04C0 }, +{ 0x04C1, 0x04C1, 0x04C2 }, +{ 0x04C2, 0x04C1, 0x04C2 }, +{ 0x04C3, 0x04C3, 0x04C4 }, +{ 0x04C4, 0x04C3, 0x04C4 }, +{ 0x04C5, 0x04C5, 0x04C6 }, +{ 0x04C6, 0x04C5, 0x04C6 }, +{ 0x04C7, 0x04C7, 0x04C8 }, +{ 0x04C8, 0x04C7, 0x04C8 }, +{ 0x04C9, 0x04C9, 0x04CA }, +{ 0x04CA, 0x04C9, 0x04CA }, +{ 0x04CB, 0x04CB, 0x04CC }, +{ 0x04CC, 0x04CB, 0x04CC }, +{ 0x04CD, 0x04CD, 0x04CE }, +{ 0x04CE, 0x04CD, 0x04CE }, +{ 0x04D0, 0x04D0, 0x04D1 }, +{ 0x04D1, 0x04D0, 0x04D1 }, +{ 0x04D2, 0x04D2, 0x04D3 }, +{ 0x04D3, 0x04D2, 0x04D3 }, +{ 0x04D4, 0x04D4, 0x04D5 }, +{ 0x04D5, 0x04D4, 0x04D5 }, +{ 0x04D6, 0x04D6, 0x04D7 }, +{ 0x04D7, 0x04D6, 0x04D7 }, +{ 0x04D8, 0x04D8, 0x04D9 }, +{ 0x04D9, 0x04D8, 0x04D9 }, +{ 0x04DA, 0x04DA, 0x04DB }, +{ 0x04DB, 0x04DA, 0x04DB }, +{ 0x04DC, 0x04DC, 0x04DD }, +{ 0x04DD, 0x04DC, 0x04DD }, +{ 0x04DE, 0x04DE, 0x04DF }, +{ 0x04DF, 0x04DE, 0x04DF }, +{ 0x04E0, 0x04E0, 0x04E1 }, +{ 0x04E1, 0x04E0, 0x04E1 }, +{ 0x04E2, 0x04E2, 0x04E3 }, +{ 0x04E3, 0x04E2, 0x04E3 }, +{ 0x04E4, 0x04E4, 0x04E5 }, +{ 0x04E5, 0x04E4, 0x04E5 }, +{ 0x04E6, 0x04E6, 0x04E7 }, +{ 0x04E7, 0x04E6, 0x04E7 }, +{ 0x04E8, 0x04E8, 0x04E9 }, +{ 0x04E9, 0x04E8, 0x04E9 }, +{ 0x04EA, 0x04EA, 0x04EB }, +{ 0x04EB, 0x04EA, 0x04EB }, +{ 0x04EC, 0x04EC, 0x04ED }, +{ 0x04ED, 0x04EC, 0x04ED }, +{ 0x04EE, 0x04EE, 0x04EF }, +{ 0x04EF, 0x04EE, 0x04EF }, +{ 0x04F0, 0x04F0, 0x04F1 }, +{ 0x04F1, 0x04F0, 0x04F1 }, +{ 0x04F2, 0x04F2, 0x04F3 }, +{ 0x04F3, 0x04F2, 0x04F3 }, +{ 0x04F4, 0x04F4, 0x04F5 }, +{ 0x04F5, 0x04F4, 0x04F5 }, +{ 0x04F6, 0x04F6, 0x04F7 }, +{ 0x04F7, 0x04F6, 0x04F7 }, +{ 0x04F8, 0x04F8, 0x04F9 }, +{ 0x04F9, 0x04F8, 0x04F9 }, +{ 0x0500, 0x0500, 0x0501 }, +{ 0x0501, 0x0500, 0x0501 }, +{ 0x0502, 0x0502, 0x0503 }, +{ 0x0503, 0x0502, 0x0503 }, +{ 0x0504, 0x0504, 0x0505 }, +{ 0x0505, 0x0504, 0x0505 }, +{ 0x0506, 0x0506, 0x0507 }, +{ 0x0507, 0x0506, 0x0507 }, +{ 0x0508, 0x0508, 0x0509 }, +{ 0x0509, 0x0508, 0x0509 }, +{ 0x050A, 0x050A, 0x050B }, +{ 0x050B, 0x050A, 0x050B }, +{ 0x050C, 0x050C, 0x050D }, +{ 0x050D, 0x050C, 0x050D }, +{ 0x050E, 0x050E, 0x050F }, +{ 0x050F, 0x050E, 0x050F }, +{ 0x0531, 0x0531, 0x0561 }, +{ 0x0532, 0x0532, 0x0562 }, +{ 0x0533, 0x0533, 0x0563 }, +{ 0x0534, 0x0534, 0x0564 }, +{ 0x0535, 0x0535, 0x0565 }, +{ 0x0536, 0x0536, 0x0566 }, +{ 0x0537, 0x0537, 0x0567 }, +{ 0x0538, 0x0538, 0x0568 }, +{ 0x0539, 0x0539, 0x0569 }, +{ 0x053A, 0x053A, 0x056A }, +{ 0x053B, 0x053B, 0x056B }, +{ 0x053C, 0x053C, 0x056C }, +{ 0x053D, 0x053D, 0x056D }, +{ 0x053E, 0x053E, 0x056E }, +{ 0x053F, 0x053F, 0x056F }, +{ 0x0540, 0x0540, 0x0570 }, +{ 0x0541, 0x0541, 0x0571 }, +{ 0x0542, 0x0542, 0x0572 }, +{ 0x0543, 0x0543, 0x0573 }, +{ 0x0544, 0x0544, 0x0574 }, +{ 0x0545, 0x0545, 0x0575 }, +{ 0x0546, 0x0546, 0x0576 }, +{ 0x0547, 0x0547, 0x0577 }, +{ 0x0548, 0x0548, 0x0578 }, +{ 0x0549, 0x0549, 0x0579 }, +{ 0x054A, 0x054A, 0x057A }, +{ 0x054B, 0x054B, 0x057B }, +{ 0x054C, 0x054C, 0x057C }, +{ 0x054D, 0x054D, 0x057D }, +{ 0x054E, 0x054E, 0x057E }, +{ 0x054F, 0x054F, 0x057F }, +{ 0x0550, 0x0550, 0x0580 }, +{ 0x0551, 0x0551, 0x0581 }, +{ 0x0552, 0x0552, 0x0582 }, +{ 0x0553, 0x0553, 0x0583 }, +{ 0x0554, 0x0554, 0x0584 }, +{ 0x0555, 0x0555, 0x0585 }, +{ 0x0556, 0x0556, 0x0586 }, +{ 0x0559, 0x0559, 0x0559 }, +{ 0x0561, 0x0531, 0x0561 }, +{ 0x0562, 0x0532, 0x0562 }, +{ 0x0563, 0x0533, 0x0563 }, +{ 0x0564, 0x0534, 0x0564 }, +{ 0x0565, 0x0535, 0x0565 }, +{ 0x0566, 0x0536, 0x0566 }, +{ 0x0567, 0x0537, 0x0567 }, +{ 0x0568, 0x0538, 0x0568 }, +{ 0x0569, 0x0539, 0x0569 }, +{ 0x056A, 0x053A, 0x056A }, +{ 0x056B, 0x053B, 0x056B }, +{ 0x056C, 0x053C, 0x056C }, +{ 0x056D, 0x053D, 0x056D }, +{ 0x056E, 0x053E, 0x056E }, +{ 0x056F, 0x053F, 0x056F }, +{ 0x0570, 0x0540, 0x0570 }, +{ 0x0571, 0x0541, 0x0571 }, +{ 0x0572, 0x0542, 0x0572 }, +{ 0x0573, 0x0543, 0x0573 }, +{ 0x0574, 0x0544, 0x0574 }, +{ 0x0575, 0x0545, 0x0575 }, +{ 0x0576, 0x0546, 0x0576 }, +{ 0x0577, 0x0547, 0x0577 }, +{ 0x0578, 0x0548, 0x0578 }, +{ 0x0579, 0x0549, 0x0579 }, +{ 0x057A, 0x054A, 0x057A }, +{ 0x057B, 0x054B, 0x057B }, +{ 0x057C, 0x054C, 0x057C }, +{ 0x057D, 0x054D, 0x057D }, +{ 0x057E, 0x054E, 0x057E }, +{ 0x057F, 0x054F, 0x057F }, +{ 0x0580, 0x0550, 0x0580 }, +{ 0x0581, 0x0551, 0x0581 }, +{ 0x0582, 0x0552, 0x0582 }, +{ 0x0583, 0x0553, 0x0583 }, +{ 0x0584, 0x0554, 0x0584 }, +{ 0x0585, 0x0555, 0x0585 }, +{ 0x0586, 0x0556, 0x0586 }, +{ 0x0587, 0x0587, 0x0587 }, +{ 0x0591, 0x0591, 0x0591 }, +{ 0x0592, 0x0592, 0x0592 }, +{ 0x0593, 0x0593, 0x0593 }, +{ 0x0594, 0x0594, 0x0594 }, +{ 0x0595, 0x0595, 0x0595 }, +{ 0x0596, 0x0596, 0x0596 }, +{ 0x0597, 0x0597, 0x0597 }, +{ 0x0598, 0x0598, 0x0598 }, +{ 0x0599, 0x0599, 0x0599 }, +{ 0x059A, 0x059A, 0x059A }, +{ 0x059B, 0x059B, 0x059B }, +{ 0x059C, 0x059C, 0x059C }, +{ 0x059D, 0x059D, 0x059D }, +{ 0x059E, 0x059E, 0x059E }, +{ 0x059F, 0x059F, 0x059F }, +{ 0x05A0, 0x05A0, 0x05A0 }, +{ 0x05A1, 0x05A1, 0x05A1 }, +{ 0x05A2, 0x05A2, 0x05A2 }, +{ 0x05A3, 0x05A3, 0x05A3 }, +{ 0x05A4, 0x05A4, 0x05A4 }, +{ 0x05A5, 0x05A5, 0x05A5 }, +{ 0x05A6, 0x05A6, 0x05A6 }, +{ 0x05A7, 0x05A7, 0x05A7 }, +{ 0x05A8, 0x05A8, 0x05A8 }, +{ 0x05A9, 0x05A9, 0x05A9 }, +{ 0x05AA, 0x05AA, 0x05AA }, +{ 0x05AB, 0x05AB, 0x05AB }, +{ 0x05AC, 0x05AC, 0x05AC }, +{ 0x05AD, 0x05AD, 0x05AD }, +{ 0x05AE, 0x05AE, 0x05AE }, +{ 0x05AF, 0x05AF, 0x05AF }, +{ 0x05B0, 0x05B0, 0x05B0 }, +{ 0x05B1, 0x05B1, 0x05B1 }, +{ 0x05B2, 0x05B2, 0x05B2 }, +{ 0x05B3, 0x05B3, 0x05B3 }, +{ 0x05B4, 0x05B4, 0x05B4 }, +{ 0x05B5, 0x05B5, 0x05B5 }, +{ 0x05B6, 0x05B6, 0x05B6 }, +{ 0x05B7, 0x05B7, 0x05B7 }, +{ 0x05B8, 0x05B8, 0x05B8 }, +{ 0x05B9, 0x05B9, 0x05B9 }, +{ 0x05BB, 0x05BB, 0x05BB }, +{ 0x05BC, 0x05BC, 0x05BC }, +{ 0x05BD, 0x05BD, 0x05BD }, +{ 0x05BF, 0x05BF, 0x05BF }, +{ 0x05C1, 0x05C1, 0x05C1 }, +{ 0x05C2, 0x05C2, 0x05C2 }, +{ 0x05C4, 0x05C4, 0x05C4 }, +{ 0x05C5, 0x05C5, 0x05C5 }, +{ 0x05C7, 0x05C7, 0x05C7 }, +{ 0x05D0, 0x05D0, 0x05D0 }, +{ 0x05D1, 0x05D1, 0x05D1 }, +{ 0x05D2, 0x05D2, 0x05D2 }, +{ 0x05D3, 0x05D3, 0x05D3 }, +{ 0x05D4, 0x05D4, 0x05D4 }, +{ 0x05D5, 0x05D5, 0x05D5 }, +{ 0x05D6, 0x05D6, 0x05D6 }, +{ 0x05D7, 0x05D7, 0x05D7 }, +{ 0x05D8, 0x05D8, 0x05D8 }, +{ 0x05D9, 0x05D9, 0x05D9 }, +{ 0x05DA, 0x05DA, 0x05DA }, +{ 0x05DB, 0x05DB, 0x05DB }, +{ 0x05DC, 0x05DC, 0x05DC }, +{ 0x05DD, 0x05DD, 0x05DD }, +{ 0x05DE, 0x05DE, 0x05DE }, +{ 0x05DF, 0x05DF, 0x05DF }, +{ 0x05E0, 0x05E0, 0x05E0 }, +{ 0x05E1, 0x05E1, 0x05E1 }, +{ 0x05E2, 0x05E2, 0x05E2 }, +{ 0x05E3, 0x05E3, 0x05E3 }, +{ 0x05E4, 0x05E4, 0x05E4 }, +{ 0x05E5, 0x05E5, 0x05E5 }, +{ 0x05E6, 0x05E6, 0x05E6 }, +{ 0x05E7, 0x05E7, 0x05E7 }, +{ 0x05E8, 0x05E8, 0x05E8 }, +{ 0x05E9, 0x05E9, 0x05E9 }, +{ 0x05EA, 0x05EA, 0x05EA }, +{ 0x05F0, 0x05F0, 0x05F0 }, +{ 0x05F1, 0x05F1, 0x05F1 }, +{ 0x05F2, 0x05F2, 0x05F2 }, +{ 0x0610, 0x0610, 0x0610 }, +{ 0x0611, 0x0611, 0x0611 }, +{ 0x0612, 0x0612, 0x0612 }, +{ 0x0613, 0x0613, 0x0613 }, +{ 0x0614, 0x0614, 0x0614 }, +{ 0x0615, 0x0615, 0x0615 }, +{ 0x0621, 0x0621, 0x0621 }, +{ 0x0622, 0x0622, 0x0622 }, +{ 0x0623, 0x0623, 0x0623 }, +{ 0x0624, 0x0624, 0x0624 }, +{ 0x0625, 0x0625, 0x0625 }, +{ 0x0626, 0x0626, 0x0626 }, +{ 0x0627, 0x0627, 0x0627 }, +{ 0x0628, 0x0628, 0x0628 }, +{ 0x0629, 0x0629, 0x0629 }, +{ 0x062A, 0x062A, 0x062A }, +{ 0x062B, 0x062B, 0x062B }, +{ 0x062C, 0x062C, 0x062C }, +{ 0x062D, 0x062D, 0x062D }, +{ 0x062E, 0x062E, 0x062E }, +{ 0x062F, 0x062F, 0x062F }, +{ 0x0630, 0x0630, 0x0630 }, +{ 0x0631, 0x0631, 0x0631 }, +{ 0x0632, 0x0632, 0x0632 }, +{ 0x0633, 0x0633, 0x0633 }, +{ 0x0634, 0x0634, 0x0634 }, +{ 0x0635, 0x0635, 0x0635 }, +{ 0x0636, 0x0636, 0x0636 }, +{ 0x0637, 0x0637, 0x0637 }, +{ 0x0638, 0x0638, 0x0638 }, +{ 0x0639, 0x0639, 0x0639 }, +{ 0x063A, 0x063A, 0x063A }, +{ 0x0640, 0x0640, 0x0640 }, +{ 0x0641, 0x0641, 0x0641 }, +{ 0x0642, 0x0642, 0x0642 }, +{ 0x0643, 0x0643, 0x0643 }, +{ 0x0644, 0x0644, 0x0644 }, +{ 0x0645, 0x0645, 0x0645 }, +{ 0x0646, 0x0646, 0x0646 }, +{ 0x0647, 0x0647, 0x0647 }, +{ 0x0648, 0x0648, 0x0648 }, +{ 0x0649, 0x0649, 0x0649 }, +{ 0x064A, 0x064A, 0x064A }, +{ 0x064B, 0x064B, 0x064B }, +{ 0x064C, 0x064C, 0x064C }, +{ 0x064D, 0x064D, 0x064D }, +{ 0x064E, 0x064E, 0x064E }, +{ 0x064F, 0x064F, 0x064F }, +{ 0x0650, 0x0650, 0x0650 }, +{ 0x0651, 0x0651, 0x0651 }, +{ 0x0652, 0x0652, 0x0652 }, +{ 0x0653, 0x0653, 0x0653 }, +{ 0x0654, 0x0654, 0x0654 }, +{ 0x0655, 0x0655, 0x0655 }, +{ 0x0656, 0x0656, 0x0656 }, +{ 0x0657, 0x0657, 0x0657 }, +{ 0x0658, 0x0658, 0x0658 }, +{ 0x0659, 0x0659, 0x0659 }, +{ 0x065A, 0x065A, 0x065A }, +{ 0x065B, 0x065B, 0x065B }, +{ 0x065C, 0x065C, 0x065C }, +{ 0x065D, 0x065D, 0x065D }, +{ 0x065E, 0x065E, 0x065E }, +{ 0x066E, 0x066E, 0x066E }, +{ 0x066F, 0x066F, 0x066F }, +{ 0x0670, 0x0670, 0x0670 }, +{ 0x0671, 0x0671, 0x0671 }, +{ 0x0672, 0x0672, 0x0672 }, +{ 0x0673, 0x0673, 0x0673 }, +{ 0x0674, 0x0674, 0x0674 }, +{ 0x0675, 0x0675, 0x0675 }, +{ 0x0676, 0x0676, 0x0676 }, +{ 0x0677, 0x0677, 0x0677 }, +{ 0x0678, 0x0678, 0x0678 }, +{ 0x0679, 0x0679, 0x0679 }, +{ 0x067A, 0x067A, 0x067A }, +{ 0x067B, 0x067B, 0x067B }, +{ 0x067C, 0x067C, 0x067C }, +{ 0x067D, 0x067D, 0x067D }, +{ 0x067E, 0x067E, 0x067E }, +{ 0x067F, 0x067F, 0x067F }, +{ 0x0680, 0x0680, 0x0680 }, +{ 0x0681, 0x0681, 0x0681 }, +{ 0x0682, 0x0682, 0x0682 }, +{ 0x0683, 0x0683, 0x0683 }, +{ 0x0684, 0x0684, 0x0684 }, +{ 0x0685, 0x0685, 0x0685 }, +{ 0x0686, 0x0686, 0x0686 }, +{ 0x0687, 0x0687, 0x0687 }, +{ 0x0688, 0x0688, 0x0688 }, +{ 0x0689, 0x0689, 0x0689 }, +{ 0x068A, 0x068A, 0x068A }, +{ 0x068B, 0x068B, 0x068B }, +{ 0x068C, 0x068C, 0x068C }, +{ 0x068D, 0x068D, 0x068D }, +{ 0x068E, 0x068E, 0x068E }, +{ 0x068F, 0x068F, 0x068F }, +{ 0x0690, 0x0690, 0x0690 }, +{ 0x0691, 0x0691, 0x0691 }, +{ 0x0692, 0x0692, 0x0692 }, +{ 0x0693, 0x0693, 0x0693 }, +{ 0x0694, 0x0694, 0x0694 }, +{ 0x0695, 0x0695, 0x0695 }, +{ 0x0696, 0x0696, 0x0696 }, +{ 0x0697, 0x0697, 0x0697 }, +{ 0x0698, 0x0698, 0x0698 }, +{ 0x0699, 0x0699, 0x0699 }, +{ 0x069A, 0x069A, 0x069A }, +{ 0x069B, 0x069B, 0x069B }, +{ 0x069C, 0x069C, 0x069C }, +{ 0x069D, 0x069D, 0x069D }, +{ 0x069E, 0x069E, 0x069E }, +{ 0x069F, 0x069F, 0x069F }, +{ 0x06A0, 0x06A0, 0x06A0 }, +{ 0x06A1, 0x06A1, 0x06A1 }, +{ 0x06A2, 0x06A2, 0x06A2 }, +{ 0x06A3, 0x06A3, 0x06A3 }, +{ 0x06A4, 0x06A4, 0x06A4 }, +{ 0x06A5, 0x06A5, 0x06A5 }, +{ 0x06A6, 0x06A6, 0x06A6 }, +{ 0x06A7, 0x06A7, 0x06A7 }, +{ 0x06A8, 0x06A8, 0x06A8 }, +{ 0x06A9, 0x06A9, 0x06A9 }, +{ 0x06AA, 0x06AA, 0x06AA }, +{ 0x06AB, 0x06AB, 0x06AB }, +{ 0x06AC, 0x06AC, 0x06AC }, +{ 0x06AD, 0x06AD, 0x06AD }, +{ 0x06AE, 0x06AE, 0x06AE }, +{ 0x06AF, 0x06AF, 0x06AF }, +{ 0x06B0, 0x06B0, 0x06B0 }, +{ 0x06B1, 0x06B1, 0x06B1 }, +{ 0x06B2, 0x06B2, 0x06B2 }, +{ 0x06B3, 0x06B3, 0x06B3 }, +{ 0x06B4, 0x06B4, 0x06B4 }, +{ 0x06B5, 0x06B5, 0x06B5 }, +{ 0x06B6, 0x06B6, 0x06B6 }, +{ 0x06B7, 0x06B7, 0x06B7 }, +{ 0x06B8, 0x06B8, 0x06B8 }, +{ 0x06B9, 0x06B9, 0x06B9 }, +{ 0x06BA, 0x06BA, 0x06BA }, +{ 0x06BB, 0x06BB, 0x06BB }, +{ 0x06BC, 0x06BC, 0x06BC }, +{ 0x06BD, 0x06BD, 0x06BD }, +{ 0x06BE, 0x06BE, 0x06BE }, +{ 0x06BF, 0x06BF, 0x06BF }, +{ 0x06C0, 0x06C0, 0x06C0 }, +{ 0x06C1, 0x06C1, 0x06C1 }, +{ 0x06C2, 0x06C2, 0x06C2 }, +{ 0x06C3, 0x06C3, 0x06C3 }, +{ 0x06C4, 0x06C4, 0x06C4 }, +{ 0x06C5, 0x06C5, 0x06C5 }, +{ 0x06C6, 0x06C6, 0x06C6 }, +{ 0x06C7, 0x06C7, 0x06C7 }, +{ 0x06C8, 0x06C8, 0x06C8 }, +{ 0x06C9, 0x06C9, 0x06C9 }, +{ 0x06CA, 0x06CA, 0x06CA }, +{ 0x06CB, 0x06CB, 0x06CB }, +{ 0x06CC, 0x06CC, 0x06CC }, +{ 0x06CD, 0x06CD, 0x06CD }, +{ 0x06CE, 0x06CE, 0x06CE }, +{ 0x06CF, 0x06CF, 0x06CF }, +{ 0x06D0, 0x06D0, 0x06D0 }, +{ 0x06D1, 0x06D1, 0x06D1 }, +{ 0x06D2, 0x06D2, 0x06D2 }, +{ 0x06D3, 0x06D3, 0x06D3 }, +{ 0x06D5, 0x06D5, 0x06D5 }, +{ 0x06D6, 0x06D6, 0x06D6 }, +{ 0x06D7, 0x06D7, 0x06D7 }, +{ 0x06D8, 0x06D8, 0x06D8 }, +{ 0x06D9, 0x06D9, 0x06D9 }, +{ 0x06DA, 0x06DA, 0x06DA }, +{ 0x06DB, 0x06DB, 0x06DB }, +{ 0x06DC, 0x06DC, 0x06DC }, +{ 0x06DF, 0x06DF, 0x06DF }, +{ 0x06E0, 0x06E0, 0x06E0 }, +{ 0x06E1, 0x06E1, 0x06E1 }, +{ 0x06E2, 0x06E2, 0x06E2 }, +{ 0x06E3, 0x06E3, 0x06E3 }, +{ 0x06E4, 0x06E4, 0x06E4 }, +{ 0x06E5, 0x06E5, 0x06E5 }, +{ 0x06E6, 0x06E6, 0x06E6 }, +{ 0x06E7, 0x06E7, 0x06E7 }, +{ 0x06E8, 0x06E8, 0x06E8 }, +{ 0x06EA, 0x06EA, 0x06EA }, +{ 0x06EB, 0x06EB, 0x06EB }, +{ 0x06EC, 0x06EC, 0x06EC }, +{ 0x06ED, 0x06ED, 0x06ED }, +{ 0x06EE, 0x06EE, 0x06EE }, +{ 0x06EF, 0x06EF, 0x06EF }, +{ 0x06FA, 0x06FA, 0x06FA }, +{ 0x06FB, 0x06FB, 0x06FB }, +{ 0x06FC, 0x06FC, 0x06FC }, +{ 0x06FF, 0x06FF, 0x06FF }, +{ 0x0710, 0x0710, 0x0710 }, +{ 0x0711, 0x0711, 0x0711 }, +{ 0x0712, 0x0712, 0x0712 }, +{ 0x0713, 0x0713, 0x0713 }, +{ 0x0714, 0x0714, 0x0714 }, +{ 0x0715, 0x0715, 0x0715 }, +{ 0x0716, 0x0716, 0x0716 }, +{ 0x0717, 0x0717, 0x0717 }, +{ 0x0718, 0x0718, 0x0718 }, +{ 0x0719, 0x0719, 0x0719 }, +{ 0x071A, 0x071A, 0x071A }, +{ 0x071B, 0x071B, 0x071B }, +{ 0x071C, 0x071C, 0x071C }, +{ 0x071D, 0x071D, 0x071D }, +{ 0x071E, 0x071E, 0x071E }, +{ 0x071F, 0x071F, 0x071F }, +{ 0x0720, 0x0720, 0x0720 }, +{ 0x0721, 0x0721, 0x0721 }, +{ 0x0722, 0x0722, 0x0722 }, +{ 0x0723, 0x0723, 0x0723 }, +{ 0x0724, 0x0724, 0x0724 }, +{ 0x0725, 0x0725, 0x0725 }, +{ 0x0726, 0x0726, 0x0726 }, +{ 0x0727, 0x0727, 0x0727 }, +{ 0x0728, 0x0728, 0x0728 }, +{ 0x0729, 0x0729, 0x0729 }, +{ 0x072A, 0x072A, 0x072A }, +{ 0x072B, 0x072B, 0x072B }, +{ 0x072C, 0x072C, 0x072C }, +{ 0x072D, 0x072D, 0x072D }, +{ 0x072E, 0x072E, 0x072E }, +{ 0x072F, 0x072F, 0x072F }, +{ 0x0730, 0x0730, 0x0730 }, +{ 0x0731, 0x0731, 0x0731 }, +{ 0x0732, 0x0732, 0x0732 }, +{ 0x0733, 0x0733, 0x0733 }, +{ 0x0734, 0x0734, 0x0734 }, +{ 0x0735, 0x0735, 0x0735 }, +{ 0x0736, 0x0736, 0x0736 }, +{ 0x0737, 0x0737, 0x0737 }, +{ 0x0738, 0x0738, 0x0738 }, +{ 0x0739, 0x0739, 0x0739 }, +{ 0x073A, 0x073A, 0x073A }, +{ 0x073B, 0x073B, 0x073B }, +{ 0x073C, 0x073C, 0x073C }, +{ 0x073D, 0x073D, 0x073D }, +{ 0x073E, 0x073E, 0x073E }, +{ 0x073F, 0x073F, 0x073F }, +{ 0x0740, 0x0740, 0x0740 }, +{ 0x0741, 0x0741, 0x0741 }, +{ 0x0742, 0x0742, 0x0742 }, +{ 0x0743, 0x0743, 0x0743 }, +{ 0x0744, 0x0744, 0x0744 }, +{ 0x0745, 0x0745, 0x0745 }, +{ 0x0746, 0x0746, 0x0746 }, +{ 0x0747, 0x0747, 0x0747 }, +{ 0x0748, 0x0748, 0x0748 }, +{ 0x0749, 0x0749, 0x0749 }, +{ 0x074A, 0x074A, 0x074A }, +{ 0x074D, 0x074D, 0x074D }, +{ 0x074E, 0x074E, 0x074E }, +{ 0x074F, 0x074F, 0x074F }, +{ 0x0750, 0x0750, 0x0750 }, +{ 0x0751, 0x0751, 0x0751 }, +{ 0x0752, 0x0752, 0x0752 }, +{ 0x0753, 0x0753, 0x0753 }, +{ 0x0754, 0x0754, 0x0754 }, +{ 0x0755, 0x0755, 0x0755 }, +{ 0x0756, 0x0756, 0x0756 }, +{ 0x0757, 0x0757, 0x0757 }, +{ 0x0758, 0x0758, 0x0758 }, +{ 0x0759, 0x0759, 0x0759 }, +{ 0x075A, 0x075A, 0x075A }, +{ 0x075B, 0x075B, 0x075B }, +{ 0x075C, 0x075C, 0x075C }, +{ 0x075D, 0x075D, 0x075D }, +{ 0x075E, 0x075E, 0x075E }, +{ 0x075F, 0x075F, 0x075F }, +{ 0x0760, 0x0760, 0x0760 }, +{ 0x0761, 0x0761, 0x0761 }, +{ 0x0762, 0x0762, 0x0762 }, +{ 0x0763, 0x0763, 0x0763 }, +{ 0x0764, 0x0764, 0x0764 }, +{ 0x0765, 0x0765, 0x0765 }, +{ 0x0766, 0x0766, 0x0766 }, +{ 0x0767, 0x0767, 0x0767 }, +{ 0x0768, 0x0768, 0x0768 }, +{ 0x0769, 0x0769, 0x0769 }, +{ 0x076A, 0x076A, 0x076A }, +{ 0x076B, 0x076B, 0x076B }, +{ 0x076C, 0x076C, 0x076C }, +{ 0x076D, 0x076D, 0x076D }, +{ 0x0780, 0x0780, 0x0780 }, +{ 0x0781, 0x0781, 0x0781 }, +{ 0x0782, 0x0782, 0x0782 }, +{ 0x0783, 0x0783, 0x0783 }, +{ 0x0784, 0x0784, 0x0784 }, +{ 0x0785, 0x0785, 0x0785 }, +{ 0x0786, 0x0786, 0x0786 }, +{ 0x0787, 0x0787, 0x0787 }, +{ 0x0788, 0x0788, 0x0788 }, +{ 0x0789, 0x0789, 0x0789 }, +{ 0x078A, 0x078A, 0x078A }, +{ 0x078B, 0x078B, 0x078B }, +{ 0x078C, 0x078C, 0x078C }, +{ 0x078D, 0x078D, 0x078D }, +{ 0x078E, 0x078E, 0x078E }, +{ 0x078F, 0x078F, 0x078F }, +{ 0x0790, 0x0790, 0x0790 }, +{ 0x0791, 0x0791, 0x0791 }, +{ 0x0792, 0x0792, 0x0792 }, +{ 0x0793, 0x0793, 0x0793 }, +{ 0x0794, 0x0794, 0x0794 }, +{ 0x0795, 0x0795, 0x0795 }, +{ 0x0796, 0x0796, 0x0796 }, +{ 0x0797, 0x0797, 0x0797 }, +{ 0x0798, 0x0798, 0x0798 }, +{ 0x0799, 0x0799, 0x0799 }, +{ 0x079A, 0x079A, 0x079A }, +{ 0x079B, 0x079B, 0x079B }, +{ 0x079C, 0x079C, 0x079C }, +{ 0x079D, 0x079D, 0x079D }, +{ 0x079E, 0x079E, 0x079E }, +{ 0x079F, 0x079F, 0x079F }, +{ 0x07A0, 0x07A0, 0x07A0 }, +{ 0x07A1, 0x07A1, 0x07A1 }, +{ 0x07A2, 0x07A2, 0x07A2 }, +{ 0x07A3, 0x07A3, 0x07A3 }, +{ 0x07A4, 0x07A4, 0x07A4 }, +{ 0x07A5, 0x07A5, 0x07A5 }, +{ 0x07A6, 0x07A6, 0x07A6 }, +{ 0x07A7, 0x07A7, 0x07A7 }, +{ 0x07A8, 0x07A8, 0x07A8 }, +{ 0x07A9, 0x07A9, 0x07A9 }, +{ 0x07AA, 0x07AA, 0x07AA }, +{ 0x07AB, 0x07AB, 0x07AB }, +{ 0x07AC, 0x07AC, 0x07AC }, +{ 0x07AD, 0x07AD, 0x07AD }, +{ 0x07AE, 0x07AE, 0x07AE }, +{ 0x07AF, 0x07AF, 0x07AF }, +{ 0x07B0, 0x07B0, 0x07B0 }, +{ 0x07B1, 0x07B1, 0x07B1 }, +{ 0x0901, 0x0901, 0x0901 }, +{ 0x0902, 0x0902, 0x0902 }, +{ 0x0904, 0x0904, 0x0904 }, +{ 0x0905, 0x0905, 0x0905 }, +{ 0x0906, 0x0906, 0x0906 }, +{ 0x0907, 0x0907, 0x0907 }, +{ 0x0908, 0x0908, 0x0908 }, +{ 0x0909, 0x0909, 0x0909 }, +{ 0x090A, 0x090A, 0x090A }, +{ 0x090B, 0x090B, 0x090B }, +{ 0x090C, 0x090C, 0x090C }, +{ 0x090D, 0x090D, 0x090D }, +{ 0x090E, 0x090E, 0x090E }, +{ 0x090F, 0x090F, 0x090F }, +{ 0x0910, 0x0910, 0x0910 }, +{ 0x0911, 0x0911, 0x0911 }, +{ 0x0912, 0x0912, 0x0912 }, +{ 0x0913, 0x0913, 0x0913 }, +{ 0x0914, 0x0914, 0x0914 }, +{ 0x0915, 0x0915, 0x0915 }, +{ 0x0916, 0x0916, 0x0916 }, +{ 0x0917, 0x0917, 0x0917 }, +{ 0x0918, 0x0918, 0x0918 }, +{ 0x0919, 0x0919, 0x0919 }, +{ 0x091A, 0x091A, 0x091A }, +{ 0x091B, 0x091B, 0x091B }, +{ 0x091C, 0x091C, 0x091C }, +{ 0x091D, 0x091D, 0x091D }, +{ 0x091E, 0x091E, 0x091E }, +{ 0x091F, 0x091F, 0x091F }, +{ 0x0920, 0x0920, 0x0920 }, +{ 0x0921, 0x0921, 0x0921 }, +{ 0x0922, 0x0922, 0x0922 }, +{ 0x0923, 0x0923, 0x0923 }, +{ 0x0924, 0x0924, 0x0924 }, +{ 0x0925, 0x0925, 0x0925 }, +{ 0x0926, 0x0926, 0x0926 }, +{ 0x0927, 0x0927, 0x0927 }, +{ 0x0928, 0x0928, 0x0928 }, +{ 0x0929, 0x0929, 0x0929 }, +{ 0x092A, 0x092A, 0x092A }, +{ 0x092B, 0x092B, 0x092B }, +{ 0x092C, 0x092C, 0x092C }, +{ 0x092D, 0x092D, 0x092D }, +{ 0x092E, 0x092E, 0x092E }, +{ 0x092F, 0x092F, 0x092F }, +{ 0x0930, 0x0930, 0x0930 }, +{ 0x0931, 0x0931, 0x0931 }, +{ 0x0932, 0x0932, 0x0932 }, +{ 0x0933, 0x0933, 0x0933 }, +{ 0x0934, 0x0934, 0x0934 }, +{ 0x0935, 0x0935, 0x0935 }, +{ 0x0936, 0x0936, 0x0936 }, +{ 0x0937, 0x0937, 0x0937 }, +{ 0x0938, 0x0938, 0x0938 }, +{ 0x0939, 0x0939, 0x0939 }, +{ 0x093C, 0x093C, 0x093C }, +{ 0x093D, 0x093D, 0x093D }, +{ 0x0941, 0x0941, 0x0941 }, +{ 0x0942, 0x0942, 0x0942 }, +{ 0x0943, 0x0943, 0x0943 }, +{ 0x0944, 0x0944, 0x0944 }, +{ 0x0945, 0x0945, 0x0945 }, +{ 0x0946, 0x0946, 0x0946 }, +{ 0x0947, 0x0947, 0x0947 }, +{ 0x0948, 0x0948, 0x0948 }, +{ 0x094D, 0x094D, 0x094D }, +{ 0x0950, 0x0950, 0x0950 }, +{ 0x0951, 0x0951, 0x0951 }, +{ 0x0952, 0x0952, 0x0952 }, +{ 0x0953, 0x0953, 0x0953 }, +{ 0x0954, 0x0954, 0x0954 }, +{ 0x0958, 0x0958, 0x0958 }, +{ 0x0959, 0x0959, 0x0959 }, +{ 0x095A, 0x095A, 0x095A }, +{ 0x095B, 0x095B, 0x095B }, +{ 0x095C, 0x095C, 0x095C }, +{ 0x095D, 0x095D, 0x095D }, +{ 0x095E, 0x095E, 0x095E }, +{ 0x095F, 0x095F, 0x095F }, +{ 0x0960, 0x0960, 0x0960 }, +{ 0x0961, 0x0961, 0x0961 }, +{ 0x0962, 0x0962, 0x0962 }, +{ 0x0963, 0x0963, 0x0963 }, +{ 0x097D, 0x097D, 0x097D }, +{ 0x0981, 0x0981, 0x0981 }, +{ 0x0985, 0x0985, 0x0985 }, +{ 0x0986, 0x0986, 0x0986 }, +{ 0x0987, 0x0987, 0x0987 }, +{ 0x0988, 0x0988, 0x0988 }, +{ 0x0989, 0x0989, 0x0989 }, +{ 0x098A, 0x098A, 0x098A }, +{ 0x098B, 0x098B, 0x098B }, +{ 0x098C, 0x098C, 0x098C }, +{ 0x098F, 0x098F, 0x098F }, +{ 0x0990, 0x0990, 0x0990 }, +{ 0x0993, 0x0993, 0x0993 }, +{ 0x0994, 0x0994, 0x0994 }, +{ 0x0995, 0x0995, 0x0995 }, +{ 0x0996, 0x0996, 0x0996 }, +{ 0x0997, 0x0997, 0x0997 }, +{ 0x0998, 0x0998, 0x0998 }, +{ 0x0999, 0x0999, 0x0999 }, +{ 0x099A, 0x099A, 0x099A }, +{ 0x099B, 0x099B, 0x099B }, +{ 0x099C, 0x099C, 0x099C }, +{ 0x099D, 0x099D, 0x099D }, +{ 0x099E, 0x099E, 0x099E }, +{ 0x099F, 0x099F, 0x099F }, +{ 0x09A0, 0x09A0, 0x09A0 }, +{ 0x09A1, 0x09A1, 0x09A1 }, +{ 0x09A2, 0x09A2, 0x09A2 }, +{ 0x09A3, 0x09A3, 0x09A3 }, +{ 0x09A4, 0x09A4, 0x09A4 }, +{ 0x09A5, 0x09A5, 0x09A5 }, +{ 0x09A6, 0x09A6, 0x09A6 }, +{ 0x09A7, 0x09A7, 0x09A7 }, +{ 0x09A8, 0x09A8, 0x09A8 }, +{ 0x09AA, 0x09AA, 0x09AA }, +{ 0x09AB, 0x09AB, 0x09AB }, +{ 0x09AC, 0x09AC, 0x09AC }, +{ 0x09AD, 0x09AD, 0x09AD }, +{ 0x09AE, 0x09AE, 0x09AE }, +{ 0x09AF, 0x09AF, 0x09AF }, +{ 0x09B0, 0x09B0, 0x09B0 }, +{ 0x09B2, 0x09B2, 0x09B2 }, +{ 0x09B6, 0x09B6, 0x09B6 }, +{ 0x09B7, 0x09B7, 0x09B7 }, +{ 0x09B8, 0x09B8, 0x09B8 }, +{ 0x09B9, 0x09B9, 0x09B9 }, +{ 0x09BC, 0x09BC, 0x09BC }, +{ 0x09BD, 0x09BD, 0x09BD }, +{ 0x09C1, 0x09C1, 0x09C1 }, +{ 0x09C2, 0x09C2, 0x09C2 }, +{ 0x09C3, 0x09C3, 0x09C3 }, +{ 0x09C4, 0x09C4, 0x09C4 }, +{ 0x09CD, 0x09CD, 0x09CD }, +{ 0x09CE, 0x09CE, 0x09CE }, +{ 0x09DC, 0x09DC, 0x09DC }, +{ 0x09DD, 0x09DD, 0x09DD }, +{ 0x09DF, 0x09DF, 0x09DF }, +{ 0x09E0, 0x09E0, 0x09E0 }, +{ 0x09E1, 0x09E1, 0x09E1 }, +{ 0x09E2, 0x09E2, 0x09E2 }, +{ 0x09E3, 0x09E3, 0x09E3 }, +{ 0x09F0, 0x09F0, 0x09F0 }, +{ 0x09F1, 0x09F1, 0x09F1 }, +{ 0x0A01, 0x0A01, 0x0A01 }, +{ 0x0A02, 0x0A02, 0x0A02 }, +{ 0x0A05, 0x0A05, 0x0A05 }, +{ 0x0A06, 0x0A06, 0x0A06 }, +{ 0x0A07, 0x0A07, 0x0A07 }, +{ 0x0A08, 0x0A08, 0x0A08 }, +{ 0x0A09, 0x0A09, 0x0A09 }, +{ 0x0A0A, 0x0A0A, 0x0A0A }, +{ 0x0A0F, 0x0A0F, 0x0A0F }, +{ 0x0A10, 0x0A10, 0x0A10 }, +{ 0x0A13, 0x0A13, 0x0A13 }, +{ 0x0A14, 0x0A14, 0x0A14 }, +{ 0x0A15, 0x0A15, 0x0A15 }, +{ 0x0A16, 0x0A16, 0x0A16 }, +{ 0x0A17, 0x0A17, 0x0A17 }, +{ 0x0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}, +{ 0x0FA7, 0x0FA7, 0x0FA7 }, +{ 0x0FA8, 0x0FA8, 0x0FA8 }, +{ 0x0FA9, 0x0FA9, 0x0FA9 }, +{ 0x0FAA, 0x0FAA, 0x0FAA }, +{ 0x0FAB, 0x0FAB, 0x0FAB }, +{ 0x0FAC, 0x0FAC, 0x0FAC }, +{ 0x0FAD, 0x0FAD, 0x0FAD }, +{ 0x0FAE, 0x0FAE, 0x0FAE }, +{ 0x0FAF, 0x0FAF, 0x0FAF }, +{ 0x0FB0, 0x0FB0, 0x0FB0 }, +{ 0x0FB1, 0x0FB1, 0x0FB1 }, +{ 0x0FB2, 0x0FB2, 0x0FB2 }, +{ 0x0FB3, 0x0FB3, 0x0FB3 }, +{ 0x0FB4, 0x0FB4, 0x0FB4 }, +{ 0x0FB5, 0x0FB5, 0x0FB5 }, +{ 0x0FB6, 0x0FB6, 0x0FB6 }, +{ 0x0FB7, 0x0FB7, 0x0FB7 }, +{ 0x0FB8, 0x0FB8, 0x0FB8 }, +{ 0x0FB9, 0x0FB9, 0x0FB9 }, +{ 0x0FBA, 0x0FBA, 0x0FBA }, +{ 0x0FBB, 0x0FBB, 0x0FBB }, +{ 0x0FBC, 0x0FBC, 0x0FBC }, +{ 0x0FC6, 0x0FC6, 0x0FC6 }, +{ 0x1000, 0x1000, 0x1000 }, +{ 0x1001, 0x1001, 0x1001 }, +{ 0x1002, 0x1002, 0x1002 }, +{ 0x1003, 0x1003, 0x1003 }, +{ 0x1004, 0x1004, 0x1004 }, +{ 0x1005, 0x1005, 0x1005 }, +{ 0x1006, 0x1006, 0x1006 }, +{ 0x1007, 0x1007, 0x1007 }, +{ 0x1008, 0x1008, 0x1008 }, +{ 0x1009, 0x1009, 0x1009 }, +{ 0x100A, 0x100A, 0x100A }, +{ 0x100B, 0x100B, 0x100B }, +{ 0x100C, 0x100C, 0x100C }, +{ 0x100D, 0x100D, 0x100D }, +{ 0x100E, 0x100E, 0x100E }, +{ 0x100F, 0x100F, 0x100F }, +{ 0x1010, 0x1010, 0x1010 }, +{ 0x1011, 0x1011, 0x1011 }, +{ 0x1012, 0x1012, 0x1012 }, +{ 0x1013, 0x1013, 0x1013 }, +{ 0x1014, 0x1014, 0x1014 }, +{ 0x1015, 0x1015, 0x1015 }, +{ 0x1016, 0x1016, 0x1016 }, +{ 0x1017, 0x1017, 0x1017 }, +{ 0x1018, 0x1018, 0x1018 }, +{ 0x1019, 0x1019, 0x1019 }, +{ 0x101A, 0x101A, 0x101A }, +{ 0x101B, 0x101B, 0x101B }, +{ 0x101C, 0x101C, 0x101C }, +{ 0x101D, 0x101D, 0x101D }, +{ 0x101E, 0x101E, 0x101E }, +{ 0x101F, 0x101F, 0x101F }, +{ 0x1020, 0x1020, 0x1020 }, +{ 0x1021, 0x1021, 0x1021 }, +{ 0x1023, 0x1023, 0x1023 }, +{ 0x1024, 0x1024, 0x1024 }, +{ 0x1025, 0x1025, 0x1025 }, +{ 0x1026, 0x1026, 0x1026 }, +{ 0x1027, 0x1027, 0x1027 }, +{ 0x1029, 0x1029, 0x1029 }, +{ 0x102A, 0x102A, 0x102A }, +{ 0x102D, 0x102D, 0x102D }, +{ 0x102E, 0x102E, 0x102E }, +{ 0x102F, 0x102F, 0x102F }, +{ 0x1030, 0x1030, 0x1030 }, +{ 0x1032, 0x1032, 0x1032 }, +{ 0x1036, 0x1036, 0x1036 }, +{ 0x1037, 0x1037, 0x1037 }, +{ 0x1039, 0x1039, 0x1039 }, +{ 0x1050, 0x1050, 0x1050 }, +{ 0x1051, 0x1051, 0x1051 }, +{ 0x1052, 0x1052, 0x1052 }, +{ 0x1053, 0x1053, 0x1053 }, +{ 0x1054, 0x1054, 0x1054 }, +{ 0x1055, 0x1055, 0x1055 }, +{ 0x1058, 0x1058, 0x1058 }, +{ 0x1059, 0x1059, 0x1059 }, +{ 0x10A0, 0x10A0, 0x2D00 }, +{ 0x10A1, 0x10A1, 0x2D01 }, +{ 0x10A2, 0x10A2, 0x2D02 }, +{ 0x10A3, 0x10A3, 0x2D03 }, +{ 0x10A4, 0x10A4, 0x2D04 }, +{ 0x10A5, 0x10A5, 0x2D05 }, +{ 0x10A6, 0x10A6, 0x2D06 }, +{ 0x10A7, 0x10A7, 0x2D07 }, +{ 0x10A8, 0x10A8, 0x2D08 }, +{ 0x10A9, 0x10A9, 0x2D09 }, +{ 0x10AA, 0x10AA, 0x2D0A }, +{ 0x10AB, 0x10AB, 0x2D0B }, +{ 0x10AC, 0x10AC, 0x2D0C }, +{ 0x10AD, 0x10AD, 0x2D0D }, +{ 0x10AE, 0x10AE, 0x2D0E }, +{ 0x10AF, 0x10AF, 0x2D0F }, +{ 0x10B0, 0x10B0, 0x2D10 }, +{ 0x10B1, 0x10B1, 0x2D11 }, +{ 0x10B2, 0x10B2, 0x2D12 }, +{ 0x10B3, 0x10B3, 0x2D13 }, +{ 0x10B4, 0x10B4, 0x2D14 }, +{ 0x10B5, 0x10B5, 0x2D15 }, +{ 0x10B6, 0x10B6, 0x2D16 }, +{ 0x10B7, 0x10B7, 0x2D17 }, +{ 0x10B8, 0x10B8, 0x2D18 }, +{ 0x10B9, 0x10B9, 0x2D19 }, +{ 0x10BA, 0x10BA, 0x2D1A }, +{ 0x10BB, 0x10BB, 0x2D1B }, +{ 0x10BC, 0x10BC, 0x2D1C }, +{ 0x10BD, 0x10BD, 0x2D1D }, +{ 0x10BE, 0x10BE, 0x2D1E }, +{ 0x10BF, 0x10BF, 0x2D1F }, +{ 0x10C0, 0x10C0, 0x2D20 }, +{ 0x10C1, 0x10C1, 0x2D21 }, +{ 0x10C2, 0x10C2, 0x2D22 }, +{ 0x10C3, 0x10C3, 0x2D23 }, +{ 0x10C4, 0x10C4, 0x2D24 }, +{ 0x10C5, 0x10C5, 0x2D25 }, +{ 0x10D0, 0x10D0, 0x10D0 }, +{ 0x10D1, 0x10D1, 0x10D1 }, +{ 0x10D2, 0x10D2, 0x10D2 }, +{ 0x10D3, 0x10D3, 0x10D3 }, +{ 0x10D4, 0x10D4, 0x10D4 }, +{ 0x10D5, 0x10D5, 0x10D5 }, +{ 0x10D6, 0x10D6, 0x10D6 }, +{ 0x10D7, 0x10D7, 0x10D7 }, +{ 0x10D8, 0x10D8, 0x10D8 }, +{ 0x10D9, 0x10D9, 0x10D9 }, +{ 0x10DA, 0x10DA, 0x10DA }, +{ 0x10DB, 0x10DB, 0x10DB }, +{ 0x10DC, 0x10DC, 0x10DC }, +{ 0x10DD, 0x10DD, 0x10DD }, +{ 0x10DE, 0x10DE, 0x10DE }, +{ 0x10DF, 0x10DF, 0x10DF }, +{ 0x10E0, 0x10E0, 0x10E0 }, +{ 0x10E1, 0x10E1, 0x10E1 }, +{ 0x10E2, 0x10E2, 0x10E2 }, +{ 0x10E3, 0x10E3, 0x10E3 }, +{ 0x10E4, 0x10E4, 0x10E4 }, +{ 0x10E5, 0x10E5, 0x10E5 }, +{ 0x10E6, 0x10E6, 0x10E6 }, +{ 0x10E7, 0x10E7, 0x10E7 }, +{ 0x10E8, 0x10E8, 0x10E8 }, +{ 0x10E9, 0x10E9, 0x10E9 }, +{ 0x10EA, 0x10EA, 0x10EA }, +{ 0x10EB, 0x10EB, 0x10EB }, +{ 0x10EC, 0x10EC, 0x10EC }, +{ 0x10ED, 0x10ED, 0x10ED }, +{ 0x10EE, 0x10EE, 0x10EE }, +{ 0x10EF, 0x10EF, 0x10EF }, +{ 0x10F0, 0x10F0, 0x10F0 }, +{ 0x10F1, 0x10F1, 0x10F1 }, +{ 0x10F2, 0x10F2, 0x10F2 }, +{ 0x10F3, 0x10F3, 0x10F3 }, +{ 0x10F4, 0x10F4, 0x10F4 }, +{ 0x10F5, 0x10F5, 0x10F5 }, +{ 0x10F6, 0x10F6, 0x10F6 }, +{ 0x10F7, 0x10F7, 0x10F7 }, +{ 0x10F8, 0x10F8, 0x10F8 }, +{ 0x10F9, 0x10F9, 0x10F9 }, +{ 0x10FA, 0x10FA, 0x10FA }, +{ 0x10FC, 0x10FC, 0x10FC }, +{ 0x1100, 0x1100, 0x1100 }, +{ 0x1101, 0x1101, 0x1101 }, +{ 0x1102, 0x1102, 0x1102 }, +{ 0x1103, 0x1103, 0x1103 }, +{ 0x1104, 0x1104, 0x1104 }, +{ 0x1105, 0x1105, 0x1105 }, +{ 0x1106, 0x1106, 0x1106 }, +{ 0x1107, 0x1107, 0x1107 }, +{ 0x1108, 0x1108, 0x1108 }, +{ 0x1109, 0x1109, 0x1109 }, +{ 0x110A, 0x110A, 0x110A }, +{ 0x110B, 0x110B, 0x110B }, +{ 0x110C, 0x110C, 0x110C }, +{ 0x110D, 0x110D, 0x110D }, +{ 0x110E, 0x110E, 0x110E }, +{ 0x110F, 0x110F, 0x110F }, +{ 0x1110, 0x1110, 0x1110 }, +{ 0x1111, 0x1111, 0x1111 }, +{ 0x1112, 0x1112, 0x1112 }, +{ 0x1113, 0x1113, 0x1113 }, +{ 0x1114, 0x1114, 0x1114 }, +{ 0x1115, 0x1115, 0x1115 }, +{ 0x1116, 0x1116, 0x1116 }, +{ 0x1117, 0x1117, 0x1117 }, +{ 0x1118, 0x1118, 0x1118 }, +{ 0x1119, 0x1119, 0x1119 }, +{ 0x111A, 0x111A, 0x111A }, +{ 0x111B, 0x111B, 0x111B }, +{ 0x111C, 0x111C, 0x111C }, +{ 0x111D, 0x111D, 0x111D }, +{ 0x111E, 0x111E, 0x111E }, +{ 0x111F, 0x111F, 0x111F }, +{ 0x1120, 0x1120, 0x1120 }, +{ 0x1121, 0x1121, 0x1121 }, +{ 0x1122, 0x1122, 0x1122 }, +{ 0x1123, 0x1123, 0x1123 }, +{ 0x1124, 0x1124, 0x1124 }, +{ 0x1125, 0x1125, 0x1125 }, +{ 0x1126, 0x1126, 0x1126 }, +{ 0x1127, 0x1127, 0x1127 }, +{ 0x1128, 0x1128, 0x1128 }, +{ 0x1129, 0x1129, 0x1129 }, +{ 0x112A, 0x112A, 0x112A }, +{ 0x112B, 0x112B, 0x112B }, +{ 0x112C, 0x112C, 0x112C }, +{ 0x112D, 0x112D, 0x112D }, +{ 0x112E, 0x112E, 0x112E }, +{ 0x112F, 0x112F, 0x112F }, +{ 0x1130, 0x1130, 0x1130 }, +{ 0x1131, 0x1131, 0x1131 }, +{ 0x1132, 0x1132, 0x1132 }, +{ 0x1133, 0x1133, 0x1133 }, +{ 0x1134, 0x1134, 0x1134 }, +{ 0x1135, 0x1135, 0x1135 }, +{ 0x1136, 0x1136, 0x1136 }, +{ 0x1137, 0x1137, 0x1137 }, +{ 0x1138, 0x1138, 0x1138 }, +{ 0x1139, 0x1139, 0x1139 }, +{ 0x113A, 0x113A, 0x113A }, +{ 0x113B, 0x113B, 0x113B }, +{ 0x113C, 0x113C, 0x113C }, +{ 0x113D, 0x113D, 0x113D }, +{ 0x113E, 0x113E, 0x113E }, +{ 0x113F, 0x113F, 0x113F }, +{ 0x1140, 0x1140, 0x1140 }, +{ 0x1141, 0x1141, 0x1141 }, +{ 0x1142, 0x1142, 0x1142 }, +{ 0x1143, 0x1143, 0x1143 }, +{ 0x1144, 0x1144, 0x1144 }, +{ 0x1145, 0x1145, 0x1145 }, +{ 0x1146, 0x1146, 0x1146 }, +{ 0x1147, 0x1147, 0x1147 }, +{ 0x1148, 0x1148, 0x1148 }, +{ 0x1149, 0x1149, 0x1149 }, +{ 0x114A, 0x114A, 0x114A }, +{ 0x114B, 0x114B, 0x114B }, +{ 0x114C, 0x114C, 0x114C }, +{ 0x114D, 0x114D, 0x114D }, +{ 0x114E, 0x114E, 0x114E }, +{ 0x114F, 0x114F, 0x114F }, +{ 0x1150, 0x1150, 0x1150 }, +{ 0x1151, 0x1151, 0x1151 }, +{ 0x1152, 0x1152, 0x1152 }, +{ 0x1153, 0x1153, 0x1153 }, +{ 0x1154, 0x1154, 0x1154 }, +{ 0x1155, 0x1155, 0x1155 }, +{ 0x1156, 0x1156, 0x1156 }, +{ 0x1157, 0x1157, 0x1157 }, +{ 0x1158, 0x1158, 0x1158 }, +{ 0x1159, 0x1159, 0x1159 }, +{ 0x115F, 0x115F, 0x115F }, +{ 0x1160, 0x1160, 0x1160 }, +{ 0x1161, 0x1161, 0x1161 }, +{ 0x1162, 0x1162, 0x1162 }, +{ 0x1163, 0x1163, 0x1163 }, +{ 0x1164, 0x1164, 0x1164 }, +{ 0x1165, 0x1165, 0x1165 }, +{ 0x1166, 0x1166, 0x1166 }, +{ 0x1167, 0x1167, 0x1167 }, +{ 0x1168, 0x1168, 0x1168 }, +{ 0x1169, 0x1169, 0x1169 }, +{ 0x116A, 0x116A, 0x116A }, +{ 0x116B, 0x116B, 0x116B }, +{ 0x116C, 0x116C, 0x116C }, +{ 0x116D, 0x116D, 0x116D }, +{ 0x116E, 0x116E, 0x116E }, +{ 0x116F, 0x116F, 0x116F }, +{ 0x1170, 0x1170, 0x1170 }, +{ 0x1171, 0x1171, 0x1171 }, +{ 0x1172, 0x1172, 0x1172 }, +{ 0x1173, 0x1173, 0x1173 }, +{ 0x1174, 0x1174, 0x1174 }, +{ 0x1175, 0x1175, 0x1175 }, +{ 0x1176, 0x1176, 0x1176 }, +{ 0x1177, 0x1177, 0x1177 }, +{ 0x1178, 0x1178, 0x1178 }, +{ 0x1179, 0x1179, 0x1179 }, +{ 0x117A, 0x117A, 0x117A }, +{ 0x117B, 0x117B, 0x117B }, +{ 0x117C, 0x117C, 0x117C }, +{ 0x117D, 0x117D, 0x117D }, +{ 0x117E, 0x117E, 0x117E }, +{ 0x117F, 0x117F, 0x117F }, +{ 0x1180, 0x1180, 0x1180 }, +{ 0x1181, 0x1181, 0x1181 }, +{ 0x1182, 0x1182, 0x1182 }, +{ 0x1183, 0x1183, 0x1183 }, +{ 0x1184, 0x1184, 0x1184 }, +{ 0x1185, 0x1185, 0x1185 }, +{ 0x1186, 0x1186, 0x1186 }, +{ 0x1187, 0x1187, 0x1187 }, +{ 0x1188, 0x1188, 0x1188 }, +{ 0x1189, 0x1189, 0x1189 }, +{ 0x118A, 0x118A, 0x118A }, +{ 0x118B, 0x118B, 0x118B }, +{ 0x118C, 0x118C, 0x118C }, +{ 0x118D, 0x118D, 0x118D }, +{ 0x118E, 0x118E, 0x118E }, +{ 0x118F, 0x118F, 0x118F }, +{ 0x1190, 0x1190, 0x1190 }, +{ 0x1191, 0x1191, 0x1191 }, +{ 0x1192, 0x1192, 0x1192 }, +{ 0x1193, 0x1193, 0x1193 }, +{ 0x1194, 0x1194, 0x1194 }, +{ 0x1195, 0x1195, 0x1195 }, +{ 0x1196, 0x1196, 0x1196 }, +{ 0x1197, 0x1197, 0x1197 }, +{ 0x1198, 0x1198, 0x1198 }, +{ 0x1199, 0x1199, 0x1199 }, +{ 0x119A, 0x119A, 0x119A }, +{ 0x119B, 0x119B, 0x119B }, +{ 0x119C, 0x119C, 0x119C }, +{ 0x119D, 0x119D, 0x119D }, +{ 0x119E, 0x119E, 0x119E }, +{ 0x119F, 0x119F, 0x119F }, +{ 0x11A0, 0x11A0, 0x11A0 }, +{ 0x11A1, 0x11A1, 0x11A1 }, +{ 0x11A2, 0x11A2, 0x11A2 }, +{ 0x11A8, 0x11A8, 0x11A8 }, +{ 0x11A9, 0x11A9, 0x11A9 }, +{ 0x11AA, 0x11AA, 0x11AA }, +{ 0x11AB, 0x11AB, 0x11AB }, +{ 0x11AC, 0x11AC, 0x11AC }, +{ 0x11AD, 0x11AD, 0x11AD }, +{ 0x11AE, 0x11AE, 0x11AE }, +{ 0x11AF, 0x11AF, 0x11AF }, +{ 0x11B0, 0x11B0, 0x11B0 }, +{ 0x11B1, 0x11B1, 0x11B1 }, +{ 0x11B2, 0x11B2, 0x11B2 }, +{ 0x11B3, 0x11B3, 0x11B3 }, +{ 0x11B4, 0x11B4, 0x11B4 }, +{ 0x11B5, 0x11B5, 0x11B5 }, +{ 0x11B6, 0x11B6, 0x11B6 }, +{ 0x11B7, 0x11B7, 0x11B7 }, +{ 0x11B8, 0x11B8, 0x11B8 }, +{ 0x11B9, 0x11B9, 0x11B9 }, +{ 0x11BA, 0x11BA, 0x11BA }, +{ 0x11BB, 0x11BB, 0x11BB }, +{ 0x11BC, 0x11BC, 0x11BC }, +{ 0x11BD, 0x11BD, 0x11BD }, +{ 0x11BE, 0x11BE, 0x11BE }, +{ 0x11BF, 0x11BF, 0x11BF }, +{ 0x11C0, 0x11C0, 0x11C0 }, +{ 0x11C1, 0x11C1, 0x11C1 }, +{ 0x11C2, 0x11C2, 0x11C2 }, +{ 0x11C3, 0x11C3, 0x11C3 }, +{ 0x11C4, 0x11C4, 0x11C4 }, +{ 0x11C5, 0x11C5, 0x11C5 }, +{ 0x11C6, 0x11C6, 0x11C6 }, +{ 0x11C7, 0x11C7, 0x11C7 }, +{ 0x11C8, 0x11C8, 0x11C8 }, +{ 0x11C9, 0x11C9, 0x11C9 }, +{ 0x11CA, 0x11CA, 0x11CA }, +{ 0x11CB, 0x11CB, 0x11CB }, +{ 0x11CC, 0x11CC, 0x11CC }, +{ 0x11CD, 0x11CD, 0x11CD }, +{ 0x11CE, 0x11CE, 0x11CE }, +{ 0x11CF, 0x11CF, 0x11CF }, +{ 0x11D0, 0x11D0, 0x11D0 }, +{ 0x11D1, 0x11D1, 0x11D1 }, +{ 0x11D2, 0x11D2, 0x11D2 }, +{ 0x11D3, 0x11D3, 0x11D3 }, +{ 0x11D4, 0x11D4, 0x11D4 }, +{ 0x11D5, 0x11D5, 0x11D5 }, +{ 0x11D6, 0x11D6, 0x11D6 }, +{ 0x11D7, 0x11D7, 0x11D7 }, +{ 0x11D8, 0x11D8, 0x11D8 }, +{ 0x11D9, 0x11D9, 0x11D9 }, +{ 0x11DA, 0x11DA, 0x11DA }, +{ 0x11DB, 0x11DB, 0x11DB }, +{ 0x11DC, 0x11DC, 0x11DC }, +{ 0x11DD, 0x11DD, 0x11DD }, +{ 0x11DE, 0x11DE, 0x11DE }, +{ 0x11DF, 0x11DF, 0x11DF }, +{ 0x11E0, 0x11E0, 0x11E0 }, +{ 0x11E1, 0x11E1, 0x11E1 }, +{ 0x11E2, 0x11E2, 0x11E2 }, +{ 0x11E3, 0x11E3, 0x11E3 }, +{ 0x11E4, 0x11E4, 0x11E4 }, +{ 0x11E5, 0x11E5, 0x11E5 }, +{ 0x11E6, 0x11E6, 0x11E6 }, +{ 0x11E7, 0x11E7, 0x11E7 }, +{ 0x11E8, 0x11E8, 0x11E8 }, +{ 0x11E9, 0x11E9, 0x11E9 }, +{ 0x11EA, 0x11EA, 0x11EA }, +{ 0x11EB, 0x11EB, 0x11EB }, +{ 0x11EC, 0x11EC, 0x11EC }, +{ 0x11ED, 0x11ED, 0x11ED }, +{ 0x11EE, 0x11EE, 0x11EE }, +{ 0x11EF, 0x11EF, 0x11EF }, +{ 0x11F0, 0x11F0, 0x11F0 }, +{ 0x11F1, 0x11F1, 0x11F1 }, +{ 0x11F2, 0x11F2, 0x11F2 }, +{ 0x11F3, 0x11F3, 0x11F3 }, +{ 0x11F4, 0x11F4, 0x11F4 }, +{ 0x11F5, 0x11F5, 0x11F5 }, +{ 0x11F6, 0x11F6, 0x11F6 }, +{ 0x11F7, 0x11F7, 0x11F7 }, +{ 0x11F8, 0x11F8, 0x11F8 }, +{ 0x11F9, 0x11F9, 0x11F9 }, +{ 0x1200, 0x1200, 0x1200 }, +{ 0x1201, 0x1201, 0x1201 }, +{ 0x1202, 0x1202, 0x1202 }, +{ 0x1203, 0x1203, 0x1203 }, +{ 0x1204, 0x1204, 0x1204 }, +{ 0x1205, 0x1205, 0x1205 }, +{ 0x1206, 0x1206, 0x1206 }, +{ 0x1207, 0x1207, 0x1207 }, +{ 0x1208, 0x1208, 0x1208 }, +{ 0x1209, 0x1209, 0x1209 }, +{ 0x120A, 0x120A, 0x120A }, +{ 0x120B, 0x120B, 0x120B }, +{ 0x120C, 0x120C, 0x120C }, +{ 0x120D, 0x120D, 0x120D }, +{ 0x120E, 0x120E, 0x120E }, +{ 0x120F, 0x120F, 0x120F }, +{ 0x1210, 0x1210, 0x1210 }, +{ 0x1211, 0x1211, 0x1211 }, +{ 0x1212, 0x1212, 0x1212 }, +{ 0x1213, 0x1213, 0x1213 }, +{ 0x1214, 0x1214, 0x1214 }, +{ 0x1215, 0x1215, 0x1215 }, +{ 0x1216, 0x1216, 0x1216 }, +{ 0x1217, 0x1217, 0x1217 }, +{ 0x1218, 0x1218, 0x1218 }, +{ 0x1219, 0x1219, 0x1219 }, +{ 0x121A, 0x121A, 0x121A }, +{ 0x121B, 0x121B, 0x121B }, +{ 0x121C, 0x121C, 0x121C }, +{ 0x121D, 0x121D, 0x121D }, +{ 0x121E, 0x121E, 0x121E }, +{ 0x121F, 0x121F, 0x121F }, +{ 0x1220, 0x1220, 0x1220 }, +{ 0x1221, 0x1221, 0x1221 }, +{ 0x1222, 0x1222, 0x1222 }, +{ 0x1223, 0x1223, 0x1223 }, +{ 0x1224, 0x1224, 0x1224 }, +{ 0x1225, 0x1225, 0x1225 }, +{ 0x1226, 0x1226, 0x1226 }, +{ 0x1227, 0x1227, 0x1227 }, +{ 0x1228, 0x1228, 0x1228 }, +{ 0x1229, 0x1229, 0x1229 }, +{ 0x122A, 0x122A, 0x122A }, +{ 0x122B, 0x122B, 0x122B }, +{ 0x122C, 0x122C, 0x122C }, +{ 0x122D, 0x122D, 0x122D }, +{ 0x122E, 0x122E, 0x122E }, +{ 0x122F, 0x122F, 0x122F }, +{ 0x1230, 0x1230, 0x1230 }, +{ 0x1231, 0x1231, 0x1231 }, +{ 0x1232, 0x1232, 0x1232 }, +{ 0x1233, 0x1233, 0x1233 }, +{ 0x1234, 0x1234, 0x1234 }, +{ 0x1235, 0x1235, 0x1235 }, +{ 0x1236, 0x1236, 0x1236 }, +{ 0x1237, 0x1237, 0x1237 }, +{ 0x1238, 0x1238, 0x1238 }, +{ 0x1239, 0x1239, 0x1239 }, +{ 0x123A, 0x123A, 0x123A }, +{ 0x123B, 0x123B, 0x123B }, +{ 0x123C, 0x123C, 0x123C }, +{ 0x123D, 0x123D, 0x123D }, +{ 0x123E, 0x123E, 0x123E }, +{ 0x123F, 0x123F, 0x123F }, +{ 0x1240, 0x1240, 0x1240 }, +{ 0x1241, 0x1241, 0x1241 }, +{ 0x1242, 0x1242, 0x1242 }, +{ 0x1243, 0x1243, 0x1243 }, +{ 0x1244, 0x1244, 0x1244 }, +{ 0x1245, 0x1245, 0x1245 }, +{ 0x1246, 0x1246, 0x1246 }, +{ 0x1247, 0x1247, 0x1247 }, +{ 0x1248, 0x1248, 0x1248 }, +{ 0x124A, 0x124A, 0x124A }, +{ 0x124B, 0x124B, 0x124B }, +{ 0x124C, 0x124C, 0x124C }, +{ 0x124D, 0x124D, 0x124D }, +{ 0x1250, 0x1250, 0x1250 }, +{ 0x1251, 0x1251, 0x1251 }, +{ 0x1252, 0x1252, 0x1252 }, +{ 0x1253, 0x1253, 0x1253 }, +{ 0x1254, 0x1254, 0x1254 }, +{ 0x1255, 0x1255, 0x1255 }, +{ 0x1256, 0x1256, 0x1256 }, +{ 0x1258, 0x1258, 0x1258 }, +{ 0x125A, 0x125A, 0x125A }, +{ 0x125B, 0x125B, 0x125B }, +{ 0x125C, 0x125C, 0x125C }, +{ 0x125D, 0x125D, 0x125D }, +{ 0x1260, 0x1260, 0x1260 }, +{ 0x1261, 0x1261, 0x1261 }, +{ 0x1262, 0x1262, 0x1262 }, +{ 0x1263, 0x1263, 0x1263 }, +{ 0x1264, 0x1264, 0x1264 }, +{ 0x1265, 0x1265, 0x1265 }, +{ 0x1266, 0x1266, 0x1266 }, +{ 0x1267, 0x1267, 0x1267 }, +{ 0x1268, 0x1268, 0x1268 }, +{ 0x1269, 0x1269, 0x1269 }, +{ 0x126A, 0x126A, 0x126A }, +{ 0x126B, 0x126B, 0x126B }, +{ 0x126C, 0x126C, 0x126C }, +{ 0x126D, 0x126D, 0x126D }, +{ 0x126E, 0x126E, 0x126E }, +{ 0x126F, 0x126F, 0x126F }, +{ 0x1270, 0x1270, 0x1270 }, +{ 0x1271, 0x1271, 0x1271 }, +{ 0x1272, 0x1272, 0x1272 }, +{ 0x1273, 0x1273, 0x1273 }, +{ 0x1274, 0x1274, 0x1274 }, +{ 0x1275, 0x1275, 0x1275 }, +{ 0x1276, 0x1276, 0x1276 }, +{ 0x1277, 0x1277, 0x1277 }, +{ 0x1278, 0x1278, 0x1278 }, +{ 0x1279, 0x1279, 0x1279 }, +{ 0x127A, 0x127A, 0x127A }, +{ 0x127B, 0x127B, 0x127B }, +{ 0x127C, 0x127C, 0x127C }, +{ 0x127D, 0x127D, 0x127D }, +{ 0x127E, 0x127E, 0x127E }, +{ 0x127F, 0x127F, 0x127F }, +{ 0x1280, 0x1280, 0x1280 }, +{ 0x1281, 0x1281, 0x1281 }, +{ 0x1282, 0x1282, 0x1282 }, +{ 0x1283, 0x1283, 0x1283 }, +{ 0x1284, 0x1284, 0x1284 }, +{ 0x1285, 0x1285, 0x1285 }, +{ 0x1286, 0x1286, 0x1286 }, +{ 0x1287, 0x1287, 0x1287 }, +{ 0x1288, 0x1288, 0x1288 }, +{ 0x128A, 0x128A, 0x128A }, +{ 0x128B, 0x128B, 0x128B }, +{ 0x128C, 0x128C, 0x128C }, +{ 0x128D, 0x128D, 0x128D }, +{ 0x1290, 0x1290, 0x1290 }, +{ 0x1291, 0x1291, 0x1291 }, +{ 0x1292, 0x1292, 0x1292 }, +{ 0x1293, 0x1293, 0x1293 }, +{ 0x1294, 0x1294, 0x1294 }, +{ 0x1295, 0x1295, 0x1295 }, +{ 0x1296, 0x1296, 0x1296 }, +{ 0x1297, 0x1297, 0x1297 }, +{ 0x1298, 0x1298, 0x1298 }, +{ 0x1299, 0x1299, 0x1299 }, +{ 0x129A, 0x129A, 0x129A }, +{ 0x129B, 0x129B, 0x129B }, +{ 0x129C, 0x129C, 0x129C }, +{ 0x129D, 0x129D, 0x129D }, +{ 0x129E, 0x129E, 0x129E }, +{ 0x129F, 0x129F, 0x129F }, +{ 0x12A0, 0x12A0, 0x12A0 }, +{ 0x12A1, 0x12A1, 0x12A1 }, +{ 0x12A2, 0x12A2, 0x12A2 }, +{ 0x12A3, 0x12A3, 0x12A3 }, +{ 0x12A4, 0x12A4, 0x12A4 }, +{ 0x12A5, 0x12A5, 0x12A5 }, +{ 0x12A6, 0x12A6, 0x12A6 }, +{ 0x12A7, 0x12A7, 0x12A7 }, +{ 0x12A8, 0x12A8, 0x12A8 }, +{ 0x12A9, 0x12A9, 0x12A9 }, +{ 0x12AA, 0x12AA, 0x12AA }, +{ 0x12AB, 0x12AB, 0x12AB }, +{ 0x12AC, 0x12AC, 0x12AC }, +{ 0x12AD, 0x12AD, 0x12AD }, +{ 0x12AE, 0x12AE, 0x12AE }, +{ 0x12AF, 0x12AF, 0x12AF }, +{ 0x12B0, 0x12B0, 0x12B0 }, +{ 0x12B2, 0x12B2, 0x12B2 }, +{ 0x12B3, 0x12B3, 0x12B3 }, +{ 0x12B4, 0x12B4, 0x12B4 }, +{ 0x12B5, 0x12B5, 0x12B5 }, +{ 0x12B8, 0x12B8, 0x12B8 }, +{ 0x12B9, 0x12B9, 0x12B9 }, +{ 0x12BA, 0x12BA, 0x12BA }, +{ 0x12BB, 0x12BB, 0x12BB }, +{ 0x12BC, 0x12BC, 0x12BC }, +{ 0x12BD, 0x12BD, 0x12BD }, +{ 0x12BE, 0x12BE, 0x12BE }, +{ 0x12C0, 0x12C0, 0x12C0 }, +{ 0x12C2, 0x12C2, 0x12C2 }, +{ 0x12C3, 0x12C3, 0x12C3 }, +{ 0x12C4, 0x12C4, 0x12C4 }, +{ 0x12C5, 0x12C5, 0x12C5 }, +{ 0x12C8, 0x12C8, 0x12C8 }, +{ 0x12C9, 0x12C9, 0x12C9 }, +{ 0x12CA, 0x12CA, 0x12CA }, +{ 0x12CB, 0x12CB, 0x12CB }, +{ 0x12CC, 0x12CC, 0x12CC }, +{ 0x12CD, 0x12CD, 0x12CD }, +{ 0x12CE, 0x12CE, 0x12CE }, +{ 0x12CF, 0x12CF, 0x12CF }, +{ 0x12D0, 0x12D0, 0x12D0 }, +{ 0x12D1, 0x12D1, 0x12D1 }, +{ 0x12D2, 0x12D2, 0x12D2 }, +{ 0x12D3, 0x12D3, 0x12D3 }, +{ 0x12D4, 0x12D4, 0x12D4 }, +{ 0x12D5, 0x12D5, 0x12D5 }, +{ 0x12D6, 0x12D6, 0x12D6 }, +{ 0x12D8, 0x12D8, 0x12D8 }, +{ 0x12D9, 0x12D9, 0x12D9 }, +{ 0x12DA, 0x12DA, 0x12DA }, +{ 0x12DB, 0x12DB, 0x12DB }, +{ 0x12DC, 0x12DC, 0x12DC }, +{ 0x12DD, 0x12DD, 0x12DD }, +{ 0x12DE, 0x12DE, 0x12DE }, +{ 0x12DF, 0x12DF, 0x12DF }, +{ 0x12E0, 0x12E0, 0x12E0 }, +{ 0x12E1, 0x12E1, 0x12E1 }, +{ 0x12E2, 0x12E2, 0x12E2 }, +{ 0x12E3, 0x12E3, 0x12E3 }, +{ 0x12E4, 0x12E4, 0x12E4 }, +{ 0x12E5, 0x12E5, 0x12E5 }, +{ 0x12E6, 0x12E6, 0x12E6 }, +{ 0x12E7, 0x12E7, 0x12E7 }, +{ 0x12E8, 0x12E8, 0x12E8 }, +{ 0x12E9, 0x12E9, 0x12E9 }, +{ 0x12EA, 0x12EA, 0x12EA }, +{ 0x12EB, 0x12EB, 0x12EB }, +{ 0x12EC, 0x12EC, 0x12EC }, +{ 0x12ED, 0x12ED, 0x12ED }, +{ 0x12EE, 0x12EE, 0x12EE }, +{ 0x12EF, 0x12EF, 0x12EF }, +{ 0x12F0, 0x12F0, 0x12F0 }, +{ 0x12F1, 0x12F1, 0x12F1 }, +{ 0x12F2, 0x12F2, 0x12F2 }, +{ 0x12F3, 0x12F3, 0x12F3 }, +{ 0x12F4, 0x12F4, 0x12F4 }, +{ 0x12F5, 0x12F5, 0x12F5 }, +{ 0x12F6, 0x12F6, 0x12F6 }, +{ 0x12F7, 0x12F7, 0x12F7 }, +{ 0x12F8, 0x12F8, 0x12F8 }, +{ 0x12F9, 0x12F9, 0x12F9 }, +{ 0x12FA, 0x12FA, 0x12FA }, +{ 0x12FB, 0x12FB, 0x12FB }, +{ 0x12FC, 0x12FC, 0x12FC }, +{ 0x12FD, 0x12FD, 0x12FD }, +{ 0x12FE, 0x12FE, 0x12FE }, +{ 0x12FF, 0x12FF, 0x12FF }, +{ 0x1300, 0x1300, 0x1300 }, +{ 0x1301, 0x1301, 0x1301 }, +{ 0x1302, 0x1302, 0x1302 }, +{ 0x1303, 0x1303, 0x1303 }, +{ 0x1304, 0x1304, 0x1304 }, +{ 0x1305, 0x1305, 0x1305 }, +{ 0x1306, 0x1306, 0x1306 }, +{ 0x1307, 0x1307, 0x1307 }, +{ 0x1308, 0x1308, 0x1308 }, +{ 0x1309, 0x1309, 0x1309 }, +{ 0x130A, 0x130A, 0x130A }, +{ 0x130B, 0x130B, 0x130B }, +{ 0x130C, 0x130C, 0x130C }, +{ 0x130D, 0x130D, 0x130D }, +{ 0x130E, 0x130E, 0x130E }, +{ 0x130F, 0x130F, 0x130F }, +{ 0x1310, 0x1310, 0x1310 }, +{ 0x1312, 0x1312, 0x1312 }, +{ 0x1313, 0x1313, 0x1313 }, +{ 0x1314, 0x1314, 0x1314 }, +{ 0x1315, 0x1315, 0x1315 }, +{ 0x1318, 0x1318, 0x1318 }, +{ 0x1319, 0x1319, 0x1319 }, +{ 0x131A, 0x131A, 0x131A }, +{ 0x131B, 0x131B, 0x131B }, +{ 0x131C, 0x131C, 0x131C }, +{ 0x131D, 0x131D, 0x131D }, +{ 0x131E, 0x131E, 0x131E }, +{ 0x131F, 0x131F, 0x131F }, +{ 0x1320, 0x1320, 0x1320 }, +{ 0x1321, 0x1321, 0x1321 }, +{ 0x1322, 0x1322, 0x1322 }, +{ 0x1323, 0x1323, 0x1323 }, +{ 0x1324, 0x1324, 0x1324 }, +{ 0x1325, 0x1325, 0x1325 }, +{ 0x1326, 0x1326, 0x1326 }, +{ 0x1327, 0x1327, 0x1327 }, +{ 0x1328, 0x1328, 0x1328 }, +{ 0x1329, 0x1329, 0x1329 }, +{ 0x132A, 0x132A, 0x132A }, +{ 0x132B, 0x132B, 0x132B }, +{ 0x132C, 0x132C, 0x132C }, +{ 0x132D, 0x132D, 0x132D }, +{ 0x132E, 0x132E, 0x132E }, +{ 0x132F, 0x132F, 0x132F }, +{ 0x1330, 0x1330, 0x1330 }, +{ 0x1331, 0x1331, 0x1331 }, +{ 0x1332, 0x1332, 0x1332 }, +{ 0x1333, 0x1333, 0x1333 }, +{ 0x1334, 0x1334, 0x1334 }, +{ 0x1335, 0x1335, 0x1335 }, +{ 0x1336, 0x1336, 0x1336 }, +{ 0x1337, 0x1337, 0x1337 }, +{ 0x1338, 0x1338, 0x1338 }, +{ 0x1339, 0x1339, 0x1339 }, +{ 0x133A, 0x133A, 0x133A }, +{ 0x133B, 0x133B, 0x133B }, +{ 0x133C, 0x133C, 0x133C }, +{ 0x133D, 0x133D, 0x133D }, +{ 0x133E, 0x133E, 0x133E }, +{ 0x133F, 0x133F, 0x133F }, +{ 0x1340, 0x1340, 0x1340 }, +{ 0x1341, 0x1341, 0x1341 }, +{ 0x1342, 0x1342, 0x1342 }, +{ 0x1343, 0x1343, 0x1343 }, +{ 0x1344, 0x1344, 0x1344 }, +{ 0x1345, 0x1345, 0x1345 }, +{ 0x1346, 0x1346, 0x1346 }, +{ 0x1347, 0x1347, 0x1347 }, +{ 0x1348, 0x1348, 0x1348 }, +{ 0x1349, 0x1349, 0x1349 }, +{ 0x134A, 0x134A, 0x134A }, +{ 0x134B, 0x134B, 0x134B }, +{ 0x134C, 0x134C, 0x134C }, +{ 0x134D, 0x134D, 0x134D }, +{ 0x134E, 0x134E, 0x134E }, +{ 0x134F, 0x134F, 0x134F }, +{ 0x1350, 0x1350, 0x1350 }, +{ 0x1351, 0x1351, 0x1351 }, +{ 0x1352, 0x1352, 0x1352 }, +{ 0x1353, 0x1353, 0x1353 }, +{ 0x1354, 0x1354, 0x1354 }, +{ 0x1355, 0x1355, 0x1355 }, +{ 0x1356, 0x1356, 0x1356 }, +{ 0x1357, 0x1357, 0x1357 }, +{ 0x1358, 0x1358, 0x1358 }, +{ 0x1359, 0x1359, 0x1359 }, +{ 0x135A, 0x135A, 0x135A }, +{ 0x135F, 0x135F, 0x135F }, +{ 0x1380, 0x1380, 0x1380 }, +{ 0x1381, 0x1381, 0x1381 }, +{ 0x1382, 0x1382, 0x1382 }, +{ 0x1383, 0x1383, 0x1383 }, +{ 0x1384, 0x1384, 0x1384 }, +{ 0x1385, 0x1385, 0x1385 }, +{ 0x1386, 0x1386, 0x1386 }, +{ 0x1387, 0x1387, 0x1387 }, +{ 0x1388, 0x1388, 0x1388 }, +{ 0x1389, 0x1389, 0x1389 }, +{ 0x138A, 0x138A, 0x138A }, +{ 0x138B, 0x138B, 0x138B }, +{ 0x138C, 0x138C, 0x138C }, +{ 0x138D, 0x138D, 0x138D }, +{ 0x138E, 0x138E, 0x138E }, +{ 0x138F, 0x138F, 0x138F }, +{ 0x13A0, 0x13A0, 0x13A0 }, +{ 0x13A1, 0x13A1, 0x13A1 }, +{ 0x13A2, 0x13A2, 0x13A2 }, +{ 0x13A3, 0x13A3, 0x13A3 }, +{ 0x13A4, 0x13A4, 0x13A4 }, +{ 0x13A5, 0x13A5, 0x13A5 }, +{ 0x13A6, 0x13A6, 0x13A6 }, +{ 0x13A7, 0x13A7, 0x13A7 }, +{ 0x13A8, 0x13A8, 0x13A8 }, +{ 0x13A9, 0x13A9, 0x13A9 }, +{ 0x13AA, 0x13AA, 0x13AA }, +{ 0x13AB, 0x13AB, 0x13AB }, +{ 0x13AC, 0x13AC, 0x13AC }, +{ 0x13AD, 0x13AD, 0x13AD }, +{ 0x13AE, 0x13AE, 0x13AE }, +{ 0x13AF, 0x13AF, 0x13AF }, +{ 0x13B0, 0x13B0, 0x13B0 }, +{ 0x13B1, 0x13B1, 0x13B1 }, +{ 0x13B2, 0x13B2, 0x13B2 }, +{ 0x13B3, 0x13B3, 0x13B3 }, +{ 0x13B4, 0x13B4, 0x13B4 }, +{ 0x13B5, 0x13B5, 0x13B5 }, +{ 0x13B6, 0x13B6, 0x13B6 }, +{ 0x13B7, 0x13B7, 0x13B7 }, +{ 0x13B8, 0x13B8, 0x13B8 }, +{ 0x13B9, 0x13B9, 0x13B9 }, +{ 0x13BA, 0x13BA, 0x13BA }, +{ 0x13BB, 0x13BB, 0x13BB }, +{ 0x13BC, 0x13BC, 0x13BC }, +{ 0x13BD, 0x13BD, 0x13BD }, +{ 0x13BE, 0x13BE, 0x13BE }, +{ 0x13BF, 0x13BF, 0x13BF }, +{ 0x13C0, 0x13C0, 0x13C0 }, +{ 0x13C1, 0x13C1, 0x13C1 }, +{ 0x13C2, 0x13C2, 0x13C2 }, +{ 0x13C3, 0x13C3, 0x13C3 }, +{ 0x13C4, 0x13C4, 0x13C4 }, +{ 0x13C5, 0x13C5, 0x13C5 }, +{ 0x13C6, 0x13C6, 0x13C6 }, +{ 0x13C7, 0x13C7, 0x13C7 }, +{ 0x13C8, 0x13C8, 0x13C8 }, +{ 0x13C9, 0x13C9, 0x13C9 }, +{ 0x13CA, 0x13CA, 0x13CA }, +{ 0x13CB, 0x13CB, 0x13CB }, +{ 0x13CC, 0x13CC, 0x13CC }, +{ 0x13CD, 0x13CD, 0x13CD }, +{ 0x13CE, 0x13CE, 0x13CE }, +{ 0x13CF, 0x13CF, 0x13CF }, +{ 0x13D0, 0x13D0, 0x13D0 }, +{ 0x13D1, 0x13D1, 0x13D1 }, +{ 0x13D2, 0x13D2, 0x13D2 }, +{ 0x13D3, 0x13D3, 0x13D3 }, +{ 0x13D4, 0x13D4, 0x13D4 }, +{ 0x13D5, 0x13D5, 0x13D5 }, +{ 0x13D6, 0x13D6, 0x13D6 }, +{ 0x13D7, 0x13D7, 0x13D7 }, +{ 0x13D8, 0x13D8, 0x13D8 }, +{ 0x13D9, 0x13D9, 0x13D9 }, +{ 0x13DA, 0x13DA, 0x13DA }, +{ 0x13DB, 0x13DB, 0x13DB }, +{ 0x13DC, 0x13DC, 0x13DC }, +{ 0x13DD, 0x13DD, 0x13DD }, +{ 0x13DE, 0x13DE, 0x13DE }, +{ 0x13DF, 0x13DF, 0x13DF }, +{ 0x13E0, 0x13E0, 0x13E0 }, +{ 0x13E1, 0x13E1, 0x13E1 }, +{ 0x13E2, 0x13E2, 0x13E2 }, +{ 0x13E3, 0x13E3, 0x13E3 }, +{ 0x13E4, 0x13E4, 0x13E4 }, +{ 0x13E5, 0x13E5, 0x13E5 }, +{ 0x13E6, 0x13E6, 0x13E6 }, +{ 0x13E7, 0x13E7, 0x13E7 }, +{ 0x13E8, 0x13E8, 0x13E8 }, +{ 0x13E9, 0x13E9, 0x13E9 }, +{ 0x13EA, 0x13EA, 0x13EA }, +{ 0x13EB, 0x13EB, 0x13EB }, +{ 0x13EC, 0x13EC, 0x13EC }, +{ 0x13ED, 0x13ED, 0x13ED }, +{ 0x13EE, 0x13EE, 0x13EE }, +{ 0x13EF, 0x13EF, 0x13EF }, +{ 0x13F0, 0x13F0, 0x13F0 }, +{ 0x13F1, 0x13F1, 0x13F1 }, +{ 0x13F2, 0x13F2, 0x13F2 }, +{ 0x13F3, 0x13F3, 0x13F3 }, +{ 0x13F4, 0x13F4, 0x13F4 }, +{ 0x1401, 0x1401, 0x1401 }, +{ 0x1402, 0x1402, 0x1402 }, +{ 0x1403, 0x1403, 0x1403 }, +{ 0x1404, 0x1404, 0x1404 }, +{ 0x1405, 0x1405, 0x1405 }, +{ 0x1406, 0x1406, 0x1406 }, +{ 0x1407, 0x1407, 0x1407 }, +{ 0x1408, 0x1408, 0x1408 }, +{ 0x1409, 0x1409, 0x1409 }, +{ 0x140A, 0x140A, 0x140A }, +{ 0x140B, 0x140B, 0x140B }, +{ 0x140C, 0x140C, 0x140C }, +{ 0x140D, 0x140D, 0x140D }, +{ 0x140E, 0x140E, 0x140E }, +{ 0x140F, 0x140F, 0x140F }, +{ 0x1410, 0x1410, 0x1410 }, +{ 0x1411, 0x1411, 0x1411 }, +{ 0x1412, 0x1412, 0x1412 }, +{ 0x1413, 0x1413, 0x1413 }, +{ 0x1414, 0x1414, 0x1414 }, +{ 0x1415, 0x1415, 0x1415 }, +{ 0x1416, 0x1416, 0x1416 }, +{ 0x1417, 0x1417, 0x1417 }, +{ 0x1418, 0x1418, 0x1418 }, +{ 0x1419, 0x1419, 0x1419 }, +{ 0x141A, 0x141A, 0x141A }, +{ 0x141B, 0x141B, 0x141B }, +{ 0x141C, 0x141C, 0x141C }, +{ 0x141D, 0x141D, 0x141D }, +{ 0x141E, 0x141E, 0x141E }, +{ 0x141F, 0x141F, 0x141F }, +{ 0x1420, 0x1420, 0x1420 }, +{ 0x1421, 0x1421, 0x1421 }, +{ 0x1422, 0x1422, 0x1422 }, +{ 0x1423, 0x1423, 0x1423 }, +{ 0x1424, 0x1424, 0x1424 }, +{ 0x1425, 0x1425, 0x1425 }, +{ 0x1426, 0x1426, 0x1426 }, +{ 0x1427, 0x1427, 0x1427 }, +{ 0x1428, 0x1428, 0x1428 }, +{ 0x1429, 0x1429, 0x1429 }, +{ 0x142A, 0x142A, 0x142A }, +{ 0x142B, 0x142B, 0x142B }, +{ 0x142C, 0x142C, 0x142C }, +{ 0x142D, 0x142D, 0x142D }, +{ 0x142E, 0x142E, 0x142E }, +{ 0x142F, 0x142F, 0x142F }, +{ 0x1430, 0x1430, 0x1430 }, +{ 0x1431, 0x1431, 0x1431 }, +{ 0x1432, 0x1432, 0x1432 }, +{ 0x1433, 0x1433, 0x1433 }, +{ 0x1434, 0x1434, 0x1434 }, +{ 0x1435, 0x1435, 0x1435 }, +{ 0x1436, 0x1436, 0x1436 }, +{ 0x1437, 0x1437, 0x1437 }, +{ 0x1438, 0x1438, 0x1438 }, +{ 0x1439, 0x1439, 0x1439 }, +{ 0x143A, 0x143A, 0x143A }, +{ 0x143B, 0x143B, 0x143B }, +{ 0x143C, 0x143C, 0x143C }, +{ 0x143D, 0x143D, 0x143D }, +{ 0x143E, 0x143E, 0x143E }, +{ 0x143F, 0x143F, 0x143F }, +{ 0x1440, 0x1440, 0x1440 }, +{ 0x1441, 0x1441, 0x1441 }, +{ 0x1442, 0x1442, 0x1442 }, +{ 0x1443, 0x1443, 0x1443 }, +{ 0x1444, 0x1444, 0x1444 }, +{ 0x1445, 0x1445, 0x1445 }, +{ 0x1446, 0x1446, 0x1446 }, +{ 0x1447, 0x1447, 0x1447 }, +{ 0x1448, 0x1448, 0x1448 }, +{ 0x1449, 0x1449, 0x1449 }, +{ 0x144A, 0x144A, 0x144A }, +{ 0x144B, 0x144B, 0x144B }, +{ 0x144C, 0x144C, 0x144C }, +{ 0x144D, 0x144D, 0x144D }, +{ 0x144E, 0x144E, 0x144E }, +{ 0x144F, 0x144F, 0x144F }, +{ 0x1450, 0x1450, 0x1450 }, +{ 0x1451, 0x1451, 0x1451 }, +{ 0x1452, 0x1452, 0x1452 }, +{ 0x1453, 0x1453, 0x1453 }, +{ 0x1454, 0x1454, 0x1454 }, +{ 0x1455, 0x1455, 0x1455 }, +{ 0x1456, 0x1456, 0x1456 }, +{ 0x1457, 0x1457, 0x1457 }, +{ 0x1458, 0x1458, 0x1458 }, +{ 0x1459, 0x1459, 0x1459 }, +{ 0x145A, 0x145A, 0x145A }, +{ 0x145B, 0x145B, 0x145B }, +{ 0x145C, 0x145C, 0x145C }, +{ 0x145D, 0x145D, 0x145D }, +{ 0x145E, 0x145E, 0x145E }, +{ 0x145F, 0x145F, 0x145F }, +{ 0x1460, 0x1460, 0x1460 }, +{ 0x1461, 0x1461, 0x1461 }, +{ 0x1462, 0x1462, 0x1462 }, +{ 0x1463, 0x1463, 0x1463 }, +{ 0x1464, 0x1464, 0x1464 }, +{ 0x1465, 0x1465, 0x1465 }, +{ 0x1466, 0x1466, 0x1466 }, +{ 0x1467, 0x1467, 0x1467 }, +{ 0x1468, 0x1468, 0x1468 }, +{ 0x1469, 0x1469, 0x1469 }, +{ 0x146A, 0x146A, 0x146A }, +{ 0x146B, 0x146B, 0x146B }, +{ 0x146C, 0x146C, 0x146C }, +{ 0x146D, 0x146D, 0x146D }, +{ 0x146E, 0x146E, 0x146E }, +{ 0x146F, 0x146F, 0x146F }, +{ 0x1470, 0x1470, 0x1470 }, +{ 0x1471, 0x1471, 0x1471 }, +{ 0x1472, 0x1472, 0x1472 }, +{ 0x1473, 0x1473, 0x1473 }, +{ 0x1474, 0x1474, 0x1474 }, +{ 0x1475, 0x1475, 0x1475 }, +{ 0x1476, 0x1476, 0x1476 }, +{ 0x1477, 0x1477, 0x1477 }, +{ 0x1478, 0x1478, 0x1478 }, +{ 0x1479, 0x1479, 0x1479 }, +{ 0x147A, 0x147A, 0x147A }, +{ 0x147B, 0x147B, 0x147B }, +{ 0x147C, 0x147C, 0x147C }, +{ 0x147D, 0x147D, 0x147D }, +{ 0x147E, 0x147E, 0x147E }, +{ 0x147F, 0x147F, 0x147F }, +{ 0x1480, 0x1480, 0x1480 }, +{ 0x1481, 0x1481, 0x1481 }, +{ 0x1482, 0x1482, 0x1482 }, +{ 0x1483, 0x1483, 0x1483 }, +{ 0x1484, 0x1484, 0x1484 }, +{ 0x1485, 0x1485, 0x1485 }, +{ 0x1486, 0x1486, 0x1486 }, +{ 0x1487, 0x1487, 0x1487 }, +{ 0x1488, 0x1488, 0x1488 }, +{ 0x1489, 0x1489, 0x1489 }, +{ 0x148A, 0x148A, 0x148A }, +{ 0x148B, 0x148B, 0x148B }, +{ 0x148C, 0x148C, 0x148C }, +{ 0x148D, 0x148D, 0x148D }, +{ 0x148E, 0x148E, 0x148E }, +{ 0x148F, 0x148F, 0x148F }, +{ 0x1490, 0x1490, 0x1490 }, +{ 0x1491, 0x1491, 0x1491 }, +{ 0x1492, 0x1492, 0x1492 }, +{ 0x1493, 0x1493, 0x1493 }, +{ 0x1494, 0x1494, 0x1494 }, +{ 0x1495, 0x1495, 0x1495 }, +{ 0x1496, 0x1496, 0x1496 }, +{ 0x1497, 0x1497, 0x1497 }, +{ 0x1498, 0x1498, 0x1498 }, +{ 0x1499, 0x1499, 0x1499 }, +{ 0x149A, 0x149A, 0x149A }, +{ 0x149B, 0x149B, 0x149B }, +{ 0x149C, 0x149C, 0x149C }, +{ 0x149D, 0x149D, 0x149D }, +{ 0x149E, 0x149E, 0x149E }, +{ 0x149F, 0x149F, 0x149F }, +{ 0x14A0, 0x14A0, 0x14A0 }, +{ 0x14A1, 0x14A1, 0x14A1 }, +{ 0x14A2, 0x14A2, 0x14A2 }, +{ 0x14A3, 0x14A3, 0x14A3 }, +{ 0x14A4, 0x14A4, 0x14A4 }, +{ 0x14A5, 0x14A5, 0x14A5 }, +{ 0x14A6, 0x14A6, 0x14A6 }, +{ 0x14A7, 0x14A7, 0x14A7 }, +{ 0x14A8, 0x14A8, 0x14A8 }, +{ 0x14A9, 0x14A9, 0x14A9 }, +{ 0x14AA, 0x14AA, 0x14AA }, +{ 0x14AB, 0x14AB, 0x14AB }, +{ 0x14AC, 0x14AC, 0x14AC }, +{ 0x14AD, 0x14AD, 0x14AD }, +{ 0x14AE, 0x14AE, 0x14AE }, +{ 0x14AF, 0x14AF, 0x14AF }, +{ 0x14B0, 0x14B0, 0x14B0 }, +{ 0x14B1, 0x14B1, 0x14B1 }, +{ 0x14B2, 0x14B2, 0x14B2 }, +{ 0x14B3, 0x14B3, 0x14B3 }, +{ 0x14B4, 0x14B4, 0x14B4 }, +{ 0x14B5, 0x14B5, 0x14B5 }, +{ 0x14B6, 0x14B6, 0x14B6 }, +{ 0x14B7, 0x14B7, 0x14B7 }, +{ 0x14B8, 0x14B8, 0x14B8 }, +{ 0x14B9, 0x14B9, 0x14B9 }, +{ 0x14BA, 0x14BA, 0x14BA }, +{ 0x14BB, 0x14BB, 0x14BB }, +{ 0x14BC, 0x14BC, 0x14BC }, +{ 0x14BD, 0x14BD, 0x14BD }, +{ 0x14BE, 0x14BE, 0x14BE }, +{ 0x14BF, 0x14BF, 0x14BF }, +{ 0x14C0, 0x14C0, 0x14C0 }, +{ 0x14C1, 0x14C1, 0x14C1 }, +{ 0x14C2, 0x14C2, 0x14C2 }, +{ 0x14C3, 0x14C3, 0x14C3 }, +{ 0x14C4, 0x14C4, 0x14C4 }, +{ 0x14C5, 0x14C5, 0x14C5 }, +{ 0x14C6, 0x14C6, 0x14C6 }, +{ 0x14C7, 0x14C7, 0x14C7 }, +{ 0x14C8, 0x14C8, 0x14C8 }, +{ 0x14C9, 0x14C9, 0x14C9 }, +{ 0x14CA, 0x14CA, 0x14CA }, +{ 0x14CB, 0x14CB, 0x14CB }, +{ 0x14CC, 0x14CC, 0x14CC }, +{ 0x14CD, 0x14CD, 0x14CD }, +{ 0x14CE, 0x14CE, 0x14CE }, +{ 0x14CF, 0x14CF, 0x14CF }, +{ 0x14D0, 0x14D0, 0x14D0 }, +{ 0x14D1, 0x14D1, 0x14D1 }, +{ 0x14D2, 0x14D2, 0x14D2 }, +{ 0x14D3, 0x14D3, 0x14D3 }, +{ 0x14D4, 0x14D4, 0x14D4 }, +{ 0x14D5, 0x14D5, 0x14D5 }, +{ 0x14D6, 0x14D6, 0x14D6 }, +{ 0x14D7, 0x14D7, 0x14D7 }, +{ 0x14D8, 0x14D8, 0x14D8 }, +{ 0x14D9, 0x14D9, 0x14D9 }, +{ 0x14DA, 0x14DA, 0x14DA }, +{ 0x14DB, 0x14DB, 0x14DB }, +{ 0x14DC, 0x14DC, 0x14DC }, +{ 0x14DD, 0x14DD, 0x14DD }, +{ 0x14DE, 0x14DE, 0x14DE }, +{ 0x14DF, 0x14DF, 0x14DF }, +{ 0x14E0, 0x14E0, 0x14E0 }, +{ 0x14E1, 0x14E1, 0x14E1 }, +{ 0x14E2, 0x14E2, 0x14E2 }, +{ 0x14E3, 0x14E3, 0x14E3 }, +{ 0x14E4, 0x14E4, 0x14E4 }, +{ 0x14E5, 0x14E5, 0x14E5 }, +{ 0x14E6, 0x14E6, 0x14E6 }, +{ 0x14E7, 0x14E7, 0x14E7 }, +{ 0x14E8, 0x14E8, 0x14E8 }, +{ 0x14E9, 0x14E9, 0x14E9 }, +{ 0x14EA, 0x14EA, 0x14EA }, +{ 0x14EB, 0x14EB, 0x14EB }, +{ 0x14EC, 0x14EC, 0x14EC }, +{ 0x14ED, 0x14ED, 0x14ED }, +{ 0x14EE, 0x14EE, 0x14EE }, +{ 0x14EF, 0x14EF, 0x14EF }, +{ 0x14F0, 0x14F0, 0x14F0 }, +{ 0x14F1, 0x14F1, 0x14F1 }, +{ 0x14F2, 0x14F2, 0x14F2 }, +{ 0x14F3, 0x14F3, 0x14F3 }, +{ 0x14F4, 0x14F4, 0x14F4 }, +{ 0x14F5, 0x14F5, 0x14F5 }, +{ 0x14F6, 0x14F6, 0x14F6 }, +{ 0x14F7, 0x14F7, 0x14F7 }, +{ 0x14F8, 0x14F8, 0x14F8 }, +{ 0x14F9, 0x14F9, 0x14F9 }, +{ 0x14FA, 0x14FA, 0x14FA }, +{ 0x14FB, 0x14FB, 0x14FB }, +{ 0x14FC, 0x14FC, 0x14FC }, +{ 0x14FD, 0x14FD, 0x14FD }, +{ 0x14FE, 0x14FE, 0x14FE }, +{ 0x14FF, 0x14FF, 0x14FF }, +{ 0x1500, 0x1500, 0x1500 }, +{ 0x1501, 0x1501, 0x1501 }, +{ 0x1502, 0x1502, 0x1502 }, +{ 0x1503, 0x1503, 0x1503 }, +{ 0x1504, 0x1504, 0x1504 }, +{ 0x1505, 0x1505, 0x1505 }, +{ 0x1506, 0x1506, 0x1506 }, +{ 0x1507, 0x1507, 0x1507 }, +{ 0x1508, 0x1508, 0x1508 }, +{ 0x1509, 0x1509, 0x1509 }, +{ 0x150A, 0x150A, 0x150A }, +{ 0x150B, 0x150B, 0x150B }, +{ 0x150C, 0x150C, 0x150C }, +{ 0x150D, 0x150D, 0x150D }, +{ 0x150E, 0x150E, 0x150E }, +{ 0x150F, 0x150F, 0x150F }, +{ 0x1510, 0x1510, 0x1510 }, +{ 0x1511, 0x1511, 0x1511 }, +{ 0x1512, 0x1512, 0x1512 }, +{ 0x1513, 0x1513, 0x1513 }, +{ 0x1514, 0x1514, 0x1514 }, +{ 0x1515, 0x1515, 0x1515 }, +{ 0x1516, 0x1516, 0x1516 }, +{ 0x1517, 0x1517, 0x1517 }, +{ 0x1518, 0x1518, 0x1518 }, +{ 0x1519, 0x1519, 0x1519 }, +{ 0x151A, 0x151A, 0x151A }, +{ 0x151B, 0x151B, 0x151B }, +{ 0x151C, 0x151C, 0x151C }, +{ 0x151D, 0x151D, 0x151D }, +{ 0x151E, 0x151E, 0x151E }, +{ 0x151F, 0x151F, 0x151F }, +{ 0x1520, 0x1520, 0x1520 }, +{ 0x1521, 0x1521, 0x1521 }, +{ 0x1522, 0x1522, 0x1522 }, +{ 0x1523, 0x1523, 0x1523 }, +{ 0x1524, 0x1524, 0x1524 }, +{ 0x1525, 0x1525, 0x1525 }, +{ 0x1526, 0x1526, 0x1526 }, +{ 0x1527, 0x1527, 0x1527 }, +{ 0x1528, 0x1528, 0x1528 }, +{ 0x1529, 0x1529, 0x1529 }, +{ 0x152A, 0x152A, 0x152A }, +{ 0x152B, 0x152B, 0x152B }, +{ 0x152C, 0x152C, 0x152C }, +{ 0x152D, 0x152D, 0x152D }, +{ 0x152E, 0x152E, 0x152E }, +{ 0x152F, 0x152F, 0x152F }, +{ 0x1530, 0x1530, 0x1530 }, +{ 0x1531, 0x1531, 0x1531 }, +{ 0x1532, 0x1532, 0x1532 }, +{ 0x1533, 0x1533, 0x1533 }, +{ 0x1534, 0x1534, 0x1534 }, +{ 0x1535, 0x1535, 0x1535 }, +{ 0x1536, 0x1536, 0x1536 }, +{ 0x1537, 0x1537, 0x1537 }, +{ 0x1538, 0x1538, 0x1538 }, +{ 0x1539, 0x1539, 0x1539 }, +{ 0x153A, 0x153A, 0x153A }, +{ 0x153B, 0x153B, 0x153B }, +{ 0x153C, 0x153C, 0x153C }, +{ 0x153D, 0x153D, 0x153D }, +{ 0x153E, 0x153E, 0x153E }, +{ 0x153F, 0x153F, 0x153F }, +{ 0x1540, 0x1540, 0x1540 }, +{ 0x1541, 0x1541, 0x1541 }, +{ 0x1542, 0x1542, 0x1542 }, +{ 0x1543, 0x1543, 0x1543 }, +{ 0x1544, 0x1544, 0x1544 }, +{ 0x1545, 0x1545, 0x1545 }, +{ 0x1546, 0x1546, 0x1546 }, +{ 0x1547, 0x1547, 0x1547 }, +{ 0x1548, 0x1548, 0x1548 }, +{ 0x1549, 0x1549, 0x1549 }, +{ 0x154A, 0x154A, 0x154A }, +{ 0x154B, 0x154B, 0x154B }, +{ 0x154C, 0x154C, 0x154C }, +{ 0x154D, 0x154D, 0x154D }, +{ 0x154E, 0x154E, 0x154E }, +{ 0x154F, 0x154F, 0x154F }, +{ 0x1550, 0x1550, 0x1550 }, +{ 0x1551, 0x1551, 0x1551 }, +{ 0x1552, 0x1552, 0x1552 }, +{ 0x1553, 0x1553, 0x1553 }, +{ 0x1554, 0x1554, 0x1554 }, +{ 0x1555, 0x1555, 0x1555 }, +{ 0x1556, 0x1556, 0x1556 }, +{ 0x1557, 0x1557, 0x1557 }, +{ 0x1558, 0x1558, 0x1558 }, +{ 0x1559, 0x1559, 0x1559 }, +{ 0x155A, 0x155A, 0x155A }, +{ 0x155B, 0x155B, 0x155B }, +{ 0x155C, 0x155C, 0x155C }, +{ 0x155D, 0x155D, 0x155D }, +{ 0x155E, 0x155E, 0x155E }, +{ 0x155F, 0x155F, 0x155F }, +{ 0x1560, 0x1560, 0x1560 }, +{ 0x1561, 0x1561, 0x1561 }, +{ 0x1562, 0x1562, 0x1562 }, +{ 0x1563, 0x1563, 0x1563 }, +{ 0x1564, 0x1564, 0x1564 }, +{ 0x1565, 0x1565, 0x1565 }, +{ 0x1566, 0x1566, 0x1566 }, +{ 0x1567, 0x1567, 0x1567 }, +{ 0x1568, 0x1568, 0x1568 }, +{ 0x1569, 0x1569, 0x1569 }, +{ 0x156A, 0x156A, 0x156A }, +{ 0x156B, 0x156B, 0x156B }, +{ 0x156C, 0x156C, 0x156C }, +{ 0x156D, 0x156D, 0x156D }, +{ 0x156E, 0x156E, 0x156E }, +{ 0x156F, 0x156F, 0x156F }, +{ 0x1570, 0x1570, 0x1570 }, +{ 0x1571, 0x1571, 0x1571 }, +{ 0x1572, 0x1572, 0x1572 }, +{ 0x1573, 0x1573, 0x1573 }, +{ 0x1574, 0x1574, 0x1574 }, +{ 0x1575, 0x1575, 0x1575 }, +{ 0x1576, 0x1576, 0x1576 }, +{ 0x1577, 0x1577, 0x1577 }, +{ 0x1578, 0x1578, 0x1578 }, +{ 0x1579, 0x1579, 0x1579 }, +{ 0x157A, 0x157A, 0x157A }, +{ 0x157B, 0x157B, 0x157B }, +{ 0x157C, 0x157C, 0x157C }, +{ 0x157D, 0x157D, 0x157D }, +{ 0x157E, 0x157E, 0x157E }, +{ 0x157F, 0x157F, 0x157F }, +{ 0x1580, 0x1580, 0x1580 }, +{ 0x1581, 0x1581, 0x1581 }, +{ 0x1582, 0x1582, 0x1582 }, +{ 0x1583, 0x1583, 0x1583 }, +{ 0x1584, 0x1584, 0x1584 }, +{ 0x1585, 0x1585, 0x1585 }, +{ 0x1586, 0x1586, 0x1586 }, +{ 0x1587, 0x1587, 0x1587 }, +{ 0x1588, 0x1588, 0x1588 }, +{ 0x1589, 0x1589, 0x1589 }, +{ 0x158A, 0x158A, 0x158A }, +{ 0x158B, 0x158B, 0x158B }, +{ 0x158C, 0x158C, 0x158C }, +{ 0x158D, 0x158D, 0x158D }, +{ 0x158E, 0x158E, 0x158E }, +{ 0x158F, 0x158F, 0x158F }, +{ 0x1590, 0x1590, 0x1590 }, +{ 0x1591, 0x1591, 0x1591 }, +{ 0x1592, 0x1592, 0x1592 }, +{ 0x1593, 0x1593, 0x1593 }, +{ 0x1594, 0x1594, 0x1594 }, +{ 0x1595, 0x1595, 0x1595 }, +{ 0x1596, 0x1596, 0x1596 }, +{ 0x1597, 0x1597, 0x1597 }, +{ 0x1598, 0x1598, 0x1598 }, +{ 0x1599, 0x1599, 0x1599 }, +{ 0x159A, 0x159A, 0x159A }, +{ 0x159B, 0x159B, 0x159B }, +{ 0x159C, 0x159C, 0x159C }, +{ 0x159D, 0x159D, 0x159D }, +{ 0x159E, 0x159E, 0x159E }, +{ 0x159F, 0x159F, 0x159F }, +{ 0x15A0, 0x15A0, 0x15A0 }, +{ 0x15A1, 0x15A1, 0x15A1 }, +{ 0x15A2, 0x15A2, 0x15A2 }, +{ 0x15A3, 0x15A3, 0x15A3 }, +{ 0x15A4, 0x15A4, 0x15A4 }, +{ 0x15A5, 0x15A5, 0x15A5 }, +{ 0x15A6, 0x15A6, 0x15A6 }, +{ 0x15A7, 0x15A7, 0x15A7 }, +{ 0x15A8, 0x15A8, 0x15A8 }, +{ 0x15A9, 0x15A9, 0x15A9 }, +{ 0x15AA, 0x15AA, 0x15AA }, +{ 0x15AB, 0x15AB, 0x15AB }, +{ 0x15AC, 0x15AC, 0x15AC }, +{ 0x15AD, 0x15AD, 0x15AD }, +{ 0x15AE, 0x15AE, 0x15AE }, +{ 0x15AF, 0x15AF, 0x15AF }, +{ 0x15B0, 0x15B0, 0x15B0 }, +{ 0x15B1, 0x15B1, 0x15B1 }, +{ 0x15B2, 0x15B2, 0x15B2 }, +{ 0x15B3, 0x15B3, 0x15B3 }, +{ 0x15B4, 0x15B4, 0x15B4 }, +{ 0x15B5, 0x15B5, 0x15B5 }, +{ 0x15B6, 0x15B6, 0x15B6 }, +{ 0x15B7, 0x15B7, 0x15B7 }, +{ 0x15B8, 0x15B8, 0x15B8 }, +{ 0x15B9, 0x15B9, 0x15B9 }, +{ 0x15BA, 0x15BA, 0x15BA }, +{ 0x15BB, 0x15BB, 0x15BB }, +{ 0x15BC, 0x15BC, 0x15BC }, +{ 0x15BD, 0x15BD, 0x15BD }, +{ 0x15BE, 0x15BE, 0x15BE }, +{ 0x15BF, 0x15BF, 0x15BF }, +{ 0x15C0, 0x15C0, 0x15C0 }, +{ 0x15C1, 0x15C1, 0x15C1 }, +{ 0x15C2, 0x15C2, 0x15C2 }, +{ 0x15C3, 0x15C3, 0x15C3 }, +{ 0x15C4, 0x15C4, 0x15C4 }, +{ 0x15C5, 0x15C5, 0x15C5 }, +{ 0x15C6, 0x15C6, 0x15C6 }, +{ 0x15C7, 0x15C7, 0x15C7 }, +{ 0x15C8, 0x15C8, 0x15C8 }, +{ 0x15C9, 0x15C9, 0x15C9 }, +{ 0x15CA, 0x15CA, 0x15CA }, +{ 0x15CB, 0x15CB, 0x15CB }, +{ 0x15CC, 0x15CC, 0x15CC }, +{ 0x15CD, 0x15CD, 0x15CD }, +{ 0x15CE, 0x15CE, 0x15CE }, +{ 0x15CF, 0x15CF, 0x15CF }, +{ 0x15D0, 0x15D0, 0x15D0 }, +{ 0x15D1, 0x15D1, 0x15D1 }, +{ 0x15D2, 0x15D2, 0x15D2 }, +{ 0x15D3, 0x15D3, 0x15D3 }, +{ 0x15D4, 0x15D4, 0x15D4 }, +{ 0x15D5, 0x15D5, 0x15D5 }, +{ 0x15D6, 0x15D6, 0x15D6 }, +{ 0x15D7, 0x15D7, 0x15D7 }, +{ 0x15D8, 0x15D8, 0x15D8 }, +{ 0x15D9, 0x15D9, 0x15D9 }, +{ 0x15DA, 0x15DA, 0x15DA }, +{ 0x15DB, 0x15DB, 0x15DB }, +{ 0x15DC, 0x15DC, 0x15DC }, +{ 0x15DD, 0x15DD, 0x15DD }, +{ 0x15DE, 0x15DE, 0x15DE }, +{ 0x15DF, 0x15DF, 0x15DF }, +{ 0x15E0, 0x15E0, 0x15E0 }, +{ 0x15E1, 0x15E1, 0x15E1 }, +{ 0x15E2, 0x15E2, 0x15E2 }, +{ 0x15E3, 0x15E3, 0x15E3 }, +{ 0x15E4, 0x15E4, 0x15E4 }, +{ 0x15E5, 0x15E5, 0x15E5 }, +{ 0x15E6, 0x15E6, 0x15E6 }, +{ 0x15E7, 0x15E7, 0x15E7 }, +{ 0x15E8, 0x15E8, 0x15E8 }, +{ 0x15E9, 0x15E9, 0x15E9 }, +{ 0x15EA, 0x15EA, 0x15EA }, +{ 0x15EB, 0x15EB, 0x15EB }, +{ 0x15EC, 0x15EC, 0x15EC }, +{ 0x15ED, 0x15ED, 0x15ED }, +{ 0x15EE, 0x15EE, 0x15EE }, +{ 0x15EF, 0x15EF, 0x15EF }, +{ 0x15F0, 0x15F0, 0x15F0 }, +{ 0x15F1, 0x15F1, 0x15F1 }, +{ 0x15F2, 0x15F2, 0x15F2 }, +{ 0x15F3, 0x15F3, 0x15F3 }, +{ 0x15F4, 0x15F4, 0x15F4 }, +{ 0x15F5, 0x15F5, 0x15F5 }, +{ 0x15F6, 0x15F6, 0x15F6 }, +{ 0x15F7, 0x15F7, 0x15F7 }, +{ 0x15F8, 0x15F8, 0x15F8 }, +{ 0x15F9, 0x15F9, 0x15F9 }, +{ 0x15FA, 0x15FA, 0x15FA }, +{ 0x15FB, 0x15FB, 0x15FB }, +{ 0x15FC, 0x15FC, 0x15FC }, +{ 0x15FD, 0x15FD, 0x15FD }, +{ 0x15FE, 0x15FE, 0x15FE }, +{ 0x15FF, 0x15FF, 0x15FF }, +{ 0x1600, 0x1600, 0x1600 }, +{ 0x1601, 0x1601, 0x1601 }, +{ 0x1602, 0x1602, 0x1602 }, +{ 0x1603, 0x1603, 0x1603 }, +{ 0x1604, 0x1604, 0x1604 }, +{ 0x1605, 0x1605, 0x1605 }, +{ 0x1606, 0x1606, 0x1606 }, +{ 0x1607, 0x1607, 0x1607 }, +{ 0x1608, 0x1608, 0x1608 }, +{ 0x1609, 0x1609, 0x1609 }, +{ 0x160A, 0x160A, 0x160A }, +{ 0x160B, 0x160B, 0x160B }, +{ 0x160C, 0x160C, 0x160C }, +{ 0x160D, 0x160D, 0x160D }, +{ 0x160E, 0x160E, 0x160E }, +{ 0x160F, 0x160F, 0x160F }, +{ 0x1610, 0x1610, 0x1610 }, +{ 0x1611, 0x1611, 0x1611 }, +{ 0x1612, 0x1612, 0x1612 }, +{ 0x1613, 0x1613, 0x1613 }, +{ 0x1614, 0x1614, 0x1614 }, +{ 0x1615, 0x1615, 0x1615 }, +{ 0x1616, 0x1616, 0x1616 }, +{ 0x1617, 0x1617, 0x1617 }, +{ 0x1618, 0x1618, 0x1618 }, +{ 0x1619, 0x1619, 0x1619 }, +{ 0x161A, 0x161A, 0x161A }, +{ 0x161B, 0x161B, 0x161B }, +{ 0x161C, 0x161C, 0x161C }, +{ 0x161D, 0x161D, 0x161D }, +{ 0x161E, 0x161E, 0x161E }, +{ 0x161F, 0x161F, 0x161F }, +{ 0x1620, 0x1620, 0x1620 }, +{ 0x1621, 0x1621, 0x1621 }, +{ 0x1622, 0x1622, 0x1622 }, +{ 0x1623, 0x1623, 0x1623 }, +{ 0x1624, 0x1624, 0x1624 }, +{ 0x1625, 0x1625, 0x1625 }, +{ 0x1626, 0x1626, 0x1626 }, +{ 0x1627, 0x1627, 0x1627 }, +{ 0x1628, 0x1628, 0x1628 }, +{ 0x1629, 0x1629, 0x1629 }, +{ 0x162A, 0x162A, 0x162A }, +{ 0x162B, 0x162B, 0x162B }, +{ 0x162C, 0x162C, 0x162C }, +{ 0x162D, 0x162D, 0x162D }, +{ 0x162E, 0x162E, 0x162E }, +{ 0x162F, 0x162F, 0x162F }, +{ 0x1630, 0x1630, 0x1630 }, +{ 0x1631, 0x1631, 0x1631 }, +{ 0x1632, 0x1632, 0x1632 }, +{ 0x1633, 0x1633, 0x1633 }, +{ 0x1634, 0x1634, 0x1634 }, +{ 0x1635, 0x1635, 0x1635 }, +{ 0x1636, 0x1636, 0x1636 }, +{ 0x1637, 0x1637, 0x1637 }, +{ 0x1638, 0x1638, 0x1638 }, +{ 0x1639, 0x1639, 0x1639 }, +{ 0x163A, 0x163A, 0x163A }, +{ 0x163B, 0x163B, 0x163B }, +{ 0x163C, 0x163C, 0x163C }, +{ 0x163D, 0x163D, 0x163D }, +{ 0x163E, 0x163E, 0x163E }, +{ 0x163F, 0x163F, 0x163F }, +{ 0x1640, 0x1640, 0x1640 }, +{ 0x1641, 0x1641, 0x1641 }, +{ 0x1642, 0x1642, 0x1642 }, +{ 0x1643, 0x1643, 0x1643 }, +{ 0x1644, 0x1644, 0x1644 }, +{ 0x1645, 0x1645, 0x1645 }, +{ 0x1646, 0x1646, 0x1646 }, +{ 0x1647, 0x1647, 0x1647 }, +{ 0x1648, 0x1648, 0x1648 }, +{ 0x1649, 0x1649, 0x1649 }, +{ 0x164A, 0x164A, 0x164A }, +{ 0x164B, 0x164B, 0x164B }, +{ 0x164C, 0x164C, 0x164C }, +{ 0x164D, 0x164D, 0x164D }, +{ 0x164E, 0x164E, 0x164E }, +{ 0x164F, 0x164F, 0x164F }, +{ 0x1650, 0x1650, 0x1650 }, +{ 0x1651, 0x1651, 0x1651 }, +{ 0x1652, 0x1652, 0x1652 }, +{ 0x1653, 0x1653, 0x1653 }, +{ 0x1654, 0x1654, 0x1654 }, +{ 0x1655, 0x1655, 0x1655 }, +{ 0x1656, 0x1656, 0x1656 }, +{ 0x1657, 0x1657, 0x1657 }, +{ 0x1658, 0x1658, 0x1658 }, +{ 0x1659, 0x1659, 0x1659 }, +{ 0x165A, 0x165A, 0x165A }, +{ 0x165B, 0x165B, 0x165B }, +{ 0x165C, 0x165C, 0x165C }, +{ 0x165D, 0x165D, 0x165D }, +{ 0x165E, 0x165E, 0x165E }, +{ 0x165F, 0x165F, 0x165F }, +{ 0x1660, 0x1660, 0x1660 }, +{ 0x1661, 0x1661, 0x1661 }, +{ 0x1662, 0x1662, 0x1662 }, +{ 0x1663, 0x1663, 0x1663 }, +{ 0x1664, 0x1664, 0x1664 }, +{ 0x1665, 0x1665, 0x1665 }, +{ 0x1666, 0x1666, 0x1666 }, +{ 0x1667, 0x1667, 0x1667 }, +{ 0x1668, 0x1668, 0x1668 }, +{ 0x1669, 0x1669, 0x1669 }, +{ 0x166A, 0x166A, 0x166A }, +{ 0x166B, 0x166B, 0x166B }, +{ 0x166C, 0x166C, 0x166C }, +{ 0x166F, 0x166F, 0x166F }, +{ 0x1670, 0x1670, 0x1670 }, +{ 0x1671, 0x1671, 0x1671 }, +{ 0x1672, 0x1672, 0x1672 }, +{ 0x1673, 0x1673, 0x1673 }, +{ 0x1674, 0x1674, 0x1674 }, +{ 0x1675, 0x1675, 0x1675 }, +{ 0x1676, 0x1676, 0x1676 }, +{ 0x1681, 0x1681, 0x1681 }, +{ 0x1682, 0x1682, 0x1682 }, +{ 0x1683, 0x1683, 0x1683 }, +{ 0x1684, 0x1684, 0x1684 }, +{ 0x1685, 0x1685, 0x1685 }, +{ 0x1686, 0x1686, 0x1686 }, +{ 0x1687, 0x1687, 0x1687 }, +{ 0x1688, 0x1688, 0x1688 }, +{ 0x1689, 0x1689, 0x1689 }, +{ 0x168A, 0x168A, 0x168A }, +{ 0x168B, 0x168B, 0x168B }, +{ 0x168C, 0x168C, 0x168C }, +{ 0x168D, 0x168D, 0x168D }, +{ 0x168E, 0x168E, 0x168E }, +{ 0x168F, 0x168F, 0x168F }, +{ 0x1690, 0x1690, 0x1690 }, +{ 0x1691, 0x1691, 0x1691 }, +{ 0x1692, 0x1692, 0x1692 }, +{ 0x1693, 0x1693, 0x1693 }, +{ 0x1694, 0x1694, 0x1694 }, +{ 0x1695, 0x1695, 0x1695 }, +{ 0x1696, 0x1696, 0x1696 }, +{ 0x1697, 0x1697, 0x1697 }, +{ 0x1698, 0x1698, 0x1698 }, +{ 0x1699, 0x1699, 0x1699 }, +{ 0x169A, 0x169A, 0x169A }, +{ 0x16A0, 0x16A0, 0x16A0 }, +{ 0x16A1, 0x16A1, 0x16A1 }, +{ 0x16A2, 0x16A2, 0x16A2 }, +{ 0x16A3, 0x16A3, 0x16A3 }, +{ 0x16A4, 0x16A4, 0x16A4 }, +{ 0x16A5, 0x16A5, 0x16A5 }, +{ 0x16A6, 0x16A6, 0x16A6 }, +{ 0x16A7, 0x16A7, 0x16A7 }, +{ 0x16A8, 0x16A8, 0x16A8 }, +{ 0x16A9, 0x16A9, 0x16A9 }, +{ 0x16AA, 0x16AA, 0x16AA }, +{ 0x16AB, 0x16AB, 0x16AB }, +{ 0x16AC, 0x16AC, 0x16AC }, +{ 0x16AD, 0x16AD, 0x16AD }, +{ 0x16AE, 0x16AE, 0x16AE }, +{ 0x16AF, 0x16AF, 0x16AF }, +{ 0x16B0, 0x16B0, 0x16B0 }, +{ 0x16B1, 0x16B1, 0x16B1 }, +{ 0x16B2, 0x16B2, 0x16B2 }, +{ 0x16B3, 0x16B3, 0x16B3 }, +{ 0x16B4, 0x16B4, 0x16B4 }, +{ 0x16B5, 0x16B5, 0x16B5 }, +{ 0x16B6, 0x16B6, 0x16B6 }, +{ 0x16B7, 0x16B7, 0x16B7 }, +{ 0x16B8, 0x16B8, 0x16B8 }, +{ 0x16B9, 0x16B9, 0x16B9 }, +{ 0x16BA, 0x16BA, 0x16BA }, +{ 0x16BB, 0x16BB, 0x16BB }, +{ 0x16BC, 0x16BC, 0x16BC }, +{ 0x16BD, 0x16BD, 0x16BD }, +{ 0x16BE, 0x16BE, 0x16BE }, +{ 0x16BF, 0x16BF, 0x16BF }, +{ 0x16C0, 0x16C0, 0x16C0 }, +{ 0x16C1, 0x16C1, 0x16C1 }, +{ 0x16C2, 0x16C2, 0x16C2 }, +{ 0x16C3, 0x16C3, 0x16C3 }, +{ 0x16C4, 0x16C4, 0x16C4 }, +{ 0x16C5, 0x16C5, 0x16C5 }, +{ 0x16C6, 0x16C6, 0x16C6 }, +{ 0x16C7, 0x16C7, 0x16C7 }, +{ 0x16C8, 0x16C8, 0x16C8 }, +{ 0x16C9, 0x16C9, 0x16C9 }, +{ 0x16CA, 0x16CA, 0x16CA }, +{ 0x16CB, 0x16CB, 0x16CB }, +{ 0x16CC, 0x16CC, 0x16CC }, +{ 0x16CD, 0x16CD, 0x16CD }, +{ 0x16CE, 0x16CE, 0x16CE }, +{ 0x16CF, 0x16CF, 0x16CF }, +{ 0x16D0, 0x16D0, 0x16D0 }, +{ 0x16D1, 0x16D1, 0x16D1 }, +{ 0x16D2, 0x16D2, 0x16D2 }, +{ 0x16D3, 0x16D3, 0x16D3 }, +{ 0x16D4, 0x16D4, 0x16D4 }, +{ 0x16D5, 0x16D5, 0x16D5 }, +{ 0x16D6, 0x16D6, 0x16D6 }, +{ 0x16D7, 0x16D7, 0x16D7 }, +{ 0x16D8, 0x16D8, 0x16D8 }, +{ 0x16D9, 0x16D9, 0x16D9 }, +{ 0x16DA, 0x16DA, 0x16DA }, +{ 0x16DB, 0x16DB, 0x16DB }, +{ 0x16DC, 0x16DC, 0x16DC }, +{ 0x16DD, 0x16DD, 0x16DD }, +{ 0x16DE, 0x16DE, 0x16DE }, +{ 0x16DF, 0x16DF, 0x16DF }, +{ 0x16E0, 0x16E0, 0x16E0 }, +{ 0x16E1, 0x16E1, 0x16E1 }, +{ 0x16E2, 0x16E2, 0x16E2 }, +{ 0x16E3, 0x16E3, 0x16E3 }, +{ 0x16E4, 0x16E4, 0x16E4 }, +{ 0x16E5, 0x16E5, 0x16E5 }, +{ 0x16E6, 0x16E6, 0x16E6 }, +{ 0x16E7, 0x16E7, 0x16E7 }, +{ 0x16E8, 0x16E8, 0x16E8 }, +{ 0x16E9, 0x16E9, 0x16E9 }, +{ 0x16EA, 0x16EA, 0x16EA }, +{ 0x1700, 0x1700, 0x1700 }, +{ 0x1701, 0x1701, 0x1701 }, +{ 0x1702, 0x1702, 0x1702 }, +{ 0x1703, 0x1703, 0x1703 }, +{ 0x1704, 0x1704, 0x1704 }, +{ 0x1705, 0x1705, 0x1705 }, +{ 0x1706, 0x1706, 0x1706 }, +{ 0x1707, 0x1707, 0x1707 }, +{ 0x1708, 0x1708, 0x1708 }, +{ 0x1709, 0x1709, 0x1709 }, +{ 0x170A, 0x170A, 0x170A }, +{ 0x170B, 0x170B, 0x170B }, +{ 0x170C, 0x170C, 0x170C }, +{ 0x170E, 0x170E, 0x170E }, +{ 0x170F, 0x170F, 0x170F }, +{ 0x1710, 0x1710, 0x1710 }, +{ 0x1711, 0x1711, 0x1711 }, +{ 0x1712, 0x1712, 0x1712 }, +{ 0x1713, 0x1713, 0x1713 }, +{ 0x1714, 0x1714, 0x1714 }, +{ 0x1720, 0x1720, 0x1720 }, +{ 0x1721, 0x1721, 0x1721 }, +{ 0x1722, 0x1722, 0x1722 }, +{ 0x1723, 0x1723, 0x1723 }, +{ 0x1724, 0x1724, 0x1724 }, +{ 0x1725, 0x1725, 0x1725 }, +{ 0x1726, 0x1726, 0x1726 }, +{ 0x1727, 0x1727, 0x1727 }, +{ 0x1728, 0x1728, 0x1728 }, +{ 0x1729, 0x1729, 0x1729 }, +{ 0x172A, 0x172A, 0x172A }, +{ 0x172B, 0x172B, 0x172B }, +{ 0x172C, 0x172C, 0x172C }, +{ 0x172D, 0x172D, 0x172D }, +{ 0x172E, 0x172E, 0x172E }, +{ 0x172F, 0x172F, 0x172F }, +{ 0x1730, 0x1730, 0x1730 }, +{ 0x1731, 0x1731, 0x1731 }, +{ 0x1732, 0x1732, 0x1732 }, +{ 0x1733, 0x1733, 0x1733 }, +{ 0x1734, 0x1734, 0x1734 }, +{ 0x1740, 0x1740, 0x1740 }, +{ 0x1741, 0x1741, 0x1741 }, +{ 0x1742, 0x1742, 0x1742 }, +{ 0x1743, 0x1743, 0x1743 }, +{ 0x1744, 0x1744, 0x1744 }, +{ 0x1745, 0x1745, 0x1745 }, +{ 0x1746, 0x1746, 0x1746 }, +{ 0x1747, 0x1747, 0x1747 }, +{ 0x1748, 0x1748, 0x1748 }, +{ 0x1749, 0x1749, 0x1749 }, +{ 0x174A, 0x174A, 0x174A }, +{ 0x174B, 0x174B, 0x174B }, +{ 0x174C, 0x174C, 0x174C }, +{ 0x174D, 0x174D, 0x174D }, +{ 0x174E, 0x174E, 0x174E }, +{ 0x174F, 0x174F, 0x174F }, +{ 0x1750, 0x1750, 0x1750 }, +{ 0x1751, 0x1751, 0x1751 }, +{ 0x1752, 0x1752, 0x1752 }, +{ 0x1753, 0x1753, 0x1753 }, +{ 0x1760, 0x1760, 0x1760 }, +{ 0x1761, 0x1761, 0x1761 }, +{ 0x1762, 0x1762, 0x1762 }, +{ 0x1763, 0x1763, 0x1763 }, +{ 0x1764, 0x1764, 0x1764 }, +{ 0x1765, 0x1765, 0x1765 }, +{ 0x1766, 0x1766, 0x1766 }, +{ 0x1767, 0x1767, 0x1767 }, +{ 0x1768, 0x1768, 0x1768 }, +{ 0x1769, 0x1769, 0x1769 }, +{ 0x176A, 0x176A, 0x176A }, +{ 0x176B, 0x176B, 0x176B }, +{ 0x176C, 0x176C, 0x176C }, +{ 0x176E, 0x176E, 0x176E }, +{ 0x176F, 0x176F, 0x176F }, +{ 0x1770, 0x1770, 0x1770 }, +{ 0x1772, 0x1772, 0x1772 }, +{ 0x1773, 0x1773, 0x1773 }, +{ 0x1780, 0x1780, 0x1780 }, +{ 0x1781, 0x1781, 0x1781 }, +{ 0x1782, 0x1782, 0x1782 }, +{ 0x1783, 0x1783, 0x1783 }, +{ 0x1784, 0x1784, 0x1784 }, +{ 0x1785, 0x1785, 0x1785 }, +{ 0x1786, 0x1786, 0x1786 }, +{ 0x1787, 0x1787, 0x1787 }, +{ 0x1788, 0x1788, 0x1788 }, +{ 0x1789, 0x1789, 0x1789 }, +{ 0x178A, 0x178A, 0x178A }, +{ 0x178B, 0x178B, 0x178B }, +{ 0x178C, 0x178C, 0x178C }, +{ 0x178D, 0x178D, 0x178D }, +{ 0x178E, 0x178E, 0x178E }, +{ 0x178F, 0x178F, 0x178F }, +{ 0x1790, 0x1790, 0x1790 }, +{ 0x1791, 0x1791, 0x1791 }, +{ 0x1792, 0x1792, 0x1792 }, +{ 0x1793, 0x1793, 0x1793 }, +{ 0x1794, 0x1794, 0x1794 }, +{ 0x1795, 0x1795, 0x1795 }, +{ 0x1796, 0x1796, 0x1796 }, +{ 0x1797, 0x1797, 0x1797 }, +{ 0x1798, 0x1798, 0x1798 }, +{ 0x1799, 0x1799, 0x1799 }, +{ 0x179A, 0x179A, 0x179A }, +{ 0x179B, 0x179B, 0x179B }, +{ 0x179C, 0x179C, 0x179C }, +{ 0x179D, 0x179D, 0x179D }, +{ 0x179E, 0x179E, 0x179E }, +{ 0x179F, 0x179F, 0x179F }, +{ 0x17A0, 0x17A0, 0x17A0 }, +{ 0x17A1, 0x17A1, 0x17A1 }, +{ 0x17A2, 0x17A2, 0x17A2 }, +{ 0x17A3, 0x17A3, 0x17A3 }, +{ 0x17A4, 0x17A4, 0x17A4 }, +{ 0x17A5, 0x17A5, 0x17A5 }, +{ 0x17A6, 0x17A6, 0x17A6 }, +{ 0x17A7, 0x17A7, 0x17A7 }, +{ 0x17A8, 0x17A8, 0x17A8 }, +{ 0x17A9, 0x17A9, 0x17A9 }, +{ 0x17AA, 0x17AA, 0x17AA }, +{ 0x17AB, 0x17AB, 0x17AB }, +{ 0x17AC, 0x17AC, 0x17AC }, +{ 0x17AD, 0x17AD, 0x17AD }, +{ 0x17AE, 0x17AE, 0x17AE }, +{ 0x17AF, 0x17AF, 0x17AF }, +{ 0x17B0, 0x17B0, 0x17B0 }, +{ 0x17B1, 0x17B1, 0x17B1 }, +{ 0x17B2, 0x17B2, 0x17B2 }, +{ 0x17B3, 0x17B3, 0x17B3 }, +{ 0x17B7, 0x17B7, 0x17B7 }, +{ 0x17B8, 0x17B8, 0x17B8 }, +{ 0x17B9, 0x17B9, 0x17B9 }, +{ 0x17BA, 0x17BA, 0x17BA }, +{ 0x17BB, 0x17BB, 0x17BB }, +{ 0x17BC, 0x17BC, 0x17BC }, +{ 0x17BD, 0x17BD, 0x17BD }, +{ 0x17C6, 0x17C6, 0x17C6 }, +{ 0x17C9, 0x17C9, 0x17C9 }, +{ 0x17CA, 0x17CA, 0x17CA }, +{ 0x17CB, 0x17CB, 0x17CB }, +{ 0x17CC, 0x17CC, 0x17CC }, +{ 0x17CD, 0x17CD, 0x17CD }, +{ 0x17CE, 0x17CE, 0x17CE }, +{ 0x17CF, 0x17CF, 0x17CF }, +{ 0x17D0, 0x17D0, 0x17D0 }, +{ 0x17D1, 0x17D1, 0x17D1 }, +{ 0x17D2, 0x17D2, 0x17D2 }, +{ 0x17D3, 0x17D3, 0x17D3 }, +{ 0x17D7, 0x17D7, 0x17D7 }, +{ 0x17DC, 0x17DC, 0x17DC }, +{ 0x17DD, 0x17DD, 0x17DD }, +{ 0x180B, 0x180B, 0x180B }, +{ 0x180C, 0x180C, 0x180C }, +{ 0x180D, 0x180D, 0x180D }, +{ 0x1820, 0x1820, 0x1820 }, +{ 0x1821, 0x1821, 0x1821 }, +{ 0x1822, 0x1822, 0x1822 }, +{ 0x1823, 0x1823, 0x1823 }, +{ 0x1824, 0x1824, 0x1824 }, +{ 0x1825, 0x1825, 0x1825 }, +{ 0x1826, 0x1826, 0x1826 }, +{ 0x1827, 0x1827, 0x1827 }, +{ 0x1828, 0x1828, 0x1828 }, +{ 0x1829, 0x1829, 0x1829 }, +{ 0x182A, 0x182A, 0x182A }, +{ 0x182B, 0x182B, 0x182B }, +{ 0x182C, 0x182C, 0x182C }, +{ 0x182D, 0x182D, 0x182D }, +{ 0x182E, 0x182E, 0x182E }, +{ 0x182F, 0x182F, 0x182F }, +{ 0x1830, 0x1830, 0x1830 }, +{ 0x1831, 0x1831, 0x1831 }, +{ 0x1832, 0x1832, 0x1832 }, +{ 0x1833, 0x1833, 0x1833 }, +{ 0x1834, 0x1834, 0x1834 }, +{ 0x1835, 0x1835, 0x1835 }, +{ 0x1836, 0x1836, 0x1836 }, +{ 0x1837, 0x1837, 0x1837 }, +{ 0x1838, 0x1838, 0x1838 }, +{ 0x1839, 0x1839, 0x1839 }, +{ 0x183A, 0x183A, 0x183A }, +{ 0x183B, 0x183B, 0x183B }, +{ 0x183C, 0x183C, 0x183C }, +{ 0x183D, 0x183D, 0x183D }, +{ 0x183E, 0x183E, 0x183E }, +{ 0x183F, 0x183F, 0x183F }, +{ 0x1840, 0x1840, 0x1840 }, +{ 0x1841, 0x1841, 0x1841 }, +{ 0x1842, 0x1842, 0x1842 }, +{ 0x1843, 0x1843, 0x1843 }, +{ 0x1844, 0x1844, 0x1844 }, +{ 0x1845, 0x1845, 0x1845 }, +{ 0x1846, 0x1846, 0x1846 }, +{ 0x1847, 0x1847, 0x1847 }, +{ 0x1848, 0x1848, 0x1848 }, +{ 0x1849, 0x1849, 0x1849 }, +{ 0x184A, 0x184A, 0x184A }, +{ 0x184B, 0x184B, 0x184B }, +{ 0x184C, 0x184C, 0x184C }, +{ 0x184D, 0x184D, 0x184D }, +{ 0x184E, 0x184E, 0x184E }, +{ 0x184F, 0x184F, 0x184F }, +{ 0x1850, 0x1850, 0x1850 }, +{ 0x1851, 0x1851, 0x1851 }, +{ 0x1852, 0x1852, 0x1852 }, +{ 0x1853, 0x1853, 0x1853 }, +{ 0x1854, 0x1854, 0x1854 }, +{ 0x1855, 0x1855, 0x1855 }, +{ 0x1856, 0x1856, 0x1856 }, +{ 0x1857, 0x1857, 0x1857 }, +{ 0x1858, 0x1858, 0x1858 }, +{ 0x1859, 0x1859, 0x1859 }, +{ 0x185A, 0x185A, 0x185A }, +{ 0x185B, 0x185B, 0x185B }, +{ 0x185C, 0x185C, 0x185C }, +{ 0x185D, 0x185D, 0x185D }, +{ 0x185E, 0x185E, 0x185E }, +{ 0x185F, 0x185F, 0x185F }, +{ 0x1860, 0x1860, 0x1860 }, +{ 0x1861, 0x1861, 0x1861 }, +{ 0x1862, 0x1862, 0x1862 }, +{ 0x1863, 0x1863, 0x1863 }, +{ 0x1864, 0x1864, 0x1864 }, +{ 0x1865, 0x1865, 0x1865 }, +{ 0x1866, 0x1866, 0x1866 }, +{ 0x1867, 0x1867, 0x1867 }, +{ 0x1868, 0x1868, 0x1868 }, +{ 0x1869, 0x1869, 0x1869 }, +{ 0x186A, 0x186A, 0x186A }, +{ 0x186B, 0x186B, 0x186B }, +{ 0x186C, 0x186C, 0x186C }, +{ 0x186D, 0x186D, 0x186D }, +{ 0x186E, 0x186E, 0x186E }, +{ 0x186F, 0x186F, 0x186F }, +{ 0x1870, 0x1870, 0x1870 }, +{ 0x1871, 0x1871, 0x1871 }, +{ 0x1872, 0x1872, 0x1872 }, +{ 0x1873, 0x1873, 0x1873 }, +{ 0x1874, 0x1874, 0x1874 }, +{ 0x1875, 0x1875, 0x1875 }, +{ 0x1876, 0x1876, 0x1876 }, +{ 0x1877, 0x1877, 0x1877 }, +{ 0x1880, 0x1880, 0x1880 }, +{ 0x1881, 0x1881, 0x1881 }, +{ 0x1882, 0x1882, 0x1882 }, +{ 0x1883, 0x1883, 0x1883 }, +{ 0x1884, 0x1884, 0x1884 }, +{ 0x1885, 0x1885, 0x1885 }, +{ 0x1886, 0x1886, 0x1886 }, +{ 0x1887, 0x1887, 0x1887 }, +{ 0x1888, 0x1888, 0x1888 }, +{ 0x1889, 0x1889, 0x1889 }, +{ 0x188A, 0x188A, 0x188A }, +{ 0x188B, 0x188B, 0x188B }, +{ 0x188C, 0x188C, 0x188C }, +{ 0x188D, 0x188D, 0x188D }, +{ 0x188E, 0x188E, 0x188E }, +{ 0x188F, 0x188F, 0x188F }, +{ 0x1890, 0x1890, 0x1890 }, +{ 0x1891, 0x1891, 0x1891 }, +{ 0x1892, 0x1892, 0x1892 }, +{ 0x1893, 0x1893, 0x1893 }, +{ 0x1894, 0x1894, 0x1894 }, +{ 0x1895, 0x1895, 0x1895 }, +{ 0x1896, 0x1896, 0x1896 }, +{ 0x1897, 0x1897, 0x1897 }, +{ 0x1898, 0x1898, 0x1898 }, +{ 0x1899, 0x1899, 0x1899 }, +{ 0x189A, 0x189A, 0x189A }, +{ 0x189B, 0x189B, 0x189B }, +{ 0x189C, 0x189C, 0x189C }, +{ 0x189D, 0x189D, 0x189D }, +{ 0x189E, 0x189E, 0x189E }, +{ 0x189F, 0x189F, 0x189F }, +{ 0x18A0, 0x18A0, 0x18A0 }, +{ 0x18A1, 0x18A1, 0x18A1 }, +{ 0x18A2, 0x18A2, 0x18A2 }, +{ 0x18A3, 0x18A3, 0x18A3 }, +{ 0x18A4, 0x18A4, 0x18A4 }, +{ 0x18A5, 0x18A5, 0x18A5 }, +{ 0x18A6, 0x18A6, 0x18A6 }, +{ 0x18A7, 0x18A7, 0x18A7 }, +{ 0x18A8, 0x18A8, 0x18A8 }, +{ 0x18A9, 0x18A9, 0x18A9 }, +{ 0x1900, 0x1900, 0x1900 }, +{ 0x1901, 0x1901, 0x1901 }, +{ 0x1902, 0x1902, 0x1902 }, +{ 0x1903, 0x1903, 0x1903 }, +{ 0x1904, 0x1904, 0x1904 }, +{ 0x1905, 0x1905, 0x1905 }, +{ 0x1906, 0x1906, 0x1906 }, +{ 0x1907, 0x1907, 0x1907 }, +{ 0x1908, 0x1908, 0x1908 }, +{ 0x1909, 0x1909, 0x1909 }, +{ 0x190A, 0x190A, 0x190A }, +{ 0x190B, 0x190B, 0x190B }, +{ 0x190C, 0x190C, 0x190C }, +{ 0x190D, 0x190D, 0x190D }, +{ 0x190E, 0x190E, 0x190E }, +{ 0x190F, 0x190F, 0x190F }, +{ 0x1910, 0x1910, 0x1910 }, +{ 0x1911, 0x1911, 0x1911 }, +{ 0x1912, 0x1912, 0x1912 }, +{ 0x1913, 0x1913, 0x1913 }, +{ 0x1914, 0x1914, 0x1914 }, +{ 0x1915, 0x1915, 0x1915 }, +{ 0x1916, 0x1916, 0x1916 }, +{ 0x1917, 0x1917, 0x1917 }, +{ 0x1918, 0x1918, 0x1918 }, +{ 0x1919, 0x1919, 0x1919 }, +{ 0x191A, 0x191A, 0x191A }, +{ 0x191B, 0x191B, 0x191B }, +{ 0x191C, 0x191C, 0x191C }, +{ 0x1920, 0x1920, 0x1920 }, +{ 0x1921, 0x1921, 0x1921 }, +{ 0x1922, 0x1922, 0x1922 }, +{ 0x1927, 0x1927, 0x1927 }, +{ 0x1928, 0x1928, 0x1928 }, +{ 0x1932, 0x1932, 0x1932 }, +{ 0x1939, 0x1939, 0x1939 }, +{ 0x193A, 0x193A, 0x193A }, +{ 0x193B, 0x193B, 0x193B }, +{ 0x1950, 0x1950, 0x1950 }, +{ 0x1951, 0x1951, 0x1951 }, +{ 0x1952, 0x1952, 0x1952 }, +{ 0x1953, 0x1953, 0x1953 }, +{ 0x1954, 0x1954, 0x1954 }, +{ 0x1955, 0x1955, 0x1955 }, +{ 0x1956, 0x1956, 0x1956 }, +{ 0x1957, 0x1957, 0x1957 }, +{ 0x1958, 0x1958, 0x1958 }, +{ 0x1959, 0x1959, 0x1959 }, +{ 0x195A, 0x195A, 0x195A }, +{ 0x195B, 0x195B, 0x195B }, +{ 0x195C, 0x195C, 0x195C }, +{ 0x195D, 0x195D, 0x195D }, +{ 0x195E, 0x195E, 0x195E }, +{ 0x195F, 0x195F, 0x195F }, +{ 0x1960, 0x1960, 0x1960 }, +{ 0x1961, 0x1961, 0x1961 }, +{ 0x1962, 0x1962, 0x1962 }, +{ 0x1963, 0x1963, 0x1963 }, +{ 0x1964, 0x1964, 0x1964 }, +{ 0x1965, 0x1965, 0x1965 }, +{ 0x1966, 0x1966, 0x1966 }, +{ 0x1967, 0x1967, 0x1967 }, +{ 0x1968, 0x1968, 0x1968 }, +{ 0x1969, 0x1969, 0x1969 }, +{ 0x196A, 0x196A, 0x196A }, +{ 0x196B, 0x196B, 0x196B }, +{ 0x196C, 0x196C, 0x196C }, +{ 0x196D, 0x196D, 0x196D }, +{ 0x1970, 0x1970, 0x1970 }, +{ 0x1971, 0x1971, 0x1971 }, +{ 0x1972, 0x1972, 0x1972 }, +{ 0x1973, 0x1973, 0x1973 }, +{ 0x1974, 0x1974, 0x1974 }, +{ 0x1980, 0x1980, 0x1980 }, +{ 0x1981, 0x1981, 0x1981 }, +{ 0x1982, 0x1982, 0x1982 }, +{ 0x1983, 0x1983, 0x1983 }, +{ 0x1984, 0x1984, 0x1984 }, +{ 0x1985, 0x1985, 0x1985 }, +{ 0x1986, 0x1986, 0x1986 }, +{ 0x1987, 0x1987, 0x1987 }, +{ 0x1988, 0x1988, 0x1988 }, +{ 0x1989, 0x1989, 0x1989 }, +{ 0x198A, 0x198A, 0x198A }, +{ 0x198B, 0x198B, 0x198B }, +{ 0x198C, 0x198C, 0x198C }, +{ 0x198D, 0x198D, 0x198D }, +{ 0x198E, 0x198E, 0x198E }, +{ 0x198F, 0x198F, 0x198F }, +{ 0x1990, 0x1990, 0x1990 }, +{ 0x1991, 0x1991, 0x1991 }, +{ 0x1992, 0x1992, 0x1992 }, +{ 0x1993, 0x1993, 0x1993 }, +{ 0x1994, 0x1994, 0x1994 }, +{ 0x1995, 0x1995, 0x1995 }, +{ 0x1996, 0x1996, 0x1996 }, +{ 0x1997, 0x1997, 0x1997 }, +{ 0x1998, 0x1998, 0x1998 }, +{ 0x1999, 0x1999, 0x1999 }, +{ 0x199A, 0x199A, 0x199A }, +{ 0x199B, 0x199B, 0x199B }, +{ 0x199C, 0x199C, 0x199C }, +{ 0x199D, 0x199D, 0x199D }, +{ 0x199E, 0x199E, 0x199E }, +{ 0x199F, 0x199F, 0x199F }, +{ 0x19A0, 0x19A0, 0x19A0 }, +{ 0x19A1, 0x19A1, 0x19A1 }, +{ 0x19A2, 0x19A2, 0x19A2 }, +{ 0x19A3, 0x19A3, 0x19A3 }, +{ 0x19A4, 0x19A4, 0x19A4 }, +{ 0x19A5, 0x19A5, 0x19A5 }, +{ 0x19A6, 0x19A6, 0x19A6 }, +{ 0x19A7, 0x19A7, 0x19A7 }, +{ 0x19A8, 0x19A8, 0x19A8 }, +{ 0x19A9, 0x19A9, 0x19A9 }, +{ 0x19C1, 0x19C1, 0x19C1 }, +{ 0x19C2, 0x19C2, 0x19C2 }, +{ 0x19C3, 0x19C3, 0x19C3 }, +{ 0x19C4, 0x19C4, 0x19C4 }, +{ 0x19C5, 0x19C5, 0x19C5 }, +{ 0x19C6, 0x19C6, 0x19C6 }, +{ 0x19C7, 0x19C7, 0x19C7 }, +{ 0x1A00, 0x1A00, 0x1A00 }, +{ 0x1A01, 0x1A01, 0x1A01 }, +{ 0x1A02, 0x1A02, 0x1A02 }, +{ 0x1A03, 0x1A03, 0x1A03 }, +{ 0x1A04, 0x1A04, 0x1A04 }, +{ 0x1A05, 0x1A05, 0x1A05 }, +{ 0x1A06, 0x1A06, 0x1A06 }, +{ 0x1A07, 0x1A07, 0x1A07 }, +{ 0x1A08, 0x1A08, 0x1A08 }, +{ 0x1A09, 0x1A09, 0x1A09 }, +{ 0x1A0A, 0x1A0A, 0x1A0A }, +{ 0x1A0B, 0x1A0B, 0x1A0B }, +{ 0x1A0C, 0x1A0C, 0x1A0C }, +{ 0x1A0D, 0x1A0D, 0x1A0D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090, 0x2090 }, +{ 0x2091, 0x2091, 0x2091 }, +{ 0x2092, 0x2092, 0x2092 }, +{ 0x2093, 0x2093, 0x2093 }, +{ 0x2094, 0x2094, 0x2094 }, +{ 0x20D0, 0x20D0, 0x20D0 }, +{ 0x20D1, 0x20D1, 0x20D1 }, +{ 0x20D2, 0x20D2, 0x20D2 }, +{ 0x20D3, 0x20D3, 0x20D3 }, +{ 0x20D4, 0x20D4, 0x20D4 }, +{ 0x20D5, 0x20D5, 0x20D5 }, +{ 0x20D6, 0x20D6, 0x20D6 }, +{ 0x20D7, 0x20D7, 0x20D7 }, +{ 0x20D8, 0x20D8, 0x20D8 }, +{ 0x20D9, 0x20D9, 0x20D9 }, +{ 0x20DA, 0x20DA, 0x20DA }, +{ 0x20DB, 0x20DB, 0x20DB }, +{ 0x20DC, 0x20DC, 0x20DC }, +{ 0x20E1, 0x20E1, 0x20E1 }, +{ 0x20E5, 0x20E5, 0x20E5 }, +{ 0x20E6, 0x20E6, 0x20E6 }, +{ 0x20E7, 0x20E7, 0x20E7 }, +{ 0x20E8, 0x20E8, 0x20E8 }, +{ 0x20E9, 0x20E9, 0x20E9 }, +{ 0x20EA, 0x20EA, 0x20EA }, +{ 0x20EB, 0x20EB, 0x20EB }, +{ 0x2102, 0x2102, 0x2102 }, +{ 0x2107, 0x2107, 0x2107 }, +{ 0x210A, 0x210A, 0x210A }, +{ 0x210B, 0x210B, 0x210B }, +{ 0x210C, 0x210C, 0x210C }, +{ 0x210D, 0x210D, 0x210D }, +{ 0x210E, 0x210E, 0x210E }, +{ 0x210F, 0x210F, 0x210F }, +{ 0x2110, 0x2110, 0x2110 }, +{ 0x2111, 0x2111, 0x2111 }, +{ 0x2112, 0x2112, 0x2112 }, +{ 0x2113, 0x2113, 0x2113 }, +{ 0x2115, 0x2115, 0x2115 }, +{ 0x2119, 0x2119, 0x2119 }, +{ 0x211A, 0x211A, 0x211A }, +{ 0x211B, 0x211B, 0x211B }, +{ 0x211C, 0x211C, 0x211C }, +{ 0x211D, 0x211D, 0x211D }, +{ 0x2124, 0x2124, 0x2124 }, +{ 0x2126, 0x2126, 0x03C9 }, +{ 0x2128, 0x2128, 0x2128 }, +{ 0x212A, 0x212A, 0x006B }, +{ 0x212B, 0x212B, 0x00E5 }, +{ 0x212C, 0x212C, 0x212C }, +{ 0x212D, 0x212D, 0x212D }, +{ 0x212F, 0x212F, 0x212F }, +{ 0x2130, 0x2130, 0x2130 }, +{ 0x2131, 0x2131, 0x2131 }, +{ 0x2133, 0x2133, 0x2133 }, +{ 0x2134, 0x2134, 0x2134 }, +{ 0x2135, 0x2135, 0x2135 }, +{ 0x2136, 0x2136, 0x2136 }, +{ 0x2137, 0x2137, 0x2137 }, +{ 0x2138, 0x2138, 0x2138 }, +{ 0x2139, 0x2139, 0x2139 }, +{ 0x213C, 0x213C, 0x213C }, +{ 0x213D, 0x213D, 0x213D }, +{ 0x213E, 0x213E, 0x213E }, +{ 0x213F, 0x213F, 0x213F }, +{ 0x2145, 0x2145, 0x2145 }, +{ 0x2146, 0x2146, 0x2146 }, +{ 0x2147, 0x2147, 0x2147 }, +{ 0x2148, 0x2148, 0x2148 }, +{ 0x2149, 0x2149, 0x2149 }, +{ 0x2C00, 0x2C00, 0x2C30 }, +{ 0x2C01, 0x2C01, 0x2C31 }, +{ 0x2C02, 0x2C02, 0x2C32 }, +{ 0x2C03, 0x2C03, 0x2C33 }, +{ 0x2C04, 0x2C04, 0x2C34 }, +{ 0x2C05, 0x2C05, 0x2C35 }, +{ 0x2C06, 0x2C06, 0x2C36 }, +{ 0x2C07, 0x2C07, 0x2C37 }, +{ 0x2C08, 0x2C08, 0x2C38 }, +{ 0x2C09, 0x2C09, 0x2C39 }, +{ 0x2C0A, 0x2C0A, 0x2C3A }, +{ 0x2C0B, 0x2C0B, 0x2C3B }, +{ 0x2C0C, 0x2C0C, 0x2C3C }, +{ 0x2C0D, 0x2C0D, 0x2C3D }, +{ 0x2C0E, 0x2C0E, 0x2C3E }, +{ 0x2C0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 0x2D07, 0x10A7, 0x2D07 }, +{ 0x2D08, 0x10A8, 0x2D08 }, +{ 0x2D09, 0x10A9, 0x2D09 }, +{ 0x2D0A, 0x10AA, 0x2D0A }, +{ 0x2D0B, 0x10AB, 0x2D0B }, +{ 0x2D0C, 0x10AC, 0x2D0C }, +{ 0x2D0D, 0x10AD, 0x2D0D }, +{ 0x2D0E, 0x10AE, 0x2D0E }, +{ 0x2D0F, 0x10AF, 0x2D0F }, +{ 0x2D10, 0x10B0, 0x2D10 }, +{ 0x2D11, 0x10B1, 0x2D11 }, +{ 0x2D12, 0x10B2, 0x2D12 }, +{ 0x2D13, 0x10B3, 0x2D13 }, +{ 0x2D14, 0x10B4, 0x2D14 }, +{ 0x2D15, 0x10B5, 0x2D15 }, +{ 0x2D16, 0x10B6, 0x2D16 }, +{ 0x2D17, 0x10B7, 0x2D17 }, +{ 0x2D18, 0x10B8, 0x2D18 }, +{ 0x2D19, 0x10B9, 0x2D19 }, +{ 0x2D1A, 0x10BA, 0x2D1A }, +{ 0x2D1B, 0x10BB, 0x2D1B }, +{ 0x2D1C, 0x10BC, 0x2D1C }, +{ 0x2D1D, 0x10BD, 0x2D1D }, +{ 0x2D1E, 0x10BE, 0x2D1E }, +{ 0x2D1F, 0x10BF, 0x2D1F }, +{ 0x2D20, 0x10C0, 0x2D20 }, +{ 0x2D21, 0x10C1, 0x2D21 }, +{ 0x2D22, 0x10C2, 0x2D22 }, +{ 0x2D23, 0x10C3, 0x2D23 }, +{ 0x2D24, 0x10C4, 0x2D24 }, +{ 0x2D25, 0x10C5, 0x2D25 }, +{ 0x2D30, 0x2D30, 0x2D30 }, +{ 0x2D31, 0x2D31, 0x2D31 }, +{ 0x2D32, 0x2D32, 0x2D32 }, +{ 0x2D33, 0x2D33, 0x2D33 }, +{ 0x2D34, 0x2D34, 0x2D34 }, +{ 0x2D35, 0x2D35, 0x2D35 }, +{ 0x2D36, 0x2D36, 0x2D36 }, +{ 0x2D37, 0x2D37, 0x2D37 },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, +{ 0x2DD0, 0x2DD0, 0x2DD0 }, +{ 0x2DD1, 0x2DD1, 0x2DD1 }, +{ 0x2DD2, 0x2DD2, 0x2DD2 }, +{ 0x2DD3, 0x2DD3, 0x2DD3 }, +{ 0x2DD4, 0x2DD4, 0x2DD4 }, +{ 0x2DD5, 0x2DD5, 0x2DD5 }, +{ 0x2DD6, 0x2DD6, 0x2DD6 }, +{ 0x2DD8, 0x2DD8, 0x2DD8 }, +{ 0x2DD9, 0x2DD9, 0x2DD9 }, +{ 0x2DDA, 0x2DDA, 0x2DDA }, +{ 0x2DDB, 0x2DDB, 0x2DDB }, +{ 0x2DDC, 0x2DDC, 0x2DDC }, +{ 0x2DDD, 0x2DDD, 0x2DDD }, +{ 0x2DDE, 0x2DDE, 0x2DDE }, +{ 0x3005, 0x3005, 0x3005 }, +{ 0x3006, 0x3006, 0x3006 }, +{ 0x302A, 0x302A, 0x302A }, +{ 0x302B, 0x302B, 0x302B }, +{ 0x302C, 0x302C, 0x302C }, +{ 0x302D, 0x302D, 0x302D }, +{ 0x302E, 0x302E, 0x302E }, +{ 0x302F, 0x302F, 0x302F }, +{ 0x3031, 0x3031, 0x3031 }, +{ 0x3032, 0x3032, 0x3032 }, +{ 0x3033, 0x3033, 0x3033 }, +{ 0x3034, 0x3034, 0x3034 }, +{ 0x3035, 0x3035, 0x3035 }, +{ 0x303B, 0x303B, 0x303B }, +{ 0x303C, 0x303C, 0x303C }, +{ 0x3041, 0x3041, 0x3041 }, +{ 0x3042, 0x3042, 0x3042 }, +{ 0x3043, 0x3043, 0x3043 }, +{ 0x3044, 0x3044, 0x3044 }, +{ 0x3045, 0x3045, 0x3045 }, +{ 0x3046, 0x3046, 0x3046 }, +{ 0x3047, 0x3047, 0x3047 }, +{ 0x3048, 0x3048, 0x3048 }, +{ 0x3049, 0x3049, 0x3049 }, +{ 0x304A, 0x304A, 0x304A }, +{ 0x304B, 0x304B, 0x304B }, +{ 0x304C, 0x304C, 0x304C }, +{ 0x304D, 0x304D, 0x304D }, +{ 0x304E, 0x304E, 0x304E }, +{ 0x304F, 0x304F, 0x304F }, +{ 0x3050, 0x3050, 0x3050 }, +{ 0x3051, 0x3051, 0x3051 }, +{ 0x3052, 0x3052, 0x3052 }, +{ 0x3053, 0x3053, 0x3053 }, +{ 0x3054, 0x3054, 0x3054 }, +{ 0x3055, 0x3055, 0x3055 }, +{ 0x3056, 0x3056, 0x3056 }, +{ 0x3057, 0x3057, 0x3057 }, +{ 0x3058, 0x3058, 0x3058 }, +{ 0x3059, 0x3059, 0x3059 }, +{ 0x305A, 0x305A, 0x305A }, +{ 0x305B, 0x305B, 0x305B }, +{ 0x305C, 0x305C, 0x305C }, +{ 0x305D, 0x305D, 0x305D }, +{ 0x305E, 0x305E, 0x305E }, +{ 0x305F, 0x305F, 0x305F }, +{ 0x3060, 0x3060, 0x3060 }, +{ 0x3061, 0x3061, 0x3061 }, +{ 0x3062, 0x3062, 0x3062 }, +{ 0x3063, 0x3063, 0x3063 }, +{ 0x3064, 0x3064, 0x3064 }, +{ 0x3065, 0x3065, 0x3065 }, +{ 0x3066, 0x3066, 0x3066 }, +{ 0x3067, 0x3067, 0x3067 }, +{ 0x3068, 0x3068, 0x3068 }, +{ 0x3069, 0x3069, 0x3069 }, +{ 0x306A, 0x306A, 0x306A }, +{ 0x306B, 0x306B, 0x306B }, +{ 0x306C, 0x306C, 0x306C }, +{ 0x306D, 0x306D, 0x306D }, +{ 0x306E, 0x306E, 0x306E }, +{ 0x306F, 0x306F, 0x306F }, +{ 0x3070, 0x3070, 0x3070 }, +{ 0x3071, 0x3071, 0x3071 }, +{ 0x3072, 0x3072, 0x3072 }, +{ 0x3073, 0x3073, 0x3073 }, +{ 0x3074, 0x3074, 0x3074 }, +{ 0x3075, 0x3075, 0x3075 }, +{ 0x3076, 0x3076, 0x3076 }, +{ 0x3077, 0x3077, 0x3077 }, +{ 0x3078, 0x3078, 0x3078 }, +{ 0x3079, 0x3079, 0x3079 }, +{ 0x307A, 0x307A, 0x307A }, +{ 0x307B, 0x307B, 0x307B }, +{ 0x307C, 0x307C, 0x307C }, +{ 0x307D, 0x307D, 0x307D }, +{ 0x307E, 0x307E, 0x307E }, +{ 0x307F, 0x307F, 0x307F }, +{ 0x3080, 0x3080, 0x3080 }, +{ 0x3081, 0x3081, 0x3081 }, +{ 0x3082, 0x3082, 0x3082 }, +{ 0x3083, 0x3083, 0x3083 }, +{ 0x3084, 0x3084, 0x3084 }, +{ 0x3085, 0x3085, 0x3085 }, +{ 0x3086, 0x3086, 0x3086 }, +{ 0x3087, 0x3087, 0x3087 }, +{ 0x3088, 0x3088, 0x3088 }, +{ 0x3089, 0x3089, 0x3089 }, +{ 0x308A, 0x308A, 0x308A }, +{ 0x308B, 0x308B, 0x308B }, +{ 0x308C, 0x308C, 0x308C }, +{ 0x308D, 0x308D, 0x308D }, +{ 0x308E, 0x308E, 0x308E }, +{ 0x308F, 0x308F, 0x308F }, +{ 0x3090, 0x3090, 0x3090 }, +{ 0x3091, 0x3091, 0x3091 }, +{ 0x3092, 0x3092, 0x3092 }, +{ 0x3093, 0x3093, 0x3093 }, +{ 0x3094, 0x3094, 0x3094 }, +{ 0x3095, 0x3095, 0x3095 }, +{ 0x3096, 0x3096, 0x3096 }, +{ 0x3099, 0x3099, 0x3099 }, +{ 0x309A, 0x309A, 0x309A }, +{ 0x309D, 0x309D, 0x309D }, +{ 0x309E, 0x309E, 0x309E }, +{ 0x309F, 0x309F, 0x309F }, +{ 0x30A1, 0x30A1, 0x30A1 }, +{ 0x30A2, 0x30A2, 0x30A2 }, +{ 0x30A3, 0x30A3, 0x30A3 }, +{ 0x30A4, 0x30A4, 0x30A4 }, +{ 0x30A5, 0x30A5, 0x30A5 }, +{ 0x30A6, 0x30A6, 0x30A6 }, +{ 0x30A7, 0x30A7, 0x30A7 }, +{ 0x30A8, 0x30A8, 0x30A8 }, +{ 0x30A9, 0x30A9, 0x30A9 }, +{ 0x30AA, 0x30AA, 0x30AA }, +{ 0x30AB, 0x30AB, 0x30AB }, +{ 0x30AC, 0x30AC, 0x30AC }, +{ 0x30AD, 0x30AD, 0x30AD }, +{ 0x30AE, 0x30AE, 0x30AE }, +{ 0x30AF, 0x30AF, 0x30AF }, +{ 0x30B0, 0x30B0, 0x30B0 }, +{ 0x30B1, 0x30B1, 0x30B1 }, +{ 0x30B2, 0x30B2, 0x30B2 }, +{ 0x30B3, 0x30B3, 0x30B3 }, +{ 0x30B4, 0x30B4, 0x30B4 }, +{ 0x30B5, 0x30B5, 0x30B5 }, +{ 0x30B6, 0x30B6, 0x30B6 }, +{ 0x30B7, 0x30B7, 0x30B7 }, +{ 0x30B8, 0x30B8, 0x30B8 }, +{ 0x30B9, 0x30B9, 0x30B9 }, +{ 0x30BA, 0x30BA, 0x30BA }, +{ 0x30BB, 0x30BB, 0x30BB }, +{ 0x30BC, 0x30BC, 0x30BC }, +{ 0x30BD, 0x30BD, 0x30BD }, +{ 0x30BE, 0x30BE, 0x30BE }, +{ 0x30BF, 0x30BF, 0x30BF }, +{ 0x30C0, 0x30C0, 0x30C0 }, +{ 0x30C1, 0x30C1, 0x30C1 }, +{ 0x30C2, 0x30C2, 0x30C2 }, +{ 0x30C3, 0x30C3, 0x30C3 }, +{ 0x30C4, 0x30C4, 0x30C4 }, +{ 0x30C5, 0x30C5, 0x30C5 }, +{ 0x30C6, 0x30C6, 0x30C6 }, +{ 0x30C7, 0x30C7, 0x30C7 }, +{ 0x30C8, 0x30C8, 0x30C8 }, +{ 0x30C9, 0x30C9, 0x30C9 }, +{ 0x30CA, 0x30CA, 0x30CA }, +{ 0x30CB, 0x30CB, 0x30CB }, +{ 0x30CC, 0x30CC, 0x30CC }, +{ 0x30CD, 0x30CD, 0x30CD }, +{ 0x30CE, 0x30CE, 0x30CE }, +{ 0x30CF, 0x30CF, 0x30CF }, +{ 0x30D0, 0x30D0, 0x30D0 }, +{ 0x30D1, 0x30D1, 0x30D1 }, +{ 0x30D2, 0x30D2, 0x30D2 }, +{ 0x30D3, 0x30D3, 0x30D3 }, +{ 0x30D4, 0x30D4, 0x30D4 }, +{ 0x30D5, 0x30D5, 0x30D5 }, +{ 0x30D6, 0x30D6, 0x30D6 }, +{ 0x30D7, 0x30D7, 0x30D7 }, +{ 0x30D8, 0x30D8, 0x30D8 }, +{ 0x30D9, 0x30D9, 0x30D9 }, +{ 0x30DA, 0x30DA, 0x30DA }, +{ 0x30DB, 0x30DB, 0x30DB }, +{ 0x30DC, 0x30DC, 0x30DC }, +{ 0x30DD, 0x30DD, 0x30DD }, +{ 0x30DE, 0x30DE, 0x30DE }, +{ 0x30DF, 0x30DF, 0x30DF }, +{ 0x30E0, 0x30E0, 0x30E0 }, +{ 0x30E1, 0x30E1, 0x30E1 }, +{ 0x30E2, 0x30E2, 0x30E2 }, +{ 0x30E3, 0x30E3, 0x30E3 }, +{ 0x30E4, 0x30E4, 0x30E4 }, +{ 0x30E5, 0x30E5, 0x30E5 }, +{ 0x30E6, 0x30E6, 0x30E6 }, +{ 0x30E7, 0x30E7, 0x30E7 }, +{ 0x30E8, 0x30E8, 0x30E8 }, +{ 0x30E9, 0x30E9, 0x30E9 }, +{ 0x30EA, 0x30EA, 0x30EA }, +{ 0x30EB, 0x30EB, 0x30EB }, +{ 0x30EC, 0x30EC, 0x30EC }, +{ 0x30ED, 0x30ED, 0x30ED }, +{ 0x30EE, 0x30EE, 0x30EE }, +{ 0x30EF, 0x30EF, 0x30EF }, +{ 0x30F0, 0x30F0, 0x30F0 }, +{ 0x30F1, 0x30F1, 0x30F1 }, +{ 0x30F2, 0x30F2, 0x30F2 }, +{ 0x30F3, 0x30F3, 0x30F3 }, +{ 0x30F4, 0x30F4, 0x30F4 }, +{ 0x30F5, 0x30F5, 0x30F5 }, +{ 0x30F6, 0x30F6, 0x30F6 }, +{ 0x30F7, 0x30F7, 0x30F7 }, +{ 0x30F8, 0x30F8, 0x30F8 }, +{ 0x30F9, 0x30F9, 0x30F9 }, +{ 0x30FA, 0x30FA, 0x30FA }, +{ 0x30FC, 0x30FC, 0x30FC }, +{ 0x30FD, 0x30FD, 0x30FD }, +{ 0x30FE, 0x30FE, 0x30FE }, +{ 0x30FF, 0x30FF, 0x30FF }, +{ 0x3105, 0x3105, 0x3105 }, +{ 0x3106, 0x3106, 0x3106 }, +{ 0x3107, 0x3107, 0x3107 }, +{ 0x3108, 0x3108, 0x3108 }, +{ 0x3109, 0x3109, 0x3109 }, +{ 0x310A, 0x310A, 0x310A }, +{ 0x310B, 0x310B, 0x310B }, +{ 0x310C, 0x310C, 0x310C }, +{ 0x310D, 0x310D, 0x310D }, +{ 0x310E, 0x310E, 0x310E }, +{ 0x310F, 0x310F, 0x310F }, +{ 0x3110, 0x3110, 0x3110 }, +{ 0x3111, 0x3111, 0x3111 }, +{ 0x3112, 0x3112, 0x3112 }, +{ 0x3113, 0x3113, 0x3113 }, +{ 0x3114, 0x3114, 0x3114 }, +{ 0x3115, 0x3115, 0x3115 }, +{ 0x3116, 0x3116, 0x3116 }, +{ 0x3117, 0x3117, 0x3117 }, +{ 0x3118, 0x3118, 0x3118 }, +{ 0x3119, 0x3119, 0x3119 }, +{ 0x311A, 0x311A, 0x311A }, +{ 0x311B, 0x311B, 0x311B }, +{ 0x311C, 0x311C, 0x311C }, +{ 0x311D, 0x311D, 0x311D }, +{ 0x311E, 0x311E, 0x311E }, +{ 0x311F, 0x311F, 0x311F }, +{ 0x3120, 0x3120, 0x3120 }, +{ 0x3121, 0x3121, 0x3121 }, +{ 0x3122, 0x3122, 0x3122 }, +{ 0x3123, 0x3123, 0x3123 }, +{ 0x3124, 0x3124, 0x3124 }, +{ 0x3125, 0x3125, 0x3125 }, +{ 0x3126, 0x3126, 0x3126 }, +{ 0x3127, 0x3127, 0x3127 }, +{ 0x3128, 0x3128, 0x3128 }, +{ 0x3129, 0x3129, 0x3129 }, +{ 0x312A, 0x312A, 0x312A }, +{ 0x312B, 0x312B, 0x312B }, +{ 0x312C, 0x312C, 0x312C }, +{ 0x3131, 0x3131, 0x3131 }, +{ 0x3132, 0x3132, 0x3132 }, +{ 0x3133, 0x3133, 0x3133 }, +{ 0x3134, 0x3134, 0x3134 }, +{ 0x3135, 0x3135, 0x3135 }, +{ 0x3136, 0x3136, 0x3136 }, +{ 0x3137, 0x3137, 0x3137 }, +{ 0x3138, 0x3138, 0x3138 }, +{ 0x3139, 0x3139, 0x3139 }, +{ 0x313A, 0x313A, 0x313A }, +{ 0x313B, 0x313B, 0x313B }, +{ 0x313C, 0x313C, 0x313C }, +{ 0x313D, 0x313D, 0x313D }, +{ 0x313E, 0x313E, 0x313E }, +{ 0x313F, 0x313F, 0x313F }, +{ 0x3140, 0x3140, 0x3140 }, +{ 0x3141, 0x3141, 0x3141 }, +{ 0x3142, 0x3142, 0x3142 }, +{ 0x3143, 0x3143, 0x3143 }, +{ 0x3144, 0x3144, 0x3144 }, +{ 0x3145, 0x3145, 0x3145 }, +{ 0x3146, 0x3146, 0x3146 }, +{ 0x3147, 0x3147, 0x3147 }, +{ 0x3148, 0x3148, 0x3148 }, +{ 0x3149, 0x3149, 0x3149 }, +{ 0x314A, 0x314A, 0x314A }, +{ 0x314B, 0x314B, 0x314B }, +{ 0x314C, 0x314C, 0x314C }, +{ 0x314D, 0x314D, 0x314D }, +{ 0x314E, 0x314E, 0x314E }, +{ 0x314F, 0x314F, 0x314F }, +{ 0x3150, 0x3150, 0x3150 }, +{ 0x3151, 0x3151, 0x3151 }, +{ 0x3152, 0x3152, 0x3152 }, +{ 0x3153, 0x3153, 0x3153 }, +{ 0x3154, 0x3154, 0x3154 }, +{ 0x3155, 0x3155, 0x3155 }, +{ 0x3156, 0x3156, 0x3156 }, +{ 0x3157, 0x3157, 0x3157 }, +{ 0x3158, 0x3158, 0x3158 }, +{ 0x3159, 0x3159, 0x3159 }, +{ 0x315A, 0x315A, 0x315A }, +{ 0x315B, 0x315B, 0x315B }, +{ 0x315C, 0x315C, 0x315C }, +{ 0x315D, 0x315D, 0x315D }, +{ 0x315E, 0x315E, 0x315E }, +{ 0x315F, 0x315F, 0x315F }, +{ 0x3160, 0x3160, 0x3160 }, +{ 0x3161, 0x3161, 0x3161 }, +{ 0x3162, 0x3162, 0x3162 }, +{ 0x3163, 0x3163, 0x3163 }, +{ 0x3164, 0x3164, 0x3164 }, +{ 0x3165, 0x3165, 0x3165 }, +{ 0x3166, 0x3166, 0x3166 }, +{ 0x3167, 0x3167, 0x3167 }, +{ 0x3168, 0x3168, 0x3168 }, +{ 0x3169, 0x3169, 0x3169 }, +{ 0x316A, 0x316A, 0x316A }, +{ 0x316B, 0x316B, 0x316B }, +{ 0x316C, 0x316C, 0x316C }, +{ 0x316D, 0x316D, 0x316D }, +{ 0x316E, 0x316E, 0x316E }, +{ 0x316F, 0x316F, 0x316F }, +{ 0x3170, 0x3170, 0x3170 }, +{ 0x3171, 0x3171, 0x3171 }, +{ 0x3172, 0x3172, 0x3172 }, +{ 0x3173, 0x3173, 0x3173 }, +{ 0x3174, 0x3174, 0x3174 }, +{ 0x3175, 0x3175, 0x3175 }, +{ 0x3176, 0x3176, 0x3176 }, +{ 0x3177, 0x3177, 0x3177 }, +{ 0x3178, 0x3178, 0x3178 }, +{ 0x3179, 0x3179, 0x3179 }, +{ 0x317A, 0x317A, 0x317A }, +{ 0x317B, 0x317B, 0x317B }, +{ 0x317C, 0x317C, 0x317C }, +{ 0x317D, 0x317D, 0x317D }, +{ 0x317E, 0x317E, 0x317E }, +{ 0x317F, 0x317F, 0x317F }, +{ 0x3180, 0x3180, 0x3180 }, +{ 0x3181, 0x3181, 0x3181 }, +{ 0x3182, 0x3182, 0x3182 }, +{ 0x3183, 0x3183, 0x3183 }, +{ 0x3184, 0x3184, 0x3184 }, +{ 0x3185, 0x3185, 0x3185 }, +{ 0x3186, 0x3186, 0x3186 }, +{ 0x3187, 0x3187, 0x3187 }, +{ 0x3188, 0x3188, 0x3188 }, +{ 0x3189, 0x3189, 0x3189 }, +{ 0x318A, 0x318A, 0x318A }, +{ 0x318B, 0x318B, 0x318B }, +{ 0x318C, 0x318C, 0x318C }, +{ 0x318D, 0x318D, 0x318D }, +{ 0x318E, 0x318E, 0x318E }, +{ 0x31A0, 0x31A0, 0x31A0 }, +{ 0x31A1, 0x31A1, 0x31A1 }, +{ 0x31A2, 0x31A2, 0x31A2 }, +{ 0x31A3, 0x31A3, 0x31A3 }, +{ 0x31A4, 0x31A4, 0x31A4 }, +{ 0x31A5, 0x31A5, 0x31A5 }, +{ 0x31A6, 0x31A6, 0x31A6 }, +{ 0x31A7, 0x31A7, 0x31A7 }, +{ 0x31A8, 0x31A8, 0x31A8 }, +{ 0x31A9, 0x31A9, 0x31A9 }, +{ 0x31AA, 0x31AA, 0x31AA }, +{ 0x31AB, 0x31AB, 0x31AB }, +{ 0x31AC, 0x31AC, 0x31AC }, +{ 0x31AD, 0x31AD, 0x31AD }, +{ 0x31AE, 0x31AE, 0x31AE }, +{ 0x31AF, 0x31AF, 0x31AF }, +{ 0x31B0, 0x31B0, 0x31B0 }, +{ 0x31B1, 0x31B1, 0x31B1 }, +{ 0x31B2, 0x31B2, 0x31B2 }, +{ 0x31B3, 0x31B3, 0x31B3 }, +{ 0x31B4, 0x31B4, 0x31B4 }, +{ 0x31B5, 0x31B5, 0x31B5 }, +{ 0x31B6, 0x31B6, 0x31B6 }, +{ 0x31B7, 0x31B7, 0x31B7 }, +{ 0x31F0, 0x31F0, 0x31F0 }, +{ 0x31F1, 0x31F1, 0x31F1 }, +{ 0x31F2, 0x31F2, 0x31F2 }, +{ 0x31F3, 0x31F3, 0x31F3 }, +{ 0x31F4, 0x31F4, 0x31F4 }, +{ 0x31F5, 0x31F5, 0x31F5 }, +{ 0x31F6, 0x31F6, 0x31F6 }, +{ 0x31F7, 0x31F7, 0x31F7 }, +{ 0x31F8, 0x31F8, 0x31F8 }, +{ 0x31F9, 0x31F9, 0x31F9 }, +{ 0x31FA, 0x31FA, 0x31FA }, +{ 0x31FB, 0x31FB, 0x31FB }, +{ 0x31FC, 0x31FC, 0x31FC }, +{ 0x31FD, 0x31FD, 0x31FD }, +{ 0x31FE, 0x31FE, 0x31FE }, +{ 0x31FF, 0x31FF, 0x31FF }, +{ 0x3400, 0x3400, 0x3400 }, +{ 0x4DB5, 0x4DB5, 0x4DB5 }, +{ 0x4E00, 0x4E00, 0x4E00 }, +{ 0x9FBB, 0x9FBB, 0x9FBB }, +{ 0xA000, 0xA000, 0xA000 }, +{ 0xA001, 0xA001, 0xA001 }, +{ 0xA002, 0xA002, 0xA002 }, +{ 0xA003, 0xA003, 0xA003 }, +{ 0xA004, 0xA004, 0xA004 }, +{ 0xA005, 0xA005, 0xA005 }, +{ 0xA006, 0xA006, 0xA006 }, +{ 0xA007, 0xA007, 0xA007 }, +{ 0xA008, 0xA008, 0xA008 }, +{ 0xA009, 0xA009, 0xA009 }, +{ 0xA00A, 0xA00A, 0xA00A }, +{ 0xA00B, 0xA00B, 0xA00B }, +{ 0xA00C, 0xA00C, 0xA00C }, +{ 0xA00D, 0xA00D, 0xA00D }, +{ 0xA00E, 0xA00E, 0xA00E }, +{ 0xA00F, 0xA00F, 0xA00F }, +{ 0xA010, 0xA010, 0xA010 }, +{ 0xA011, 0xA011, 0xA011 }, +{ 0xA012, 0xA012, 0xA012 }, +{ 0xA013, 0xA013, 0xA013 }, +{ 0xA014, 0xA014, 0xA014 }, +{ 0xA015, 0xA015, 0xA015 }, +{ 0xA016, 0xA016, 0xA016 }, +{ 0xA017, 0xA017, 0xA017 }, +{ 0xA018, 0xA018, 0xA018 }, +{ 0xA019, 0xA019, 0xA019 }, +{ 0xA01A, 0xA01A, 0xA01A }, +{ 0xA01B, 0xA01B, 0xA01B }, +{ 0xA01C, 0xA01C, 0xA01C }, +{ 0xA01D, 0xA01D, 0xA01D }, +{ 0xA01E, 0xA01E, 0xA01E }, +{ 0xA01F, 0xA01F, 0xA01F }, +{ 0xA020, 0xA020, 0xA020 }, +{ 0xA021, 0xA021, 0xA021 }, +{ 0xA022, 0xA022, 0xA022 }, +{ 0xA023, 0xA023, 0xA023 }, +{ 0xA024, 0xA024, 0xA024 }, +{ 0xA025, 0xA025, 0xA025 }, +{ 0xA026, 0xA026, 0xA026 }, +{ 0xA027, 0xA027, 0xA027 }, +{ 0xA028, 0xA028, 0xA028 }, +{ 0xA029, 0xA029, 0xA029 }, +{ 0xA02A, 0xA02A, 0xA02A }, +{ 0xA02B, 0xA02B, 0xA02B }, +{ 0xA02C, 0xA02C, 0xA02C }, +{ 0xA02D, 0xA02D, 0xA02D }, +{ 0xA02E, 0xA02E, 0xA02E }, +{ 0xA02F, 0xA02F, 0xA02F }, +{ 0xA030, 0xA030, 0xA030 }, +{ 0xA031, 0xA031, 0xA031 }, +{ 0xA032, 0xA032, 0xA032 }, +{ 0xA033, 0xA033, 0xA033 }, +{ 0xA034, 0xA034, 0xA034 }, +{ 0xA035, 0xA035, 0xA035 }, +{ 0xA036, 0xA036, 0xA036 }, +{ 0xA037, 0xA037, 0xA037 }, +{ 0xA038, 0xA038, 0xA038 }, +{ 0xA039, 0xA039, 0xA039 }, +{ 0xA03A, 0xA03A, 0xA03A }, +{ 0xA03B, 0xA03B, 0xA03B }, +{ 0xA03C, 0xA03C, 0xA03C }, +{ 0xA03D, 0xA03D, 0xA03D }, +{ 0xA03E, 0xA03E, 0xA03E }, +{ 0xA03F, 0xA03F, 0xA03F }, +{ 0xA040, 0xA040, 0xA040 }, +{ 0xA041, 0xA041, 0xA041 }, +{ 0xA042, 0xA042, 0xA042 }, +{ 0xA043, 0xA043, 0xA043 }, +{ 0xA044, 0xA044, 0xA044 }, +{ 0xA045, 0xA045, 0xA045 }, +{ 0xA046, 0xA046, 0xA046 }, +{ 0xA047, 0xA047, 0xA047 }, +{ 0xA048, 0xA048, 0xA048 }, +{ 0xA049, 0xA049, 0xA049 }, +{ 0xA04A, 0xA04A, 0xA04A }, +{ 0xA04B, 0xA04B, 0xA04B }, +{ 0xA04C, 0xA04C, 0xA04C }, +{ 0xA04D, 0xA04D, 0xA04D }, +{ 0xA04E, 0xA04E, 0xA04E }, +{ 0xA04F, 0xA04F, 0xA04F }, +{ 0xA050, 0xA050, 0xA050 }, +{ 0xA051, 0xA051, 0xA051 }, +{ 0xA052, 0xA052, 0xA052 }, +{ 0xA053, 0xA053, 0xA053 }, +{ 0xA054, 0xA054, 0xA054 }, +{ 0xA055, 0xA055, 0xA055 }, +{ 0xA056, 0xA056, 0xA056 }, +{ 0xA057, 0xA057, 0xA057 }, +{ 0xA058, 0xA058, 0xA058 }, +{ 0xA059, 0xA059, 0xA059 }, +{ 0xA05A, 0xA05A, 0xA05A }, +{ 0xA05B, 0xA05B, 0xA05B }, +{ 0xA05C, 0xA05C, 0xA05C }, +{ 0xA05D, 0xA05D, 0xA05D }, +{ 0xA05E, 0xA05E, 0xA05E }, +{ 0xA05F, 0xA05F, 0xA05F }, +{ 0xA060, 0xA060, 0xA060 }, +{ 0xA061, 0xA061, 0xA061 }, +{ 0xA062, 0xA062, 0xA062 }, +{ 0xA063, 0xA063, 0xA063 }, +{ 0xA064, 0xA064, 0xA064 }, +{ 0xA065, 0xA065, 0xA065 }, +{ 0xA066, 0xA066, 0xA066 }, +{ 0xA067, 0xA067, 0xA067 }, +{ 0xA068, 0xA068, 0xA068 }, +{ 0xA069, 0xA069, 0xA069 }, +{ 0xA06A, 0xA06A, 0xA06A }, +{ 0xA06B, 0xA06B, 0xA06B }, +{ 0xA06C, 0xA06C, 0xA06C }, +{ 0xA06D, 0xA06D, 0xA06D }, +{ 0xA06E, 0xA06E, 0xA06E }, +{ 0xA06F, 0xA06F, 0xA06F }, +{ 0xA070, 0xA070, 0xA070 }, +{ 0xA071, 0xA071, 0xA071 }, +{ 0xA072, 0xA072, 0xA072 }, +{ 0xA073, 0xA073, 0xA073 }, +{ 0xA074, 0xA074, 0xA074 }, +{ 0xA075, 0xA075, 0xA075 }, +{ 0xA076, 0xA076, 0xA076 }, +{ 0xA077, 0xA077, 0xA077 }, +{ 0xA078, 0xA078, 0xA078 }, +{ 0xA079, 0xA079, 0xA079 }, +{ 0xA07A, 0xA07A, 0xA07A }, +{ 0xA07B, 0xA07B, 0xA07B }, +{ 0xA07C, 0xA07C, 0xA07C }, +{ 0xA07D, 0xA07D, 0xA07D }, +{ 0xA07E, 0xA07E, 0xA07E }, +{ 0xA07F, 0xA07F, 0xA07F }, +{ 0xA080, 0xA080, 0xA080 }, +{ 0xA081, 0xA081, 0xA081 }, +{ 0xA082, 0xA082, 0xA082 }, +{ 0xA083, 0xA083, 0xA083 }, +{ 0xA084, 0xA084, 0xA084 }, +{ 0xA085, 0xA085, 0xA085 }, +{ 0xA086, 0xA086, 0xA086 }, +{ 0xA087, 0xA087, 0xA087 }, +{ 0xA088, 0xA088, 0xA088 }, +{ 0xA089, 0xA089, 0xA089 }, +{ 0xA08A, 0xA08A, 0xA08A }, +{ 0xA08B, 0xA08B, 0xA08B }, +{ 0xA08C, 0xA08C, 0xA08C }, +{ 0xA08D, 0xA08D, 0xA08D }, +{ 0xA08E, 0xA08E, 0xA08E }, +{ 0xA08F, 0xA08F, 0xA08F }, +{ 0xA090, 0xA090, 0xA090 }, +{ 0xA091, 0xA091, 0xA091 }, +{ 0xA092, 0xA092, 0xA092 }, +{ 0xA093, 0xA093, 0xA093 }, +{ 0xA094, 0xA094, 0xA094 }, +{ 0xA095, 0xA095, 0xA095 }, +{ 0xA096, 0xA096, 0xA096 }, +{ 0xA097, 0xA097, 0xA097 }, +{ 0xA098, 0xA098, 0xA098 }, +{ 0xA099, 0xA099, 0xA099 }, +{ 0xA09A, 0xA09A, 0xA09A }, +{ 0xA09B, 0xA09B, 0xA09B }, +{ 0xA09C, 0xA09C, 0xA09C }, +{ 0xA09D, 0xA09D, 0xA09D }, +{ 0xA09E, 0xA09E, 0xA09E }, +{ 0xA09F, 0xA09F, 0xA09F }, +{ 0xA0A0, 0xA0A0, 0xA0A0 }, +{ 0xA0A1, 0xA0A1, 0xA0A1 }, +{ 0xA0A2, 0xA0A2, 0xA0A2 }, +{ 0xA0A3, 0xA0A3, 0xA0A3 }, +{ 0xA0A4, 0xA0A4, 0xA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C, 0xA0EC, 0xA0EC }, +{ 0xA0ED, 0xA0ED, 0xA0ED }, +{ 0xA0EE, 0xA0EE, 0xA0EE }, +{ 0xA0EF, 0xA0EF, 0xA0EF }, +{ 0xA0F0, 0xA0F0, 0xA0F0 }, +{ 0xA0F1, 0xA0F1, 0xA0F1 }, +{ 0xA0F2, 0xA0F2, 0xA0F2 }, +{ 0xA0F3, 0xA0F3, 0xA0F3 }, +{ 0xA0F4, 0xA0F4, 0xA0F4 }, +{ 0xA0F5, 0xA0F5, 0xA0F5 }, +{ 0xA0F6, 0xA0F6, 0xA0F6 }, +{ 0xA0F7, 0xA0F7, 0xA0F7 }, +{ 0xA0F8, 0xA0F8, 0xA0F8 }, +{ 0xA0F9, 0xA0F9, 0xA0F9 }, +{ 0xA0FA, 0xA0FA, 0xA0FA }, +{ 0xA0FB, 0xA0FB, 0xA0FB }, +{ 0xA0FC, 0xA0FC, 0xA0FC }, +{ 0xA0FD, 0xA0FD, 0xA0FD }, +{ 0xA0FE, 0xA0FE, 0xA0FE }, +{ 0xA0FF, 0xA0FF, 0xA0FF }, +{ 0xA100, 0xA100, 0xA100 }, +{ 0xA101, 0xA101, 0xA101 }, +{ 0xA102, 0xA102, 0xA102 }, +{ 0xA103, 0xA103, 0xA103 }, +{ 0xA104, 0xA104, 0xA104 }, +{ 0xA105, 0xA105, 0xA105 }, +{ 0xA106, 0xA106, 0xA106 }, +{ 0xA107, 0xA107, 0xA107 }, +{ 0xA108, 0xA108, 0xA108 }, +{ 0xA109, 0xA109, 0xA109 }, +{ 0xA10A, 0xA10A, 0xA10A }, +{ 0xA10B, 0xA10B, 0xA10B }, +{ 0xA10C, 0xA10C, 0xA10C }, +{ 0xA10D, 0xA10D, 0xA10D }, +{ 0xA10E, 0xA10E, 0xA10E }, +{ 0xA10F, 0xA10F, 0xA10F }, +{ 0xA110, 0xA110, 0xA110 }, +{ 0xA111, 0xA111, 0xA111 }, +{ 0xA112, 0xA112, 0xA112 }, +{ 0xA113, 0xA113, 0xA113 }, +{ 0xA114, 0xA114, 0xA114 }, +{ 0xA115, 0xA115, 0xA115 }, +{ 0xA116, 0xA116, 0xA116 }, +{ 0xA117, 0xA117, 0xA117 }, +{ 0xA118, 0xA118, 0xA118 }, +{ 0xA119, 0xA119, 0xA119 }, +{ 0xA11A, 0xA11A, 0xA11A }, +{ 0xA11B, 0xA11B, 0xA11B }, +{ 0xA11C, 0xA11C, 0xA11C }, +{ 0xA11D, 0xA11D, 0xA11D }, +{ 0xA11E, 0xA11E, 0xA11E }, +{ 0xA11F, 0xA11F, 0xA11F }, +{ 0xA120, 0xA120, 0xA120 }, +{ 0xA121, 0xA121, 0xA121 }, +{ 0xA122, 0xA122, 0xA122 }, +{ 0xA123, 0xA123, 0xA123 }, +{ 0xA124, 0xA124, 0xA124 }, +{ 0xA125, 0xA125, 0xA125 }, +{ 0xA126, 0xA126, 0xA126 }, +{ 0xA127, 0xA127, 0xA127 }, +{ 0xA128, 0xA128, 0xA128 }, +{ 0xA129, 0xA129, 0xA129 }, +{ 0xA12A, 0xA12A, 0xA12A }, +{ 0xA12B, 0xA12B, 0xA12B }, +{ 0xA12C, 0xA12C, 0xA12C }, +{ 0xA12D, 0xA12D, 0xA12D }, +{ 0xA12E, 0xA12E, 0xA12E }, +{ 0xA12F, 0xA12F, 0xA12F }, +{ 0xA130, 0xA130, 0xA130 }, +{ 0xA131, 0xA131, 0xA131 }, +{ 0xA132, 0xA132, 0xA132 }, +{ 0xA133, 0xA133, 0xA133 }, +{ 0xA134, 0xA134, 0xA134 }, +{ 0xA135, 0xA135, 0xA135 }, +{ 0xA136, 0xA136, 0xA136 }, +{ 0xA137, 0xA137, 0xA137 }, +{ 0xA138, 0xA138, 0xA138 }, +{ 0xA139, 0xA139, 0xA139 }, +{ 0xA13A, 0xA13A, 0xA13A }, +{ 0xA13B, 0xA13B, 0xA13B }, +{ 0xA13C, 0xA13C, 0xA13C }, +{ 0xA13D, 0xA13D, 0xA13D }, +{ 0xA13E, 0xA13E, 0xA13E }, +{ 0xA13F, 0xA13F, 0xA13F }, +{ 0xA140, 0xA140, 0xA140 }, +{ 0xA141, 0xA141, 0xA141 }, +{ 0xA142, 0xA142, 0xA142 }, +{ 0xA143, 0xA143, 0xA143 }, +{ 0xA144, 0xA144, 0xA144 }, +{ 0xA145, 0xA145, 0xA145 }, +{ 0xA146, 0xA146, 0xA146 }, +{ 0xA147, 0xA147, 0xA147 }, +{ 0xA148, 0xA148, 0xA148 }, +{ 0xA149, 0xA149, 0xA149 }, +{ 0xA14A, 0xA14A, 0xA14A }, +{ 0xA14B, 0xA14B, 0xA14B }, +{ 0xA14C, 0xA14C, 0xA14C }, +{ 0xA14D, 0xA14D, 0xA14D }, +{ 0xA14E, 0xA14E, 0xA14E }, +{ 0xA14F, 0xA14F, 0xA14F }, +{ 0xA150, 0xA150, 0xA150 }, +{ 0xA151, 0xA151, 0xA151 }, +{ 0xA152, 0xA152, 0xA152 }, +{ 0xA153, 0xA153, 0xA153 }, +{ 0xA154, 0xA154, 0xA154 }, +{ 0xA155, 0xA155, 0xA155 }, +{ 0xA156, 0xA156, 0xA156 }, +{ 0xA157, 0xA157, 0xA157 }, +{ 0xA158, 0xA158, 0xA158 }, +{ 0xA159, 0xA159, 0xA159 }, +{ 0xA15A, 0xA15A, 0xA15A }, +{ 0xA15B, 0xA15B, 0xA15B }, +{ 0xA15C, 0xA15C, 0xA15C }, +{ 0xA15D, 0xA15D, 0xA15D }, +{ 0xA15E, 0xA15E, 0xA15E }, +{ 0xA15F, 0xA15F, 0xA15F }, +{ 0xA160, 0xA160, 0xA160 }, +{ 0xA161, 0xA161, 0xA161 }, +{ 0xA162, 0xA162, 0xA162 }, +{ 0xA163, 0xA163, 0xA163 }, +{ 0xA164, 0xA164, 0xA164 }, +{ 0xA165, 0xA165, 0xA165 }, +{ 0xA166, 0xA166, 0xA166 }, +{ 0xA167, 0xA167, 0xA167 }, +{ 0xA168, 0xA168, 0xA168 }, +{ 0xA169, 0xA169, 0xA169 }, +{ 0xA16A, 0xA16A, 0xA16A }, +{ 0xA16B, 0xA16B, 0xA16B }, +{ 0xA16C, 0xA16C, 0xA16C }, +{ 0xA16D, 0xA16D, 0xA16D }, +{ 0xA16E, 0xA16E, 0xA16E }, +{ 0xA16F, 0xA16F, 0xA16F }, +{ 0xA170, 0xA170, 0xA170 }, +{ 0xA171, 0xA171, 0xA171 }, +{ 0xA172, 0xA172, 0xA172 }, +{ 0xA173, 0xA173, 0xA173 }, +{ 0xA174, 0xA174, 0xA174 }, +{ 0xA175, 0xA175, 0xA175 }, +{ 0xA176, 0xA176, 0xA176 }, +{ 0xA177, 0xA177, 0xA177 }, +{ 0xA178, 0xA178, 0xA178 }, +{ 0xA179, 0xA179, 0xA179 }, +{ 0xA17A, 0xA17A, 0xA17A }, +{ 0xA17B, 0xA17B, 0xA17B }, +{ 0xA17C, 0xA17C, 0xA17C }, +{ 0xA17D, 0xA17D, 0xA17D }, +{ 0xA17E, 0xA17E, 0xA17E }, +{ 0xA17F, 0xA17F, 0xA17F }, +{ 0xA180, 0xA180, 0xA180 }, +{ 0xA181, 0xA181, 0xA181 }, +{ 0xA182, 0xA182, 0xA182 }, +{ 0xA183, 0xA183, 0xA183 }, +{ 0xA184, 0xA184, 0xA184 }, +{ 0xA185, 0xA185, 0xA185 }, +{ 0xA186, 0xA186, 0xA186 }, +{ 0xA187, 0xA187, 0xA187 }, +{ 0xA188, 0xA188, 0xA188 }, +{ 0xA189, 0xA189, 0xA189 }, +{ 0xA18A, 0xA18A, 0xA18A }, +{ 0xA18B, 0xA18B, 0xA18B }, +{ 0xA18C, 0xA18C, 0xA18C }, +{ 0xA18D, 0xA18D, 0xA18D }, +{ 0xA18E, 0xA18E, 0xA18E }, +{ 0xA18F, 0xA18F, 0xA18F }, +{ 0xA190, 0xA190, 0xA190 }, +{ 0xA191, 0xA191, 0xA191 }, +{ 0xA192, 0xA192, 0xA192 }, +{ 0xA193, 0xA193, 0xA193 }, +{ 0xA194, 0xA194, 0xA194 },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202, 0xA202 }, +{ 0xA203, 0xA203, 0xA203 }, +{ 0xA204, 0xA204, 0xA204 }, +{ 0xA205, 0xA205, 0xA205 }, +{ 0xA206, 0xA206, 0xA206 }, +{ 0xA207, 0xA207, 0xA207 }, +{ 0xA208, 0xA208, 0xA208 }, +{ 0xA209, 0xA209, 0xA209 }, +{ 0xA20A, 0xA20A, 0xA20A }, +{ 0xA20B, 0xA20B, 0xA20B }, +{ 0xA20C, 0xA20C, 0xA20C }, +{ 0xA20D, 0xA20D, 0xA20D }, +{ 0xA20E, 0xA20E, 0xA20E }, +{ 0xA20F, 0xA20F, 0xA20F }, +{ 0xA210, 0xA210, 0xA210 }, +{ 0xA211, 0xA211, 0xA211 }, +{ 0xA212, 0xA212, 0xA212 }, +{ 0xA213, 0xA213, 0xA213 }, +{ 0xA214, 0xA214, 0xA214 }, +{ 0xA215, 0xA215, 0xA215 }, +{ 0xA216, 0xA216, 0xA216 }, +{ 0xA217, 0xA217, 0xA217 }, +{ 0xA218, 0xA218, 0xA218 }, +{ 0xA219, 0xA219, 0xA219 }, +{ 0xA21A, 0xA21A, 0xA21A }, +{ 0xA21B, 0xA21B, 0xA21B }, +{ 0xA21C, 0xA21C, 0xA21C }, +{ 0xA21D, 0xA21D, 0xA21D }, +{ 0xA21E, 0xA21E, 0xA21E }, +{ 0xA21F, 0xA21F, 0xA21F }, +{ 0xA220, 0xA220, 0xA220 }, +{ 0xA221, 0xA221, 0xA221 }, +{ 0xA222, 0xA222, 0xA222 }, +{ 0xA223, 0xA223, 0xA223 }, +{ 0xA224, 0xA224, 0xA224 }, +{ 0xA225, 0xA225, 0xA225 }, +{ 0xA226, 0xA226, 0xA226 }, +{ 0xA227, 0xA227, 0xA227 }, +{ 0xA228, 0xA228, 0xA228 }, +{ 0xA229, 0xA229, 0xA229 }, +{ 0xA22A, 0xA22A, 0xA22A }, +{ 0xA22B, 0xA22B, 0xA22B }, +{ 0xA22C, 0xA22C, 0xA22C }, +{ 0xA22D, 0xA22D, 0xA22D }, +{ 0xA22E, 0xA22E, 0xA22E }, +{ 0xA22F, 0xA22F, 0xA22F }, +{ 0xA230, 0xA230, 0xA230 }, +{ 0xA231, 0xA231, 0xA231 }, +{ 0xA232, 0xA232, 0xA232 }, +{ 0xA233, 0xA233, 0xA233 }, +{ 0xA234, 0xA234, 0xA234 }, +{ 0xA235, 0xA235, 0xA235 }, +{ 0xA236, 0xA236, 0xA236 }, +{ 0xA237, 0xA237, 0xA237 }, +{ 0xA238, 0xA238, 0xA238 }, +{ 0xA239, 0xA239, 0xA239 }, +{ 0xA23A, 0xA23A, 0xA23A }, +{ 0xA23B, 0xA23B, 0xA23B }, +{ 0xA23C, 0xA23C, 0xA23C }, +{ 0xA23D, 0xA23D, 0xA23D }, +{ 0xA23E, 0xA23E, 0xA23E }, +{ 0xA23F, 0xA23F, 0xA23F }, +{ 0xA240, 0xA240, 0xA240 }, +{ 0xA241, 0xA241, 0xA241 }, +{ 0xA242, 0xA242, 0xA242 }, +{ 0xA243, 0xA243, 0xA243 }, +{ 0xA244, 0xA244, 0xA244 }, +{ 0xA245, 0xA245, 0xA245 }, +{ 0xA246, 0xA246, 0xA246 }, +{ 0xA247, 0xA247, 0xA247 }, +{ 0xA248, 0xA248, 0xA248 }, +{ 0xA249, 0xA249, 0xA249 }, +{ 0xA24A, 0xA24A, 0xA24A }, +{ 0xA24B, 0xA24B, 0xA24B }, +{ 0xA24C, 0xA24C, 0xA24C }, +{ 0xA24D, 0xA24D, 0xA24D }, +{ 0xA24E, 0xA24E, 0xA24E }, +{ 0xA24F, 0xA24F, 0xA24F }, +{ 0xA250, 0xA250, 0xA250 }, +{ 0xA251, 0xA251, 0xA251 }, +{ 0xA252, 0xA252, 0xA252 }, +{ 0xA253, 0xA253, 0xA253 }, +{ 0xA254, 0xA254, 0xA254 }, +{ 0xA255, 0xA255, 0xA255 }, +{ 0xA256, 0xA256, 0xA256 }, +{ 0xA257, 0xA257, 0xA257 }, +{ 0xA258, 0xA258, 0xA258 }, +{ 0xA259, 0xA259, 0xA259 }, +{ 0xA25A, 0xA25A, 0xA25A }, +{ 0xA25B, 0xA25B, 0xA25B }, +{ 0xA25C, 0xA25C, 0xA25C }, +{ 0xA25D, 0xA25D, 0xA25D }, +{ 0xA25E, 0xA25E, 0xA25E }, +{ 0xA25F, 0xA25F, 0xA25F }, +{ 0xA260, 0xA260, 0xA260 }, +{ 0xA261, 0xA261, 0xA261 }, +{ 0xA262, 0xA262, 0xA262 }, +{ 0xA263, 0xA263, 0xA263 }, +{ 0xA264, 0xA264, 0xA264 }, +{ 0xA265, 0xA265, 0xA265 }, +{ 0xA266, 0xA266, 0xA266 }, +{ 0xA267, 0xA267, 0xA267 }, +{ 0xA268, 0xA268, 0xA268 }, +{ 0xA269, 0xA269, 0xA269 }, +{ 0xA26A, 0xA26A, 0xA26A }, +{ 0xA26B, 0xA26B, 0xA26B }, +{ 0xA26C, 0xA26C, 0xA26C }, +{ 0xA26D, 0xA26D, 0xA26D }, +{ 0xA26E, 0xA26E, 0xA26E }, +{ 0xA26F, 0xA26F, 0xA26F }, +{ 0xA270, 0xA270, 0xA270 }, +{ 0xA271, 0xA271, 0xA271 }, +{ 0xA272, 0xA272, 0xA272 }, +{ 0xA273, 0xA273, 0xA273 }, +{ 0xA274, 0xA274, 0xA274 }, +{ 0xA275, 0xA275, 0xA275 }, +{ 0xA276, 0xA276, 0xA276 }, +{ 0xA277, 0xA277, 0xA277 }, +{ 0xA278, 0xA278, 0xA278 }, +{ 0xA279, 0xA279, 0xA279 }, +{ 0xA27A, 0xA27A, 0xA27A }, +{ 0xA27B, 0xA27B, 0xA27B }, +{ 0xA27C, 0xA27C, 0xA27C }, +{ 0xA27D, 0xA27D, 0xA27D }, +{ 0xA27E, 0xA27E, 0xA27E }, +{ 0xA27F, 0xA27F, 0xA27F }, +{ 0xA280, 0xA280, 0xA280 }, +{ 0xA281, 0xA281, 0xA281 }, +{ 0xA282, 0xA282, 0xA282 }, +{ 0xA283, 0xA283, 0xA283 }, +{ 0xA284, 0xA284, 0xA284 }, +{ 0xA285, 0xA285, 0xA285 }, +{ 0xA286, 0xA286, 0xA286 }, +{ 0xA287, 0xA287, 0xA287 }, +{ 0xA288, 0xA288, 0xA288 }, +{ 0xA289, 0xA289, 0xA289 }, +{ 0xA28A, 0xA28A, 0xA28A }, +{ 0xA28B, 0xA28B, 0xA28B }, +{ 0xA28C, 0xA28C, 0xA28C }, +{ 0xA28D, 0xA28D, 0xA28D }, +{ 0xA28E, 0xA28E, 0xA28E }, +{ 0xA28F, 0xA28F, 0xA28F }, +{ 0xA290, 0xA290, 0xA290 }, +{ 0xA291, 0xA291, 0xA291 }, +{ 0xA292, 0xA292, 0xA292 }, +{ 0xA293, 0xA293, 0xA293 }, +{ 0xA294, 0xA294, 0xA294 }, +{ 0xA295, 0xA295, 0xA295 }, +{ 0xA296, 0xA296, 0xA296 }, +{ 0xA297, 0xA297, 0xA297 }, +{ 0xA298, 0xA298, 0xA298 }, +{ 0xA299, 0xA299, 0xA299 }, +{ 0xA29A, 0xA29A, 0xA29A }, +{ 0xA29B, 0xA29B, 0xA29B }, +{ 0xA29C, 0xA29C, 0xA29C }, +{ 0xA29D, 0xA29D, 0xA29D }, +{ 0xA29E, 0xA29E, 0xA29E }, +{ 0xA29F, 0xA29F, 0xA29F }, +{ 0xA2A0, 0xA2A0, 0xA2A0 }, +{ 0xA2A1, 0xA2A1, 0xA2A1 }, +{ 0xA2A2, 0xA2A2, 0xA2A2 }, +{ 0xA2A3, 0xA2A3, 0xA2A3 }, +{ 0xA2A4, 0xA2A4, 0xA2A4 }, +{ 0xA2A5, 0xA2A5, 0xA2A5 }, +{ 0xA2A6, 0xA2A6, 0xA2A6 }, +{ 0xA2A7, 0xA2A7, 0xA2A7 }, +{ 0xA2A8, 0xA2A8, 0xA2A8 }, +{ 0xA2A9, 0xA2A9, 0xA2A9 }, +{ 0xA2AA, 0xA2AA, 0xA2AA }, +{ 0xA2AB, 0xA2AB, 0xA2AB }, +{ 0xA2A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 }, +{ 0xA2F4, 0xA2F4, 0xA2F4 }, +{ 0xA2F5, 0xA2F5, 0xA2F5 }, +{ 0xA2F6, 0xA2F6, 0xA2F6 }, +{ 0xA2F7, 0xA2F7, 0xA2F7 }, +{ 0xA2F8, 0xA2F8, 0xA2F8 }, +{ 0xA2F9, 0xA2F9, 0xA2F9 }, +{ 0xA2FA, 0xA2FA, 0xA2FA }, +{ 0xA2FB, 0xA2FB, 0xA2FB }, +{ 0xA2FC, 0xA2FC, 0xA2FC }, +{ 0xA2FD, 0xA2FD, 0xA2FD }, +{ 0xA2FE, 0xA2FE, 0xA2FE }, +{ 0xA2FF, 0xA2FF, 0xA2FF }, +{ 0xA300, 0xA300, 0xA300 }, +{ 0xA301, 0xA301, 0xA301 }, +{ 0xA302, 0xA302, 0xA302 }, +{ 0xA303, 0xA303, 0xA303 }, +{ 0xA304, 0xA304, 0xA304 }, +{ 0xA305, 0xA305, 0xA305 }, +{ 0xA306, 0xA306, 0xA306 }, +{ 0xA307, 0xA307, 0xA307 }, +{ 0xA308, 0xA308, 0xA308 }, +{ 0xA309, 0xA309, 0xA309 }, +{ 0xA30A, 0xA30A, 0xA30A }, +{ 0xA30B, 0xA30B, 0xA30B }, +{ 0xA30C, 0xA30C, 0xA30C }, +{ 0xA30D, 0xA30D, 0xA30D }, +{ 0xA30E, 0xA30E, 0xA30E }, +{ 0xA30F, 0xA30F, 0xA30F }, +{ 0xA310, 0xA310, 0xA310 }, +{ 0xA311, 0xA311, 0xA311 }, +{ 0xA312, 0xA312, 0xA312 }, +{ 0xA313, 0xA313, 0xA313 }, +{ 0xA314, 0xA314, 0xA314 }, +{ 0xA315, 0xA315, 0xA315 }, +{ 0xA316, 0xA316, 0xA316 }, +{ 0xA317, 0xA317, 0xA317 }, +{ 0xA318, 0xA318, 0xA318 }, +{ 0xA319, 0xA319, 0xA319 }, +{ 0xA31A, 0xA31A, 0xA31A }, +{ 0xA31B, 0xA31B, 0xA31B }, +{ 0xA31C, 0xA31C, 0xA31C }, +{ 0xA31D, 0xA31D, 0xA31D }, +{ 0xA31E, 0xA31E, 0xA31E }, +{ 0xA31F, 0xA31F, 0xA31F }, +{ 0xA320, 0xA320, 0xA320 }, +{ 0xA321, 0xA321, 0xA321 }, +{ 0xA322, 0xA322, 0xA322 }, +{ 0xA323, 0xA323, 0xA323 }, +{ 0xA324, 0xA324, 0xA324 }, +{ 0xA325, 0xA325, 0xA325 }, +{ 0xA326, 0xA326, 0xA326 }, +{ 0xA327, 0xA327, 0xA327 }, +{ 0xA328, 0xA328, 0xA328 }, +{ 0xA329, 0xA329, 0xA329 }, +{ 0xA32A, 0xA32A, 0xA32A }, +{ 0xA32B, 0xA32B, 0xA32B }, +{ 0xA32C, 0xA32C, 0xA32C }, +{ 0xA32D, 0xA32D, 0xA32D }, +{ 0xA32E, 0xA32E, 0xA32E }, +{ 0xA32F, 0xA32F, 0xA32F }, +{ 0xA330, 0xA330, 0xA330 }, +{ 0xA331, 0xA331, 0xA331 }, +{ 0xA332, 0xA332, 0xA332 }, +{ 0xA333, 0xA333, 0xA333 }, +{ 0xA334, 0xA334, 0xA334 }, +{ 0xA335, 0xA335, 0xA335 }, +{ 0xA336, 0xA336, 0xA336 }, +{ 0xA337, 0xA337, 0xA337 }, +{ 0xA338, 0xA338, 0xA338 }, +{ 0xA339, 0xA339, 0xA339 }, +{ 0xA33A, 0xA33A, 0xA33A }, +{ 0xA33B, 0xA33B, 0xA33B }, +{ 0xA33C, 0xA33C, 0xA33C }, +{ 0xA33D, 0xA33D, 0xA33D }, +{ 0xA33E, 0xA33E, 0xA33E }, +{ 0xA33F, 0xA33F, 0xA33F }, +{ 0xA340, 0xA340, 0xA340 }, +{ 0xA341, 0xA341, 0xA341 }, +{ 0xA342, 0xA342, 0xA342 }, +{ 0xA343, 0xA343, 0xA343 }, +{ 0xA344, 0xA344, 0xA344 }, +{ 0xA345, 0xA345, 0xA345 }, +{ 0xA346, 0xA346, 0xA346 }, +{ 0xA347, 0xA347, 0xA347 }, +{ 0xA348, 0xA348, 0xA348 }, +{ 0xA349, 0xA349, 0xA349 }, +{ 0xA34A, 0xA34A, 0xA34A }, +{ 0xA34B, 0xA34B, 0xA34B }, +{ 0xA34C, 0xA34C, 0xA34C }, +{ 0xA34D, 0xA34D, 0xA34D }, +{ 0xA34E, 0xA34E, 0xA34E }, +{ 0xA34F, 0xA34F, 0xA34F }, +{ 0xA350, 0xA350, 0xA350 }, +{ 0xA351, 0xA351, 0xA351 }, +{ 0xA352, 0xA352, 0xA352 }, +{ 0xA353, 0xA353, 0xA353 }, +{ 0xA354, 0xA354, 0xA354 }, +{ 0xA355, 0xA355, 0xA355 }, +{ 0xA356, 0xA356, 0xA356 }, +{ 0xA357, 0xA357, 0xA357 }, +{ 0xA358, 0xA358, 0xA358 }, +{ 0xA359, 0xA359, 0xA359 }, +{ 0xA35A, 0xA35A, 0xA35A }, +{ 0xA35B, 0xA35B, 0xA35B }, +{ 0xA35C, 0xA35C, 0xA35C }, +{ 0xA35D, 0xA35D, 0xA35D }, +{ 0xA35E, 0xA35E, 0xA35E }, +{ 0xA35F, 0xA35F, 0xA35F }, +{ 0xA360, 0xA360, 0xA360 }, +{ 0xA361, 0xA361, 0xA361 }, +{ 0xA362, 0xA362, 0xA362 }, +{ 0xA363, 0xA363, 0xA363 }, +{ 0xA364, 0xA364, 0xA364 }, +{ 0xA365, 0xA365, 0xA365 }, +{ 0xA366, 0xA366, 0xA366 }, +{ 0xA367, 0xA367, 0xA367 }, +{ 0xA368, 0xA368, 0xA368 }, +{ 0xA369, 0xA369, 0xA369 }, +{ 0xA36A, 0xA36A, 0xA36A }, +{ 0xA36B, 0xA36B, 0xA36B }, +{ 0xA36C, 0xA36C, 0xA36C }, +{ 0xA36D, 0xA36D, 0xA36D }, +{ 0xA36E, 0xA36E, 0xA36E }, +{ 0xA36F, 0xA36F, 0xA36F }, +{ 0xA370, 0xA370, 0xA370 }, +{ 0xA371, 0xA371, 0xA371 }, +{ 0xA372, 0xA372, 0xA372 }, +{ 0xA373, 0xA373, 0xA373 }, +{ 0xA374, 0xA374, 0xA374 }, +{ 0xA375, 0xA375, 0xA375 }, +{ 0xA376, 0xA376, 0xA376 }, +{ 0xA377, 0xA377, 0xA377 }, +{ 0xA378, 0xA378, 0xA378 }, +{ 0xA379, 0xA379, 0xA379 }, +{ 0xA37A, 0xA37A, 0xA37A }, +{ 0xA37B, 0xA37B, 0xA37B }, +{ 0xA37C, 0xA37C, 0xA37C }, +{ 0xA37D, 0xA37D, 0xA37D }, +{ 0xA37E, 0xA37E, 0xA37E }, +{ 0xA37F, 0xA37F, 0xA37F }, +{ 0xA380, 0xA380, 0xA380 }, +{ 0xA381, 0xA381, 0xA381 }, +{ 0xA382, 0xA382, 0xA382 }, +{ 0xA383, 0xA383, 0xA383 }, +{ 0xA384, 0xA384, 0xA384 }, +{ 0xA385, 0xA385, 0xA385 }, +{ 0xA386, 0xA386, 0xA386 }, +{ 0xA387, 0xA387, 0xA387 }, +{ 0xA388, 0xA388, 0xA388 }, +{ 0xA389, 0xA389, 0xA389 }, +{ 0xA38A, 0xA38A, 0xA38A }, +{ 0xA38B, 0xA38B, 0xA38B }, +{ 0xA38C, 0xA38C, 0xA38C }, +{ 0xA38D, 0xA38D, 0xA38D }, +{ 0xA38E, 0xA38E, 0xA38E }, +{ 0xA38F, 0xA38F, 0xA38F }, +{ 0xA390, 0xA390, 0xA390 }, +{ 0xA391, 0xA391, 0xA391 }, +{ 0xA392, 0xA392, 0xA392 }, +{ 0xA393, 0xA393, 0xA393 }, +{ 0xA394, 0xA394, 0xA394 }, +{ 0xA395, 0xA395, 0xA395 }, +{ 0xA396, 0xA396, 0xA396 }, +{ 0xA397, 0xA397, 0xA397 }, +{ 0xA398, 0xA398, 0xA398 }, +{ 0xA399, 0xA399, 0xA399 }, +{ 0xA39A, 0xA39A, 0xA39A }, +{ 0xA39B, 0xA39B, 0xA39B }, +{ 0xA39C, 0xA39C, 0xA39C }, +{ 0xA39D, 0xA39D, 0xA39D }, +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A40B }, +{ 0xA40C, 0xA40C, 0xA40C }, +{ 0xA40D, 0xA40D, 0xA40D }, +{ 0xA40E, 0xA40E, 0xA40E }, +{ 0xA40F, 0xA40F, 0xA40F }, +{ 0xA410, 0xA410, 0xA410 }, +{ 0xA411, 0xA411, 0xA411 }, +{ 0xA412, 0xA412, 0xA412 }, +{ 0xA413, 0xA413, 0xA413 }, +{ 0xA414, 0xA414, 0xA414 }, +{ 0xA415, 0xA415, 0xA415 }, +{ 0xA416, 0xA416, 0xA416 }, +{ 0xA417, 0xA417, 0xA417 }, +{ 0xA418, 0xA418, 0xA418 }, +{ 0xA419, 0xA419, 0xA419 }, +{ 0xA41A, 0xA41A, 0xA41A }, +{ 0xA41B, 0xA41B, 0xA41B }, +{ 0xA41C, 0xA41C, 0xA41C }, +{ 0xA41D, 0xA41D, 0xA41D }, +{ 0xA41E, 0xA41E, 0xA41E }, +{ 0xA41F, 0xA41F, 0xA41F }, +{ 0xA420, 0xA420, 0xA420 }, +{ 0xA421, 0xA421, 0xA421 }, +{ 0xA422, 0xA422, 0xA422 }, +{ 0xA423, 0xA423, 0xA423 }, +{ 0xA424, 0xA424, 0xA424 }, +{ 0xA425, 0xA425, 0xA425 }, +{ 0xA426, 0xA426, 0xA426 }, +{ 0xA427, 0xA427, 0xA427 }, +{ 0xA428, 0xA428, 0xA428 }, +{ 0xA429, 0xA429, 0xA429 }, +{ 0xA42A, 0xA42A, 0xA42A }, +{ 0xA42B, 0xA42B, 0xA42B }, +{ 0xA42C, 0xA42C, 0xA42C }, +{ 0xA42D, 0xA42D, 0xA42D }, +{ 0xA42E, 0xA42E, 0xA42E }, +{ 0xA42F, 0xA42F, 0xA42F }, +{ 0xA430, 0xA430, 0xA430 }, +{ 0xA431, 0xA431, 0xA431 }, +{ 0xA432, 0xA432, 0xA432 }, +{ 0xA433, 0xA433, 0xA433 }, +{ 0xA434, 0xA434, 0xA434 }, +{ 0xA435, 0xA435, 0xA435 }, +{ 0xA436, 0xA436, 0xA436 }, +{ 0xA437, 0xA437, 0xA437 }, +{ 0xA438, 0xA438, 0xA438 }, +{ 0xA439, 0xA439, 0xA439 }, +{ 0xA43A, 0xA43A, 0xA43A }, +{ 0xA43B, 0xA43B, 0xA43B }, +{ 0xA43C, 0xA43C, 0xA43C }, +{ 0xA43D, 0xA43D, 0xA43D }, +{ 0xA43E, 0xA43E, 0xA43E }, +{ 0xA43F, 0xA43F, 0xA43F }, +{ 0xA440, 0xA440, 0xA440 }, +{ 0xA441, 0xA441, 0xA441 }, +{ 0xA442, 0xA442, 0xA442 }, +{ 0xA443, 0xA443, 0xA443 }, +{ 0xA444, 0xA444, 0xA444 }, +{ 0xA445, 0xA445, 0xA445 }, +{ 0xA446, 0xA446, 0xA446 }, +{ 0xA447, 0xA447, 0xA447 }, +{ 0xA448, 0xA448, 0xA448 }, +{ 0xA449, 0xA449, 0xA449 }, +{ 0xA44A, 0xA44A, 0xA44A }, +{ 0xA44B, 0xA44B, 0xA44B }, +{ 0xA44C, 0xA44C, 0xA44C }, +{ 0xA44D, 0xA44D, 0xA44D }, +{ 0xA44E, 0xA44E, 0xA44E }, +{ 0xA44F, 0xA44F, 0xA44F }, +{ 0xA450, 0xA450, 0xA450 }, +{ 0xA451, 0xA451, 0xA451 }, +{ 0xA452, 0xA452, 0xA452 }, +{ 0xA453, 0xA453, 0xA453 }, +{ 0xA454, 0xA454, 0xA454 }, +{ 0xA455, 0xA455, 0xA455 }, +{ 0xA456, 0xA456, 0xA456 }, +{ 0xA457, 0xA457, 0xA457 }, +{ 0xA458, 0xA458, 0xA458 }, +{ 0xA459, 0xA459, 0xA459 }, +{ 0xA45A, 0xA45A, 0xA45A }, +{ 0xA45B, 0xA45B, 0xA45B }, +{ 0xA45C, 0xA45C, 0xA45C }, +{ 0xA45D, 0xA45D, 0xA45D }, +{ 0xA45E, 0xA45E, 0xA45E }, +{ 0xA45F, 0xA45F, 0xA45F }, +{ 0xA460, 0xA460, 0xA460 }, +{ 0xA461, 0xA461, 0xA461 }, +{ 0xA462, 0xA462, 0xA462 }, +{ 0xA463, 0xA463, 0xA463 }, +{ 0xA464, 0xA464, 0xA464 }, +{ 0xA465, 0xA465, 0xA465 }, +{ 0xA466, 0xA466, 0xA466 }, +{ 0xA467, 0xA467, 0xA467 }, +{ 0xA468, 0xA468, 0xA468 }, +{ 0xA469, 0xA469, 0xA469 }, +{ 0xA46A, 0xA46A, 0xA46A }, +{ 0xA46B, 0xA46B, 0xA46B }, +{ 0xA46C, 0xA46C, 0xA46C }, +{ 0xA46D, 0xA46D, 0xA46D }, +{ 0xA46E, 0xA46E, 0xA46E }, +{ 0xA46F, 0xA46F, 0xA46F }, +{ 0xA470, 0xA470, 0xA470 }, +{ 0xA471, 0xA471, 0xA471 }, +{ 0xA472, 0xA472, 0xA472 }, +{ 0xA473, 0xA473, 0xA473 }, +{ 0xA474, 0xA474, 0xA474 }, +{ 0xA475, 0xA475, 0xA475 }, +{ 0xA476, 0xA476, 0xA476 }, +{ 0xA477, 0xA477, 0xA477 }, +{ 0xA478, 0xA478, 0xA478 }, +{ 0xA479, 0xA479, 0xA479 }, +{ 0xA47A, 0xA47A, 0xA47A }, +{ 0xA47B, 0xA47B, 0xA47B }, +{ 0xA47C, 0xA47C, 0xA47C }, +{ 0xA47D, 0xA47D, 0xA47D }, +{ 0xA47E, 0xA47E, 0xA47E }, +{ 0xA47F, 0xA47F, 0xA47F }, +{ 0xA480, 0xA480, 0xA480 }, +{ 0xA481, 0xA481, 0xA481 }, +{ 0xA482, 0xA482, 0xA482 }, +{ 0xA483, 0xA483, 0xA483 }, +{ 0xA484, 0xA484, 0xA484 }, +{ 0xA485, 0xA485, 0xA485 }, +{ 0xA486, 0xA486, 0xA486 }, +{ 0xA487, 0xA487, 0xA487 }, +{ 0xA488, 0xA488, 0xA488 }, +{ 0xA489, 0xA489, 0xA489 }, +{ 0xA48A, 0xA48A, 0xA48A }, +{ 0xA48B, 0xA48B, 0xA48B }, +{ 0xA48C, 0xA48C, 0xA48C }, +{ 0xA800, 0xA800, 0xA800 }, +{ 0xA801, 0xA801, 0xA801 }, +{ 0xA803, 0xA803, 0xA803 }, +{ 0xA804, 0xA804, 0xA804 }, +{ 0xA805, 0xA805, 0xA805 }, +{ 0xA806, 0xA806, 0xA806 }, +{ 0xA807, 0xA807, 0xA807 }, +{ 0xA808, 0xA808, 0xA808 }, +{ 0xA809, 0xA809, 0xA809 }, +{ 0xA80A, 0xA80A, 0xA80A }, +{ 0xA80B, 0xA80B, 0xA80B }, +{ 0xA80C, 0xA80C, 0xA80C }, +{ 0xA80D, 0xA80D, 0xA80D }, +{ 0xA80E, 0xA80E, 0xA80E }, +{ 0xA80F, 0xA80F, 0xA80F }, +{ 0xA810, 0xA810, 0xA810 }, +{ 0xA811, 0xA811, 0xA811 }, +{ 0xA812, 0xA812, 0xA812 }, +{ 0xA813, 0xA813, 0xA813 }, +{ 0xA814, 0xA814, 0xA814 }, +{ 0xA815, 0xA815, 0xA815 }, +{ 0xA816, 0xA816, 0xA816 }, +{ 0xA817, 0xA817, 0xA817 }, +{ 0xA818, 0xA818, 0xA818 }, +{ 0xA819, 0xA819, 0xA819 }, +{ 0xA81A, 0xA81A, 0xA81A }, +{ 0xA81B, 0xA81B, 0xA81B }, +{ 0xA81C, 0xA81C, 0xA81C }, +{ 0xA81D, 0xA81D, 0xA81D }, +{ 0xA81E, 0xA81E, 0xA81E }, +{ 0xA81F, 0xA81F, 0xA81F }, +{ 0xA820, 0xA820, 0xA820 }, +{ 0xA821, 0xA821, 0xA821 }, +{ 0xA822, 0xA822, 0xA822 }, +{ 0xA825, 0xA825, 0xA825 }, +{ 0xA826, 0xA826, 0xA826 }, +{ 0xAC00, 0xAC00, 0xAC00 }, +{ 0xAC01, 0xAC01, 0xAC01 }, +{ 0xAC02, 0xAC02, 0xAC02 }, +{ 0xAC03, 0xAC03, 0xAC03 }, +{ 0xAC04, 0xAC04, 0xAC04 }, +{ 0xAC05, 0xAC05, 0xAC05 }, +{ 0xAC06, 0xAC06, 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, 0xAC9F }, +{ 0xACA0, 0xACA0, 0xACA0 }, +{ 0xACA1, 0xACA1, 0xACA1 }, +{ 0xACA2, 0xACA2, 0xACA2 }, +{ 0xACA3, 0xACA3, 0xACA3 }, +{ 0xACA4, 0xACA4, 0xACA4 }, +{ 0xACA5, 0xACA5, 0xACA5 }, +{ 0xACA6, 0xACA6, 0xACA6 }, +{ 0xACA7, 0xACA7, 0xACA7 }, +{ 0xACA8, 0xACA8, 0xACA8 }, +{ 0xACA9, 0xACA9, 0xACA9 }, +{ 0xACAA, 0xACAA, 0xACAA }, +{ 0xACAB, 0xACAB, 0xACAB }, +{ 0xACAC, 0xACAC, 0xACAC }, +{ 0xACAD, 0xACAD, 0xACAD }, +{ 0xACAE, 0xACAE, 0xACAE }, +{ 0xACAF, 0xACAF, 0xACAF }, +{ 0xACB0, 0xACB0, 0xACB0 }, +{ 0xACB1, 0xACB1, 0xACB1 }, +{ 0xACB2, 0xACB2, 0xACB2 }, +{ 0xACB3, 0xACB3, 0xACB3 }, +{ 0xACB4, 0xACB4, 0xACB4 }, +{ 0xACB5, 0xACB5, 0xACB5 }, +{ 0xACB6, 0xACB6, 0xACB6 }, +{ 0xACB7, 0xACB7, 0xACB7 }, +{ 0xACB8, 0xACB8, 0xACB8 }, +{ 0xACB9, 0xACB9, 0xACB9 }, +{ 0xACBA, 0xACBA, 0xACBA }, +{ 0xACBB, 0xACBB, 0xACBB }, +{ 0xACBC, 0xACBC, 0xACBC }, +{ 0xACBD, 0xACBD, 0xACBD }, +{ 0xACBE, 0xACBE, 0xACBE }, +{ 0xACBF, 0xACBF, 0xACBF }, +{ 0xACC0, 0xACC0, 0xACC0 }, +{ 0xACC1, 0xACC1, 0xACC1 }, +{ 0xACC2, 0xACC2, 0xACC2 }, +{ 0xACC3, 0xACC3, 0xACC3 }, +{ 0xACC4, 0xACC4, 0xACC4 }, +{ 0xACC5, 0xACC5, 0xACC5 }, +{ 0xACC6, 0xACC6, 0xACC6 }, +{ 0xACC7, 0xACC7, 0xACC7 }, +{ 0xACC8, 0xACC8, 0xACC8 }, +{ 0xACC9, 0xACC9, 0xACC9 }, +{ 0xACCA, 0xACCA, 0xACCA }, +{ 0xACCB, 0xACCB, 0xACCB }, +{ 0xACCC, 0xACCC, 0xACCC }, +{ 0xACCD, 0xACCD, 0xACCD }, +{ 0xACCE, 0xACCE, 0xACCE }, +{ 0xACCF, 0xACCF, 0xACCF }, +{ 0xACD0, 0xACD0, 0xACD0 }, +{ 0xACD1, 0xACD1, 0xACD1 }, +{ 0xACD2, 0xACD2, 0xACD2 }, +{ 0xACD3, 0xACD3, 0xACD3 }, +{ 0xACD4, 0xACD4, 0xACD4 }, +{ 0xACD5, 0xACD5, 0xACD5 }, +{ 0xACD6, 0xACD6, 0xACD6 }, +{ 0xACD7, 0xACD7, 0xACD7 }, +{ 0xACD8, 0xACD8, 0xACD8 }, +{ 0xACD9, 0xACD9, 0xACD9 }, +{ 0xACDA, 0xACDA, 0xACDA }, +{ 0xACDB, 0xACDB, 0xACDB }, +{ 0xACDC, 0xACDC, 0xACDC }, +{ 0xACDD, 0xACDD, 0xACDD }, +{ 0xACDE, 0xACDE, 0xACDE }, +{ 0xACDF, 0xACDF, 0xACDF }, +{ 0xACE0, 0xACE0, 0xACE0 }, +{ 0xACE1, 0xACE1, 0xACE1 }, +{ 0xACE2, 0xACE2, 0xACE2 }, +{ 0xACE3, 0xACE3, 0xACE3 }, +{ 0xACE4, 0xACE4, 0xACE4 }, +{ 0xACE5, 0xACE5, 0xACE5 }, +{ 0xACE6, 0xACE6, 0xACE6 }, +{ 0xACE7, 0xACE7, 0xACE7 }, +{ 0xACE8, 0xACE8, 0xACE8 }, +{ 0xACE9, 0xACE9, 0xACE9 }, +{ 0xACEA, 0xACEA, 0xACEA }, +{ 0xACEB, 0xACEB, 0xACEB }, +{ 0xACEC, 0xACEC, 0xACEC }, +{ 0xACED, 0xACED, 0xACED }, +{ 0xACEE, 0xACEE, 0xACEE }, +{ 0xACEF, 0xACEF, 0xACEF }, +{ 0xACF0, 0xACF0, 0xACF0 }, +{ 0xACF1, 0xACF1, 0xACF1 }, +{ 0xACF2, 0xACF2, 0xACF2 }, +{ 0xACF3, 0xACF3, 0xACF3 }, +{ 0xACF4, 0xACF4, 0xACF4 }, +{ 0xACF5, 0xACF5, 0xACF5 }, +{ 0xACF6, 0xACF6, 0xACF6 }, +{ 0xACF7, 0xACF7, 0xACF7 }, +{ 0xACF8, 0xACF8, 0xACF8 }, +{ 0xACF9, 0xACF9, 0xACF9 }, +{ 0xACFA, 0xACFA, 0xACFA }, +{ 0xACFB, 0xACFB, 0xACFB }, +{ 0xACFC, 0xACFC, 0xACFC }, +{ 0xACFD, 0xACFD, 0xACFD }, +{ 0xACFE, 0xACFE, 0xACFE }, +{ 0xACFF, 0xACFF, 0xACFF }, +{ 0xAD00, 0xAD00, 0xAD00 }, +{ 0xAD01, 0xAD01, 0xAD01 }, +{ 0xAD02, 0xAD02, 0xAD02 }, +{ 0xAD03, 0xAD03, 0xAD03 }, +{ 0xAD04, 0xAD04, 0xAD04 }, +{ 0xAD05, 0xAD05, 0xAD05 }, +{ 0xAD06, 0xAD06, 0xAD06 }, +{ 0xAD07, 0xAD07, 0xAD07 }, +{ 0xAD08, 0xAD08, 0xAD08 }, +{ 0xAD09, 0xAD09, 0xAD09 }, +{ 0xAD0A, 0xAD0A, 0xAD0A }, +{ 0xAD0B, 0xAD0B, 0xAD0B }, +{ 0xAD0C, 0xAD0C, 0xAD0C }, +{ 0xAD0D, 0xAD0D, 0xAD0D }, +{ 0xAD0E, 0xAD0E, 0xAD0E }, +{ 0xAD0F, 0xAD0F, 0xAD0F }, +{ 0xAD10, 0xAD10, 0xAD10 }, +{ 0xAD11, 0xAD11, 0xAD11 }, +{ 0xAD12, 0xAD12, 0xAD12 }, +{ 0xAD13, 0xAD13, 0xAD13 }, +{ 0xAD14, 0xAD14, 0xAD14 }, +{ 0xAD15, 0xAD15, 0xAD15 }, +{ 0xAD16, 0xAD16, 0xA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0xADB0, 0xADB0 }, +{ 0xADB1, 0xADB1, 0xADB1 }, +{ 0xADB2, 0xADB2, 0xADB2 }, +{ 0xADB3, 0xADB3, 0xADB3 }, +{ 0xADB4, 0xADB4, 0xADB4 }, +{ 0xADB5, 0xADB5, 0xADB5 }, +{ 0xADB6, 0xADB6, 0xADB6 }, +{ 0xADB7, 0xADB7, 0xADB7 }, +{ 0xADB8, 0xADB8, 0xADB8 }, +{ 0xADB9, 0xADB9, 0xADB9 }, +{ 0xADBA, 0xADBA, 0xADBA }, +{ 0xADBB, 0xADBB, 0xADBB }, +{ 0xADBC, 0xADBC, 0xADBC }, +{ 0xADBD, 0xADBD, 0xADBD }, +{ 0xADBE, 0xADBE, 0xADBE }, +{ 0xADBF, 0xADBF, 0xADBF }, +{ 0xADC0, 0xADC0, 0xADC0 }, +{ 0xADC1, 0xADC1, 0xADC1 }, +{ 0xADC2, 0xADC2, 0xADC2 }, +{ 0xADC3, 0xADC3, 0xADC3 }, +{ 0xADC4, 0xADC4, 0xADC4 }, +{ 0xADC5, 0xADC5, 0xADC5 }, +{ 0xADC6, 0xADC6, 0xADC6 }, +{ 0xADC7, 0xADC7, 0xADC7 }, +{ 0xADC8, 0xADC8, 0xADC8 }, +{ 0xADC9, 0xADC9, 0xADC9 }, +{ 0xADCA, 0xADCA, 0xADCA }, +{ 0xADCB, 0xADCB, 0xADCB }, +{ 0xADCC, 0xADCC, 0xADCC }, +{ 0xADCD, 0xADCD, 0xADCD }, +{ 0xADCE, 0xADCE, 0xADCE }, +{ 0xADCF, 0xADCF, 0xADCF }, +{ 0xADD0, 0xADD0, 0xADD0 }, +{ 0xADD1, 0xADD1, 0xADD1 }, +{ 0xADD2, 0xADD2, 0xADD2 }, +{ 0xADD3, 0xADD3, 0xADD3 }, +{ 0xADD4, 0xADD4, 0xADD4 }, +{ 0xADD5, 0xADD5, 0xADD5 }, +{ 0xADD6, 0xADD6, 0xADD6 }, +{ 0xADD7, 0xADD7, 0xADD7 }, +{ 0xADD8, 0xADD8, 0xADD8 }, +{ 0xADD9, 0xADD9, 0xADD9 }, +{ 0xADDA, 0xADDA, 0xADDA }, +{ 0xADDB, 0xADDB, 0xADDB }, +{ 0xADDC, 0xADDC, 0xADDC }, +{ 0xADDD, 0xADDD, 0xADDD }, +{ 0xADDE, 0xADDE, 0xADDE }, +{ 0xADDF, 0xADDF, 0xADDF }, +{ 0xADE0, 0xADE0, 0xADE0 }, +{ 0xADE1, 0xADE1, 0xADE1 }, +{ 0xADE2, 0xADE2, 0xADE2 }, +{ 0xADE3, 0xADE3, 0xADE3 }, +{ 0xADE4, 0xADE4, 0xADE4 }, +{ 0xADE5, 0xADE5, 0xADE5 }, +{ 0xADE6, 0xADE6, 0xADE6 }, +{ 0xADE7, 0xADE7, 0xADE7 }, +{ 0xADE8, 0xADE8, 0xADE8 }, +{ 0xADE9, 0xADE9, 0xADE9 }, +{ 0xADEA, 0xADEA, 0xADEA }, +{ 0xADEB, 0xADEB, 0xADEB }, +{ 0xADEC, 0xADEC, 0xADEC }, +{ 0xADED, 0xADED, 0xADED }, +{ 0xADEE, 0xADEE, 0xADEE }, +{ 0xADEF, 0xADEF, 0xADEF }, +{ 0xADF0, 0xADF0, 0xADF0 }, +{ 0xADF1, 0xADF1, 0xADF1 }, +{ 0xADF2, 0xADF2, 0xADF2 }, +{ 0xADF3, 0xADF3, 0xADF3 }, +{ 0xADF4, 0xADF4, 0xADF4 }, +{ 0xADF5, 0xADF5, 0xADF5 }, +{ 0xADF6, 0xADF6, 0xADF6 }, +{ 0xADF7, 0xADF7, 0xADF7 }, +{ 0xADF8, 0xADF8, 0xADF8 }, +{ 0xADF9, 0xADF9, 0xADF9 }, +{ 0xADFA, 0xADFA, 0xADFA }, +{ 0xADFB, 0xADFB, 0xADFB }, +{ 0xADFC, 0xADFC, 0xADFC }, +{ 0xADFD, 0xADFD, 0xADFD }, +{ 0xADFE, 0xADFE, 0xADFE }, +{ 0xADFF, 0xADFF, 0xADFF }, +{ 0xAE00, 0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, 0xB00E }, +{ 0xB00F, 0xB00F, 0xB00F }, +{ 0xB010, 0xB010, 0xB010 }, +{ 0xB011, 0xB011, 0xB011 }, +{ 0xB012, 0xB012, 0xB012 }, +{ 0xB013, 0xB013, 0xB013 }, +{ 0xB014, 0xB014, 0xB014 }, +{ 0xB015, 0xB015, 0xB015 }, +{ 0xB016, 0xB016, 0xB016 }, +{ 0xB017, 0xB017, 0xB017 }, +{ 0xB018, 0xB018, 0xB018 }, +{ 0xB019, 0xB019, 0xB019 }, +{ 0xB01A, 0xB01A, 0xB01A }, +{ 0xB01B, 0xB01B, 0xB01B }, +{ 0xB01C, 0xB01C, 0xB01C }, +{ 0xB01D, 0xB01D, 0xB01D }, +{ 0xB01E, 0xB01E, 0xB01E }, +{ 0xB01F, 0xB01F, 0xB01F }, +{ 0xB020, 0xB020, 0xB020 }, +{ 0xB021, 0xB021, 0xB021 }, +{ 0xB022, 0xB022, 0xB022 }, +{ 0xB023, 0xB023, 0xB023 }, +{ 0xB024, 0xB024, 0xB024 }, +{ 0xB025, 0xB025, 0xB025 }, +{ 0xB026, 0xB026, 0xB026 }, +{ 0xB027, 0xB027, 0xB027 }, +{ 0xB028, 0xB028, 0xB028 }, +{ 0xB029, 0xB029, 0xB029 }, +{ 0xB02A, 0xB02A, 0xB02A }, +{ 0xB02B, 0xB02B, 0xB02B }, +{ 0xB02C, 0xB02C, 0xB02C }, +{ 0xB02D, 0xB02D, 0xB02D }, +{ 0xB02E, 0xB02E, 0xB02E }, +{ 0xB02F, 0xB02F, 0xB02F }, +{ 0xB030, 0xB030, 0xB030 }, +{ 0xB031, 0xB031, 0xB031 }, +{ 0xB032, 0xB032, 0xB032 }, +{ 0xB033, 0xB033, 0xB033 }, +{ 0xB034, 0xB034, 0xB034 }, +{ 0xB035, 0xB035, 0xB035 }, +{ 0xB036, 0xB036, 0xB036 }, +{ 0xB037, 0xB037, 0xB037 }, +{ 0xB038, 0xB038, 0xB038 }, +{ 0xB039, 0xB039, 0xB039 }, +{ 0xB03A, 0xB03A, 0xB03A }, +{ 0xB03B, 0xB03B, 0xB03B }, +{ 0xB03C, 0xB03C, 0xB03C }, +{ 0xB03D, 0xB03D, 0xB03D }, +{ 0xB03E, 0xB03E, 0xB03E }, +{ 0xB03F, 0xB03F, 0xB03F }, +{ 0xB040, 0xB040, 0xB040 }, +{ 0xB041, 0xB041, 0xB041 }, +{ 0xB042, 0xB042, 0xB042 }, +{ 0xB043, 0xB043, 0xB043 }, +{ 0xB044, 0xB044, 0xB044 }, +{ 0xB045, 0xB045, 0xB045 }, +{ 0xB046, 0xB046, 0xB046 }, +{ 0xB047, 0xB047, 0xB047 }, +{ 0xB048, 0xB048, 0xB048 }, +{ 0xB049, 0xB049, 0xB049 }, +{ 0xB04A, 0xB04A, 0xB04A }, +{ 0xB04B, 0xB04B, 0xB04B }, +{ 0xB04C, 0xB04C, 0xB04C }, +{ 0xB04D, 0xB04D, 0xB04D }, +{ 0xB04E, 0xB04E, 0xB04E }, +{ 0xB04F, 0xB04F, 0xB04F }, +{ 0xB050, 0xB050, 0xB050 }, +{ 0xB051, 0xB051, 0xB051 }, +{ 0xB052, 0xB052, 0xB052 }, +{ 0xB053, 0xB053, 0xB053 }, +{ 0xB054, 0xB054, 0xB054 }, +{ 0xB055, 0xB055, 0xB055 }, +{ 0xB056, 0xB056, 0xB056 }, +{ 0xB057, 0xB057, 0xB057 }, +{ 0xB058, 0xB058, 0xB058 }, +{ 0xB059, 0xB059, 0xB059 }, +{ 0xB05A, 0xB05A, 0xB05A }, +{ 0xB05B, 0xB05B, 0xB05B }, +{ 0xB05C, 0xB05C, 0xB05C }, +{ 0xB05D, 0xB05D, 0xB05D }, +{ 0xB05E, 0xB05E, 0xB05E }, +{ 0xB05F, 0xB05F, 0xB05F }, +{ 0xB060, 0xB060, 0xB060 }, +{ 0xB061, 0xB061, 0xB061 }, +{ 0xB062, 0xB062, 0xB062 }, +{ 0xB063, 0xB063, 0xB063 }, +{ 0xB064, 0xB064, 0xB064 }, +{ 0xB065, 0xB065, 0xB065 }, +{ 0xB066, 0xB066, 0xB066 }, +{ 0xB067, 0xB067, 0xB067 }, +{ 0xB068, 0xB068, 0xB068 }, +{ 0xB069, 0xB069, 0xB069 }, +{ 0xB06A, 0xB06A, 0xB06A }, +{ 0xB06B, 0xB06B, 0xB06B }, +{ 0xB06C, 0xB06C, 0xB06C }, +{ 0xB06D, 0xB06D, 0xB06D }, +{ 0xB06E, 0xB06E, 0xB06E }, +{ 0xB06F, 0xB06F, 0xB06F }, +{ 0xB070, 0xB070, 0xB070 }, +{ 0xB071, 0xB071, 0xB071 }, +{ 0xB072, 0xB072, 0xB072 }, +{ 0xB073, 0xB073, 0xB073 }, +{ 0xB074, 0xB074, 0xB074 }, +{ 0xB075, 0xB075, 0xB075 }, +{ 0xB076, 0xB076, 0xB076 }, +{ 0xB077, 0xB077, 0xB077 }, +{ 0xB078, 0xB078, 0xB078 }, +{ 0xB079, 0xB079, 0xB079 }, +{ 0xB07A, 0xB07A, 0xB07A }, +{ 0xB07B, 0xB07B, 0xB07B }, +{ 0xB07C, 0xB07C, 0xB07C }, +{ 0xB07D, 0xB07D, 0xB07D }, +{ 0xB07E, 0xB07E, 0xB07E }, +{ 0xB07F, 0xB07F, 0xB07F }, +{ 0xB080, 0xB080, 0xB080 }, +{ 0xB081, 0xB081, 0xB081 }, +{ 0xB082, 0xB082, 0xB082 }, +{ 0xB083, 0xB083, 0xB083 }, +{ 0xB084, 0xB084, 0xB084 }, +{ 0xB085, 0xB085, 0xB085 }, +{ 0xB086, 0xB086, 0xB086 }, +{ 0xB087, 0xB087, 0xB087 }, +{ 0xB088, 0xB088, 0xB088 }, +{ 0xB089, 0xB089, 0xB089 }, +{ 0xB08A, 0xB08A, 0xB08A }, +{ 0xB08B, 0xB08B, 0xB08B }, +{ 0xB08C, 0xB08C, 0xB08C }, +{ 0xB08D, 0xB08D, 0xB08D }, +{ 0xB08E, 0xB08E, 0xB08E }, +{ 0xB08F, 0xB08F, 0xB08F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}, +{ 0xB0FE, 0xB0FE, 0xB0FE }, +{ 0xB0FF, 0xB0FF, 0xB0FF }, +{ 0xB100, 0xB100, 0xB100 }, +{ 0xB101, 0xB101, 0xB101 }, +{ 0xB102, 0xB102, 0xB102 }, +{ 0xB103, 0xB103, 0xB103 }, +{ 0xB104, 0xB104, 0xB104 }, +{ 0xB105, 0xB105, 0xB105 }, +{ 0xB106, 0xB106, 0xB106 }, +{ 0xB107, 0xB107, 0xB107 }, +{ 0xB108, 0xB108, 0xB108 }, +{ 0xB109, 0xB109, 0xB109 }, +{ 0xB10A, 0xB10A, 0xB10A }, +{ 0xB10B, 0xB10B, 0xB10B }, +{ 0xB10C, 0xB10C, 0xB10C }, +{ 0xB10D, 0xB10D, 0xB10D }, +{ 0xB10E, 0xB10E, 0xB10E }, +{ 0xB10F, 0xB10F, 0xB10F }, +{ 0xB110, 0xB110, 0xB110 }, +{ 0xB111, 0xB111, 0xB111 }, +{ 0xB112, 0xB112, 0xB112 }, +{ 0xB113, 0xB113, 0xB113 }, +{ 0xB114, 0xB114, 0xB114 }, +{ 0xB115, 0xB115, 0xB115 }, +{ 0xB116, 0xB116, 0xB116 }, +{ 0xB117, 0xB117, 0xB117 }, +{ 0xB118, 0xB118, 0xB118 }, +{ 0xB119, 0xB119, 0xB119 }, +{ 0xB11A, 0xB11A, 0xB11A }, +{ 0xB11B, 0xB11B, 0xB11B }, +{ 0xB11C, 0xB11C, 0xB11C }, +{ 0xB11D, 0xB11D, 0xB11D }, +{ 0xB11E, 0xB11E, 0xB11E }, +{ 0xB11F, 0xB11F, 0xB11F }, +{ 0xB120, 0xB120, 0xB120 }, +{ 0xB121, 0xB121, 0xB121 }, +{ 0xB122, 0xB122, 0xB122 }, +{ 0xB123, 0xB123, 0xB123 }, +{ 0xB124, 0xB124, 0xB124 }, +{ 0xB125, 0xB125, 0xB125 }, +{ 0xB126, 0xB126, 0xB126 }, +{ 0xB127, 0xB127, 0xB127 }, +{ 0xB128, 0xB128, 0xB128 }, +{ 0xB129, 0xB129, 0xB129 }, +{ 0xB12A, 0xB12A, 0xB12A }, +{ 0xB12B, 0xB12B, 0xB12B }, +{ 0xB12C, 0xB12C, 0xB12C }, +{ 0xB12D, 0xB12D, 0xB12D }, +{ 0xB12E, 0xB12E, 0xB12E }, +{ 0xB12F, 0xB12F, 0xB12F }, +{ 0xB130, 0xB130, 0xB130 }, +{ 0xB131, 0xB131, 0xB131 }, +{ 0xB132, 0xB132, 0xB132 }, +{ 0xB133, 0xB133, 0xB133 }, +{ 0xB134, 0xB134, 0xB134 }, +{ 0xB135, 0xB135, 0xB135 }, +{ 0xB136, 0xB136, 0xB136 }, +{ 0xB137, 0xB137, 0xB137 }, +{ 0xB138, 0xB138, 0xB138 }, +{ 0xB139, 0xB139, 0xB139 }, +{ 0xB13A, 0xB13A, 0xB13A }, +{ 0xB13B, 0xB13B, 0xB13B }, +{ 0xB13C, 0xB13C, 0xB13C }, +{ 0xB13D, 0xB13D, 0xB13D }, +{ 0xB13E, 0xB13E, 0xB13E }, +{ 0xB13F, 0xB13F, 0xB13F }, +{ 0xB140, 0xB140, 0xB140 }, +{ 0xB141, 0xB141, 0xB141 }, +{ 0xB142, 0xB142, 0xB142 }, +{ 0xB143, 0xB143, 0xB143 }, +{ 0xB144, 0xB144, 0xB144 }, +{ 0xB145, 0xB145, 0xB145 }, +{ 0xB146, 0xB146, 0xB146 }, +{ 0xB147, 0xB147, 0xB147 }, +{ 0xB148, 0xB148, 0xB148 }, +{ 0xB149, 0xB149, 0xB149 }, +{ 0xB14A, 0xB14A, 0xB14A }, +{ 0xB14B, 0xB14B, 0xB14B }, +{ 0xB14C, 0xB14C, 0xB14C }, +{ 0xB14D, 0xB14D, 0xB14D }, +{ 0xB14E, 0xB14E, 0xB14E }, +{ 0xB14F, 0xB14F, 0xB14F }, +{ 0xB150, 0xB150, 0xB150 }, +{ 0xB151, 0xB151, 0xB151 }, +{ 0xB152, 0xB152, 0xB152 }, +{ 0xB153, 0xB153, 0xB153 }, +{ 0xB154, 0xB154, 0xB154 }, +{ 0xB155, 0xB155, 0xB155 }, +{ 0xB156, 0xB156, 0xB156 }, +{ 0xB157, 0xB157, 0xB157 }, +{ 0xB158, 0xB158, 0xB158 }, +{ 0xB159, 0xB159, 0xB159 }, +{ 0xB15A, 0xB15A, 0xB15A }, +{ 0xB15B, 0xB15B, 0xB15B }, +{ 0xB15C, 0xB15C, 0xB15C }, +{ 0xB15D, 0xB15D, 0xB15D }, +{ 0xB15E, 0xB15E, 0xB15E }, +{ 0xB15F, 0xB15F, 0xB15F }, +{ 0xB160, 0xB160, 0xB160 }, +{ 0xB161, 0xB161, 0xB161 }, +{ 0xB162, 0xB162, 0xB162 }, +{ 0xB163, 0xB163, 0xB163 }, +{ 0xB164, 0xB164, 0xB164 }, +{ 0xB165, 0xB165, 0xB165 }, +{ 0xB166, 0xB166, 0xB166 }, +{ 0xB167, 0xB167, 0xB167 }, +{ 0xB168, 0xB168, 0xB168 }, +{ 0xB169, 0xB169, 0xB169 }, +{ 0xB16A, 0xB16A, 0xB16A }, +{ 0xB16B, 0xB16B, 0xB16B }, +{ 0xB16C, 0xB16C, 0xB16C }, +{ 0xB16D, 0xB16D, 0xB16D }, +{ 0xB16E, 0xB16E, 0xB16E }, +{ 0xB16F, 0xB16F, 0xB16F }, +{ 0xB170, 0xB170, 0xB170 }, +{ 0xB171, 0xB171, 0xB171 }, +{ 0xB172, 0xB172, 0xB172 }, +{ 0xB173, 0xB173, 0xB173 }, +{ 0xB174, 0xB174, 0xB174 }, +{ 0xB175, 0xB175, 0xB175 }, +{ 0xB176, 0xB176, 0xB176 }, +{ 0xB177, 0xB177, 0xB177 }, +{ 0xB178, 0xB178, 0xB178 }, +{ 0xB179, 0xB179, 0xB179 }, +{ 0xB17A, 0xB17A, 0xB17A }, +{ 0xB17B, 0xB17B, 0xB17B }, +{ 0xB17C, 0xB17C, 0xB17C }, +{ 0xB17D, 0xB17D, 0xB17D }, +{ 0xB17E, 0xB17E, 0xB17E }, +{ 0xB17F, 0xB17F, 0xB17F }, +{ 0xB180, 0xB180, 0xB180 }, +{ 0xB181, 0xB181, 0xB181 }, +{ 0xB182, 0xB182, 0xB182 }, +{ 0xB183, 0xB183, 0xB183 }, +{ 0xB184, 0xB184, 0xB184 }, +{ 0xB185, 0xB185, 0xB185 }, +{ 0xB186, 0xB186, 0xB186 }, +{ 0xB187, 0xB187, 0xB187 }, +{ 0xB188, 0xB188, 0xB188 }, +{ 0xB189, 0xB189, 0xB189 }, +{ 0xB18A, 0xB18A, 0xB18A }, +{ 0xB18B, 0xB18B, 0xB18B }, +{ 0xB18C, 0xB18C, 0xB18C }, +{ 0xB18D, 0xB18D, 0xB18D }, +{ 0xB18E, 0xB18E, 0xB18E }, +{ 0xB18F, 0xB18F, 0xB18F }, +{ 0xB190, 0xB190, 0xB190 }, +{ 0xB191, 0xB191, 0xB191 }, +{ 0xB192, 0xB192, 0xB192 }, +{ 0xB193, 0xB193, 0xB193 }, +{ 0xB194, 0xB194, 0xB194 }, +{ 0xB195, 0xB195, 0xB195 }, +{ 0xB196, 0xB196, 0xB196 }, +{ 0xB197, 0xB197, 0xB197 }, +{ 0xB198, 0xB198, 0xB198 }, +{ 0xB199, 0xB199, 0xB199 }, +{ 0xB19A, 0xB19A, 0xB19A }, +{ 0xB19B, 0xB19B, 0xB19B }, +{ 0xB19C, 0xB19C, 0xB19C }, +{ 0xB19D, 0xB19D, 0xB19D }, +{ 0xB19E, 0xB19E, 0xB19E }, +{ 0xB19F, 0xB19F, 0xB19F }, +{ 0xB1A0, 0xB1A0, 0xB1A0 }, +{ 0xB1A1, 0xB1A1, 0xB1A1 }, +{ 0xB1A2, 0xB1A2, 0xB1A2 }, +{ 0xB1A3, 0xB1A3, 0xB1A3 }, +{ 0xB1A4, 0xB1A4, 0xB1A4 }, +{ 0xB1A5, 0xB1A5, 0xB1A5 }, +{ 0xB1A6, 0xB1A6, 0xB1A6 }, +{ 0xB1A7, 0xB1A7, 0xB1A7 }, +{ 0x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EF }, +{ 0xB1F0, 0xB1F0, 0xB1F0 }, +{ 0xB1F1, 0xB1F1, 0xB1F1 }, +{ 0xB1F2, 0xB1F2, 0xB1F2 }, +{ 0xB1F3, 0xB1F3, 0xB1F3 }, +{ 0xB1F4, 0xB1F4, 0xB1F4 }, +{ 0xB1F5, 0xB1F5, 0xB1F5 }, +{ 0xB1F6, 0xB1F6, 0xB1F6 }, +{ 0xB1F7, 0xB1F7, 0xB1F7 }, +{ 0xB1F8, 0xB1F8, 0xB1F8 }, +{ 0xB1F9, 0xB1F9, 0xB1F9 }, +{ 0xB1FA, 0xB1FA, 0xB1FA }, +{ 0xB1FB, 0xB1FB, 0xB1FB }, +{ 0xB1FC, 0xB1FC, 0xB1FC }, +{ 0xB1FD, 0xB1FD, 0xB1FD }, +{ 0xB1FE, 0xB1FE, 0xB1FE }, +{ 0xB1FF, 0xB1FF, 0xB1FF }, +{ 0xB200, 0xB200, 0xB200 }, +{ 0xB201, 0xB201, 0xB201 }, +{ 0xB202, 0xB202, 0xB202 }, +{ 0xB203, 0xB203, 0xB203 }, +{ 0xB204, 0xB204, 0xB204 }, +{ 0xB205, 0xB205, 0xB205 }, +{ 0xB206, 0xB206, 0xB206 }, +{ 0xB207, 0xB207, 0xB207 }, +{ 0xB208, 0xB208, 0xB208 }, +{ 0xB209, 0xB209, 0xB209 }, +{ 0xB20A, 0xB20A, 0xB20A }, +{ 0xB20B, 0xB20B, 0xB20B }, +{ 0xB20C, 0xB20C, 0xB20C }, +{ 0xB20D, 0xB20D, 0xB20D }, +{ 0xB20E, 0xB20E, 0xB20E }, +{ 0xB20F, 0xB20F, 0xB20F }, +{ 0xB210, 0xB210, 0xB210 }, +{ 0xB211, 0xB211, 0xB211 }, +{ 0xB212, 0xB212, 0xB212 }, +{ 0xB213, 0xB213, 0xB213 }, +{ 0xB214, 0xB214, 0xB214 }, +{ 0xB215, 0xB215, 0xB215 }, +{ 0xB216, 0xB216, 0xB216 }, +{ 0xB217, 0xB217, 0xB217 }, +{ 0xB218, 0xB218, 0xB218 }, +{ 0xB219, 0xB219, 0xB219 }, +{ 0xB21A, 0xB21A, 0xB21A }, +{ 0xB21B, 0xB21B, 0xB21B }, +{ 0xB21C, 0xB21C, 0xB21C }, +{ 0xB21D, 0xB21D, 0xB21D }, +{ 0xB21E, 0xB21E, 0xB21E }, +{ 0xB21F, 0xB21F, 0xB21F }, +{ 0xB220, 0xB220, 0xB220 }, +{ 0xB221, 0xB221, 0xB221 }, +{ 0xB222, 0xB222, 0xB222 }, +{ 0xB223, 0xB223, 0xB223 }, +{ 0xB224, 0xB224, 0xB224 }, +{ 0xB225, 0xB225, 0xB225 }, +{ 0xB226, 0xB226, 0xB226 }, +{ 0xB227, 0xB227, 0xB227 }, +{ 0xB228, 0xB228, 0xB228 }, +{ 0xB229, 0xB229, 0xB229 }, +{ 0xB22A, 0xB22A, 0xB22A }, +{ 0xB22B, 0xB22B, 0xB22B }, +{ 0xB22C, 0xB22C, 0xB22C }, +{ 0xB22D, 0xB22D, 0xB22D }, +{ 0xB22E, 0xB22E, 0xB22E }, +{ 0xB22F, 0xB22F, 0xB22F }, +{ 0xB230, 0xB230, 0xB230 }, +{ 0xB231, 0xB231, 0xB231 }, +{ 0xB232, 0xB232, 0xB232 }, +{ 0xB233, 0xB233, 0xB233 }, +{ 0xB234, 0xB234, 0xB234 }, +{ 0xB235, 0xB235, 0xB235 }, +{ 0xB236, 0xB236, 0xB236 }, +{ 0xB237, 0xB237, 0xB237 }, +{ 0xB238, 0xB238, 0xB238 }, +{ 0xB239, 0xB239, 0xB239 }, +{ 0xB23A, 0xB23A, 0xB23A }, +{ 0xB23B, 0xB23B, 0xB23B }, +{ 0xB23C, 0xB23C, 0xB23C }, +{ 0xB23D, 0xB23D, 0xB23D }, +{ 0xB23E, 0xB23E, 0xB23E }, +{ 0xB23F, 0xB23F, 0xB23F }, +{ 0xB240, 0xB240, 0xB240 }, +{ 0xB241, 0xB241, 0xB241 }, +{ 0xB242, 0xB242, 0xB242 }, +{ 0xB243, 0xB243, 0xB243 }, +{ 0xB244, 0xB244, 0xB244 }, +{ 0xB245, 0xB245, 0xB245 }, +{ 0xB246, 0xB246, 0xB246 }, +{ 0xB247, 0xB247, 0xB247 }, +{ 0xB248, 0xB248, 0xB248 }, +{ 0xB249, 0xB249, 0xB249 }, +{ 0xB24A, 0xB24A, 0xB24A }, +{ 0xB24B, 0xB24B, 0xB24B }, +{ 0xB24C, 0xB24C, 0xB24C }, +{ 0xB24D, 0xB24D, 0xB24D }, +{ 0xB24E, 0xB24E, 0xB24E }, +{ 0xB24F, 0xB24F, 0xB24F }, +{ 0xB250, 0xB250, 0xB250 }, +{ 0xB251, 0xB251, 0xB251 }, +{ 0xB252, 0xB252, 0xB252 }, +{ 0xB253, 0xB253, 0xB253 }, +{ 0xB254, 0xB254, 0xB254 }, +{ 0xB255, 0xB255, 0xB255 }, +{ 0xB256, 0xB256, 0xB256 }, +{ 0xB257, 0xB257, 0xB257 }, +{ 0xB258, 0xB258, 0xB258 }, +{ 0xB259, 0xB259, 0xB259 }, +{ 0xB25A, 0xB25A, 0xB25A }, +{ 0xB25B, 0xB25B, 0xB25B }, +{ 0xB25C, 0xB25C, 0xB25C }, +{ 0xB25D, 0xB25D, 0xB25D }, +{ 0xB25E, 0xB25E, 0xB25E }, +{ 0xB25F, 0xB25F, 0xB25F }, +{ 0xB260, 0xB260, 0xB260 }, +{ 0xB261, 0xB261, 0xB261 }, +{ 0xB262, 0xB262, 0xB262 }, +{ 0xB263, 0xB263, 0xB263 }, +{ 0xB264, 0xB264, 0xB264 }, +{ 0xB265, 0xB265, 0xB265 }, +{ 0xB266, 0xB266, 0xB266 }, +{ 0xB267, 0xB267, 0xB267 }, +{ 0xB268, 0xB268, 0xB268 }, +{ 0xB269, 0xB269, 0xB269 }, +{ 0xB26A, 0xB26A, 0xB26A }, +{ 0xB26B, 0xB26B, 0xB26B }, +{ 0xB26C, 0xB26C, 0xB26C }, +{ 0xB26D, 0xB26D, 0xB26D }, +{ 0xB26E, 0xB26E, 0xB26E }, +{ 0xB26F, 0xB26F, 0xB26F }, +{ 0xB270, 0xB270, 0xB270 }, +{ 0xB271, 0xB271, 0xB271 }, +{ 0xB272, 0xB272, 0xB272 }, +{ 0xB273, 0xB273, 0xB273 }, +{ 0xB274, 0xB274, 0xB274 }, +{ 0xB275, 0xB275, 0xB275 }, +{ 0xB276, 0xB276, 0xB276 }, +{ 0xB277, 0xB277, 0xB277 }, +{ 0xB278, 0xB278, 0xB278 }, +{ 0xB279, 0xB279, 0xB279 }, +{ 0xB27A, 0xB27A, 0xB27A }, +{ 0xB27B, 0xB27B, 0xB27B }, +{ 0xB27C, 0xB27C, 0xB27C }, +{ 0xB27D, 0xB27D, 0xB27D }, +{ 0xB27E, 0xB27E, 0xB27E }, +{ 0xB27F, 0xB27F, 0xB27F }, +{ 0xB280, 0xB280, 0xB280 }, +{ 0xB281, 0xB281, 0xB281 }, +{ 0xB282, 0xB282, 0xB282 }, +{ 0xB283, 0xB283, 0xB283 }, +{ 0xB284, 0xB284, 0xB284 }, +{ 0xB285, 0xB285, 0xB285 }, +{ 0xB286, 0xB286, 0xB286 }, +{ 0xB287, 0xB287, 0xB287 }, +{ 0xB288, 0xB288, 0xB288 }, +{ 0xB289, 0xB289, 0xB289 }, +{ 0xB28A, 0xB28A, 0xB28A }, +{ 0xB28B, 0xB28B, 0xB28B }, +{ 0xB28C, 0xB28C, 0xB28C }, +{ 0xB28D, 0xB28D, 0xB28D }, +{ 0xB28E, 0xB28E, 0xB28E }, +{ 0xB28F, 0xB28F, 0xB28F }, +{ 0xB290, 0xB290, 0xB290 }, +{ 0xB291, 0xB291, 0xB291 }, +{ 0xB292, 0xB292, 0xB292 }, +{ 0xB293, 0xB293, 0xB293 }, +{ 0xB294, 0xB294, 0xB294 }, +{ 0xB295, 0xB295, 0xB295 }, +{ 0xB296, 0xB296, 0xB296 }, +{ 0xB297, 0xB297, 0xB297 }, +{ 0xB298, 0xB298, 0xB298 }, +{ 0xB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 }, +{ 0xB307, 0xB307, 0xB307 }, +{ 0xB308, 0xB308, 0xB308 }, +{ 0xB309, 0xB309, 0xB309 }, +{ 0xB30A, 0xB30A, 0xB30A }, +{ 0xB30B, 0xB30B, 0xB30B }, +{ 0xB30C, 0xB30C, 0xB30C }, +{ 0xB30D, 0xB30D, 0xB30D }, +{ 0xB30E, 0xB30E, 0xB30E }, +{ 0xB30F, 0xB30F, 0xB30F }, +{ 0xB310, 0xB310, 0xB310 }, +{ 0xB311, 0xB311, 0xB311 }, +{ 0xB312, 0xB312, 0xB312 }, +{ 0xB313, 0xB313, 0xB313 }, +{ 0xB314, 0xB314, 0xB314 }, +{ 0xB315, 0xB315, 0xB315 }, +{ 0xB316, 0xB316, 0xB316 }, +{ 0xB317, 0xB317, 0xB317 }, +{ 0xB318, 0xB318, 0xB318 }, +{ 0xB319, 0xB319, 0xB319 }, +{ 0xB31A, 0xB31A, 0xB31A }, +{ 0xB31B, 0xB31B, 0xB31B }, +{ 0xB31C, 0xB31C, 0xB31C }, +{ 0xB31D, 0xB31D, 0xB31D }, +{ 0xB31E, 0xB31E, 0xB31E }, +{ 0xB31F, 0xB31F, 0xB31F }, +{ 0xB320, 0xB320, 0xB320 }, +{ 0xB321, 0xB321, 0xB321 }, +{ 0xB322, 0xB322, 0xB322 }, +{ 0xB323, 0xB323, 0xB323 }, +{ 0xB324, 0xB324, 0xB324 }, +{ 0xB325, 0xB325, 0xB325 }, +{ 0xB326, 0xB326, 0xB326 }, +{ 0xB327, 0xB327, 0xB327 }, +{ 0xB328, 0xB328, 0xB328 }, +{ 0xB329, 0xB329, 0xB329 }, +{ 0xB32A, 0xB32A, 0xB32A }, +{ 0xB32B, 0xB32B, 0xB32B }, +{ 0xB32C, 0xB32C, 0xB32C }, +{ 0xB32D, 0xB32D, 0xB32D }, +{ 0xB32E, 0xB32E, 0xB32E }, +{ 0xB32F, 0xB32F, 0xB32F }, +{ 0xB330, 0xB330, 0xB330 }, +{ 0xB331, 0xB331, 0xB331 }, +{ 0xB332, 0xB332, 0xB332 }, +{ 0xB333, 0xB333, 0xB333 }, +{ 0xB334, 0xB334, 0xB334 }, +{ 0xB335, 0xB335, 0xB335 }, +{ 0xB336, 0xB336, 0xB336 }, +{ 0xB337, 0xB337, 0xB337 }, +{ 0xB338, 0xB338, 0xB338 }, +{ 0xB339, 0xB339, 0xB339 }, +{ 0xB33A, 0xB33A, 0xB33A }, +{ 0xB33B, 0xB33B, 0xB33B }, +{ 0xB33C, 0xB33C, 0xB33C }, +{ 0xB33D, 0xB33D, 0xB33D }, +{ 0xB33E, 0xB33E, 0xB33E }, +{ 0xB33F, 0xB33F, 0xB33F }, +{ 0xB340, 0xB340, 0xB340 }, +{ 0xB341, 0xB341, 0xB341 }, +{ 0xB342, 0xB342, 0xB342 }, +{ 0xB343, 0xB343, 0xB343 }, +{ 0xB344, 0xB344, 0xB344 }, +{ 0xB345, 0xB345, 0xB345 }, +{ 0xB346, 0xB346, 0xB346 }, +{ 0xB347, 0xB347, 0xB347 }, +{ 0xB348, 0xB348, 0xB348 }, +{ 0xB349, 0xB349, 0xB349 }, +{ 0xB34A, 0xB34A, 0xB34A }, +{ 0xB34B, 0xB34B, 0xB34B }, +{ 0xB34C, 0xB34C, 0xB34C }, +{ 0xB34D, 0xB34D, 0xB34D }, +{ 0xB34E, 0xB34E, 0xB34E }, +{ 0xB34F, 0xB34F, 0xB34F }, +{ 0xB350, 0xB350, 0xB350 }, +{ 0xB351, 0xB351, 0xB351 }, +{ 0xB352, 0xB352, 0xB352 }, +{ 0xB353, 0xB353, 0xB353 }, +{ 0xB354, 0xB354, 0xB354 }, +{ 0xB355, 0xB355, 0xB355 }, +{ 0xB356, 0xB356, 0xB356 }, +{ 0xB357, 0xB357, 0xB357 }, +{ 0xB358, 0xB358, 0xB358 }, +{ 0xB359, 0xB359, 0xB359 }, +{ 0xB35A, 0xB35A, 0xB35A }, +{ 0xB35B, 0xB35B, 0xB35B }, +{ 0xB35C, 0xB35C, 0xB35C }, +{ 0xB35D, 0xB35D, 0xB35D }, +{ 0xB35E, 0xB35E, 0xB35E }, +{ 0xB35F, 0xB35F, 0xB35F }, +{ 0xB360, 0xB360, 0xB360 }, +{ 0xB361, 0xB361, 0xB361 }, +{ 0xB362, 0xB362, 0xB362 }, +{ 0xB363, 0xB363, 0xB363 }, +{ 0xB364, 0xB364, 0xB364 }, +{ 0xB365, 0xB365, 0xB365 }, +{ 0xB366, 0xB366, 0xB366 }, +{ 0xB367, 0xB367, 0xB367 }, +{ 0xB368, 0xB368, 0xB368 }, +{ 0xB369, 0xB369, 0xB369 }, +{ 0xB36A, 0xB36A, 0xB36A }, +{ 0xB36B, 0xB36B, 0xB36B }, +{ 0xB36C, 0xB36C, 0xB36C }, +{ 0xB36D, 0xB36D, 0xB36D }, +{ 0xB36E, 0xB36E, 0xB36E }, +{ 0xB36F, 0xB36F, 0xB36F }, +{ 0xB370, 0xB370, 0xB370 }, +{ 0xB371, 0xB371, 0xB371 }, +{ 0xB372, 0xB372, 0xB372 }, +{ 0xB373, 0xB373, 0xB373 }, +{ 0xB374, 0xB374, 0xB374 }, +{ 0xB375, 0xB375, 0xB375 }, +{ 0xB376, 0xB376, 0xB376 }, +{ 0xB377, 0xB377, 0xB377 }, +{ 0xB378, 0xB378, 0xB378 }, +{ 0xB379, 0xB379, 0xB379 }, +{ 0xB37A, 0xB37A, 0xB37A }, +{ 0xB37B, 0xB37B, 0xB37B }, +{ 0xB37C, 0xB37C, 0xB37C }, +{ 0xB37D, 0xB37D, 0xB37D }, +{ 0xB37E, 0xB37E, 0xB37E }, +{ 0xB37F, 0xB37F, 0xB37F }, +{ 0xB380, 0xB380, 0xB380 }, +{ 0xB381, 0xB381, 0xB381 }, +{ 0xB382, 0xB382, 0xB382 }, +{ 0xB383, 0xB383, 0xB383 }, +{ 0xB384, 0xB384, 0xB384 }, +{ 0xB385, 0xB385, 0xB385 }, +{ 0xB386, 0xB386, 0xB386 }, +{ 0xB387, 0xB387, 0xB387 }, +{ 0xB388, 0xB388, 0xB388 }, +{ 0xB389, 0xB389, 0xB389 }, +{ 0xB38A, 0xB38A, 0xB38A }, +{ 0xB38B, 0xB38B, 0xB38B }, +{ 0xB38C, 0xB38C, 0xB38C }, +{ 0xB38D, 0xB38D, 0xB38D }, +{ 0xB38E, 0xB38E, 0xB38E }, +{ 0xB38F, 0xB38F, 0xB38F }, +{ 0xB390, 0xB390, 0xB390 }, +{ 0xB391, 0xB391, 0xB391 }, +{ 0xB392, 0xB392, 0xB392 }, +{ 0xB393, 0xB393, 0xB393 }, +{ 0xB394, 0xB394, 0xB394 }, +{ 0xB395, 0xB395, 0xB395 }, +{ 0xB396, 0xB396, 0xB396 }, +{ 0xB397, 0xB397, 0xB397 }, +{ 0xB398, 0xB398, 0xB398 }, +{ 0xB399, 0xB399, 0xB399 }, +{ 0xB39A, 0xB39A, 0xB39A }, +{ 0xB39B, 0xB39B, 0xB39B }, +{ 0xB39C, 0xB39C, 0xB39C }, +{ 0xB39D, 0xB39D, 0xB39D }, +{ 0xB39E, 0xB39E, 0xB39E }, +{ 0xB39F, 0xB39F, 0xB39F }, +{ 0xB3A0, 0xB3A0, 0xB3A0 }, +{ 0xB3A1, 0xB3A1, 0xB3A1 }, +{ 0xB3A2, 0xB3A2, 0xB3A2 }, +{ 0xB3A3, 0xB3A3, 0xB3A3 }, +{ 0xB3A4, 0xB3A4, 0xB3A4 }, +{ 0xB3A5, 0xB3A5, 0xB3A5 }, +{ 0xB3A6, 0xB3A6, 0xB3A6 }, +{ 0xB3A7, 0xB3A7, 0xB3A7 }, +{ 0xB3A8, 0xB3A8, 0xB3A8 }, +{ 0xB3A9, 0xB3A9, 0xB3A9 }, +{ 0xB3AA, 0xB3AA, 0xB3AA }, +{ 0xB3AB, 0xB3AB, 0xB3AB }, +{ 0xB3AC, 0xB3AC, 0xB3AC }, +{ 0xB3AD, 0xB3AD, 0xB3AD }, +{ 0xB3AE, 0xB3AE, 0xB3AE }, +{ 0xB3AF, 0xB3AF, 0xB3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7, 0xB3F7, 0xB3F7 }, +{ 0xB3F8, 0xB3F8, 0xB3F8 }, +{ 0xB3F9, 0xB3F9, 0xB3F9 }, +{ 0xB3FA, 0xB3FA, 0xB3FA }, +{ 0xB3FB, 0xB3FB, 0xB3FB }, +{ 0xB3FC, 0xB3FC, 0xB3FC }, +{ 0xB3FD, 0xB3FD, 0xB3FD }, +{ 0xB3FE, 0xB3FE, 0xB3FE }, +{ 0xB3FF, 0xB3FF, 0xB3FF }, +{ 0xB400, 0xB400, 0xB400 }, +{ 0xB401, 0xB401, 0xB401 }, +{ 0xB402, 0xB402, 0xB402 }, +{ 0xB403, 0xB403, 0xB403 }, +{ 0xB404, 0xB404, 0xB404 }, +{ 0xB405, 0xB405, 0xB405 }, +{ 0xB406, 0xB406, 0xB406 }, +{ 0xB407, 0xB407, 0xB407 }, +{ 0xB408, 0xB408, 0xB408 }, +{ 0xB409, 0xB409, 0xB409 }, +{ 0xB40A, 0xB40A, 0xB40A }, +{ 0xB40B, 0xB40B, 0xB40B }, +{ 0xB40C, 0xB40C, 0xB40C }, +{ 0xB40D, 0xB40D, 0xB40D }, +{ 0xB40E, 0xB40E, 0xB40E }, +{ 0xB40F, 0xB40F, 0xB40F }, +{ 0xB410, 0xB410, 0xB410 }, +{ 0xB411, 0xB411, 0xB411 }, +{ 0xB412, 0xB412, 0xB412 }, +{ 0xB413, 0xB413, 0xB413 }, +{ 0xB414, 0xB414, 0xB414 }, +{ 0xB415, 0xB415, 0xB415 }, +{ 0xB416, 0xB416, 0xB416 }, +{ 0xB417, 0xB417, 0xB417 }, +{ 0xB418, 0xB418, 0xB418 }, +{ 0xB419, 0xB419, 0xB419 }, +{ 0xB41A, 0xB41A, 0xB41A }, +{ 0xB41B, 0xB41B, 0xB41B }, +{ 0xB41C, 0xB41C, 0xB41C }, +{ 0xB41D, 0xB41D, 0xB41D }, +{ 0xB41E, 0xB41E, 0xB41E }, +{ 0xB41F, 0xB41F, 0xB41F }, +{ 0xB420, 0xB420, 0xB420 }, +{ 0xB421, 0xB421, 0xB421 }, +{ 0xB422, 0xB422, 0xB422 }, +{ 0xB423, 0xB423, 0xB423 }, +{ 0xB424, 0xB424, 0xB424 }, +{ 0xB425, 0xB425, 0xB425 }, +{ 0xB426, 0xB426, 0xB426 }, +{ 0xB427, 0xB427, 0xB427 }, +{ 0xB428, 0xB428, 0xB428 }, +{ 0xB429, 0xB429, 0xB429 }, +{ 0xB42A, 0xB42A, 0xB42A }, +{ 0xB42B, 0xB42B, 0xB42B }, +{ 0xB42C, 0xB42C, 0xB42C }, +{ 0xB42D, 0xB42D, 0xB42D }, +{ 0xB42E, 0xB42E, 0xB42E }, +{ 0xB42F, 0xB42F, 0xB42F }, +{ 0xB430, 0xB430, 0xB430 }, +{ 0xB431, 0xB431, 0xB431 }, +{ 0xB432, 0xB432, 0xB432 }, +{ 0xB433, 0xB433, 0xB433 }, +{ 0xB434, 0xB434, 0xB434 }, +{ 0xB435, 0xB435, 0xB435 }, +{ 0xB436, 0xB436, 0xB436 }, +{ 0xB437, 0xB437, 0xB437 }, +{ 0xB438, 0xB438, 0xB438 }, +{ 0xB439, 0xB439, 0xB439 }, +{ 0xB43A, 0xB43A, 0xB43A }, +{ 0xB43B, 0xB43B, 0xB43B }, +{ 0xB43C, 0xB43C, 0xB43C }, +{ 0xB43D, 0xB43D, 0xB43D }, +{ 0xB43E, 0xB43E, 0xB43E }, +{ 0xB43F, 0xB43F, 0xB43F }, +{ 0xB440, 0xB440, 0xB440 }, +{ 0xB441, 0xB441, 0xB441 }, +{ 0xB442, 0xB442, 0xB442 }, +{ 0xB443, 0xB443, 0xB443 }, +{ 0xB444, 0xB444, 0xB444 }, +{ 0xB445, 0xB445, 0xB445 }, +{ 0xB446, 0xB446, 0xB446 }, +{ 0xB447, 0xB447, 0xB447 }, +{ 0xB448, 0xB448, 0xB448 }, +{ 0xB449, 0xB449, 0xB449 }, +{ 0xB44A, 0xB44A, 0xB44A }, +{ 0xB44B, 0xB44B, 0xB44B }, +{ 0xB44C, 0xB44C, 0xB44C }, +{ 0xB44D, 0xB44D, 0xB44D }, +{ 0xB44E, 0xB44E, 0xB44E }, +{ 0xB44F, 0xB44F, 0xB44F }, +{ 0xB450, 0xB450, 0xB450 }, +{ 0xB451, 0xB451, 0xB451 }, +{ 0xB452, 0xB452, 0xB452 }, +{ 0xB453, 0xB453, 0xB453 }, +{ 0xB454, 0xB454, 0xB454 }, +{ 0xB455, 0xB455, 0xB455 }, +{ 0xB456, 0xB456, 0xB456 }, +{ 0xB457, 0xB457, 0xB457 }, +{ 0xB458, 0xB458, 0xB458 }, +{ 0xB459, 0xB459, 0xB459 }, +{ 0xB45A, 0xB45A, 0xB45A }, +{ 0xB45B, 0xB45B, 0xB45B }, +{ 0xB45C, 0xB45C, 0xB45C }, +{ 0xB45D, 0xB45D, 0xB45D }, +{ 0xB45E, 0xB45E, 0xB45E }, +{ 0xB45F, 0xB45F, 0xB45F }, +{ 0xB460, 0xB460, 0xB460 }, +{ 0xB461, 0xB461, 0xB461 }, +{ 0xB462, 0xB462, 0xB462 }, +{ 0xB463, 0xB463, 0xB463 }, +{ 0xB464, 0xB464, 0xB464 }, +{ 0xB465, 0xB465, 0xB465 }, +{ 0xB466, 0xB466, 0xB466 }, +{ 0xB467, 0xB467, 0xB467 }, +{ 0xB468, 0xB468, 0xB468 }, +{ 0xB469, 0xB469, 0xB469 }, +{ 0xB46A, 0xB46A, 0xB46A }, +{ 0xB46B, 0xB46B, 0xB46B }, +{ 0xB46C, 0xB46C, 0xB46C }, +{ 0xB46D, 0xB46D, 0xB46D }, +{ 0xB46E, 0xB46E, 0xB46E }, +{ 0xB46F, 0xB46F, 0xB46F }, +{ 0xB470, 0xB470, 0xB470 }, +{ 0xB471, 0xB471, 0xB471 }, +{ 0xB472, 0xB472, 0xB472 }, +{ 0xB473, 0xB473, 0xB473 }, +{ 0xB474, 0xB474, 0xB474 }, +{ 0xB475, 0xB475, 0xB475 }, +{ 0xB476, 0xB476, 0xB476 }, +{ 0xB477, 0xB477, 0xB477 }, +{ 0xB478, 0xB478, 0xB478 }, +{ 0xB479, 0xB479, 0xB479 }, +{ 0xB47A, 0xB47A, 0xB47A }, +{ 0xB47B, 0xB47B, 0xB47B }, +{ 0xB47C, 0xB47C, 0xB47C }, +{ 0xB47D, 0xB47D, 0xB47D }, +{ 0xB47E, 0xB47E, 0xB47E }, +{ 0xB47F, 0xB47F, 0xB47F }, +{ 0xB480, 0xB480, 0xB480 }, +{ 0xB481, 0xB481, 0xB481 }, +{ 0xB482, 0xB482, 0xB482 }, +{ 0xB483, 0xB483, 0xB483 }, +{ 0xB484, 0xB484, 0xB484 }, +{ 0xB485, 0xB485, 0xB485 }, +{ 0xB486, 0xB486, 0xB486 }, +{ 0xB487, 0xB487, 0xB487 }, +{ 0xB488, 0xB488, 0xB488 }, +{ 0xB489, 0xB489, 0xB489 }, +{ 0xB48A, 0xB48A, 0xB48A }, +{ 0xB48B, 0xB48B, 0xB48B }, +{ 0xB48C, 0xB48C, 0xB48C }, +{ 0xB48D, 0xB48D, 0xB48D }, +{ 0xB48E, 0xB48E, 0xB48E }, +{ 0xB48F, 0xB48F, 0xB48F }, +{ 0xB490, 0xB490, 0xB490 }, +{ 0xB491, 0xB491, 0xB491 }, +{ 0xB492, 0xB492, 0xB492 }, +{ 0xB493, 0xB493, 0xB493 }, +{ 0xB494, 0xB494, 0xB494 }, +{ 0xB495, 0xB495, 0xB495 }, +{ 0xB496, 0xB496, 0xB496 }, +{ 0xB497, 0xB497, 0xB497 }, +{ 0xB498, 0xB498, 0xB498 }, +{ 0xB499, 0xB499, 0xB499 }, +{ 0xB49A, 0xB49A, 0xB49A }, +{ 0xB49B, 0xB49B, 0xB49B }, +{ 0xB49C, 0xB49C, 0xB49C }, +{ 0xB49D, 0xB49D, 0xB49D }, +{ 0xB49E, 0xB49E, 0xB49E }, +{ 0xB49F, 0xB49F, 0xB49F }, +{ 0xB4A0, 0xB4A0, 0xB4A0 }, +{ 0xB4A1, 0xB4A1, 0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xB50F }, +{ 0xB510, 0xB510, 0xB510 }, +{ 0xB511, 0xB511, 0xB511 }, +{ 0xB512, 0xB512, 0xB512 }, +{ 0xB513, 0xB513, 0xB513 }, +{ 0xB514, 0xB514, 0xB514 }, +{ 0xB515, 0xB515, 0xB515 }, +{ 0xB516, 0xB516, 0xB516 }, +{ 0xB517, 0xB517, 0xB517 }, +{ 0xB518, 0xB518, 0xB518 }, +{ 0xB519, 0xB519, 0xB519 }, +{ 0xB51A, 0xB51A, 0xB51A }, +{ 0xB51B, 0xB51B, 0xB51B }, +{ 0xB51C, 0xB51C, 0xB51C }, +{ 0xB51D, 0xB51D, 0xB51D }, +{ 0xB51E, 0xB51E, 0xB51E }, +{ 0xB51F, 0xB51F, 0xB51F }, +{ 0xB520, 0xB520, 0xB520 }, +{ 0xB521, 0xB521, 0xB521 }, +{ 0xB522, 0xB522, 0xB522 }, +{ 0xB523, 0xB523, 0xB523 }, +{ 0xB524, 0xB524, 0xB524 }, +{ 0xB525, 0xB525, 0xB525 }, +{ 0xB526, 0xB526, 0xB526 }, +{ 0xB527, 0xB527, 0xB527 }, +{ 0xB528, 0xB528, 0xB528 }, +{ 0xB529, 0xB529, 0xB529 }, +{ 0xB52A, 0xB52A, 0xB52A }, +{ 0xB52B, 0xB52B, 0xB52B }, +{ 0xB52C, 0xB52C, 0xB52C }, +{ 0xB52D, 0xB52D, 0xB52D }, +{ 0xB52E, 0xB52E, 0xB52E }, +{ 0xB52F, 0xB52F, 0xB52F }, +{ 0xB530, 0xB530, 0xB530 }, +{ 0xB531, 0xB531, 0xB531 }, +{ 0xB532, 0xB532, 0xB532 }, +{ 0xB533, 0xB533, 0xB533 }, +{ 0xB534, 0xB534, 0xB534 }, +{ 0xB535, 0xB535, 0xB535 }, +{ 0xB536, 0xB536, 0xB536 }, +{ 0xB537, 0xB537, 0xB537 }, +{ 0xB538, 0xB538, 0xB538 }, +{ 0xB539, 0xB539, 0xB539 }, +{ 0xB53A, 0xB53A, 0xB53A }, +{ 0xB53B, 0xB53B, 0xB53B }, +{ 0xB53C, 0xB53C, 0xB53C }, +{ 0xB53D, 0xB53D, 0xB53D }, +{ 0xB53E, 0xB53E, 0xB53E }, +{ 0xB53F, 0xB53F, 0xB53F }, +{ 0xB540, 0xB540, 0xB540 }, +{ 0xB541, 0xB541, 0xB541 }, +{ 0xB542, 0xB542, 0xB542 }, +{ 0xB543, 0xB543, 0xB543 }, +{ 0xB544, 0xB544, 0xB544 }, +{ 0xB545, 0xB545, 0xB545 }, +{ 0xB546, 0xB546, 0xB546 }, +{ 0xB547, 0xB547, 0xB547 }, +{ 0xB548, 0xB548, 0xB548 }, +{ 0xB549, 0xB549, 0xB549 }, +{ 0xB54A, 0xB54A, 0xB54A }, +{ 0xB54B, 0xB54B, 0xB54B }, +{ 0xB54C, 0xB54C, 0xB54C }, +{ 0xB54D, 0xB54D, 0xB54D }, +{ 0xB54E, 0xB54E, 0xB54E }, +{ 0xB54F, 0xB54F, 0xB54F }, +{ 0xB550, 0xB550, 0xB550 }, +{ 0xB551, 0xB551, 0xB551 }, +{ 0xB552, 0xB552, 0xB552 }, +{ 0xB553, 0xB553, 0xB553 }, +{ 0xB554, 0xB554, 0xB554 }, +{ 0xB555, 0xB555, 0xB555 }, +{ 0xB556, 0xB556, 0xB556 }, +{ 0xB557, 0xB557, 0xB557 }, +{ 0xB558, 0xB558, 0xB558 }, +{ 0xB559, 0xB559, 0xB559 }, +{ 0xB55A, 0xB55A, 0xB55A }, +{ 0xB55B, 0xB55B, 0xB55B }, +{ 0xB55C, 0xB55C, 0xB55C }, +{ 0xB55D, 0xB55D, 0xB55D }, +{ 0xB55E, 0xB55E, 0xB55E }, +{ 0xB55F, 0xB55F, 0xB55F }, +{ 0xB560, 0xB560, 0xB560 }, +{ 0xB561, 0xB561, 0xB561 }, +{ 0xB562, 0xB562, 0xB562 }, +{ 0xB563, 0xB563, 0xB563 }, +{ 0xB564, 0xB564, 0xB564 }, +{ 0xB565, 0xB565, 0xB565 }, +{ 0xB566, 0xB566, 0xB566 }, +{ 0xB567, 0xB567, 0xB567 }, +{ 0xB568, 0xB568, 0xB568 }, +{ 0xB569, 0xB569, 0xB569 }, +{ 0xB56A, 0xB56A, 0xB56A }, +{ 0xB56B, 0xB56B, 0xB56B }, +{ 0xB56C, 0xB56C, 0xB56C }, +{ 0xB56D, 0xB56D, 0xB56D }, +{ 0xB56E, 0xB56E, 0xB56E }, +{ 0xB56F, 0xB56F, 0xB56F }, +{ 0xB570, 0xB570, 0xB570 }, +{ 0xB571, 0xB571, 0xB571 }, +{ 0xB572, 0xB572, 0xB572 }, +{ 0xB573, 0xB573, 0xB573 }, +{ 0xB574, 0xB574, 0xB574 }, +{ 0xB575, 0xB575, 0xB575 }, +{ 0xB576, 0xB576, 0xB576 }, +{ 0xB577, 0xB577, 0xB577 }, +{ 0xB578, 0xB578, 0xB578 }, +{ 0xB579, 0xB579, 0xB579 }, +{ 0xB57A, 0xB57A, 0xB57A }, +{ 0xB57B, 0xB57B, 0xB57B }, +{ 0xB57C, 0xB57C, 0xB57C }, +{ 0xB57D, 0xB57D, 0xB57D }, +{ 0xB57E, 0xB57E, 0xB57E }, +{ 0xB57F, 0xB57F, 0xB57F }, +{ 0xB580, 0xB580, 0xB580 }, +{ 0xB581, 0xB581, 0xB581 }, +{ 0xB582, 0xB582, 0xB582 }, +{ 0xB583, 0xB583, 0xB583 }, +{ 0xB584, 0xB584, 0xB584 }, +{ 0xB585, 0xB585, 0xB585 }, +{ 0xB586, 0xB586, 0xB586 }, +{ 0xB587, 0xB587, 0xB587 }, +{ 0xB588, 0xB588, 0xB588 }, +{ 0xB589, 0xB589, 0xB589 }, +{ 0xB58A, 0xB58A, 0xB58A }, +{ 0xB58B, 0xB58B, 0xB58B }, +{ 0xB58C, 0xB58C, 0xB58C }, +{ 0xB58D, 0xB58D, 0xB58D }, +{ 0xB58E, 0xB58E, 0xB58E }, +{ 0xB58F, 0xB58F, 0xB58F }, +{ 0xB590, 0xB590, 0xB590 }, +{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}, +{ 0xB5FF, 0xB5FF, 0xB5FF }, +{ 0xB600, 0xB600, 0xB600 }, +{ 0xB601, 0xB601, 0xB601 }, +{ 0xB602, 0xB602, 0xB602 }, +{ 0xB603, 0xB603, 0xB603 }, +{ 0xB604, 0xB604, 0xB604 }, +{ 0xB605, 0xB605, 0xB605 }, +{ 0xB606, 0xB606, 0xB606 }, +{ 0xB607, 0xB607, 0xB607 }, +{ 0xB608, 0xB608, 0xB608 }, +{ 0xB609, 0xB609, 0xB609 }, +{ 0xB60A, 0xB60A, 0xB60A }, +{ 0xB60B, 0xB60B, 0xB60B }, +{ 0xB60C, 0xB60C, 0xB60C }, +{ 0xB60D, 0xB60D, 0xB60D }, +{ 0xB60E, 0xB60E, 0xB60E }, +{ 0xB60F, 0xB60F, 0xB60F }, +{ 0xB610, 0xB610, 0xB610 }, +{ 0xB611, 0xB611, 0xB611 }, +{ 0xB612, 0xB612, 0xB612 }, +{ 0xB613, 0xB613, 0xB613 }, +{ 0xB614, 0xB614, 0xB614 }, +{ 0xB615, 0xB615, 0xB615 }, +{ 0xB616, 0xB616, 0xB616 }, +{ 0xB617, 0xB617, 0xB617 }, +{ 0xB618, 0xB618, 0xB618 }, +{ 0xB619, 0xB619, 0xB619 }, +{ 0xB61A, 0xB61A, 0xB61A }, +{ 0xB61B, 0xB61B, 0xB61B }, +{ 0xB61C, 0xB61C, 0xB61C }, +{ 0xB61D, 0xB61D, 0xB61D }, +{ 0xB61E, 0xB61E, 0xB61E }, +{ 0xB61F, 0xB61F, 0xB61F }, +{ 0xB620, 0xB620, 0xB620 }, +{ 0xB621, 0xB621, 0xB621 }, +{ 0xB622, 0xB622, 0xB622 }, +{ 0xB623, 0xB623, 0xB623 }, +{ 0xB624, 0xB624, 0xB624 }, +{ 0xB625, 0xB625, 0xB625 }, +{ 0xB626, 0xB626, 0xB626 }, +{ 0xB627, 0xB627, 0xB627 }, +{ 0xB628, 0xB628, 0xB628 }, +{ 0xB629, 0xB629, 0xB629 }, +{ 0xB62A, 0xB62A, 0xB62A }, +{ 0xB62B, 0xB62B, 0xB62B }, +{ 0xB62C, 0xB62C, 0xB62C }, +{ 0xB62D, 0xB62D, 0xB62D }, +{ 0xB62E, 0xB62E, 0xB62E }, +{ 0xB62F, 0xB62F, 0xB62F }, +{ 0xB630, 0xB630, 0xB630 }, +{ 0xB631, 0xB631, 0xB631 }, +{ 0xB632, 0xB632, 0xB632 }, +{ 0xB633, 0xB633, 0xB633 }, +{ 0xB634, 0xB634, 0xB634 }, +{ 0xB635, 0xB635, 0xB635 }, +{ 0xB636, 0xB636, 0xB636 }, +{ 0xB637, 0xB637, 0xB637 }, +{ 0xB638, 0xB638, 0xB638 }, +{ 0xB639, 0xB639, 0xB639 }, +{ 0xB63A, 0xB63A, 0xB63A }, +{ 0xB63B, 0xB63B, 0xB63B }, +{ 0xB63C, 0xB63C, 0xB63C }, +{ 0xB63D, 0xB63D, 0xB63D }, +{ 0xB63E, 0xB63E, 0xB63E }, +{ 0xB63F, 0xB63F, 0xB63F }, +{ 0xB640, 0xB640, 0xB640 }, +{ 0xB641, 0xB641, 0xB641 }, +{ 0xB642, 0xB642, 0xB642 }, +{ 0xB643, 0xB643, 0xB643 }, +{ 0xB644, 0xB644, 0xB644 }, +{ 0xB645, 0xB645, 0xB645 }, +{ 0xB646, 0xB646, 0xB646 }, +{ 0xB647, 0xB647, 0xB647 }, +{ 0xB648, 0xB648, 0xB648 }, +{ 0xB649, 0xB649, 0xB649 }, +{ 0xB64A, 0xB64A, 0xB64A }, +{ 0xB64B, 0xB64B, 0xB64B }, +{ 0xB64C, 0xB64C, 0xB64C }, +{ 0xB64D, 0xB64D, 0xB64D }, +{ 0xB64E, 0xB64E, 0xB64E }, +{ 0xB64F, 0xB64F, 0xB64F }, +{ 0xB650, 0xB650, 0xB650 }, +{ 0xB651, 0xB651, 0xB651 }, +{ 0xB652, 0xB652, 0xB652 }, +{ 0xB653, 0xB653, 0xB653 }, +{ 0xB654, 0xB654, 0xB654 }, +{ 0xB655, 0xB655, 0xB655 }, +{ 0xB656, 0xB656, 0xB656 }, +{ 0xB657, 0xB657, 0xB657 }, +{ 0xB658, 0xB658, 0xB658 }, +{ 0xB659, 0xB659, 0xB659 }, +{ 0xB65A, 0xB65A, 0xB65A }, +{ 0xB65B, 0xB65B, 0xB65B }, +{ 0xB65C, 0xB65C, 0xB65C }, +{ 0xB65D, 0xB65D, 0xB65D }, +{ 0xB65E, 0xB65E, 0xB65E }, +{ 0xB65F, 0xB65F, 0xB65F }, +{ 0xB660, 0xB660, 0xB660 }, +{ 0xB661, 0xB661, 0xB661 }, +{ 0xB662, 0xB662, 0xB662 }, +{ 0xB663, 0xB663, 0xB663 }, +{ 0xB664, 0xB664, 0xB664 }, +{ 0xB665, 0xB665, 0xB665 }, +{ 0xB666, 0xB666, 0xB666 }, +{ 0xB667, 0xB667, 0xB667 }, +{ 0xB668, 0xB668, 0xB668 }, +{ 0xB669, 0xB669, 0xB669 }, +{ 0xB66A, 0xB66A, 0xB66A }, +{ 0xB66B, 0xB66B, 0xB66B }, +{ 0xB66C, 0xB66C, 0xB66C }, +{ 0xB66D, 0xB66D, 0xB66D }, +{ 0xB66E, 0xB66E, 0xB66E }, +{ 0xB66F, 0xB66F, 0xB66F }, +{ 0xB670, 0xB670, 0xB670 }, +{ 0xB671, 0xB671, 0xB671 }, +{ 0xB672, 0xB672, 0xB672 }, +{ 0xB673, 0xB673, 0xB673 }, +{ 0xB674, 0xB674, 0xB674 }, +{ 0xB675, 0xB675, 0xB675 }, +{ 0xB676, 0xB676, 0xB676 }, +{ 0xB677, 0xB677, 0xB677 }, +{ 0xB678, 0xB678, 0xB678 }, +{ 0xB679, 0xB679, 0xB679 }, +{ 0xB67A, 0xB67A, 0xB67A }, +{ 0xB67B, 0xB67B, 0xB67B }, +{ 0xB67C, 0xB67C, 0xB67C }, +{ 0xB67D, 0xB67D, 0xB67D }, +{ 0xB67E, 0xB67E, 0xB67E }, +{ 0xB67F, 0xB67F, 0xB67F }, +{ 0xB680, 0xB680, 0xB680 }, +{ 0xB681, 0xB681, 0xB681 }, +{ 0xB682, 0xB682, 0xB682 }, +{ 0xB683, 0xB683, 0xB683 }, +{ 0xB684, 0xB684, 0xB684 }, +{ 0xB685, 0xB685, 0xB685 }, +{ 0xB686, 0xB686, 0xB686 }, +{ 0xB687, 0xB687, 0xB687 }, +{ 0xB688, 0xB688, 0xB688 }, +{ 0xB689, 0xB689, 0xB689 }, +{ 0xB68A, 0xB68A, 0xB68A }, +{ 0xB68B, 0xB68B, 0xB68B }, +{ 0xB68C, 0xB68C, 0xB68C }, +{ 0xB68D, 0xB68D, 0xB68D }, +{ 0xB68E, 0xB68E, 0xB68E }, +{ 0xB68F, 0xB68F, 0xB68F }, +{ 0xB690, 0xB690, 0xB690 }, +{ 0xB691, 0xB691, 0xB691 }, +{ 0xB692, 0xB692, 0xB692 }, +{ 0xB693, 0xB693, 0xB693 }, +{ 0xB694, 0xB694, 0xB694 }, +{ 0xB695, 0xB695, 0xB695 }, +{ 0xB696, 0xB696, 0xB696 }, +{ 0xB697, 0xB697, 0xB697 }, +{ 0xB698, 0xB698, 0xB698 }, +{ 0xB699, 0xB699, 0xB699 }, +{ 0xB69A, 0xB69A, 0xB69A }, +{ 0xB69B, 0xB69B, 0xB69B }, +{ 0xB69C, 0xB69C, 0xB69C }, +{ 0xB69D, 0xB69D, 0xB69D }, +{ 0xB69E, 0xB69E, 0xB69E }, +{ 0xB69F, 0xB69F, 0xB69F }, +{ 0xB6A0, 0xB6A0, 0xB6A0 }, +{ 0xB6A1, 0xB6A1, 0xB6A1 }, +{ 0xB6A2, 0xB6A2, 0xB6A2 }, +{ 0xB6A3, 0xB6A3, 0xB6A3 }, +{ 0xB6A4, 0xB6A4, 0xB6A4 }, +{ 0xB6A5, 0xB6A5, 0xB6A5 }, +{ 0xB6A6, 0xB6A6, 0xB6A6 }, +{ 0xB6A7, 0xB6A7, 0xB6A7 }, +{ 0xB6A8, 0xB6A8, 0xB6A8 }, +{ 0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F0 }, +{ 0xB6F1, 0xB6F1, 0xB6F1 }, +{ 0xB6F2, 0xB6F2, 0xB6F2 }, +{ 0xB6F3, 0xB6F3, 0xB6F3 }, +{ 0xB6F4, 0xB6F4, 0xB6F4 }, +{ 0xB6F5, 0xB6F5, 0xB6F5 }, +{ 0xB6F6, 0xB6F6, 0xB6F6 }, +{ 0xB6F7, 0xB6F7, 0xB6F7 }, +{ 0xB6F8, 0xB6F8, 0xB6F8 }, +{ 0xB6F9, 0xB6F9, 0xB6F9 }, +{ 0xB6FA, 0xB6FA, 0xB6FA }, +{ 0xB6FB, 0xB6FB, 0xB6FB }, +{ 0xB6FC, 0xB6FC, 0xB6FC }, +{ 0xB6FD, 0xB6FD, 0xB6FD }, +{ 0xB6FE, 0xB6FE, 0xB6FE }, +{ 0xB6FF, 0xB6FF, 0xB6FF }, +{ 0xB700, 0xB700, 0xB700 }, +{ 0xB701, 0xB701, 0xB701 }, +{ 0xB702, 0xB702, 0xB702 }, +{ 0xB703, 0xB703, 0xB703 }, +{ 0xB704, 0xB704, 0xB704 }, +{ 0xB705, 0xB705, 0xB705 }, +{ 0xB706, 0xB706, 0xB706 }, +{ 0xB707, 0xB707, 0xB707 }, +{ 0xB708, 0xB708, 0xB708 }, +{ 0xB709, 0xB709, 0xB709 }, +{ 0xB70A, 0xB70A, 0xB70A }, +{ 0xB70B, 0xB70B, 0xB70B }, +{ 0xB70C, 0xB70C, 0xB70C }, +{ 0xB70D, 0xB70D, 0xB70D }, +{ 0xB70E, 0xB70E, 0xB70E }, +{ 0xB70F, 0xB70F, 0xB70F }, +{ 0xB710, 0xB710, 0xB710 }, +{ 0xB711, 0xB711, 0xB711 }, +{ 0xB712, 0xB712, 0xB712 }, +{ 0xB713, 0xB713, 0xB713 }, +{ 0xB714, 0xB714, 0xB714 }, +{ 0xB715, 0xB715, 0xB715 }, +{ 0xB716, 0xB716, 0xB716 }, +{ 0xB717, 0xB717, 0xB717 }, +{ 0xB718, 0xB718, 0xB718 }, +{ 0xB719, 0xB719, 0xB719 }, +{ 0xB71A, 0xB71A, 0xB71A }, +{ 0xB71B, 0xB71B, 0xB71B }, +{ 0xB71C, 0xB71C, 0xB71C }, +{ 0xB71D, 0xB71D, 0xB71D }, +{ 0xB71E, 0xB71E, 0xB71E }, +{ 0xB71F, 0xB71F, 0xB71F }, +{ 0xB720, 0xB720, 0xB720 }, +{ 0xB721, 0xB721, 0xB721 }, +{ 0xB722, 0xB722, 0xB722 }, +{ 0xB723, 0xB723, 0xB723 }, +{ 0xB724, 0xB724, 0xB724 }, +{ 0xB725, 0xB725, 0xB725 }, +{ 0xB726, 0xB726, 0xB726 }, +{ 0xB727, 0xB727, 0xB727 }, +{ 0xB728, 0xB728, 0xB728 }, +{ 0xB729, 0xB729, 0xB729 }, +{ 0xB72A, 0xB72A, 0xB72A }, +{ 0xB72B, 0xB72B, 0xB72B }, +{ 0xB72C, 0xB72C, 0xB72C }, +{ 0xB72D, 0xB72D, 0xB72D }, +{ 0xB72E, 0xB72E, 0xB72E }, +{ 0xB72F, 0xB72F, 0xB72F }, +{ 0xB730, 0xB730, 0xB730 }, +{ 0xB731, 0xB731, 0xB731 }, +{ 0xB732, 0xB732, 0xB732 }, +{ 0xB733, 0xB733, 0xB733 }, +{ 0xB734, 0xB734, 0xB734 }, +{ 0xB735, 0xB735, 0xB735 }, +{ 0xB736, 0xB736, 0xB736 }, +{ 0xB737, 0xB737, 0xB737 }, +{ 0xB738, 0xB738, 0xB738 }, +{ 0xB739, 0xB739, 0xB739 }, +{ 0xB73A, 0xB73A, 0xB73A }, +{ 0xB73B, 0xB73B, 0xB73B }, +{ 0xB73C, 0xB73C, 0xB73C }, +{ 0xB73D, 0xB73D, 0xB73D }, +{ 0xB73E, 0xB73E, 0xB73E }, +{ 0xB73F, 0xB73F, 0xB73F }, +{ 0xB740, 0xB740, 0xB740 }, +{ 0xB741, 0xB741, 0xB741 }, +{ 0xB742, 0xB742, 0xB742 }, +{ 0xB743, 0xB743, 0xB743 }, +{ 0xB744, 0xB744, 0xB744 }, +{ 0xB745, 0xB745, 0xB745 }, +{ 0xB746, 0xB746, 0xB746 }, +{ 0xB747, 0xB747, 0xB747 }, +{ 0xB748, 0xB748, 0xB748 }, +{ 0xB749, 0xB749, 0xB749 }, +{ 0xB74A, 0xB74A, 0xB74A }, +{ 0xB74B, 0xB74B, 0xB74B }, +{ 0xB74C, 0xB74C, 0xB74C }, +{ 0xB74D, 0xB74D, 0xB74D }, +{ 0xB74E, 0xB74E, 0xB74E }, +{ 0xB74F, 0xB74F, 0xB74F }, +{ 0xB750, 0xB750, 0xB750 }, +{ 0xB751, 0xB751, 0xB751 }, +{ 0xB752, 0xB752, 0xB752 }, +{ 0xB753, 0xB753, 0xB753 }, +{ 0xB754, 0xB754, 0xB754 }, +{ 0xB755, 0xB755, 0xB755 }, +{ 0xB756, 0xB756, 0xB756 }, +{ 0xB757, 0xB757, 0xB757 }, +{ 0xB758, 0xB758, 0xB758 }, +{ 0xB759, 0xB759, 0xB759 }, +{ 0xB75A, 0xB75A, 0xB75A }, +{ 0xB75B, 0xB75B, 0xB75B }, +{ 0xB75C, 0xB75C, 0xB75C }, +{ 0xB75D, 0xB75D, 0xB75D }, +{ 0xB75E, 0xB75E, 0xB75E }, +{ 0xB75F, 0xB75F, 0xB75F }, +{ 0xB760, 0xB760, 0xB760 }, +{ 0xB761, 0xB761, 0xB761 }, +{ 0xB762, 0xB762, 0xB762 }, +{ 0xB763, 0xB763, 0xB763 }, +{ 0xB764, 0xB764, 0xB764 }, +{ 0xB765, 0xB765, 0xB765 }, +{ 0xB766, 0xB766, 0xB766 }, +{ 0xB767, 0xB767, 0xB767 }, +{ 0xB768, 0xB768, 0xB768 }, +{ 0xB769, 0xB769, 0xB769 }, +{ 0xB76A, 0xB76A, 0xB76A }, +{ 0xB76B, 0xB76B, 0xB76B }, +{ 0xB76C, 0xB76C, 0xB76C }, +{ 0xB76D, 0xB76D, 0xB76D }, +{ 0xB76E, 0xB76E, 0xB76E }, +{ 0xB76F, 0xB76F, 0xB76F }, +{ 0xB770, 0xB770, 0xB770 }, +{ 0xB771, 0xB771, 0xB771 }, +{ 0xB772, 0xB772, 0xB772 }, +{ 0xB773, 0xB773, 0xB773 }, +{ 0xB774, 0xB774, 0xB774 }, +{ 0xB775, 0xB775, 0xB775 }, +{ 0xB776, 0xB776, 0xB776 }, +{ 0xB777, 0xB777, 0xB777 }, +{ 0xB778, 0xB778, 0xB778 }, +{ 0xB779, 0xB779, 0xB779 }, +{ 0xB77A, 0xB77A, 0xB77A }, +{ 0xB77B, 0xB77B, 0xB77B }, +{ 0xB77C, 0xB77C, 0xB77C }, +{ 0xB77D, 0xB77D, 0xB77D }, +{ 0xB77E, 0xB77E, 0xB77E }, +{ 0xB77F, 0xB77F, 0xB77F }, +{ 0xB780, 0xB780, 0xB780 }, +{ 0xB781, 0xB781, 0xB781 }, +{ 0xB782, 0xB782, 0xB782 }, +{ 0xB783, 0xB783, 0xB783 }, +{ 0xB784, 0xB784, 0xB784 }, +{ 0xB785, 0xB785, 0xB785 }, +{ 0xB786, 0xB786, 0xB786 }, +{ 0xB787, 0xB787, 0xB787 }, +{ 0xB788, 0xB788, 0xB788 }, +{ 0xB789, 0xB789, 0xB789 }, +{ 0xB78A, 0xB78A, 0xB78A }, +{ 0xB78B, 0xB78B, 0xB78B }, +{ 0xB78C, 0xB78C, 0xB78C }, +{ 0xB78D, 0xB78D, 0xB78D }, +{ 0xB78E, 0xB78E, 0xB78E }, +{ 0xB78F, 0xB78F, 0xB78F }, +{ 0xB790, 0xB790, 0xB790 }, +{ 0xB791, 0xB791, 0xB791 }, +{ 0xB792, 0xB792, 0xB792 }, +{ 0xB793, 0xB793, 0xB793 }, +{ 0xB794, 0xB794, 0xB794 }, +{ 0xB795, 0xB795, 0xB795 }, +{ 0xB796, 0xB796, 0xB796 }, +{ 0xB797, 0xB797, 0xB797 }, +{ 0xB798, 0xB798, 0xB798 }, +{ 0xB799, 0xB799, 0xB799 }, +{ 0xB79A, 0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 0xB808, 0xB808, 0xB808 }, +{ 0xB809, 0xB809, 0xB809 }, +{ 0xB80A, 0xB80A, 0xB80A }, +{ 0xB80B, 0xB80B, 0xB80B }, +{ 0xB80C, 0xB80C, 0xB80C }, +{ 0xB80D, 0xB80D, 0xB80D }, +{ 0xB80E, 0xB80E, 0xB80E }, +{ 0xB80F, 0xB80F, 0xB80F }, +{ 0xB810, 0xB810, 0xB810 }, +{ 0xB811, 0xB811, 0xB811 }, +{ 0xB812, 0xB812, 0xB812 }, +{ 0xB813, 0xB813, 0xB813 }, +{ 0xB814, 0xB814, 0xB814 }, +{ 0xB815, 0xB815, 0xB815 }, +{ 0xB816, 0xB816, 0xB816 }, +{ 0xB817, 0xB817, 0xB817 }, +{ 0xB818, 0xB818, 0xB818 }, +{ 0xB819, 0xB819, 0xB819 }, +{ 0xB81A, 0xB81A, 0xB81A }, +{ 0xB81B, 0xB81B, 0xB81B }, +{ 0xB81C, 0xB81C, 0xB81C }, +{ 0xB81D, 0xB81D, 0xB81D }, +{ 0xB81E, 0xB81E, 0xB81E }, +{ 0xB81F, 0xB81F, 0xB81F }, +{ 0xB820, 0xB820, 0xB820 }, +{ 0xB821, 0xB821, 0xB821 }, +{ 0xB822, 0xB822, 0xB822 }, +{ 0xB823, 0xB823, 0xB823 }, +{ 0xB824, 0xB824, 0xB824 }, +{ 0xB825, 0xB825, 0xB825 }, +{ 0xB826, 0xB826, 0xB826 }, +{ 0xB827, 0xB827, 0xB827 }, +{ 0xB828, 0xB828, 0xB828 }, +{ 0xB829, 0xB829, 0xB829 }, +{ 0xB82A, 0xB82A, 0xB82A }, +{ 0xB82B, 0xB82B, 0xB82B }, +{ 0xB82C, 0xB82C, 0xB82C }, +{ 0xB82D, 0xB82D, 0xB82D }, +{ 0xB82E, 0xB82E, 0xB82E }, +{ 0xB82F, 0xB82F, 0xB82F }, +{ 0xB830, 0xB830, 0xB830 }, +{ 0xB831, 0xB831, 0xB831 }, +{ 0xB832, 0xB832, 0xB832 }, +{ 0xB833, 0xB833, 0xB833 }, +{ 0xB834, 0xB834, 0xB834 }, +{ 0xB835, 0xB835, 0xB835 }, +{ 0xB836, 0xB836, 0xB836 }, +{ 0xB837, 0xB837, 0xB837 }, +{ 0xB838, 0xB838, 0xB838 }, +{ 0xB839, 0xB839, 0xB839 }, +{ 0xB83A, 0xB83A, 0xB83A }, +{ 0xB83B, 0xB83B, 0xB83B }, +{ 0xB83C, 0xB83C, 0xB83C }, +{ 0xB83D, 0xB83D, 0xB83D }, +{ 0xB83E, 0xB83E, 0xB83E }, +{ 0xB83F, 0xB83F, 0xB83F }, +{ 0xB840, 0xB840, 0xB840 }, +{ 0xB841, 0xB841, 0xB841 }, +{ 0xB842, 0xB842, 0xB842 }, +{ 0xB843, 0xB843, 0xB843 }, +{ 0xB844, 0xB844, 0xB844 }, +{ 0xB845, 0xB845, 0xB845 }, +{ 0xB846, 0xB846, 0xB846 }, +{ 0xB847, 0xB847, 0xB847 }, +{ 0xB848, 0xB848, 0xB848 }, +{ 0xB849, 0xB849, 0xB849 }, +{ 0xB84A, 0xB84A, 0xB84A }, +{ 0xB84B, 0xB84B, 0xB84B }, +{ 0xB84C, 0xB84C, 0xB84C }, +{ 0xB84D, 0xB84D, 0xB84D }, +{ 0xB84E, 0xB84E, 0xB84E }, +{ 0xB84F, 0xB84F, 0xB84F }, +{ 0xB850, 0xB850, 0xB850 }, +{ 0xB851, 0xB851, 0xB851 }, +{ 0xB852, 0xB852, 0xB852 }, +{ 0xB853, 0xB853, 0xB853 }, +{ 0xB854, 0xB854, 0xB854 }, +{ 0xB855, 0xB855, 0xB855 }, +{ 0xB856, 0xB856, 0xB856 }, +{ 0xB857, 0xB857, 0xB857 }, +{ 0xB858, 0xB858, 0xB858 }, +{ 0xB859, 0xB859, 0xB859 }, +{ 0xB85A, 0xB85A, 0xB85A }, +{ 0xB85B, 0xB85B, 0xB85B }, +{ 0xB85C, 0xB85C, 0xB85C }, +{ 0xB85D, 0xB85D, 0xB85D }, +{ 0xB85E, 0xB85E, 0xB85E }, +{ 0xB85F, 0xB85F, 0xB85F }, +{ 0xB860, 0xB860, 0xB860 }, +{ 0xB861, 0xB861, 0xB861 }, +{ 0xB862, 0xB862, 0xB862 }, +{ 0xB863, 0xB863, 0xB863 }, +{ 0xB864, 0xB864, 0xB864 }, +{ 0xB865, 0xB865, 0xB865 }, +{ 0xB866, 0xB866, 0xB866 }, +{ 0xB867, 0xB867, 0xB867 }, +{ 0xB868, 0xB868, 0xB868 }, +{ 0xB869, 0xB869, 0xB869 }, +{ 0xB86A, 0xB86A, 0xB86A }, +{ 0xB86B, 0xB86B, 0xB86B }, +{ 0xB86C, 0xB86C, 0xB86C }, +{ 0xB86D, 0xB86D, 0xB86D }, +{ 0xB86E, 0xB86E, 0xB86E }, +{ 0xB86F, 0xB86F, 0xB86F }, +{ 0xB870, 0xB870, 0xB870 }, +{ 0xB871, 0xB871, 0xB871 }, +{ 0xB872, 0xB872, 0xB872 }, +{ 0xB873, 0xB873, 0xB873 }, +{ 0xB874, 0xB874, 0xB874 }, +{ 0xB875, 0xB875, 0xB875 }, +{ 0xB876, 0xB876, 0xB876 }, +{ 0xB877, 0xB877, 0xB877 }, +{ 0xB878, 0xB878, 0xB878 }, +{ 0xB879, 0xB879, 0xB879 }, +{ 0xB87A, 0xB87A, 0xB87A }, +{ 0xB87B, 0xB87B, 0xB87B }, +{ 0xB87C, 0xB87C, 0xB87C }, +{ 0xB87D, 0xB87D, 0xB87D }, +{ 0xB87E, 0xB87E, 0xB87E }, +{ 0xB87F, 0xB87F, 0xB87F }, +{ 0xB880, 0xB880, 0xB880 }, +{ 0xB881, 0xB881, 0xB881 }, +{ 0xB882, 0xB882, 0xB882 }, +{ 0xB883, 0xB883, 0xB883 }, +{ 0xB884, 0xB884, 0xB884 }, +{ 0xB885, 0xB885, 0xB885 }, +{ 0xB886, 0xB886, 0xB886 }, +{ 0xB887, 0xB887, 0xB887 }, +{ 0xB888, 0xB888, 0xB888 }, +{ 0xB889, 0xB889, 0xB889 }, +{ 0xB88A, 0xB88A, 0xB88A }, +{ 0xB88B, 0xB88B, 0xB88B }, +{ 0xB88C, 0xB88C, 0xB88C }, +{ 0xB88D, 0xB88D, 0xB88D }, +{ 0xB88E, 0xB88E, 0xB88E }, +{ 0xB88F, 0xB88F, 0xB88F }, +{ 0xB890, 0xB890, 0xB890 }, +{ 0xB891, 0xB891, 0xB891 }, +{ 0xB892, 0xB892, 0xB892 }, +{ 0xB893, 0xB893, 0xB893 }, +{ 0xB894, 0xB894, 0xB894 }, +{ 0xB895, 0xB895, 0xB895 }, +{ 0xB896, 0xB896, 0xB896 }, +{ 0xB897, 0xB897, 0xB897 }, +{ 0xB898, 0xB898, 0xB898 }, +{ 0xB899, 0xB899, 0xB899 }, +{ 0xB89A, 0xB89A, 0xB89A }, +{ 0xB89B, 0xB89B, 0xB89B }, +{ 0xB89C, 0xB89C, 0xB89C }, +{ 0xB89D, 0xB89D, 0xB89D }, +{ 0xB89E, 0xB89E, 0xB89E }, +{ 0xB89F, 0xB89F, 0xB89F }, +{ 0xB8A0, 0xB8A0, 0xB8A0 }, +{ 0xB8A1, 0xB8A1, 0xB8A1 }, +{ 0xB8A2, 0xB8A2, 0xB8A2 }, +{ 0xB8A3, 0xB8A3, 0xB8A3 }, +{ 0xB8A4, 0xB8A4, 0xB8A4 }, +{ 0xB8A5, 0xB8A5, 0xB8A5 }, +{ 0xB8A6, 0xB8A6, 0xB8A6 }, +{ 0xB8A7, 0xB8A7, 0xB8A7 }, +{ 0xB8A8, 0xB8A8, 0xB8A8 }, +{ 0xB8A9, 0xB8A9, 0xB8A9 }, +{ 0xB8AA, 0xB8AA, 0xB8AA }, +{ 0xB8AB, 0xB8AB, 0xB8AB }, +{ 0xB8AC, 0xB8AC, 0xB8AC }, +{ 0xB8AD, 0xB8AD, 0xB8AD }, +{ 0xB8AE, 0xB8AE, 0xB8AE }, +{ 0xB8AF, 0xB8AF, 0xB8AF }, +{ 0xB8B0, 0xB8B0, 0xB8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F8, 0xB8F8, 0xB8F8 }, +{ 0xB8F9, 0xB8F9, 0xB8F9 }, +{ 0xB8FA, 0xB8FA, 0xB8FA }, +{ 0xB8FB, 0xB8FB, 0xB8FB }, +{ 0xB8FC, 0xB8FC, 0xB8FC }, +{ 0xB8FD, 0xB8FD, 0xB8FD }, +{ 0xB8FE, 0xB8FE, 0xB8FE }, +{ 0xB8FF, 0xB8FF, 0xB8FF }, +{ 0xB900, 0xB900, 0xB900 }, +{ 0xB901, 0xB901, 0xB901 }, +{ 0xB902, 0xB902, 0xB902 }, +{ 0xB903, 0xB903, 0xB903 }, +{ 0xB904, 0xB904, 0xB904 }, +{ 0xB905, 0xB905, 0xB905 }, +{ 0xB906, 0xB906, 0xB906 }, +{ 0xB907, 0xB907, 0xB907 }, +{ 0xB908, 0xB908, 0xB908 }, +{ 0xB909, 0xB909, 0xB909 }, +{ 0xB90A, 0xB90A, 0xB90A }, +{ 0xB90B, 0xB90B, 0xB90B }, +{ 0xB90C, 0xB90C, 0xB90C }, +{ 0xB90D, 0xB90D, 0xB90D }, +{ 0xB90E, 0xB90E, 0xB90E }, +{ 0xB90F, 0xB90F, 0xB90F }, +{ 0xB910, 0xB910, 0xB910 }, +{ 0xB911, 0xB911, 0xB911 }, +{ 0xB912, 0xB912, 0xB912 }, +{ 0xB913, 0xB913, 0xB913 }, +{ 0xB914, 0xB914, 0xB914 }, +{ 0xB915, 0xB915, 0xB915 }, +{ 0xB916, 0xB916, 0xB916 }, +{ 0xB917, 0xB917, 0xB917 }, +{ 0xB918, 0xB918, 0xB918 }, +{ 0xB919, 0xB919, 0xB919 }, +{ 0xB91A, 0xB91A, 0xB91A }, +{ 0xB91B, 0xB91B, 0xB91B }, +{ 0xB91C, 0xB91C, 0xB91C }, +{ 0xB91D, 0xB91D, 0xB91D }, +{ 0xB91E, 0xB91E, 0xB91E }, +{ 0xB91F, 0xB91F, 0xB91F }, +{ 0xB920, 0xB920, 0xB920 }, +{ 0xB921, 0xB921, 0xB921 }, +{ 0xB922, 0xB922, 0xB922 }, +{ 0xB923, 0xB923, 0xB923 }, +{ 0xB924, 0xB924, 0xB924 }, +{ 0xB925, 0xB925, 0xB925 }, +{ 0xB926, 0xB926, 0xB926 }, +{ 0xB927, 0xB927, 0xB927 }, +{ 0xB928, 0xB928, 0xB928 }, +{ 0xB929, 0xB929, 0xB929 }, +{ 0xB92A, 0xB92A, 0xB92A }, +{ 0xB92B, 0xB92B, 0xB92B }, +{ 0xB92C, 0xB92C, 0xB92C }, +{ 0xB92D, 0xB92D, 0xB92D }, +{ 0xB92E, 0xB92E, 0xB92E }, +{ 0xB92F, 0xB92F, 0xB92F }, +{ 0xB930, 0xB930, 0xB930 }, +{ 0xB931, 0xB931, 0xB931 }, +{ 0xB932, 0xB932, 0xB932 }, +{ 0xB933, 0xB933, 0xB933 }, +{ 0xB934, 0xB934, 0xB934 }, +{ 0xB935, 0xB935, 0xB935 }, +{ 0xB936, 0xB936, 0xB936 }, +{ 0xB937, 0xB937, 0xB937 }, +{ 0xB938, 0xB938, 0xB938 }, +{ 0xB939, 0xB939, 0xB939 }, +{ 0xB93A, 0xB93A, 0xB93A }, +{ 0xB93B, 0xB93B, 0xB93B }, +{ 0xB93C, 0xB93C, 0xB93C }, +{ 0xB93D, 0xB93D, 0xB93D }, +{ 0xB93E, 0xB93E, 0xB93E }, +{ 0xB93F, 0xB93F, 0xB93F }, +{ 0xB940, 0xB940, 0xB940 }, +{ 0xB941, 0xB941, 0xB941 }, +{ 0xB942, 0xB942, 0xB942 }, +{ 0xB943, 0xB943, 0xB943 }, +{ 0xB944, 0xB944, 0xB944 }, +{ 0xB945, 0xB945, 0xB945 }, +{ 0xB946, 0xB946, 0xB946 }, +{ 0xB947, 0xB947, 0xB947 }, +{ 0xB948, 0xB948, 0xB948 }, +{ 0xB949, 0xB949, 0xB949 }, +{ 0xB94A, 0xB94A, 0xB94A }, +{ 0xB94B, 0xB94B, 0xB94B }, +{ 0xB94C, 0xB94C, 0xB94C }, +{ 0xB94D, 0xB94D, 0xB94D }, +{ 0xB94E, 0xB94E, 0xB94E }, +{ 0xB94F, 0xB94F, 0xB94F }, +{ 0xB950, 0xB950, 0xB950 }, +{ 0xB951, 0xB951, 0xB951 }, +{ 0xB952, 0xB952, 0xB952 }, +{ 0xB953, 0xB953, 0xB953 }, +{ 0xB954, 0xB954, 0xB954 }, +{ 0xB955, 0xB955, 0xB955 }, +{ 0xB956, 0xB956, 0xB956 }, +{ 0xB957, 0xB957, 0xB957 }, +{ 0xB958, 0xB958, 0xB958 }, +{ 0xB959, 0xB959, 0xB959 }, +{ 0xB95A, 0xB95A, 0xB95A }, +{ 0xB95B, 0xB95B, 0xB95B }, +{ 0xB95C, 0xB95C, 0xB95C }, +{ 0xB95D, 0xB95D, 0xB95D }, +{ 0xB95E, 0xB95E, 0xB95E }, +{ 0xB95F, 0xB95F, 0xB95F }, +{ 0xB960, 0xB960, 0xB960 }, +{ 0xB961, 0xB961, 0xB961 }, +{ 0xB962, 0xB962, 0xB962 }, +{ 0xB963, 0xB963, 0xB963 }, +{ 0xB964, 0xB964, 0xB964 }, +{ 0xB965, 0xB965, 0xB965 }, +{ 0xB966, 0xB966, 0xB966 }, +{ 0xB967, 0xB967, 0xB967 }, +{ 0xB968, 0xB968, 0xB968 }, +{ 0xB969, 0xB969, 0xB969 }, +{ 0xB96A, 0xB96A, 0xB96A }, +{ 0xB96B, 0xB96B, 0xB96B }, +{ 0xB96C, 0xB96C, 0xB96C }, +{ 0xB96D, 0xB96D, 0xB96D }, +{ 0xB96E, 0xB96E, 0xB96E }, +{ 0xB96F, 0xB96F, 0xB96F }, +{ 0xB970, 0xB970, 0xB970 }, +{ 0xB971, 0xB971, 0xB971 }, +{ 0xB972, 0xB972, 0xB972 }, +{ 0xB973, 0xB973, 0xB973 }, +{ 0xB974, 0xB974, 0xB974 }, +{ 0xB975, 0xB975, 0xB975 }, +{ 0xB976, 0xB976, 0xB976 }, +{ 0xB977, 0xB977, 0xB977 }, +{ 0xB978, 0xB978, 0xB978 }, +{ 0xB979, 0xB979, 0xB979 }, +{ 0xB97A, 0xB97A, 0xB97A }, +{ 0xB97B, 0xB97B, 0xB97B }, +{ 0xB97C, 0xB97C, 0xB97C }, +{ 0xB97D, 0xB97D, 0xB97D }, +{ 0xB97E, 0xB97E, 0xB97E }, +{ 0xB97F, 0xB97F, 0xB97F }, +{ 0xB980, 0xB980, 0xB980 }, +{ 0xB981, 0xB981, 0xB981 }, +{ 0xB982, 0xB982, 0xB982 }, +{ 0xB983, 0xB983, 0xB983 }, +{ 0xB984, 0xB984, 0xB984 }, +{ 0xB985, 0xB985, 0xB985 }, +{ 0xB986, 0xB986, 0xB986 }, +{ 0xB987, 0xB987, 0xB987 }, +{ 0xB988, 0xB988, 0xB988 }, +{ 0xB989, 0xB989, 0xB989 }, +{ 0xB98A, 0xB98A, 0xB98A }, +{ 0xB98B, 0xB98B, 0xB98B }, +{ 0xB98C, 0xB98C, 0xB98C }, +{ 0xB98D, 0xB98D, 0xB98D }, +{ 0xB98E, 0xB98E, 0xB98E }, +{ 0xB98F, 0xB98F, 0xB98F }, +{ 0xB990, 0xB990, 0xB990 }, +{ 0xB991, 0xB991, 0xB991 }, +{ 0xB992, 0xB992, 0xB992 }, +{ 0xB993, 0xB993, 0xB993 }, +{ 0xB994, 0xB994, 0xB994 }, +{ 0xB995, 0xB995, 0xB995 }, +{ 0xB996, 0xB996, 0xB996 }, +{ 0xB997, 0xB997, 0xB997 }, +{ 0xB998, 0xB998, 0xB998 }, +{ 0xB999, 0xB999, 0xB999 }, +{ 0xB99A, 0xB99A, 0xB99A }, +{ 0xB99B, 0xB99B, 0xB99B }, +{ 0xB99C, 0xB99C, 0xB99C }, +{ 0xB99D, 0xB99D, 0xB99D }, +{ 0xB99E, 0xB99E, 0xB99E }, +{ 0xB99F, 0xB99F, 0xB99F }, +{ 0xB9A0, 0xB9A0, 0xB9A0 }, +{ 0xB9A1, 0xB9A1, 0xB9A1 }, +{ 0xB9A2, 0xB9A2, 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E, 0xC00E, 0xC00E }, +{ 0xC00F, 0xC00F, 0xC00F }, +{ 0xC010, 0xC010, 0xC010 }, +{ 0xC011, 0xC011, 0xC011 }, +{ 0xC012, 0xC012, 0xC012 }, +{ 0xC013, 0xC013, 0xC013 }, +{ 0xC014, 0xC014, 0xC014 }, +{ 0xC015, 0xC015, 0xC015 }, +{ 0xC016, 0xC016, 0xC016 }, +{ 0xC017, 0xC017, 0xC017 }, +{ 0xC018, 0xC018, 0xC018 }, +{ 0xC019, 0xC019, 0xC019 }, +{ 0xC01A, 0xC01A, 0xC01A }, +{ 0xC01B, 0xC01B, 0xC01B }, +{ 0xC01C, 0xC01C, 0xC01C }, +{ 0xC01D, 0xC01D, 0xC01D }, +{ 0xC01E, 0xC01E, 0xC01E }, +{ 0xC01F, 0xC01F, 0xC01F }, +{ 0xC020, 0xC020, 0xC020 }, +{ 0xC021, 0xC021, 0xC021 }, +{ 0xC022, 0xC022, 0xC022 }, +{ 0xC023, 0xC023, 0xC023 }, +{ 0xC024, 0xC024, 0xC024 }, +{ 0xC025, 0xC025, 0xC025 }, +{ 0xC026, 0xC026, 0xC026 }, +{ 0xC027, 0xC027, 0xC027 }, +{ 0xC028, 0xC028, 0xC028 }, +{ 0xC029, 0xC029, 0xC029 }, +{ 0xC02A, 0xC02A, 0xC02A }, +{ 0xC02B, 0xC02B, 0xC02B }, +{ 0xC02C, 0xC02C, 0xC02C }, +{ 0xC02D, 0xC02D, 0xC02D }, +{ 0xC02E, 0xC02E, 0xC02E }, +{ 0xC02F, 0xC02F, 0xC02F }, +{ 0xC030, 0xC030, 0xC030 }, +{ 0xC031, 0xC031, 0xC031 }, +{ 0xC032, 0xC032, 0xC032 }, +{ 0xC033, 0xC033, 0xC033 }, +{ 0xC034, 0xC034, 0xC034 }, +{ 0xC035, 0xC035, 0xC035 }, +{ 0xC036, 0xC036, 0xC036 }, +{ 0xC037, 0xC037, 0xC037 }, +{ 0xC038, 0xC038, 0xC038 }, +{ 0xC039, 0xC039, 0xC039 }, +{ 0xC03A, 0xC03A, 0xC03A }, +{ 0xC03B, 0xC03B, 0xC03B }, +{ 0xC03C, 0xC03C, 0xC03C }, +{ 0xC03D, 0xC03D, 0xC03D }, +{ 0xC03E, 0xC03E, 0xC03E }, +{ 0xC03F, 0xC03F, 0xC03F }, +{ 0xC040, 0xC040, 0xC040 }, +{ 0xC041, 0xC041, 0xC041 }, +{ 0xC042, 0xC042, 0xC042 }, +{ 0xC043, 0xC043, 0xC043 }, +{ 0xC044, 0xC044, 0xC044 }, +{ 0xC045, 0xC045, 0xC045 }, +{ 0xC046, 0xC046, 0xC046 }, +{ 0xC047, 0xC047, 0xC047 }, +{ 0xC048, 0xC048, 0xC048 }, +{ 0xC049, 0xC049, 0xC049 }, +{ 0xC04A, 0xC04A, 0xC04A }, +{ 0xC04B, 0xC04B, 0xC04B }, +{ 0xC04C, 0xC04C, 0xC04C }, +{ 0xC04D, 0xC04D, 0xC04D }, +{ 0xC04E, 0xC04E, 0xC04E }, +{ 0xC04F, 0xC04F, 0xC04F }, +{ 0xC050, 0xC050, 0xC050 }, +{ 0xC051, 0xC051, 0xC051 }, +{ 0xC052, 0xC052, 0xC052 }, +{ 0xC053, 0xC053, 0xC053 }, +{ 0xC054, 0xC054, 0xC054 }, +{ 0xC055, 0xC055, 0xC055 }, +{ 0xC056, 0xC056, 0xC056 }, +{ 0xC057, 0xC057, 0xC057 }, +{ 0xC058, 0xC058, 0xC058 }, +{ 0xC059, 0xC059, 0xC059 }, +{ 0xC05A, 0xC05A, 0xC05A }, +{ 0xC05B, 0xC05B, 0xC05B }, +{ 0xC05C, 0xC05C, 0xC05C }, +{ 0xC05D, 0xC05D, 0xC05D }, +{ 0xC05E, 0xC05E, 0xC05E }, +{ 0xC05F, 0xC05F, 0xC05F }, +{ 0xC060, 0xC060, 0xC060 }, +{ 0xC061, 0xC061, 0xC061 }, +{ 0xC062, 0xC062, 0xC062 }, +{ 0xC063, 0xC063, 0xC063 }, +{ 0xC064, 0xC064, 0xC064 }, +{ 0xC065, 0xC065, 0xC065 }, +{ 0xC066, 0xC066, 0xC066 }, +{ 0xC067, 0xC067, 0xC067 }, +{ 0xC068, 0xC068, 0xC068 }, +{ 0xC069, 0xC069, 0xC069 }, +{ 0xC06A, 0xC06A, 0xC06A }, +{ 0xC06B, 0xC06B, 0xC06B }, +{ 0xC06C, 0xC06C, 0xC06C }, +{ 0xC06D, 0xC06D, 0xC06D }, +{ 0xC06E, 0xC06E, 0xC06E }, +{ 0xC06F, 0xC06F, 0xC06F }, +{ 0xC070, 0xC070, 0xC070 }, +{ 0xC071, 0xC071, 0xC071 }, +{ 0xC072, 0xC072, 0xC072 }, +{ 0xC073, 0xC073, 0xC073 }, +{ 0xC074, 0xC074, 0xC074 }, +{ 0xC075, 0xC075, 0xC075 }, +{ 0xC076, 0xC076, 0xC076 }, +{ 0xC077, 0xC077, 0xC077 }, +{ 0xC078, 0xC078, 0xC078 }, +{ 0xC079, 0xC079, 0xC079 }, +{ 0xC07A, 0xC07A, 0xC07A }, +{ 0xC07B, 0xC07B, 0xC07B }, +{ 0xC07C, 0xC07C, 0xC07C }, +{ 0xC07D, 0xC07D, 0xC07D }, +{ 0xC07E, 0xC07E, 0xC07E }, +{ 0xC07F, 0xC07F, 0xC07F }, +{ 0xC080, 0xC080, 0xC080 }, +{ 0xC081, 0xC081, 0xC081 }, +{ 0xC082, 0xC082, 0xC082 }, +{ 0xC083, 0xC083, 0xC083 }, +{ 0xC084, 0xC084, 0xC084 }, +{ 0xC085, 0xC085, 0xC085 }, +{ 0xC086, 0xC086, 0xC086 }, +{ 0xC087, 0xC087, 0xC087 }, +{ 0xC088, 0xC088, 0xC088 }, +{ 0xC089, 0xC089, 0xC089 }, +{ 0xC08A, 0xC08A, 0xC08A }, +{ 0xC08B, 0xC08B, 0xC08B }, +{ 0xC08C, 0xC08C, 0xC08C }, +{ 0xC08D, 0xC08D, 0xC08D }, +{ 0xC08E, 0xC08E, 0xC08E }, +{ 0xC08F, 0xC08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, 0xC0FD }, +{ 0xC0FE, 0xC0FE, 0xC0FE }, +{ 0xC0FF, 0xC0FF, 0xC0FF }, +{ 0xC100, 0xC100, 0xC100 }, +{ 0xC101, 0xC101, 0xC101 }, +{ 0xC102, 0xC102, 0xC102 }, +{ 0xC103, 0xC103, 0xC103 }, +{ 0xC104, 0xC104, 0xC104 }, +{ 0xC105, 0xC105, 0xC105 }, +{ 0xC106, 0xC106, 0xC106 }, +{ 0xC107, 0xC107, 0xC107 }, +{ 0xC108, 0xC108, 0xC108 }, +{ 0xC109, 0xC109, 0xC109 }, +{ 0xC10A, 0xC10A, 0xC10A }, +{ 0xC10B, 0xC10B, 0xC10B }, +{ 0xC10C, 0xC10C, 0xC10C }, +{ 0xC10D, 0xC10D, 0xC10D }, +{ 0xC10E, 0xC10E, 0xC10E }, +{ 0xC10F, 0xC10F, 0xC10F }, +{ 0xC110, 0xC110, 0xC110 }, +{ 0xC111, 0xC111, 0xC111 }, +{ 0xC112, 0xC112, 0xC112 }, +{ 0xC113, 0xC113, 0xC113 }, +{ 0xC114, 0xC114, 0xC114 }, +{ 0xC115, 0xC115, 0xC115 }, +{ 0xC116, 0xC116, 0xC116 }, +{ 0xC117, 0xC117, 0xC117 }, +{ 0xC118, 0xC118, 0xC118 }, +{ 0xC119, 0xC119, 0xC119 }, +{ 0xC11A, 0xC11A, 0xC11A }, +{ 0xC11B, 0xC11B, 0xC11B }, +{ 0xC11C, 0xC11C, 0xC11C }, +{ 0xC11D, 0xC11D, 0xC11D }, +{ 0xC11E, 0xC11E, 0xC11E }, +{ 0xC11F, 0xC11F, 0xC11F }, +{ 0xC120, 0xC120, 0xC120 }, +{ 0xC121, 0xC121, 0xC121 }, +{ 0xC122, 0xC122, 0xC122 }, +{ 0xC123, 0xC123, 0xC123 }, +{ 0xC124, 0xC124, 0xC124 }, +{ 0xC125, 0xC125, 0xC125 }, +{ 0xC126, 0xC126, 0xC126 }, +{ 0xC127, 0xC127, 0xC127 }, +{ 0xC128, 0xC128, 0xC128 }, +{ 0xC129, 0xC129, 0xC129 }, +{ 0xC12A, 0xC12A, 0xC12A }, +{ 0xC12B, 0xC12B, 0xC12B }, +{ 0xC12C, 0xC12C, 0xC12C }, +{ 0xC12D, 0xC12D, 0xC12D }, +{ 0xC12E, 0xC12E, 0xC12E }, +{ 0xC12F, 0xC12F, 0xC12F }, +{ 0xC130, 0xC130, 0xC130 }, +{ 0xC131, 0xC131, 0xC131 }, +{ 0xC132, 0xC132, 0xC132 }, +{ 0xC133, 0xC133, 0xC133 }, +{ 0xC134, 0xC134, 0xC134 }, +{ 0xC135, 0xC135, 0xC135 }, +{ 0xC136, 0xC136, 0xC136 }, +{ 0xC137, 0xC137, 0xC137 }, +{ 0xC138, 0xC138, 0xC138 }, +{ 0xC139, 0xC139, 0xC139 }, +{ 0xC13A, 0xC13A, 0xC13A }, +{ 0xC13B, 0xC13B, 0xC13B }, +{ 0xC13C, 0xC13C, 0xC13C }, +{ 0xC13D, 0xC13D, 0xC13D }, +{ 0xC13E, 0xC13E, 0xC13E }, +{ 0xC13F, 0xC13F, 0xC13F }, +{ 0xC140, 0xC140, 0xC140 }, +{ 0xC141, 0xC141, 0xC141 }, +{ 0xC142, 0xC142, 0xC142 }, +{ 0xC143, 0xC143, 0xC143 }, +{ 0xC144, 0xC144, 0xC144 }, +{ 0xC145, 0xC145, 0xC145 }, +{ 0xC146, 0xC146, 0xC146 }, +{ 0xC147, 0xC147, 0xC147 }, +{ 0xC148, 0xC148, 0xC148 }, +{ 0xC149, 0xC149, 0xC149 }, +{ 0xC14A, 0xC14A, 0xC14A }, +{ 0xC14B, 0xC14B, 0xC14B }, +{ 0xC14C, 0xC14C, 0xC14C }, +{ 0xC14D, 0xC14D, 0xC14D }, +{ 0xC14E, 0xC14E, 0xC14E }, +{ 0xC14F, 0xC14F, 0xC14F }, +{ 0xC150, 0xC150, 0xC150 }, +{ 0xC151, 0xC151, 0xC151 }, +{ 0xC152, 0xC152, 0xC152 }, +{ 0xC153, 0xC153, 0xC153 }, +{ 0xC154, 0xC154, 0xC154 }, +{ 0xC155, 0xC155, 0xC155 }, +{ 0xC156, 0xC156, 0xC156 }, +{ 0xC157, 0xC157, 0xC157 }, +{ 0xC158, 0xC158, 0xC158 }, +{ 0xC159, 0xC159, 0xC159 }, +{ 0xC15A, 0xC15A, 0xC15A }, +{ 0xC15B, 0xC15B, 0xC15B }, +{ 0xC15C, 0xC15C, 0xC15C }, +{ 0xC15D, 0xC15D, 0xC15D }, +{ 0xC15E, 0xC15E, 0xC15E }, +{ 0xC15F, 0xC15F, 0xC15F }, +{ 0xC160, 0xC160, 0xC160 }, +{ 0xC161, 0xC161, 0xC161 }, +{ 0xC162, 0xC162, 0xC162 }, +{ 0xC163, 0xC163, 0xC163 }, +{ 0xC164, 0xC164, 0xC164 }, +{ 0xC165, 0xC165, 0xC165 }, +{ 0xC166, 0xC166, 0xC166 }, +{ 0xC167, 0xC167, 0xC167 }, +{ 0xC168, 0xC168, 0xC168 }, +{ 0xC169, 0xC169, 0xC169 }, +{ 0xC16A, 0xC16A, 0xC16A }, +{ 0xC16B, 0xC16B, 0xC16B }, +{ 0xC16C, 0xC16C, 0xC16C }, +{ 0xC16D, 0xC16D, 0xC16D }, +{ 0xC16E, 0xC16E, 0xC16E }, +{ 0xC16F, 0xC16F, 0xC16F }, +{ 0xC170, 0xC170, 0xC170 }, +{ 0xC171, 0xC171, 0xC171 }, +{ 0xC172, 0xC172, 0xC172 }, +{ 0xC173, 0xC173, 0xC173 }, +{ 0xC174, 0xC174, 0xC174 }, +{ 0xC175, 0xC175, 0xC175 }, +{ 0xC176, 0xC176, 0xC176 }, +{ 0xC177, 0xC177, 0xC177 }, +{ 0xC178, 0xC178, 0xC178 }, +{ 0xC179, 0xC179, 0xC179 }, +{ 0xC17A, 0xC17A, 0xC17A }, +{ 0xC17B, 0xC17B, 0xC17B }, +{ 0xC17C, 0xC17C, 0xC17C }, +{ 0xC17D, 0xC17D, 0xC17D }, +{ 0xC17E, 0xC17E, 0xC17E }, +{ 0xC17F, 0xC17F, 0xC17F }, +{ 0xC180, 0xC180, 0xC180 }, +{ 0xC181, 0xC181, 0xC181 }, +{ 0xC182, 0xC182, 0xC182 }, +{ 0xC183, 0xC183, 0xC183 }, +{ 0xC184, 0xC184, 0xC184 }, +{ 0xC185, 0xC185, 0xC185 }, +{ 0xC186, 0xC186, 0xC186 }, +{ 0xC187, 0xC187, 0xC187 }, +{ 0xC188, 0xC188, 0xC188 }, +{ 0xC189, 0xC189, 0xC189 }, +{ 0xC18A, 0xC18A, 0xC18A }, +{ 0xC18B, 0xC18B, 0xC18B }, +{ 0xC18C, 0xC18C, 0xC18C }, +{ 0xC18D, 0xC18D, 0xC18D }, +{ 0xC18E, 0xC18E, 0xC18E }, +{ 0xC18F, 0xC18F, 0xC18F }, +{ 0xC190, 0xC190, 0xC190 }, +{ 0xC191, 0xC191, 0xC191 }, +{ 0xC192, 0xC192, 0xC192 }, +{ 0xC193, 0xC193, 0xC193 }, +{ 0xC194, 0xC194, 0xC194 }, +{ 0xC195, 0xC195, 0xC195 }, +{ 0xC196, 0xC196, 0xC196 }, +{ 0xC197, 0xC197, 0xC197 }, +{ 0xC198, 0xC198, 0xC198 }, +{ 0xC199, 0xC199, 0xC199 }, +{ 0xC19A, 0xC19A, 0xC19A }, +{ 0xC19B, 0xC19B, 0xC19B }, +{ 0xC19C, 0xC19C, 0xC19C }, +{ 0xC19D, 0xC19D, 0xC19D }, +{ 0xC19E, 0xC19E, 0xC19E }, +{ 0xC19F, 0xC19F, 0xC19F }, +{ 0xC1A0, 0xC1A0, 0xC1A0 }, +{ 0xC1A1, 0xC1A1, 0xC1A1 }, +{ 0xC1A2, 0xC1A2, 0xC1A2 }, +{ 0xC1A3, 0xC1A3, 0xC1A3 }, +{ 0xC1A4, 0xC1A4, 0xC1A4 }, +{ 0xC1A5, 0xC1A5, 0xC1A5 }, +{ 0xC1A6, 0xC1A6, 0xC1A6 }, +{ 0xC1A7, 0xC1A7, 0xC1A7 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EF, 0xC1EF }, +{ 0xC1F0, 0xC1F0, 0xC1F0 }, +{ 0xC1F1, 0xC1F1, 0xC1F1 }, +{ 0xC1F2, 0xC1F2, 0xC1F2 }, +{ 0xC1F3, 0xC1F3, 0xC1F3 }, +{ 0xC1F4, 0xC1F4, 0xC1F4 }, +{ 0xC1F5, 0xC1F5, 0xC1F5 }, +{ 0xC1F6, 0xC1F6, 0xC1F6 }, +{ 0xC1F7, 0xC1F7, 0xC1F7 }, +{ 0xC1F8, 0xC1F8, 0xC1F8 }, +{ 0xC1F9, 0xC1F9, 0xC1F9 }, +{ 0xC1FA, 0xC1FA, 0xC1FA }, +{ 0xC1FB, 0xC1FB, 0xC1FB }, +{ 0xC1FC, 0xC1FC, 0xC1FC }, +{ 0xC1FD, 0xC1FD, 0xC1FD }, +{ 0xC1FE, 0xC1FE, 0xC1FE }, +{ 0xC1FF, 0xC1FF, 0xC1FF }, +{ 0xC200, 0xC200, 0xC200 }, +{ 0xC201, 0xC201, 0xC201 }, +{ 0xC202, 0xC202, 0xC202 }, +{ 0xC203, 0xC203, 0xC203 }, +{ 0xC204, 0xC204, 0xC204 }, +{ 0xC205, 0xC205, 0xC205 }, +{ 0xC206, 0xC206, 0xC206 }, +{ 0xC207, 0xC207, 0xC207 }, +{ 0xC208, 0xC208, 0xC208 }, +{ 0xC209, 0xC209, 0xC209 }, +{ 0xC20A, 0xC20A, 0xC20A }, +{ 0xC20B, 0xC20B, 0xC20B }, +{ 0xC20C, 0xC20C, 0xC20C }, +{ 0xC20D, 0xC20D, 0xC20D }, +{ 0xC20E, 0xC20E, 0xC20E }, +{ 0xC20F, 0xC20F, 0xC20F }, +{ 0xC210, 0xC210, 0xC210 }, +{ 0xC211, 0xC211, 0xC211 }, +{ 0xC212, 0xC212, 0xC212 }, +{ 0xC213, 0xC213, 0xC213 }, +{ 0xC214, 0xC214, 0xC214 }, +{ 0xC215, 0xC215, 0xC215 }, +{ 0xC216, 0xC216, 0xC216 }, +{ 0xC217, 0xC217, 0xC217 }, +{ 0xC218, 0xC218, 0xC218 }, +{ 0xC219, 0xC219, 0xC219 }, +{ 0xC21A, 0xC21A, 0xC21A }, +{ 0xC21B, 0xC21B, 0xC21B }, +{ 0xC21C, 0xC21C, 0xC21C }, +{ 0xC21D, 0xC21D, 0xC21D }, +{ 0xC21E, 0xC21E, 0xC21E }, +{ 0xC21F, 0xC21F, 0xC21F }, +{ 0xC220, 0xC220, 0xC220 }, +{ 0xC221, 0xC221, 0xC221 }, +{ 0xC222, 0xC222, 0xC222 }, +{ 0xC223, 0xC223, 0xC223 }, +{ 0xC224, 0xC224, 0xC224 }, +{ 0xC225, 0xC225, 0xC225 }, +{ 0xC226, 0xC226, 0xC226 }, +{ 0xC227, 0xC227, 0xC227 }, +{ 0xC228, 0xC228, 0xC228 }, +{ 0xC229, 0xC229, 0xC229 }, +{ 0xC22A, 0xC22A, 0xC22A }, +{ 0xC22B, 0xC22B, 0xC22B }, +{ 0xC22C, 0xC22C, 0xC22C }, +{ 0xC22D, 0xC22D, 0xC22D }, +{ 0xC22E, 0xC22E, 0xC22E }, +{ 0xC22F, 0xC22F, 0xC22F }, +{ 0xC230, 0xC230, 0xC230 }, +{ 0xC231, 0xC231, 0xC231 }, +{ 0xC232, 0xC232, 0xC232 }, +{ 0xC233, 0xC233, 0xC233 }, +{ 0xC234, 0xC234, 0xC234 }, +{ 0xC235, 0xC235, 0xC235 }, +{ 0xC236, 0xC236, 0xC236 }, +{ 0xC237, 0xC237, 0xC237 }, +{ 0xC238, 0xC238, 0xC238 }, +{ 0xC239, 0xC239, 0xC239 }, +{ 0xC23A, 0xC23A, 0xC23A }, +{ 0xC23B, 0xC23B, 0xC23B }, +{ 0xC23C, 0xC23C, 0xC23C }, +{ 0xC23D, 0xC23D, 0xC23D }, +{ 0xC23E, 0xC23E, 0xC23E }, +{ 0xC23F, 0xC23F, 0xC23F }, +{ 0xC240, 0xC240, 0xC240 }, +{ 0xC241, 0xC241, 0xC241 }, +{ 0xC242, 0xC242, 0xC242 }, +{ 0xC243, 0xC243, 0xC243 }, +{ 0xC244, 0xC244, 0xC244 }, +{ 0xC245, 0xC245, 0xC245 }, +{ 0xC246, 0xC246, 0xC246 }, +{ 0xC247, 0xC247, 0xC247 }, +{ 0xC248, 0xC248, 0xC248 }, +{ 0xC249, 0xC249, 0xC249 }, +{ 0xC24A, 0xC24A, 0xC24A }, +{ 0xC24B, 0xC24B, 0xC24B }, +{ 0xC24C, 0xC24C, 0xC24C }, +{ 0xC24D, 0xC24D, 0xC24D }, +{ 0xC24E, 0xC24E, 0xC24E }, +{ 0xC24F, 0xC24F, 0xC24F }, +{ 0xC250, 0xC250, 0xC250 }, +{ 0xC251, 0xC251, 0xC251 }, +{ 0xC252, 0xC252, 0xC252 }, +{ 0xC253, 0xC253, 0xC253 }, +{ 0xC254, 0xC254, 0xC254 }, +{ 0xC255, 0xC255, 0xC255 }, +{ 0xC256, 0xC256, 0xC256 }, +{ 0xC257, 0xC257, 0xC257 }, +{ 0xC258, 0xC258, 0xC258 }, +{ 0xC259, 0xC259, 0xC259 }, +{ 0xC25A, 0xC25A, 0xC25A }, +{ 0xC25B, 0xC25B, 0xC25B }, +{ 0xC25C, 0xC25C, 0xC25C }, +{ 0xC25D, 0xC25D, 0xC25D }, +{ 0xC25E, 0xC25E, 0xC25E }, +{ 0xC25F, 0xC25F, 0xC25F }, +{ 0xC260, 0xC260, 0xC260 }, +{ 0xC261, 0xC261, 0xC261 }, +{ 0xC262, 0xC262, 0xC262 }, +{ 0xC263, 0xC263, 0xC263 }, +{ 0xC264, 0xC264, 0xC264 }, +{ 0xC265, 0xC265, 0xC265 }, +{ 0xC266, 0xC266, 0xC266 }, +{ 0xC267, 0xC267, 0xC267 }, +{ 0xC268, 0xC268, 0xC268 }, +{ 0xC269, 0xC269, 0xC269 }, +{ 0xC26A, 0xC26A, 0xC26A }, +{ 0xC26B, 0xC26B, 0xC26B }, +{ 0xC26C, 0xC26C, 0xC26C }, +{ 0xC26D, 0xC26D, 0xC26D }, +{ 0xC26E, 0xC26E, 0xC26E }, +{ 0xC26F, 0xC26F, 0xC26F }, +{ 0xC270, 0xC270, 0xC270 }, +{ 0xC271, 0xC271, 0xC271 }, +{ 0xC272, 0xC272, 0xC272 }, +{ 0xC273, 0xC273, 0xC273 }, +{ 0xC274, 0xC274, 0xC274 }, +{ 0xC275, 0xC275, 0xC275 }, +{ 0xC276, 0xC276, 0xC276 }, +{ 0xC277, 0xC277, 0xC277 }, +{ 0xC278, 0xC278, 0xC278 }, +{ 0xC279, 0xC279, 0xC279 }, +{ 0xC27A, 0xC27A, 0xC27A }, +{ 0xC27B, 0xC27B, 0xC27B }, +{ 0xC27C, 0xC27C, 0xC27C }, +{ 0xC27D, 0xC27D, 0xC27D }, +{ 0xC27E, 0xC27E, 0xC27E }, +{ 0xC27F, 0xC27F, 0xC27F }, +{ 0xC280, 0xC280, 0xC280 }, +{ 0xC281, 0xC281, 0xC281 }, +{ 0xC282, 0xC282, 0xC282 }, +{ 0xC283, 0xC283, 0xC283 }, +{ 0xC284, 0xC284, 0xC284 }, +{ 0xC285, 0xC285, 0xC285 }, +{ 0xC286, 0xC286, 0xC286 }, +{ 0xC287, 0xC287, 0xC287 }, +{ 0xC288, 0xC288, 0xC288 }, +{ 0xC289, 0xC289, 0xC289 }, +{ 0xC28A, 0xC28A, 0xC28A }, +{ 0xC28B, 0xC28B, 0xC28B }, +{ 0xC28C, 0xC28C, 0xC28C }, +{ 0xC28D, 0xC28D, 0xC28D }, +{ 0xC28E, 0xC28E, 0xC28E }, +{ 0xC28F, 0xC28F, 0xC28F }, +{ 0xC290, 0xC290, 0xC290 }, +{ 0xC291, 0xC291, 0xC291 }, +{ 0xC292, 0xC292, 0xC292 }, +{ 0xC293, 0xC293, 0xC293 }, +{ 0xC294, 0xC294, 0xC294 }, +{ 0xC295, 0xC295, 0xC295 }, +{ 0xC296, 0xC296, 0xC296 }, +{ 0xC297, 0xC297, 0xC297 }, +{ 0xC298, 0xC298, 0xC298 }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C306, 0xC306 }, +{ 0xC307, 0xC307, 0xC307 }, +{ 0xC308, 0xC308, 0xC308 }, +{ 0xC309, 0xC309, 0xC309 }, +{ 0xC30A, 0xC30A, 0xC30A }, +{ 0xC30B, 0xC30B, 0xC30B }, +{ 0xC30C, 0xC30C, 0xC30C }, +{ 0xC30D, 0xC30D, 0xC30D }, +{ 0xC30E, 0xC30E, 0xC30E }, +{ 0xC30F, 0xC30F, 0xC30F }, +{ 0xC310, 0xC310, 0xC310 }, +{ 0xC311, 0xC311, 0xC311 }, +{ 0xC312, 0xC312, 0xC312 }, +{ 0xC313, 0xC313, 0xC313 }, +{ 0xC314, 0xC314, 0xC314 }, +{ 0xC315, 0xC315, 0xC315 }, +{ 0xC316, 0xC316, 0xC316 }, +{ 0xC317, 0xC317, 0xC317 }, +{ 0xC318, 0xC318, 0xC318 }, +{ 0xC319, 0xC319, 0xC319 }, +{ 0xC31A, 0xC31A, 0xC31A }, +{ 0xC31B, 0xC31B, 0xC31B }, +{ 0xC31C, 0xC31C, 0xC31C }, +{ 0xC31D, 0xC31D, 0xC31D }, +{ 0xC31E, 0xC31E, 0xC31E }, +{ 0xC31F, 0xC31F, 0xC31F }, +{ 0xC320, 0xC320, 0xC320 }, +{ 0xC321, 0xC321, 0xC321 }, +{ 0xC322, 0xC322, 0xC322 }, +{ 0xC323, 0xC323, 0xC323 }, +{ 0xC324, 0xC324, 0xC324 }, +{ 0xC325, 0xC325, 0xC325 }, +{ 0xC326, 0xC326, 0xC326 }, +{ 0xC327, 0xC327, 0xC327 }, +{ 0xC328, 0xC328, 0xC328 }, +{ 0xC329, 0xC329, 0xC329 }, +{ 0xC32A, 0xC32A, 0xC32A }, +{ 0xC32B, 0xC32B, 0xC32B }, +{ 0xC32C, 0xC32C, 0xC32C }, +{ 0xC32D, 0xC32D, 0xC32D }, +{ 0xC32E, 0xC32E, 0xC32E }, +{ 0xC32F, 0xC32F, 0xC32F }, +{ 0xC330, 0xC330, 0xC330 }, +{ 0xC331, 0xC331, 0xC331 }, +{ 0xC332, 0xC332, 0xC332 }, +{ 0xC333, 0xC333, 0xC333 }, +{ 0xC334, 0xC334, 0xC334 }, +{ 0xC335, 0xC335, 0xC335 }, +{ 0xC336, 0xC336, 0xC336 }, +{ 0xC337, 0xC337, 0xC337 }, +{ 0xC338, 0xC338, 0xC338 }, +{ 0xC339, 0xC339, 0xC339 }, +{ 0xC33A, 0xC33A, 0xC33A }, +{ 0xC33B, 0xC33B, 0xC33B }, +{ 0xC33C, 0xC33C, 0xC33C }, +{ 0xC33D, 0xC33D, 0xC33D }, +{ 0xC33E, 0xC33E, 0xC33E }, +{ 0xC33F, 0xC33F, 0xC33F }, +{ 0xC340, 0xC340, 0xC340 }, +{ 0xC341, 0xC341, 0xC341 }, +{ 0xC342, 0xC342, 0xC342 }, +{ 0xC343, 0xC343, 0xC343 }, +{ 0xC344, 0xC344, 0xC344 }, +{ 0xC345, 0xC345, 0xC345 }, +{ 0xC346, 0xC346, 0xC346 }, +{ 0xC347, 0xC347, 0xC347 }, +{ 0xC348, 0xC348, 0xC348 }, +{ 0xC349, 0xC349, 0xC349 }, +{ 0xC34A, 0xC34A, 0xC34A }, +{ 0xC34B, 0xC34B, 0xC34B }, +{ 0xC34C, 0xC34C, 0xC34C }, +{ 0xC34D, 0xC34D, 0xC34D }, +{ 0xC34E, 0xC34E, 0xC34E }, +{ 0xC34F, 0xC34F, 0xC34F }, +{ 0xC350, 0xC350, 0xC350 }, +{ 0xC351, 0xC351, 0xC351 }, +{ 0xC352, 0xC352, 0xC352 }, +{ 0xC353, 0xC353, 0xC353 }, +{ 0xC354, 0xC354, 0xC354 }, +{ 0xC355, 0xC355, 0xC355 }, +{ 0xC356, 0xC356, 0xC356 }, +{ 0xC357, 0xC357, 0xC357 }, +{ 0xC358, 0xC358, 0xC358 }, +{ 0xC359, 0xC359, 0xC359 }, +{ 0xC35A, 0xC35A, 0xC35A }, +{ 0xC35B, 0xC35B, 0xC35B }, +{ 0xC35C, 0xC35C, 0xC35C }, +{ 0xC35D, 0xC35D, 0xC35D }, +{ 0xC35E, 0xC35E, 0xC35E }, +{ 0xC35F, 0xC35F, 0xC35F }, +{ 0xC360, 0xC360, 0xC360 }, +{ 0xC361, 0xC361, 0xC361 }, +{ 0xC362, 0xC362, 0xC362 }, +{ 0xC363, 0xC363, 0xC363 }, +{ 0xC364, 0xC364, 0xC364 }, +{ 0xC365, 0xC365, 0xC365 }, +{ 0xC366, 0xC366, 0xC366 }, +{ 0xC367, 0xC367, 0xC367 }, +{ 0xC368, 0xC368, 0xC368 }, +{ 0xC369, 0xC369, 0xC369 }, +{ 0xC36A, 0xC36A, 0xC36A }, +{ 0xC36B, 0xC36B, 0xC36B }, +{ 0xC36C, 0xC36C, 0xC36C }, +{ 0xC36D, 0xC36D, 0xC36D }, +{ 0xC36E, 0xC36E, 0xC36E }, +{ 0xC36F, 0xC36F, 0xC36F }, +{ 0xC370, 0xC370, 0xC370 }, +{ 0xC371, 0xC371, 0xC371 }, +{ 0xC372, 0xC372, 0xC372 }, +{ 0xC373, 0xC373, 0xC373 }, +{ 0xC374, 0xC374, 0xC374 }, +{ 0xC375, 0xC375, 0xC375 }, +{ 0xC376, 0xC376, 0xC376 }, +{ 0xC377, 0xC377, 0xC377 }, +{ 0xC378, 0xC378, 0xC378 }, +{ 0xC379, 0xC379, 0xC379 }, +{ 0xC37A, 0xC37A, 0xC37A }, +{ 0xC37B, 0xC37B, 0xC37B }, +{ 0xC37C, 0xC37C, 0xC37C }, +{ 0xC37D, 0xC37D, 0xC37D }, +{ 0xC37E, 0xC37E, 0xC37E }, +{ 0xC37F, 0xC37F, 0xC37F }, +{ 0xC380, 0xC380, 0xC380 }, +{ 0xC381, 0xC381, 0xC381 }, +{ 0xC382, 0xC382, 0xC382 }, +{ 0xC383, 0xC383, 0xC383 }, +{ 0xC384, 0xC384, 0xC384 }, +{ 0xC385, 0xC385, 0xC385 }, +{ 0xC386, 0xC386, 0xC386 }, +{ 0xC387, 0xC387, 0xC387 }, +{ 0xC388, 0xC388, 0xC388 }, +{ 0xC389, 0xC389, 0xC389 }, +{ 0xC38A, 0xC38A, 0xC38A }, +{ 0xC38B, 0xC38B, 0xC38B }, +{ 0xC38C, 0xC38C, 0xC38C }, +{ 0xC38D, 0xC38D, 0xC38D }, +{ 0xC38E, 0xC38E, 0xC38E }, +{ 0xC38F, 0xC38F, 0xC38F }, +{ 0xC390, 0xC390, 0xC390 }, +{ 0xC391, 0xC391, 0xC391 }, +{ 0xC392, 0xC392, 0xC392 }, +{ 0xC393, 0xC393, 0xC393 }, +{ 0xC394, 0xC394, 0xC394 }, +{ 0xC395, 0xC395, 0xC395 }, +{ 0xC396, 0xC396, 0xC396 }, +{ 0xC397, 0xC397, 0xC397 }, +{ 0xC398, 0xC398, 0xC398 }, +{ 0xC399, 0xC399, 0xC399 }, +{ 0xC39A, 0xC39A, 0xC39A }, +{ 0xC39B, 0xC39B, 0xC39B }, +{ 0xC39C, 0xC39C, 0xC39C }, +{ 0xC39D, 0xC39D, 0xC39D }, +{ 0xC39E, 0xC39E, 0xC39E }, +{ 0xC39F, 0xC39F, 0xC39F }, +{ 0xC3A0, 0xC3A0, 0xC3A0 }, +{ 0xC3A1, 0xC3A1, 0xC3A1 }, +{ 0xC3A2, 0xC3A2, 0xC3A2 }, +{ 0xC3A3, 0xC3A3, 0xC3A3 }, +{ 0xC3A4, 0xC3A4, 0xC3A4 }, +{ 0xC3A5, 0xC3A5, 0xC3A5 }, +{ 0xC3A6, 0xC3A6, 0xC3A6 }, +{ 0xC3A7, 0xC3A7, 0xC3A7 }, +{ 0xC3A8, 0xC3A8, 0xC3A8 }, +{ 0xC3A9, 0xC3A9, 0xC3A9 }, +{ 0xC3AA, 0xC3AA, 0xC3AA }, +{ 0xC3AB, 0xC3AB, 0xC3AB }, +{ 0xC3AC, 0xC3AC, 0xC3AC }, +{ 0xC3AD, 0xC3AD, 0xC3AD }, +{ 0xC3AE, 0xC3AE, 0xC3AE }, +{ 0xC3AF, 0xC3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{ 0xC3F7, 0xC3F7, 0xC3F7 }, +{ 0xC3F8, 0xC3F8, 0xC3F8 }, +{ 0xC3F9, 0xC3F9, 0xC3F9 }, +{ 0xC3FA, 0xC3FA, 0xC3FA }, +{ 0xC3FB, 0xC3FB, 0xC3FB }, +{ 0xC3FC, 0xC3FC, 0xC3FC }, +{ 0xC3FD, 0xC3FD, 0xC3FD }, +{ 0xC3FE, 0xC3FE, 0xC3FE }, +{ 0xC3FF, 0xC3FF, 0xC3FF }, +{ 0xC400, 0xC400, 0xC400 }, +{ 0xC401, 0xC401, 0xC401 }, +{ 0xC402, 0xC402, 0xC402 }, +{ 0xC403, 0xC403, 0xC403 }, +{ 0xC404, 0xC404, 0xC404 }, +{ 0xC405, 0xC405, 0xC405 }, +{ 0xC406, 0xC406, 0xC406 }, +{ 0xC407, 0xC407, 0xC407 }, +{ 0xC408, 0xC408, 0xC408 }, +{ 0xC409, 0xC409, 0xC409 }, +{ 0xC40A, 0xC40A, 0xC40A }, +{ 0xC40B, 0xC40B, 0xC40B }, +{ 0xC40C, 0xC40C, 0xC40C }, +{ 0xC40D, 0xC40D, 0xC40D }, +{ 0xC40E, 0xC40E, 0xC40E }, +{ 0xC40F, 0xC40F, 0xC40F }, +{ 0xC410, 0xC410, 0xC410 }, +{ 0xC411, 0xC411, 0xC411 }, +{ 0xC412, 0xC412, 0xC412 }, +{ 0xC413, 0xC413, 0xC413 }, +{ 0xC414, 0xC414, 0xC414 }, +{ 0xC415, 0xC415, 0xC415 }, +{ 0xC416, 0xC416, 0xC416 }, +{ 0xC417, 0xC417, 0xC417 }, +{ 0xC418, 0xC418, 0xC418 }, +{ 0xC419, 0xC419, 0xC419 }, +{ 0xC41A, 0xC41A, 0xC41A }, +{ 0xC41B, 0xC41B, 0xC41B }, +{ 0xC41C, 0xC41C, 0xC41C }, +{ 0xC41D, 0xC41D, 0xC41D }, +{ 0xC41E, 0xC41E, 0xC41E }, +{ 0xC41F, 0xC41F, 0xC41F }, +{ 0xC420, 0xC420, 0xC420 }, +{ 0xC421, 0xC421, 0xC421 }, +{ 0xC422, 0xC422, 0xC422 }, +{ 0xC423, 0xC423, 0xC423 }, +{ 0xC424, 0xC424, 0xC424 }, +{ 0xC425, 0xC425, 0xC425 }, +{ 0xC426, 0xC426, 0xC426 }, +{ 0xC427, 0xC427, 0xC427 }, +{ 0xC428, 0xC428, 0xC428 }, +{ 0xC429, 0xC429, 0xC429 }, +{ 0xC42A, 0xC42A, 0xC42A }, +{ 0xC42B, 0xC42B, 0xC42B }, +{ 0xC42C, 0xC42C, 0xC42C }, +{ 0xC42D, 0xC42D, 0xC42D }, +{ 0xC42E, 0xC42E, 0xC42E }, +{ 0xC42F, 0xC42F, 0xC42F }, +{ 0xC430, 0xC430, 0xC430 }, +{ 0xC431, 0xC431, 0xC431 }, +{ 0xC432, 0xC432, 0xC432 }, +{ 0xC433, 0xC433, 0xC433 }, +{ 0xC434, 0xC434, 0xC434 }, +{ 0xC435, 0xC435, 0xC435 }, +{ 0xC436, 0xC436, 0xC436 }, +{ 0xC437, 0xC437, 0xC437 }, +{ 0xC438, 0xC438, 0xC438 }, +{ 0xC439, 0xC439, 0xC439 }, +{ 0xC43A, 0xC43A, 0xC43A }, +{ 0xC43B, 0xC43B, 0xC43B }, +{ 0xC43C, 0xC43C, 0xC43C }, +{ 0xC43D, 0xC43D, 0xC43D }, +{ 0xC43E, 0xC43E, 0xC43E }, +{ 0xC43F, 0xC43F, 0xC43F }, +{ 0xC440, 0xC440, 0xC440 }, +{ 0xC441, 0xC441, 0xC441 }, +{ 0xC442, 0xC442, 0xC442 }, +{ 0xC443, 0xC443, 0xC443 }, +{ 0xC444, 0xC444, 0xC444 }, +{ 0xC445, 0xC445, 0xC445 }, +{ 0xC446, 0xC446, 0xC446 }, +{ 0xC447, 0xC447, 0xC447 }, +{ 0xC448, 0xC448, 0xC448 }, +{ 0xC449, 0xC449, 0xC449 }, +{ 0xC44A, 0xC44A, 0xC44A }, +{ 0xC44B, 0xC44B, 0xC44B }, +{ 0xC44C, 0xC44C, 0xC44C }, +{ 0xC44D, 0xC44D, 0xC44D }, +{ 0xC44E, 0xC44E, 0xC44E }, +{ 0xC44F, 0xC44F, 0xC44F }, +{ 0xC450, 0xC450, 0xC450 }, +{ 0xC451, 0xC451, 0xC451 }, +{ 0xC452, 0xC452, 0xC452 }, +{ 0xC453, 0xC453, 0xC453 }, +{ 0xC454, 0xC454, 0xC454 }, +{ 0xC455, 0xC455, 0xC455 }, +{ 0xC456, 0xC456, 0xC456 }, +{ 0xC457, 0xC457, 0xC457 }, +{ 0xC458, 0xC458, 0xC458 }, +{ 0xC459, 0xC459, 0xC459 }, +{ 0xC45A, 0xC45A, 0xC45A }, +{ 0xC45B, 0xC45B, 0xC45B }, +{ 0xC45C, 0xC45C, 0xC45C }, +{ 0xC45D, 0xC45D, 0xC45D }, +{ 0xC45E, 0xC45E, 0xC45E }, +{ 0xC45F, 0xC45F, 0xC45F }, +{ 0xC460, 0xC460, 0xC460 }, +{ 0xC461, 0xC461, 0xC461 }, +{ 0xC462, 0xC462, 0xC462 }, +{ 0xC463, 0xC463, 0xC463 }, +{ 0xC464, 0xC464, 0xC464 }, +{ 0xC465, 0xC465, 0xC465 }, +{ 0xC466, 0xC466, 0xC466 }, +{ 0xC467, 0xC467, 0xC467 }, +{ 0xC468, 0xC468, 0xC468 }, +{ 0xC469, 0xC469, 0xC469 }, +{ 0xC46A, 0xC46A, 0xC46A }, +{ 0xC46B, 0xC46B, 0xC46B }, +{ 0xC46C, 0xC46C, 0xC46C }, +{ 0xC46D, 0xC46D, 0xC46D }, +{ 0xC46E, 0xC46E, 0xC46E }, +{ 0xC46F, 0xC46F, 0xC46F }, +{ 0xC470, 0xC470, 0xC470 }, +{ 0xC471, 0xC471, 0xC471 }, +{ 0xC472, 0xC472, 0xC472 }, +{ 0xC473, 0xC473, 0xC473 }, +{ 0xC474, 0xC474, 0xC474 }, +{ 0xC475, 0xC475, 0xC475 }, +{ 0xC476, 0xC476, 0xC476 }, +{ 0xC477, 0xC477, 0xC477 }, +{ 0xC478, 0xC478, 0xC478 }, +{ 0xC479, 0xC479, 0xC479 }, +{ 0xC47A, 0xC47A, 0xC47A }, +{ 0xC47B, 0xC47B, 0xC47B }, +{ 0xC47C, 0xC47C, 0xC47C }, +{ 0xC47D, 0xC47D, 0xC47D }, +{ 0xC47E, 0xC47E, 0xC47E }, +{ 0xC47F, 0xC47F, 0xC47F }, +{ 0xC480, 0xC480, 0xC480 }, +{ 0xC481, 0xC481, 0xC481 }, +{ 0xC482, 0xC482, 0xC482 }, +{ 0xC483, 0xC483, 0xC483 }, +{ 0xC484, 0xC484, 0xC484 }, +{ 0xC485, 0xC485, 0xC485 }, +{ 0xC486, 0xC486, 0xC486 }, +{ 0xC487, 0xC487, 0xC487 }, +{ 0xC488, 0xC488, 0xC488 }, +{ 0xC489, 0xC489, 0xC489 }, +{ 0xC48A, 0xC48A, 0xC48A }, +{ 0xC48B, 0xC48B, 0xC48B }, +{ 0xC48C, 0xC48C, 0xC48C }, +{ 0xC48D, 0xC48D, 0xC48D }, +{ 0xC48E, 0xC48E, 0xC48E }, +{ 0xC48F, 0xC48F, 0xC48F }, +{ 0xC490, 0xC490, 0xC490 }, +{ 0xC491, 0xC491, 0xC491 }, +{ 0xC492, 0xC492, 0xC492 }, +{ 0xC493, 0xC493, 0xC493 }, +{ 0xC494, 0xC494, 0xC494 }, +{ 0xC495, 0xC495, 0xC495 }, +{ 0xC496, 0xC496, 0xC496 }, +{ 0xC497, 0xC497, 0xC497 }, +{ 0xC498, 0xC498, 0xC498 }, +{ 0xC499, 0xC499, 0xC499 }, +{ 0xC49A, 0xC49A, 0xC49A }, +{ 0xC49B, 0xC49B, 0xC49B }, +{ 0xC49C, 0xC49C, 0xC49C }, +{ 0xC49D, 0xC49D, 0xC49D }, +{ 0xC49E, 0xC49E, 0xC49E }, +{ 0xC49F, 0xC49F, 0xC49F }, +{ 0xC4A0, 0xC4A0, 0xC4A0 }, +{ 0xC4A1, 0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0xC50F, 0xC50F }, +{ 0xC510, 0xC510, 0xC510 }, +{ 0xC511, 0xC511, 0xC511 }, +{ 0xC512, 0xC512, 0xC512 }, +{ 0xC513, 0xC513, 0xC513 }, +{ 0xC514, 0xC514, 0xC514 }, +{ 0xC515, 0xC515, 0xC515 }, +{ 0xC516, 0xC516, 0xC516 }, +{ 0xC517, 0xC517, 0xC517 }, +{ 0xC518, 0xC518, 0xC518 }, +{ 0xC519, 0xC519, 0xC519 }, +{ 0xC51A, 0xC51A, 0xC51A }, +{ 0xC51B, 0xC51B, 0xC51B }, +{ 0xC51C, 0xC51C, 0xC51C }, +{ 0xC51D, 0xC51D, 0xC51D }, +{ 0xC51E, 0xC51E, 0xC51E }, +{ 0xC51F, 0xC51F, 0xC51F }, +{ 0xC520, 0xC520, 0xC520 }, +{ 0xC521, 0xC521, 0xC521 }, +{ 0xC522, 0xC522, 0xC522 }, +{ 0xC523, 0xC523, 0xC523 }, +{ 0xC524, 0xC524, 0xC524 }, +{ 0xC525, 0xC525, 0xC525 }, +{ 0xC526, 0xC526, 0xC526 }, +{ 0xC527, 0xC527, 0xC527 }, +{ 0xC528, 0xC528, 0xC528 }, +{ 0xC529, 0xC529, 0xC529 }, +{ 0xC52A, 0xC52A, 0xC52A }, +{ 0xC52B, 0xC52B, 0xC52B }, +{ 0xC52C, 0xC52C, 0xC52C }, +{ 0xC52D, 0xC52D, 0xC52D }, +{ 0xC52E, 0xC52E, 0xC52E }, +{ 0xC52F, 0xC52F, 0xC52F }, +{ 0xC530, 0xC530, 0xC530 }, +{ 0xC531, 0xC531, 0xC531 }, +{ 0xC532, 0xC532, 0xC532 }, +{ 0xC533, 0xC533, 0xC533 }, +{ 0xC534, 0xC534, 0xC534 }, +{ 0xC535, 0xC535, 0xC535 }, +{ 0xC536, 0xC536, 0xC536 }, +{ 0xC537, 0xC537, 0xC537 }, +{ 0xC538, 0xC538, 0xC538 }, +{ 0xC539, 0xC539, 0xC539 }, +{ 0xC53A, 0xC53A, 0xC53A }, +{ 0xC53B, 0xC53B, 0xC53B }, +{ 0xC53C, 0xC53C, 0xC53C }, +{ 0xC53D, 0xC53D, 0xC53D }, +{ 0xC53E, 0xC53E, 0xC53E }, +{ 0xC53F, 0xC53F, 0xC53F }, +{ 0xC540, 0xC540, 0xC540 }, +{ 0xC541, 0xC541, 0xC541 }, +{ 0xC542, 0xC542, 0xC542 }, +{ 0xC543, 0xC543, 0xC543 }, +{ 0xC544, 0xC544, 0xC544 }, +{ 0xC545, 0xC545, 0xC545 }, +{ 0xC546, 0xC546, 0xC546 }, +{ 0xC547, 0xC547, 0xC547 }, +{ 0xC548, 0xC548, 0xC548 }, +{ 0xC549, 0xC549, 0xC549 }, +{ 0xC54A, 0xC54A, 0xC54A }, +{ 0xC54B, 0xC54B, 0xC54B }, +{ 0xC54C, 0xC54C, 0xC54C }, +{ 0xC54D, 0xC54D, 0xC54D }, +{ 0xC54E, 0xC54E, 0xC54E }, +{ 0xC54F, 0xC54F, 0xC54F }, +{ 0xC550, 0xC550, 0xC550 }, +{ 0xC551, 0xC551, 0xC551 }, +{ 0xC552, 0xC552, 0xC552 }, +{ 0xC553, 0xC553, 0xC553 }, +{ 0xC554, 0xC554, 0xC554 }, +{ 0xC555, 0xC555, 0xC555 }, +{ 0xC556, 0xC556, 0xC556 }, +{ 0xC557, 0xC557, 0xC557 }, +{ 0xC558, 0xC558, 0xC558 }, +{ 0xC559, 0xC559, 0xC559 }, +{ 0xC55A, 0xC55A, 0xC55A }, +{ 0xC55B, 0xC55B, 0xC55B }, +{ 0xC55C, 0xC55C, 0xC55C }, +{ 0xC55D, 0xC55D, 0xC55D }, +{ 0xC55E, 0xC55E, 0xC55E }, +{ 0xC55F, 0xC55F, 0xC55F }, +{ 0xC560, 0xC560, 0xC560 }, +{ 0xC561, 0xC561, 0xC561 }, +{ 0xC562, 0xC562, 0xC562 }, +{ 0xC563, 0xC563, 0xC563 }, +{ 0xC564, 0xC564, 0xC564 }, +{ 0xC565, 0xC565, 0xC565 }, +{ 0xC566, 0xC566, 0xC566 }, +{ 0xC567, 0xC567, 0xC567 }, +{ 0xC568, 0xC568, 0xC568 }, +{ 0xC569, 0xC569, 0xC569 }, +{ 0xC56A, 0xC56A, 0xC56A }, +{ 0xC56B, 0xC56B, 0xC56B }, +{ 0xC56C, 0xC56C, 0xC56C }, +{ 0xC56D, 0xC56D, 0xC56D }, +{ 0xC56E, 0xC56E, 0xC56E }, +{ 0xC56F, 0xC56F, 0xC56F }, +{ 0xC570, 0xC570, 0xC570 }, +{ 0xC571, 0xC571, 0xC571 }, +{ 0xC572, 0xC572, 0xC572 }, +{ 0xC573, 0xC573, 0xC573 }, +{ 0xC574, 0xC574, 0xC574 }, +{ 0xC575, 0xC575, 0xC575 }, +{ 0xC576, 0xC576, 0xC576 }, +{ 0xC577, 0xC577, 0xC577 }, +{ 0xC578, 0xC578, 0xC578 }, +{ 0xC579, 0xC579, 0xC579 }, +{ 0xC57A, 0xC57A, 0xC57A }, +{ 0xC57B, 0xC57B, 0xC57B }, +{ 0xC57C, 0xC57C, 0xC57C }, +{ 0xC57D, 0xC57D, 0xC57D }, +{ 0xC57E, 0xC57E, 0xC57E }, +{ 0xC57F, 0xC57F, 0xC57F }, +{ 0xC580, 0xC580, 0xC580 }, +{ 0xC581, 0xC581, 0xC581 }, +{ 0xC582, 0xC582, 0xC582 }, +{ 0xC583, 0xC583, 0xC583 }, +{ 0xC584, 0xC584, 0xC584 }, +{ 0xC585, 0xC585, 0xC585 }, +{ 0xC586, 0xC586, 0xC586 }, +{ 0xC587, 0xC587, 0xC587 }, +{ 0xC588, 0xC588, 0xC588 }, +{ 0xC589, 0xC589, 0xC589 }, +{ 0xC58A, 0xC58A, 0xC58A }, +{ 0xC58B, 0xC58B, 0xC58B }, +{ 0xC58C, 0xC58C, 0xC58C }, +{ 0xC58D, 0xC58D, 0xC58D }, +{ 0xC58E, 0xC58E, 0xC58E }, +{ 0xC58F, 0xC58F, 0xC58F }, +{ 0xC590, 0xC590, 0x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, 0xC5FE }, +{ 0xC5FF, 0xC5FF, 0xC5FF }, +{ 0xC600, 0xC600, 0xC600 }, +{ 0xC601, 0xC601, 0xC601 }, +{ 0xC602, 0xC602, 0xC602 }, +{ 0xC603, 0xC603, 0xC603 }, +{ 0xC604, 0xC604, 0xC604 }, +{ 0xC605, 0xC605, 0xC605 }, +{ 0xC606, 0xC606, 0xC606 }, +{ 0xC607, 0xC607, 0xC607 }, +{ 0xC608, 0xC608, 0xC608 }, +{ 0xC609, 0xC609, 0xC609 }, +{ 0xC60A, 0xC60A, 0xC60A }, +{ 0xC60B, 0xC60B, 0xC60B }, +{ 0xC60C, 0xC60C, 0xC60C }, +{ 0xC60D, 0xC60D, 0xC60D }, +{ 0xC60E, 0xC60E, 0xC60E }, +{ 0xC60F, 0xC60F, 0xC60F }, +{ 0xC610, 0xC610, 0xC610 }, +{ 0xC611, 0xC611, 0xC611 }, +{ 0xC612, 0xC612, 0xC612 }, +{ 0xC613, 0xC613, 0xC613 }, +{ 0xC614, 0xC614, 0xC614 }, +{ 0xC615, 0xC615, 0xC615 }, +{ 0xC616, 0xC616, 0xC616 }, +{ 0xC617, 0xC617, 0xC617 }, +{ 0xC618, 0xC618, 0xC618 }, +{ 0xC619, 0xC619, 0xC619 }, +{ 0xC61A, 0xC61A, 0xC61A }, +{ 0xC61B, 0xC61B, 0xC61B }, +{ 0xC61C, 0xC61C, 0xC61C }, +{ 0xC61D, 0xC61D, 0xC61D }, +{ 0xC61E, 0xC61E, 0xC61E }, +{ 0xC61F, 0xC61F, 0xC61F }, +{ 0xC620, 0xC620, 0xC620 }, +{ 0xC621, 0xC621, 0xC621 }, +{ 0xC622, 0xC622, 0xC622 }, +{ 0xC623, 0xC623, 0xC623 }, +{ 0xC624, 0xC624, 0xC624 }, +{ 0xC625, 0xC625, 0xC625 }, +{ 0xC626, 0xC626, 0xC626 }, +{ 0xC627, 0xC627, 0xC627 }, +{ 0xC628, 0xC628, 0xC628 }, +{ 0xC629, 0xC629, 0xC629 }, +{ 0xC62A, 0xC62A, 0xC62A }, +{ 0xC62B, 0xC62B, 0xC62B }, +{ 0xC62C, 0xC62C, 0xC62C }, +{ 0xC62D, 0xC62D, 0xC62D }, +{ 0xC62E, 0xC62E, 0xC62E }, +{ 0xC62F, 0xC62F, 0xC62F }, +{ 0xC630, 0xC630, 0xC630 }, +{ 0xC631, 0xC631, 0xC631 }, +{ 0xC632, 0xC632, 0xC632 }, +{ 0xC633, 0xC633, 0xC633 }, +{ 0xC634, 0xC634, 0xC634 }, +{ 0xC635, 0xC635, 0xC635 }, +{ 0xC636, 0xC636, 0xC636 }, +{ 0xC637, 0xC637, 0xC637 }, +{ 0xC638, 0xC638, 0xC638 }, +{ 0xC639, 0xC639, 0xC639 }, +{ 0xC63A, 0xC63A, 0xC63A }, +{ 0xC63B, 0xC63B, 0xC63B }, +{ 0xC63C, 0xC63C, 0xC63C }, +{ 0xC63D, 0xC63D, 0xC63D }, +{ 0xC63E, 0xC63E, 0xC63E }, +{ 0xC63F, 0xC63F, 0xC63F }, +{ 0xC640, 0xC640, 0xC640 }, +{ 0xC641, 0xC641, 0xC641 }, +{ 0xC642, 0xC642, 0xC642 }, +{ 0xC643, 0xC643, 0xC643 }, +{ 0xC644, 0xC644, 0xC644 }, +{ 0xC645, 0xC645, 0xC645 }, +{ 0xC646, 0xC646, 0xC646 }, +{ 0xC647, 0xC647, 0xC647 }, +{ 0xC648, 0xC648, 0xC648 }, +{ 0xC649, 0xC649, 0xC649 }, +{ 0xC64A, 0xC64A, 0xC64A }, +{ 0xC64B, 0xC64B, 0xC64B }, +{ 0xC64C, 0xC64C, 0xC64C }, +{ 0xC64D, 0xC64D, 0xC64D }, +{ 0xC64E, 0xC64E, 0xC64E }, +{ 0xC64F, 0xC64F, 0xC64F }, +{ 0xC650, 0xC650, 0xC650 }, +{ 0xC651, 0xC651, 0xC651 }, +{ 0xC652, 0xC652, 0xC652 }, +{ 0xC653, 0xC653, 0xC653 }, +{ 0xC654, 0xC654, 0xC654 }, +{ 0xC655, 0xC655, 0xC655 }, +{ 0xC656, 0xC656, 0xC656 }, +{ 0xC657, 0xC657, 0xC657 }, +{ 0xC658, 0xC658, 0xC658 }, +{ 0xC659, 0xC659, 0xC659 }, +{ 0xC65A, 0xC65A, 0xC65A }, +{ 0xC65B, 0xC65B, 0xC65B }, +{ 0xC65C, 0xC65C, 0xC65C }, +{ 0xC65D, 0xC65D, 0xC65D }, +{ 0xC65E, 0xC65E, 0xC65E }, +{ 0xC65F, 0xC65F, 0xC65F }, +{ 0xC660, 0xC660, 0xC660 }, +{ 0xC661, 0xC661, 0xC661 }, +{ 0xC662, 0xC662, 0xC662 }, +{ 0xC663, 0xC663, 0xC663 }, +{ 0xC664, 0xC664, 0xC664 }, +{ 0xC665, 0xC665, 0xC665 }, +{ 0xC666, 0xC666, 0xC666 }, +{ 0xC667, 0xC667, 0xC667 }, +{ 0xC668, 0xC668, 0xC668 }, +{ 0xC669, 0xC669, 0xC669 }, +{ 0xC66A, 0xC66A, 0xC66A }, +{ 0xC66B, 0xC66B, 0xC66B }, +{ 0xC66C, 0xC66C, 0xC66C }, +{ 0xC66D, 0xC66D, 0xC66D }, +{ 0xC66E, 0xC66E, 0xC66E }, +{ 0xC66F, 0xC66F, 0xC66F }, +{ 0xC670, 0xC670, 0xC670 }, +{ 0xC671, 0xC671, 0xC671 }, +{ 0xC672, 0xC672, 0xC672 }, +{ 0xC673, 0xC673, 0xC673 }, +{ 0xC674, 0xC674, 0xC674 }, +{ 0xC675, 0xC675, 0xC675 }, +{ 0xC676, 0xC676, 0xC676 }, +{ 0xC677, 0xC677, 0xC677 }, +{ 0xC678, 0xC678, 0xC678 }, +{ 0xC679, 0xC679, 0xC679 }, +{ 0xC67A, 0xC67A, 0xC67A }, +{ 0xC67B, 0xC67B, 0xC67B }, +{ 0xC67C, 0xC67C, 0xC67C }, +{ 0xC67D, 0xC67D, 0xC67D }, +{ 0xC67E, 0xC67E, 0xC67E }, +{ 0xC67F, 0xC67F, 0xC67F }, +{ 0xC680, 0xC680, 0xC680 }, +{ 0xC681, 0xC681, 0xC681 }, +{ 0xC682, 0xC682, 0xC682 }, +{ 0xC683, 0xC683, 0xC683 }, +{ 0xC684, 0xC684, 0xC684 }, +{ 0xC685, 0xC685, 0xC685 }, +{ 0xC686, 0xC686, 0xC686 }, +{ 0xC687, 0xC687, 0xC687 }, +{ 0xC688, 0xC688, 0xC688 }, +{ 0xC689, 0xC689, 0xC689 }, +{ 0xC68A, 0xC68A, 0xC68A }, +{ 0xC68B, 0xC68B, 0xC68B }, +{ 0xC68C, 0xC68C, 0xC68C }, +{ 0xC68D, 0xC68D, 0xC68D }, +{ 0xC68E, 0xC68E, 0xC68E }, +{ 0xC68F, 0xC68F, 0xC68F }, +{ 0xC690, 0xC690, 0xC690 }, +{ 0xC691, 0xC691, 0xC691 }, +{ 0xC692, 0xC692, 0xC692 }, +{ 0xC693, 0xC693, 0xC693 }, +{ 0xC694, 0xC694, 0xC694 }, +{ 0xC695, 0xC695, 0xC695 }, +{ 0xC696, 0xC696, 0xC696 }, +{ 0xC697, 0xC697, 0xC697 }, +{ 0xC698, 0xC698, 0xC698 }, +{ 0xC699, 0xC699, 0xC699 }, +{ 0xC69A, 0xC69A, 0xC69A }, +{ 0xC69B, 0xC69B, 0xC69B }, +{ 0xC69C, 0xC69C, 0xC69C }, +{ 0xC69D, 0xC69D, 0xC69D }, +{ 0xC69E, 0xC69E, 0xC69E }, +{ 0xC69F, 0xC69F, 0xC69F }, +{ 0xC6A0, 0xC6A0, 0xC6A0 }, +{ 0xC6A1, 0xC6A1, 0xC6A1 }, +{ 0xC6A2, 0xC6A2, 0xC6A2 }, +{ 0xC6A3, 0xC6A3, 0xC6A3 }, +{ 0xC6A4, 0xC6A4, 0xC6A4 }, +{ 0xC6A5, 0xC6A5, 0xC6A5 }, +{ 0xC6A6, 0xC6A6, 0xC6A6 }, +{ 0xC6A7, 0xC6A7, 0xC6A7 }, +{ 0xC6A8, 0xC6A8, 0xC6A8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F0, 0xC6F0 }, +{ 0xC6F1, 0xC6F1, 0xC6F1 }, +{ 0xC6F2, 0xC6F2, 0xC6F2 }, +{ 0xC6F3, 0xC6F3, 0xC6F3 }, +{ 0xC6F4, 0xC6F4, 0xC6F4 }, +{ 0xC6F5, 0xC6F5, 0xC6F5 }, +{ 0xC6F6, 0xC6F6, 0xC6F6 }, +{ 0xC6F7, 0xC6F7, 0xC6F7 }, +{ 0xC6F8, 0xC6F8, 0xC6F8 }, +{ 0xC6F9, 0xC6F9, 0xC6F9 }, +{ 0xC6FA, 0xC6FA, 0xC6FA }, +{ 0xC6FB, 0xC6FB, 0xC6FB }, +{ 0xC6FC, 0xC6FC, 0xC6FC }, +{ 0xC6FD, 0xC6FD, 0xC6FD }, +{ 0xC6FE, 0xC6FE, 0xC6FE }, +{ 0xC6FF, 0xC6FF, 0xC6FF }, +{ 0xC700, 0xC700, 0xC700 }, +{ 0xC701, 0xC701, 0xC701 }, +{ 0xC702, 0xC702, 0xC702 }, +{ 0xC703, 0xC703, 0xC703 }, +{ 0xC704, 0xC704, 0xC704 }, +{ 0xC705, 0xC705, 0xC705 }, +{ 0xC706, 0xC706, 0xC706 }, +{ 0xC707, 0xC707, 0xC707 }, +{ 0xC708, 0xC708, 0xC708 }, +{ 0xC709, 0xC709, 0xC709 }, +{ 0xC70A, 0xC70A, 0xC70A }, +{ 0xC70B, 0xC70B, 0xC70B }, +{ 0xC70C, 0xC70C, 0xC70C }, +{ 0xC70D, 0xC70D, 0xC70D }, +{ 0xC70E, 0xC70E, 0xC70E }, +{ 0xC70F, 0xC70F, 0xC70F }, +{ 0xC710, 0xC710, 0xC710 }, +{ 0xC711, 0xC711, 0xC711 }, +{ 0xC712, 0xC712, 0xC712 }, +{ 0xC713, 0xC713, 0xC713 }, +{ 0xC714, 0xC714, 0xC714 }, +{ 0xC715, 0xC715, 0xC715 }, +{ 0xC716, 0xC716, 0xC716 }, +{ 0xC717, 0xC717, 0xC717 }, +{ 0xC718, 0xC718, 0xC718 }, +{ 0xC719, 0xC719, 0xC719 }, +{ 0xC71A, 0xC71A, 0xC71A }, +{ 0xC71B, 0xC71B, 0xC71B }, +{ 0xC71C, 0xC71C, 0xC71C }, +{ 0xC71D, 0xC71D, 0xC71D }, +{ 0xC71E, 0xC71E, 0xC71E }, +{ 0xC71F, 0xC71F, 0xC71F }, +{ 0xC720, 0xC720, 0xC720 }, +{ 0xC721, 0xC721, 0xC721 }, +{ 0xC722, 0xC722, 0xC722 }, +{ 0xC723, 0xC723, 0xC723 }, +{ 0xC724, 0xC724, 0xC724 }, +{ 0xC725, 0xC725, 0xC725 }, +{ 0xC726, 0xC726, 0xC726 }, +{ 0xC727, 0xC727, 0xC727 }, +{ 0xC728, 0xC728, 0xC728 }, +{ 0xC729, 0xC729, 0xC729 }, +{ 0xC72A, 0xC72A, 0xC72A }, +{ 0xC72B, 0xC72B, 0xC72B }, +{ 0xC72C, 0xC72C, 0xC72C }, +{ 0xC72D, 0xC72D, 0xC72D }, +{ 0xC72E, 0xC72E, 0xC72E }, +{ 0xC72F, 0xC72F, 0xC72F }, +{ 0xC730, 0xC730, 0xC730 }, +{ 0xC731, 0xC731, 0xC731 }, +{ 0xC732, 0xC732, 0xC732 }, +{ 0xC733, 0xC733, 0xC733 }, +{ 0xC734, 0xC734, 0xC734 }, +{ 0xC735, 0xC735, 0xC735 }, +{ 0xC736, 0xC736, 0xC736 }, +{ 0xC737, 0xC737, 0xC737 }, +{ 0xC738, 0xC738, 0xC738 }, +{ 0xC739, 0xC739, 0xC739 }, +{ 0xC73A, 0xC73A, 0xC73A }, +{ 0xC73B, 0xC73B, 0xC73B }, +{ 0xC73C, 0xC73C, 0xC73C }, +{ 0xC73D, 0xC73D, 0xC73D }, +{ 0xC73E, 0xC73E, 0xC73E }, +{ 0xC73F, 0xC73F, 0xC73F }, +{ 0xC740, 0xC740, 0xC740 }, +{ 0xC741, 0xC741, 0xC741 }, +{ 0xC742, 0xC742, 0xC742 }, +{ 0xC743, 0xC743, 0xC743 }, +{ 0xC744, 0xC744, 0xC744 }, +{ 0xC745, 0xC745, 0xC745 }, +{ 0xC746, 0xC746, 0xC746 }, +{ 0xC747, 0xC747, 0xC747 }, +{ 0xC748, 0xC748, 0xC748 }, +{ 0xC749, 0xC749, 0xC749 }, +{ 0xC74A, 0xC74A, 0xC74A }, +{ 0xC74B, 0xC74B, 0xC74B }, +{ 0xC74C, 0xC74C, 0xC74C }, +{ 0xC74D, 0xC74D, 0xC74D }, +{ 0xC74E, 0xC74E, 0xC74E }, +{ 0xC74F, 0xC74F, 0xC74F }, +{ 0xC750, 0xC750, 0xC750 }, +{ 0xC751, 0xC751, 0xC751 }, +{ 0xC752, 0xC752, 0xC752 }, +{ 0xC753, 0xC753, 0xC753 }, +{ 0xC754, 0xC754, 0xC754 }, +{ 0xC755, 0xC755, 0xC755 }, +{ 0xC756, 0xC756, 0xC756 }, +{ 0xC757, 0xC757, 0xC757 }, +{ 0xC758, 0xC758, 0xC758 }, +{ 0xC759, 0xC759, 0xC759 }, +{ 0xC75A, 0xC75A, 0xC75A }, +{ 0xC75B, 0xC75B, 0xC75B }, +{ 0xC75C, 0xC75C, 0xC75C }, +{ 0xC75D, 0xC75D, 0xC75D }, +{ 0xC75E, 0xC75E, 0xC75E }, +{ 0xC75F, 0xC75F, 0xC75F }, +{ 0xC760, 0xC760, 0xC760 }, +{ 0xC761, 0xC761, 0xC761 }, +{ 0xC762, 0xC762, 0xC762 }, +{ 0xC763, 0xC763, 0xC763 }, +{ 0xC764, 0xC764, 0xC764 }, +{ 0xC765, 0xC765, 0xC765 }, +{ 0xC766, 0xC766, 0xC766 }, +{ 0xC767, 0xC767, 0xC767 }, +{ 0xC768, 0xC768, 0xC768 }, +{ 0xC769, 0xC769, 0xC769 }, +{ 0xC76A, 0xC76A, 0xC76A }, +{ 0xC76B, 0xC76B, 0xC76B }, +{ 0xC76C, 0xC76C, 0xC76C }, +{ 0xC76D, 0xC76D, 0xC76D }, +{ 0xC76E, 0xC76E, 0xC76E }, +{ 0xC76F, 0xC76F, 0xC76F }, +{ 0xC770, 0xC770, 0xC770 }, +{ 0xC771, 0xC771, 0xC771 }, +{ 0xC772, 0xC772, 0xC772 }, +{ 0xC773, 0xC773, 0xC773 }, +{ 0xC774, 0xC774, 0xC774 }, +{ 0xC775, 0xC775, 0xC775 }, +{ 0xC776, 0xC776, 0xC776 }, +{ 0xC777, 0xC777, 0xC777 }, +{ 0xC778, 0xC778, 0xC778 }, +{ 0xC779, 0xC779, 0xC779 }, +{ 0xC77A, 0xC77A, 0xC77A }, +{ 0xC77B, 0xC77B, 0xC77B }, +{ 0xC77C, 0xC77C, 0xC77C }, +{ 0xC77D, 0xC77D, 0xC77D }, +{ 0xC77E, 0xC77E, 0xC77E }, +{ 0xC77F, 0xC77F, 0xC77F }, +{ 0xC780, 0xC780, 0xC780 }, +{ 0xC781, 0xC781, 0xC781 }, +{ 0xC782, 0xC782, 0xC782 }, +{ 0xC783, 0xC783, 0xC783 }, +{ 0xC784, 0xC784, 0xC784 }, +{ 0xC785, 0xC785, 0xC785 }, +{ 0xC786, 0xC786, 0xC786 }, +{ 0xC787, 0xC787, 0xC787 }, +{ 0xC788, 0xC788, 0xC788 }, +{ 0xC789, 0xC789, 0xC789 }, +{ 0xC78A, 0xC78A, 0xC78A }, +{ 0xC78B, 0xC78B, 0xC78B }, +{ 0xC78C, 0xC78C, 0xC78C }, +{ 0xC78D, 0xC78D, 0xC78D }, +{ 0xC78E, 0xC78E, 0xC78E }, +{ 0xC78F, 0xC78F, 0xC78F }, +{ 0xC790, 0xC790, 0xC790 }, +{ 0xC791, 0xC791, 0xC791 }, +{ 0xC792, 0xC792, 0xC792 }, +{ 0xC793, 0xC793, 0xC793 }, +{ 0xC794, 0xC794, 0xC794 }, +{ 0xC795, 0xC795, 0xC795 }, +{ 0xC796, 0xC796, 0xC796 }, +{ 0xC797, 0xC797, 0xC797 }, +{ 0xC798, 0xC798, 0xC798 }, +{ 0xC799, 0xC799, 0xC799 }, +{ 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xC807 }, +{ 0xC808, 0xC808, 0xC808 }, +{ 0xC809, 0xC809, 0xC809 }, +{ 0xC80A, 0xC80A, 0xC80A }, +{ 0xC80B, 0xC80B, 0xC80B }, +{ 0xC80C, 0xC80C, 0xC80C }, +{ 0xC80D, 0xC80D, 0xC80D }, +{ 0xC80E, 0xC80E, 0xC80E }, +{ 0xC80F, 0xC80F, 0xC80F }, +{ 0xC810, 0xC810, 0xC810 }, +{ 0xC811, 0xC811, 0xC811 }, +{ 0xC812, 0xC812, 0xC812 }, +{ 0xC813, 0xC813, 0xC813 }, +{ 0xC814, 0xC814, 0xC814 }, +{ 0xC815, 0xC815, 0xC815 }, +{ 0xC816, 0xC816, 0xC816 }, +{ 0xC817, 0xC817, 0xC817 }, +{ 0xC818, 0xC818, 0xC818 }, +{ 0xC819, 0xC819, 0xC819 }, +{ 0xC81A, 0xC81A, 0xC81A }, +{ 0xC81B, 0xC81B, 0xC81B }, +{ 0xC81C, 0xC81C, 0xC81C }, +{ 0xC81D, 0xC81D, 0xC81D }, +{ 0xC81E, 0xC81E, 0xC81E }, +{ 0xC81F, 0xC81F, 0xC81F }, +{ 0xC820, 0xC820, 0xC820 }, +{ 0xC821, 0xC821, 0xC821 }, +{ 0xC822, 0xC822, 0xC822 }, +{ 0xC823, 0xC823, 0xC823 }, +{ 0xC824, 0xC824, 0xC824 }, +{ 0xC825, 0xC825, 0xC825 }, +{ 0xC826, 0xC826, 0xC826 }, +{ 0xC827, 0xC827, 0xC827 }, +{ 0xC828, 0xC828, 0xC828 }, +{ 0xC829, 0xC829, 0xC829 }, +{ 0xC82A, 0xC82A, 0xC82A }, +{ 0xC82B, 0xC82B, 0xC82B }, +{ 0xC82C, 0xC82C, 0xC82C }, +{ 0xC82D, 0xC82D, 0xC82D }, +{ 0xC82E, 0xC82E, 0xC82E }, +{ 0xC82F, 0xC82F, 0xC82F }, +{ 0xC830, 0xC830, 0xC830 }, +{ 0xC831, 0xC831, 0xC831 }, +{ 0xC832, 0xC832, 0xC832 }, +{ 0xC833, 0xC833, 0xC833 }, +{ 0xC834, 0xC834, 0xC834 }, +{ 0xC835, 0xC835, 0xC835 }, +{ 0xC836, 0xC836, 0xC836 }, +{ 0xC837, 0xC837, 0xC837 }, +{ 0xC838, 0xC838, 0xC838 }, +{ 0xC839, 0xC839, 0xC839 }, +{ 0xC83A, 0xC83A, 0xC83A }, +{ 0xC83B, 0xC83B, 0xC83B }, +{ 0xC83C, 0xC83C, 0xC83C }, +{ 0xC83D, 0xC83D, 0xC83D }, +{ 0xC83E, 0xC83E, 0xC83E }, +{ 0xC83F, 0xC83F, 0xC83F }, +{ 0xC840, 0xC840, 0xC840 }, +{ 0xC841, 0xC841, 0xC841 }, +{ 0xC842, 0xC842, 0xC842 }, +{ 0xC843, 0xC843, 0xC843 }, +{ 0xC844, 0xC844, 0xC844 }, +{ 0xC845, 0xC845, 0xC845 }, +{ 0xC846, 0xC846, 0xC846 }, +{ 0xC847, 0xC847, 0xC847 }, +{ 0xC848, 0xC848, 0xC848 }, +{ 0xC849, 0xC849, 0xC849 }, +{ 0xC84A, 0xC84A, 0xC84A }, +{ 0xC84B, 0xC84B, 0xC84B }, +{ 0xC84C, 0xC84C, 0xC84C }, +{ 0xC84D, 0xC84D, 0xC84D }, +{ 0xC84E, 0xC84E, 0xC84E }, +{ 0xC84F, 0xC84F, 0xC84F }, +{ 0xC850, 0xC850, 0xC850 }, +{ 0xC851, 0xC851, 0xC851 }, +{ 0xC852, 0xC852, 0xC852 }, +{ 0xC853, 0xC853, 0xC853 }, +{ 0xC854, 0xC854, 0xC854 }, +{ 0xC855, 0xC855, 0xC855 }, +{ 0xC856, 0xC856, 0xC856 }, +{ 0xC857, 0xC857, 0xC857 }, +{ 0xC858, 0xC858, 0xC858 }, +{ 0xC859, 0xC859, 0xC859 }, +{ 0xC85A, 0xC85A, 0xC85A }, +{ 0xC85B, 0xC85B, 0xC85B }, +{ 0xC85C, 0xC85C, 0xC85C }, +{ 0xC85D, 0xC85D, 0xC85D }, +{ 0xC85E, 0xC85E, 0xC85E }, +{ 0xC85F, 0xC85F, 0xC85F }, +{ 0xC860, 0xC860, 0xC860 }, +{ 0xC861, 0xC861, 0xC861 }, +{ 0xC862, 0xC862, 0xC862 }, +{ 0xC863, 0xC863, 0xC863 }, +{ 0xC864, 0xC864, 0xC864 }, +{ 0xC865, 0xC865, 0xC865 }, +{ 0xC866, 0xC866, 0xC866 }, +{ 0xC867, 0xC867, 0xC867 }, +{ 0xC868, 0xC868, 0xC868 }, +{ 0xC869, 0xC869, 0xC869 }, +{ 0xC86A, 0xC86A, 0xC86A }, +{ 0xC86B, 0xC86B, 0xC86B }, +{ 0xC86C, 0xC86C, 0xC86C }, +{ 0xC86D, 0xC86D, 0xC86D }, +{ 0xC86E, 0xC86E, 0xC86E }, +{ 0xC86F, 0xC86F, 0xC86F }, +{ 0xC870, 0xC870, 0xC870 }, +{ 0xC871, 0xC871, 0xC871 }, +{ 0xC872, 0xC872, 0xC872 }, +{ 0xC873, 0xC873, 0xC873 }, +{ 0xC874, 0xC874, 0xC874 }, +{ 0xC875, 0xC875, 0xC875 }, +{ 0xC876, 0xC876, 0xC876 }, +{ 0xC877, 0xC877, 0xC877 }, +{ 0xC878, 0xC878, 0xC878 }, +{ 0xC879, 0xC879, 0xC879 }, +{ 0xC87A, 0xC87A, 0xC87A }, +{ 0xC87B, 0xC87B, 0xC87B }, +{ 0xC87C, 0xC87C, 0xC87C }, +{ 0xC87D, 0xC87D, 0xC87D }, +{ 0xC87E, 0xC87E, 0xC87E }, +{ 0xC87F, 0xC87F, 0xC87F }, +{ 0xC880, 0xC880, 0xC880 }, +{ 0xC881, 0xC881, 0xC881 }, +{ 0xC882, 0xC882, 0xC882 }, +{ 0xC883, 0xC883, 0xC883 }, +{ 0xC884, 0xC884, 0xC884 }, +{ 0xC885, 0xC885, 0xC885 }, +{ 0xC886, 0xC886, 0xC886 }, +{ 0xC887, 0xC887, 0xC887 }, +{ 0xC888, 0xC888, 0xC888 }, +{ 0xC889, 0xC889, 0xC889 }, +{ 0xC88A, 0xC88A, 0xC88A }, +{ 0xC88B, 0xC88B, 0xC88B }, +{ 0xC88C, 0xC88C, 0xC88C }, +{ 0xC88D, 0xC88D, 0xC88D }, +{ 0xC88E, 0xC88E, 0xC88E }, +{ 0xC88F, 0xC88F, 0xC88F }, +{ 0xC890, 0xC890, 0xC890 }, +{ 0xC891, 0xC891, 0xC891 }, +{ 0xC892, 0xC892, 0xC892 }, +{ 0xC893, 0xC893, 0xC893 }, +{ 0xC894, 0xC894, 0xC894 }, +{ 0xC895, 0xC895, 0xC895 }, +{ 0xC896, 0xC896, 0xC896 }, +{ 0xC897, 0xC897, 0xC897 }, +{ 0xC898, 0xC898, 0xC898 }, +{ 0xC899, 0xC899, 0xC899 }, +{ 0xC89A, 0xC89A, 0xC89A }, +{ 0xC89B, 0xC89B, 0xC89B }, +{ 0xC89C, 0xC89C, 0xC89C }, +{ 0xC89D, 0xC89D, 0xC89D }, +{ 0xC89E, 0xC89E, 0xC89E }, +{ 0xC89F, 0xC89F, 0xC89F }, +{ 0xC8A0, 0xC8A0, 0xC8A0 }, +{ 0xC8A1, 0xC8A1, 0xC8A1 }, +{ 0xC8A2, 0xC8A2, 0xC8A2 }, +{ 0xC8A3, 0xC8A3, 0xC8A3 }, +{ 0xC8A4, 0xC8A4, 0xC8A4 }, +{ 0xC8A5, 0xC8A5, 0xC8A5 }, +{ 0xC8A6, 0xC8A6, 0xC8A6 }, +{ 0xC8A7, 0xC8A7, 0xC8A7 }, +{ 0xC8A8, 0xC8A8, 0xC8A8 }, +{ 0xC8A9, 0xC8A9, 0xC8A9 }, +{ 0xC8AA, 0xC8AA, 0xC8AA }, +{ 0xC8AB, 0xC8AB, 0xC8AB }, +{ 0xC8AC, 0xC8AC, 0xC8AC }, +{ 0xC8AD, 0xC8AD, 0xC8AD }, +{ 0xC8AE, 0xC8AE, 0xC8AE }, +{ 0xC8AF, 0xC8AF, 0xC8AF }, +{ 0xC8B0, 0xC8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+{ 0xC8F8, 0xC8F8, 0xC8F8 }, +{ 0xC8F9, 0xC8F9, 0xC8F9 }, +{ 0xC8FA, 0xC8FA, 0xC8FA }, +{ 0xC8FB, 0xC8FB, 0xC8FB }, +{ 0xC8FC, 0xC8FC, 0xC8FC }, +{ 0xC8FD, 0xC8FD, 0xC8FD }, +{ 0xC8FE, 0xC8FE, 0xC8FE }, +{ 0xC8FF, 0xC8FF, 0xC8FF }, +{ 0xC900, 0xC900, 0xC900 }, +{ 0xC901, 0xC901, 0xC901 }, +{ 0xC902, 0xC902, 0xC902 }, +{ 0xC903, 0xC903, 0xC903 }, +{ 0xC904, 0xC904, 0xC904 }, +{ 0xC905, 0xC905, 0xC905 }, +{ 0xC906, 0xC906, 0xC906 }, +{ 0xC907, 0xC907, 0xC907 }, +{ 0xC908, 0xC908, 0xC908 }, +{ 0xC909, 0xC909, 0xC909 }, +{ 0xC90A, 0xC90A, 0xC90A }, +{ 0xC90B, 0xC90B, 0xC90B }, +{ 0xC90C, 0xC90C, 0xC90C }, +{ 0xC90D, 0xC90D, 0xC90D }, +{ 0xC90E, 0xC90E, 0xC90E }, +{ 0xC90F, 0xC90F, 0xC90F }, +{ 0xC910, 0xC910, 0xC910 }, +{ 0xC911, 0xC911, 0xC911 }, +{ 0xC912, 0xC912, 0xC912 }, +{ 0xC913, 0xC913, 0xC913 }, +{ 0xC914, 0xC914, 0xC914 }, +{ 0xC915, 0xC915, 0xC915 }, +{ 0xC916, 0xC916, 0xC916 }, +{ 0xC917, 0xC917, 0xC917 }, +{ 0xC918, 0xC918, 0xC918 }, +{ 0xC919, 0xC919, 0xC919 }, +{ 0xC91A, 0xC91A, 0xC91A }, +{ 0xC91B, 0xC91B, 0xC91B }, +{ 0xC91C, 0xC91C, 0xC91C }, +{ 0xC91D, 0xC91D, 0xC91D }, +{ 0xC91E, 0xC91E, 0xC91E }, +{ 0xC91F, 0xC91F, 0xC91F }, +{ 0xC920, 0xC920, 0xC920 }, +{ 0xC921, 0xC921, 0xC921 }, +{ 0xC922, 0xC922, 0xC922 }, +{ 0xC923, 0xC923, 0xC923 }, +{ 0xC924, 0xC924, 0xC924 }, +{ 0xC925, 0xC925, 0xC925 }, +{ 0xC926, 0xC926, 0xC926 }, +{ 0xC927, 0xC927, 0xC927 }, +{ 0xC928, 0xC928, 0xC928 }, +{ 0xC929, 0xC929, 0xC929 }, +{ 0xC92A, 0xC92A, 0xC92A }, +{ 0xC92B, 0xC92B, 0xC92B }, +{ 0xC92C, 0xC92C, 0xC92C }, +{ 0xC92D, 0xC92D, 0xC92D }, +{ 0xC92E, 0xC92E, 0xC92E }, +{ 0xC92F, 0xC92F, 0xC92F }, +{ 0xC930, 0xC930, 0xC930 }, +{ 0xC931, 0xC931, 0xC931 }, +{ 0xC932, 0xC932, 0xC932 }, +{ 0xC933, 0xC933, 0xC933 }, +{ 0xC934, 0xC934, 0xC934 }, +{ 0xC935, 0xC935, 0xC935 }, +{ 0xC936, 0xC936, 0xC936 }, +{ 0xC937, 0xC937, 0xC937 }, +{ 0xC938, 0xC938, 0xC938 }, +{ 0xC939, 0xC939, 0xC939 }, +{ 0xC93A, 0xC93A, 0xC93A }, +{ 0xC93B, 0xC93B, 0xC93B }, +{ 0xC93C, 0xC93C, 0xC93C }, +{ 0xC93D, 0xC93D, 0xC93D }, +{ 0xC93E, 0xC93E, 0xC93E }, +{ 0xC93F, 0xC93F, 0xC93F }, +{ 0xC940, 0xC940, 0xC940 }, +{ 0xC941, 0xC941, 0xC941 }, +{ 0xC942, 0xC942, 0xC942 }, +{ 0xC943, 0xC943, 0xC943 }, +{ 0xC944, 0xC944, 0xC944 }, +{ 0xC945, 0xC945, 0xC945 }, +{ 0xC946, 0xC946, 0xC946 }, +{ 0xC947, 0xC947, 0xC947 }, +{ 0xC948, 0xC948, 0xC948 }, +{ 0xC949, 0xC949, 0xC949 }, +{ 0xC94A, 0xC94A, 0xC94A }, +{ 0xC94B, 0xC94B, 0xC94B }, +{ 0xC94C, 0xC94C, 0xC94C }, +{ 0xC94D, 0xC94D, 0xC94D }, +{ 0xC94E, 0xC94E, 0xC94E }, +{ 0xC94F, 0xC94F, 0xC94F }, +{ 0xC950, 0xC950, 0xC950 }, +{ 0xC951, 0xC951, 0xC951 }, +{ 0xC952, 0xC952, 0xC952 }, +{ 0xC953, 0xC953, 0xC953 }, +{ 0xC954, 0xC954, 0xC954 }, +{ 0xC955, 0xC955, 0xC955 }, +{ 0xC956, 0xC956, 0xC956 }, +{ 0xC957, 0xC957, 0xC957 }, +{ 0xC958, 0xC958, 0xC958 }, +{ 0xC959, 0xC959, 0xC959 }, +{ 0xC95A, 0xC95A, 0xC95A }, +{ 0xC95B, 0xC95B, 0xC95B }, +{ 0xC95C, 0xC95C, 0xC95C }, +{ 0xC95D, 0xC95D, 0xC95D }, +{ 0xC95E, 0xC95E, 0xC95E }, +{ 0xC95F, 0xC95F, 0xC95F }, +{ 0xC960, 0xC960, 0xC960 }, +{ 0xC961, 0xC961, 0xC961 }, +{ 0xC962, 0xC962, 0xC962 }, +{ 0xC963, 0xC963, 0xC963 }, +{ 0xC964, 0xC964, 0xC964 }, +{ 0xC965, 0xC965, 0xC965 }, +{ 0xC966, 0xC966, 0xC966 }, +{ 0xC967, 0xC967, 0xC967 }, +{ 0xC968, 0xC968, 0xC968 }, +{ 0xC969, 0xC969, 0xC969 }, +{ 0xC96A, 0xC96A, 0xC96A }, +{ 0xC96B, 0xC96B, 0xC96B }, +{ 0xC96C, 0xC96C, 0xC96C }, +{ 0xC96D, 0xC96D, 0xC96D }, +{ 0xC96E, 0xC96E, 0xC96E }, +{ 0xC96F, 0xC96F, 0xC96F }, +{ 0xC970, 0xC970, 0xC970 }, +{ 0xC971, 0xC971, 0xC971 }, +{ 0xC972, 0xC972, 0xC972 }, +{ 0xC973, 0xC973, 0xC973 }, +{ 0xC974, 0xC974, 0xC974 }, +{ 0xC975, 0xC975, 0xC975 }, +{ 0xC976, 0xC976, 0xC976 }, +{ 0xC977, 0xC977, 0xC977 }, +{ 0xC978, 0xC978, 0xC978 }, +{ 0xC979, 0xC979, 0xC979 }, +{ 0xC97A, 0xC97A, 0xC97A }, +{ 0xC97B, 0xC97B, 0xC97B }, +{ 0xC97C, 0xC97C, 0xC97C }, +{ 0xC97D, 0xC97D, 0xC97D }, +{ 0xC97E, 0xC97E, 0xC97E }, +{ 0xC97F, 0xC97F, 0xC97F }, +{ 0xC980, 0xC980, 0xC980 }, +{ 0xC981, 0xC981, 0xC981 }, +{ 0xC982, 0xC982, 0xC982 }, +{ 0xC983, 0xC983, 0xC983 }, +{ 0xC984, 0xC984, 0xC984 }, +{ 0xC985, 0xC985, 0xC985 }, +{ 0xC986, 0xC986, 0xC986 }, +{ 0xC987, 0xC987, 0xC987 }, +{ 0xC988, 0xC988, 0xC988 }, +{ 0xC989, 0xC989, 0xC989 }, +{ 0xC98A, 0xC98A, 0xC98A }, +{ 0xC98B, 0xC98B, 0xC98B }, +{ 0xC98C, 0xC98C, 0xC98C }, +{ 0xC98D, 0xC98D, 0xC98D }, +{ 0xC98E, 0xC98E, 0xC98E }, +{ 0xC98F, 0xC98F, 0xC98F }, +{ 0xC990, 0xC990, 0xC990 }, +{ 0xC991, 0xC991, 0xC991 }, +{ 0xC992, 0xC992, 0xC992 }, +{ 0xC993, 0xC993, 0xC993 }, +{ 0xC994, 0xC994, 0xC994 }, +{ 0xC995, 0xC995, 0xC995 }, +{ 0xC996, 0xC996, 0xC996 }, +{ 0xC997, 0xC997, 0xC997 }, +{ 0xC998, 0xC998, 0xC998 }, +{ 0xC999, 0xC999, 0xC999 }, +{ 0xC99A, 0xC99A, 0xC99A }, +{ 0xC99B, 0xC99B, 0xC99B }, +{ 0xC99C, 0xC99C, 0xC99C }, +{ 0xC99D, 0xC99D, 0xC99D }, +{ 0xC99E, 0xC99E, 0xC99E }, +{ 0xC99F, 0xC99F, 0xC99F }, +{ 0xC9A0, 0xC9A0, 0xC9A0 }, +{ 0xC9A1, 0xC9A1, 0xC9A1 }, +{ 0xC9A2, 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+{ 0xD00E, 0xD00E, 0xD00E }, +{ 0xD00F, 0xD00F, 0xD00F }, +{ 0xD010, 0xD010, 0xD010 }, +{ 0xD011, 0xD011, 0xD011 }, +{ 0xD012, 0xD012, 0xD012 }, +{ 0xD013, 0xD013, 0xD013 }, +{ 0xD014, 0xD014, 0xD014 }, +{ 0xD015, 0xD015, 0xD015 }, +{ 0xD016, 0xD016, 0xD016 }, +{ 0xD017, 0xD017, 0xD017 }, +{ 0xD018, 0xD018, 0xD018 }, +{ 0xD019, 0xD019, 0xD019 }, +{ 0xD01A, 0xD01A, 0xD01A }, +{ 0xD01B, 0xD01B, 0xD01B }, +{ 0xD01C, 0xD01C, 0xD01C }, +{ 0xD01D, 0xD01D, 0xD01D }, +{ 0xD01E, 0xD01E, 0xD01E }, +{ 0xD01F, 0xD01F, 0xD01F }, +{ 0xD020, 0xD020, 0xD020 }, +{ 0xD021, 0xD021, 0xD021 }, +{ 0xD022, 0xD022, 0xD022 }, +{ 0xD023, 0xD023, 0xD023 }, +{ 0xD024, 0xD024, 0xD024 }, +{ 0xD025, 0xD025, 0xD025 }, +{ 0xD026, 0xD026, 0xD026 }, +{ 0xD027, 0xD027, 0xD027 }, +{ 0xD028, 0xD028, 0xD028 }, +{ 0xD029, 0xD029, 0xD029 }, +{ 0xD02A, 0xD02A, 0xD02A }, +{ 0xD02B, 0xD02B, 0xD02B }, +{ 0xD02C, 0xD02C, 0xD02C }, +{ 0xD02D, 0xD02D, 0xD02D }, +{ 0xD02E, 0xD02E, 0xD02E }, +{ 0xD02F, 0xD02F, 0xD02F }, +{ 0xD030, 0xD030, 0xD030 }, +{ 0xD031, 0xD031, 0xD031 }, +{ 0xD032, 0xD032, 0xD032 }, +{ 0xD033, 0xD033, 0xD033 }, +{ 0xD034, 0xD034, 0xD034 }, +{ 0xD035, 0xD035, 0xD035 }, +{ 0xD036, 0xD036, 0xD036 }, +{ 0xD037, 0xD037, 0xD037 }, +{ 0xD038, 0xD038, 0xD038 }, +{ 0xD039, 0xD039, 0xD039 }, +{ 0xD03A, 0xD03A, 0xD03A }, +{ 0xD03B, 0xD03B, 0xD03B }, +{ 0xD03C, 0xD03C, 0xD03C }, +{ 0xD03D, 0xD03D, 0xD03D }, +{ 0xD03E, 0xD03E, 0xD03E }, +{ 0xD03F, 0xD03F, 0xD03F }, +{ 0xD040, 0xD040, 0xD040 }, +{ 0xD041, 0xD041, 0xD041 }, +{ 0xD042, 0xD042, 0xD042 }, +{ 0xD043, 0xD043, 0xD043 }, +{ 0xD044, 0xD044, 0xD044 }, +{ 0xD045, 0xD045, 0xD045 }, +{ 0xD046, 0xD046, 0xD046 }, +{ 0xD047, 0xD047, 0xD047 }, +{ 0xD048, 0xD048, 0xD048 }, +{ 0xD049, 0xD049, 0xD049 }, +{ 0xD04A, 0xD04A, 0xD04A }, +{ 0xD04B, 0xD04B, 0xD04B }, +{ 0xD04C, 0xD04C, 0xD04C }, +{ 0xD04D, 0xD04D, 0xD04D }, +{ 0xD04E, 0xD04E, 0xD04E }, +{ 0xD04F, 0xD04F, 0xD04F }, +{ 0xD050, 0xD050, 0xD050 }, +{ 0xD051, 0xD051, 0xD051 }, +{ 0xD052, 0xD052, 0xD052 }, +{ 0xD053, 0xD053, 0xD053 }, +{ 0xD054, 0xD054, 0xD054 }, +{ 0xD055, 0xD055, 0xD055 }, +{ 0xD056, 0xD056, 0xD056 }, +{ 0xD057, 0xD057, 0xD057 }, +{ 0xD058, 0xD058, 0xD058 }, +{ 0xD059, 0xD059, 0xD059 }, +{ 0xD05A, 0xD05A, 0xD05A }, +{ 0xD05B, 0xD05B, 0xD05B }, +{ 0xD05C, 0xD05C, 0xD05C }, +{ 0xD05D, 0xD05D, 0xD05D }, +{ 0xD05E, 0xD05E, 0xD05E }, +{ 0xD05F, 0xD05F, 0xD05F }, +{ 0xD060, 0xD060, 0xD060 }, +{ 0xD061, 0xD061, 0xD061 }, +{ 0xD062, 0xD062, 0xD062 }, +{ 0xD063, 0xD063, 0xD063 }, +{ 0xD064, 0xD064, 0xD064 }, +{ 0xD065, 0xD065, 0xD065 }, +{ 0xD066, 0xD066, 0xD066 }, +{ 0xD067, 0xD067, 0xD067 }, +{ 0xD068, 0xD068, 0xD068 }, +{ 0xD069, 0xD069, 0xD069 }, +{ 0xD06A, 0xD06A, 0xD06A }, +{ 0xD06B, 0xD06B, 0xD06B }, +{ 0xD06C, 0xD06C, 0xD06C }, +{ 0xD06D, 0xD06D, 0xD06D }, +{ 0xD06E, 0xD06E, 0xD06E }, +{ 0xD06F, 0xD06F, 0xD06F }, +{ 0xD070, 0xD070, 0xD070 }, +{ 0xD071, 0xD071, 0xD071 }, +{ 0xD072, 0xD072, 0xD072 }, +{ 0xD073, 0xD073, 0xD073 }, +{ 0xD074, 0xD074, 0xD074 }, +{ 0xD075, 0xD075, 0xD075 }, +{ 0xD076, 0xD076, 0xD076 }, +{ 0xD077, 0xD077, 0xD077 }, +{ 0xD078, 0xD078, 0xD078 }, +{ 0xD079, 0xD079, 0xD079 }, +{ 0xD07A, 0xD07A, 0xD07A }, +{ 0xD07B, 0xD07B, 0xD07B }, +{ 0xD07C, 0xD07C, 0xD07C }, +{ 0xD07D, 0xD07D, 0xD07D }, +{ 0xD07E, 0xD07E, 0xD07E }, +{ 0xD07F, 0xD07F, 0xD07F }, +{ 0xD080, 0xD080, 0xD080 }, +{ 0xD081, 0xD081, 0xD081 }, +{ 0xD082, 0xD082, 0xD082 }, +{ 0xD083, 0xD083, 0xD083 }, +{ 0xD084, 0xD084, 0xD084 }, +{ 0xD085, 0xD085, 0xD085 }, +{ 0xD086, 0xD086, 0xD086 }, +{ 0xD087, 0xD087, 0xD087 }, +{ 0xD088, 0xD088, 0xD088 }, +{ 0xD089, 0xD089, 0xD089 }, +{ 0xD08A, 0xD08A, 0xD08A }, +{ 0xD08B, 0xD08B, 0xD08B }, +{ 0xD08C, 0xD08C, 0xD08C }, +{ 0xD08D, 0xD08D, 0xD08D }, +{ 0xD08E, 0xD08E, 0xD08E }, +{ 0xD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, 0xD0FD, 0xD0FD }, +{ 0xD0FE, 0xD0FE, 0xD0FE }, +{ 0xD0FF, 0xD0FF, 0xD0FF }, +{ 0xD100, 0xD100, 0xD100 }, +{ 0xD101, 0xD101, 0xD101 }, +{ 0xD102, 0xD102, 0xD102 }, +{ 0xD103, 0xD103, 0xD103 }, +{ 0xD104, 0xD104, 0xD104 }, +{ 0xD105, 0xD105, 0xD105 }, +{ 0xD106, 0xD106, 0xD106 }, +{ 0xD107, 0xD107, 0xD107 }, +{ 0xD108, 0xD108, 0xD108 }, +{ 0xD109, 0xD109, 0xD109 }, +{ 0xD10A, 0xD10A, 0xD10A }, +{ 0xD10B, 0xD10B, 0xD10B }, +{ 0xD10C, 0xD10C, 0xD10C }, +{ 0xD10D, 0xD10D, 0xD10D }, +{ 0xD10E, 0xD10E, 0xD10E }, +{ 0xD10F, 0xD10F, 0xD10F }, +{ 0xD110, 0xD110, 0xD110 }, +{ 0xD111, 0xD111, 0xD111 }, +{ 0xD112, 0xD112, 0xD112 }, +{ 0xD113, 0xD113, 0xD113 }, +{ 0xD114, 0xD114, 0xD114 }, +{ 0xD115, 0xD115, 0xD115 }, +{ 0xD116, 0xD116, 0xD116 }, +{ 0xD117, 0xD117, 0xD117 }, +{ 0xD118, 0xD118, 0xD118 }, +{ 0xD119, 0xD119, 0xD119 }, +{ 0xD11A, 0xD11A, 0xD11A }, +{ 0xD11B, 0xD11B, 0xD11B }, +{ 0xD11C, 0xD11C, 0xD11C }, +{ 0xD11D, 0xD11D, 0xD11D }, +{ 0xD11E, 0xD11E, 0xD11E }, +{ 0xD11F, 0xD11F, 0xD11F }, +{ 0xD120, 0xD120, 0xD120 }, +{ 0xD121, 0xD121, 0xD121 }, +{ 0xD122, 0xD122, 0xD122 }, +{ 0xD123, 0xD123, 0xD123 }, +{ 0xD124, 0xD124, 0xD124 }, +{ 0xD125, 0xD125, 0xD125 }, +{ 0xD126, 0xD126, 0xD126 }, +{ 0xD127, 0xD127, 0xD127 }, +{ 0xD128, 0xD128, 0xD128 }, +{ 0xD129, 0xD129, 0xD129 }, +{ 0xD12A, 0xD12A, 0xD12A }, +{ 0xD12B, 0xD12B, 0xD12B }, +{ 0xD12C, 0xD12C, 0xD12C }, +{ 0xD12D, 0xD12D, 0xD12D }, +{ 0xD12E, 0xD12E, 0xD12E }, +{ 0xD12F, 0xD12F, 0xD12F }, +{ 0xD130, 0xD130, 0xD130 }, +{ 0xD131, 0xD131, 0xD131 }, +{ 0xD132, 0xD132, 0xD132 }, +{ 0xD133, 0xD133, 0xD133 }, +{ 0xD134, 0xD134, 0xD134 }, +{ 0xD135, 0xD135, 0xD135 }, +{ 0xD136, 0xD136, 0xD136 }, +{ 0xD137, 0xD137, 0xD137 }, +{ 0xD138, 0xD138, 0xD138 }, +{ 0xD139, 0xD139, 0xD139 }, +{ 0xD13A, 0xD13A, 0xD13A }, +{ 0xD13B, 0xD13B, 0xD13B }, +{ 0xD13C, 0xD13C, 0xD13C }, +{ 0xD13D, 0xD13D, 0xD13D }, +{ 0xD13E, 0xD13E, 0xD13E }, +{ 0xD13F, 0xD13F, 0xD13F }, +{ 0xD140, 0xD140, 0xD140 }, +{ 0xD141, 0xD141, 0xD141 }, +{ 0xD142, 0xD142, 0xD142 }, +{ 0xD143, 0xD143, 0xD143 }, +{ 0xD144, 0xD144, 0xD144 }, +{ 0xD145, 0xD145, 0xD145 }, +{ 0xD146, 0xD146, 0xD146 }, +{ 0xD147, 0xD147, 0xD147 }, +{ 0xD148, 0xD148, 0xD148 }, +{ 0xD149, 0xD149, 0xD149 }, +{ 0xD14A, 0xD14A, 0xD14A }, +{ 0xD14B, 0xD14B, 0xD14B }, +{ 0xD14C, 0xD14C, 0xD14C }, +{ 0xD14D, 0xD14D, 0xD14D }, +{ 0xD14E, 0xD14E, 0xD14E }, +{ 0xD14F, 0xD14F, 0xD14F }, +{ 0xD150, 0xD150, 0xD150 }, +{ 0xD151, 0xD151, 0xD151 }, +{ 0xD152, 0xD152, 0xD152 }, +{ 0xD153, 0xD153, 0xD153 }, +{ 0xD154, 0xD154, 0xD154 }, +{ 0xD155, 0xD155, 0xD155 }, +{ 0xD156, 0xD156, 0xD156 }, +{ 0xD157, 0xD157, 0xD157 }, +{ 0xD158, 0xD158, 0xD158 }, +{ 0xD159, 0xD159, 0xD159 }, +{ 0xD15A, 0xD15A, 0xD15A }, +{ 0xD15B, 0xD15B, 0xD15B }, +{ 0xD15C, 0xD15C, 0xD15C }, +{ 0xD15D, 0xD15D, 0xD15D }, +{ 0xD15E, 0xD15E, 0xD15E }, +{ 0xD15F, 0xD15F, 0xD15F }, +{ 0xD160, 0xD160, 0xD160 }, +{ 0xD161, 0xD161, 0xD161 }, +{ 0xD162, 0xD162, 0xD162 }, +{ 0xD163, 0xD163, 0xD163 }, +{ 0xD164, 0xD164, 0xD164 }, +{ 0xD165, 0xD165, 0xD165 }, +{ 0xD166, 0xD166, 0xD166 }, +{ 0xD167, 0xD167, 0xD167 }, +{ 0xD168, 0xD168, 0xD168 }, +{ 0xD169, 0xD169, 0xD169 }, +{ 0xD16A, 0xD16A, 0xD16A }, +{ 0xD16B, 0xD16B, 0xD16B }, +{ 0xD16C, 0xD16C, 0xD16C }, +{ 0xD16D, 0xD16D, 0xD16D }, +{ 0xD16E, 0xD16E, 0xD16E }, +{ 0xD16F, 0xD16F, 0xD16F }, +{ 0xD170, 0xD170, 0xD170 }, +{ 0xD171, 0xD171, 0xD171 }, +{ 0xD172, 0xD172, 0xD172 }, +{ 0xD173, 0xD173, 0xD173 }, +{ 0xD174, 0xD174, 0xD174 }, +{ 0xD175, 0xD175, 0xD175 }, +{ 0xD176, 0xD176, 0xD176 }, +{ 0xD177, 0xD177, 0xD177 }, +{ 0xD178, 0xD178, 0xD178 }, +{ 0xD179, 0xD179, 0xD179 }, +{ 0xD17A, 0xD17A, 0xD17A }, +{ 0xD17B, 0xD17B, 0xD17B }, +{ 0xD17C, 0xD17C, 0xD17C }, +{ 0xD17D, 0xD17D, 0xD17D }, +{ 0xD17E, 0xD17E, 0xD17E }, +{ 0xD17F, 0xD17F, 0xD17F }, +{ 0xD180, 0xD180, 0xD180 }, +{ 0xD181, 0xD181, 0xD181 }, +{ 0xD182, 0xD182, 0xD182 }, +{ 0xD183, 0xD183, 0xD183 }, +{ 0xD184, 0xD184, 0xD184 }, +{ 0xD185, 0xD185, 0xD185 }, +{ 0xD186, 0xD186, 0xD186 }, +{ 0xD187, 0xD187, 0xD187 }, +{ 0xD188, 0xD188, 0xD188 }, +{ 0xD189, 0xD189, 0xD189 }, +{ 0xD18A, 0xD18A, 0xD18A }, +{ 0xD18B, 0xD18B, 0xD18B }, +{ 0xD18C, 0xD18C, 0xD18C }, +{ 0xD18D, 0xD18D, 0xD18D }, +{ 0xD18E, 0xD18E, 0xD18E }, +{ 0xD18F, 0xD18F, 0xD18F }, +{ 0xD190, 0xD190, 0xD190 }, +{ 0xD191, 0xD191, 0xD191 }, +{ 0xD192, 0xD192, 0xD192 }, +{ 0xD193, 0xD193, 0xD193 }, +{ 0xD194, 0xD194, 0xD194 }, +{ 0xD195, 0xD195, 0xD195 }, +{ 0xD196, 0xD196, 0xD196 }, +{ 0xD197, 0xD197, 0xD197 }, +{ 0xD198, 0xD198, 0xD198 }, +{ 0xD199, 0xD199, 0xD199 }, +{ 0xD19A, 0xD19A, 0xD19A }, +{ 0xD19B, 0xD19B, 0xD19B }, +{ 0xD19C, 0xD19C, 0xD19C }, +{ 0xD19D, 0xD19D, 0xD19D }, +{ 0xD19E, 0xD19E, 0xD19E }, +{ 0xD19F, 0xD19F, 0xD19F }, +{ 0xD1A0, 0xD1A0, 0xD1A0 }, +{ 0xD1A1, 0xD1A1, 0xD1A1 }, +{ 0xD1A2, 0xD1A2, 0xD1A2 }, +{ 0xD1A3, 0xD1A3, 0xD1A3 }, +{ 0xD1A4, 0xD1A4, 0xD1A4 }, +{ 0xD1A5, 0xD1A5, 0xD1A5 }, +{ 0xD1A6, 0xD1A6, 0xD1A6 }, +{ 0xD1A7, 0xD1A7,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EF, 0xD1EF, 0xD1EF }, +{ 0xD1F0, 0xD1F0, 0xD1F0 }, +{ 0xD1F1, 0xD1F1, 0xD1F1 }, +{ 0xD1F2, 0xD1F2, 0xD1F2 }, +{ 0xD1F3, 0xD1F3, 0xD1F3 }, +{ 0xD1F4, 0xD1F4, 0xD1F4 }, +{ 0xD1F5, 0xD1F5, 0xD1F5 }, +{ 0xD1F6, 0xD1F6, 0xD1F6 }, +{ 0xD1F7, 0xD1F7, 0xD1F7 }, +{ 0xD1F8, 0xD1F8, 0xD1F8 }, +{ 0xD1F9, 0xD1F9, 0xD1F9 }, +{ 0xD1FA, 0xD1FA, 0xD1FA }, +{ 0xD1FB, 0xD1FB, 0xD1FB }, +{ 0xD1FC, 0xD1FC, 0xD1FC }, +{ 0xD1FD, 0xD1FD, 0xD1FD }, +{ 0xD1FE, 0xD1FE, 0xD1FE }, +{ 0xD1FF, 0xD1FF, 0xD1FF }, +{ 0xD200, 0xD200, 0xD200 }, +{ 0xD201, 0xD201, 0xD201 }, +{ 0xD202, 0xD202, 0xD202 }, +{ 0xD203, 0xD203, 0xD203 }, +{ 0xD204, 0xD204, 0xD204 }, +{ 0xD205, 0xD205, 0xD205 }, +{ 0xD206, 0xD206, 0xD206 }, +{ 0xD207, 0xD207, 0xD207 }, +{ 0xD208, 0xD208, 0xD208 }, +{ 0xD209, 0xD209, 0xD209 }, +{ 0xD20A, 0xD20A, 0xD20A }, +{ 0xD20B, 0xD20B, 0xD20B }, +{ 0xD20C, 0xD20C, 0xD20C }, +{ 0xD20D, 0xD20D, 0xD20D }, +{ 0xD20E, 0xD20E, 0xD20E }, +{ 0xD20F, 0xD20F, 0xD20F }, +{ 0xD210, 0xD210, 0xD210 }, +{ 0xD211, 0xD211, 0xD211 }, +{ 0xD212, 0xD212, 0xD212 }, +{ 0xD213, 0xD213, 0xD213 }, +{ 0xD214, 0xD214, 0xD214 }, +{ 0xD215, 0xD215, 0xD215 }, +{ 0xD216, 0xD216, 0xD216 }, +{ 0xD217, 0xD217, 0xD217 }, +{ 0xD218, 0xD218, 0xD218 }, +{ 0xD219, 0xD219, 0xD219 }, +{ 0xD21A, 0xD21A, 0xD21A }, +{ 0xD21B, 0xD21B, 0xD21B }, +{ 0xD21C, 0xD21C, 0xD21C }, +{ 0xD21D, 0xD21D, 0xD21D }, +{ 0xD21E, 0xD21E, 0xD21E }, +{ 0xD21F, 0xD21F, 0xD21F }, +{ 0xD220, 0xD220, 0xD220 }, +{ 0xD221, 0xD221, 0xD221 }, +{ 0xD222, 0xD222, 0xD222 }, +{ 0xD223, 0xD223, 0xD223 }, +{ 0xD224, 0xD224, 0xD224 }, +{ 0xD225, 0xD225, 0xD225 }, +{ 0xD226, 0xD226, 0xD226 }, +{ 0xD227, 0xD227, 0xD227 }, +{ 0xD228, 0xD228, 0xD228 }, +{ 0xD229, 0xD229, 0xD229 }, +{ 0xD22A, 0xD22A, 0xD22A }, +{ 0xD22B, 0xD22B, 0xD22B }, +{ 0xD22C, 0xD22C, 0xD22C }, +{ 0xD22D, 0xD22D, 0xD22D }, +{ 0xD22E, 0xD22E, 0xD22E }, +{ 0xD22F, 0xD22F, 0xD22F }, +{ 0xD230, 0xD230, 0xD230 }, +{ 0xD231, 0xD231, 0xD231 }, +{ 0xD232, 0xD232, 0xD232 }, +{ 0xD233, 0xD233, 0xD233 }, +{ 0xD234, 0xD234, 0xD234 }, +{ 0xD235, 0xD235, 0xD235 }, +{ 0xD236, 0xD236, 0xD236 }, +{ 0xD237, 0xD237, 0xD237 }, +{ 0xD238, 0xD238, 0xD238 }, +{ 0xD239, 0xD239, 0xD239 }, +{ 0xD23A, 0xD23A, 0xD23A }, +{ 0xD23B, 0xD23B, 0xD23B }, +{ 0xD23C, 0xD23C, 0xD23C }, +{ 0xD23D, 0xD23D, 0xD23D }, +{ 0xD23E, 0xD23E, 0xD23E }, +{ 0xD23F, 0xD23F, 0xD23F }, +{ 0xD240, 0xD240, 0xD240 }, +{ 0xD241, 0xD241, 0xD241 }, +{ 0xD242, 0xD242, 0xD242 }, +{ 0xD243, 0xD243, 0xD243 }, +{ 0xD244, 0xD244, 0xD244 }, +{ 0xD245, 0xD245, 0xD245 }, +{ 0xD246, 0xD246, 0xD246 }, +{ 0xD247, 0xD247, 0xD247 }, +{ 0xD248, 0xD248, 0xD248 }, +{ 0xD249, 0xD249, 0xD249 }, +{ 0xD24A, 0xD24A, 0xD24A }, +{ 0xD24B, 0xD24B, 0xD24B }, +{ 0xD24C, 0xD24C, 0xD24C }, +{ 0xD24D, 0xD24D, 0xD24D }, +{ 0xD24E, 0xD24E, 0xD24E }, +{ 0xD24F, 0xD24F, 0xD24F }, +{ 0xD250, 0xD250, 0xD250 }, +{ 0xD251, 0xD251, 0xD251 }, +{ 0xD252, 0xD252, 0xD252 }, +{ 0xD253, 0xD253, 0xD253 }, +{ 0xD254, 0xD254, 0xD254 }, +{ 0xD255, 0xD255, 0xD255 }, +{ 0xD256, 0xD256, 0xD256 }, +{ 0xD257, 0xD257, 0xD257 }, +{ 0xD258, 0xD258, 0xD258 }, +{ 0xD259, 0xD259, 0xD259 }, +{ 0xD25A, 0xD25A, 0xD25A }, +{ 0xD25B, 0xD25B, 0xD25B }, +{ 0xD25C, 0xD25C, 0xD25C }, +{ 0xD25D, 0xD25D, 0xD25D }, +{ 0xD25E, 0xD25E, 0xD25E }, +{ 0xD25F, 0xD25F, 0xD25F }, +{ 0xD260, 0xD260, 0xD260 }, +{ 0xD261, 0xD261, 0xD261 }, +{ 0xD262, 0xD262, 0xD262 }, +{ 0xD263, 0xD263, 0xD263 }, +{ 0xD264, 0xD264, 0xD264 }, +{ 0xD265, 0xD265, 0xD265 }, +{ 0xD266, 0xD266, 0xD266 }, +{ 0xD267, 0xD267, 0xD267 }, +{ 0xD268, 0xD268, 0xD268 }, +{ 0xD269, 0xD269, 0xD269 }, +{ 0xD26A, 0xD26A, 0xD26A }, +{ 0xD26B, 0xD26B, 0xD26B }, +{ 0xD26C, 0xD26C, 0xD26C }, +{ 0xD26D, 0xD26D, 0xD26D }, +{ 0xD26E, 0xD26E, 0xD26E }, +{ 0xD26F, 0xD26F, 0xD26F }, +{ 0xD270, 0xD270, 0xD270 }, +{ 0xD271, 0xD271, 0xD271 }, +{ 0xD272, 0xD272, 0xD272 }, +{ 0xD273, 0xD273, 0xD273 }, +{ 0xD274, 0xD274, 0xD274 }, +{ 0xD275, 0xD275, 0xD275 }, +{ 0xD276, 0xD276, 0xD276 }, +{ 0xD277, 0xD277, 0xD277 }, +{ 0xD278, 0xD278, 0xD278 }, +{ 0xD279, 0xD279, 0xD279 }, +{ 0xD27A, 0xD27A, 0xD27A }, +{ 0xD27B, 0xD27B, 0xD27B }, +{ 0xD27C, 0xD27C, 0xD27C }, +{ 0xD27D, 0xD27D, 0xD27D }, +{ 0xD27E, 0xD27E, 0xD27E }, +{ 0xD27F, 0xD27F, 0xD27F }, +{ 0xD280, 0xD280, 0xD280 }, +{ 0xD281, 0xD281, 0xD281 }, +{ 0xD282, 0xD282, 0xD282 }, +{ 0xD283, 0xD283, 0xD283 }, +{ 0xD284, 0xD284, 0xD284 }, +{ 0xD285, 0xD285, 0xD285 }, +{ 0xD286, 0xD286, 0xD286 }, +{ 0xD287, 0xD287, 0xD287 }, +{ 0xD288, 0xD288, 0xD288 }, +{ 0xD289, 0xD289, 0xD289 }, +{ 0xD28A, 0xD28A, 0xD28A }, +{ 0xD28B, 0xD28B, 0xD28B }, +{ 0xD28C, 0xD28C, 0xD28C }, +{ 0xD28D, 0xD28D, 0xD28D }, +{ 0xD28E, 0xD28E, 0xD28E }, +{ 0xD28F, 0xD28F, 0xD28F }, +{ 0xD290, 0xD290, 0xD290 }, +{ 0xD291, 0xD291, 0xD291 }, +{ 0xD292, 0xD292, 0xD292 }, +{ 0xD293, 0xD293, 0xD293 }, +{ 0xD294, 0xD294, 0xD294 }, +{ 0xD295, 0xD295, 0xD295 }, +{ 0xD296, 0xD296, 0xD296 }, +{ 0xD297, 0xD297, 0xD297 }, +{ 0xD298, 0xD298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0xD306, 0xD306, 0xD306 }, +{ 0xD307, 0xD307, 0xD307 }, +{ 0xD308, 0xD308, 0xD308 }, +{ 0xD309, 0xD309, 0xD309 }, +{ 0xD30A, 0xD30A, 0xD30A }, +{ 0xD30B, 0xD30B, 0xD30B }, +{ 0xD30C, 0xD30C, 0xD30C }, +{ 0xD30D, 0xD30D, 0xD30D }, +{ 0xD30E, 0xD30E, 0xD30E }, +{ 0xD30F, 0xD30F, 0xD30F }, +{ 0xD310, 0xD310, 0xD310 }, +{ 0xD311, 0xD311, 0xD311 }, +{ 0xD312, 0xD312, 0xD312 }, +{ 0xD313, 0xD313, 0xD313 }, +{ 0xD314, 0xD314, 0xD314 }, +{ 0xD315, 0xD315, 0xD315 }, +{ 0xD316, 0xD316, 0xD316 }, +{ 0xD317, 0xD317, 0xD317 }, +{ 0xD318, 0xD318, 0xD318 }, +{ 0xD319, 0xD319, 0xD319 }, +{ 0xD31A, 0xD31A, 0xD31A }, +{ 0xD31B, 0xD31B, 0xD31B }, +{ 0xD31C, 0xD31C, 0xD31C }, +{ 0xD31D, 0xD31D, 0xD31D }, +{ 0xD31E, 0xD31E, 0xD31E }, +{ 0xD31F, 0xD31F, 0xD31F }, +{ 0xD320, 0xD320, 0xD320 }, +{ 0xD321, 0xD321, 0xD321 }, +{ 0xD322, 0xD322, 0xD322 }, +{ 0xD323, 0xD323, 0xD323 }, +{ 0xD324, 0xD324, 0xD324 }, +{ 0xD325, 0xD325, 0xD325 }, +{ 0xD326, 0xD326, 0xD326 }, +{ 0xD327, 0xD327, 0xD327 }, +{ 0xD328, 0xD328, 0xD328 }, +{ 0xD329, 0xD329, 0xD329 }, +{ 0xD32A, 0xD32A, 0xD32A }, +{ 0xD32B, 0xD32B, 0xD32B }, +{ 0xD32C, 0xD32C, 0xD32C }, +{ 0xD32D, 0xD32D, 0xD32D }, +{ 0xD32E, 0xD32E, 0xD32E }, +{ 0xD32F, 0xD32F, 0xD32F }, +{ 0xD330, 0xD330, 0xD330 }, +{ 0xD331, 0xD331, 0xD331 }, +{ 0xD332, 0xD332, 0xD332 }, +{ 0xD333, 0xD333, 0xD333 }, +{ 0xD334, 0xD334, 0xD334 }, +{ 0xD335, 0xD335, 0xD335 }, +{ 0xD336, 0xD336, 0xD336 }, +{ 0xD337, 0xD337, 0xD337 }, +{ 0xD338, 0xD338, 0xD338 }, +{ 0xD339, 0xD339, 0xD339 }, +{ 0xD33A, 0xD33A, 0xD33A }, +{ 0xD33B, 0xD33B, 0xD33B }, +{ 0xD33C, 0xD33C, 0xD33C }, +{ 0xD33D, 0xD33D, 0xD33D }, +{ 0xD33E, 0xD33E, 0xD33E }, +{ 0xD33F, 0xD33F, 0xD33F }, +{ 0xD340, 0xD340, 0xD340 }, +{ 0xD341, 0xD341, 0xD341 }, +{ 0xD342, 0xD342, 0xD342 }, +{ 0xD343, 0xD343, 0xD343 }, +{ 0xD344, 0xD344, 0xD344 }, +{ 0xD345, 0xD345, 0xD345 }, +{ 0xD346, 0xD346, 0xD346 }, +{ 0xD347, 0xD347, 0xD347 }, +{ 0xD348, 0xD348, 0xD348 }, +{ 0xD349, 0xD349, 0xD349 }, +{ 0xD34A, 0xD34A, 0xD34A }, +{ 0xD34B, 0xD34B, 0xD34B }, +{ 0xD34C, 0xD34C, 0xD34C }, +{ 0xD34D, 0xD34D, 0xD34D }, +{ 0xD34E, 0xD34E, 0xD34E }, +{ 0xD34F, 0xD34F, 0xD34F }, +{ 0xD350, 0xD350, 0xD350 }, +{ 0xD351, 0xD351, 0xD351 }, +{ 0xD352, 0xD352, 0xD352 }, +{ 0xD353, 0xD353, 0xD353 }, +{ 0xD354, 0xD354, 0xD354 }, +{ 0xD355, 0xD355, 0xD355 }, +{ 0xD356, 0xD356, 0xD356 }, +{ 0xD357, 0xD357, 0xD357 }, +{ 0xD358, 0xD358, 0xD358 }, +{ 0xD359, 0xD359, 0xD359 }, +{ 0xD35A, 0xD35A, 0xD35A }, +{ 0xD35B, 0xD35B, 0xD35B }, +{ 0xD35C, 0xD35C, 0xD35C }, +{ 0xD35D, 0xD35D, 0xD35D }, +{ 0xD35E, 0xD35E, 0xD35E }, +{ 0xD35F, 0xD35F, 0xD35F }, +{ 0xD360, 0xD360, 0xD360 }, +{ 0xD361, 0xD361, 0xD361 }, +{ 0xD362, 0xD362, 0xD362 }, +{ 0xD363, 0xD363, 0xD363 }, +{ 0xD364, 0xD364, 0xD364 }, +{ 0xD365, 0xD365, 0xD365 }, +{ 0xD366, 0xD366, 0xD366 }, +{ 0xD367, 0xD367, 0xD367 }, +{ 0xD368, 0xD368, 0xD368 }, +{ 0xD369, 0xD369, 0xD369 }, +{ 0xD36A, 0xD36A, 0xD36A }, +{ 0xD36B, 0xD36B, 0xD36B }, +{ 0xD36C, 0xD36C, 0xD36C }, +{ 0xD36D, 0xD36D, 0xD36D }, +{ 0xD36E, 0xD36E, 0xD36E }, +{ 0xD36F, 0xD36F, 0xD36F }, +{ 0xD370, 0xD370, 0xD370 }, +{ 0xD371, 0xD371, 0xD371 }, +{ 0xD372, 0xD372, 0xD372 }, +{ 0xD373, 0xD373, 0xD373 }, +{ 0xD374, 0xD374, 0xD374 }, +{ 0xD375, 0xD375, 0xD375 }, +{ 0xD376, 0xD376, 0xD376 }, +{ 0xD377, 0xD377, 0xD377 }, +{ 0xD378, 0xD378, 0xD378 }, +{ 0xD379, 0xD379, 0xD379 }, +{ 0xD37A, 0xD37A, 0xD37A }, +{ 0xD37B, 0xD37B, 0xD37B }, +{ 0xD37C, 0xD37C, 0xD37C }, +{ 0xD37D, 0xD37D, 0xD37D }, +{ 0xD37E, 0xD37E, 0xD37E }, +{ 0xD37F, 0xD37F, 0xD37F }, +{ 0xD380, 0xD380, 0xD380 }, +{ 0xD381, 0xD381, 0xD381 }, +{ 0xD382, 0xD382, 0xD382 }, +{ 0xD383, 0xD383, 0xD383 }, +{ 0xD384, 0xD384, 0xD384 }, +{ 0xD385, 0xD385, 0xD385 }, +{ 0xD386, 0xD386, 0xD386 }, +{ 0xD387, 0xD387, 0xD387 }, +{ 0xD388, 0xD388, 0xD388 }, +{ 0xD389, 0xD389, 0xD389 }, +{ 0xD38A, 0xD38A, 0xD38A }, +{ 0xD38B, 0xD38B, 0xD38B }, +{ 0xD38C, 0xD38C, 0xD38C }, +{ 0xD38D, 0xD38D, 0xD38D }, +{ 0xD38E, 0xD38E, 0xD38E }, +{ 0xD38F, 0xD38F, 0xD38F }, +{ 0xD390, 0xD390, 0xD390 }, +{ 0xD391, 0xD391, 0xD391 }, +{ 0xD392, 0xD392, 0xD392 }, +{ 0xD393, 0xD393, 0xD393 }, +{ 0xD394, 0xD394, 0xD394 }, +{ 0xD395, 0xD395, 0xD395 }, +{ 0xD396, 0xD396, 0xD396 }, +{ 0xD397, 0xD397, 0xD397 }, +{ 0xD398, 0xD398, 0xD398 }, +{ 0xD399, 0xD399, 0xD399 }, +{ 0xD39A, 0xD39A, 0xD39A }, +{ 0xD39B, 0xD39B, 0xD39B }, +{ 0xD39C, 0xD39C, 0xD39C }, +{ 0xD39D, 0xD39D, 0xD39D }, +{ 0xD39E, 0xD39E, 0xD39E }, +{ 0xD39F, 0xD39F, 0xD39F }, +{ 0xD3A0, 0xD3A0, 0xD3A0 }, +{ 0xD3A1, 0xD3A1, 0xD3A1 }, +{ 0xD3A2, 0xD3A2, 0xD3A2 }, +{ 0xD3A3, 0xD3A3, 0xD3A3 }, +{ 0xD3A4, 0xD3A4, 0xD3A4 }, +{ 0xD3A5, 0xD3A5, 0xD3A5 }, +{ 0xD3A6, 0xD3A6, 0xD3A6 }, +{ 0xD3A7, 0xD3A7, 0xD3A7 }, +{ 0xD3A8, 0xD3A8, 0xD3A8 }, +{ 0xD3A9, 0xD3A9, 0xD3A9 }, +{ 0xD3AA, 0xD3AA, 0xD3AA }, +{ 0xD3AB, 0xD3AB, 0xD3AB }, +{ 0xD3AC, 0xD3AC, 0xD3AC }, +{ 0xD3AD, 0xD3AD, 0xD3AD }, +{ 0xD3AE, 0xD3AE, 0xD3AE }, +{ 0xD3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D3F6 }, +{ 0xD3F7, 0xD3F7, 0xD3F7 }, +{ 0xD3F8, 0xD3F8, 0xD3F8 }, +{ 0xD3F9, 0xD3F9, 0xD3F9 }, +{ 0xD3FA, 0xD3FA, 0xD3FA }, +{ 0xD3FB, 0xD3FB, 0xD3FB }, +{ 0xD3FC, 0xD3FC, 0xD3FC }, +{ 0xD3FD, 0xD3FD, 0xD3FD }, +{ 0xD3FE, 0xD3FE, 0xD3FE }, +{ 0xD3FF, 0xD3FF, 0xD3FF }, +{ 0xD400, 0xD400, 0xD400 }, +{ 0xD401, 0xD401, 0xD401 }, +{ 0xD402, 0xD402, 0xD402 }, +{ 0xD403, 0xD403, 0xD403 }, +{ 0xD404, 0xD404, 0xD404 }, +{ 0xD405, 0xD405, 0xD405 }, +{ 0xD406, 0xD406, 0xD406 }, +{ 0xD407, 0xD407, 0xD407 }, +{ 0xD408, 0xD408, 0xD408 }, +{ 0xD409, 0xD409, 0xD409 }, +{ 0xD40A, 0xD40A, 0xD40A }, +{ 0xD40B, 0xD40B, 0xD40B }, +{ 0xD40C, 0xD40C, 0xD40C }, +{ 0xD40D, 0xD40D, 0xD40D }, +{ 0xD40E, 0xD40E, 0xD40E }, +{ 0xD40F, 0xD40F, 0xD40F }, +{ 0xD410, 0xD410, 0xD410 }, +{ 0xD411, 0xD411, 0xD411 }, +{ 0xD412, 0xD412, 0xD412 }, +{ 0xD413, 0xD413, 0xD413 }, +{ 0xD414, 0xD414, 0xD414 }, +{ 0xD415, 0xD415, 0xD415 }, +{ 0xD416, 0xD416, 0xD416 }, +{ 0xD417, 0xD417, 0xD417 }, +{ 0xD418, 0xD418, 0xD418 }, +{ 0xD419, 0xD419, 0xD419 }, +{ 0xD41A, 0xD41A, 0xD41A }, +{ 0xD41B, 0xD41B, 0xD41B }, +{ 0xD41C, 0xD41C, 0xD41C }, +{ 0xD41D, 0xD41D, 0xD41D }, +{ 0xD41E, 0xD41E, 0xD41E }, +{ 0xD41F, 0xD41F, 0xD41F }, +{ 0xD420, 0xD420, 0xD420 }, +{ 0xD421, 0xD421, 0xD421 }, +{ 0xD422, 0xD422, 0xD422 }, +{ 0xD423, 0xD423, 0xD423 }, +{ 0xD424, 0xD424, 0xD424 }, +{ 0xD425, 0xD425, 0xD425 }, +{ 0xD426, 0xD426, 0xD426 }, +{ 0xD427, 0xD427, 0xD427 }, +{ 0xD428, 0xD428, 0xD428 }, +{ 0xD429, 0xD429, 0xD429 }, +{ 0xD42A, 0xD42A, 0xD42A }, +{ 0xD42B, 0xD42B, 0xD42B }, +{ 0xD42C, 0xD42C, 0xD42C }, +{ 0xD42D, 0xD42D, 0xD42D }, +{ 0xD42E, 0xD42E, 0xD42E }, +{ 0xD42F, 0xD42F, 0xD42F }, +{ 0xD430, 0xD430, 0xD430 }, +{ 0xD431, 0xD431, 0xD431 }, +{ 0xD432, 0xD432, 0xD432 }, +{ 0xD433, 0xD433, 0xD433 }, +{ 0xD434, 0xD434, 0xD434 }, +{ 0xD435, 0xD435, 0xD435 }, +{ 0xD436, 0xD436, 0xD436 }, +{ 0xD437, 0xD437, 0xD437 }, +{ 0xD438, 0xD438, 0xD438 }, +{ 0xD439, 0xD439, 0xD439 }, +{ 0xD43A, 0xD43A, 0xD43A }, +{ 0xD43B, 0xD43B, 0xD43B }, +{ 0xD43C, 0xD43C, 0xD43C }, +{ 0xD43D, 0xD43D, 0xD43D }, +{ 0xD43E, 0xD43E, 0xD43E }, +{ 0xD43F, 0xD43F, 0xD43F }, +{ 0xD440, 0xD440, 0xD440 }, +{ 0xD441, 0xD441, 0xD441 }, +{ 0xD442, 0xD442, 0xD442 }, +{ 0xD443, 0xD443, 0xD443 }, +{ 0xD444, 0xD444, 0xD444 }, +{ 0xD445, 0xD445, 0xD445 }, +{ 0xD446, 0xD446, 0xD446 }, +{ 0xD447, 0xD447, 0xD447 }, +{ 0xD448, 0xD448, 0xD448 }, +{ 0xD449, 0xD449, 0xD449 }, +{ 0xD44A, 0xD44A, 0xD44A }, +{ 0xD44B, 0xD44B, 0xD44B }, +{ 0xD44C, 0xD44C, 0xD44C }, +{ 0xD44D, 0xD44D, 0xD44D }, +{ 0xD44E, 0xD44E, 0xD44E }, +{ 0xD44F, 0xD44F, 0xD44F }, +{ 0xD450, 0xD450, 0xD450 }, +{ 0xD451, 0xD451, 0xD451 }, +{ 0xD452, 0xD452, 0xD452 }, +{ 0xD453, 0xD453, 0xD453 }, +{ 0xD454, 0xD454, 0xD454 }, +{ 0xD455, 0xD455, 0xD455 }, +{ 0xD456, 0xD456, 0xD456 }, +{ 0xD457, 0xD457, 0xD457 }, +{ 0xD458, 0xD458, 0xD458 }, +{ 0xD459, 0xD459, 0xD459 }, +{ 0xD45A, 0xD45A, 0xD45A }, +{ 0xD45B, 0xD45B, 0xD45B }, +{ 0xD45C, 0xD45C, 0xD45C }, +{ 0xD45D, 0xD45D, 0xD45D }, +{ 0xD45E, 0xD45E, 0xD45E }, +{ 0xD45F, 0xD45F, 0xD45F }, +{ 0xD460, 0xD460, 0xD460 }, +{ 0xD461, 0xD461, 0xD461 }, +{ 0xD462, 0xD462, 0xD462 }, +{ 0xD463, 0xD463, 0xD463 }, +{ 0xD464, 0xD464, 0xD464 }, +{ 0xD465, 0xD465, 0xD465 }, +{ 0xD466, 0xD466, 0xD466 }, +{ 0xD467, 0xD467, 0xD467 }, +{ 0xD468, 0xD468, 0xD468 }, +{ 0xD469, 0xD469, 0xD469 }, +{ 0xD46A, 0xD46A, 0xD46A }, +{ 0xD46B, 0xD46B, 0xD46B }, +{ 0xD46C, 0xD46C, 0xD46C }, +{ 0xD46D, 0xD46D, 0xD46D }, +{ 0xD46E, 0xD46E, 0xD46E }, +{ 0xD46F, 0xD46F, 0xD46F }, +{ 0xD470, 0xD470, 0xD470 }, +{ 0xD471, 0xD471, 0xD471 }, +{ 0xD472, 0xD472, 0xD472 }, +{ 0xD473, 0xD473, 0xD473 }, +{ 0xD474, 0xD474, 0xD474 }, +{ 0xD475, 0xD475, 0xD475 }, +{ 0xD476, 0xD476, 0xD476 }, +{ 0xD477, 0xD477, 0xD477 }, +{ 0xD478, 0xD478, 0xD478 }, +{ 0xD479, 0xD479, 0xD479 }, +{ 0xD47A, 0xD47A, 0xD47A }, +{ 0xD47B, 0xD47B, 0xD47B }, +{ 0xD47C, 0xD47C, 0xD47C }, +{ 0xD47D, 0xD47D, 0xD47D }, +{ 0xD47E, 0xD47E, 0xD47E }, +{ 0xD47F, 0xD47F, 0xD47F }, +{ 0xD480, 0xD480, 0xD480 }, +{ 0xD481, 0xD481, 0xD481 }, +{ 0xD482, 0xD482, 0xD482 }, +{ 0xD483, 0xD483, 0xD483 }, +{ 0xD484, 0xD484, 0xD484 }, +{ 0xD485, 0xD485, 0xD485 }, +{ 0xD486, 0xD486, 0xD486 }, +{ 0xD487, 0xD487, 0xD487 }, +{ 0xD488, 0xD488, 0xD488 }, +{ 0xD489, 0xD489, 0xD489 }, +{ 0xD48A, 0xD48A, 0xD48A }, +{ 0xD48B, 0xD48B, 0xD48B }, +{ 0xD48C, 0xD48C, 0xD48C }, +{ 0xD48D, 0xD48D, 0xD48D }, +{ 0xD48E, 0xD48E, 0xD48E }, +{ 0xD48F, 0xD48F, 0xD48F }, +{ 0xD490, 0xD490, 0xD490 }, +{ 0xD491, 0xD491, 0xD491 }, +{ 0xD492, 0xD492, 0xD492 }, +{ 0xD493, 0xD493, 0xD493 }, +{ 0xD494, 0xD494, 0xD494 }, +{ 0xD495, 0xD495, 0xD495 }, +{ 0xD496, 0xD496, 0xD496 }, +{ 0xD497, 0xD497, 0xD497 }, +{ 0xD498, 0xD498, 0xD498 }, +{ 0xD499, 0xD499, 0xD499 }, +{ 0xD49A, 0xD49A, 0xD49A }, +{ 0xD49B, 0xD49B, 0xD49B }, +{ 0xD49C, 0xD49C, 0xD49C }, +{ 0xD49D, 0xD49D, 0xD49D }, +{ 0xD49E, 0xD49E, 0xD49E }, +{ 0xD49F, 0xD49F, 0xD49F }, +{ 0xD4A0, 0xD4A0, 0xD4A0 }, +{ 0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 0xD50F, 0xD50F, 0xD50F }, +{ 0xD510, 0xD510, 0xD510 }, +{ 0xD511, 0xD511, 0xD511 }, +{ 0xD512, 0xD512, 0xD512 }, +{ 0xD513, 0xD513, 0xD513 }, +{ 0xD514, 0xD514, 0xD514 }, +{ 0xD515, 0xD515, 0xD515 }, +{ 0xD516, 0xD516, 0xD516 }, +{ 0xD517, 0xD517, 0xD517 }, +{ 0xD518, 0xD518, 0xD518 }, +{ 0xD519, 0xD519, 0xD519 }, +{ 0xD51A, 0xD51A, 0xD51A }, +{ 0xD51B, 0xD51B, 0xD51B }, +{ 0xD51C, 0xD51C, 0xD51C }, +{ 0xD51D, 0xD51D, 0xD51D }, +{ 0xD51E, 0xD51E, 0xD51E }, +{ 0xD51F, 0xD51F, 0xD51F }, +{ 0xD520, 0xD520, 0xD520 }, +{ 0xD521, 0xD521, 0xD521 }, +{ 0xD522, 0xD522, 0xD522 }, +{ 0xD523, 0xD523, 0xD523 }, +{ 0xD524, 0xD524, 0xD524 }, +{ 0xD525, 0xD525, 0xD525 }, +{ 0xD526, 0xD526, 0xD526 }, +{ 0xD527, 0xD527, 0xD527 }, +{ 0xD528, 0xD528, 0xD528 }, +{ 0xD529, 0xD529, 0xD529 }, +{ 0xD52A, 0xD52A, 0xD52A }, +{ 0xD52B, 0xD52B, 0xD52B }, +{ 0xD52C, 0xD52C, 0xD52C }, +{ 0xD52D, 0xD52D, 0xD52D }, +{ 0xD52E, 0xD52E, 0xD52E }, +{ 0xD52F, 0xD52F, 0xD52F }, +{ 0xD530, 0xD530, 0xD530 }, +{ 0xD531, 0xD531, 0xD531 }, +{ 0xD532, 0xD532, 0xD532 }, +{ 0xD533, 0xD533, 0xD533 }, +{ 0xD534, 0xD534, 0xD534 }, +{ 0xD535, 0xD535, 0xD535 }, +{ 0xD536, 0xD536, 0xD536 }, +{ 0xD537, 0xD537, 0xD537 }, +{ 0xD538, 0xD538, 0xD538 }, +{ 0xD539, 0xD539, 0xD539 }, +{ 0xD53A, 0xD53A, 0xD53A }, +{ 0xD53B, 0xD53B, 0xD53B }, +{ 0xD53C, 0xD53C, 0xD53C }, +{ 0xD53D, 0xD53D, 0xD53D }, +{ 0xD53E, 0xD53E, 0xD53E }, +{ 0xD53F, 0xD53F, 0xD53F }, +{ 0xD540, 0xD540, 0xD540 }, +{ 0xD541, 0xD541, 0xD541 }, +{ 0xD542, 0xD542, 0xD542 }, +{ 0xD543, 0xD543, 0xD543 }, +{ 0xD544, 0xD544, 0xD544 }, +{ 0xD545, 0xD545, 0xD545 }, +{ 0xD546, 0xD546, 0xD546 }, +{ 0xD547, 0xD547, 0xD547 }, +{ 0xD548, 0xD548, 0xD548 }, +{ 0xD549, 0xD549, 0xD549 }, +{ 0xD54A, 0xD54A, 0xD54A }, +{ 0xD54B, 0xD54B, 0xD54B }, +{ 0xD54C, 0xD54C, 0xD54C }, +{ 0xD54D, 0xD54D, 0xD54D }, +{ 0xD54E, 0xD54E, 0xD54E }, +{ 0xD54F, 0xD54F, 0xD54F }, +{ 0xD550, 0xD550, 0xD550 }, +{ 0xD551, 0xD551, 0xD551 }, +{ 0xD552, 0xD552, 0xD552 }, +{ 0xD553, 0xD553, 0xD553 }, +{ 0xD554, 0xD554, 0xD554 }, +{ 0xD555, 0xD555, 0xD555 }, +{ 0xD556, 0xD556, 0xD556 }, +{ 0xD557, 0xD557, 0xD557 }, +{ 0xD558, 0xD558, 0xD558 }, +{ 0xD559, 0xD559, 0xD559 }, +{ 0xD55A, 0xD55A, 0xD55A }, +{ 0xD55B, 0xD55B, 0xD55B }, +{ 0xD55C, 0xD55C, 0xD55C }, +{ 0xD55D, 0xD55D, 0xD55D }, +{ 0xD55E, 0xD55E, 0xD55E }, +{ 0xD55F, 0xD55F, 0xD55F }, +{ 0xD560, 0xD560, 0xD560 }, +{ 0xD561, 0xD561, 0xD561 }, +{ 0xD562, 0xD562, 0xD562 }, +{ 0xD563, 0xD563, 0xD563 }, +{ 0xD564, 0xD564, 0xD564 }, +{ 0xD565, 0xD565, 0xD565 }, +{ 0xD566, 0xD566, 0xD566 }, +{ 0xD567, 0xD567, 0xD567 }, +{ 0xD568, 0xD568, 0xD568 }, +{ 0xD569, 0xD569, 0xD569 }, +{ 0xD56A, 0xD56A, 0xD56A }, +{ 0xD56B, 0xD56B, 0xD56B }, +{ 0xD56C, 0xD56C, 0xD56C }, +{ 0xD56D, 0xD56D, 0xD56D }, +{ 0xD56E, 0xD56E, 0xD56E }, +{ 0xD56F, 0xD56F, 0xD56F }, +{ 0xD570, 0xD570, 0xD570 }, +{ 0xD571, 0xD571, 0xD571 }, +{ 0xD572, 0xD572, 0xD572 }, +{ 0xD573, 0xD573, 0xD573 }, +{ 0xD574, 0xD574, 0xD574 }, +{ 0xD575, 0xD575, 0xD575 }, +{ 0xD576, 0xD576, 0xD576 }, +{ 0xD577, 0xD577, 0xD577 }, +{ 0xD578, 0xD578, 0xD578 }, +{ 0xD579, 0xD579, 0xD579 }, +{ 0xD57A, 0xD57A, 0xD57A }, +{ 0xD57B, 0xD57B, 0xD57B }, +{ 0xD57C, 0xD57C, 0xD57C }, +{ 0xD57D, 0xD57D, 0xD57D }, +{ 0xD57E, 0xD57E, 0xD57E }, +{ 0xD57F, 0xD57F, 0xD57F }, +{ 0xD580, 0xD580, 0xD580 }, +{ 0xD581, 0xD581, 0xD581 }, +{ 0xD582, 0xD582, 0xD582 }, +{ 0xD583, 0xD583, 0xD583 }, +{ 0xD584, 0xD584, 0xD584 }, +{ 0xD585, 0xD585, 0xD585 }, +{ 0xD586, 0xD586, 0xD586 }, +{ 0xD587, 0xD587, 0xD587 }, +{ 0xD588, 0xD588, 0xD588 }, +{ 0xD589, 0xD589, 0xD589 }, +{ 0xD58A, 0xD58A, 0xD58A }, +{ 0xD58B, 0xD58B, 0xD58B }, +{ 0xD58C, 0xD58C, 0xD58C }, +{ 0xD58D, 0xD58D, 0xD58D }, +{ 0xD58E, 0xD58E, 0xD58E }, +{ 0xD58F, 0xD58F, 0xD58F }, +{ 0xD590, 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, 0xD5FE, 0xD5FE }, +{ 0xD5FF, 0xD5FF, 0xD5FF }, +{ 0xD600, 0xD600, 0xD600 }, +{ 0xD601, 0xD601, 0xD601 }, +{ 0xD602, 0xD602, 0xD602 }, +{ 0xD603, 0xD603, 0xD603 }, +{ 0xD604, 0xD604, 0xD604 }, +{ 0xD605, 0xD605, 0xD605 }, +{ 0xD606, 0xD606, 0xD606 }, +{ 0xD607, 0xD607, 0xD607 }, +{ 0xD608, 0xD608, 0xD608 }, +{ 0xD609, 0xD609, 0xD609 }, +{ 0xD60A, 0xD60A, 0xD60A }, +{ 0xD60B, 0xD60B, 0xD60B }, +{ 0xD60C, 0xD60C, 0xD60C }, +{ 0xD60D, 0xD60D, 0xD60D }, +{ 0xD60E, 0xD60E, 0xD60E }, +{ 0xD60F, 0xD60F, 0xD60F }, +{ 0xD610, 0xD610, 0xD610 }, +{ 0xD611, 0xD611, 0xD611 }, +{ 0xD612, 0xD612, 0xD612 }, +{ 0xD613, 0xD613, 0xD613 }, +{ 0xD614, 0xD614, 0xD614 }, +{ 0xD615, 0xD615, 0xD615 }, +{ 0xD616, 0xD616, 0xD616 }, +{ 0xD617, 0xD617, 0xD617 }, +{ 0xD618, 0xD618, 0xD618 }, +{ 0xD619, 0xD619, 0xD619 }, +{ 0xD61A, 0xD61A, 0xD61A }, +{ 0xD61B, 0xD61B, 0xD61B }, +{ 0xD61C, 0xD61C, 0xD61C }, +{ 0xD61D, 0xD61D, 0xD61D }, +{ 0xD61E, 0xD61E, 0xD61E }, +{ 0xD61F, 0xD61F, 0xD61F }, +{ 0xD620, 0xD620, 0xD620 }, +{ 0xD621, 0xD621, 0xD621 }, +{ 0xD622, 0xD622, 0xD622 }, +{ 0xD623, 0xD623, 0xD623 }, +{ 0xD624, 0xD624, 0xD624 }, +{ 0xD625, 0xD625, 0xD625 }, +{ 0xD626, 0xD626, 0xD626 }, +{ 0xD627, 0xD627, 0xD627 }, +{ 0xD628, 0xD628, 0xD628 }, +{ 0xD629, 0xD629, 0xD629 }, +{ 0xD62A, 0xD62A, 0xD62A }, +{ 0xD62B, 0xD62B, 0xD62B }, +{ 0xD62C, 0xD62C, 0xD62C }, +{ 0xD62D, 0xD62D, 0xD62D }, +{ 0xD62E, 0xD62E, 0xD62E }, +{ 0xD62F, 0xD62F, 0xD62F }, +{ 0xD630, 0xD630, 0xD630 }, +{ 0xD631, 0xD631, 0xD631 }, +{ 0xD632, 0xD632, 0xD632 }, +{ 0xD633, 0xD633, 0xD633 }, +{ 0xD634, 0xD634, 0xD634 }, +{ 0xD635, 0xD635, 0xD635 }, +{ 0xD636, 0xD636, 0xD636 }, +{ 0xD637, 0xD637, 0xD637 }, +{ 0xD638, 0xD638, 0xD638 }, +{ 0xD639, 0xD639, 0xD639 }, +{ 0xD63A, 0xD63A, 0xD63A }, +{ 0xD63B, 0xD63B, 0xD63B }, +{ 0xD63C, 0xD63C, 0xD63C }, +{ 0xD63D, 0xD63D, 0xD63D }, +{ 0xD63E, 0xD63E, 0xD63E }, +{ 0xD63F, 0xD63F, 0xD63F }, +{ 0xD640, 0xD640, 0xD640 }, +{ 0xD641, 0xD641, 0xD641 }, +{ 0xD642, 0xD642, 0xD642 }, +{ 0xD643, 0xD643, 0xD643 }, +{ 0xD644, 0xD644, 0xD644 }, +{ 0xD645, 0xD645, 0xD645 }, +{ 0xD646, 0xD646, 0xD646 }, +{ 0xD647, 0xD647, 0xD647 }, +{ 0xD648, 0xD648, 0xD648 }, +{ 0xD649, 0xD649, 0xD649 }, +{ 0xD64A, 0xD64A, 0xD64A }, +{ 0xD64B, 0xD64B, 0xD64B }, +{ 0xD64C, 0xD64C, 0xD64C }, +{ 0xD64D, 0xD64D, 0xD64D }, +{ 0xD64E, 0xD64E, 0xD64E }, +{ 0xD64F, 0xD64F, 0xD64F }, +{ 0xD650, 0xD650, 0xD650 }, +{ 0xD651, 0xD651, 0xD651 }, +{ 0xD652, 0xD652, 0xD652 }, +{ 0xD653, 0xD653, 0xD653 }, +{ 0xD654, 0xD654, 0xD654 }, +{ 0xD655, 0xD655, 0xD655 }, +{ 0xD656, 0xD656, 0xD656 }, +{ 0xD657, 0xD657, 0xD657 }, +{ 0xD658, 0xD658, 0xD658 }, +{ 0xD659, 0xD659, 0xD659 }, +{ 0xD65A, 0xD65A, 0xD65A }, +{ 0xD65B, 0xD65B, 0xD65B }, +{ 0xD65C, 0xD65C, 0xD65C }, +{ 0xD65D, 0xD65D, 0xD65D }, +{ 0xD65E, 0xD65E, 0xD65E }, +{ 0xD65F, 0xD65F, 0xD65F }, +{ 0xD660, 0xD660, 0xD660 }, +{ 0xD661, 0xD661, 0xD661 }, +{ 0xD662, 0xD662, 0xD662 }, +{ 0xD663, 0xD663, 0xD663 }, +{ 0xD664, 0xD664, 0xD664 }, +{ 0xD665, 0xD665, 0xD665 }, +{ 0xD666, 0xD666, 0xD666 }, +{ 0xD667, 0xD667, 0xD667 }, +{ 0xD668, 0xD668, 0xD668 }, +{ 0xD669, 0xD669, 0xD669 }, +{ 0xD66A, 0xD66A, 0xD66A }, +{ 0xD66B, 0xD66B, 0xD66B }, +{ 0xD66C, 0xD66C, 0xD66C }, +{ 0xD66D, 0xD66D, 0xD66D }, +{ 0xD66E, 0xD66E, 0xD66E }, +{ 0xD66F, 0xD66F, 0xD66F }, +{ 0xD670, 0xD670, 0xD670 }, +{ 0xD671, 0xD671, 0xD671 }, +{ 0xD672, 0xD672, 0xD672 }, +{ 0xD673, 0xD673, 0xD673 }, +{ 0xD674, 0xD674, 0xD674 }, +{ 0xD675, 0xD675, 0xD675 }, +{ 0xD676, 0xD676, 0xD676 }, +{ 0xD677, 0xD677, 0xD677 }, +{ 0xD678, 0xD678, 0xD678 }, +{ 0xD679, 0xD679, 0xD679 }, +{ 0xD67A, 0xD67A, 0xD67A }, +{ 0xD67B, 0xD67B, 0xD67B }, +{ 0xD67C, 0xD67C, 0xD67C }, +{ 0xD67D, 0xD67D, 0xD67D }, +{ 0xD67E, 0xD67E, 0xD67E }, +{ 0xD67F, 0xD67F, 0xD67F }, +{ 0xD680, 0xD680, 0xD680 }, +{ 0xD681, 0xD681, 0xD681 }, +{ 0xD682, 0xD682, 0xD682 }, +{ 0xD683, 0xD683, 0xD683 }, +{ 0xD684, 0xD684, 0xD684 }, +{ 0xD685, 0xD685, 0xD685 }, +{ 0xD686, 0xD686, 0xD686 }, +{ 0xD687, 0xD687, 0xD687 }, +{ 0xD688, 0xD688, 0xD688 }, +{ 0xD689, 0xD689, 0xD689 }, +{ 0xD68A, 0xD68A, 0xD68A }, +{ 0xD68B, 0xD68B, 0xD68B }, +{ 0xD68C, 0xD68C, 0xD68C }, +{ 0xD68D, 0xD68D, 0xD68D }, +{ 0xD68E, 0xD68E, 0xD68E }, +{ 0xD68F, 0xD68F, 0xD68F }, +{ 0xD690, 0xD690, 0xD690 }, +{ 0xD691, 0xD691, 0xD691 }, +{ 0xD692, 0xD692, 0xD692 }, +{ 0xD693, 0xD693, 0xD693 }, +{ 0xD694, 0xD694, 0xD694 }, +{ 0xD695, 0xD695, 0xD695 }, +{ 0xD696, 0xD696, 0xD696 }, +{ 0xD697, 0xD697, 0xD697 }, +{ 0xD698, 0xD698, 0xD698 }, +{ 0xD699, 0xD699, 0xD699 }, +{ 0xD69A, 0xD69A, 0xD69A }, +{ 0xD69B, 0xD69B, 0xD69B }, +{ 0xD69C, 0xD69C, 0xD69C }, +{ 0xD69D, 0xD69D, 0xD69D }, +{ 0xD69E, 0xD69E, 0xD69E }, +{ 0xD69F, 0xD69F, 0xD69F }, +{ 0xD6A0, 0xD6A0, 0xD6A0 }, +{ 0xD6A1, 0xD6A1, 0xD6A1 }, +{ 0xD6A2, 0xD6A2, 0xD6A2 }, +{ 0xD6A3, 0xD6A3, 0xD6A3 }, +{ 0xD6A4, 0xD6A4, 0xD6A4 }, +{ 0xD6A5, 0xD6A5, 0xD6A5 }, +{ 0xD6A6, 0xD6A6, 0xD6A6 }, +{ 0xD6A7, 0xD6A7, 0xD6A7 }, +{ 0xD6A8, 0xD6A8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F0, 0xD6F0, 0xD6F0 }, +{ 0xD6F1, 0xD6F1, 0xD6F1 }, +{ 0xD6F2, 0xD6F2, 0xD6F2 }, +{ 0xD6F3, 0xD6F3, 0xD6F3 }, +{ 0xD6F4, 0xD6F4, 0xD6F4 }, +{ 0xD6F5, 0xD6F5, 0xD6F5 }, +{ 0xD6F6, 0xD6F6, 0xD6F6 }, +{ 0xD6F7, 0xD6F7, 0xD6F7 }, +{ 0xD6F8, 0xD6F8, 0xD6F8 }, +{ 0xD6F9, 0xD6F9, 0xD6F9 }, +{ 0xD6FA, 0xD6FA, 0xD6FA }, +{ 0xD6FB, 0xD6FB, 0xD6FB }, +{ 0xD6FC, 0xD6FC, 0xD6FC }, +{ 0xD6FD, 0xD6FD, 0xD6FD }, +{ 0xD6FE, 0xD6FE, 0xD6FE }, +{ 0xD6FF, 0xD6FF, 0xD6FF }, +{ 0xD700, 0xD700, 0xD700 }, +{ 0xD701, 0xD701, 0xD701 }, +{ 0xD702, 0xD702, 0xD702 }, +{ 0xD703, 0xD703, 0xD703 }, +{ 0xD704, 0xD704, 0xD704 }, +{ 0xD705, 0xD705, 0xD705 }, +{ 0xD706, 0xD706, 0xD706 }, +{ 0xD707, 0xD707, 0xD707 }, +{ 0xD708, 0xD708, 0xD708 }, +{ 0xD709, 0xD709, 0xD709 }, +{ 0xD70A, 0xD70A, 0xD70A }, +{ 0xD70B, 0xD70B, 0xD70B }, +{ 0xD70C, 0xD70C, 0xD70C }, +{ 0xD70D, 0xD70D, 0xD70D }, +{ 0xD70E, 0xD70E, 0xD70E }, +{ 0xD70F, 0xD70F, 0xD70F }, +{ 0xD710, 0xD710, 0xD710 }, +{ 0xD711, 0xD711, 0xD711 }, +{ 0xD712, 0xD712, 0xD712 }, +{ 0xD713, 0xD713, 0xD713 }, +{ 0xD714, 0xD714, 0xD714 }, +{ 0xD715, 0xD715, 0xD715 }, +{ 0xD716, 0xD716, 0xD716 }, +{ 0xD717, 0xD717, 0xD717 }, +{ 0xD718, 0xD718, 0xD718 }, +{ 0xD719, 0xD719, 0xD719 }, +{ 0xD71A, 0xD71A, 0xD71A }, +{ 0xD71B, 0xD71B, 0xD71B }, +{ 0xD71C, 0xD71C, 0xD71C }, +{ 0xD71D, 0xD71D, 0xD71D }, +{ 0xD71E, 0xD71E, 0xD71E }, +{ 0xD71F, 0xD71F, 0xD71F }, +{ 0xD720, 0xD720, 0xD720 }, +{ 0xD721, 0xD721, 0xD721 }, +{ 0xD722, 0xD722, 0xD722 }, +{ 0xD723, 0xD723, 0xD723 }, +{ 0xD724, 0xD724, 0xD724 }, +{ 0xD725, 0xD725, 0xD725 }, +{ 0xD726, 0xD726, 0xD726 }, +{ 0xD727, 0xD727, 0xD727 }, +{ 0xD728, 0xD728, 0xD728 }, +{ 0xD729, 0xD729, 0xD729 }, +{ 0xD72A, 0xD72A, 0xD72A }, +{ 0xD72B, 0xD72B, 0xD72B }, +{ 0xD72C, 0xD72C, 0xD72C }, +{ 0xD72D, 0xD72D, 0xD72D }, +{ 0xD72E, 0xD72E, 0xD72E }, +{ 0xD72F, 0xD72F, 0xD72F }, +{ 0xD730, 0xD730, 0xD730 }, +{ 0xD731, 0xD731, 0xD731 }, +{ 0xD732, 0xD732, 0xD732 }, +{ 0xD733, 0xD733, 0xD733 }, +{ 0xD734, 0xD734, 0xD734 }, +{ 0xD735, 0xD735, 0xD735 }, +{ 0xD736, 0xD736, 0xD736 }, +{ 0xD737, 0xD737, 0xD737 }, +{ 0xD738, 0xD738, 0xD738 }, +{ 0xD739, 0xD739, 0xD739 }, +{ 0xD73A, 0xD73A, 0xD73A }, +{ 0xD73B, 0xD73B, 0xD73B }, +{ 0xD73C, 0xD73C, 0xD73C }, +{ 0xD73D, 0xD73D, 0xD73D }, +{ 0xD73E, 0xD73E, 0xD73E }, +{ 0xD73F, 0xD73F, 0xD73F }, +{ 0xD740, 0xD740, 0xD740 }, +{ 0xD741, 0xD741, 0xD741 }, +{ 0xD742, 0xD742, 0xD742 }, +{ 0xD743, 0xD743, 0xD743 }, +{ 0xD744, 0xD744, 0xD744 }, +{ 0xD745, 0xD745, 0xD745 }, +{ 0xD746, 0xD746, 0xD746 }, +{ 0xD747, 0xD747, 0xD747 }, +{ 0xD748, 0xD748, 0xD748 }, +{ 0xD749, 0xD749, 0xD749 }, +{ 0xD74A, 0xD74A, 0xD74A }, +{ 0xD74B, 0xD74B, 0xD74B }, +{ 0xD74C, 0xD74C, 0xD74C }, +{ 0xD74D, 0xD74D, 0xD74D }, +{ 0xD74E, 0xD74E, 0xD74E }, +{ 0xD74F, 0xD74F, 0xD74F }, +{ 0xD750, 0xD750, 0xD750 }, +{ 0xD751, 0xD751, 0xD751 }, +{ 0xD752, 0xD752, 0xD752 }, +{ 0xD753, 0xD753, 0xD753 }, +{ 0xD754, 0xD754, 0xD754 }, +{ 0xD755, 0xD755, 0xD755 }, +{ 0xD756, 0xD756, 0xD756 }, +{ 0xD757, 0xD757, 0xD757 }, +{ 0xD758, 0xD758, 0xD758 }, +{ 0xD759, 0xD759, 0xD759 }, +{ 0xD75A, 0xD75A, 0xD75A }, +{ 0xD75B, 0xD75B, 0xD75B }, +{ 0xD75C, 0xD75C, 0xD75C }, +{ 0xD75D, 0xD75D, 0xD75D }, +{ 0xD75E, 0xD75E, 0xD75E }, +{ 0xD75F, 0xD75F, 0xD75F }, +{ 0xD760, 0xD760, 0xD760 }, +{ 0xD761, 0xD761, 0xD761 }, +{ 0xD762, 0xD762, 0xD762 }, +{ 0xD763, 0xD763, 0xD763 }, +{ 0xD764, 0xD764, 0xD764 }, +{ 0xD765, 0xD765, 0xD765 }, +{ 0xD766, 0xD766, 0xD766 }, +{ 0xD767, 0xD767, 0xD767 }, +{ 0xD768, 0xD768, 0xD768 }, +{ 0xD769, 0xD769, 0xD769 }, +{ 0xD76A, 0xD76A, 0xD76A }, +{ 0xD76B, 0xD76B, 0xD76B }, +{ 0xD76C, 0xD76C, 0xD76C }, +{ 0xD76D, 0xD76D, 0xD76D }, +{ 0xD76E, 0xD76E, 0xD76E }, +{ 0xD76F, 0xD76F, 0xD76F }, +{ 0xD770, 0xD770, 0xD770 }, +{ 0xD771, 0xD771, 0xD771 }, +{ 0xD772, 0xD772, 0xD772 }, +{ 0xD773, 0xD773, 0xD773 }, +{ 0xD774, 0xD774, 0xD774 }, +{ 0xD775, 0xD775, 0xD775 }, +{ 0xD776, 0xD776, 0xD776 }, +{ 0xD777, 0xD777, 0xD777 }, +{ 0xD778, 0xD778, 0xD778 }, +{ 0xD779, 0xD779, 0xD779 }, +{ 0xD77A, 0xD77A, 0xD77A }, +{ 0xD77B, 0xD77B, 0xD77B }, +{ 0xD77C, 0xD77C, 0xD77C }, +{ 0xD77D, 0xD77D, 0xD77D }, +{ 0xD77E, 0xD77E, 0xD77E }, +{ 0xD77F, 0xD77F, 0xD77F }, +{ 0xD780, 0xD780, 0xD780 }, +{ 0xD781, 0xD781, 0xD781 }, +{ 0xD782, 0xD782, 0xD782 }, +{ 0xD783, 0xD783, 0xD783 }, +{ 0xD784, 0xD784, 0xD784 }, +{ 0xD785, 0xD785, 0xD785 }, +{ 0xD786, 0xD786, 0xD786 }, +{ 0xD787, 0xD787, 0xD787 }, +{ 0xD788, 0xD788, 0xD788 }, +{ 0xD789, 0xD789, 0xD789 }, +{ 0xD78A, 0xD78A, 0xD78A }, +{ 0xD78B, 0xD78B, 0xD78B }, +{ 0xD78C, 0xD78C, 0xD78C }, +{ 0xD78D, 0xD78D, 0xD78D }, +{ 0xD78E, 0xD78E, 0xD78E }, +{ 0xD78F, 0xD78F, 0xD78F }, +{ 0xD790, 0xD790, 0xD790 }, +{ 0xD791, 0xD791, 0xD791 }, +{ 0xD792, 0xD792, 0xD792 }, +{ 0xD793, 0xD793, 0xD793 }, +{ 0xD794, 0xD794, 0xD794 }, +{ 0xD795, 0xD795, 0xD795 }, +{ 0xD796, 0xD796, 0xD796 }, +{ 0xD797, 0xD797, 0xD797 }, +{ 0xD798, 0xD798, 0xD798 }, +{ 0xD799, 0xD799, 0xD799 }, +{ 0xD79A, 0xD79A, 0xD79A }, +{ 0xD79B, 0xD79B, 0xD79B }, +{ 0xD79C, 0xD79C, 0xD79C }, +{ 0xD79D, 0xD79D, 0xD79D }, +{ 0xD79E, 0xD79E, 0xD79E }, +{ 0xD79F, 0xD79F, 0xD79F }, +{ 0xD7A0, 0xD7A0, 0xD7A0 }, +{ 0xD7A1, 0xD7A1, 0xD7A1 }, +{ 0xD7A2, 0xD7A2, 0xD7A2 }, +{ 0xD7A3, 0xD7A3, 0xD7A3 }, +{ 0xF900, 0xF900, 0xF900 }, +{ 0xF901, 0xF901, 0xF901 }, +{ 0xF902, 0xF902, 0xF902 }, +{ 0xF903, 0xF903, 0xF903 }, +{ 0xF904, 0xF904, 0xF904 }, +{ 0xF905, 0xF905, 0xF905 }, +{ 0xF906, 0xF906, 0xF906 }, +{ 0xF907, 0xF907, 0xF907 }, +{ 0xF908, 0xF908, 0xF908 }, +{ 0xF909, 0xF909, 0xF909 }, +{ 0xF90A, 0xF90A, 0xF90A }, +{ 0xF90B, 0xF90B, 0xF90B }, +{ 0xF90C, 0xF90C, 0xF90C }, +{ 0xF90D, 0xF90D, 0xF90D }, +{ 0xF90E, 0xF90E, 0xF90E }, +{ 0xF90F, 0xF90F, 0xF90F }, +{ 0xF910, 0xF910, 0xF910 }, +{ 0xF911, 0xF911, 0xF911 }, +{ 0xF912, 0xF912, 0xF912 }, +{ 0xF913, 0xF913, 0xF913 }, +{ 0xF914, 0xF914, 0xF914 }, +{ 0xF915, 0xF915, 0xF915 }, +{ 0xF916, 0xF916, 0xF916 }, +{ 0xF917, 0xF917, 0xF917 }, +{ 0xF918, 0xF918, 0xF918 }, +{ 0xF919, 0xF919, 0xF919 }, +{ 0xF91A, 0xF91A, 0xF91A }, +{ 0xF91B, 0xF91B, 0xF91B }, +{ 0xF91C, 0xF91C, 0xF91C }, +{ 0xF91D, 0xF91D, 0xF91D }, +{ 0xF91E, 0xF91E, 0xF91E }, +{ 0xF91F, 0xF91F, 0xF91F }, +{ 0xF920, 0xF920, 0xF920 }, +{ 0xF921, 0xF921, 0xF921 }, +{ 0xF922, 0xF922, 0xF922 }, +{ 0xF923, 0xF923, 0xF923 }, +{ 0xF924, 0xF924, 0xF924 }, +{ 0xF925, 0xF925, 0xF925 }, +{ 0xF926, 0xF926, 0xF926 }, +{ 0xF927, 0xF927, 0xF927 }, +{ 0xF928, 0xF928, 0xF928 }, +{ 0xF929, 0xF929, 0xF929 }, +{ 0xF92A, 0xF92A, 0xF92A }, +{ 0xF92B, 0xF92B, 0xF92B }, +{ 0xF92C, 0xF92C, 0xF92C }, +{ 0xF92D, 0xF92D, 0xF92D }, +{ 0xF92E, 0xF92E, 0xF92E }, +{ 0xF92F, 0xF92F, 0xF92F }, +{ 0xF930, 0xF930, 0xF930 }, +{ 0xF931, 0xF931, 0xF931 }, +{ 0xF932, 0xF932, 0xF932 }, +{ 0xF933, 0xF933, 0xF933 }, +{ 0xF934, 0xF934, 0xF934 }, +{ 0xF935, 0xF935, 0xF935 }, +{ 0xF936, 0xF936, 0xF936 }, +{ 0xF937, 0xF937, 0xF937 }, +{ 0xF938, 0xF938, 0xF938 }, +{ 0xF939, 0xF939, 0xF939 }, +{ 0xF93A, 0xF93A, 0xF93A }, +{ 0xF93B, 0xF93B, 0xF93B }, +{ 0xF93C, 0xF93C, 0xF93C }, +{ 0xF93D, 0xF93D, 0xF93D }, +{ 0xF93E, 0xF93E, 0xF93E }, +{ 0xF93F, 0xF93F, 0xF93F }, +{ 0xF940, 0xF940, 0xF940 }, +{ 0xF941, 0xF941, 0xF941 }, +{ 0xF942, 0xF942, 0xF942 }, +{ 0xF943, 0xF943, 0xF943 }, +{ 0xF944, 0xF944, 0xF944 }, +{ 0xF945, 0xF945, 0xF945 }, +{ 0xF946, 0xF946, 0xF946 }, +{ 0xF947, 0xF947, 0xF947 }, +{ 0xF948, 0xF948, 0xF948 }, +{ 0xF949, 0xF949, 0xF949 }, +{ 0xF94A, 0xF94A, 0xF94A }, +{ 0xF94B, 0xF94B, 0xF94B }, +{ 0xF94C, 0xF94C, 0xF94C }, +{ 0xF94D, 0xF94D, 0xF94D }, +{ 0xF94E, 0xF94E, 0xF94E }, +{ 0xF94F, 0xF94F, 0xF94F }, +{ 0xF950, 0xF950, 0xF950 }, +{ 0xF951, 0xF951, 0xF951 }, +{ 0xF952, 0xF952, 0xF952 }, +{ 0xF953, 0xF953, 0xF953 }, +{ 0xF954, 0xF954, 0xF954 }, +{ 0xF955, 0xF955, 0xF955 }, +{ 0xF956, 0xF956, 0xF956 }, +{ 0xF957, 0xF957, 0xF957 }, +{ 0xF958, 0xF958, 0xF958 }, +{ 0xF959, 0xF959, 0xF959 }, +{ 0xF95A, 0xF95A, 0xF95A }, +{ 0xF95B, 0xF95B, 0xF95B }, +{ 0xF95C, 0xF95C, 0xF95C }, +{ 0xF95D, 0xF95D, 0xF95D }, +{ 0xF95E, 0xF95E, 0xF95E }, +{ 0xF95F, 0xF95F, 0xF95F }, +{ 0xF960, 0xF960, 0xF960 }, +{ 0xF961, 0xF961, 0xF961 }, +{ 0xF962, 0xF962, 0xF962 }, +{ 0xF963, 0xF963, 0xF963 }, +{ 0xF964, 0xF964, 0xF964 }, +{ 0xF965, 0xF965, 0xF965 }, +{ 0xF966, 0xF966, 0xF966 }, +{ 0xF967, 0xF967, 0xF967 }, +{ 0xF968, 0xF968, 0xF968 }, +{ 0xF969, 0xF969, 0xF969 }, +{ 0xF96A, 0xF96A, 0xF96A }, +{ 0xF96B, 0xF96B, 0xF96B }, +{ 0xF96C, 0xF96C, 0xF96C }, +{ 0xF96D, 0xF96D, 0xF96D }, +{ 0xF96E, 0xF96E, 0xF96E }, +{ 0xF96F, 0xF96F, 0xF96F }, +{ 0xF970, 0xF970, 0xF970 }, +{ 0xF971, 0xF971, 0xF971 }, +{ 0xF972, 0xF972, 0xF972 }, +{ 0xF973, 0xF973, 0xF973 }, +{ 0xF974, 0xF974, 0xF974 }, +{ 0xF975, 0xF975, 0xF975 }, +{ 0xF976, 0xF976, 0xF976 }, +{ 0xF977, 0xF977, 0xF977 }, +{ 0xF978, 0xF978, 0xF978 }, +{ 0xF979, 0xF979, 0xF979 }, +{ 0xF97A, 0xF97A, 0xF97A }, +{ 0xF97B, 0xF97B, 0xF97B }, +{ 0xF97C, 0xF97C, 0xF97C }, +{ 0xF97D, 0xF97D, 0xF97D }, +{ 0xF97E, 0xF97E, 0xF97E }, +{ 0xF97F, 0xF97F, 0xF97F }, +{ 0xF980, 0xF980, 0xF980 }, +{ 0xF981, 0xF981, 0xF981 }, +{ 0xF982, 0xF982, 0xF982 }, +{ 0xF983, 0xF983, 0xF983 }, +{ 0xF984, 0xF984, 0xF984 }, +{ 0xF985, 0xF985, 0xF985 }, +{ 0xF986, 0xF986, 0xF986 }, +{ 0xF987, 0xF987, 0xF987 }, +{ 0xF988, 0xF988, 0xF988 }, +{ 0xF989, 0xF989, 0xF989 }, +{ 0xF98A, 0xF98A, 0xF98A }, +{ 0xF98B, 0xF98B, 0xF98B }, +{ 0xF98C, 0xF98C, 0xF98C }, +{ 0xF98D, 0xF98D, 0xF98D }, +{ 0xF98E, 0xF98E, 0xF98E }, +{ 0xF98F, 0xF98F, 0xF98F }, +{ 0xF990, 0xF990, 0xF990 }, +{ 0xF991, 0xF991, 0xF991 }, +{ 0xF992, 0xF992, 0xF992 }, +{ 0xF993, 0xF993, 0xF993 }, +{ 0xF994, 0xF994, 0xF994 }, +{ 0xF995, 0xF995, 0xF995 }, +{ 0xF996, 0xF996, 0xF996 }, +{ 0xF997, 0xF997, 0xF997 }, +{ 0xF998, 0xF998, 0xF998 }, +{ 0xF999, 0xF999, 0xF999 }, +{ 0xF99A, 0xF99A, 0xF99A }, +{ 0xF99B, 0xF99B, 0xF99B }, +{ 0xF99C, 0xF99C, 0xF99C }, +{ 0xF99D, 0xF99D, 0xF99D }, +{ 0xF99E, 0xF99E, 0xF99E }, +{ 0xF99F, 0xF99F, 0xF99F }, +{ 0xF9A0, 0xF9A0, 0xF9A0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 0xFFD5, 0xFFD5, 0xFFD5 }, +{ 0xFFD6, 0xFFD6, 0xFFD6 }, +{ 0xFFD7, 0xFFD7, 0xFFD7 }, +{ 0xFFDA, 0xFFDA, 0xFFDA }, +{ 0xFFDB, 0xFFDB, 0xFFDB }, +{ 0xFFDC, 0xFFDC, 0xFFDC } +}; diff --git a/plugins/SpellChecker/src/hunspell/w_char.hxx b/plugins/SpellChecker/src/hunspell/w_char.hxx new file mode 100644 index 0000000000..3719dd3b77 --- /dev/null +++ b/plugins/SpellChecker/src/hunspell/w_char.hxx @@ -0,0 +1,21 @@ +#ifndef __WCHARHXX__ +#define __WCHARHXX__ + +#ifndef GCC +typedef struct { +#else +typedef struct __attribute__ ((packed)) { +#endif + unsigned char l; + unsigned char h; +} w_char; + +// two character arrays +struct replentry { + char * pattern; + char * pattern2; + bool start; + bool end; +}; + +#endif diff --git a/plugins/SpellChecker/src/options.cpp b/plugins/SpellChecker/src/options.cpp new file mode 100644 index 0000000000..28886b1126 --- /dev/null +++ b/plugins/SpellChecker/src/options.cpp @@ -0,0 +1,605 @@ +/* +Copyright (C) 2006-2010 Ricardo Pescuma Domenecci + +This is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public +License as published by the Free Software Foundation; either +version 2 of the License, or (at your option) any later version. + +This is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with this file; see the file license.txt. If +not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. +*/ + + +#include "commons.h" + + + +// Prototypes ///////////////////////////////////////////////////////////////////////////////////// + +HANDLE hOptHook = NULL; + +Options opts; + + +static INT_PTR CALLBACK OptionsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam); +static INT_PTR CALLBACK AutoreplaceDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam); + + +static OptPageControl optionsControls[] = { + { &opts.auto_replace_dict, CONTROL_CHECKBOX, IDC_AUTO_DICT, "AutoReplaceDict", FALSE }, + { &opts.ignore_with_numbers, CONTROL_CHECKBOX, IDC_IGNORE_NUMBERS, "IgnoreWithNumbers", FALSE }, + { &opts.ignore_uppercase, CONTROL_CHECKBOX, IDC_IGNORE_UPPERCASE, "IgnoreUppercase", FALSE }, + { &opts.ask_when_sending_with_error, CONTROL_CHECKBOX, IDC_ASK_ON_ERROR, "AskWhenSendingWithError", FALSE }, + { &opts.underline_type, CONTROL_COMBO, IDC_UNDERLINE_TYPE, "UnderlineType", CFU_UNDERLINEWAVE - CFU_UNDERLINEDOUBLE }, + { &opts.cascade_corrections, CONTROL_CHECKBOX, IDC_CASCADE_CORRECTIONS, "CascadeCorrections", FALSE }, + { &opts.show_all_corrections, CONTROL_CHECKBOX, IDC_SHOW_ALL_CORRECTIONS, "ShowAllCorrections", FALSE }, + { &opts.show_wrong_word, CONTROL_CHECKBOX, IDC_SHOW_WRONG_WORD, "ShowWrongWord", TRUE }, + { &opts.use_flags, CONTROL_CHECKBOX, IDC_USE_FLAGS, "UseFlags", TRUE }, + { &opts.auto_locale, CONTROL_CHECKBOX, IDC_AUTO_LOCALE, "AutoLocale", FALSE }, + { &opts.use_other_apps_dicts, CONTROL_CHECKBOX, IDC_OTHER_PROGS, "UseOtherAppsDicts", TRUE }, + { &opts.handle_underscore, CONTROL_CHECKBOX, IDC_HANDLE_UNDERSCORE, "HandleUnderscore", FALSE }, +}; + +static UINT optionsExpertControls[] = { + IDC_ADVANCED, IDC_UNDERLINE_TYPE_L, IDC_UNDERLINE_TYPE, IDC_CASCADE_CORRECTIONS, IDC_SHOW_ALL_CORRECTIONS, + IDC_SHOW_WRONG_WORD, IDC_USE_FLAGS, IDC_AUTO_LOCALE, IDC_OTHER_PROGS, IDC_HANDLE_UNDERSCORE +}; + + +static OptPageControl autoReplaceControls[] = { + { &opts.auto_replace_user, CONTROL_CHECKBOX, IDC_AUTO_USER, "AutoReplaceUser", TRUE }, +}; + + +// Functions ////////////////////////////////////////////////////////////////////////////////////// + + +int InitOptionsCallback(WPARAM wParam,LPARAM lParam) +{ + OPTIONSDIALOGPAGE odp = { 0 }; + odp.cbSize = sizeof(odp); + odp.hInstance = hInst; + odp.pszGroup = LPGEN("Message Sessions"); + odp.pszTitle = LPGEN("Spell Checker"); + odp.pfnDlgProc = OptionsDlgProc; + odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONS); + odp.flags = ODPF_BOLDGROUPS; + odp.nIDBottomSimpleControl = IDC_SPELL_CHECKER; + odp.expertOnlyControls = optionsExpertControls; + odp.nExpertOnlyControls = MAX_REGS(optionsExpertControls); + Options_AddPage(wParam, &odp); + + ZeroMemory(&odp,sizeof(odp)); + odp.cbSize = sizeof(odp); + odp.hInstance = hInst; + odp.pszGroup = LPGEN("Message Sessions"); + odp.pszTitle = LPGEN("Auto-replacements"); + odp.pfnDlgProc = AutoreplaceDlgProc; + odp.pszTemplate = MAKEINTRESOURCEA(IDD_REPLACEMENTS); + odp.flags = ODPF_BOLDGROUPS; + Options_AddPage(wParam, &odp); + + return 0; +} + +void InitOptions() +{ + LoadOptions(); + + hOptHook = HookEvent(ME_OPT_INITIALISE, InitOptionsCallback); +} + + +void DeInitOptions() +{ + UnhookEvent(hOptHook); +} + + +void LoadOptions() +{ + LoadOpts(optionsControls, MAX_REGS(optionsControls), MODULE_NAME); + LoadOpts(autoReplaceControls, MAX_REGS(autoReplaceControls), MODULE_NAME); + + if (languages.getCount() <= 0) + { + opts.default_language[0] = _T('\0'); + return; + } + + DBVARIANT dbv; + if (!DBGetContactSettingTString(NULL, MODULE_NAME, "DefaultLanguage", &dbv)) + { + lstrcpyn(opts.default_language, dbv.ptszVal, MAX_REGS(opts.default_language)); + DBFreeVariant(&dbv); + } + + int i; + for(i = 0; i < languages.getCount(); i++) + if (lstrcmp(languages[i]->language, opts.default_language) == 0) + break; + + if (i >= languages.getCount()) + lstrcpy(opts.default_language, languages[0]->language); +} + + +static void DrawItem(HWND hwndDlg, LPDRAWITEMSTRUCT lpdis, Dictionary *dict) +{ + TEXTMETRIC tm; + RECT rc; + + GetTextMetrics(lpdis->hDC, &tm); + + + int foreIndex, backIndex; + + if (lpdis->itemState & ODS_DISABLED) + { + foreIndex = COLOR_GRAYTEXT; + backIndex = COLOR_BTNFACE; + } + else if (lpdis->itemState & ODS_SELECTED) + { + foreIndex = COLOR_HIGHLIGHTTEXT; + backIndex = COLOR_HIGHLIGHT; + } + else + { + foreIndex = COLOR_WINDOWTEXT; + backIndex = COLOR_WINDOW; + } + + COLORREF clrfore = SetTextColor(lpdis->hDC,GetSysColor(foreIndex)); + COLORREF clrback = SetBkColor(lpdis->hDC,GetSysColor(backIndex)); + + FillRect(lpdis->hDC, &lpdis->rcItem, GetSysColorBrush(backIndex)); + + rc.left = lpdis->rcItem.left + 2; + + // Draw icon + if (opts.use_flags) + { + HICON hFlag = IcoLib_LoadIcon(dict); + + rc.top = (lpdis->rcItem.bottom + lpdis->rcItem.top - ICON_SIZE) / 2; + DrawIconEx(lpdis->hDC, rc.left, rc.top, hFlag, 16, 16, 0, NULL, DI_NORMAL); + + rc.left += ICON_SIZE + 4; + + Skin_ReleaseIcon(hFlag); + } + + // Draw text + rc.right = lpdis->rcItem.right - 2; + rc.top = (lpdis->rcItem.bottom + lpdis->rcItem.top - tm.tmHeight) / 2; + rc.bottom = rc.top + tm.tmHeight; + DrawText(lpdis->hDC, dict->full_name, lstrlen(dict->full_name), &rc, DT_END_ELLIPSIS | DT_NOPREFIX | DT_SINGLELINE); + + // Restore old colors + SetTextColor(lpdis->hDC, clrfore); + SetBkColor(lpdis->hDC, clrback); +} + + +static void MeasureItem(HWND hwndDlg, LPMEASUREITEMSTRUCT lpmis) +{ + TEXTMETRIC tm; + GetTextMetrics(GetDC(hwndDlg), &tm); + + if (opts.use_flags) + lpmis->itemHeight = max(ICON_SIZE, tm.tmHeight); + else + lpmis->itemHeight = tm.tmHeight; +} + + +static INT_PTR CALLBACK OptionsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) +{ + switch (msg) + { + case WM_INITDIALOG: + { + int i, sel = -1; + for(i = 0; i < languages.getCount(); i++) + { + SendDlgItemMessage(hwndDlg, IDC_DEF_LANG, CB_ADDSTRING, 0, (LONG) languages[i]->full_name); + SendDlgItemMessage(hwndDlg, IDC_DEF_LANG, CB_SETITEMDATA, i, (DWORD) languages[i]); + + if (lstrcmp(opts.default_language, languages[i]->language) == 0) + sel = i; + } + SendDlgItemMessage(hwndDlg, IDC_DEF_LANG, CB_SETCURSEL, sel, 0); + + SendDlgItemMessage(hwndDlg, IDC_UNDERLINE_TYPE, CB_ADDSTRING, 0, (LONG) TranslateT("Line")); + SendDlgItemMessage(hwndDlg, IDC_UNDERLINE_TYPE, CB_ADDSTRING, 0, (LONG) TranslateT("Dotted")); + SendDlgItemMessage(hwndDlg, IDC_UNDERLINE_TYPE, CB_ADDSTRING, 0, (LONG) TranslateT("Dash")); + SendDlgItemMessage(hwndDlg, IDC_UNDERLINE_TYPE, CB_ADDSTRING, 0, (LONG) TranslateT("Dash dot")); + SendDlgItemMessage(hwndDlg, IDC_UNDERLINE_TYPE, CB_ADDSTRING, 0, (LONG) TranslateT("Dash dot dot")); + SendDlgItemMessage(hwndDlg, IDC_UNDERLINE_TYPE, CB_ADDSTRING, 0, (LONG) TranslateT("Wave")); + SendDlgItemMessage(hwndDlg, IDC_UNDERLINE_TYPE, CB_ADDSTRING, 0, (LONG) TranslateT("Thick")); + + break; + } + + case WM_COMMAND: + { + if(LOWORD(wParam) == IDC_GETMORE) + CallService(MS_UTILS_OPENURL, 1, (LPARAM) "http://wiki.services.openoffice.org/wiki/Dictionaries"); + + if (LOWORD(wParam) == IDC_DEF_LANG + && (HIWORD(wParam) == CBN_SELCHANGE && (HWND)lParam == GetFocus())) + { + SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0); + return 0; + } + + break; + } + + case WM_NOTIFY: + { + LPNMHDR lpnmhdr = (LPNMHDR)lParam; + + if (lpnmhdr->idFrom == 0 && lpnmhdr->code == PSN_APPLY && languages.getCount() > 0) + { + int sel = SendDlgItemMessage(hwndDlg, IDC_DEF_LANG, CB_GETCURSEL, 0, 0); + if (sel >= languages.getCount()) + sel = 0; + DBWriteContactSettingTString(NULL, MODULE_NAME, "DefaultLanguage", + (TCHAR *) languages[sel]->language); + lstrcpy(opts.default_language, languages[sel]->language); + } + + break; + } + + case WM_DRAWITEM: + { + LPDRAWITEMSTRUCT lpdis = (LPDRAWITEMSTRUCT)lParam; + if(lpdis->CtlID != IDC_DEF_LANG) + break; + if(lpdis->itemID == -1) + break; + + Dictionary *dict = (Dictionary *) lpdis->itemData; + + DrawItem(hwndDlg, lpdis, dict); + + return TRUE; + } + + case WM_MEASUREITEM: + { + LPMEASUREITEMSTRUCT lpmis = (LPMEASUREITEMSTRUCT)lParam; + if(lpmis->CtlID != IDC_DEF_LANG) + break; + + MeasureItem(hwndDlg, lpmis); + + + return TRUE; + } + } + + return SaveOptsDlgProc(optionsControls, MAX_REGS(optionsControls), MODULE_NAME, hwndDlg, msg, wParam, lParam); +} + + +struct AutoreplaceData +{ + Dictionary *dict; + map autoReplaceMap; + BOOL initialized; + BOOL changed; + + AutoreplaceData(Dictionary *dict) : dict(dict), initialized(FALSE), changed(FALSE) {} + + void RemoveWord(const TCHAR *aWord) + { + map::iterator it = autoReplaceMap.find(aWord); + if (it != autoReplaceMap.end()) + autoReplaceMap.erase(it); + changed = TRUE; + } + + void AddWord(const TCHAR *find, const TCHAR *replace, BOOL useVars) + { + autoReplaceMap[find] = AutoReplacement(replace, useVars); + changed = TRUE; + } +}; + + +static void EnableDisableCtrls(HWND hwndDlg) +{ + BOOL enabled = IsDlgButtonChecked(hwndDlg, IDC_AUTO_USER); + EnableWindow(GetDlgItem(hwndDlg, IDC_LANGUAGE_L), enabled); + EnableWindow(GetDlgItem(hwndDlg, IDC_LANGUAGE), enabled); + EnableWindow(GetDlgItem(hwndDlg, IDC_REPLACEMENTS), enabled); + EnableWindow(GetDlgItem(hwndDlg, IDC_ADD), enabled); + EnableWindow(GetDlgItem(hwndDlg, IDC_EDIT), enabled); + EnableWindow(GetDlgItem(hwndDlg, IDC_REMOVE), enabled); + if (!enabled) + return; + + HWND hList = GetDlgItem(hwndDlg, IDC_REPLACEMENTS); + EnableWindow(GetDlgItem(hwndDlg, IDC_EDIT), ListView_GetSelectedCount(hList) == 1); + EnableWindow(GetDlgItem(hwndDlg, IDC_REMOVE), ListView_GetSelectedCount(hList) > 0); + + +} + + +static void LoadReplacements(HWND hwndDlg) +{ + HWND hList = GetDlgItem(hwndDlg, IDC_REPLACEMENTS); + + ListView_DeleteAllItems(hList); + ListView_SetItemCount(hList, 0); + + int sel = SendDlgItemMessage(hwndDlg, IDC_LANGUAGE, CB_GETCURSEL, 0, 0); + if (sel < 0) + return; + + AutoreplaceData *data = (AutoreplaceData *) SendDlgItemMessage(hwndDlg, IDC_LANGUAGE, CB_GETITEMDATA, sel, 0); + if (!data->initialized) + { + data->dict->autoReplace->copyMap(&data->autoReplaceMap); + data->initialized = TRUE; + } + + map::iterator it = data->autoReplaceMap.begin(); + for(int i = 0; it != data->autoReplaceMap.end(); it++, i++) + { + LVITEM item = {0}; + item.mask = LVIF_TEXT | LVIF_PARAM; + item.iItem = i; + item.iSubItem = 0; + item.pszText = (TCHAR *) it->first.c_str(); + item.cchTextMax = it->first.length(); + item.lParam = i; + + ListView_InsertItem(hList, &item); + + ListView_SetItemText(hList, i, 1, (TCHAR *) it->second.replace.c_str()); + } + + EnableDisableCtrls(hwndDlg); +} + + +static void SaveNewReplacements(BOOL canceled, Dictionary *dict, + const TCHAR *find, const TCHAR *replace, BOOL useVariables, + const TCHAR *original_find, void *param) +{ + if (canceled) + return; + + AutoreplaceData *data = (AutoreplaceData *) param; + + if (lstrlen(original_find) > 0) + data->RemoveWord(original_find); + + data->AddWord(find, replace, useVariables); +} + + +static void ShowAddReplacement(HWND hwndDlg, int item = -1) +{ + int sel = SendDlgItemMessage(hwndDlg, IDC_LANGUAGE, CB_GETCURSEL, 0, 0); + if (sel < 0) + return; + + AutoreplaceData *data = (AutoreplaceData *) SendDlgItemMessage(hwndDlg, IDC_LANGUAGE, CB_GETITEMDATA, sel, 0); + + TCHAR find[256]; + const TCHAR *replace = NULL; + BOOL useVariables = FALSE; + + if (item < 0) + { + find[0] = 0; + } + else + { + ListView_GetItemText(GetDlgItem(hwndDlg, IDC_REPLACEMENTS), item, 0, find, MAX_REGS(find)); + } + + if (lstrlen(find) > 0) + { + AutoReplacement &ar = data->autoReplaceMap[find]; + replace = ar.replace.c_str(); + useVariables = ar.useVariables; + } + + if (ShowAutoReplaceDialog(hwndDlg, TRUE, data->dict, find, replace, useVariables, + FALSE, &SaveNewReplacements, data)) + { + LoadReplacements(hwndDlg); + SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0); + } + + EnableDisableCtrls(hwndDlg); +} + + +static INT_PTR CALLBACK AutoreplaceDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) +{ + switch (msg) + { + case WM_INITDIALOG: + { + BOOL ret = SaveOptsDlgProc(autoReplaceControls, MAX_REGS(autoReplaceControls), MODULE_NAME, hwndDlg, msg, wParam, lParam); + + int sel = -1; + for(int i = 0; i < languages.getCount(); i++) + { + SendDlgItemMessage(hwndDlg, IDC_LANGUAGE, CB_ADDSTRING, 0, (LONG) languages[i]->full_name); + SendDlgItemMessage(hwndDlg, IDC_LANGUAGE, CB_SETITEMDATA, i, (DWORD) new AutoreplaceData(languages[i])); + + if (lstrcmp(opts.default_language, languages[i]->language) == 0) + sel = i; + } + SendDlgItemMessage(hwndDlg, IDC_LANGUAGE, CB_SETCURSEL, sel, 0); + + HWND hList = GetDlgItem(hwndDlg, IDC_REPLACEMENTS); + + ListView_SetExtendedListViewStyle(hList, ListView_GetExtendedListViewStyle(hList) | LVS_EX_FULLROWSELECT); + + LVCOLUMN col = {0}; + col.mask = LVCF_FMT | LVCF_WIDTH | LVCF_TEXT ; + col.fmt = LVCFMT_LEFT; + col.cx = 175; + col.pszText = TranslateT("Wrong word"); + col.cchTextMax = lstrlen(col.pszText); + ListView_InsertColumn(hList, 0, &col); + + col.pszText = TranslateT("Correction"); + col.cchTextMax = lstrlen(col.pszText); + ListView_InsertColumn(hList, 1, &col); + + LoadReplacements(hwndDlg); + + return ret; + } + + case WM_COMMAND: + { + if (LOWORD(wParam) == IDC_LANGUAGE && HIWORD(wParam) == CBN_SELCHANGE) + { + LoadReplacements(hwndDlg); + } + else if (LOWORD(wParam) == IDC_ADD) + { + ShowAddReplacement(hwndDlg); + } + else if (LOWORD(wParam) == IDC_EDIT) + { + HWND hList = GetDlgItem(hwndDlg, IDC_REPLACEMENTS); + if (ListView_GetSelectedCount(hList) != 1) + break; + + int sel = SendMessage(hList, LVM_GETNEXTITEM, -1, LVNI_SELECTED); + if (sel < 0) + break; + + ShowAddReplacement(hwndDlg, sel); + } + else if (LOWORD(wParam) == IDC_REMOVE) + { + HWND hList = GetDlgItem(hwndDlg, IDC_REPLACEMENTS); + + int sel = SendDlgItemMessage(hwndDlg, IDC_LANGUAGE, CB_GETCURSEL, 0, 0); + if (sel < 0) + break; + + AutoreplaceData *data = (AutoreplaceData *) SendDlgItemMessage(hwndDlg, IDC_LANGUAGE, CB_GETITEMDATA, sel, 0); + + BOOL changed = FALSE; + + sel = SendMessage(hList, LVM_GETNEXTITEM, -1, LVNI_SELECTED); + while(sel >= 0) + { + TCHAR tmp[256]; + ListView_GetItemText(hList, sel, 0, tmp, MAX_REGS(tmp)); + + data->RemoveWord(tmp); + changed = TRUE; + + sel = SendMessage(hList, LVM_GETNEXTITEM, sel, LVNI_SELECTED); + } + + if (changed) + { + LoadReplacements(hwndDlg); + SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0); + } + } + + break; + } + + case WM_NOTIFY: + { + LPNMHDR lpnmhdr = (LPNMHDR)lParam; + + if (lpnmhdr->idFrom == 0 && lpnmhdr->code == PSN_APPLY && languages.getCount() > 0) + { + for(int i = 0; i < languages.getCount(); i++) + { + AutoreplaceData *data = (AutoreplaceData *) SendDlgItemMessage(hwndDlg, IDC_LANGUAGE, CB_GETITEMDATA, i, 0); + if (data->changed) + { + data->dict->autoReplace->setMap(data->autoReplaceMap); + data->changed = FALSE; + } + } + } + else if (lpnmhdr->idFrom == IDC_REPLACEMENTS) + { + HWND hList = GetDlgItem(hwndDlg, IDC_REPLACEMENTS); + + switch(lpnmhdr->code) + { + case LVN_ITEMCHANGED: + case NM_CLICK: + EnableDisableCtrls(hwndDlg); + break; + + case NM_DBLCLK: + LPNMITEMACTIVATE lpnmitem = (LPNMITEMACTIVATE) lParam; + if (lpnmitem->iItem >= 0) + ShowAddReplacement(hwndDlg, lpnmitem->iItem); + break; + } + } + else if (lpnmhdr->idFrom == IDC_AUTO_USER) + { + EnableDisableCtrls(hwndDlg); + } + + break; + } + + case WM_DRAWITEM: + { + LPDRAWITEMSTRUCT lpdis = (LPDRAWITEMSTRUCT)lParam; + if(lpdis->CtlID != IDC_LANGUAGE) + break; + if(lpdis->itemID == -1) + break; + + AutoreplaceData *data = (AutoreplaceData *) lpdis->itemData; + + DrawItem(hwndDlg, lpdis, data->dict); + + return TRUE; + } + + case WM_MEASUREITEM: + { + LPMEASUREITEMSTRUCT lpmis = (LPMEASUREITEMSTRUCT)lParam; + if(lpmis->CtlID != IDC_LANGUAGE) + break; + + MeasureItem(hwndDlg, lpmis); + + + return TRUE; + } + } + + + return SaveOptsDlgProc(autoReplaceControls, MAX_REGS(autoReplaceControls), MODULE_NAME, hwndDlg, msg, wParam, lParam); +} + + diff --git a/plugins/SpellChecker/src/options.h b/plugins/SpellChecker/src/options.h new file mode 100644 index 0000000000..70710fdb9d --- /dev/null +++ b/plugins/SpellChecker/src/options.h @@ -0,0 +1,68 @@ +/* +Copyright (C) 2006-2010 Ricardo Pescuma Domenecci + +This is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public +License as published by the Free Software Foundation; either +version 2 of the License, or (at your option) any later version. + +This is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with this file; see the file license.txt. If +not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. +*/ + + +#ifndef __OPTIONS_H__ +# define __OPTIONS_H__ + + +#define POPUP_ACTION_DONOTHING 0 +#define POPUP_ACTION_CLOSEPOPUP 1 +#define POPUP_ACTION_OPENHISTORY 2 + +#define POPUP_DELAY_DEFAULT 0 +#define POPUP_DELAY_CUSTOM 1 +#define POPUP_DELAY_PERMANENT 2 + + +struct Options { + TCHAR default_language[32]; + BOOL auto_replace_dict; + BOOL auto_replace_user; + BOOL ignore_uppercase; + BOOL ignore_with_numbers; + BOOL ask_when_sending_with_error; + + WORD underline_type; + BOOL cascade_corrections; + BOOL show_all_corrections; + BOOL show_wrong_word; + BOOL use_flags; + BOOL auto_locale; + BOOL use_other_apps_dicts; + BOOL handle_underscore; +}; + +extern Options opts; + + +// Initializations needed by options +void InitOptions(); + +// Deinitializations needed by options +void DeInitOptions(); + + +// Loads the options from DB +// It don't need to be called, except in some rare cases +void LoadOptions(); + + + +#endif // __OPTIONS_H__ diff --git a/plugins/SpellChecker/src/resource.h b/plugins/SpellChecker/src/resource.h new file mode 100644 index 0000000000..bcb28008fb --- /dev/null +++ b/plugins/SpellChecker/src/resource.h @@ -0,0 +1,93 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by resource.rc +// +#define IDD_OPTIONS 119 +#define IDD_POPUPS 120 +#define IDR_CONTEXT 120 +#define IDI_NO_CHECK 122 +#define IDI_CHECK 123 +#define IDI_UNKNOWN_FLAG 124 +#define IDD_ADD_REPLACEMENT 125 +#define IDD_REPLACEMENTS 126 +#define IDC_DELAY 1001 +#define IDC_WINCOLORS 1002 +#define IDC_DEFAULTCOLORS 1003 +#define IDC_BGCOLOR 1004 +#define IDC_TEXTCOLOR 1005 +#define IDC_PREV 1006 +#define IDC_DELAYFROMPU 1007 +#define IDC_DELAYCUSTOM 1008 +#define IDC_DELAYPERMANENT 1009 +#define IDC_RIGHT_ACTION 1022 +#define IDC_LEFT_ACTION 1023 +#define IDC_PROTOCOLS 1041 +#define IDC_CHANGED 1058 +#define IDC_REMOVED 1059 +#define IDC_CHECK1 1060 +#define IDC_POPUPS 1060 +#define IDC_AUTOCORRECT 1060 +#define IDC_AUTO_DICT 1060 +#define IDC_VARIABLES 1060 +#define IDC_CHECK2 1061 +#define IDC_DELAY_SPIN 1061 +#define IDC_HISTORY 1061 +#define IDC_SIMULATE_SUPPORT 1061 +#define IDC_USE_LOCALE 1061 +#define IDC_CASCADE_CORRECTIONS 1061 +#define IDC_ANSI 1062 +#define IDC_SHOW_ALL_CORRECTIONS 1062 +#define IDC_TRACK_G 1063 +#define IDC_USE_FLAGS 1063 +#define IDC_CHANGED_L 1064 +#define IDC_SHOW_WRONG_WORD 1064 +#define IDC_REMOVED_L 1065 +#define IDC_IGNORE_UPPERCASE 1065 +#define IDC_PROTOCOLS_G 1066 +#define IDC_AUTO_USER 1066 +#define IDC_ASK_ON_ERROR 1066 +#define IDC_PROTOCOLS_L 1067 +#define IDC_AUTO_LOCALE 1067 +#define IDC_COLOURS_G 1068 +#define IDC_TRACK_CHANGE 1068 +#define IDC_OTHER_PROGS 1068 +#define IDC_BGCOLOR_L 1069 +#define IDC_TRACK_REMOVE 1069 +#define IDC_HANDLE_UNDERSCORE 1069 +#define IDC_TEXTCOLOR_L 1070 +#define IDC_ONLY_NOT_OFFLINE 1070 +#define IDC_DELAY_G 1071 +#define IDC_ACTIONS_G 1072 +#define IDC_RIGHT_ACTION_L 1073 +#define IDC_LEFT_ACTION_L 1074 +#define IDC_DEF_LANG 1075 +#define IDC_GETMORE 1076 +#define IDC_ADVANCED 1077 +#define IDC_UNDERLINE_TYPE 1078 +#define IDC_UNDERLINE_TYPE_L 1079 +#define IDC_SPELL_CHECKER 1080 +#define IDC_NEW 1082 +#define IDC_OLD 1083 +#define IDC_REPLACEMENTS 1084 +#define IDC_REMOVE 1085 +#define IDC_ADD 1086 +#define IDC_LANGUAGE 1087 +#define IDC_EDIT 1088 +#define IDC_VAR_HELP 1088 +#define IDC_OLD_PS 1089 +#define IDC_LANGUAGE_L 1090 +#define IDC_IGNORE_NUMBERS 1091 +#define IDC_STATIC -1 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NO_MFC 1 +#define _APS_3D_CONTROLS 1 +#define _APS_NEXT_RESOURCE_VALUE 126 +#define _APS_NEXT_COMMAND_VALUE 40005 +#define _APS_NEXT_CONTROL_VALUE 1092 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/plugins/SpellChecker/src/spellchecker.cpp b/plugins/SpellChecker/src/spellchecker.cpp new file mode 100644 index 0000000000..a126070604 --- /dev/null +++ b/plugins/SpellChecker/src/spellchecker.cpp @@ -0,0 +1,2252 @@ +/* +Copyright (C) 2006-2010 Ricardo Pescuma Domenecci + +This is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public +License as published by the Free Software Foundation; either +version 2 of the License, or (at your option) any later version. + +This is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with this file; see the file license.txt. If +not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. +*/ + +#include "commons.h" + + +// Prototypes /////////////////////////////////////////////////////////////////////////// + + +PLUGININFOEX pluginInfo={ + sizeof(PLUGININFOEX), + __PLUGIN_NAME, + PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM), + __DESCRIPTION, + __AUTHOR, + __AUTHOREMAIL, + __COPYRIGHT, + __AUTHORWEB, + UNICODE_AWARE, + { 0x36753ae3, 0x840b, 0x4797, { 0x94, 0xa5, 0xfd, 0x9f, 0x58, 0x52, 0xb9, 0x42 } } // {36753AE3-840B-4797-94A5-FD9F5852B942} +}; + +typedef struct +{ + TCHAR* szDescr; + char* szName; + int defIconID; +} IconStruct; + +static IconStruct iconList[] = +{ + { LPGENT("Enabled"), "spellchecker_enabled", IDI_CHECK }, + { LPGENT("Disabled"), "spellchecker_disabled", IDI_NO_CHECK }, +// { LPGENT("Unknown Flag"), "spellchecker_unknown_flag", IDI_UNKNOWN_FLAG }, +}; + +#define TIMER_ID 17982 +#define WMU_DICT_CHANGED (WM_USER+100) +#define WMU_KBDL_CHANGED (WM_USER+101) + +#define HOTKEY_ACTION_TOGGLE 1 + +HINSTANCE hInst; + +int hLangpack = 0; + +HANDLE hHooks[6]; +HANDLE hServices[3]; + +HANDLE hDictionariesFolder = NULL; +TCHAR *dictionariesFolder; + +HANDLE hCustomDictionariesFolder = NULL; +TCHAR *customDictionariesFolder; + +HANDLE hFlagsDllFolder = NULL; +TCHAR *flagsDllFolder; + +HBITMAP hCheckedBmp; +BITMAP bmpChecked; + +BOOL variables_enabled = FALSE; +BOOL loaded = FALSE; + +LIST languages(1); + +typedef map DialogMapType; + +DialogMapType dialogs; +DialogMapType menus; + +int ModulesLoaded(WPARAM wParam, LPARAM lParam); +int PreShutdown(WPARAM wParam, LPARAM lParam); +int MsgWindowEvent(WPARAM wParam, LPARAM lParam); +int MsgWindowPopup(WPARAM wParam, LPARAM lParam); +int IconsChanged(WPARAM wParam, LPARAM lParam); +int IconPressed(WPARAM wParam, LPARAM lParam); + +int AddContactTextBox(HANDLE hContact, HWND hwnd, char *name, BOOL srmm, HWND hwndOwner); +int RemoveContactTextBox(HWND hwnd); +int ShowPopupMenu(HWND hwnd, HMENU hMenu, POINT pt, HWND hwndOwner); + +INT_PTR AddContactTextBoxService(WPARAM wParam, LPARAM lParam); +INT_PTR RemoveContactTextBoxService(WPARAM wParam, LPARAM lParam); +INT_PTR ShowPopupMenuService(WPARAM wParam, LPARAM lParam); + +LRESULT CALLBACK MenuWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); + +void ModifyIcon(Dialog *dlg); +BOOL GetWordCharRange(Dialog *dlg, CHARRANGE &sel, TCHAR *text, size_t text_len, int &first_char); +TCHAR *GetWordUnderPoint(Dialog *dlg, POINT pt, CHARRANGE &sel); + +int GetClosestLanguage(TCHAR *lang_name); + +typedef void (*FoundWrongWordCallback)(TCHAR *word, CHARRANGE pos, void *param); + + +#define DEFINE_GUIDXXX(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \ + const GUID CDECL name \ + = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } } + +DEFINE_GUIDXXX(IID_ITextDocument,0x8CC497C0,0xA1DF,0x11CE,0x80,0x98, + 0x00,0xAA,0x00,0x47,0xBE,0x5D); + + + +// Functions //////////////////////////////////////////////////////////////////////////// + + +HICON IcoLib_LoadIcon(Dictionary *dict, BOOL copy) +{ + + char lang[32]; + WideCharToMultiByte(CP_ACP, 0, dict->language, -1, lang, sizeof(lang), NULL, NULL); + return IcoLib_LoadIcon(lang, copy); + +} + + +extern "C" BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) +{ + hInst = hinstDLL; + return TRUE; +} + +extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion) +{ + return &pluginInfo; +} + +extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_SPELLCHECKER, MIID_LAST }; + +extern "C" int __declspec(dllexport) Load(void) +{ + + mir_getLP(&pluginInfo); + + // hooks + hHooks[0] = HookEvent(ME_SYSTEM_MODULESLOADED, ModulesLoaded); + hHooks[1] = HookEvent(ME_SYSTEM_PRESHUTDOWN, PreShutdown); + + hCheckedBmp = LoadBitmap(NULL, MAKEINTRESOURCE(OBM_CHECK)); + if (GetObject(hCheckedBmp, sizeof(bmpChecked), &bmpChecked) == 0) + bmpChecked.bmHeight = bmpChecked.bmWidth = 10; + + return 0; +} + +extern "C" int __declspec(dllexport) Unload(void) +{ + DeleteObject(hCheckedBmp); + FreeDictionaries(languages); + + return 0; +} + +// Called when all the modules are loaded +int ModulesLoaded(WPARAM wParam, LPARAM lParam) +{ + variables_enabled = ServiceExists(MS_VARS_FORMATSTRING); + + // add our modules to the KnownModules list + CallService("DBEditorpp/RegisterSingleModule", (WPARAM) MODULE_NAME, 0); + + // Folders plugin support + if (ServiceExists(MS_FOLDERS_REGISTER_PATH)) + { + hDictionariesFolder = FoldersRegisterCustomPathT(LPGEN("Spell Checker"), LPGEN("Dictionaries"), DICTIONARIES_FOLDER); + + dictionariesFolder = (TCHAR *) mir_alloc(sizeof(TCHAR) * MAX_PATH); + FoldersGetCustomPathT(hDictionariesFolder, dictionariesFolder, MAX_PATH, _T(".")); + + hCustomDictionariesFolder = FoldersRegisterCustomPathT(LPGEN("Spell Checker"), LPGEN("Custom Dictionaries"), CUSTOM_DICTIONARIES_FOLDER); + + customDictionariesFolder = (TCHAR *) mir_alloc(sizeof(TCHAR) * MAX_PATH); + FoldersGetCustomPathT(hCustomDictionariesFolder, customDictionariesFolder, MAX_PATH, _T(".")); + + hFlagsDllFolder = FoldersRegisterCustomPathT(LPGEN("Spell Checker"), LPGEN("Flags DLL"), FLAGS_DLL_FOLDER); + + flagsDllFolder = (TCHAR *) mir_alloc(sizeof(TCHAR) * MAX_PATH); + FoldersGetCustomPathT(hFlagsDllFolder, flagsDllFolder, MAX_PATH, _T(".")); + } + else + { + dictionariesFolder = Utils_ReplaceVarsT(DICTIONARIES_FOLDER); + customDictionariesFolder = Utils_ReplaceVarsT(CUSTOM_DICTIONARIES_FOLDER); + flagsDllFolder = Utils_ReplaceVarsT(FLAGS_DLL_FOLDER); + } + + TCHAR path[MAX_PATH]; + GetModuleFileName(hInst, path, MAX_PATH); + + SKINICONDESC sid = {0}; + sid.cbSize = sizeof(SKINICONDESC); + sid.flags = SIDF_ALL_TCHAR; + sid.ptszSection = LPGENT("Spell Checker"); + sid.ptszDefaultFile = path; + + for (unsigned i = 0; i < MAX_REGS(iconList); ++i) + { + sid.ptszDescription = iconList[i].szDescr; + sid.pszName = iconList[i].szName; + sid.iDefaultIndex = -iconList[i].defIconID; + Skin_AddIcon(&sid); + } + + InitOptions(); + + GetAvaibleDictionaries(languages, dictionariesFolder, customDictionariesFolder); + + LoadOptions(); + + if (opts.use_flags) + { + // Load flags dll + TCHAR flag_file[1024]; + mir_sntprintf(flag_file, MAX_REGS(flag_file), _T("%s\\flags.dll"), flagsDllFolder); + HMODULE hFlagsDll = LoadLibraryEx(flag_file, NULL, LOAD_LIBRARY_AS_DATAFILE); + + sid.flags = SIDF_ALL_TCHAR | SIDF_SORTED; + sid.ptszSection = _T("Languages/Flags"); + + // Get language flags + for(int i = 0; i < languages.getCount(); i++) + { + sid.ptszDescription = languages[i]->full_name; + + char lang[32]; + mir_snprintf(lang, MAX_REGS(lang), "%S", languages[i]->language); + sid.pszName = lang; + + + HICON hFlag = IcoLib_LoadIcon(sid.pszName); + if (hFlag != NULL) + { + // Already registered + Skin_ReleaseIcon(hFlag); + continue; + } + + if (hFlagsDll != NULL) + hFlag = (HICON) LoadImage(hFlagsDll, languages[i]->language, IMAGE_ICON, 16, 16, 0); + else + hFlag = NULL; + + if (hFlag != NULL) + { + sid.hDefaultIcon = hFlag; + sid.ptszDefaultFile = NULL; + sid.iDefaultIndex = 0; + } + else + { + sid.hDefaultIcon = NULL; + sid.ptszDefaultFile = path; + sid.iDefaultIndex = - IDI_UNKNOWN_FLAG; + } + + // Oki, lets add to IcoLib, then + Skin_AddIcon(&sid); + + if (hFlag != NULL) + DestroyIcon(hFlag); + } + FreeLibrary(hFlagsDll); + } + + for (int j = 0; j < languages.getCount(); j++) + { + Dictionary *dict = languages[j]; + + TCHAR filename[MAX_PATH]; + mir_sntprintf(filename, MAX_PATH, _T("%s\\%s.ar"), customDictionariesFolder, dict->language); + dict->autoReplace = new AutoReplaceMap(filename, dict); + + if (lstrcmp(dict->language, opts.default_language) == 0) + dict->load(); + } + + hHooks[2] = HookEvent(ME_SKIN2_ICONSCHANGED, &IconsChanged); + hHooks[3] = HookEvent(ME_MSG_WINDOWEVENT, &MsgWindowEvent); + hHooks[4] = HookEvent(ME_MSG_WINDOWPOPUP, &MsgWindowPopup); + hHooks[5] = HookEvent(ME_MSG_ICONPRESSED, &IconPressed); + + hServices[0] = CreateServiceFunction(MS_SPELLCHECKER_ADD_RICHEDIT, AddContactTextBoxService); + hServices[1] = CreateServiceFunction(MS_SPELLCHECKER_REMOVE_RICHEDIT, RemoveContactTextBoxService); + hServices[2] = CreateServiceFunction(MS_SPELLCHECKER_SHOW_POPUP_MENU, ShowPopupMenuService); + + if (ServiceExists(MS_MSG_ADDICON)) + { + StatusIconData sid = {0}; + sid.cbSize = sizeof(sid); + sid.szModule = MODULE_NAME; + sid.hIconDisabled = IcoLib_LoadIcon("spellchecker_disabled", TRUE); + sid.flags = MBF_HIDDEN; + + for (int i = 0; i < languages.getCount(); i++) + { + sid.dwId = i; + + char tmp[128]; + mir_snprintf(tmp, MAX_REGS(tmp), "%s - " TCHAR_STR_PARAM, + Translate("Spell Checker"), languages[i]->full_name); + sid.szTooltip = tmp; + + if (opts.use_flags) + sid.hIcon = IcoLib_LoadIcon(languages[i], TRUE); + else + sid.hIcon = IcoLib_LoadIcon("spellchecker_enabled", TRUE); + + CallService(MS_MSG_ADDICON, 0, (LPARAM) &sid); + } + } + + HOTKEYDESC hkd = {0}; + hkd.cbSize = sizeof(hkd); + hkd.pszName = "Spell Checker/Toggle"; + hkd.pszSection = LPGEN("Spell Checker"); + hkd.pszDescription = LPGEN("Enable/disable spell checker"); + hkd.DefHotKey = HOTKEYCODE(HOTKEYF_SHIFT|HOTKEYF_ALT, 'S'); + hkd.lParam = HOTKEY_ACTION_TOGGLE; + Hotkey_Register( &hkd); + + loaded = TRUE; + + return 0; +} + + +int IconsChanged(WPARAM wParam, LPARAM lParam) +{ + if (ServiceExists(MS_MSG_MODIFYICON)) + { + StatusIconData sid = {0}; + sid.cbSize = sizeof(sid); + sid.szModule = MODULE_NAME; + sid.hIconDisabled = IcoLib_LoadIcon("spellchecker_disabled", TRUE); + sid.flags = MBF_HIDDEN; + + + for (int i = 0; i < languages.getCount(); i++) + { + sid.dwId = i; + + char tmp[128]; + mir_snprintf(tmp, MAX_REGS(tmp), "%s - " TCHAR_STR_PARAM, + Translate("Spell Checker"), languages[i]->full_name); + sid.szTooltip = tmp; + + if (opts.use_flags) + sid.hIcon = IcoLib_LoadIcon(languages[i], TRUE); + else + sid.hIcon = IcoLib_LoadIcon("spellchecker_enabled", TRUE); + + CallService(MS_MSG_MODIFYICON, 0, (LPARAM) &sid); + } + } + + return 0; +} + + +int PreShutdown(WPARAM wParam, LPARAM lParam) +{ + int i; + for(i = 0; i < MAX_REGS(hServices); i++) + DestroyServiceFunction(hServices[i]); + + for(i = 0; i < MAX_REGS(hHooks); i++) + UnhookEvent(hHooks[i]); + + DeInitOptions(); + + if (ServiceExists(MS_MSG_REMOVEICON)) + { + StatusIconData sid = {0}; + sid.cbSize = sizeof(sid); + sid.szModule = MODULE_NAME; + CallService(MS_MSG_REMOVEICON, 0, (LPARAM) &sid); + } + + mir_free(dictionariesFolder); + mir_free(customDictionariesFolder); + mir_free(flagsDllFolder); + + return 0; +} + + +void SetUnderline(Dialog *dlg, int pos_start, int pos_end) +{ + dlg->re->SetSel(pos_start, pos_end); + + CHARFORMAT2 cf; + cf.cbSize = sizeof(CHARFORMAT2); + cf.dwMask = CFM_UNDERLINE | CFM_UNDERLINETYPE; + cf.dwEffects = CFE_UNDERLINE; + cf.bUnderlineType = ((opts.underline_type + CFU_UNDERLINEDOUBLE) | 0x50); + dlg->re->SendMessage(EM_SETCHARFORMAT, (WPARAM) SCF_SELECTION, (LPARAM)&cf); + + dlg->markedSomeWord = TRUE; +} + + +BOOL IsMyUnderline(const CHARFORMAT2 &cf) +{ + return (cf.dwEffects & CFE_UNDERLINE) + && (cf.bUnderlineType & 0x0F) >= CFU_UNDERLINEDOUBLE + && (cf.bUnderlineType & 0x0F) <= CFU_UNDERLINETHICK + && (cf.bUnderlineType & ~0x0F) == 0x50; +} + + +void SetNoUnderline(RichEdit *re, int pos_start, int pos_end) +{ + if (opts.handle_underscore) + { + for(int i = pos_start; i <= pos_end; i++) + { + re->SetSel(i, min(i+1, pos_end)); + + CHARFORMAT2 cf; + cf.cbSize = sizeof(CHARFORMAT2); + re->SendMessage(EM_GETCHARFORMAT, (WPARAM) SCF_SELECTION, (LPARAM)&cf); + + BOOL mine = IsMyUnderline(cf); + if (mine) + { + cf.cbSize = sizeof(CHARFORMAT2); + cf.dwMask = CFM_UNDERLINE | CFM_UNDERLINETYPE; + cf.dwEffects = 0; + cf.bUnderlineType = CFU_UNDERLINE; + re->SendMessage(EM_SETCHARFORMAT, (WPARAM) SCF_SELECTION, (LPARAM)&cf); + } + } + } + else + { + re->SetSel(pos_start, pos_end); + + CHARFORMAT2 cf; + cf.cbSize = sizeof(CHARFORMAT2); + cf.dwMask = CFM_UNDERLINE | CFM_UNDERLINETYPE; + cf.dwEffects = 0; + cf.bUnderlineType = CFU_UNDERLINE; + re->SendMessage(EM_SETCHARFORMAT, (WPARAM) SCF_SELECTION, (LPARAM)&cf); + } +} + + +void SetNoUnderline(Dialog *dlg) +{ + dlg->re->Stop(); + SetNoUnderline(dlg->re, 0, dlg->re->GetTextLength()); + dlg->markedSomeWord = FALSE; + dlg->re->Start(); +} + + +inline BOOL IsNumber(TCHAR c) +{ + return c >= _T('0') && c <= _T('9'); +} + + +inline BOOL IsURL(TCHAR c) +{ + return (c >= _T('a') && c <= _T('z')) + || (c >= _T('A') && c <= _T('Z')) + || IsNumber(c) + || c == _T('.') || c == _T('/') + || c == _T('\\') || c == _T('?') + || c == _T('=') || c == _T('&') + || c == _T('%') || c == _T('-') + || c == _T('_') || c == _T(':') + || c == _T('@') || c == _T('#'); +} + + +int FindURLEnd(Dialog *dlg, TCHAR *text, int start_pos, int *checked_until = NULL) +{ + int num_slashes = 0; + int num_ats = 0; + int num_dots = 0; + + int i = start_pos; + + for (; IsURL(text[i]) || dlg->lang->isWordChar(text[i]); i++) + { + TCHAR c = text[i]; + + if (c == _T('\\') || c == _T('/')) + num_slashes++; + else if (c == _T('.')) + num_dots++; + else if (c == _T('@')) + num_ats++; + } + + if (checked_until != NULL) + *checked_until = i; + + if (num_slashes <= 0 && num_ats <= 0 && num_dots <= 0) + return -1; + + if (num_slashes == 0 && num_ats == 0 && num_dots < 2) + return -1; + + if (i - start_pos < 2) + return -1; + + return i; +} + + +int ReplaceWord(Dialog *dlg, CHARRANGE &sel, TCHAR *new_word) +{ + dlg->re->Stop(); + dlg->re->ResumeUndo(); + + int dif = dlg->re->Replace(sel.cpMin, sel.cpMax, new_word); + + dlg->re->SuspendUndo(); + dlg->re->Start(); + + return dif; +} + + +class TextParser +{ +public: + virtual ~TextParser() {} + + /// @return true when finished an word + virtual bool feed(int pos, TCHAR c) =0; + virtual int getFirstCharPos() =0; + virtual void reset() =0; + virtual void deal(const TCHAR *text, bool *mark, bool *replace, TCHAR **replacement) =0; +}; + + +class SpellParser : public TextParser +{ + Dictionary *dict; + int last_pos; + BOOL found_real_char; + +public: + SpellParser(Dictionary *dict) : dict(dict) + { + reset(); + } + + void reset() + { + last_pos = -1; + found_real_char = FALSE; + } + + bool feed(int pos, TCHAR c) + { + // Is inside a word? + if (dict->isWordChar(c) || IsNumber(c)) + { + if (last_pos == -1) + last_pos = pos; + + if (c != _T('-') && !IsNumber(c)) + found_real_char = TRUE; + + return false; + } + + if (!found_real_char) + last_pos = -1; + + return (last_pos != -1); + } + + int getFirstCharPos() + { + if (!found_real_char) + return -1; + else + return last_pos; + } + + void deal(const TCHAR *text, bool *mark, bool *replace, TCHAR **replacement) + { + // Is it correct? + if (dict->spell(text)) + return; + + // Has to auto-correct? + if (opts.auto_replace_dict) + { + *replacement = dict->autoSuggestOne(text); + if (*replacement != NULL) + { + *replace = true; + return; + } + } + + *mark = true; + } +}; + + +class AutoReplaceParser : public TextParser +{ + AutoReplaceMap *ar; + int last_pos; + +public: + AutoReplaceParser(AutoReplaceMap *ar) : ar(ar) + { + reset(); + } + + void reset() + { + last_pos = -1; + } + + bool feed(int pos, TCHAR c) + { + // Is inside a word? + if (ar->isWordChar(c)) + { + if (last_pos == -1) + last_pos = pos; + return false; + } + + return (last_pos != -1); + } + + int getFirstCharPos() + { + return last_pos; + } + + void deal(const TCHAR *text, bool *mark, bool *replace, TCHAR **replacement) + { + *replacement = ar->autoReplace(text); + if (*replacement != NULL) + *replace = true; + } +}; + +int CheckTextLine(Dialog *dlg, int line, TextParser *parser, + BOOL ignore_upper, BOOL ignore_with_numbers, BOOL test_urls, + const CHARRANGE &ignored, FoundWrongWordCallback callback, void *param) +{ + int errors = 0; + TCHAR text[1024]; + dlg->re->GetLine(line, text, MAX_REGS(text)); + int len = lstrlen(text); + int first_char = dlg->re->GetFirstCharOfLine(line); + + // Now lets get the words + int next_char_for_url = 0; + for (int pos = 0; pos < len; pos++) + { + int url_end = pos; + if (pos >= next_char_for_url) + { + url_end = FindURLEnd(dlg, text, pos, &next_char_for_url); + next_char_for_url++; + } + + if (url_end > pos) + { + BOOL ignore_url = FALSE; + + if (test_urls) + { + // All the url must be handled by the parser + parser->reset(); + + BOOL feed = FALSE; + for(int j = pos; !feed && j <= url_end; j++) + feed = parser->feed(j, text[j]); + + if (feed || parser->getFirstCharPos() != pos) + ignore_url = TRUE; + } + else + ignore_url = TRUE; + + pos = url_end; + + if (ignore_url) + { + parser->reset(); + continue; + } + } + else + { + TCHAR c = text[pos]; + + BOOL feed = parser->feed(pos, c); + + if (!feed) + { + if (pos >= len-1) + pos = len; // To check the last block + else + continue; + } + } + + int last_pos = parser->getFirstCharPos(); + parser->reset(); + + if (last_pos < 0) + continue; + + // We found a word + CHARRANGE sel = { first_char + last_pos, first_char + pos }; + + // Is in ignored range? + if (sel.cpMin <= ignored.cpMax && sel.cpMax >= ignored.cpMin) + continue; + + if (ignore_upper) + { + BOOL upper = TRUE; + for(int i = last_pos; i < pos && upper; i++) + upper = !IsCharLower(text[i]); + if (upper) + continue; + } + + if (ignore_with_numbers) + { + BOOL hasNumbers = FALSE; + for(int i = last_pos; i < pos && !hasNumbers; i++) + hasNumbers = IsNumber(text[i]); + if (hasNumbers) + continue; + } + + text[pos] = 0; + + bool mark = false; + bool replace = false; + TCHAR *replacement = NULL; + parser->deal(&text[last_pos], &mark, &replace, &replacement); + + if (replace) + { + // Replace in rich edit + int dif = dlg->re->Replace(sel.cpMin, sel.cpMax, replacement); + if (dif != 0) + { + // Read line again + dlg->re->GetLine(line, text, MAX_REGS(text)); + len = lstrlen(text); + + int old_first_char = first_char; + first_char = dlg->re->GetFirstCharOfLine(line); + + pos = max(-1, pos + dif + old_first_char - first_char); + } + + free(replacement); + } + else if (mark) + { + SetUnderline(dlg, sel.cpMin, sel.cpMax); + + if (callback != NULL) + callback(&text[last_pos], sel, param); + + errors++; + } + } + + return errors; +} + + +// Checks for errors in all text +int CheckText(Dialog *dlg, BOOL check_all, + FoundWrongWordCallback callback = NULL, void *param = NULL) +{ + int errors = 0; + + dlg->re->Stop(); + + if (dlg->re->GetTextLength() > 0) + { + int lines = dlg->re->GetLineCount(); + int line = 0; + CHARRANGE cur_sel = { -1, -1 }; + + if (!check_all) + { + // Check only the current line, one up and one down + int current_line = dlg->re->GetLineFromChar(dlg->re->GetSel().cpMin); + line = max(line, current_line - 1); + lines = min(lines, current_line + 2); + cur_sel = dlg->re->GetSel(); + } + + for (; line < lines; line++) + { + int first_char = dlg->re->GetFirstCharOfLine(line); + + SetNoUnderline(dlg->re, first_char, first_char + dlg->re->GetLineLength(line)); + + if (opts.auto_replace_user) + { + errors += CheckTextLine(dlg, line, &AutoReplaceParser(dlg->lang->autoReplace), + FALSE, FALSE, TRUE, + cur_sel, callback, param); + } + + errors += CheckTextLine(dlg, line, &SpellParser(dlg->lang), + opts.ignore_uppercase, opts.ignore_with_numbers, FALSE, + cur_sel, callback, param); + } + } + + // Fix last char + int len = dlg->re->GetTextLength(); + SetNoUnderline(dlg->re, len, len); + + dlg->re->Start(); + + return errors; +} + + +void ToLocaleID(TCHAR *szKLName, size_t size) +{ + TCHAR *stopped = NULL; + USHORT langID = (USHORT) _tcstol(szKLName, &stopped, 16); + + TCHAR ini[32]; + TCHAR end[32]; + GetLocaleInfo(MAKELCID(langID, 0), LOCALE_SISO639LANGNAME, ini, MAX_REGS(ini)); + GetLocaleInfo(MAKELCID(langID, 0), LOCALE_SISO3166CTRYNAME, end, MAX_REGS(end)); + + mir_sntprintf(szKLName, size, _T("%s_%s"), ini, end); +} + + +void LoadDictFromKbdl(Dialog *dlg) +{ + TCHAR szKLName[KL_NAMELENGTH + 1]; + + // Use default input language + HKL hkl = GetKeyboardLayout(0); + mir_sntprintf(szKLName, MAX_REGS(szKLName), _T("%x"), (int) LOWORD(hkl)); + ToLocaleID(szKLName, MAX_REGS(szKLName)); + + // Old code (use keyboard layout) +// GetKeyboardLayoutName(szKLName); +// ToLocaleID(szKLName, MAX_REGS(szKLName)); + + int d = GetClosestLanguage(szKLName); + if (d >= 0) + { + dlg->lang = languages[d]; + dlg->lang->load(); + + if (dlg->srmm) + ModifyIcon(dlg); + } +} + +int TimerCheck(Dialog *dlg, BOOL forceCheck = FALSE) +{ + KillTimer(dlg->hwnd, TIMER_ID); + + if (!dlg->enabled || dlg->lang == NULL) + return -1; + + if (!dlg->lang->isLoaded()) + { + SetTimer(dlg->hwnd, TIMER_ID, 500, NULL); + return -1; + } + + // Don't check if field is read-only + if (dlg->re->IsReadOnly()) + return -1; + + int len = dlg->re->GetTextLength(); + if (!forceCheck && len == dlg->old_text_len && !dlg->changed) + return -1; + + dlg->old_text_len = len; + dlg->changed = FALSE; + + return CheckText(dlg, TRUE); +} + + +LRESULT CALLBACK OwnerProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) +{ + DialogMapType::iterator dlgit = dialogs.find(hwnd); + if (dlgit == dialogs.end()) + return -1; + + Dialog *dlg = dlgit->second; + + if (msg == WM_COMMAND && (LOWORD(wParam) == IDOK || LOWORD(wParam) == 1624)) + { + if (opts.ask_when_sending_with_error) + { + int errors = TimerCheck(dlg, TRUE); + if (errors > 0) + { + TCHAR text[500]; + mir_sntprintf(text,MAX_REGS(text),TranslateT("There are %d spelling errors. Are you sure you want to send this message?"),errors); + if (MessageBox(hwnd,text,TranslateT("Spell Checker"), MB_ICONQUESTION | MB_YESNO) == IDNO) + { + return TRUE; + } + } + } + else if (opts.auto_replace_dict || opts.auto_replace_user) + { + // Fix all + TimerCheck(dlg); + } + + if (dlg->markedSomeWord) + // Remove underline + SetNoUnderline(dlg); + + // Schedule to re-parse + KillTimer(dlg->hwnd, TIMER_ID); + SetTimer(dlg->hwnd, TIMER_ID, 100, NULL); + + dlg->changed = TRUE; + } + + return CallWindowProc(dlg->owner_old_edit_proc, hwnd, msg, wParam, lParam); +} + + +void ToggleEnabled(Dialog *dlg) +{ + dlg->enabled = !dlg->enabled; + DBWriteContactSettingByte(dlg->hContact, MODULE_NAME, dlg->name, dlg->enabled); + + if (!dlg->enabled) + { + SetNoUnderline(dlg); + } + else + { + dlg->changed = TRUE; + SetTimer(dlg->hwnd, TIMER_ID, 100, NULL); + } + + if (dlg->srmm) + ModifyIcon(dlg); +} + + +LRESULT CALLBACK EditProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) +{ + DialogMapType::iterator dlgit = dialogs.find(hwnd); + if (dlgit == dialogs.end()) + return -1; + + Dialog *dlg = dlgit->second; + if (dlg == NULL) + return -1; + + // Hotkey support + { + MSG msgData = {0}; + msgData.hwnd = hwnd; + msgData.message = msg; + msgData.wParam = wParam; + msgData.lParam = lParam; + + int action = CallService(MS_HOTKEY_CHECK, (WPARAM) &msgData, (LPARAM) "Spell Checker"); + if (action == HOTKEY_ACTION_TOGGLE) + { + ToggleEnabled(dlg); + return 1; + } + } + + LRESULT ret = CallWindowProc(dlg->old_edit_proc, hwnd, msg, wParam, lParam); + + switch(msg) + { + case WM_KEYDOWN: + { + if (wParam != VK_DELETE) + break; + } + case WM_CHAR: + { + if (dlg->re->IsStopped()) + break; + + if (lParam & (1 << 28)) // ALT key + break; + + if (GetKeyState(VK_CONTROL) & 0x8000) // CTRL key + break; + + TCHAR c = (TCHAR) wParam; + BOOL deleting = (c == VK_BACK || c == VK_DELETE); + + // Need to do that to avoid changing the word while typing + KillTimer(hwnd, TIMER_ID); + SetTimer(hwnd, TIMER_ID, 1000, NULL); + + dlg->changed = TRUE; + + if (!deleting && (lParam & 0xFF) > 1) // Repeat rate + break; + + if (!dlg->enabled || dlg->lang == NULL || !dlg->lang->isLoaded()) + break; + + // Don't check if field is read-only + if (dlg->re->IsReadOnly()) + break; + + + if (!deleting && !dlg->lang->isWordChar(c)) + { + CheckText(dlg, FALSE); + } + else + { + // Remove underline of current word + + CHARFORMAT2 cf; + cf.cbSize = sizeof(CHARFORMAT2); + dlg->re->SendMessage(EM_GETCHARFORMAT, (WPARAM) SCF_SELECTION, (LPARAM)&cf); + + if (IsMyUnderline(cf)) + { + dlg->re->Stop(); + + CHARRANGE sel = dlg->re->GetSel(); + + TCHAR text[1024]; + int first_char; + GetWordCharRange(dlg, sel, text, MAX_REGS(text), first_char); + + SetNoUnderline(dlg->re, sel.cpMin, sel.cpMax); + + dlg->re->Start(); + } + } + + break; + } + case EM_REPLACESEL: + case WM_SETTEXT: + case EM_SETTEXTEX: + case EM_PASTESPECIAL: + case WM_PASTE: + { + if (dlg->re->IsStopped()) + break; + + KillTimer(hwnd, TIMER_ID); + SetTimer(hwnd, TIMER_ID, 100, NULL); + + dlg->changed = TRUE; + break; + } + + case WM_TIMER: + { + if (wParam != TIMER_ID) + break; + + TimerCheck(dlg); + break; + } + + case WMU_DICT_CHANGED: + { + KillTimer(hwnd, TIMER_ID); + SetTimer(hwnd, TIMER_ID, 100, NULL); + + dlg->changed = TRUE; + break; + } + + case WMU_KBDL_CHANGED: + { + if (opts.auto_locale) + { + KillTimer(hwnd, TIMER_ID); + SetTimer(hwnd, TIMER_ID, 100, NULL); + + dlg->changed = TRUE; + + LoadDictFromKbdl(dlg); + } + break; + } + + case WM_INPUTLANGCHANGE: + { + // Allow others to process this message and we get only the result + PostMessage(hwnd, WMU_KBDL_CHANGED, 0, 0); + break; + } + } + + return ret; +} + +int GetClosestLanguage(TCHAR *lang_name) +{ + int i; + + // Search the language by name + for (i = 0; i < languages.getCount(); i++) + { + if (lstrcmpi(languages[i]->language, lang_name) == 0) + { + return i; + } + } + + // Try searching by the prefix only + TCHAR lang[128]; + lstrcpyn(lang, lang_name, MAX_REGS(lang)); + + TCHAR *p = _tcschr(lang, _T('_')); + if (p != NULL) + *p = _T('\0'); + + // First check if there is a language that is only the prefix + for (i = 0; i < languages.getCount(); i++) + { + if (lstrcmpi(languages[i]->language, lang) == 0) + { + return i; + } + } + + // Now try any suffix + size_t len = lstrlen(lang); + for (i = 0; i < languages.getCount(); i++) + { + TCHAR *p = _tcschr(languages[i]->language, _T('_')); + if (p == NULL) + continue; + + int prefix_len = p - languages[i]->language; + if (prefix_len != len) + continue; + + if (_tcsnicmp(languages[i]->language, lang_name, len) == 0) + { + return i; + } + } + + return -1; +} + +void GetUserProtoLanguageSetting(Dialog *dlg, HANDLE hContact, char *group, char *setting, BOOL isProtocol = TRUE) +{ + DBVARIANT dbv = {0}; + dbv.type = DBVT_TCHAR; + + DBCONTACTGETSETTING cgs = {0}; + cgs.szModule = group; + cgs.szSetting = setting; + cgs.pValue = &dbv; + + INT_PTR rc; + + int caps = (isProtocol ? CallProtoService(group, PS_GETCAPS, PFLAGNUM_4, 0) : 0); + if (caps & PF4_INFOSETTINGSVC) + { + rc = CallProtoService(group, PS_GETINFOSETTING, (WPARAM) hContact, (LPARAM) &cgs); + } + else + { + rc = CallService(MS_DB_CONTACT_GETSETTING_STR_EX, (WPARAM)hContact, (LPARAM)&cgs); + if (rc == CALLSERVICE_NOTFOUND) + { + rc = CallService(MS_DB_CONTACT_GETSETTING_STR, (WPARAM)hContact, (LPARAM)&cgs); + } + } + + if (!rc && dbv.type == DBVT_TCHAR && dbv.ptszVal != NULL) + { + TCHAR *lang = dbv.ptszVal; + + for (int i = 0; i < languages.getCount(); i++) + { + Dictionary *dict = languages[i]; + if (lstrcmpi(dict->localized_name, lang) == 0 + || lstrcmpi(dict->english_name, lang) == 0 + || lstrcmpi(dict->language, lang) == 0) + { + lstrcpyn(dlg->lang_name, dict->language, MAX_REGS(dlg->lang_name)); + break; + } + } + } + + if (!rc) + DBFreeVariant(&dbv); +} + +void GetUserLanguageSetting(Dialog *dlg, char *setting) +{ + char *proto = (char *) CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) dlg->hContact, 0); + if (proto == NULL) + return; + + GetUserProtoLanguageSetting(dlg, dlg->hContact, proto, setting); + if (dlg->lang_name[0] != _T('\0')) + return; + + GetUserProtoLanguageSetting(dlg, dlg->hContact, "UserInfo", setting, FALSE); + if (dlg->lang_name[0] != _T('\0')) + return; + + // If not found and is inside meta, try to get from the meta + INT_PTR mc = CallService(MS_MC_GETPROTOCOLNAME, 0, 0); + if (mc != CALLSERVICE_NOTFOUND) + { + char* metacontacts_proto = (char *) mc; + if (metacontacts_proto != NULL) + { + mc = CallService(MS_MC_GETMETACONTACT, (WPARAM) dlg->hContact, 0); + if (mc != CALLSERVICE_NOTFOUND) + { + HANDLE hMetaContact = (HANDLE) mc; + if (hMetaContact != NULL) + { + GetUserProtoLanguageSetting(dlg, hMetaContact, metacontacts_proto, setting); + if (dlg->lang_name[0] != _T('\0')) + return; + + GetUserProtoLanguageSetting(dlg, hMetaContact, "UserInfo", setting, FALSE); + } + } + } + } +} + +void GetContactLanguage(Dialog *dlg) +{ + DBVARIANT dbv = {0}; + + dlg->lang_name[0] = _T('\0'); + + if (dlg->hContact == NULL) + { + if (!DBGetContactSettingTString(NULL, MODULE_NAME, dlg->name, &dbv)) + { + lstrcpyn(dlg->lang_name, dbv.ptszVal, MAX_REGS(dlg->lang_name)); + DBFreeVariant(&dbv); + } + } + else + { + if (!DBGetContactSettingTString(dlg->hContact, MODULE_NAME, "TalkLanguage", &dbv)) + { + lstrcpyn(dlg->lang_name, dbv.ptszVal, MAX_REGS(dlg->lang_name)); + DBFreeVariant(&dbv); + } + + if (dlg->lang_name[0] == _T('\0') && !DBGetContactSettingTString(dlg->hContact, "eSpeak", "TalkLanguage", &dbv)) + { + lstrcpyn(dlg->lang_name, dbv.ptszVal, MAX_REGS(dlg->lang_name)); + DBFreeVariant(&dbv); + } + + // Try from metacontact + if (dlg->lang_name[0] == _T('\0')) + { + INT_PTR mc = CallService(MS_MC_GETMETACONTACT, (WPARAM) dlg->hContact, 0); + if (mc != CALLSERVICE_NOTFOUND) + { + HANDLE hMetaContact = (HANDLE) mc; + if (hMetaContact != NULL) + { + if (!DBGetContactSettingTString(hMetaContact, MODULE_NAME, "TalkLanguage", &dbv)) + { + lstrcpyn(dlg->lang_name, dbv.ptszVal, MAX_REGS(dlg->lang_name)); + DBFreeVariant(&dbv); + } + + if (dlg->lang_name[0] == _T('\0') && !DBGetContactSettingTString(hMetaContact, "eSpeak", "TalkLanguage", &dbv)) + { + lstrcpyn(dlg->lang_name, dbv.ptszVal, MAX_REGS(dlg->lang_name)); + DBFreeVariant(&dbv); + } + } + } + } + + // Try to get from Language info + if (dlg->lang_name[0] == _T('\0')) + GetUserLanguageSetting(dlg, "Language"); + if (dlg->lang_name[0] == _T('\0')) + GetUserLanguageSetting(dlg, "Language1"); + if (dlg->lang_name[0] == _T('\0')) + GetUserLanguageSetting(dlg, "Language2"); + if (dlg->lang_name[0] == _T('\0')) + GetUserLanguageSetting(dlg, "Language3"); + + // Use default lang + if (dlg->lang_name[0] == _T('\0')) + lstrcpyn(dlg->lang_name, opts.default_language, MAX_REGS(dlg->lang_name)); + } + + int i = GetClosestLanguage(dlg->lang_name); + if (i < 0) + { + // Lost a dict? + lstrcpyn(dlg->lang_name, opts.default_language, MAX_REGS(dlg->lang_name)); + i = GetClosestLanguage(dlg->lang_name); + } + + if (i >= 0) + { + dlg->lang = languages[i]; + dlg->lang->load(); + } + else + { + dlg->lang = NULL; + } +} + +void ModifyIcon(Dialog *dlg) +{ + if (ServiceExists(MS_MSG_MODIFYICON)) + { + StatusIconData sid = {0}; + sid.cbSize = sizeof(sid); + sid.szModule = MODULE_NAME; + + for (int i = 0; i < languages.getCount(); i++) + { + sid.dwId = i; + + if (languages[i] == dlg->lang) + sid.flags = (dlg->enabled ? 0 : MBF_DISABLED); + else + sid.flags = MBF_HIDDEN; + + CallService(MS_MSG_MODIFYICON, (WPARAM) dlg->hContact, (LPARAM) &sid); + } + } +} + +INT_PTR AddContactTextBoxService(WPARAM wParam, LPARAM lParam) +{ + SPELLCHECKER_ITEM *sci = (SPELLCHECKER_ITEM *) wParam; + if (sci == NULL || sci->cbSize != sizeof(SPELLCHECKER_ITEM)) + return -1; + + return AddContactTextBox(sci->hContact, sci->hwnd, sci->window_name, FALSE, NULL); +} + + +void NotifyWrongSRMM() +{ + static BOOL notified = FALSE; + + if (notified) + return; + + MessageBox(NULL, + TranslateT("Your message window does not support SpellChecker Plugin.\nIf you use SRMM, tabSRMM or Scriver, please update them to the latest version,\notherwise ask the author of your message window plugin to add support for Spell Checker."), + TranslateT("Spell Checker"), MB_ICONERROR | MB_OK); + + notified = TRUE; +} + + +int AddContactTextBox(HANDLE hContact, HWND hwnd, char *name, BOOL srmm, HWND hwndOwner) +{ + if (languages.getCount() <= 0) + return 0; + + if (dialogs.find(hwnd) == dialogs.end()) + { + // Fill dialog data + Dialog *dlg = (Dialog *) malloc(sizeof(Dialog)); + ZeroMemory(dlg, sizeof(Dialog)); + + dlg->re = new RichEdit(hwnd); + if (!dlg->re->IsValid()) + { + delete dlg->re; + free(dlg); + + if (srmm) + NotifyWrongSRMM(); + + return 0; + } + + dlg->hContact = hContact; + dlg->hwnd = hwnd; + strncpy(dlg->name, name, sizeof(dlg->name)); + dlg->enabled = DBGetContactSettingByte(dlg->hContact, MODULE_NAME, dlg->name, 1); + dlg->srmm = srmm; + + GetContactLanguage(dlg); + + if (opts.auto_locale) + LoadDictFromKbdl(dlg); + + dlg->old_edit_proc = (WNDPROC) SetWindowLongPtr(dlg->hwnd, GWLP_WNDPROC, (LONG_PTR) EditProc); + dialogs[hwnd] = dlg; + + if (dlg->srmm && hwndOwner != NULL) + { + dlg->hwnd_owner = hwndOwner; + dlg->owner_old_edit_proc = (WNDPROC) SetWindowLongPtr(dlg->hwnd_owner, GWLP_WNDPROC, (LONG_PTR) OwnerProc); + dialogs[dlg->hwnd_owner] = dlg; + + ModifyIcon(dlg); + } + + if (dlg->lang != NULL) + dlg->lang->load(); + + SetTimer(hwnd, TIMER_ID, 1000, NULL); + } + + return 0; +} + +#define DESTROY_MENY(_m_) if (_m_ != NULL) { DestroyMenu(_m_); _m_ = NULL; } + +void FreePopupData(Dialog *dlg) +{ + DESTROY_MENY(dlg->hLanguageSubMenu) + DESTROY_MENY(dlg->hWrongWordsSubMenu) + + if (dlg->old_menu_proc != NULL) + SetWindowLongPtr(dlg->hwnd_menu_owner, GWLP_WNDPROC, (LONG_PTR) dlg->old_menu_proc); + dlg->old_menu_proc = NULL; + + if (dlg->hwnd_menu_owner != NULL) + menus.erase(dlg->hwnd_menu_owner); + dlg->hwnd_menu_owner = NULL; + + if (dlg->wrong_words != NULL) + { + for (unsigned i = 0; i < dlg->wrong_words->size(); i++) + { + FREE((*dlg->wrong_words)[i].word) + + DESTROY_MENY((*dlg->wrong_words)[i].hMeSubMenu) + DESTROY_MENY((*dlg->wrong_words)[i].hCorrectSubMenu) + DESTROY_MENY((*dlg->wrong_words)[i].hReplaceSubMenu) + + FreeSuggestions((*dlg->wrong_words)[i].suggestions); + } + + delete dlg->wrong_words; + dlg->wrong_words = NULL; + } +} + + +INT_PTR RemoveContactTextBoxService(WPARAM wParam, LPARAM lParam) +{ + HWND hwnd = (HWND) wParam; + if (hwnd == NULL) + return -1; + + return RemoveContactTextBox(hwnd); +} + + +int RemoveContactTextBox(HWND hwnd) +{ + DialogMapType::iterator dlgit = dialogs.find(hwnd); + if (dlgit != dialogs.end()) + { + Dialog *dlg = dlgit->second; + + KillTimer(hwnd, TIMER_ID); + + if (dlg->old_edit_proc != NULL) + SetWindowLongPtr(hwnd, GWLP_WNDPROC, (LONG_PTR) dlg->old_edit_proc); + dialogs.erase(hwnd); + + if (dlg->hwnd_owner != NULL) + { + if (dlg->owner_old_edit_proc != NULL) + SetWindowLongPtr(dlg->hwnd_owner, GWLP_WNDPROC, (LONG_PTR) dlg->owner_old_edit_proc); + dialogs.erase(dlg->hwnd_owner); + } + + delete dlg->re; + FreePopupData(dlg); + free(dlg); + } + + return 0; +} + + +// TODO Make this better +BOOL GetWordCharRange(Dialog *dlg, CHARRANGE &sel, TCHAR *text, size_t text_len, int &first_char) +{ + // Get line + int line = dlg->re->GetLineFromChar(sel.cpMin); + + // Get text + dlg->re->GetLine(line, text, text_len); + first_char = dlg->re->GetFirstCharOfLine(line); + + // Find the word + sel.cpMin--; + while (sel.cpMin >= first_char && (dlg->lang->isWordChar(text[sel.cpMin - first_char]) + || IsNumber(text[sel.cpMin - first_char]))) + sel.cpMin--; + sel.cpMin++; + + while (text[sel.cpMax - first_char] != _T('\0') && (dlg->lang->isWordChar(text[sel.cpMax - first_char]) + || IsNumber(text[sel.cpMax - first_char]))) + sel.cpMax++; + + // Has a word? + if (sel.cpMin >= sel.cpMax) + return FALSE; + + // See if it has only '-'s + BOOL has_valid_char = FALSE; + for (int i = sel.cpMin; i < sel.cpMax && !has_valid_char; i++) + has_valid_char = ( text[i - first_char] != _T('-')); + + return has_valid_char; +} + +TCHAR *GetWordUnderPoint(Dialog *dlg, POINT pt, CHARRANGE &sel) +{ + // Get text + if (dlg->re->GetTextLength() <= 0) + return NULL; + + // Get pos + sel.cpMin = sel.cpMax = dlg->re->GetCharFromPos(pt); + + // Get text + TCHAR text[1024]; + int first_char; + + if (!GetWordCharRange(dlg, sel, text, MAX_REGS(text), first_char)) + return NULL; + + // copy the word + text[sel.cpMax - first_char] = _T('\0'); + return _tcsdup(&text[sel.cpMin - first_char]); +} + + +void AppendSubmenu(HMENU hMenu, HMENU hSubMenu, TCHAR *name) +{ + MENUITEMINFO mii = {0}; + mii.cbSize = sizeof(MENUITEMINFO); + mii.fMask = MIIM_SUBMENU | MIIM_TYPE; + mii.fType = MFT_STRING; + mii.hSubMenu = hSubMenu; + mii.dwTypeData = name; + mii.cch = lstrlen(name); + int ret = InsertMenuItem(hMenu, 0, TRUE, &mii); + +} + +void AppendMenuItem(HMENU hMenu, int id, TCHAR *name, HICON hIcon, BOOL checked) +{ + ICONINFO iconInfo; + GetIconInfo(hIcon, & iconInfo); + + MENUITEMINFO mii = {0}; + mii.cbSize = sizeof(MENUITEMINFO); + mii.fMask = MIIM_CHECKMARKS | MIIM_TYPE | MIIM_STATE; + mii.fType = MFT_STRING; + mii.fState = (checked ? MFS_CHECKED : 0); + mii.wID = id; + mii.hbmpChecked = iconInfo.hbmColor; + mii.hbmpUnchecked = iconInfo.hbmColor; + mii.dwTypeData = name; + mii.cch = lstrlen(name); + int ret = InsertMenuItem(hMenu, 0, TRUE, &mii); +} + + + + +#define LANGUAGE_MENU_ID_BASE 10 +#define WORD_MENU_ID_BASE 100 +#define AUTOREPLACE_MENU_ID_BASE 50 + +void AddMenuForWord(Dialog *dlg, TCHAR *word, CHARRANGE &pos, HMENU hMenu, BOOL in_submenu, UINT base) +{ + if (dlg->wrong_words == NULL) + dlg->wrong_words = new vector(1); + else + dlg->wrong_words->resize(dlg->wrong_words->size() + 1); + + WrongWordPopupMenuData &data = (*dlg->wrong_words)[dlg->wrong_words->size() - 1]; + ZeroMemory(&data, sizeof(WrongWordPopupMenuData)); + + // Get suggestions + data.word = word; + data.pos = pos; + data.suggestions = dlg->lang->suggest(word); + + Suggestions &suggestions = data.suggestions; + + if (in_submenu) + { + data.hMeSubMenu = CreatePopupMenu(); + AppendSubmenu(hMenu, data.hMeSubMenu, word); + hMenu = data.hMeSubMenu; + } + + data.hReplaceSubMenu = CreatePopupMenu(); + + InsertMenu(data.hReplaceSubMenu, 0, MF_BYPOSITION, base + AUTOREPLACE_MENU_ID_BASE + suggestions.count, TranslateT("Other...")); + if (suggestions.count > 0) + { + InsertMenu(data.hReplaceSubMenu, 0, MF_BYPOSITION | MF_SEPARATOR, 0, 0); + for (int i = suggestions.count - 1; i >= 0; i--) + InsertMenu(data.hReplaceSubMenu, 0, MF_BYPOSITION, base + AUTOREPLACE_MENU_ID_BASE + i, suggestions.words[i]); + } + + AppendSubmenu(hMenu, data.hReplaceSubMenu, TranslateT("Always replace with")); + + InsertMenu(hMenu, 0, MF_BYPOSITION, base + suggestions.count + 1, TranslateT("Ignore all")); + InsertMenu(hMenu, 0, MF_BYPOSITION, base + suggestions.count, TranslateT("Add to dictionary")); + + if (suggestions.count > 0) + { + HMENU hSubMenu; + if (opts.cascade_corrections) + { + hSubMenu = data.hCorrectSubMenu = CreatePopupMenu(); + AppendSubmenu(hMenu, hSubMenu, TranslateT("Corrections")); + } + else + { + InsertMenu(hMenu, 0, MF_BYPOSITION | MF_SEPARATOR, 0, 0); + hSubMenu = hMenu; + } + + for (int i = suggestions.count - 1; i >= 0; i--) + InsertMenu(hSubMenu, 0, MF_BYPOSITION, base + i, suggestions.words[i]); + } + + if (!in_submenu && opts.show_wrong_word) + { + InsertMenu(hMenu, 0, MF_BYPOSITION | MF_SEPARATOR, 0, 0); + + TCHAR text[128]; + mir_sntprintf(text, MAX_REGS(text), TranslateT("Wrong word: %s"), word); + InsertMenu(hMenu, 0, MF_BYPOSITION, 0, text); + } +} + + +struct FoundWrongWordParam { + Dialog *dlg; + int count; +}; + +void FoundWrongWord(TCHAR *word, CHARRANGE pos, void *param) +{ + FoundWrongWordParam *p = (FoundWrongWordParam*) param; + + p->count ++; + + AddMenuForWord(p->dlg, _tcsdup(word), pos, p->dlg->hWrongWordsSubMenu, TRUE, WORD_MENU_ID_BASE * p->count); +} + +void AddItemsToMenu(Dialog *dlg, HMENU hMenu, POINT pt, HWND hwndOwner) +{ + FreePopupData(dlg); + if (opts.use_flags) + { + dlg->hwnd_menu_owner = hwndOwner; + menus[hwndOwner] = dlg; + } + + BOOL wrong_word = FALSE; + + // Make menu + if (GetMenuItemCount(hMenu) > 0) + InsertMenu(hMenu, 0, MF_BYPOSITION | MF_SEPARATOR, 0, 0); + + if (languages.getCount() > 0 && dlg->enabled) + { + dlg->hLanguageSubMenu = CreatePopupMenu(); + + if (dlg->hwnd_menu_owner != NULL) + dlg->old_menu_proc = (WNDPROC) SetWindowLongPtr(dlg->hwnd_menu_owner, GWLP_WNDPROC, (LONG_PTR) MenuWndProc); + + // First add languages + for (int i = 0; i < languages.getCount(); i++) + { + AppendMenu(dlg->hLanguageSubMenu, MF_STRING | (languages[i] == dlg->lang ? MF_CHECKED : 0), + LANGUAGE_MENU_ID_BASE + i, languages[i]->full_name); + } + + AppendSubmenu(hMenu, dlg->hLanguageSubMenu, TranslateT("Language")); + } + + InsertMenu(hMenu, 0, MF_BYPOSITION, 1, TranslateT("Enable spell checking")); + CheckMenuItem(hMenu, 1, MF_BYCOMMAND | (dlg->enabled ? MF_CHECKED : MF_UNCHECKED)); + + // Get text + if (dlg->lang != NULL && dlg->enabled) + { + if (opts.show_all_corrections) + { + dlg->hWrongWordsSubMenu = CreatePopupMenu(); + + FoundWrongWordParam p = { dlg, 0 }; + CheckText(dlg, TRUE, FoundWrongWord, &p); + + if (p.count > 0) + AppendSubmenu(hMenu, dlg->hWrongWordsSubMenu, TranslateT("Wrong words")); + } + else + { + CHARRANGE sel; + TCHAR *word = GetWordUnderPoint(dlg, pt, sel); + if (word != NULL && !dlg->lang->spell(word)) + { + InsertMenu(hMenu, 0, MF_BYPOSITION | MF_SEPARATOR, 0, 0); + + AddMenuForWord(dlg, word, sel, hMenu, FALSE, WORD_MENU_ID_BASE); + } + } + } +} + + +static void AddWordToDictCallback(BOOL canceled, Dictionary *dict, + const TCHAR *find, const TCHAR *replace, BOOL useVariables, + const TCHAR *original_find, void *param) +{ + if (canceled) + return; + + dict->autoReplace->add(find, replace, useVariables); + + HWND hwndParent = (HWND) param; + if (hwndParent != NULL) + PostMessage(hwndParent, WMU_DICT_CHANGED, 0, 0); +} + + +BOOL HandleMenuSelection(Dialog *dlg, POINT pt, unsigned selection) +{ + BOOL ret = FALSE; + + if (selection == 1) + { + ToggleEnabled(dlg); + + ret = TRUE; + } + else if (selection >= LANGUAGE_MENU_ID_BASE && selection < LANGUAGE_MENU_ID_BASE + (unsigned) languages.getCount()) + { + SetNoUnderline(dlg); + + if (dlg->hContact == NULL) + DBWriteContactSettingTString(NULL, MODULE_NAME, dlg->name, + languages[selection - LANGUAGE_MENU_ID_BASE]->language); + else + DBWriteContactSettingTString(dlg->hContact, MODULE_NAME, "TalkLanguage", + languages[selection - LANGUAGE_MENU_ID_BASE]->language); + + GetContactLanguage(dlg); + + if (dlg->srmm) + ModifyIcon(dlg); + + ret = TRUE; + } + else if (selection > 0 && dlg->wrong_words != NULL + && selection >= WORD_MENU_ID_BASE + && selection < (dlg->wrong_words->size() + 1) * WORD_MENU_ID_BASE) + { + int pos = selection / WORD_MENU_ID_BASE; + selection -= pos * WORD_MENU_ID_BASE; + pos--; // 0 based + WrongWordPopupMenuData &data = (*dlg->wrong_words)[pos]; + + if (selection < data.suggestions.count) + { + // TODO Assert that text hasn't changed + ReplaceWord(dlg, data.pos, data.suggestions.words[selection]); + + ret = TRUE; + } + else if (selection == data.suggestions.count) + { + dlg->lang->addWord(data.word); + + ret = TRUE; + } + else if (selection == data.suggestions.count + 1) + { + dlg->lang->ignoreWord(data.word); + + ret = TRUE; + } + else if (selection >= AUTOREPLACE_MENU_ID_BASE + && selection < AUTOREPLACE_MENU_ID_BASE + data.suggestions.count + 1) + { + selection -= AUTOREPLACE_MENU_ID_BASE; + + if (selection == data.suggestions.count) + { + ShowAutoReplaceDialog(dlg->hwnd_owner != NULL ? dlg->hwnd_owner : dlg->hwnd, FALSE, + dlg->lang, data.word, NULL, FALSE, + TRUE, &AddWordToDictCallback, dlg->hwnd); + } + else + { + // TODO Assert that text hasn't changed + ReplaceWord(dlg, data.pos, data.suggestions.words[selection]); + dlg->lang->autoReplace->add(data.word, data.suggestions.words[selection]); + ret = TRUE; + } + } + } + + if (ret) + { + KillTimer(dlg->hwnd, TIMER_ID); + SetTimer(dlg->hwnd, TIMER_ID, 100, NULL); + + dlg->changed = TRUE; + } + + FreePopupData(dlg); + + return ret; +} + + +int MsgWindowPopup(WPARAM wParam, LPARAM lParam) +{ + MessageWindowPopupData *mwpd = (MessageWindowPopupData *) lParam; + if (mwpd == NULL || mwpd->cbSize < sizeof(MessageWindowPopupData) + || mwpd->uFlags != MSG_WINDOWPOPUP_INPUT) + return 0; + + DialogMapType::iterator dlgit = dialogs.find(mwpd->hwnd); + if (dlgit == dialogs.end()) + return -1; + + Dialog *dlg = dlgit->second; + + POINT pt = mwpd->pt; + ScreenToClient(dlg->hwnd, &pt); + + if (mwpd->uType == MSG_WINDOWPOPUP_SHOWING) + { + AddItemsToMenu(dlg, mwpd->hMenu, pt, dlg->hwnd_owner); + } + else if (mwpd->uType == MSG_WINDOWPOPUP_SELECTED) + { + HandleMenuSelection(dlg, pt, mwpd->selection); + } + return 0; +} + + +INT_PTR ShowPopupMenuService(WPARAM wParam, LPARAM lParam) +{ + SPELLCHECKER_POPUPMENU *scp = (SPELLCHECKER_POPUPMENU *) wParam; + if (scp == NULL || scp->cbSize != sizeof(SPELLCHECKER_POPUPMENU)) + return -1; + + return ShowPopupMenu(scp->hwnd, scp->hMenu, scp->pt, scp->hwndOwner == NULL ? scp->hwnd : scp->hwndOwner); +} + + +int ShowPopupMenu(HWND hwnd, HMENU hMenu, POINT pt, HWND hwndOwner) +{ + DialogMapType::iterator dlgit = dialogs.find(hwnd); + if (dlgit == dialogs.end()) + return -1; + + Dialog *dlg = dlgit->second; + + if (pt.x == 0xFFFF && pt.y == 0xFFFF) + { + CHARRANGE sel; + SendMessage(hwnd, EM_EXGETSEL, 0, (LPARAM) &sel); + + // Get current cursor pos + SendMessage(hwnd, EM_POSFROMCHAR, (WPARAM)&pt, (LPARAM) sel.cpMax); + } + else + { + ScreenToClient(hwnd, &pt); + } + + BOOL create_menu = (hMenu == NULL); + if (create_menu) + hMenu = CreatePopupMenu(); + + // Make menu + AddItemsToMenu(dlg, hMenu, pt, hwndOwner); + + // Show menu + POINT client = pt; + ClientToScreen(hwnd, &pt); + int selection = TrackPopupMenu(hMenu, TPM_RETURNCMD, pt.x, pt.y, 0, hwndOwner, NULL); + + // Do action + if (HandleMenuSelection(dlg, client, selection)) + selection = 0; + + if (create_menu) + DestroyMenu(hMenu); + + return selection; +} + + +int MsgWindowEvent(WPARAM wParam, LPARAM lParam) +{ + MessageWindowEventData *event = (MessageWindowEventData *)lParam; + if (event == NULL) + return 0; + + if (event->cbSize < sizeof(MessageWindowEventData)) + return 0; + + if (event->uType == MSG_WINDOW_EVT_OPEN) + { + AddContactTextBox(event->hContact, event->hwndInput, "DefaultSRMM", TRUE, event->hwndWindow); + } + else if (event->uType == MSG_WINDOW_EVT_CLOSING) + { + RemoveContactTextBox(event->hwndInput); + } + + return 0; +} + + +int IconPressed(WPARAM wParam, LPARAM lParam) +{ + StatusIconClickData *sicd = (StatusIconClickData *) lParam; + if (sicd == NULL || strcmp(sicd->szModule, MODULE_NAME) != 0) + return 0; + + HANDLE hContact = (HANDLE) wParam; + if (hContact == NULL) + return 0; + + // Find the dialog + HWND hwnd = NULL; + Dialog *dlg; + for(DialogMapType::iterator it = dialogs.begin(); it != dialogs.end(); it++) + { + dlg = it->second; + if (dlg->srmm && dlg->hContact == hContact) + { + hwnd = it->first; + break; + } + } + + if (hwnd == NULL) + { + NotifyWrongSRMM(); + return 0; + } + + if ((sicd->flags & MBCF_RIGHTBUTTON) == 0) + { + FreePopupData(dlg); + + // Show the menu + HMENU hMenu = CreatePopupMenu(); + + if (languages.getCount() > 0) + { + if (opts.use_flags) + { + menus[dlg->hwnd] = dlg; + dlg->hwnd_menu_owner = dlg->hwnd; + dlg->old_menu_proc = (WNDPROC) SetWindowLongPtr(dlg->hwnd_menu_owner, GWLP_WNDPROC, (LONG_PTR) MenuWndProc); + } + + // First add languages + for (int i = 0; i < languages.getCount(); i++) + { + AppendMenu(hMenu, MF_STRING | (languages[i] == dlg->lang ? MF_CHECKED : 0), + LANGUAGE_MENU_ID_BASE + i, languages[i]->full_name); + } + + InsertMenu(hMenu, 0, MF_BYPOSITION | MF_SEPARATOR, 0, 0); + } + + InsertMenu(hMenu, 0, MF_BYPOSITION, 1, TranslateT("Enable spell checking")); + CheckMenuItem(hMenu, 1, MF_BYCOMMAND | (dlg->enabled ? MF_CHECKED : MF_UNCHECKED)); + + // Show menu + int selection = TrackPopupMenu(hMenu, TPM_RETURNCMD, sicd->clickLocation.x, sicd->clickLocation.y, 0, + dlg->hwnd, NULL); + + HandleMenuSelection(dlg, sicd->clickLocation, selection); + + DestroyMenu(hMenu); + } + else + { + // Enable / disable + HandleMenuSelection(dlg, sicd->clickLocation, 1); + } + + return 0; +} + + +LRESULT CALLBACK MenuWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) +{ + DialogMapType::iterator dlgit = menus.find(hwnd); + if (dlgit == menus.end()) + return -1; + + Dialog *dlg = dlgit->second; + + switch (msg) + { + case WM_INITMENUPOPUP: + { + HMENU hMenu = (HMENU) wParam; + + int count = GetMenuItemCount(hMenu); + for(int i = 0; i < count; i++) + { + unsigned id = GetMenuItemID(hMenu, i); + if (id < LANGUAGE_MENU_ID_BASE || id >= LANGUAGE_MENU_ID_BASE + (unsigned) languages.getCount()) + continue; + + MENUITEMINFO mii = {0}; + mii.cbSize = sizeof(MENUITEMINFO); + mii.fMask = MIIM_STATE; + GetMenuItemInfo(hMenu, id, FALSE, &mii); + + // Make ownerdraw + ModifyMenu(hMenu, id, mii.fState | MF_BYCOMMAND | MF_OWNERDRAW, id, NULL); + } + + break; + } + case WM_DRAWITEM: + { + LPDRAWITEMSTRUCT lpdis = (LPDRAWITEMSTRUCT)lParam; + if (lpdis->CtlType != ODT_MENU || lpdis->itemID < LANGUAGE_MENU_ID_BASE || lpdis->itemID >= LANGUAGE_MENU_ID_BASE + (unsigned) languages.getCount()) + break; + + int pos = lpdis->itemID - LANGUAGE_MENU_ID_BASE; + + Dictionary *dict = languages[pos]; + + COLORREF clrfore = SetTextColor(lpdis->hDC, + GetSysColor(lpdis->itemState & ODS_SELECTED ? COLOR_HIGHLIGHTTEXT : COLOR_MENUTEXT)); + COLORREF clrback = SetBkColor(lpdis->hDC, + GetSysColor(lpdis->itemState & ODS_SELECTED ? COLOR_HIGHLIGHT : COLOR_MENU)); + + FillRect(lpdis->hDC, &lpdis->rcItem, GetSysColorBrush(lpdis->itemState & ODS_SELECTED ? COLOR_HIGHLIGHT : COLOR_MENU)); + + RECT rc = lpdis->rcItem; + rc.left += 2; + + // Checked? + rc.right = rc.left + bmpChecked.bmWidth; + + if (lpdis->itemState & ODS_CHECKED) + { + rc.top = (lpdis->rcItem.bottom + lpdis->rcItem.top - bmpChecked.bmHeight) / 2; + rc.bottom = rc.top + bmpChecked.bmHeight; + + HDC hdcTemp = CreateCompatibleDC(lpdis->hDC); + HBITMAP oldBmp = (HBITMAP) SelectObject(hdcTemp, hCheckedBmp); + + BitBlt(lpdis->hDC, rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top, hdcTemp, 0, 0, SRCCOPY); + + SelectObject(hdcTemp, oldBmp); + DeleteDC(hdcTemp); + } + + rc.left += bmpChecked.bmWidth + 2; + + // Draw icon + HICON hFlag = IcoLib_LoadIcon(dict); + + rc.top = (lpdis->rcItem.bottom + lpdis->rcItem.top - ICON_SIZE) / 2; + DrawIconEx(lpdis->hDC, rc.left, rc.top, hFlag, 16, 16, 0, NULL, DI_NORMAL); + + Skin_ReleaseIcon(hFlag); + + rc.left += ICON_SIZE + 4; + + // Draw text + RECT rc_text = { 0, 0, 0xFFFF, 0xFFFF }; + DrawText(lpdis->hDC, dict->full_name, lstrlen(dict->full_name), &rc_text, DT_END_ELLIPSIS | DT_NOPREFIX | DT_SINGLELINE | DT_LEFT | DT_TOP | DT_CALCRECT); + + rc.right = lpdis->rcItem.right - 2; + rc.top = (lpdis->rcItem.bottom + lpdis->rcItem.top - (rc_text.bottom - rc_text.top)) / 2; + rc.bottom = rc.top + rc_text.bottom - rc_text.top; + DrawText(lpdis->hDC, dict->full_name, lstrlen(dict->full_name), &rc, DT_END_ELLIPSIS | DT_NOPREFIX | DT_LEFT | DT_TOP | DT_SINGLELINE); + + // Restore old colors + SetTextColor(lpdis->hDC, clrfore); + SetBkColor(lpdis->hDC, clrback); + + return TRUE; + } + + case WM_MEASUREITEM: + { + LPMEASUREITEMSTRUCT lpmis = (LPMEASUREITEMSTRUCT)lParam; + if (lpmis->CtlType != ODT_MENU || lpmis->itemID < LANGUAGE_MENU_ID_BASE || lpmis->itemID >= LANGUAGE_MENU_ID_BASE + (unsigned) languages.getCount()) + break; + + int pos = lpmis->itemID - LANGUAGE_MENU_ID_BASE; + + Dictionary *dict = languages[pos]; + + HDC hdc = GetDC(hwnd); + + NONCLIENTMETRICS info; + ZeroMemory(&info, sizeof(info)); + info.cbSize = sizeof(info); + SystemParametersInfo(SPI_GETNONCLIENTMETRICS, sizeof(info), &info, 0); + HFONT hFont = CreateFontIndirect(&info.lfMenuFont); + HFONT hFontOld = (HFONT) SelectObject(hdc, hFont); + + RECT rc = { 0, 0, 0xFFFF, 0xFFFF }; + + DrawText(hdc, dict->full_name, lstrlen(dict->full_name), &rc, DT_NOPREFIX | DT_SINGLELINE | DT_LEFT | DT_TOP | DT_CALCRECT); + + lpmis->itemHeight = max(ICON_SIZE, max(bmpChecked.bmHeight, rc.bottom)); + lpmis->itemWidth = 2 + bmpChecked.bmWidth + 2 + ICON_SIZE + 4 + rc.right + 2; + + SelectObject(hdc, hFontOld); + DeleteObject(hFont); + ReleaseDC(hwnd, hdc); + + return TRUE; + } + } + + return CallWindowProc(dlg->old_menu_proc, hwnd, msg, wParam, lParam); +} + +TCHAR *lstrtrim(TCHAR *str) +{ + int len = lstrlen(str); + + int i; + for(i = len - 1; i >= 0 && (str[i] == ' ' || str[i] == '\t'); --i) ; + if (i < len - 1) + { + ++i; + str[i] = _T('\0'); + len = i; + } + + for(i = 0; i < len && (str[i] == ' ' || str[i] == '\t'); ++i) ; + if (i > 0) + memmove(str, &str[i], (len - i + 1) * sizeof(TCHAR)); + + return str; +} + +BOOL lstreq(TCHAR *a, TCHAR *b, size_t len) +{ + + a = CharLower(_tcsdup(a)); + b = CharLower(_tcsdup(b)); + BOOL ret; + if (len >= 0) + ret = !_tcsncmp(a, b, len); + else + ret = !_tcscmp(a, b); + free(a); + free(b); + return ret; + +} + + +BOOL CreatePath(const TCHAR *path) +{ + TCHAR folder[1024]; + lstrcpyn(folder, path, MAX_REGS(folder)); + + TCHAR *p = folder; + if (p[0] && p[1] && p[1] == _T(':') && p[2] == _T('\\')) p += 3; // skip drive letter + + SetLastError(ERROR_SUCCESS); + while(p = _tcschr(p, '\\')) + { + *p = _T('\0'); + CreateDirectory(folder, 0); + *p = _T('\\'); + p++; + } + CreateDirectory(folder, 0); + + DWORD lerr = GetLastError(); + return (lerr == ERROR_SUCCESS || lerr == ERROR_ALREADY_EXISTS); +} diff --git a/plugins/Utils/mir_icons.h b/plugins/Utils/mir_icons.h index 7e88d5f61c..397e53bc93 100644 --- a/plugins/Utils/mir_icons.h +++ b/plugins/Utils/mir_icons.h @@ -21,8 +21,6 @@ Boston, MA 02111-1307, USA. #ifndef __MIR_ICONS_H__ # define __MIR_ICONS_H__ -#define _CRT_SECURE_NO_WARNINGS - HANDLE IcoLib_Register(char *name, char *section, char *description, int id); HICON IcoLib_LoadIcon(const char *iconName, BOOL copy = FALSE); diff --git a/plugins/Utils/mir_options.cpp b/plugins/Utils/mir_options.cpp index 1096f44276..24cd744907 100644 --- a/plugins/Utils/mir_options.cpp +++ b/plugins/Utils/mir_options.cpp @@ -17,8 +17,6 @@ not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#define _CRT_SECURE_NO_WARNINGS - #include #include #include -- cgit v1.2.3