diff options
author | Tom Sepez <tsepez@chromium.org> | 2015-07-14 16:33:32 -0700 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2015-07-14 16:33:32 -0700 |
commit | dacc22cdfea727a04bce086d9bfec9a4d1a29bd4 (patch) | |
tree | 83cc28d65f16333a5baa3ccf047a31e96ed7bb97 /core/src/fpdfapi/fpdf_parser | |
parent | 0c96176e6fb4ef37194e7bbff1b04e482e19df89 (diff) | |
download | pdfium-dacc22cdfea727a04bce086d9bfec9a4d1a29bd4.tar.xz |
Move FPDFAPI_FlateInit() prototype and friends to .h file
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1240713004 .
Diffstat (limited to 'core/src/fpdfapi/fpdf_parser')
-rw-r--r-- | core/src/fpdfapi/fpdf_parser/fpdf_parser_filters.cpp | 32 |
1 files changed, 14 insertions, 18 deletions
diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_filters.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_filters.cpp index efe085c2ee..fed4546fab 100644 --- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_filters.cpp +++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_filters.cpp @@ -4,12 +4,25 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com -#include "../../../../third_party/zlib_v128/zlib.h" #include "../../../include/fpdfapi/fpdf_parser.h" #include "../../../include/fxcodec/fx_codec.h" +#include "../../../include/fxcodec/fx_codec_flate.h" #include "../../../include/fpdfapi/fpdf_module.h" #include "filters_int.h" +extern "C" { + +static void* my_alloc_func(void* opaque, unsigned int items, unsigned int size) +{ + return FX_Alloc2D(uint8_t, items, size); +} +static void my_free_func(void* opaque, void* address) +{ + FX_Free(address); +} + +} // extern "C" + CFX_DataFilter::CFX_DataFilter() { m_bEOF = FALSE; @@ -288,23 +301,6 @@ void CPDF_DecryptFilter::v_FilterFinish(CFX_BinaryBuf& dest_buf) m_pCryptoHandler->DecryptFinish(m_pContext, dest_buf); m_pContext = NULL; } -extern "C" { - static void* my_alloc_func (void* opaque, unsigned int items, unsigned int size) - { - return FX_Alloc2D(uint8_t, items, size); - } - static void my_free_func (void* opaque, void* address) - { - FX_Free(address); - } - void* FPDFAPI_FlateInit(void* (*alloc_func)(void*, unsigned int, unsigned int), - void (*free_func)(void*, void*)); - void FPDFAPI_FlateInput(void* context, const unsigned char* src_buf, unsigned int src_size); - int FPDFAPI_FlateOutput(void* context, unsigned char* dest_buf, unsigned int dest_size); - int FPDFAPI_FlateGetAvailIn(void* context); - int FPDFAPI_FlateGetAvailOut(void* context); - void FPDFAPI_FlateEnd(void* context); -} CPDF_FlateFilter::CPDF_FlateFilter() { m_pContext = NULL; |