Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(246)

Side by Side Diff: core/src/fpdfapi/fpdf_parser/fpdf_parser_utility.cpp

Issue 1568923002: Cleanup includes, comments, and unused code (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #include "core/include/fpdfapi/fpdf_parser.h" 7 #include "core/include/fpdfapi/fpdf_parser.h"
8
8 #include "core/include/fxcrt/fx_ext.h" 9 #include "core/include/fxcrt/fx_ext.h"
9 10
10 // Indexed by 8-bit character code, contains either: 11 // Indexed by 8-bit character code, contains either:
11 // 'W' - for whitespace: NUL, TAB, CR, LF, FF, 0x80, 0xff 12 // 'W' - for whitespace: NUL, TAB, CR, LF, FF, SPACE, 0x80, 0xff
12 // 'N' - for numeric: 0123456789+-. 13 // 'N' - for numeric: 0123456789+-.
13 // 'D' - for delimiter: %()/<>[]{} 14 // 'D' - for delimiter: %()/<>[]{}
14 // 'R' - otherwise. 15 // 'R' - otherwise.
15 const char PDF_CharType[256] = { 16 const char PDF_CharType[256] = {
16 // NUL SOH STX ETX EOT ENQ ACK BEL BS HT LF VT FF CR SO 17 // NUL SOH STX ETX EOT ENQ ACK BEL BS HT LF VT FF CR SO
17 // SI 18 // SI
18 'W', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'W', 'W', 'R', 'W', 'W', 'R', 19 'W', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'W', 'W', 'R', 'W', 'W', 'R',
19 'R', 20 'R',
20 21
21 // DLE DC1 DC2 DC3 DC4 NAK SYN ETB CAN EM SUB ESC FS GS RS 22 // DLE DC1 DC2 DC3 DC4 NAK SYN ETB CAN EM SUB ESC FS GS RS
(...skipping 30 matching lines...) Expand all
52 'W', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 53 'W', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R',
53 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 54 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R',
54 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 55 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R',
55 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 56 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R',
56 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 57 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R',
57 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 58 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R',
58 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 59 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R',
59 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 60 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R',
60 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'W'}; 61 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'W'};
61 62
62 #ifndef MAX_PATH
63 #define MAX_PATH 4096
64 #endif
65 CPDF_SimpleParser::CPDF_SimpleParser(const uint8_t* pData, FX_DWORD dwSize) { 63 CPDF_SimpleParser::CPDF_SimpleParser(const uint8_t* pData, FX_DWORD dwSize) {
66 m_pData = pData; 64 m_pData = pData;
67 m_dwSize = dwSize; 65 m_dwSize = dwSize;
68 m_dwCurPos = 0; 66 m_dwCurPos = 0;
69 } 67 }
70 CPDF_SimpleParser::CPDF_SimpleParser(const CFX_ByteStringC& str) { 68 CPDF_SimpleParser::CPDF_SimpleParser(const CFX_ByteStringC& str) {
71 m_pData = str.GetPtr(); 69 m_pData = str.GetPtr();
72 m_dwSize = str.GetLength(); 70 m_dwSize = str.GetLength();
73 m_dwCurPos = 0; 71 m_dwCurPos = 0;
74 } 72 }
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 CPDF_Object* pFound = SearchNumberNode(pKid, num); 453 CPDF_Object* pFound = SearchNumberNode(pKid, num);
456 if (pFound) { 454 if (pFound) {
457 return pFound; 455 return pFound;
458 } 456 }
459 } 457 }
460 return NULL; 458 return NULL;
461 } 459 }
462 CPDF_Object* CPDF_NumberTree::LookupValue(int num) { 460 CPDF_Object* CPDF_NumberTree::LookupValue(int num) {
463 return SearchNumberNode(m_pRoot, num); 461 return SearchNumberNode(m_pRoot, num);
464 } 462 }
OLDNEW
« no previous file with comments | « core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698