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

Unified Diff: core/src/fpdfapi/fpdf_parser/fpdf_parser_filters.cpp

Issue 1240713004: Move FPDFAPI_FlateInit() prototype and friends to .h file (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Copyright 2015 Created 5 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/include/fxcodec/fx_codec_flate.h ('k') | core/src/fxcodec/codec/fx_codec_flate.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fpdfapi/fpdf_parser/fpdf_parser_filters.cpp
diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_filters.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_filters.cpp
index efe085c2eecd37e3cbb789bc5e468858ca89b4ce..fed4546fab7efc93d50ea7d9806729d7a7a3cae0 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;
« no previous file with comments | « core/include/fxcodec/fx_codec_flate.h ('k') | core/src/fxcodec/codec/fx_codec_flate.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698