summaryrefslogtreecommitdiff
path: root/fxjs
diff options
context:
space:
mode:
authorRyan Harrison <rharrison@chromium.org>2018-03-12 15:44:36 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-03-12 15:44:36 +0000
commit735eda96cf24349d10b160c8f5bd363b73d8aba1 (patch)
treef5ed61b45536165d9955236c8a30f89b87233e8e /fxjs
parent15c0fccfeff5bf389b494a828c89adb3207c73d6 (diff)
downloadpdfium-735eda96cf24349d10b160c8f5bd363b73d8aba1.tar.xz
Remove all usages of FXSYS_iswASCIIalpha
Instances are either replaced with FXSYS_iswalpha, which calls out to the ICU library to do the proper Unicode operations, or have been converted to a isascii && isalpha pair, if ASCII alpha is actually what was wanted. BUG=pdfium:1035 Change-Id: I971ff639ee1ff818ad08793a1900a8bcbb0a3e04 Reviewed-on: https://pdfium-review.googlesource.com/28450 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'fxjs')
-rw-r--r--fxjs/cjs_publicmethods.cpp2
-rw-r--r--fxjs/cjs_util.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/fxjs/cjs_publicmethods.cpp b/fxjs/cjs_publicmethods.cpp
index 81a84d286b..ea4ea713d8 100644
--- a/fxjs/cjs_publicmethods.cpp
+++ b/fxjs/cjs_publicmethods.cpp
@@ -283,7 +283,7 @@ bool CJS_PublicMethods::MaskSatisfied(wchar_t c_Change, wchar_t c_Mask) {
case L'9':
return !!std::iswdigit(c_Change);
case L'A':
- return FXSYS_iswASCIIalpha(c_Change);
+ return isascii(c_Change) && isalpha(c_Change);
case L'O':
return isascii(c_Change) && isalnum(c_Change);
case L'X':
diff --git a/fxjs/cjs_util.cpp b/fxjs/cjs_util.cpp
index d73c238488..25d4590259 100644
--- a/fxjs/cjs_util.cpp
+++ b/fxjs/cjs_util.cpp
@@ -322,7 +322,7 @@ WideString CJS_Util::printx(const WideString& wsFormat,
} break;
case 'A': {
if (iSourceIdx < wsSource.GetLength()) {
- if (FXSYS_iswASCIIalpha(wsSource[iSourceIdx])) {
+ if (isascii(wsSource[iSourceIdx]) && isalpha(wsSource[iSourceIdx])) {
wsResult += TranslateCase(wsSource[iSourceIdx], eCaseMode);
++iFormatIdx;
}