diff options
author | dsinclair <dsinclair@chromium.org> | 2016-07-18 13:14:49 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-07-18 13:14:49 -0700 |
commit | 34965459f4f53a77f6c925292304eface57d12c6 (patch) | |
tree | 788cb62af316f8b5c5d520583eaa0313dd48144e /xfa/fgas/crt/fgas_codepage.cpp | |
parent | aae4566ee8b2eaffb182861047c466ed1ec04902 (diff) | |
download | pdfium-34965459f4f53a77f6c925292304eface57d12c6.tar.xz |
Cleanup fgas/crt.
This CL removes unused methods and default parameters from the fgas/crt code.
Review-Url: https://codereview.chromium.org/2162503003
Diffstat (limited to 'xfa/fgas/crt/fgas_codepage.cpp')
-rw-r--r-- | xfa/fgas/crt/fgas_codepage.cpp | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/xfa/fgas/crt/fgas_codepage.cpp b/xfa/fgas/crt/fgas_codepage.cpp index 834056eddd..57f3e1e322 100644 --- a/xfa/fgas/crt/fgas_codepage.cpp +++ b/xfa/fgas/crt/fgas_codepage.cpp @@ -35,16 +35,6 @@ const FX_CHARSET_MAP g_FXCharset2CodePageTable[] = { {255, 850}, }; -const FX_CHARSET_MAP g_FXCodepage2CharsetTable[] = { - {1, 0}, {2, 42}, {254, 437}, {255, 850}, {222, 874}, - {128, 932}, {134, 936}, {129, 949}, {136, 950}, {238, 1250}, - {204, 1251}, {0, 1252}, {161, 1253}, {162, 1254}, {177, 1255}, - {178, 1256}, {186, 1257}, {163, 1258}, {130, 1361}, {77, 10000}, - {78, 10001}, {79, 10003}, {80, 10008}, {81, 10002}, {83, 10005}, - {84, 10004}, {85, 10006}, {86, 10081}, {87, 10021}, {88, 10029}, - {89, 10007}, -}; - const FX_LANG2CPMAP g_FXLang2CodepageTable[] = { {FX_LANG_Arabic_SaudiArabia, FX_CODEPAGE_MSWin_Arabic}, {FX_LANG_Bulgarian_Bulgaria, FX_CODEPAGE_MSWin_Cyrillic}, @@ -317,24 +307,6 @@ uint16_t FX_GetCodePageFromCharset(uint8_t charset) { return 0xFFFF; } -uint16_t FX_GetCharsetFromCodePage(uint16_t codepage) { - int32_t iEnd = sizeof(g_FXCodepage2CharsetTable) / sizeof(FX_CHARSET_MAP) - 1; - ASSERT(iEnd >= 0); - int32_t iStart = 0, iMid; - do { - iMid = (iStart + iEnd) / 2; - const FX_CHARSET_MAP& cp = g_FXCodepage2CharsetTable[iMid]; - if (codepage == cp.codepage) { - return cp.charset; - } else if (codepage < cp.codepage) { - iEnd = iMid - 1; - } else { - iStart = iMid + 1; - } - } while (iStart <= iEnd); - return 0xFFFF; -} - uint16_t FX_GetDefCodePageByLanguage(uint16_t wLanguage) { int32_t iEnd = sizeof(g_FXLang2CodepageTable) / sizeof(FX_LANG2CPMAP) - 1; ASSERT(iEnd >= 0); @@ -403,18 +375,6 @@ void FX_UTF16ToWChar(void* pBuffer, int32_t iLength) { } } -void FX_WCharToUTF16(void* pBuffer, int32_t iLength) { - ASSERT(pBuffer && iLength > 0); - if (sizeof(FX_WCHAR) == 2) { - return; - } - const FX_WCHAR* pSrc = (const FX_WCHAR*)pBuffer; - uint16_t* pDst = (uint16_t*)pBuffer; - while (--iLength >= 0) { - *pDst++ = (uint16_t)*pSrc++; - } -} - int32_t FX_DecodeString(uint16_t wCodePage, const FX_CHAR* pSrc, int32_t* pSrcLen, |