summaryrefslogtreecommitdiff
path: root/xfa/src/fxfa/src/fm2js/xfa_lexer.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-06-09 13:24:12 -0700
committerTom Sepez <tsepez@chromium.org>2015-06-09 13:24:12 -0700
commitbfa9a824a20f37c2dd7111012b46c929cf2ed8a0 (patch)
tree4cfbe682869d89900f33751c37f6a84865beeb0a /xfa/src/fxfa/src/fm2js/xfa_lexer.cpp
parentb116136da234afcad018bb44a3ccb64b9ad2a554 (diff)
downloadpdfium-bfa9a824a20f37c2dd7111012b46c929cf2ed8a0.tar.xz
Merge to XFA: Use stdint.h types throughout PDFium.
Near-automatic merge, plus re-running scripts to update additional usage. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1172793002
Diffstat (limited to 'xfa/src/fxfa/src/fm2js/xfa_lexer.cpp')
-rw-r--r--xfa/src/fxfa/src/fm2js/xfa_lexer.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/xfa/src/fxfa/src/fm2js/xfa_lexer.cpp b/xfa/src/fxfa/src/fm2js/xfa_lexer.cpp
index 29594c760b..7ce3355861 100644
--- a/xfa/src/fxfa/src/fm2js/xfa_lexer.cpp
+++ b/xfa/src/fxfa/src/fm2js/xfa_lexer.cpp
@@ -16,7 +16,7 @@ struct XFA_FMDChar {
--p;
return p;
}
- static FX_UINT16 get(FX_LPCWSTR p)
+ static uint16_t get(FX_LPCWSTR p)
{
return *p;
}
@@ -50,7 +50,7 @@ struct XFA_FMDChar {
}
static FX_BOOL isAvalid(FX_LPCWSTR p, FX_BOOL flag = 0);
static FX_BOOL string2number(FX_LPCWSTR s, FX_DOUBLE *pValue, FX_LPCWSTR &pEnd);
- static FX_BOOL isUnicodeAlpha(FX_UINT16 ch);
+ static FX_BOOL isUnicodeAlpha(uint16_t ch);
};
inline FX_BOOL XFA_FMDChar::isAvalid(FX_LPCWSTR p, FX_BOOL flag)
{
@@ -74,7 +74,7 @@ inline FX_BOOL XFA_FMDChar::string2number(FX_LPCWSTR s, FX_DOUBLE *pValue, FX_LP
}
return 0;
}
-inline FX_BOOL XFA_FMDChar::isUnicodeAlpha(FX_UINT16 ch)
+inline FX_BOOL XFA_FMDChar::isUnicodeAlpha(uint16_t ch)
{
if (ch == 0 || ch == 0x0A || ch == 0x0D || ch == 0x09 || ch == 0x0B || ch == 0x0C || ch == 0x20 || ch == '.'
|| ch == ';' || ch == '"' || ch == '=' || ch == '<' || ch == '>' || ch == ',' || ch == '(' || ch == ')'
@@ -195,7 +195,7 @@ CXFA_FMToken *CXFA_FMLexer::NextToken()
}
CXFA_FMToken * CXFA_FMLexer::Scan()
{
- FX_UINT16 ch = 0;
+ uint16_t ch = 0;
CXFA_FMToken * p = FX_NEW CXFA_FMToken(m_uCurrentLine);
if (!XFA_FMDChar::isAvalid(m_ptr)) {
ch = XFA_FMDChar::get(m_ptr);
@@ -444,7 +444,7 @@ FX_DWORD CXFA_FMLexer::Number(CXFA_FMToken *t, FX_LPCWSTR p, FX_LPCWSTR &pEnd)
FX_DWORD CXFA_FMLexer::String(CXFA_FMToken *t, FX_LPCWSTR p, FX_LPCWSTR &pEnd)
{
FX_LPCWSTR pStart = p;
- FX_UINT16 ch = 0;
+ uint16_t ch = 0;
XFA_FMDChar::inc(p);
ch = XFA_FMDChar::get(p);
while (ch) {
@@ -482,7 +482,7 @@ NEXT:
FX_DWORD CXFA_FMLexer::Identifiers(CXFA_FMToken *t, FX_LPCWSTR p, FX_LPCWSTR &pEnd)
{
FX_LPCWSTR pStart = p;
- FX_UINT16 ch = 0;
+ uint16_t ch = 0;
ch = XFA_FMDChar::get(p);
XFA_FMDChar::inc(p);
if (!XFA_FMDChar::isAvalid(p)) {
@@ -536,10 +536,10 @@ void CXFA_FMLexer::Comment( FX_LPCWSTR p, FX_LPCWSTR &pEnd )
}
XFA_FM_TOKEN CXFA_FMLexer::IsKeyword(FX_WSTR str)
{
- FX_INT32 iLength = str.GetLength();
- FX_UINT32 uHash = FX_HashCode_String_GetW(str.GetPtr(), iLength, TRUE);
- FX_INT32 iStart = KEYWORD_START, iEnd = KEYWORD_END;
- FX_INT32 iMid = (iStart + iEnd) / 2;
+ int32_t iLength = str.GetLength();
+ uint32_t uHash = FX_HashCode_String_GetW(str.GetPtr(), iLength, TRUE);
+ int32_t iStart = KEYWORD_START, iEnd = KEYWORD_END;
+ int32_t iMid = (iStart + iEnd) / 2;
XFA_FMKeyword keyword;
do {
iMid = (iStart + iEnd) / 2;