Blame SOURCES/texlive-20180414-poppler-0.63.patch

fcfc58
From b14146667f4cd6cbc5d5821c88e47096df3c78b5 Mon Sep 17 00:00:00 2001
fcfc58
From: Akira Kakuto <kakuto@fuk.kindai.ac.jp>
fcfc58
Date: Sat, 28 Apr 2018 07:36:22 +0000
fcfc58
Subject: support poppler-0.64.0
fcfc58
fcfc58
git-svn-id: svn://tug.org/texlive/trunk@47470 c570f23f-e606-0410-a88d-b1316a301751
fcfc58
---
fcfc58
 Build/source/texk/web2c/luatexdir/image/pdftoepdf.w       |  4 ++--
fcfc58
 Build/source/texk/web2c/luatexdir/lua/lepdflib.cc         |  4 ++--
fcfc58
 Build/source/texk/web2c/pdftexdir/ChangeLog               |  5 +++++
fcfc58
 Build/source/texk/web2c/pdftexdir/pdftoepdf-newpoppler.cc | 14 +++++++-------
fcfc58
 Build/source/texk/web2c/pdftexdir/pdftosrc-newpoppler.cc  |  2 +-
fcfc58
 5 files changed, 17 insertions(+), 12 deletions(-)
fcfc58
fcfc58
diff --git a/Build/source/texk/web2c/luatexdir/image/pdftoepdf.w b/Build/source/texk/web2c/luatexdir/image/pdftoepdf.w
fcfc58
index 7ba2973..d697959 100644
fcfc58
--- Build/source/texk/web2c/luatexdir/image/pdftoepdf.w
fcfc58
+++ Build/source/texk/web2c/luatexdir/image/pdftoepdf.w
fcfc58
@@ -472,10 +472,10 @@ static void copyObject(PDF pdf, PdfDocument * pdf_doc, Object * obj)
fcfc58
         break;
fcfc58
     */
fcfc58
     case objString:
fcfc58
-        copyString(pdf, obj->getString());
fcfc58
+        copyString(pdf, (GooString *)obj->getString());
fcfc58
         break;
fcfc58
     case objName:
fcfc58
-        copyName(pdf, obj->getName());
fcfc58
+        copyName(pdf, (char *)obj->getName());
fcfc58
         break;
fcfc58
     case objNull:
fcfc58
         pdf_add_null(pdf);
fcfc58
diff --git a/Build/source/texk/web2c/luatexdir/lua/lepdflib.cc b/Build/source/texk/web2c/luatexdir/lua/lepdflib.cc
fcfc58
index a16bf3b..32bcdab 100644
fcfc58
--- Build/source/texk/web2c/luatexdir/lua/lepdflib.cc
fcfc58
+++ Build/source/texk/web2c/luatexdir/lua/lepdflib.cc
fcfc58
@@ -674,7 +674,7 @@ static int m_##in##_##function(lua_State * L)                  \
fcfc58
     uin = (udstruct *) luaL_checkudata(L, 1, M_##in);          \
fcfc58
     if (uin->pd != NULL && uin->pd->pc != uin->pc)             \
fcfc58
         pdfdoc_changed_error(L);                               \
fcfc58
-    gs = ((in *) uin->d)->function();                          \
fcfc58
+    gs = (GooString *)((in *) uin->d)->function();             \
fcfc58
     if (gs != NULL)                                            \
fcfc58
         lua_pushlstring(L, gs->getCString(), gs->getLength()); \
fcfc58
     else                                                       \
fcfc58
@@ -1813,7 +1813,7 @@ static int m_Object_getString(lua_State * L)
fcfc58
     if (uin->pd != NULL && uin->pd->pc != uin->pc)
fcfc58
         pdfdoc_changed_error(L);
fcfc58
     if (((Object *) uin->d)->isString()) {
fcfc58
-        gs = ((Object *) uin->d)->getString();
fcfc58
+        gs = (GooString *)((Object *) uin->d)->getString();
fcfc58
         lua_pushlstring(L, gs->getCString(), gs->getLength());
fcfc58
     } else
fcfc58
         lua_pushnil(L);
fcfc58
diff --git a/Build/source/texk/web2c/pdftexdir/ChangeLog b/Build/source/texk/web2c/pdftexdir/ChangeLog
fcfc58
index c022bc2..f4af035 100644
fcfc58
--- Build/source/texk/web2c/pdftexdir/ChangeLog
fcfc58
+++ Build/source/texk/web2c/pdftexdir/ChangeLog
fcfc58
@@ -1,3 +1,8 @@
fcfc58
+2018-04-28  Akira Kakuto  <kakuto@fuk.kindai.ac.jp>
fcfc58
+
fcfc58
+	* pdftoepdf-newpoppler.cc, pdftosrc-newpoppler.cc:
fcfc58
+	Support poppler 0.64.0.
fcfc58
+
fcfc58
 2018-04-14  Karl Berry  <karl@tug.org>
fcfc58
 
fcfc58
 	* TeX Live 2018 release, pdftex 1.40.19.
fcfc58
diff --git a/Build/source/texk/web2c/pdftexdir/pdftoepdf-newpoppler.cc b/Build/source/texk/web2c/pdftexdir/pdftoepdf-newpoppler.cc
fcfc58
index 10fea29..750579d 100644
fcfc58
--- Build/source/texk/web2c/pdftexdir/pdftoepdf-newpoppler.cc
fcfc58
+++ Build/source/texk/web2c/pdftexdir/pdftoepdf-newpoppler.cc
fcfc58
@@ -290,7 +290,7 @@ static void copyName(char *s)
fcfc58
 static void copyDictEntry(Object * obj, int i)
fcfc58
 {
fcfc58
     Object obj1;
fcfc58
-    copyName(obj->dictGetKey(i));
fcfc58
+    copyName((char *)obj->dictGetKey(i));
fcfc58
     pdf_puts(" ");
fcfc58
     obj1 = obj->dictGetValNF(i);
fcfc58
     copyObject(&obj1);
fcfc58
@@ -355,7 +355,7 @@ static void copyProcSet(Object * obj)
fcfc58
         if (!procset.isName())
fcfc58
             pdftex_fail("PDF inclusion: invalid ProcSet entry type <%s>",
fcfc58
                         procset.getTypeName());
fcfc58
-        copyName(procset.getName());
fcfc58
+        copyName((char *)procset.getName());
fcfc58
         pdf_puts(" ");
fcfc58
     }
fcfc58
     pdf_puts("]\n");
fcfc58
@@ -418,7 +418,7 @@ static void copyFont(char *tag, Object * fontRef)
fcfc58
         && fontdescRef.isRef()
fcfc58
         && fontdesc.isDict()
fcfc58
         && embeddableFont(&fontdesc)
fcfc58
-        && (fontmap = lookup_fontmap(basefont.getName())) != NULL) {
fcfc58
+        && (fontmap = lookup_fontmap((char *)basefont.getName())) != NULL) {
fcfc58
         // round /StemV value, since the PDF input is a float
fcfc58
         // (see Font Descriptors in PDF reference), but we only store an
fcfc58
         // integer, since we don't want to change the struct.
fcfc58
@@ -427,7 +427,7 @@ static void copyFont(char *tag, Object * fontRef)
fcfc58
         charset = fontdesc.dictLookup("CharSet");
fcfc58
         if (!charset.isNull() &&
fcfc58
             charset.isString() && is_subsetable(fontmap))
fcfc58
-            epdf_mark_glyphs(fd, charset.getString()->getCString());
fcfc58
+            epdf_mark_glyphs(fd, (char *)charset.getString()->getCString());
fcfc58
         else
fcfc58
             embed_whole_font(fd);
fcfc58
         addFontDesc(fontdescRef.getRef(), fd);
fcfc58
@@ -456,7 +456,7 @@ static void copyFontResources(Object * obj)
fcfc58
         if (fontRef.isRef())
fcfc58
             copyFont(obj->dictGetKey(i), &fontRef);
fcfc58
         else if (fontRef.isDict()) {   // some programs generate pdf with embedded font object
fcfc58
-            copyName(obj->dictGetKey(i));
fcfc58
+            copyName((char *)obj->dictGetKey(i));
fcfc58
             pdf_puts(" ");
fcfc58
             copyObject(&fontRef);
fcfc58
         }
fcfc58
@@ -565,7 +565,7 @@ static void copyObject(Object * obj)
fcfc58
     } else if (obj->isNum()) {
fcfc58
         pdf_printf("%s", convertNumToPDF(obj->getNum()));
fcfc58
     } else if (obj->isString()) {
fcfc58
-        s = obj->getString();
fcfc58
+        s = (GooString *)obj->getString();
fcfc58
         p = s->getCString();
fcfc58
         l = s->getLength();
fcfc58
         if (strlen(p) == (unsigned int) l) {
fcfc58
@@ -589,7 +589,7 @@ static void copyObject(Object * obj)
fcfc58
             pdf_puts(">");
fcfc58
         }
fcfc58
     } else if (obj->isName()) {
fcfc58
-        copyName(obj->getName());
fcfc58
+        copyName((char *)obj->getName());
fcfc58
     } else if (obj->isNull()) {
fcfc58
         pdf_puts("null");
fcfc58
     } else if (obj->isArray()) {
fcfc58
diff --git a/Build/source/texk/web2c/pdftexdir/pdftosrc-newpoppler.cc b/Build/source/texk/web2c/pdftexdir/pdftosrc-newpoppler.cc
fcfc58
index 4e2bcad..0db154b 100644
fcfc58
--- Build/source/texk/web2c/pdftexdir/pdftosrc-newpoppler.cc
fcfc58
+++ Build/source/texk/web2c/pdftexdir/pdftosrc-newpoppler.cc
fcfc58
@@ -109,7 +109,7 @@ int main(int argc, char *argv[])
fcfc58
             fprintf(stderr, "No SourceName found\n");
fcfc58
             exit(1);
fcfc58
         }
fcfc58
-        outname = srcName.getString()->getCString();
fcfc58
+        outname = (char *)srcName.getString()->getCString();
fcfc58
         // We cannot free srcName, as objname shares its string.
fcfc58
         // srcName.free();
fcfc58
     } else if (objnum > 0) {
fcfc58
--- Build/source/texk/web2c/pdftexdir/pdftosrc.cc
fcfc58
+++ Build/source/texk/web2c/pdftexdir/pdftosrc.cc
fcfc58
@@ -109,7 +109,7 @@ int main(int argc, char *argv[])
fcfc58
             fprintf(stderr, "No SourceName found\n");
fcfc58
             exit(1);
fcfc58
         }
fcfc58
-        outname = srcName.getString()->getCString();
fcfc58
+        outname = (char *)srcName.getString()->getCString();
fcfc58
         // We cannot free srcName, as objname shares its string.
fcfc58
         // srcName.free();
fcfc58
     } else if (objnum > 0) {
fcfc58
--- Build/source/texk/web2c/pdftexdir/pdftoepdf.cc
fcfc58
+++ Build/source/texk/web2c/pdftexdir/pdftoepdf.cc
fcfc58
@@ -290,7 +290,7 @@ static void copyName(char *s)
fcfc58
 static void copyDictEntry(Object * obj, int i)
fcfc58
 {
fcfc58
     Object obj1;
fcfc58
-    copyName(obj->dictGetKey(i));
fcfc58
+    copyName((char *)obj->dictGetKey(i));
fcfc58
     pdf_puts(" ");
fcfc58
     obj1 = obj->dictGetValNF(i);
fcfc58
     copyObject(&obj1);
fcfc58
@@ -355,7 +355,7 @@ static void copyProcSet(Object * obj)
fcfc58
         if (!procset.isName())
fcfc58
             pdftex_fail("PDF inclusion: invalid ProcSet entry type <%s>",
fcfc58
                         procset.getTypeName());
fcfc58
-        copyName(procset.getName());
fcfc58
+        copyName((char *)procset.getName());
fcfc58
         pdf_puts(" ");
fcfc58
     }
fcfc58
     pdf_puts("]\n");
fcfc58
@@ -418,7 +418,7 @@ static void copyFont(char *tag, Object * fontRef)
fcfc58
         && fontdescRef.isRef()
fcfc58
         && fontdesc.isDict()
fcfc58
         && embeddableFont(&fontdesc)
fcfc58
-        && (fontmap = lookup_fontmap(basefont.getName())) != NULL) {
fcfc58
+        && (fontmap = lookup_fontmap((char *)basefont.getName())) != NULL) {
fcfc58
         // round /StemV value, since the PDF input is a float
fcfc58
         // (see Font Descriptors in PDF reference), but we only store an
fcfc58
         // integer, since we don't want to change the struct.
fcfc58
@@ -427,7 +427,7 @@ static void copyFont(char *tag, Object * fontRef)
fcfc58
         charset = fontdesc.dictLookup("CharSet");
fcfc58
         if (!charset.isNull() &&
fcfc58
             charset.isString() && is_subsetable(fontmap))
fcfc58
-            epdf_mark_glyphs(fd, charset.getString()->getCString());
fcfc58
+            epdf_mark_glyphs(fd, (char *)charset.getString()->getCString());
fcfc58
         else
fcfc58
             embed_whole_font(fd);
fcfc58
         addFontDesc(fontdescRef.getRef(), fd);
fcfc58
@@ -456,7 +456,7 @@ static void copyFontResources(Object * obj)
fcfc58
         if (fontRef.isRef())
fcfc58
             copyFont(obj->dictGetKey(i), &fontRef);
fcfc58
         else if (fontRef.isDict()) {   // some programs generate pdf with embedded font object
fcfc58
-            copyName(obj->dictGetKey(i));
fcfc58
+            copyName((char *)obj->dictGetKey(i));
fcfc58
             pdf_puts(" ");
fcfc58
             copyObject(&fontRef);
fcfc58
         }
fcfc58
@@ -565,7 +565,7 @@ static void copyObject(Object * obj)
fcfc58
     } else if (obj->isNum()) {
fcfc58
         pdf_printf("%s", convertNumToPDF(obj->getNum()));
fcfc58
     } else if (obj->isString()) {
fcfc58
-        s = obj->getString();
fcfc58
+        s = (GooString *)obj->getString();
fcfc58
         p = s->getCString();
fcfc58
         l = s->getLength();
fcfc58
         if (strlen(p) == (unsigned int) l) {
fcfc58
@@ -589,7 +589,7 @@ static void copyObject(Object * obj)
fcfc58
             pdf_puts(">");
fcfc58
         }
fcfc58
     } else if (obj->isName()) {
fcfc58
-        copyName(obj->getName());
fcfc58
+        copyName((char *)obj->getName());
fcfc58
     } else if (obj->isNull()) {
fcfc58
         pdf_puts("null");
fcfc58
     } else if (obj->isArray()) {
fcfc58
-- 
fcfc58
cgit v1.1
fcfc58