9f263ecfe5
- Add patches for poppler 0.72: * Rebase/extend source-fix-const-poppler0.66.0.patch and apply for all versions using pdf*-newpoppler.cc * source-fix-bool-poppler.patch * source-poppler-use-std_string.patch * source-poppler-fix-dict-memleak.patch - Add source-lua-fix-bad-compare.patch - Drop source-lua-poppler0640.dif, instead of casting the const's away, add const where appropriate OBS-URL: https://build.opensuse.org/request/show/661288 OBS-URL: https://build.opensuse.org/package/show/Publishing:TeXLive/texlive?expand=0&rev=308
177 lines
6.1 KiB
Diff
177 lines
6.1 KiB
Diff
From 497c0e42d91d78837ddca8906bf7246c93654d41 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bruens@rwth-aachen.de>
|
|
Date: Sat, 22 Dec 2018 00:25:44 +0100
|
|
Subject: [PATCH] Use bool instead of GBool
|
|
|
|
---
|
|
luatexdir/image/pdftoepdf.w | 12 ++++++------
|
|
luatexdir/lua/lepdflib.cc | 20 ++++++++++----------
|
|
pdftexdir/pdftoepdf.cc | 6 +++---
|
|
pdftexdir/pdftosrc.cc | 4 ++--
|
|
4 files changed, 16 insertions(+), 16 deletions(-)
|
|
|
|
diff --git a/texk/web2c/luatexdir/image/pdftoepdf.w b/texk/web2c/luatexdir/image/pdftoepdf.w
|
|
index 7ba2973..dedc489 100644
|
|
--- a/texk/web2c/luatexdir/image/pdftoepdf.w
|
|
+++ b/texk/web2c/luatexdir/image/pdftoepdf.w
|
|
@@ -35,7 +35,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 */
|
|
|
|
@@ -587,11 +587,11 @@ void read_pdf_info(image_dict * idict)
|
|
const 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);
|
|
@@ -966,7 +966,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 a16bf3b..36f1601 100644
|
|
--- a/texk/web2c/luatexdir/lua/lepdflib.cc
|
|
+++ b/texk/web2c/luatexdir/lua/lepdflib.cc
|
|
@@ -439,7 +439,7 @@ static int l_new_Object(lua_State * L)
|
|
break;
|
|
case 1:
|
|
if (lua_isboolean (L,1)) {
|
|
- uout->d = new Object(lua_toboolean(L, 1)? gTrue : gFalse);
|
|
+ uout->d = new Object(lua_toboolean(L, 1)? true : false);
|
|
uout->atype = ALLOC_LEPDF;
|
|
uout->pc = 0;
|
|
uout->pd = NULL;
|
|
@@ -1527,9 +1527,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;
|
|
}
|
|
|
|
@@ -3038,12 +3038,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 = lua_toboolean(L, 2);
|
|
((Attribute *) uin->d)->setHidden(i);
|
|
return 0;
|
|
}
|
|
@@ -3180,7 +3180,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);
|
|
@@ -3226,13 +3226,13 @@ static int m_StructElement_setRevision(lua_State * L)
|
|
|
|
static int m_StructElement_getText(lua_State * L)
|
|
{
|
|
- GBool i;
|
|
+ bool i;
|
|
const 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 = lua_toboolean(L, 2);
|
|
gs = ((StructElement *) uin->d)->getText(i);
|
|
if (gs != NULL)
|
|
lua_pushlstring(L, gs->getCString(), gs->getLength());
|
|
@@ -3321,7 +3321,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);
|
|
@@ -3329,7 +3329,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 = lua_toboolean(L, 3);
|
|
a = ((StructElement *) uin->d)->findAttribute(t,g,o);
|
|
|
|
if (a!=NULL){
|
|
diff --git a/texk/web2c/pdftexdir/pdftoepdf.cc b/texk/web2c/pdftexdir/pdftoepdf.cc
|
|
index 013cf13..d26ac61 100644
|
|
--- a/texk/web2c/pdftexdir/pdftoepdf.cc
|
|
+++ b/texk/web2c/pdftexdir/pdftoepdf.cc
|
|
@@ -120,7 +120,7 @@ struct UsedEncoding {
|
|
|
|
static InObj *inObjList;
|
|
static UsedEncoding *encodingList;
|
|
-static GBool isInit = gFalse;
|
|
+static bool isInit = false;
|
|
|
|
// --------------------------------------------------------------------
|
|
// Maintain list of open embedded PDF files
|
|
@@ -724,8 +724,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 3b1d250..7dbee00 100644
|
|
--- a/texk/web2c/pdftexdir/pdftosrc.cc
|
|
+++ b/texk/web2c/pdftexdir/pdftosrc.cc
|
|
@@ -173,9 +173,9 @@ int main(int argc, char *argv[])
|
|
|
|
// parse the header: object numbers and offsets
|
|
objStr.streamReset();
|
|
- str = new EmbedStream(objStr.getStream(), Object(objNull), gTrue, first);
|
|
+ str = new EmbedStream(objStr.getStream(), Object(objNull), true, first);
|
|
lexer = new Lexer(xref, str);
|
|
- parser = new Parser(xref, lexer, gFalse);
|
|
+ parser = new Parser(xref, lexer, false);
|
|
for (n = 0; n < nObjects; ++n) {
|
|
obj1 = parser->getObj();
|
|
obj2 = parser->getObj();
|
|
--
|
|
2.19.2
|
|
|