From 9d8ec5a6e37e8d1d4d4edca9040de234e2d4728f Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Tue, 4 Aug 2015 13:00:21 -0700 Subject: XFA: clang-format all pdfium code. No behavior change. Generated by: find . -name '*.cpp' -o -name '*.h' | \ grep -E -v 'third_party|thirdparties|lpng_v163|tiff_v403' | \ xargs ../../buildtools/mac/clang-format -i Then manually merged https://codereview.chromium.org/1269223002/ See thread "tabs vs spaces" on pdfium@googlegroups.com for discussion. BUG=none --- core/src/fxcodec/jbig2/JBig2_Segment.h | 90 +++++++++++++++++----------------- 1 file changed, 45 insertions(+), 45 deletions(-) (limited to 'core/src/fxcodec/jbig2/JBig2_Segment.h') diff --git a/core/src/fxcodec/jbig2/JBig2_Segment.h b/core/src/fxcodec/jbig2/JBig2_Segment.h index b61e8e5075..c9c6d59cd7 100644 --- a/core/src/fxcodec/jbig2/JBig2_Segment.h +++ b/core/src/fxcodec/jbig2/JBig2_Segment.h @@ -1,7 +1,7 @@ // Copyright 2014 PDFium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. - + // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com #ifndef _JBIG2_SEGMENT_H_ @@ -11,58 +11,58 @@ #include "JBig2_PatternDict.h" #include "JBig2_Module.h" #include "JBig2_HuffmanTable.h" -#define JBIG2_GET_INT32(buf) (((buf)[0]<<24) | ((buf)[1]<<16) | ((buf)[2]<<8) | (buf)[3]) -#define JBIG2_GET_INT16(buf) (((buf)[0]<<8) | (buf)[1]) +#define JBIG2_GET_INT32(buf) \ + (((buf)[0] << 24) | ((buf)[1] << 16) | ((buf)[2] << 8) | (buf)[3]) +#define JBIG2_GET_INT16(buf) (((buf)[0] << 8) | (buf)[1]) typedef enum { - JBIG2_SEGMENT_HEADER_UNPARSED, - JBIG2_SEGMENT_DATA_UNPARSED, - JBIG2_SEGMENT_PARSE_COMPLETE, - JBIG2_SEGMENT_PAUSED, - JBIG2_SEGMENT_ERROR + JBIG2_SEGMENT_HEADER_UNPARSED, + JBIG2_SEGMENT_DATA_UNPARSED, + JBIG2_SEGMENT_PARSE_COMPLETE, + JBIG2_SEGMENT_PAUSED, + JBIG2_SEGMENT_ERROR } JBig2_SegmentState; typedef enum { - JBIG2_VOID_POINTER = 0, - JBIG2_IMAGE_POINTER, - JBIG2_SYMBOL_DICT_POINTER, - JBIG2_PATTERN_DICT_POINTER, - JBIG2_HUFFMAN_TABLE_POINTER + JBIG2_VOID_POINTER = 0, + JBIG2_IMAGE_POINTER, + JBIG2_SYMBOL_DICT_POINTER, + JBIG2_PATTERN_DICT_POINTER, + JBIG2_HUFFMAN_TABLE_POINTER } JBig2_ResultType; -class CJBig2_Segment : public CJBig2_Object -{ -public: +class CJBig2_Segment : public CJBig2_Object { + public: + CJBig2_Segment(); - CJBig2_Segment(); + ~CJBig2_Segment(); - ~CJBig2_Segment(); + void init(); - void init(); + void clean(); - void clean(); -public: - FX_DWORD m_dwNumber; - union { - struct { - uint8_t type : 6; - uint8_t page_association_size : 1; - uint8_t deferred_non_retain : 1; - } s; - uint8_t c; - } m_cFlags; - int32_t m_nReferred_to_segment_count; - FX_DWORD * m_pReferred_to_segment_numbers; - FX_DWORD m_dwPage_association; - FX_DWORD m_dwData_length; + public: + FX_DWORD m_dwNumber; + union { + struct { + uint8_t type : 6; + uint8_t page_association_size : 1; + uint8_t deferred_non_retain : 1; + } s; + uint8_t c; + } m_cFlags; + int32_t m_nReferred_to_segment_count; + FX_DWORD* m_pReferred_to_segment_numbers; + FX_DWORD m_dwPage_association; + FX_DWORD m_dwData_length; - FX_DWORD m_dwHeader_Length; - uint8_t *m_pData; - JBig2_SegmentState m_State; - JBig2_ResultType m_nResultType; - union { - CJBig2_SymbolDict *sd; - CJBig2_PatternDict *pd; - CJBig2_Image *im; - CJBig2_HuffmanTable *ht; - void* vd; - } m_Result; + FX_DWORD m_dwHeader_Length; + uint8_t* m_pData; + JBig2_SegmentState m_State; + JBig2_ResultType m_nResultType; + union { + CJBig2_SymbolDict* sd; + CJBig2_PatternDict* pd; + CJBig2_Image* im; + CJBig2_HuffmanTable* ht; + void* vd; + } m_Result; }; #endif -- cgit v1.2.3