diff options
author | Tom Sepez <tsepez@chromium.org> | 2015-01-27 09:47:45 -0800 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2015-01-27 09:47:45 -0800 |
commit | eef005055d6aafc2cc6066af37ce47d8b15ec7cd (patch) | |
tree | ab47aecac44e920d06b0d5e5aac6e15ad316a827 /core/src/fpdfapi/fpdf_page | |
parent | a03932372b0906a340a6e3860c87e45f9ec79042 (diff) | |
download | pdfium-eef005055d6aafc2cc6066af37ce47d8b15ec7cd.tar.xz |
Kill scattered extern _PDF_CharType declarations.chromium/2292chromium/2291chromium/2290
While we're at it, avoid an indirection through a pointer, and
use a name that isn't reserved for the compiler (leading _ CAP).
This is a small portion of the associated bug:
BUG=https://code.google.com/p/pdfium/issues/detail?id=112
R=brucedawson@chromium.org
Review URL: https://codereview.chromium.org/880663003
Diffstat (limited to 'core/src/fpdfapi/fpdf_page')
-rw-r--r-- | core/src/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp index bb29595721..9177c3e1d4 100644 --- a/core/src/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp +++ b/core/src/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp @@ -307,13 +307,12 @@ FX_DWORD PDF_DecodeInlineStream(const FX_BYTE* src_buf, FX_DWORD limit, dest_buf = 0; return (FX_DWORD) - 1; } -extern const FX_LPCSTR _PDF_CharType; CPDF_Stream* CPDF_StreamParser::ReadInlineStream(CPDF_Document* pDoc, CPDF_Dictionary* pDict, CPDF_Object* pCSObj, FX_BOOL bDecode) { if (m_Pos == m_Size) { return NULL; } - if (_PDF_CharType[m_pBuf[m_Pos]] == 'W') { + if (PDF_CharType[m_pBuf[m_Pos]] == 'W') { m_Pos ++; } CFX_ByteString Decoder; @@ -447,14 +446,14 @@ CPDF_StreamParser::SyntaxType CPDF_StreamParser::ParseNextElement() return EndOfData; } int ch = m_pBuf[m_Pos++]; - int type = _PDF_CharType[ch]; + int type = PDF_CharType[ch]; while (1) { while (type == 'W') { if (m_Size <= m_Pos) { return EndOfData; } ch = m_pBuf[m_Pos++]; - type = _PDF_CharType[ch]; + type = PDF_CharType[ch]; } if (ch != '%') { break; @@ -468,7 +467,7 @@ CPDF_StreamParser::SyntaxType CPDF_StreamParser::ParseNextElement() break; } } - type = _PDF_CharType[ch]; + type = PDF_CharType[ch]; } if (type == 'D' && ch != '/') { m_Pos --; @@ -486,7 +485,7 @@ CPDF_StreamParser::SyntaxType CPDF_StreamParser::ParseNextElement() break; } ch = m_pBuf[m_Pos++]; - type = _PDF_CharType[ch]; + type = PDF_CharType[ch]; if (type == 'D' || type == 'W') { m_Pos --; break; @@ -523,14 +522,14 @@ void CPDF_StreamParser::SkipPathObject() return; } int ch = m_pBuf[m_Pos++]; - int type = _PDF_CharType[ch]; + int type = PDF_CharType[ch]; while (1) { while (type == 'W') { if (m_Pos >= m_Size) { return; } ch = m_pBuf[m_Pos++]; - type = _PDF_CharType[ch]; + type = PDF_CharType[ch]; } if (type != 'N') { m_Pos = command_startpos; @@ -542,14 +541,14 @@ void CPDF_StreamParser::SkipPathObject() return; } ch = m_pBuf[m_Pos++]; - type = _PDF_CharType[ch]; + type = PDF_CharType[ch]; } while (type == 'W') { if (m_Pos >= m_Size) { return; } ch = m_pBuf[m_Pos++]; - type = _PDF_CharType[ch]; + type = PDF_CharType[ch]; } if (type == 'N') { continue; @@ -560,7 +559,7 @@ void CPDF_StreamParser::SkipPathObject() return; } ch = m_pBuf[m_Pos++]; - type = _PDF_CharType[ch]; + type = PDF_CharType[ch]; } if (m_Pos - op_startpos == 2) { int op = m_pBuf[op_startpos]; @@ -672,14 +671,14 @@ void CPDF_StreamParser::GetNextWord(FX_BOOL& bIsNumber) return; } int ch = m_pBuf[m_Pos++]; - int type = _PDF_CharType[ch]; + int type = PDF_CharType[ch]; while (1) { while (type == 'W') { if (m_Size <= m_Pos) { return; } ch = m_pBuf[m_Pos++]; - type = _PDF_CharType[ch]; + type = PDF_CharType[ch]; } if (ch != '%') { break; @@ -693,7 +692,7 @@ void CPDF_StreamParser::GetNextWord(FX_BOOL& bIsNumber) break; } } - type = _PDF_CharType[ch]; + type = PDF_CharType[ch]; } if (type == 'D') { bIsNumber = FALSE; @@ -704,7 +703,7 @@ void CPDF_StreamParser::GetNextWord(FX_BOOL& bIsNumber) return; } ch = m_pBuf[m_Pos++]; - type = _PDF_CharType[ch]; + type = PDF_CharType[ch]; if (type != 'R' && type != 'N') { m_Pos --; return; @@ -747,7 +746,7 @@ void CPDF_StreamParser::GetNextWord(FX_BOOL& bIsNumber) return; } ch = m_pBuf[m_Pos++]; - type = _PDF_CharType[ch]; + type = PDF_CharType[ch]; if (type == 'D' || type == 'W') { m_Pos --; break; |