File source-poppler2.dif of Package texlive-bin
--- texk/web2c/luatexdir/lua/lepdflib.cc 2012-06-10 13:41:31.000000000 +0000
+++ texk/web2c/luatexdir/lua/lepdflib.cc 2012-06-10 14:11:56.000000000 +0000
@@ -140,53 +140,6 @@
return 1; // doc path
}
-static int l_new_Annot(lua_State * L)
-{
- udstruct *uxref, *udict, *ucatalog, *uref, *uout;
- uxref = (udstruct *) luaL_checkudata(L, 1, M_XRef);
- udict = (udstruct *) luaL_checkudata(L, 2, M_Dict);
- ucatalog = (udstruct *) luaL_checkudata(L, 3, M_Catalog);
- uref = (udstruct *) luaL_checkudata(L, 4, M_Ref);
- if (uxref->pd != ucatalog->pd || uxref->pd != udict->pd
- || uxref->pd != uref->pd)
- pdfdoc_differs_error(L);
- if ((uxref->pd != NULL && uxref->pd->pc != uxref->pc) ||
- (ucatalog->pd != NULL && ucatalog->pd->pc != ucatalog->pc) ||
- (udict->pd != NULL && udict->pd->pc != udict->pc) ||
- (uref->pd != NULL && uref->pd->pc != uref->pc))
- pdfdoc_changed_error(L);
- uout = new_Annot_userdata(L);
- uout->d =
- new Annot((XRef *) uxref->d, (Dict *) udict->d, (Catalog *) ucatalog->d,
- (Object *) uref->d);
- uout->atype = ALLOC_LEPDF;
- uout->pc = uxref->pc;
- uout->pd = uxref->pd;
- return 1;
-}
-
-static int l_new_Annots(lua_State * L)
-{
- udstruct *uxref, *ucatalog, *uannotsobj, *uout;
- uxref = (udstruct *) luaL_checkudata(L, 1, M_XRef);
- ucatalog = (udstruct *) luaL_checkudata(L, 2, M_Catalog);
- uannotsobj = (udstruct *) luaL_checkudata(L, 3, M_Object);
- if (uxref->pd != ucatalog->pd || uxref->pd != uannotsobj->pd)
- pdfdoc_differs_error(L);
- if ((uxref->pd != NULL && uxref->pd->pc != uxref->pc)
- || (ucatalog->pd != NULL && ucatalog->pd->pc != ucatalog->pc)
- || (uannotsobj->pd != NULL && uannotsobj->pd->pc != uannotsobj->pc))
- pdfdoc_changed_error(L);
- uout = new_Annots_userdata(L);
- uout->d =
- new Annots((XRef *) uxref->d, (Catalog *) ucatalog->d,
- (Object *) uannotsobj->d);
- uout->atype = ALLOC_LEPDF;
- uout->pc = uxref->pc;
- uout->pd = uxref->pd;
- return 1;
-}
-
static int l_new_Array(lua_State * L)
{
udstruct *uxref, *uout;
@@ -241,8 +194,6 @@
static const struct luaL_Reg epdflib[] = {
{"open", l_open_PDFDoc},
- {"Annot", l_new_Annot},
- {"Annots", l_new_Annots},
{"Array", l_new_Array},
{"Dict", l_new_Dict},
{"Object", l_new_Object},
@@ -369,8 +320,6 @@
// Annot
m_poppler_get_BOOL(Annot, isOk);
-m_poppler_get_OBJECT(Annot, getAppearance);
-m_poppler_get_poppler(Annot, AnnotBorder, getBorder);
static int m_Annot_match(lua_State * L)
{
@@ -408,8 +357,6 @@
static const struct luaL_Reg Annot_m[] = {
{"isOk", m_Annot_isOk},
- {"getAppearance", m_Annot_getAppearance},
- {"getBorder", m_Annot_getBorder},
{"match", m_Annot_match},
{"__tostring", m_Annot__tostring},
{"__gc", m_Annot__gc},
@@ -417,38 +364,6 @@
};
//**********************************************************************
-// AnnotBorderStyle
-
-#if POPPLER_VERSION_MAJOR == 0 && POPPLER_VERSION_MINOR < 17
-
-m_poppler_get_DOUBLE(AnnotBorderStyle, getWidth);
-
-m_poppler__tostring(AnnotBorderStyle);
-
-static int m_Annots__gc(lua_State * L)
-{
- udstruct *uin;
- uin = (udstruct *) luaL_checkudata(L, 1, M_Annots);
- if (uin->pd != NULL && uin->pd->pc != uin->pc)
- pdfdoc_changed_error(L);
-# ifdef DEBUG
- printf("\n===== Annots GC ===== uin=<%p>\n", uin);
-# endif
- if (uin->atype == ALLOC_LEPDF)
- delete(Annots *) uin->d;
- return 0;
-}
-
-static const struct luaL_Reg AnnotBorderStyle_m[] = {
- {"getWidth", m_AnnotBorderStyle_getWidth},
- {"__tostring", m_AnnotBorderStyle__tostring},
- {"__gc", m_Annots__gc},
- {NULL, NULL} // sentinel
-};
-
-#endif
-
-//**********************************************************************
// Annots
m_poppler_get_INT(Annots, getNumAnnots);
@@ -1433,13 +1348,11 @@
static int m_Object_getTypeName(lua_State * L)
{
- char *s;
udstruct *uin;
uin = (udstruct *) luaL_checkudata(L, 1, M_Object);
if (uin->pd != NULL && uin->pd->pc != uin->pc)
pdfdoc_changed_error(L);
- s = ((Object *) uin->d)->getTypeName();
- lua_pushstring(L, s);
+ lua_pushstring(L, ((Object *) uin->d)->getTypeName());
return 1;
}
@@ -2109,28 +2022,6 @@
m_poppler_get_poppler(Page, Dict, getResourceDict);
m_poppler_get_OBJECT(Page, getAnnots);
-static int m_Page_getLinks(lua_State * L)
-{
- Links *links;
- udstruct *uin, *ucat, *uout;
- uin = (udstruct *) luaL_checkudata(L, 1, M_Page);
- ucat = (udstruct *) luaL_checkudata(L, 2, M_Catalog);
- if (uin->pd != NULL && ucat->pd != NULL && uin->pd != ucat->pd)
- pdfdoc_differs_error(L);
- if ((uin->pd != NULL && uin->pd->pc != uin->pc)
- || (ucat->pd != NULL && ucat->pd->pc != ucat->pd->pc))
- pdfdoc_changed_error(L);
- links = ((Page *) uin->d)->getLinks((Catalog *) ucat->d);
- if (links != NULL) {
- uout = new_Links_userdata(L);
- uout->d = links;
- uout->pc = uin->pc;
- uout->pd = uin->pd;
- } else
- lua_pushnil(L);
- return 1;
-}
-
m_poppler_get_OBJECT(Page, getContents);
m_poppler__tostring(Page);
@@ -2157,7 +2048,6 @@
{"getSeparationInfo", m_Page_getSeparationInfo},
{"getResourceDict", m_Page_getResourceDict},
{"getAnnots", m_Page_getAnnots},
- {"getLinks", m_Page_getLinks},
{"getContents", m_Page_getContents},
{"__tostring", m_Page__tostring},
{NULL, NULL} // sentinel
@@ -2738,8 +2628,6 @@
return 1;
}
-m_poppler_get_INT(XRef, getSize);
-
static int m_XRef_getEntry(lua_State * L)
{
int i, size;
@@ -2748,7 +2636,7 @@
if (uin->pd != NULL && uin->pd->pc != uin->pc)
pdfdoc_changed_error(L);
i = luaL_checkint(L, 2);
- size = ((XRef *) uin->d)->getSize();
+ size = ((XRef *) uin->d)->getNumObjects();
if (i > 0 && i <= size) {
uout = new_XRefEntry_userdata(L);
uout->d = ((XRef *) uin->d)->getEntry(i);
@@ -2784,7 +2672,6 @@
{"getRootGen", m_XRef_getRootGen},
// {"getStreamEnd", m_XRef_getStreamEnd},
{"getNumEntry", m_XRef_getNumEntry},
- {"getSize", m_XRef_getSize},
{"getEntry", m_XRef_getEntry},
{"getTrailerDict", m_XRef_getTrailerDict},
{"__tostring", m_XRef__tostring},
--- texk/web2c/pdftexdir/pdftosrc.cc 2012-06-10 13:41:31.000000000 +0000
+++ texk/web2c/pdftexdir/pdftosrc.cc 2012-06-10 13:56:52.000000000 +0000
@@ -134,7 +134,7 @@
exit(1);
}
if (extract_xref_table) {
- int size = xref->getSize();
+ int size = xref->getNumObjects();
int i;
for (i = 0; i < size; i++) {
if (xref->getEntry(i)->offset == 0xffffffff)