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

Side by Side Diff: core/include/fpdfapi/fpdf_parser.h

Issue 1360103002: Get rid of gotos in CPDF_SyntaxParser and FlateUncompress(). (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: Created 5 years, 2 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 | « no previous file | core/include/fxcrt/fx_basic.h » ('j') | 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 #ifndef CORE_INCLUDE_FPDFAPI_FPDF_PARSER_H_ 7 #ifndef CORE_INCLUDE_FPDFAPI_FPDF_PARSER_H_
8 #define CORE_INCLUDE_FPDFAPI_FPDF_PARSER_H_ 8 #define CORE_INCLUDE_FPDFAPI_FPDF_PARSER_H_
9 9
10 #include "../fxcrt/fx_system.h" 10 #include "../fxcrt/fx_system.h"
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 CPDF_Document* m_pDocument; 446 CPDF_Document* m_pDocument;
447 447
448 CPDF_SyntaxParser m_Syntax; 448 CPDF_SyntaxParser m_Syntax;
449 FX_BOOL m_bOwnFileRead; 449 FX_BOOL m_bOwnFileRead;
450 CPDF_Object* ParseDirect(CPDF_Object* pObj); 450 CPDF_Object* ParseDirect(CPDF_Object* pObj);
451 451
452 FX_BOOL LoadAllCrossRefV4(FX_FILESIZE pos); 452 FX_BOOL LoadAllCrossRefV4(FX_FILESIZE pos);
453 453
454 FX_BOOL LoadAllCrossRefV5(FX_FILESIZE pos); 454 FX_BOOL LoadAllCrossRefV5(FX_FILESIZE pos);
455 455
456 FX_BOOL LoadCrossRefV4(FX_FILESIZE pos, 456 bool LoadCrossRefV4(FX_FILESIZE pos,
457 FX_FILESIZE streampos, 457 FX_FILESIZE streampos,
458 FX_BOOL bSkip, 458 FX_BOOL bSkip,
459 FX_BOOL bFirst); 459 FX_BOOL bFirst);
460 460
461 FX_BOOL LoadCrossRefV5(FX_FILESIZE pos, FX_FILESIZE& prev, FX_BOOL bMainXRef); 461 FX_BOOL LoadCrossRefV5(FX_FILESIZE pos, FX_FILESIZE& prev, FX_BOOL bMainXRef);
462 462
463 CPDF_Dictionary* LoadTrailerV4(); 463 CPDF_Dictionary* LoadTrailerV4();
464 464
465 FX_BOOL RebuildCrossRef(); 465 FX_BOOL RebuildCrossRef();
466 466
467 FX_DWORD SetEncryptHandler(); 467 FX_DWORD SetEncryptHandler();
468 468
469 void ReleaseEncryptHandler(); 469 void ReleaseEncryptHandler();
470 470
471 FX_BOOL LoadLinearizedAllCrossRefV4(FX_FILESIZE pos, FX_DWORD dwObjCount); 471 FX_BOOL LoadLinearizedAllCrossRefV4(FX_FILESIZE pos, FX_DWORD dwObjCount);
472 472
473 FX_BOOL LoadLinearizedCrossRefV4(FX_FILESIZE pos, FX_DWORD dwObjCount); 473 FX_BOOL LoadLinearizedCrossRefV4(FX_FILESIZE pos, FX_DWORD dwObjCount);
474 474
475 FX_BOOL LoadLinearizedAllCrossRefV5(FX_FILESIZE pos); 475 FX_BOOL LoadLinearizedAllCrossRefV5(FX_FILESIZE pos);
476 476
477 FX_DWORD LoadLinearizedMainXRefTable(); 477 FX_DWORD LoadLinearizedMainXRefTable();
478 478
479 CFX_MapPtrToPtr m_ObjectStreamMap; 479 CFX_MapPtrToPtr m_ObjectStreamMap;
480 480
481 CPDF_StreamAcc* GetObjectStream(FX_DWORD number); 481 CPDF_StreamAcc* GetObjectStream(FX_DWORD number);
482 482
483 FX_BOOL IsLinearizedFile(IFX_FileRead* pFileAccess, FX_DWORD offset); 483 FX_BOOL IsLinearizedFile(IFX_FileRead* pFileAccess, FX_DWORD offset);
484 484
485 bool FindPosInOffsets(FX_FILESIZE pos) const;
486
485 int m_FileVersion; 487 int m_FileVersion;
486 488
487 CPDF_Dictionary* m_pTrailer; 489 CPDF_Dictionary* m_pTrailer;
488 490
489 CPDF_Dictionary* m_pEncryptDict; 491 CPDF_Dictionary* m_pEncryptDict;
490 void SetEncryptDictionary(CPDF_Dictionary* pDict); 492 void SetEncryptDictionary(CPDF_Dictionary* pDict);
491 493
492 FX_FILESIZE m_LastXRefOffset; 494 FX_FILESIZE m_LastXRefOffset;
493 495
494 FX_BOOL m_bXRefStream; 496 FX_BOOL m_bXRefStream;
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after
929 FX_DWORD src_size, 931 FX_DWORD src_size,
930 const CPDF_Dictionary* pDict, 932 const CPDF_Dictionary* pDict,
931 uint8_t*& dest_buf, 933 uint8_t*& dest_buf,
932 FX_DWORD& dest_size, 934 FX_DWORD& dest_size,
933 CFX_ByteString& ImageEncoding, 935 CFX_ByteString& ImageEncoding,
934 CPDF_Dictionary*& pImageParms, 936 CPDF_Dictionary*& pImageParms,
935 FX_DWORD estimated_size, 937 FX_DWORD estimated_size,
936 FX_BOOL bImageAcc); 938 FX_BOOL bImageAcc);
937 939
938 #endif // CORE_INCLUDE_FPDFAPI_FPDF_PARSER_H_ 940 #endif // CORE_INCLUDE_FPDFAPI_FPDF_PARSER_H_
OLDNEW
« no previous file with comments | « no previous file | core/include/fxcrt/fx_basic.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698