summaryrefslogtreecommitdiff
path: root/core/src/fpdfapi/fpdf_parser
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-07-14 16:43:54 -0700
committerTom Sepez <tsepez@chromium.org>2015-07-14 16:43:54 -0700
commitb2552025f977873cc96bdfd7144329623159ad33 (patch)
tree34a5d912e4886e2141f2aecd23b6ec972ecaf85e /core/src/fpdfapi/fpdf_parser
parenta4755c6c899c6d29b01b1a0a58dac20b65d361dc (diff)
downloadpdfium-b2552025f977873cc96bdfd7144329623159ad33.tar.xz
Merge to XFA: Move FPDFAPI_FlateInit() prototype and friends to .h file
(cherry picked from commit dacc22cdfea727a04bce086d9bfec9a4d1a29bd4) Orignal Review URL: https://codereview.chromium.org/1240713004 . TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1230373003 .
Diffstat (limited to 'core/src/fpdfapi/fpdf_parser')
-rw-r--r--core/src/fpdfapi/fpdf_parser/fpdf_parser_filters.cpp32
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;