summaryrefslogtreecommitdiff
blob: 309341705006658f31bc857efa708db0f045d69d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
From 29f2412e10523158f5e601f32482d3d233a934fc Mon Sep 17 00:00:00 2001
From: Andreas Sturmlechner <andreas.sturmlechner@gmail.com>
Date: Sat, 12 Jan 2019 21:42:09 +0100
Subject: [PATCH 1/2] Fix build with poppler-0.69.0

---
 texk/web2c/luatexdir/image/epdf.h          |  1 +
 texk/web2c/luatexdir/image/pdftoepdf.w     | 14 +++++++-------
 texk/web2c/luatexdir/lua/lepdflib.cc       | 18 +++++++++---------
 texk/web2c/luatexdir/lua/lpdfscannerlib.cc |  1 +
 texk/web2c/pdftexdir/pdftoepdf.cc          |  7 ++++---
 texk/web2c/pdftexdir/pdftosrc.cc           |  5 +++--
 6 files changed, 25 insertions(+), 21 deletions(-)

diff --git a/texk/web2c/luatexdir/image/epdf.h b/texk/web2c/luatexdir/image/epdf.h
index 57bb2e39..ebc83bdb 100644
--- a/texk/web2c/luatexdir/image/epdf.h
+++ b/texk/web2c/luatexdir/image/epdf.h
@@ -39,6 +39,7 @@ extern "C" {
 #  include <goo/GooString.h>
 #  include <goo/gmem.h>
 #  include <goo/gfile.h>
+#  include <goo/gdir.h>
 #  include <Object.h>
 #  include <Stream.h>
 #  include <Gfx.h>
diff --git a/texk/web2c/luatexdir/image/pdftoepdf.w b/texk/web2c/luatexdir/image/pdftoepdf.w
index 3aebf009..0a23b201 100644
--- a/texk/web2c/luatexdir/image/pdftoepdf.w
+++ b/texk/web2c/luatexdir/image/pdftoepdf.w
@@ -31,7 +31,7 @@
 
 extern void md5(Guchar *msg, int msgLen, Guchar *digest);
 
-static GBool isInit = gFalse;
+static bool isInit = false;
 
 /* Maintain AVL tree of all PDF files for embedding */
 
@@ -468,7 +468,7 @@ static void copyObject(PDF pdf, PdfDocument * pdf_doc, Object * obj)
         break;
     /*
     case objNum:
-        GBool isNum() { return type == objInt || type == objReal; }
+        bool isNum() { return type == objInt || type == objReal; }
         break;
     */
     case objString:
@@ -587,11 +587,11 @@ void read_pdf_info(image_dict * idict)
     PDFRectangle *pagebox;
     int pdf_major_version_found, pdf_minor_version_found;
     float xsize, ysize, xorig, yorig;
-    if (isInit == gFalse) {
+    if (isInit == false) {
         if (!(globalParams))
             globalParams = new GlobalParams();
-        globalParams->setErrQuiet(gFalse);
-        isInit = gTrue;
+        globalParams->setErrQuiet(false);
+        isInit = true;
     }
     if (img_type(idict) == IMG_TYPE_PDF)
         pdf_doc = refPdfDocument(img_filepath(idict), FE_FAIL);
@@ -960,7 +960,7 @@ void epdf_free()
     if (PdfDocumentTree != NULL)
         avl_destroy(PdfDocumentTree, destroyPdfDocument);
     PdfDocumentTree = NULL;
-    if (isInit == gTrue)
+    if (isInit == true)
         delete globalParams;
-    isInit = gFalse;
+    isInit = false;
 }
diff --git a/texk/web2c/luatexdir/lua/lepdflib.cc b/texk/web2c/luatexdir/lua/lepdflib.cc
index 14558510..d47ec941 100644
--- a/texk/web2c/luatexdir/lua/lepdflib.cc
+++ b/texk/web2c/luatexdir/lua/lepdflib.cc
@@ -1374,9 +1374,9 @@ static int m_Object_initBool(lua_State * L)
         pdfdoc_changed_error(L);
     luaL_checktype(L, 2, LUA_TBOOLEAN);
     if (lua_toboolean(L, 2) != 0)
-        *((Object *) uin->d) = Object(gTrue);
+        *((Object *) uin->d) = Object(true);
     else
-        *((Object *) uin->d) = Object(gFalse);
+        *((Object *) uin->d) = Object(false);
     return 0;
 }
 
@@ -2881,12 +2881,12 @@ m_poppler_get_BOOL(Attribute, isHidden);
 
 static int m_Attribute_setHidden(lua_State * L)
 {
-    GBool i;
+    bool i;
     udstruct *uin;
     uin = (udstruct *) luaL_checkudata(L, 1, M_Attribute);
     if (uin->pd != NULL && uin->pd->pc != uin->pc)
         pdfdoc_changed_error(L);
-    i = (GBool) lua_toboolean(L, 2);
+    i = (bool) lua_toboolean(L, 2);
     ((Attribute *) uin->d)->setHidden(i);
     return 0;
 }
@@ -3023,7 +3023,7 @@ static int m_StructElement_getParentRef(lua_State * L)
 // Ref is false if the C++ functione return false
 static int m_StructElement_getPageRef(lua_State * L)
 {
-    GBool b;
+    bool b;
     Ref *r;
     udstruct *uin, *uout;
     uin = (udstruct *) luaL_checkudata(L, 1, M_StructElement);
@@ -3069,13 +3069,13 @@ static int m_StructElement_setRevision(lua_State * L)
 
 static int m_StructElement_getText(lua_State * L)
 {
-    GBool i;
+    bool i;
     GooString *gs;
     udstruct *uin;
     uin = (udstruct *) luaL_checkudata(L, 1, M_StructElement);
     if (uin->pd != NULL && uin->pd->pc != uin->pc)
         pdfdoc_changed_error(L);
-    i = (GBool) lua_toboolean(L, 2);
+    i = (bool) lua_toboolean(L, 2);
     gs =  ((StructElement *) uin->d)->getText(i);
     if (gs != NULL)
         lua_pushlstring(L, gs->getCString(), gs->getLength());
@@ -3164,7 +3164,7 @@ static int m_StructElement_findAttribute(lua_State * L)
 {
     Attribute::Type t;
     Attribute::Owner o;
-    GBool g;
+    bool g;
     udstruct *uin, *uout;
     const Attribute *a;
     uin = (udstruct *) luaL_checkudata(L, 1, M_StructElement);
@@ -3172,7 +3172,7 @@ static int m_StructElement_findAttribute(lua_State * L)
         pdfdoc_changed_error(L);
     t = (Attribute::Type) luaL_checkint(L,1);
     o = (Attribute::Owner) luaL_checkint(L,2);
-    g = (GBool) lua_toboolean(L, 3);
+    g = (bool) lua_toboolean(L, 3);
     a = ((StructElement *) uin->d)->findAttribute(t,g,o);
 
     if (a!=NULL){
diff --git a/texk/web2c/luatexdir/lua/lpdfscannerlib.cc b/texk/web2c/luatexdir/lua/lpdfscannerlib.cc
index eb881b63..a2d39b83 100644
--- a/texk/web2c/luatexdir/lua/lpdfscannerlib.cc
+++ b/texk/web2c/luatexdir/lua/lpdfscannerlib.cc
@@ -34,6 +34,7 @@ extern "C" {
 #  include <goo/GooString.h>
 #  include <goo/gmem.h>
 #  include <goo/gfile.h>
+#  include <goo/gdir.h>
 #  include <Object.h>
 #  include <Stream.h>
 #  include <Gfx.h>
diff --git a/texk/web2c/pdftexdir/pdftoepdf.cc b/texk/web2c/pdftexdir/pdftoepdf.cc
index 0ffc3e19..af12c74e 100644
--- a/texk/web2c/pdftexdir/pdftoepdf.cc
+++ b/texk/web2c/pdftexdir/pdftoepdf.cc
@@ -37,6 +37,7 @@ with this program.  If not, see <http://www.gnu.org/licenses/>.
 #include <goo/GooString.h>
 #include <goo/gmem.h>
 #include <goo/gfile.h>
+#include <goo/gdir.h>
 #define GString GooString
 #else
 #include <aconf.h>
@@ -114,7 +115,7 @@ struct UsedEncoding {
 
 static InObj *inObjList;
 static UsedEncoding *encodingList;
-static GBool isInit = gFalse;
+static bool isInit = false;
 
 // --------------------------------------------------------------------
 // Maintain list of open embedded PDF files
@@ -718,8 +719,8 @@ read_pdf_info(char *image_name, char *page_name, int page_num,
     // initialize
     if (!isInit) {
         globalParams = new GlobalParams();
-        globalParams->setErrQuiet(gFalse);
-        isInit = gTrue;
+        globalParams->setErrQuiet(false);
+        isInit = true;
     }
     // open PDF file
     pdf_doc = find_add_document(image_name);
diff --git a/texk/web2c/pdftexdir/pdftosrc.cc b/texk/web2c/pdftexdir/pdftosrc.cc
index ead9f209..22ab6bdc 100644
--- a/texk/web2c/pdftexdir/pdftosrc.cc
+++ b/texk/web2c/pdftexdir/pdftosrc.cc
@@ -31,6 +31,7 @@ with this program.  If not, see <http://www.gnu.org/licenses/>.
 #include <goo/GooString.h>
 #include <goo/gmem.h>
 #include <goo/gfile.h>
+#include <goo/gdir.h>
 #else
 #include <aconf.h>
 #include <GString.h>
@@ -167,8 +168,8 @@ int main(int argc, char *argv[])
 
                 // parse the header: object numbers and offsets
                 objStr.streamReset();
-                str = new EmbedStream(objStr.getStream(), Object(objNull), gTrue, first);
-                parser = new Parser(xref, new Lexer(xref, str), gFalse);
+                str = new EmbedStream(objStr.getStream(), Object(objNull), true, first);
+                parser = new Parser(xref, new Lexer(xref, str), false);
                 for (n = 0; n < nObjects; ++n) {
                     obj1 = parser->getObj();
                     obj2 = parser->getObj();
-- 
2.20.1