summaryrefslogtreecommitdiff
path: root/libre/texlive-bin/poppler-0.26.patch
blob: fde123f62b12fb22d683007b3a0c05c851c35674 (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
--- trunk/source/texk/web2c/luatexdir/image/epdf.h	2013/01/20 19:58:26	4559
+++ trunk/source/texk/web2c/luatexdir/image/epdf.h	2014/01/02 15:35:31	4718
@@ -40,21 +40,22 @@
 #  include <goo/GooString.h>
 #  include <goo/gmem.h>
 #  include <goo/gfile.h>
-#  include "Object.h"
-#  include "Stream.h"
-#  include "Gfx.h"
-#  include "Annot.h"
-#  include "Array.h"
-#  include "Dict.h"
-#  include "XRef.h"
-#  include "Catalog.h"
-#  include "Link.h"
-#  include "Page.h"
-#  include "GfxFont.h"
-#  include "PDFDoc.h"
-#  include "GlobalParams.h"
-#  include "Error.h"
-#  include "FileSpec.h"
+#  include <Object.h>
+#  include <Stream.h>
+#  include <Gfx.h>
+#  include <Annot.h>
+#  include <Array.h>
+#  include <Dict.h>
+#  include <XRef.h>
+#  include <Catalog.h>
+#  include <StructTreeRoot.h>
+#  include <Link.h>
+#  include <Page.h>
+#  include <GfxFont.h>
+#  include <PDFDoc.h>
+#  include <GlobalParams.h>
+#  include <Error.h>
+#  include <FileSpec.h>
 
 extern "C" {
 
@@ -81,8 +82,8 @@
 #  include "utils/avlstuff.h"
 #  include "pdf/pdftypes.h"
 
-#  include "lua52/lua.h"
-#  include "lua52/lauxlib.h"
+#  include "lua.h"
+#  include "lauxlib.h"
 
     /* pdfgen.w */
     extern int ten_pow[10];
--- trunk/source/texk/web2c/luatexdir/lua/lepdflib.cc	2013/04/05 10:54:08	4629
+++ trunk/source/texk/web2c/luatexdir/lua/lepdflib.cc	2014/01/02 15:35:31	4718
@@ -65,6 +65,7 @@
 #define M_PDFRectangle     "PDFRectangle"
 #define M_Ref              "Ref"
 #define M_Stream           "Stream"
+#define M_StructTreeRoot   "StructTreeRoot"
 #define M_XRefEntry        "XRefEntry"
 #define M_XRef             "XRef"
 
@@ -96,6 +97,7 @@
 new_poppler_userdata(PDFRectangle);
 new_poppler_userdata(Ref);
 new_poppler_userdata(Stream);
+new_poppler_userdata(StructTreeRoot);
 new_poppler_userdata(XRef);
 
 //**********************************************************************
@@ -573,7 +575,11 @@
 
 m_poppler_get_GOOSTRING(Catalog, getBaseURI);
 m_poppler_get_GOOSTRING(Catalog, readMetadata);
+#ifdef GETSTRUCTTREEROOT_RETURNS_OBJECT
 m_poppler_get_poppler(Catalog, Object, getStructTreeRoot);
+#else
+m_poppler_get_poppler(Catalog, StructTreeRoot, getStructTreeRoot);
+#endif
 
 static int m_Catalog_findPage(lua_State * L)
 {
@@ -2146,14 +2152,22 @@
 
 static int m_PDFDoc_getStructTreeRoot(lua_State * L)
 {
+#ifdef GETSTRUCTTREEROOT_RETURNS_OBJECT
     Object *obj;
+#else
+    StructTreeRoot *obj;
+#endif
     udstruct *uin, *uout;
     uin = (udstruct *) luaL_checkudata(L, 1, M_PDFDoc);
     if (uin->pd != NULL && uin->pd->pc != uin->pc)
         pdfdoc_changed_error(L);
     if (((PdfDocument *) uin->d)->doc->getCatalog()->isOk()) {
         obj = ((PdfDocument *) uin->d)->doc->getStructTreeRoot();
+#ifdef GETSTRUCTTREEROOT_RETURNS_OBJECT
         uout = new_Object_userdata(L);
+#else
+        uout = new_StructTreeRoot_userdata(L);
+#endif
         uout->d = obj;
         uout->pc = uin->pc;
         uout->pd = uin->pd;