summaryrefslogtreecommitdiff
path: root/core/fxcrt/fx_system.cpp
diff options
context:
space:
mode:
authorRyan Harrison <rharrison@chromium.org>2018-03-09 17:46:50 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-03-09 17:46:50 +0000
commit69da36c5f841e8c6e5ded6c704d9ef58c57d532a (patch)
tree42f50adb5d062f3971f8c6a4f899e737f5462c6c /core/fxcrt/fx_system.cpp
parent3baef5c6daf58cec2df193714b5727802d0bd42e (diff)
downloadpdfium-69da36c5f841e8c6e5ded6c704d9ef58c57d532a.tar.xz
Explicitly mark helper methods that only operate on ASCII ranges
A number of our character helper methods take in wide character types, but only do tests/operations on the ASCII range of characters. As a very quick first pass I am renaming all of the foot-gun methods to explictly call out this behaviour, while I do a bigger cleanup/refactor. BUG=pdfium:1035 Change-Id: Ia035dfa1cb6812fa6d45155c4565475032c4c165 Reviewed-on: https://pdfium-review.googlesource.com/28330 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fxcrt/fx_system.cpp')
-rw-r--r--core/fxcrt/fx_system.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/core/fxcrt/fx_system.cpp b/core/fxcrt/fx_system.cpp
index a5ceec5be1..532e83b949 100644
--- a/core/fxcrt/fx_system.cpp
+++ b/core/fxcrt/fx_system.cpp
@@ -118,7 +118,7 @@ char* FXSYS_strlwr(char* str) {
}
char* s = str;
while (*str) {
- *str = FXSYS_tolower(*str);
+ *str = FXSYS_toASCIIlower(*str);
str++;
}
return s;
@@ -129,7 +129,7 @@ char* FXSYS_strupr(char* str) {
}
char* s = str;
while (*str) {
- *str = FXSYS_toupper(*str);
+ *str = FXSYS_toASCIIupper(*str);
str++;
}
return s;
@@ -140,7 +140,7 @@ wchar_t* FXSYS_wcslwr(wchar_t* str) {
}
wchar_t* s = str;
while (*str) {
- *str = FXSYS_tolower(*str);
+ *str = FXSYS_toASCIIlower(*str);
str++;
}
return s;
@@ -151,7 +151,7 @@ wchar_t* FXSYS_wcsupr(wchar_t* str) {
}
wchar_t* s = str;
while (*str) {
- *str = FXSYS_toupper(*str);
+ *str = FXSYS_toASCIIupper(*str);
str++;
}
return s;
@@ -161,8 +161,8 @@ int FXSYS_stricmp(const char* dst, const char* src) {
int f;
int l;
do {
- f = FXSYS_toupper(*dst);
- l = FXSYS_toupper(*src);
+ f = FXSYS_toASCIIupper(*dst);
+ l = FXSYS_toASCIIupper(*src);
++dst;
++src;
} while (f && f == l);
@@ -173,8 +173,8 @@ int FXSYS_wcsicmp(const wchar_t* dst, const wchar_t* src) {
wchar_t f;
wchar_t l;
do {
- f = FXSYS_toupper(*dst);
- l = FXSYS_toupper(*src);
+ f = FXSYS_toASCIIupper(*dst);
+ l = FXSYS_toASCIIupper(*src);
++dst;
++src;
} while (f && f == l);