Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 384875 | Differences between
and this patch

Collapse All | Expand All

(-)luatex-beta-0.70.1/source/texk/web2c/luatexdir/lua/lepdflib.cc (+28 lines)
Lines 23-28 static const char _svn_version[] = Link Here
23
    "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.70.1/source/texk/web2c/luatexdir/lua/lepdflib.cc $";
23
    "$URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.70.1/source/texk/web2c/luatexdir/lua/lepdflib.cc $";
24
24
25
#include "image/epdf.h"
25
#include "image/epdf.h"
26
#include <poppler/cpp/poppler-version.h>
26
27
27
// define DEBUG
28
// define DEBUG
28
29
Lines 89-95 new_poppler_userdata(AnnotBorder); Link Here
89
new_poppler_userdata(Annots);
90
new_poppler_userdata(Annots);
90
new_poppler_userdata(Array);
91
new_poppler_userdata(Array);
91
new_poppler_userdata(Catalog);
92
new_poppler_userdata(Catalog);
93
#if POPPLER_VERSION_MAJOR == 0 && (POPPLER_VERSION_MINOR < 17 || \
94
    ( POPPLER_VERSION_MINOR == 17 && POPPLER_VERSION_MICRO < 2))
92
new_poppler_userdata(EmbFile);
95
new_poppler_userdata(EmbFile);
96
#endif
93
new_poppler_userdata(Dict);
97
new_poppler_userdata(Dict);
94
//new_poppler_userdata(GooString);
98
//new_poppler_userdata(GooString);
95
new_poppler_userdata(LinkDest);
99
new_poppler_userdata(LinkDest);
Lines 393-399 static int m_Annot__gc(lua_State * L) Link Here
393
    printf("\n===== Annot GC ===== uin=<%p>\n", uin);
397
    printf("\n===== Annot GC ===== uin=<%p>\n", uin);
394
#endif
398
#endif
395
    if (uin->atype == ALLOC_LEPDF)
399
    if (uin->atype == ALLOC_LEPDF)
400
#if POPPLER_VERSION_MAJOR == 0 && POPPLER_VERSION_MINOR < 17
396
        delete(Annot *) uin->d;
401
        delete(Annot *) uin->d;
402
#else
403
        ((Annot *) uin->d)->decRefCnt();
404
#endif
397
    return 0;
405
    return 0;
398
}
406
}
399
407
Lines 410-415 static const struct luaL_Reg Annot_m[] = Link Here
410
//**********************************************************************
418
//**********************************************************************
411
// AnnotBorderStyle
419
// AnnotBorderStyle
412
420
421
#if POPPLER_VERSION_MAJOR == 0 && POPPLER_VERSION_MINOR < 17
422
413
m_poppler_get_DOUBLE(AnnotBorderStyle, getWidth);
423
m_poppler_get_DOUBLE(AnnotBorderStyle, getWidth);
414
424
415
m_poppler__tostring(AnnotBorderStyle);
425
m_poppler__tostring(AnnotBorderStyle);
Lines 435-440 static const struct luaL_Reg AnnotBorder Link Here
435
    {NULL, NULL}                // sentinel
445
    {NULL, NULL}                // sentinel
436
};
446
};
437
447
448
#endif
449
438
//**********************************************************************
450
//**********************************************************************
439
// Annots
451
// Annots
440
452
Lines 684-692 static int m_Catalog_findDest(lua_State Link Here
684
m_poppler_get_poppler(Catalog, Object, getDests);
696
m_poppler_get_poppler(Catalog, Object, getDests);
685
m_poppler_get_INT(Catalog, numEmbeddedFiles);
697
m_poppler_get_INT(Catalog, numEmbeddedFiles);
686
698
699
#if POPPLER_VERSION_MAJOR == 0 && (POPPLER_VERSION_MINOR < 17 || \
700
    ( POPPLER_VERSION_MINOR == 17 && POPPLER_VERSION_MICRO < 2))
687
static int m_Catalog_embeddedFile(lua_State * L)
701
static int m_Catalog_embeddedFile(lua_State * L)
688
{
702
{
689
    EmbFile *ef;
703
    EmbFile *ef;
704
    FileSpec *ef;
690
    int i, len;
705
    int i, len;
691
    udstruct *uin, *uout;
706
    udstruct *uin, *uout;
692
    uin = (udstruct *) luaL_checkudata(L, 1, M_Catalog);
707
    uin = (udstruct *) luaL_checkudata(L, 1, M_Catalog);
Lines 707-712 static int m_Catalog_embeddedFile(lua_St Link Here
707
        lua_pushnil(L);
722
        lua_pushnil(L);
708
    return 1;
723
    return 1;
709
}
724
}
725
#endif
710
726
711
m_poppler_get_INT(Catalog, numJS);
727
m_poppler_get_INT(Catalog, numJS);
712
728
Lines 749-755 static const struct luaL_Reg Catalog_m[] Link Here
749
    {"findDest", m_Catalog_findDest},
765
    {"findDest", m_Catalog_findDest},
750
    {"getDests", m_Catalog_getDests},
766
    {"getDests", m_Catalog_getDests},
751
    {"numEmbeddedFiles", m_Catalog_numEmbeddedFiles},
767
    {"numEmbeddedFiles", m_Catalog_numEmbeddedFiles},
768
#if POPPLER_VERSION_MAJOR == 0 && POPPLER_VERSION_MINOR < 17
752
    {"embeddedFile", m_Catalog_embeddedFile},
769
    {"embeddedFile", m_Catalog_embeddedFile},
770
#endif
753
    {"numJS", m_Catalog_numJS},
771
    {"numJS", m_Catalog_numJS},
754
    {"getJS", m_Catalog_getJS},
772
    {"getJS", m_Catalog_getJS},
755
    {"getOutline", m_Catalog_getOutline},
773
    {"getOutline", m_Catalog_getOutline},
Lines 761-766 static const struct luaL_Reg Catalog_m[] Link Here
761
//**********************************************************************
779
//**********************************************************************
762
// EmbFile
780
// EmbFile
763
781
782
#if POPPLER_VERSION_MAJOR == 0 && (POPPLER_VERSION_MINOR < 17 || \
783
    ( POPPLER_VERSION_MINOR == 17 && POPPLER_VERSION_MICRO < 2))
784
764
m_poppler_get_GOOSTRING(EmbFile, name);
785
m_poppler_get_GOOSTRING(EmbFile, name);
765
m_poppler_get_GOOSTRING(EmbFile, description);
786
m_poppler_get_GOOSTRING(EmbFile, description);
766
m_poppler_get_INT(EmbFile, size);
787
m_poppler_get_INT(EmbFile, size);
Lines 801-806 static const struct luaL_Reg EmbFile_m[] Link Here
801
    {NULL, NULL}                // sentinel
822
    {NULL, NULL}                // sentinel
802
};
823
};
803
824
825
#endif
826
804
//**********************************************************************
827
//**********************************************************************
805
// Dict
828
// Dict
806
829
Lines 2683-2693 int luaopen_epdf(lua_State * L) Link Here
2683
{
2706
{
2684
    register_meta(Annot);
2707
    register_meta(Annot);
2685
    // TODO register_meta(AnnotBorder);
2708
    // TODO register_meta(AnnotBorder);
2709
#if POPPLER_VERSION_MAJOR == 0 && POPPLER_VERSION_MINOR < 17
2686
    register_meta(AnnotBorderStyle);
2710
    register_meta(AnnotBorderStyle);
2711
#endif
2687
    register_meta(Annots);
2712
    register_meta(Annots);
2688
    register_meta(Array);
2713
    register_meta(Array);
2689
    register_meta(Catalog);
2714
    register_meta(Catalog);
2715
#if POPPLER_VERSION_MAJOR == 0 && (POPPLER_VERSION_MINOR < 17 || \
2716
    ( POPPLER_VERSION_MINOR == 17 && POPPLER_VERSION_MICRO < 2))
2690
    register_meta(EmbFile);
2717
    register_meta(EmbFile);
2718
#endif
2691
    register_meta(Dict);
2719
    register_meta(Dict);
2692
    register_meta(GooString);
2720
    register_meta(GooString);
2693
    register_meta(LinkDest);
2721
    register_meta(LinkDest);

Return to bug 384875