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

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

Issue 1563673002: Cleanup includes, comments, and unused code (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
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
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 #include "core/include/fxcrt/fx_ext.h" 8 #include "core/include/fxcrt/fx_ext.h"
9 9
10 // Indexed by 8-bit character code, contains either: 10 // Indexed by 8-bit character code, contains either:
11 // 'W' - for whitespace: NUL, TAB, CR, LF, FF, 0x80, 0xff 11 // 'W' - for whitespace: NUL, TAB, CR, LF, FF, SPACE, 0x80, 0xff
12 // 'N' - for numeric: 0123456789+-. 12 // 'N' - for numeric: 0123456789+-.
13 // 'D' - for delimiter: %()/<>[]{} 13 // 'D' - for delimiter: %()/<>[]{}
14 // 'R' - otherwise. 14 // 'R' - otherwise.
15 const char PDF_CharType[256] = { 15 const char PDF_CharType[256] = {
16 // NUL SOH STX ETX EOT ENQ ACK BEL BS HT LF VT FF CR SO 16 // NUL SOH STX ETX EOT ENQ ACK BEL BS HT LF VT FF CR SO
17 // SI 17 // SI
18 'W', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'W', 'W', 'R', 'W', 'W', 'R', 18 'W', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'W', 'W', 'R', 'W', 'W', 'R',
19 'R', 19 'R',
20 20
21 // DLE DC1 DC2 DC3 DC4 NAK SYN ETB CAN EM SUB ESC FS GS RS 21 // 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', 52 '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', 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', 'W'}; 60 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'W'};
61 61
62 #ifndef MAX_PATH
63 #define MAX_PATH 4096
64 #endif
65 CPDF_SimpleParser::CPDF_SimpleParser(const uint8_t* pData, FX_DWORD dwSize) { 62 CPDF_SimpleParser::CPDF_SimpleParser(const uint8_t* pData, FX_DWORD dwSize) {
66 m_pData = pData; 63 m_pData = pData;
67 m_dwSize = dwSize; 64 m_dwSize = dwSize;
68 m_dwCurPos = 0; 65 m_dwCurPos = 0;
69 } 66 }
70 CPDF_SimpleParser::CPDF_SimpleParser(const CFX_ByteStringC& str) { 67 CPDF_SimpleParser::CPDF_SimpleParser(const CFX_ByteStringC& str) {
71 m_pData = str.GetPtr(); 68 m_pData = str.GetPtr();
72 m_dwSize = str.GetLength(); 69 m_dwSize = str.GetLength();
73 m_dwCurPos = 0; 70 m_dwCurPos = 0;
74 } 71 }
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 CPDF_Object* pFound = SearchNumberNode(pKid, num); 452 CPDF_Object* pFound = SearchNumberNode(pKid, num);
456 if (pFound) { 453 if (pFound) {
457 return pFound; 454 return pFound;
458 } 455 }
459 } 456 }
460 return NULL; 457 return NULL;
461 } 458 }
462 CPDF_Object* CPDF_NumberTree::LookupValue(int num) { 459 CPDF_Object* CPDF_NumberTree::LookupValue(int num) {
463 return SearchNumberNode(m_pRoot, num); 460 return SearchNumberNode(m_pRoot, num);
464 } 461 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698