From 5ea4ed03c48a1422763aacfec5aa1b0a1d52dce5 Mon Sep 17 00:00:00 2001 From: Vilius Sutkus '89 Date: Mon, 18 Dec 2023 14:39:28 +0200 Subject: [PATCH] Update pdf2htmlEX-0.18.8-rc2 patch --- pdf2htmlEX/build.gradle.kts | 4 +- pdf2htmlEX/patches/0.18.8.rc2/cflags.patch | 2 +- .../patches/0.18.8.rc2/find-libraries.patch | 39 ++-- .../patches/0.18.8.rc2/make-a-library.patch | 19 +- .../patches/0.18.8.rc2/missing-tests.patch | 2 +- ...2-poppler-23.12.0-fontforge-20230101.patch | 178 +++++++++++------- 6 files changed, 144 insertions(+), 100 deletions(-) diff --git a/pdf2htmlEX/build.gradle.kts b/pdf2htmlEX/build.gradle.kts index 91e62d0..6b388d8 100644 --- a/pdf2htmlEX/build.gradle.kts +++ b/pdf2htmlEX/build.gradle.kts @@ -15,9 +15,9 @@ val portVersion = when(project.findProperty("packageVersion")) { version = "0.18.8.rc1-beta-5" "0.18.8.rc1" } - // https://github.com/pdf2htmlEX/pdf2htmlEX/pull/145 Will probably be named rc2 + // https://github.com/pdf2htmlEX/pdf2htmlEX/pull/154 Hoping it will be named rc2 else /* "0.18.8.rc2" */ -> { - version = "0.18.8.rc2-beta-2" + version = "0.18.8.rc2-beta-3" "0.18.8.rc2" } } diff --git a/pdf2htmlEX/patches/0.18.8.rc2/cflags.patch b/pdf2htmlEX/patches/0.18.8.rc2/cflags.patch index 375a92e..43480fa 100644 --- a/pdf2htmlEX/patches/0.18.8.rc2/cflags.patch +++ b/pdf2htmlEX/patches/0.18.8.rc2/cflags.patch @@ -1,6 +1,6 @@ --- pdf2htmlEX/CMakeLists.txt 2023-11-15 02:31:51.534000000 +0200 +++ pdf2htmlEX/CMakeLists.txt 2023-11-15 02:31:58.159000000 +0200 -@@ -40,15 +40,6 @@ +@@ -36,15 +36,6 @@ set(PDF2HTMLEX_LIBS ${PDF2HTMLEX_LIBS} PkgConfig::FONTFORGE) include_directories(${FONTFORGE_INCLUDEDIR}/private) diff --git a/pdf2htmlEX/patches/0.18.8.rc2/find-libraries.patch b/pdf2htmlEX/patches/0.18.8.rc2/find-libraries.patch index a2aa58f..9538891 100644 --- a/pdf2htmlEX/patches/0.18.8.rc2/find-libraries.patch +++ b/pdf2htmlEX/patches/0.18.8.rc2/find-libraries.patch @@ -1,12 +1,12 @@ --- pdf2htmlEX/CMakeLists.txt 2023-11-14 03:32:25.260000000 +0200 +++ pdf2htmlEX/CMakeLists.txt 2023-11-15 02:28:10.440000000 +0200 -@@ -23,90 +23,22 @@ - +@@ -23,90 +23,18 @@ + find_package(PkgConfig) - + - --# SINCE we have a very intimate relationship with a particular version of --# poppler... we explicitly describe the poppler include and library +-# SINCE we have a very intimate relationship with a particular version of +-# poppler... we explicitly describe the poppler include and library -# paths. -# -include_directories( @@ -16,17 +16,17 @@ - ../poppler -) -# --# The following order is critical as the glib functions use functions --# located in the main poppler library +-# The following order is critical as the glib functions use functions +-# located in the main poppler library -# -set(POPPLER_LIBRARIES ${POPPLER_LIBRARIES} - ${CMAKE_SOURCE_DIR}/../poppler/build/glib/libpoppler-glib.a - ${CMAKE_SOURCE_DIR}/../poppler/build/libpoppler.a -) - +- +pkg_search_module(POPPLER-GLIB REQUIRED IMPORTED_TARGET poppler-glib=23.12.0) +set(PDF2HTMLEX_LIBS ${PDF2HTMLEX_LIBS} PkgConfig::POPPLER-GLIB) - if(ENABLE_SVG) - pkg_check_modules(CAIRO REQUIRED cairo>=1.10.0) - message("-- Trying to locate cairo-svg...") @@ -47,14 +47,15 @@ - include_directories(${FREETYPE_INCLUDE_DIRS}) - link_directories(${FREETYPE_LIBRARY_DIRS}) -# set(PDF2HTMLEX_LIBS ${PDF2HTMLEX_LIBS} ${FREETYPE_LIBRARIES}) --endif() + pkg_search_module(CAIRO_SVG REQUIRED IMPORTED_TARGET cairo-svg) + set(PDF2HTMLEX_LIBS ${PDF2HTMLEX_LIBS} PkgConfig::CAIRO_SVG) -+ ++ pkg_search_module(FREETYPE REQUIRED IMPORTED_TARGET freetype2) ++ set(PDF2HTMLEX_LIBS ${PDF2HTMLEX_LIBS} PkgConfig::FREETYPE) + set(ENABLE_SVG 1) - --# SINCE we have a very intimate relationship with a particular version of --# fontforge... we explicitly describe the fontforge include and library + endif() +- +-# SINCE we have a very intimate relationship with a particular version of +-# fontforge... we explicitly describe the fontforge include and library -# paths. -# -include_directories( @@ -72,14 +73,12 @@ - -# If we are using Alpine Linux then we need to add -lintl -# --if (EXISTS /usr/lib/libintl.so ) +-if (EXISTS /usr/lib/libintl.so ) - set(LIB_INTL_LIBRARIES -lintl ) -else () - set(LIB_INTL_LIBRARIES "" ) -+ pkg_search_module(FREETYPE REQUIRED IMPORTED_TARGET freetype2) -+ set(PDF2HTMLEX_LIBS ${PDF2HTMLEX_LIBS} PkgConfig::FREETYPE) - endif() - +-endif() +- -set(PDF2HTMLEX_LIBS ${PDF2HTMLEX_LIBS} - ${POPPLER_LIBRARIES} - ${FONTFORGE_LIBRARIES} @@ -92,13 +91,13 @@ - -lxml2 - -lglib-2.0 - -lgio-2.0 -- -pthread +- -lgobject-2.0 - -lz - -lm -) +pkg_search_module(FONTFORGE REQUIRED IMPORTED_TARGET libfontforge=20230101) +set(PDF2HTMLEX_LIBS ${PDF2HTMLEX_LIBS} PkgConfig::FONTFORGE) +include_directories(${FONTFORGE_INCLUDEDIR}/private) - + # debug build flags (overwrite default cmake debug flags) set(CMAKE_C_FLAGS_DEBUG "-ggdb -pg") diff --git a/pdf2htmlEX/patches/0.18.8.rc2/make-a-library.patch b/pdf2htmlEX/patches/0.18.8.rc2/make-a-library.patch index af1ab95..a4fa8f0 100644 --- a/pdf2htmlEX/patches/0.18.8.rc2/make-a-library.patch +++ b/pdf2htmlEX/patches/0.18.8.rc2/make-a-library.patch @@ -1,6 +1,6 @@ --- pdf2htmlEX/CMakeLists.txt 2023-11-15 02:31:58.159000000 +0200 +++ pdf2htmlEX/CMakeLists.txt 2023-12-17 08:09:48.771000000 +0200 -@@ -63,7 +63,6 @@ +@@ -62,7 +62,6 @@ set(PDF2HTMLEX_SRC ${PDF2HTMLEX_SRC} src/Param.h @@ -8,7 +8,7 @@ src/pdf2htmlEX-config.h src/HTMLRenderer/HTMLRenderer.h src/HTMLRenderer/draw.cc -@@ -124,8 +123,11 @@ +@@ -123,8 +122,11 @@ src/TmpFiles.cc ) @@ -22,7 +22,7 @@ add_custom_target(pdf2htmlEX_resources ALL DEPENDS ${CMAKE_SOURCE_DIR}/share/base.min.css -@@ -150,7 +152,14 @@ +@@ -149,7 +151,14 @@ ${CMAKE_SOURCE_DIR}/share/fancy.css ) @@ -926,3 +926,16 @@ new file mode 100644 + +} // namespace pdf2htmlEX \ No newline at end of file + --- pdf2htmlEX/src/util/ffw.c 2020-08-19 23:43:25.000000000 +0300 + +++ pdf2htmlEX/src/util/ffw.c 2023-12-17 10:40:47.807000000 +0200 +@@ -70,8 +70,9 @@ + void ffw_init(const char* progPath, int debug) + { + ffwSetAction("initialize"); +- char *localProgPath = strdup(progPath); ++ char *localProgPath = strcopy(progPath); + FindProgRoot(localProgPath); ++ free(localProgPath); + InitSimpleStuff(); + if ( default_encoding==NULL ) + default_encoding=FindOrMakeEncoding("ISO8859-1"); diff --git a/pdf2htmlEX/patches/0.18.8.rc2/missing-tests.patch b/pdf2htmlEX/patches/0.18.8.rc2/missing-tests.patch index 48c7882..c7df9b5 100644 --- a/pdf2htmlEX/patches/0.18.8.rc2/missing-tests.patch +++ b/pdf2htmlEX/patches/0.18.8.rc2/missing-tests.patch @@ -1,6 +1,6 @@ --- pdf2htmlEX/CMakeLists.txt 2020-08-19 23:43:25.000000000 +0300 +++ pdf2htmlEX/CMakeLists.txt 2023-11-14 03:29:50.860000000 +0200 -@@ -180,8 +180,9 @@ +@@ -179,8 +179,9 @@ file(MAKE_DIRECTORY ${PDF2HTMLEX_DATDIR}) file(MAKE_DIRECTORY ${PDF2HTMLEX_PNGDIR}) file(MAKE_DIRECTORY ${PDF2HTMLEX_OUTDIR}) diff --git a/pdf2htmlEX/patches/0.18.8.rc2/rc2-poppler-23.12.0-fontforge-20230101.patch b/pdf2htmlEX/patches/0.18.8.rc2/rc2-poppler-23.12.0-fontforge-20230101.patch index 1779b4c..5c57a59 100644 --- a/pdf2htmlEX/patches/0.18.8.rc2/rc2-poppler-23.12.0-fontforge-20230101.patch +++ b/pdf2htmlEX/patches/0.18.8.rc2/rc2-poppler-23.12.0-fontforge-20230101.patch @@ -1,9 +1,18 @@ --- pdf2htmlEX/CMakeLists.txt 2020-08-19 23:43:25.000000000 +0300 +++ pdf2htmlEX/CMakeLists.txt 2023-12-17 10:10:29.400000000 +0200 -@@ -121,37 +121,14 @@ +@@ -103,7 +103,7 @@ set(PDF2HTMLEX_LIBS ${PDF2HTMLEX_LIBS} + -lxml2 + -lglib-2.0 + -lgio-2.0 +- -pthread ++ -lgobject-2.0 + -lz + -lm + ) +@@ -121,37 +121,17 @@ set(CMAKE_CXX_FLAGS_RELEASE "-O2 -DNDEBUG") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Woverloaded-virtual") - + -# clang compiler need c++11 flag -#if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") -# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++") @@ -32,24 +41,27 @@ -" CXX0X_SUPPORT) -if(NOT CXX0X_SUPPORT) - message(FATAL_ERROR "Error: your compiler does not support C++0x/C++11, please update it.") ++set(CMAKE_THREAD_PREFER_PTHREAD ON) ++set(THREADS_PREFER_PTHREAD_FLAG ON) ++find_package(Threads REQUIRED) ++set(PDF2HTMLEX_LIBS ${PDF2HTMLEX_LIBS} Threads::Threads) +# Poppler-23.12.0 requires CXX17 +set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD_REQUIRED ON) +if(NOT CYGWIN) + set(CMAKE_CXX_EXTENSIONS OFF) -+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread") endif() - + - configure_file (${CMAKE_SOURCE_DIR}/src/pdf2htmlEX-config.h.in ${CMAKE_SOURCE_DIR}/src/pdf2htmlEX-config.h) configure_file (${CMAKE_SOURCE_DIR}/pdf2htmlEX.1.in ${CMAKE_SOURCE_DIR}/pdf2htmlEX.1) - + --- pdf2htmlEX/src/pdf2htmlEX.cc 2020-08-19 23:43:25.000000000 +0300 +++ pdf2htmlEX/src/pdf2htmlEX.cc 2023-12-17 10:00:41.798000000 +0200 -@@ -412,21 +412,23 @@ +@@ -412,21 +412,23 @@ int main(int argc, char **argv) !param.poppler_data_dir.empty() ? param.poppler_data_dir.c_str() : NULL ); - + - // open PDF file - PDFDoc * doc = nullptr; try @@ -64,14 +76,14 @@ + if (!param.owner_password.empty()) { + ownerPW = GooString(param.owner_password); + } - + - delete userPW; - delete ownerPW; + std::optional userPW; + if (!param.user_password.empty()) { + userPW = GooString(param.user_password); } - + + GooString fileName(param.input_filename); + + // open PDF file @@ -79,53 +91,72 @@ + if (!doc->isOk()) throw "Cannot read the file"; - -@@ -445,7 +447,7 @@ + +@@ -445,7 +447,7 @@ int main(int argc, char **argv) doc->getNumPages()); - - + + - unique_ptr(new HTMLRenderer(argv[0], param))->process(doc); + unique_ptr(new HTMLRenderer(argv[0], param))->process(doc.get()); - + finished = true; } -@@ -459,7 +461,6 @@ +@@ -459,7 +461,6 @@ int main(int argc, char **argv) } - + // clean up - delete doc; globalParams.reset(); - + // check for memory leaks - --- pdf2htmlEX/src/Preprocessor.cc 2020-08-19 23:43:25.000000000 +0300 +++ pdf2htmlEX/src/Preprocessor.cc 2023-12-17 08:51:10.280000000 +0200 -@@ -67,8 +67,7 @@ +@@ -67,8 +67,7 @@ void Preprocessor::drawChar(GfxState *state, double x, double y, double originX, double originY, CharCode code, int nBytes, const Unicode *u, int uLen) { - GfxFont * font = state->getFont(); - if(!font) return; + std::shared_ptr font = state->getFont(); - + long long fn_id = hash_ref(font->getID()); - + +--- pdf2htmlEX/share/pdf2htmlEX.js.in ++++ pdf2htmlEX/share/pdf2htmlEX.js.in +@@ -329,7 +329,7 @@ Viewer.prototype = { + }, false); + + // handle links +- [this.container, this.outline].forEach(function(ele) { ++ [this.outline].concat(Array.from(this.container.querySelectorAll('a.l'))).forEach(function(ele) { + ele.addEventListener('click', self.link_handler.bind(self), false); + }); + +@@ -804,6 +804,10 @@ Viewer.prototype = { + link_handler : function (e) { + var target = /** @type{Node} */(e.target); + var detail_str = /** @type{string} */ (target.getAttribute('data-dest-detail')); ++ if (!detail_str) { ++ target = /** @type{Node} */(e.currentTarget); ++ detail_str = /** @type{string} */ (target.getAttribute('data-dest-detail')); ++ } + if (!detail_str) return; + + if (this.config['view_history_handler']) { --- pdf2htmlEX/src/HTMLRenderer/font.cc 2020-08-19 23:43:25.000000000 +0300 +++ pdf2htmlEX/src/HTMLRenderer/font.cc 2023-12-17 10:22:46.152000000 +0200 -@@ -200,8 +200,10 @@ - +@@ -200,8 +200,8 @@ string HTMLRenderer::dump_type3_font (GfxFont * font, FontInfo & info) + FT_Library ft_lib; FT_Init_FreeType(&ft_lib); -- CairoFontEngine font_engine(ft_lib); +- CairoFontEngine font_engine(ft_lib); - auto * cur_font = font_engine.getFont(font, cur_doc, true, xref); + CairoFontEngine font_engine(ft_lib); -+// std::shared_ptr fontCopy(font); -+ // @TODO: this will garbage collect font, but I shouldn't do this + std::shared_ptr cur_font = font_engine.getFont(std::shared_ptr(font), cur_doc, true, xref); auto used_map = preprocessor.get_code_map(hash_ref(font->getID())); - + //calculate transformed metrics -@@ -486,11 +488,10 @@ +@@ -486,11 +486,10 @@ void HTMLRenderer::embed_font(const string & filepath, GfxFont * font, FontInfo else { ffw_reencode_glyph_order(); @@ -139,7 +170,7 @@ } } } -@@ -553,10 +554,9 @@ +@@ -553,10 +552,9 @@ void HTMLRenderer::embed_font(const string & filepath, GfxFont * font, FontInfo else { // use the mapping stored in the file @@ -152,51 +183,51 @@ } } } -@@ -878,7 +878,7 @@ +@@ -878,7 +876,7 @@ const FontInfo * HTMLRenderer::install_font(GfxFont * font) { cerr << "Install font " << hex << new_fn_id << dec - << ": (" << (font->getID()->num) << ' ' << (font->getID()->gen) << ") " + << ": (" << (font->getID()->num) << ' ' << (font->getID()->gen) << ") " - << (font->getName() ? font->getName()->toStr() : "") + << font->getName().value_or("") << endl; } - -@@ -910,7 +910,8 @@ + +@@ -910,7 +908,8 @@ const FontInfo * HTMLRenderer::install_font(GfxFont * font) * which does not make much sense in our case * If we specify false here, font_loc->locType cannot be gfxFontLocResident */ - if(auto * font_loc = font->locateFont(xref, nullptr)) -+ auto font_loc = font->locateFont(xref, nullptr); ++ std::optional font_loc = font->locateFont(xref, nullptr); + if(font_loc.has_value()) { switch(font_loc -> locType) { -@@ -927,8 +928,7 @@ +@@ -927,8 +926,7 @@ const FontInfo * HTMLRenderer::install_font(GfxFont * font) cerr << "TODO: other font loc" << endl; export_remote_default_font(new_fn_id); break; -- } +- } - delete font_loc; + } } else { -@@ -955,7 +955,7 @@ - +@@ -955,7 +953,7 @@ void HTMLRenderer::install_embedded_font(GfxFont * font, FontInfo & info) + void HTMLRenderer::install_external_font(GfxFont * font, FontInfo & info) { - string fontname(font->getName()->toStr()); + string fontname(font->getName().value_or("")); - + // resolve bad encodings in GB - auto iter = GB_ENCODED_FONT_NAME_MAP.find(fontname); -@@ -965,15 +965,14 @@ + auto iter = GB_ENCODED_FONT_NAME_MAP.find(fontname); +@@ -965,15 +963,14 @@ void HTMLRenderer::install_external_font(GfxFont * font, FontInfo & info) cerr << "Warning: workaround for font names in bad encodings." << endl; } - + - GfxFontLoc * localfontloc = font->locateFont(xref, nullptr); + std::optional localfontloc = font->locateFont(xref, nullptr); - + if(param.embed_external_font) { - if(localfontloc != nullptr) @@ -209,9 +240,9 @@ return; } else -@@ -984,11 +983,10 @@ +@@ -984,11 +981,10 @@ void HTMLRenderer::install_external_font(GfxFont * font, FontInfo & info) } - + // still try to get an idea of read ascent/descent - if(localfontloc != nullptr) + if(localfontloc.has_value()) @@ -223,56 +254,52 @@ } else { - --- pdf2htmlEX/src/HTMLRenderer/form.cc 2020-08-19 23:43:25.000000000 +0300 +++ pdf2htmlEX/src/HTMLRenderer/form.cc 2023-12-15 13:43:36.905000000 +0200 -@@ -22,7 +22,7 @@ - +@@ -22,7 +22,7 @@ using std::cerr; + void HTMLRenderer::process_form(ofstream & out) { - FormPageWidgets * widgets = cur_catalog->getPage(pageNum)->getFormWidgets(); -+ auto widgets = cur_catalog->getPage(pageNum)->getFormWidgets(); ++ std::shared_ptr widgets = cur_catalog->getPage(pageNum)->getFormWidgets(); int num = widgets->getNumWidgets(); - + for(int i = 0; i < num; i++) - --- pdf2htmlEX/src/HTMLRenderer/link.cc 2020-08-19 23:43:25.000000000 +0300 +++ pdf2htmlEX/src/HTMLRenderer/link.cc 2023-12-16 16:00:09.687000000 +0200 -@@ -148,7 +148,7 @@ +@@ -148,7 +148,7 @@ string HTMLRenderer::get_linkaction_str( dynamic_cast(action); std::unique_ptr dest = nullptr; if(auto _ = real_action->getDest()) - dest = std::unique_ptr( _->copy() ); -+ dest = std::unique_ptr(new LinkDest(*_)); ++ dest = std::make_unique(*_); else if (auto _ = real_action->getNamedDest()) dest = cur_catalog->findDest(_); if(dest) - --- pdf2htmlEX/src/HTMLRenderer/outline.cc 2020-08-19 23:43:25.000000000 +0300 +++ pdf2htmlEX/src/HTMLRenderer/outline.cc 2023-12-17 08:48:40.341000000 +0200 -@@ -52,7 +52,6 @@ +@@ -52,7 +52,6 @@ void HTMLRenderer::process_outline_items(const std::vector * items { process_outline_items(item->getKids()); } - item->close(); f_outline.fs << ""; } - + --- pdf2htmlEX/src/HTMLRenderer/state.cc 2020-08-19 23:43:25.000000000 +0300 +++ pdf2htmlEX/src/HTMLRenderer/state.cc 2023-12-17 08:41:33.213000000 +0200 -@@ -207,7 +207,7 @@ +@@ -207,7 +207,7 @@ void HTMLRenderer::check_state_change(GfxState * state) // font name & size if(all_changed || font_changed) { - const FontInfo * new_font_info = install_font(state->getFont()); + const FontInfo * new_font_info = install_font(state->getFont().get()); - + if(!(new_font_info->id == cur_text_state.font_info->id)) { - --- pdf2htmlEX/src/HTMLRenderer/text.cc 2020-08-19 23:43:25.000000000 +0300 +++ pdf2htmlEX/src/HTMLRenderer/text.cc 2023-12-17 08:43:37.205000000 +0200 -@@ -95,9 +95,9 @@ +@@ -95,9 +95,9 @@ void HTMLRenderer::drawString(GfxState * state, const GooString * s) char buf[2]; buf[0] = (code >> 8) & 0xff; buf[1] = (code & 0xff); @@ -282,9 +309,9 @@ - width = ((Gfx8BitFont *)font)->getWidth(code); + width = ((Gfx8BitFont *)font.get())->getWidth(code); } - + if (width == 0 || height == 0) { -@@ -151,11 +151,11 @@ +@@ -151,11 +151,11 @@ void HTMLRenderer::drawString(GfxState * state, const GooString * s) Unicode uu; if(cur_text_state.font_info->use_tounicode) { @@ -298,40 +325,45 @@ } html_text_page.get_cur_line()->append_unicodes(&uu, 1, ddx); /* - --- pdf2htmlEX/src/util/ffw.c 2020-08-19 23:43:25.000000000 +0300 +++ pdf2htmlEX/src/util/ffw.c 2023-12-17 10:40:47.807000000 +0200 @@ -19,7 +19,7 @@ #include "SignalHandler.h" - + #include "ffw.h" // needed for: -#include "gfile.h" // FindProgDir -+#include "gfile.h" // FindProgRoot ++#include "gfile.h" // FindProgDir => FindProgRoot in 20230101 #include "fontforge/autowidth.h" // FVRemoveKerns #include "fontforge/bitmapchar.h" // SFReplaceEncodingBDFProps #include "fontforge/cvimages.h" // FVImportImages -@@ -70,8 +70,9 @@ - void ffw_init(const char* progPath, int debug) +@@ -71,7 +71,7 @@ void ffw_init(const char* progPath, int debug) { ffwSetAction("initialize"); -- char *localProgPath = strdup(progPath); + char *localProgPath = strdup(progPath); - FindProgDir(localProgPath); -+ char *localProgPath = strcopy(progPath); + FindProgRoot(localProgPath); -+ free(localProgPath); InitSimpleStuff(); if ( default_encoding==NULL ) default_encoding=FindOrMakeEncoding("ISO8859-1"); -@@ -288,7 +289,7 @@ +@@ -288,7 +288,7 @@ void ffw_reencode(const char * encname, int force) ffwClearAction(); } - + -void ffw_reencode_raw(int32 * mapping, int mapping_len, int force) +void ffw_reencode_raw(int32_t * mapping, int mapping_len, int force) { ffwSetAction("re-encode (raw1)"); Encoding * enc = calloc(1, sizeof(Encoding)); -@@ -572,7 +573,7 @@ +@@ -345,7 +345,7 @@ void ffw_reencode_raw2(const char ** mapping, int mapping_len, int force) + + void ffw_cidflatten(void) + { +- if(!cur_fv->sf->cidmaster) ++ if(!cur_fv->sf->cidmaster) + { + fprintf(stderr, "Cannot flatten a non-CID font\n"); + return; +@@ -572,7 +572,7 @@ void ffw_auto_hint(void) void ffw_override_fstype(void) { ffwSetAction("override the fstype of");