summaryrefslogtreecommitdiff
path: root/fpdfsdk
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk')
-rw-r--r--fpdfsdk/src/fsdk_baseannot.cpp18
-rw-r--r--fpdfsdk/src/javascript/PublicMethods.cpp2
-rw-r--r--fpdfsdk/src/javascript/util.cpp4
3 files changed, 12 insertions, 12 deletions
diff --git a/fpdfsdk/src/fsdk_baseannot.cpp b/fpdfsdk/src/fsdk_baseannot.cpp
index ebf56ad293..c6731e6f56 100644
--- a/fpdfsdk/src/fsdk_baseannot.cpp
+++ b/fpdfsdk/src/fsdk_baseannot.cpp
@@ -221,7 +221,7 @@ CPDFSDK_DateTime& CPDFSDK_DateTime::FromPDFDateTimeString(
FX_CHAR ch;
while (i < strLength) {
ch = dtStr[i];
- if (std::isdigit(ch))
+ if (ch >= '0' && ch <= '9')
break;
i++;
}
@@ -234,7 +234,7 @@ CPDFSDK_DateTime& CPDFSDK_DateTime::FromPDFDateTimeString(
ch = dtStr[i];
k = k * 10 + ch - '0';
j++;
- if (!std::isdigit(ch))
+ if (ch < '0' || ch > '9')
break;
i++;
}
@@ -248,7 +248,7 @@ CPDFSDK_DateTime& CPDFSDK_DateTime::FromPDFDateTimeString(
ch = dtStr[i];
k = k * 10 + ch - '0';
j++;
- if (!std::isdigit(ch))
+ if (ch < '0' || ch > '9')
break;
i++;
}
@@ -262,7 +262,7 @@ CPDFSDK_DateTime& CPDFSDK_DateTime::FromPDFDateTimeString(
ch = dtStr[i];
k = k * 10 + ch - '0';
j++;
- if (!std::isdigit(ch))
+ if (ch < '0' || ch > '9')
break;
i++;
}
@@ -276,7 +276,7 @@ CPDFSDK_DateTime& CPDFSDK_DateTime::FromPDFDateTimeString(
ch = dtStr[i];
k = k * 10 + ch - '0';
j++;
- if (!std::isdigit(ch))
+ if (ch < '0' || ch > '9')
break;
i++;
}
@@ -290,7 +290,7 @@ CPDFSDK_DateTime& CPDFSDK_DateTime::FromPDFDateTimeString(
ch = dtStr[i];
k = k * 10 + ch - '0';
j++;
- if (!std::isdigit(ch))
+ if (ch < '0' || ch > '9')
break;
i++;
}
@@ -304,7 +304,7 @@ CPDFSDK_DateTime& CPDFSDK_DateTime::FromPDFDateTimeString(
ch = dtStr[i];
k = k * 10 + ch - '0';
j++;
- if (!std::isdigit(ch))
+ if (ch < '0' || ch > '9')
break;
i++;
}
@@ -325,7 +325,7 @@ CPDFSDK_DateTime& CPDFSDK_DateTime::FromPDFDateTimeString(
ch = dtStr[i];
k = k * 10 + ch - '0';
j++;
- if (!std::isdigit(ch))
+ if (ch < '0' || ch > '9')
break;
i++;
}
@@ -342,7 +342,7 @@ CPDFSDK_DateTime& CPDFSDK_DateTime::FromPDFDateTimeString(
ch = dtStr[i];
k = k * 10 + ch - '0';
j++;
- if (!std::isdigit(ch))
+ if (ch < '0' || ch > '9')
break;
i++;
}
diff --git a/fpdfsdk/src/javascript/PublicMethods.cpp b/fpdfsdk/src/javascript/PublicMethods.cpp
index 13239aeb1d..e898214cd8 100644
--- a/fpdfsdk/src/javascript/PublicMethods.cpp
+++ b/fpdfsdk/src/javascript/PublicMethods.cpp
@@ -116,7 +116,7 @@ FX_BOOL CJS_PublicMethods::IsDigit(wchar_t ch) {
}
FX_BOOL CJS_PublicMethods::IsDigit(char ch) {
- return std::isdigit(ch);
+ return (ch >= '0' && ch <= '9');
}
FX_BOOL CJS_PublicMethods::IsAlphabetic(wchar_t ch) {
diff --git a/fpdfsdk/src/javascript/util.cpp b/fpdfsdk/src/javascript/util.cpp
index cf10bbd7b4..14e15c1b6f 100644
--- a/fpdfsdk/src/javascript/util.cpp
+++ b/fpdfsdk/src/javascript/util.cpp
@@ -425,7 +425,7 @@ void util::printx(const std::string& cFormat,
break;
case 'X': {
while (itSource < iSize) {
- if (std::isdigit(cSource[itSource]) ||
+ if ((cSource[itSource] >= '0' && cSource[itSource] <= '9') ||
(cSource[itSource] >= 'a' && cSource[itSource] <= 'z') ||
(cSource[itSource] >= 'A' && cSource[itSource] <= 'Z')) {
cPurpose += cSource[itSource];
@@ -450,7 +450,7 @@ void util::printx(const std::string& cFormat,
} break;
case '9': {
while (itSource < iSize) {
- if (std::isdigit(cSource[itSource])) {
+ if (cSource[itSource] >= '0' && cSource[itSource] <= '9') {
cPurpose += cSource[itSource];
itSource++;
break;